comand-component-library 3.1.24 → 3.1.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/comand-component-library.css +1 -1
- package/dist/comand-component-library.umd.min.js +1 -1
- package/package.json +1 -1
- package/src/App.vue +29 -7
- package/src/assets/data/accordion.json +13 -4
- package/src/assets/data/top-header-navigation.json +15 -9
- package/src/components/CmdAccordion.vue +68 -21
- package/src/components/CmdCookieDisclaimer.vue +3 -4
- package/src/components/CmdFakeSelect.vue +8 -1
- package/src/components/CmdFancyBox.vue +31 -1
- package/src/components/CmdFooterNavigation.vue +6 -0
- package/src/components/CmdFormElement.vue +72 -17
- package/src/components/CmdGoogleMaps.vue +3 -0
- package/src/components/CmdImageGallery.vue +3 -2
- package/src/components/CmdImageZoom.vue +6 -0
- package/src/components/CmdMainHeadline.vue +9 -0
- package/src/components/CmdMainNavigation.vue +24 -0
- package/src/components/CmdMultipleSwitch.vue +1 -5
- package/src/components/CmdMultistepFormProgressBar.vue +6 -0
- package/src/components/CmdOpeningHours.vue +23 -2
- package/src/components/CmdPager.vue +24 -2
- package/src/components/CmdProgressBar.vue +10 -4
- package/src/components/CmdShareButtons.vue +6 -0
- package/src/components/CmdSiteHeader.vue +12 -16
- package/src/components/CmdSlideButton.vue +3 -0
- package/src/components/CmdSlideshow.vue +25 -4
- package/src/components/CmdSwitchButton.vue +44 -1
- package/src/components/CmdSystemMessage.vue +32 -11
- package/src/components/CmdTable.vue +38 -20
- package/src/components/CmdTabs.vue +12 -3
- package/src/components/CmdThumbnailScroller.vue +28 -10
- package/src/components/CmdTooltip.vue +3 -0
- package/src/components/CmdTopHeaderNavigation.vue +10 -3
- package/src/components/CmdUploadForm.vue +26 -1
- package/src/components/CmdWidthLimitationWrapper.vue +26 -3
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<label :class="['toggle-switch',
|
2
|
+
<label :class="['cmd-switch-button', 'toggle-switch',
|
3
3
|
{'switch-label': onLabel && offLabel && !labelText,
|
4
4
|
'colored' : colored, 'on' : colored && isChecked,
|
5
5
|
'off' : colored && !isChecked, 'disabled': $attrs.disabled
|
@@ -19,38 +19,78 @@ export default {
|
|
19
19
|
name: "SwitchButton",
|
20
20
|
emits: ["update:value"],
|
21
21
|
props: {
|
22
|
+
/**
|
23
|
+
* set type for input
|
24
|
+
*
|
25
|
+
* values: checkbox, radio
|
26
|
+
*/
|
22
27
|
type: {
|
23
28
|
type: String,
|
24
29
|
required: true
|
25
30
|
},
|
31
|
+
/**
|
32
|
+
* set id for input
|
33
|
+
*
|
34
|
+
* required for accessibility
|
35
|
+
*
|
36
|
+
*/
|
26
37
|
id: {
|
27
38
|
type: String,
|
28
39
|
required: true
|
29
40
|
},
|
41
|
+
/**
|
42
|
+
* set name for input
|
43
|
+
*
|
44
|
+
* require for radio-buttons (and form-submit by browser)
|
45
|
+
*/
|
30
46
|
name: {
|
31
47
|
type: String,
|
32
48
|
required: false
|
33
49
|
},
|
50
|
+
/**
|
51
|
+
* value for v-model
|
52
|
+
*/
|
34
53
|
value: {
|
35
54
|
type: [String, Array, Boolean],
|
36
55
|
required: false
|
37
56
|
},
|
57
|
+
/**
|
58
|
+
* set value to pre-check toggle-switch
|
59
|
+
*/
|
38
60
|
inputValue: {
|
39
61
|
type: String,
|
40
62
|
required: false
|
41
63
|
},
|
64
|
+
/**
|
65
|
+
* text for label
|
66
|
+
*
|
67
|
+
* required if onLabel/offLabel are not set
|
68
|
+
*/
|
42
69
|
labelText: {
|
43
70
|
type: String,
|
44
71
|
required: false
|
45
72
|
},
|
73
|
+
/**
|
74
|
+
* text for on-label
|
75
|
+
*
|
76
|
+
* set to activate switch-label (=label is placed on toggle-switch (not behind))
|
77
|
+
*/
|
46
78
|
onLabel: {
|
47
79
|
type: String,
|
48
80
|
required: false
|
49
81
|
},
|
82
|
+
/**
|
83
|
+
* text for off-label
|
84
|
+
*
|
85
|
+
* set to activate switch-label (=label is placed on toggle-switch (not behind))
|
86
|
+
*/
|
50
87
|
offLabel: {
|
51
88
|
type: String,
|
52
89
|
required: false
|
53
90
|
},
|
91
|
+
/**
|
92
|
+
* set to true, if checkbox/radio-buttons should have green/checked and red/unchecked color-coding
|
93
|
+
*/
|
54
94
|
colored: {
|
55
95
|
type: Boolean,
|
56
96
|
required: false
|
@@ -88,6 +128,8 @@ export default {
|
|
88
128
|
</script>
|
89
129
|
|
90
130
|
<style lang="scss">
|
131
|
+
/* begin cmd-switch-button ------------------------------------------------------------------------------------------ */
|
132
|
+
/* no cmd-prefix-styling (class based on frontend-framework */
|
91
133
|
.toggle-switch {
|
92
134
|
&.switch-label {
|
93
135
|
&.colored {
|
@@ -123,4 +165,5 @@ export default {
|
|
123
165
|
}
|
124
166
|
}
|
125
167
|
}
|
168
|
+
/* end cmd-switch-button ------------------------------------------------------------------------------------------ */
|
126
169
|
</style>
|
@@ -1,20 +1,19 @@
|
|
1
1
|
<template>
|
2
2
|
<transition name="fade">
|
3
3
|
<div
|
4
|
-
class="cmd-system-message system-message"
|
5
|
-
:class="[{ 'full-width': fullWidth }, status]"
|
6
|
-
role="alert"
|
7
4
|
v-if="showSystemMessage"
|
5
|
+
:class="['cmd-system-message', 'system-message', { 'full-width': fullWidth }, status]"
|
6
|
+
role="alert"
|
8
7
|
>
|
9
8
|
<a
|
10
|
-
|
9
|
+
v-if="iconClose.iconClass"
|
10
|
+
:class="iconClose.iconClass"
|
11
11
|
href="#"
|
12
12
|
@click.prevent="showSystemMessage = false"
|
13
|
-
:title="
|
14
|
-
v-if="closeIcon.iconClass"
|
13
|
+
:title="iconClose.tooltip"
|
15
14
|
></a>
|
16
15
|
<h6>
|
17
|
-
<span
|
16
|
+
<span v-if="iconMessage && iconMessage.iconClass && iconMessage.show" :class="iconMessage.iconClass"></span>
|
18
17
|
<strong v-if="message">{{ message }}</strong>
|
19
18
|
</h6>
|
20
19
|
<slot></slot>
|
@@ -31,23 +30,45 @@ export default {
|
|
31
30
|
}
|
32
31
|
},
|
33
32
|
props: {
|
33
|
+
/**
|
34
|
+
* status of message
|
35
|
+
*
|
36
|
+
* values: error (red), warning (yellow), success (grenn), info (blue)
|
37
|
+
*/
|
34
38
|
status: {
|
35
39
|
type: String,
|
36
40
|
required: true
|
37
41
|
},
|
42
|
+
/**
|
43
|
+
* activate to stretch message-box as wide as parent container (else message-box is as wide as message)
|
44
|
+
*/
|
38
45
|
fullWidth: {
|
39
46
|
type: Boolean,
|
40
47
|
default: true
|
41
48
|
},
|
42
|
-
|
43
|
-
|
44
|
-
|
49
|
+
/**
|
50
|
+
* set icon-class for message (will be displayed left from
|
51
|
+
*/
|
52
|
+
iconMessage: {
|
53
|
+
type: Object,
|
54
|
+
default: function() {
|
55
|
+
return {
|
56
|
+
iconClass: "icon-warning",
|
57
|
+
show: true
|
58
|
+
}
|
59
|
+
}
|
45
60
|
},
|
61
|
+
/**
|
62
|
+
* the system-message-text
|
63
|
+
*/
|
46
64
|
message: {
|
47
65
|
type: String,
|
48
66
|
required: false
|
49
67
|
},
|
50
|
-
|
68
|
+
/**
|
69
|
+
* icon to close system-message
|
70
|
+
*/
|
71
|
+
iconClose: {
|
51
72
|
type: Object,
|
52
73
|
default: function () {
|
53
74
|
return {
|
@@ -2,22 +2,24 @@
|
|
2
2
|
<div class="cmd-table-wrapper">
|
3
3
|
<table :class="{'full-width': fullWidth}">
|
4
4
|
<thead>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
<tr>
|
6
|
+
<th v-for="tablehead in 10" :key="tablehead">Table head {{ tablehead }}</th>
|
7
|
+
<th>Table head 11
|
8
|
+
<a v-if="collapsible"
|
9
|
+
href="#" @click.prevent="showTableData = !showTableData"
|
10
|
+
:class="showTableData ? iconCollapse.iconClass : iconExpand.iconClass"
|
11
|
+
:title="showTableData ? iconExpand.tooltip : iconCollapse.tooltip"
|
12
|
+
>
|
13
|
+
</a>
|
14
|
+
</th>
|
15
|
+
</tr>
|
14
16
|
</thead>
|
15
17
|
<transition name="fade">
|
16
|
-
<tbody v-show="showTableData
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
<tbody v-show="showTableData" aria-expanded="true">
|
19
|
+
<tr v-for="tablerows in 10" :key="tablerows">
|
20
|
+
<td v-for="tabledata in 10" :key="tabledata">Table data {{ tabledata + 1 }}</td>
|
21
|
+
<td>Table data 11</td>
|
22
|
+
</tr>
|
21
23
|
</tbody>
|
22
24
|
</transition>
|
23
25
|
</table>
|
@@ -33,21 +35,37 @@ export default {
|
|
33
35
|
}
|
34
36
|
},
|
35
37
|
props: {
|
38
|
+
/**
|
39
|
+
* activate if table should be collapsible
|
40
|
+
*/
|
36
41
|
collapsible: {
|
37
42
|
type: Boolean,
|
38
43
|
default: false
|
39
44
|
},
|
45
|
+
/**
|
46
|
+
* activate if table should be stretched to full width of its parent-container (else table will be as wide as its content)
|
47
|
+
*/
|
40
48
|
fullWidth: {
|
41
49
|
type: Boolean,
|
42
50
|
default: false
|
43
51
|
},
|
44
|
-
|
45
|
-
type:
|
46
|
-
|
52
|
+
iconExpand: {
|
53
|
+
type: Object,
|
54
|
+
default: function() {
|
55
|
+
return {
|
56
|
+
iconClass: "icon-single-arrow-down",
|
57
|
+
tooltip: "Expand table"
|
58
|
+
}
|
59
|
+
}
|
47
60
|
},
|
48
|
-
|
49
|
-
type:
|
50
|
-
|
61
|
+
iconCollapse: {
|
62
|
+
type: Object,
|
63
|
+
default: function() {
|
64
|
+
return {
|
65
|
+
iconClass: "icon-single-arrow-up",
|
66
|
+
tooltip: "Collapse table"
|
67
|
+
}
|
68
|
+
}
|
51
69
|
}
|
52
70
|
}
|
53
71
|
}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</a>
|
9
9
|
</li>
|
10
10
|
</ul>
|
11
|
-
<template v-if="
|
11
|
+
<template v-if="useSlot">
|
12
12
|
<div v-show="showTab === index" v-for="(tab, index) in tabs" :key="index" aria-live="assertive">
|
13
13
|
<slot :name="'tab-content-' + index"></slot>
|
14
14
|
</div>
|
@@ -29,15 +29,24 @@ export default {
|
|
29
29
|
}
|
30
30
|
},
|
31
31
|
props: {
|
32
|
+
/**
|
33
|
+
* activate if tabs should be (equally) stretched horizontally over full width of tab-content
|
34
|
+
*/
|
32
35
|
stretchTabs: {
|
33
36
|
type: Boolean,
|
34
37
|
default: false
|
35
38
|
},
|
39
|
+
/**
|
40
|
+
* list of tabs (incl. tab-name and tab-content (optional))
|
41
|
+
*/
|
36
42
|
tabs: {
|
37
43
|
type: Array,
|
38
|
-
required: true
|
44
|
+
required: true
|
39
45
|
},
|
40
|
-
|
46
|
+
/**
|
47
|
+
* activate if content should be given by slot
|
48
|
+
*/
|
49
|
+
useSlot: {
|
41
50
|
type: Boolean,
|
42
51
|
default: false
|
43
52
|
}
|
@@ -1,17 +1,18 @@
|
|
1
1
|
<template>
|
2
2
|
<div :class="['cmd-thumbnail-scroller', {'gallery-scroller' : !allowOpenFancyBox}]">
|
3
|
-
<CmdSlideButton @click.prevent="showPrevItem" :slideButtonType="
|
3
|
+
<CmdSlideButton @click.prevent="showPrevItem" :slideButtonType="cmdSlideButtons.previous"/>
|
4
4
|
<transition-group name="slide" tag="ul">
|
5
5
|
<li v-for="(image, index) in thumbnails" :key="image.imgId" :class="{'active' : imgIndex === index}">
|
6
6
|
<a href="#" @click.prevent="showFancyBox(index)">
|
7
7
|
<figure>
|
8
|
+
<figcaption v-if="figcaption.show && figcaption.position === 'above-image' && image.figcaption.length">{{ image.figcaption }}</figcaption>
|
8
9
|
<img :src="image.srcImageSmall" :alt="image.alt"/>
|
9
|
-
<figcaption v-if="
|
10
|
+
<figcaption v-if="figcaption.show && figcaption.position === 'below-image' && image.figcaption.length">{{ image.figcaption }}</figcaption>
|
10
11
|
</figure>
|
11
12
|
</a>
|
12
13
|
</li>
|
13
14
|
</transition-group>
|
14
|
-
<CmdSlideButton @click.prevent="showNextItem" :slideButtonType="
|
15
|
+
<CmdSlideButton @click.prevent="showNextItem" :slideButtonType="cmdSlideButtons.next"/>
|
15
16
|
</div>
|
16
17
|
</template>
|
17
18
|
|
@@ -26,29 +27,47 @@ export default {
|
|
26
27
|
thumbnails: []
|
27
28
|
}
|
28
29
|
},
|
29
|
-
|
30
30
|
components: {
|
31
31
|
CmdSlideButton
|
32
32
|
},
|
33
|
-
|
34
33
|
props: {
|
34
|
+
/**
|
35
|
+
* list of thumbnail-scroller-items
|
36
|
+
*/
|
35
37
|
thumbnailScrollerItems: {
|
36
38
|
type: Array,
|
37
39
|
required: true
|
38
40
|
},
|
41
|
+
/**
|
42
|
+
* allow large version of images to be opened in CmdFancyBox-component
|
43
|
+
*/
|
39
44
|
allowOpenFancyBox: {
|
40
45
|
type: Boolean,
|
41
46
|
default: true
|
42
47
|
},
|
48
|
+
/**
|
49
|
+
* set a default index to activate/highlight a specific image/item
|
50
|
+
*/
|
43
51
|
imgIndex: {
|
44
52
|
type: Number,
|
45
53
|
required: false
|
46
54
|
},
|
47
|
-
|
48
|
-
|
49
|
-
|
55
|
+
/**
|
56
|
+
* set figcaption
|
57
|
+
*/
|
58
|
+
figcaption: {
|
59
|
+
type: Object,
|
60
|
+
default() {
|
61
|
+
return {
|
62
|
+
show: true,
|
63
|
+
position: "below-image"
|
64
|
+
}
|
65
|
+
}
|
50
66
|
},
|
51
|
-
|
67
|
+
/**
|
68
|
+
* properties for cmdSlideButtons-component
|
69
|
+
*/
|
70
|
+
cmdSlideButtons: {
|
52
71
|
type: Object,
|
53
72
|
default() {
|
54
73
|
return {
|
@@ -66,7 +85,6 @@ export default {
|
|
66
85
|
}
|
67
86
|
}
|
68
87
|
},
|
69
|
-
|
70
88
|
methods: {
|
71
89
|
showNextItem() {
|
72
90
|
const thumbnail = this.thumbnails.shift(); // remove first element of array
|
@@ -2,10 +2,14 @@
|
|
2
2
|
<div class="cmd-top-header-navigation">
|
3
3
|
<ul class="flex-container" role="navigation">
|
4
4
|
<li v-for="(link, index) in topHeaderNavigationData" :key="index">
|
5
|
-
<a :href="link.path" :target="link.target" :title="
|
6
|
-
<span v-if="link.iconClass" :class="link.iconClass"></span>
|
7
|
-
<span v-if="link.
|
5
|
+
<a v-if="link.linkType === 'href'" :href="link.path" :target="link.target" :title="link.icon.tooltip">
|
6
|
+
<span v-if="link.iconClass" :class="link.icon.iconClass"></span>
|
7
|
+
<span v-if="link.text">{{ link.text }}</span>
|
8
8
|
</a>
|
9
|
+
<router-link v-else-if="link.linkType === 'router'" :to="link.path" :target="link.target" :title="link.icon.tooltip">
|
10
|
+
<span v-if="link.iconClass" :class="link.icon.iconClass"></span>
|
11
|
+
<span v-if="link.text">{{ link.text }}</span>
|
12
|
+
</router-link>
|
9
13
|
</li>
|
10
14
|
</ul>
|
11
15
|
</div>
|
@@ -15,6 +19,9 @@
|
|
15
19
|
export default {
|
16
20
|
name: "CmdTopHeaderNavigation",
|
17
21
|
props: {
|
22
|
+
/**
|
23
|
+
* list of navigation-entries
|
24
|
+
*/
|
18
25
|
topHeaderNavigationData: {
|
19
26
|
type: Array,
|
20
27
|
required: false
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<fieldset ref="upload" class="grid-container-create-columns
|
2
|
+
<fieldset ref="upload" class=" cmd-upload-form grid-container-create-columns">
|
3
3
|
<legend>Upload form</legend>
|
4
4
|
<h2 v-if="headline">{{ headline }}</h2>
|
5
5
|
<CmdFormElement
|
@@ -64,6 +64,7 @@
|
|
64
64
|
</template>
|
65
65
|
|
66
66
|
<script>
|
67
|
+
// import components
|
67
68
|
import CmdFormElement from "./CmdFormElement"
|
68
69
|
import CmdSystemMessage from "./CmdSystemMessage"
|
69
70
|
|
@@ -82,34 +83,58 @@ export default {
|
|
82
83
|
CmdSystemMessage
|
83
84
|
},
|
84
85
|
props: {
|
86
|
+
/**
|
87
|
+
* headline for form
|
88
|
+
*/
|
85
89
|
headline: {
|
86
90
|
type: String,
|
87
91
|
required: false
|
88
92
|
},
|
93
|
+
/**
|
94
|
+
* url to uplaod files
|
95
|
+
*/
|
89
96
|
uploadURL: {
|
90
97
|
type: String,
|
91
98
|
required: false
|
92
99
|
},
|
100
|
+
/**
|
101
|
+
* activate if files for upload should be selected by native input (type="file")
|
102
|
+
*/
|
93
103
|
enableFileSelect: {
|
94
104
|
type: Boolean,
|
95
105
|
default: true
|
96
106
|
},
|
107
|
+
/**
|
108
|
+
* activate if files should be dragged and dropped from os-file-explorer
|
109
|
+
*/
|
97
110
|
enableDragAndDrop: {
|
98
111
|
type: Boolean,
|
99
112
|
default: true
|
100
113
|
},
|
114
|
+
/**
|
115
|
+
* enable textarea for additional comments
|
116
|
+
*/
|
101
117
|
enableComment: {
|
102
118
|
type: Boolean,
|
103
119
|
default: true
|
104
120
|
},
|
121
|
+
/**
|
122
|
+
* set upload options
|
123
|
+
*/
|
105
124
|
uploadOptions: {
|
106
125
|
type: Object,
|
107
126
|
required: false
|
108
127
|
},
|
128
|
+
/**
|
129
|
+
* list of allowed file types to upload (all can be selected)
|
130
|
+
*/
|
109
131
|
allowedFileTypes: {
|
110
132
|
type: Array,
|
111
133
|
required: true
|
112
134
|
},
|
135
|
+
/**
|
136
|
+
* set maximum upload size (for all files combined)
|
137
|
+
*/
|
113
138
|
maxUploadSize: {
|
114
139
|
type: Number,
|
115
140
|
default: 10485760
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="cmd-width-limitation-wrapper" :class="{'sticky': sticky}">
|
3
|
-
<component :is="innerComponent" :class="setInnerClass"
|
4
|
-
<a
|
3
|
+
<component v-if="innerWrapper" :is="innerComponent" :class="setInnerClass">
|
4
|
+
<a v-if="anchorId" :id="anchorId"></a>
|
5
5
|
<slot></slot>
|
6
6
|
</component>
|
7
7
|
<template v-else>
|
8
|
-
<a
|
8
|
+
<a v-if="anchorId" :id="anchorId"></a>
|
9
9
|
<slot></slot>
|
10
10
|
</template>
|
11
11
|
</div>
|
@@ -15,6 +15,9 @@
|
|
15
15
|
export default {
|
16
16
|
name: "CmdWidthLimitationWrapper",
|
17
17
|
props: {
|
18
|
+
/**
|
19
|
+
* set a html-tag as inner tag
|
20
|
+
*/
|
18
21
|
innerComponent: {
|
19
22
|
type: String,
|
20
23
|
default: "section",
|
@@ -22,18 +25,38 @@ export default {
|
|
22
25
|
return value;
|
23
26
|
}
|
24
27
|
},
|
28
|
+
/**
|
29
|
+
* activate if the inner content should be wrapped in inner component tag
|
30
|
+
*
|
31
|
+
* (if deactivated, content will be directly placed inside cmd-width-limitation-wrapper)
|
32
|
+
*/
|
25
33
|
innerWrapper: {
|
26
34
|
type: Boolean,
|
27
35
|
default: true
|
28
36
|
},
|
37
|
+
/**
|
38
|
+
* activate if wrapper (and its content) should be sticky (=postion remains the same if content below is scrolled)
|
39
|
+
*
|
40
|
+
* i.e. use for site-header
|
41
|
+
*
|
42
|
+
* keep attention that more than one sticky-element on same html-level can cause problems, if content below is scrolled
|
43
|
+
*/
|
29
44
|
sticky: {
|
30
45
|
type: Boolean,
|
31
46
|
default: false
|
32
47
|
},
|
48
|
+
/**
|
49
|
+
* set class to inner component
|
50
|
+
*
|
51
|
+
* innerWrapper-property must be true
|
52
|
+
*/
|
33
53
|
innerClass: {
|
34
54
|
type: String,
|
35
55
|
required: false
|
36
56
|
},
|
57
|
+
/**
|
58
|
+
* set id for (invisible) anchor to enable shortcuts
|
59
|
+
*/
|
37
60
|
anchorId: {
|
38
61
|
type: String,
|
39
62
|
required: false
|