comand-component-library 3.1.88 → 3.1.91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/dist/comand-component-library.css +1 -1
  2. package/dist/comand-component-library.umd.min.js +1 -1
  3. package/package.json +2 -2
  4. package/src/App.vue +88 -17
  5. package/src/assets/data/main-navigation.json +1 -0
  6. package/src/assets/data/opening-hours.json +1 -1
  7. package/src/assets/data/tabs.json +1 -0
  8. package/src/assets/styles/global-styles.scss +6 -0
  9. package/src/components/CmdBankAccountData.vue +3 -2
  10. package/src/components/CmdBox.vue +12 -7
  11. package/src/components/CmdBoxSiteSearch.vue +2 -1
  12. package/src/components/CmdCookieDisclaimer.vue +19 -6
  13. package/src/components/CmdFakeSelect.vue +11 -19
  14. package/src/components/CmdFancyBox.vue +46 -13
  15. package/src/components/CmdFormElement.vue +17 -29
  16. package/src/components/CmdImageGallery.vue +2 -2
  17. package/src/components/CmdInputGroup.vue +9 -16
  18. package/src/components/CmdLoginForm.vue +1 -1
  19. package/src/components/CmdMainNavigation.vue +30 -48
  20. package/src/components/CmdMultipleSwitch.vue +4 -12
  21. package/src/components/CmdNewsletterSubscription.vue +199 -0
  22. package/src/components/CmdOpeningHours.vue +31 -7
  23. package/src/components/CmdShareButtons.vue +100 -27
  24. package/src/components/CmdSiteHeader.vue +2 -1
  25. package/src/components/CmdSystemMessage.vue +6 -0
  26. package/src/components/CmdTabs.vue +9 -6
  27. package/src/components/CmdThumbnailScroller.vue +9 -1
  28. package/src/components/CmdTooltip.vue +1 -1
  29. package/src/components/CmdWidthLimitationWrapper.vue +2 -2
  30. package/src/directives/scrollPadding.js +6 -0
  31. package/src/documentation/generated/CmdFancyBoxPropertyDescriptions.json +10 -0
  32. package/src/documentation/generated/CmdFormElementPropertyDescriptions.json +0 -5
  33. package/src/documentation/generated/CmdNewsletterSubscriptionPropertyDescriptions.json +42 -0
  34. package/src/documentation/generated/CmdOpeningHoursPropertyDescriptions.json +5 -0
  35. package/src/documentation/generated/CmdShareButtonsPropertyDescriptions.json +24 -0
  36. package/src/main.js +3 -1
  37. package/src/mixins/CmdThumbnailScroller/DefaultMessageProperties.js +9 -0
  38. package/src/mixins/FieldValidation.js +10 -3
  39. package/src/mixins/I18n.js +3 -2
  40. package/src/mixins/Identifier.js +28 -0
  41. package/src/utils/common.js +5 -1
@@ -10,14 +10,15 @@
10
10
  }
11
11
  ]"
12
12
  :title="$attrs.title"
13
- :aria-labelledby="labelId"
13
+ role="listbox"
14
+ :aria-labelledby="htmlId"
14
15
  :aria-required="$attrs.required !== undefined"
15
16
  ref="fakeselect"
16
17
  >
17
18
  <template v-if="showLabel">
18
19
  <!-- begin label -->
19
- <span class="label-text" :id="labelId">
20
- <span>{{ labelText }}<sup v-if="$attrs.required !== undefined">*</sup></span>
20
+ <span class="label-text">
21
+ <span :id="htmlId">{{ labelText }}<sup v-if="$attrs.required !== undefined">*</sup></span>
21
22
 
22
23
  <!-- begin CmdTooltipForInputElements -->
23
24
  <CmdTooltipForInputElements
@@ -25,9 +26,9 @@
25
26
  ref="tooltip"
26
27
  :validationStatus="validationStatus"
27
28
  :validationMessage="getValidationMessage"
28
- :validationTooltip="validationTooltip"
29
29
  :relatedId="tooltipId"
30
30
  :cmdListOfRequirements="listOfRequirements"
31
+ :role="validationStatus === 'error' ? 'alert' : 'dialog'"
31
32
  />
32
33
  <!-- end CmdTooltipForInputElements -->
33
34
 
@@ -36,10 +37,9 @@
36
37
  @click.prevent
37
38
  :class="getStatusIconClass"
38
39
  :title="!useCustomTooltip ? getValidationMessage : ''"
39
- :aria-errormessage="getValidationMessage"
40
+ :aria-errormessage="tooltipId"
40
41
  aria-live="assertive"
41
- :id="tooltipId"
42
- :role="validationStatus === 'error' ? 'alert' : 'dialog'">
42
+ :id="tooltipId">
43
43
  </a>
44
44
  </span>
45
45
  <!-- end label -->
@@ -119,14 +119,12 @@
119
119
  </template>
120
120
 
121
121
  <script>
122
- // import utils
123
- import {createUuid} from "../utils/common.js"
124
-
125
122
  // import mixins
126
123
  import I18n from "../mixins/I18n"
127
124
  import DefaultMessageProperties from "../mixins/CmdFakeSelect/DefaultMessageProperties"
128
- import FieldValidation from "../mixins/FieldValidation.js"
129
- import Tooltip from "../mixins/Tooltip.js"
125
+ import FieldValidation from "../mixins/FieldValidation"
126
+ import Identifier from "../mixins/Identifier"
127
+ import Tooltip from "../mixins/Tooltip"
130
128
 
131
129
  // import components
132
130
  import CmdTooltipForInputElements from "./CmdTooltipForInputElements"
@@ -138,6 +136,7 @@ export default {
138
136
  I18n,
139
137
  DefaultMessageProperties,
140
138
  FieldValidation,
139
+ Identifier,
141
140
  Tooltip
142
141
  ],
143
142
  components: {
@@ -311,13 +310,6 @@ export default {
311
310
  },
312
311
  selectAllOptionsIcon() {
313
312
  return "icon-check"
314
- },
315
- // get ID for accessibility
316
- labelId() {
317
- if (this.$attrs.id !== undefined) {
318
- return this.$attrs.id
319
- }
320
- return "label-" + createUuid()
321
313
  }
322
314
  },
323
315
  mounted() {
@@ -3,9 +3,9 @@
3
3
  <div v-if="showFancyBox"
4
4
  :class="['cmd-fancybox', {'show-overlay': showOverlay}]"
5
5
  role="dialog"
6
- aria-labelledby="fancybox">
6
+ :aria-labelledby="htmlId">
7
7
  <div class="popup" :class="{'image' : fancyBoxImageUrl || fancyBoxGallery }">
8
- <!-- begin print button -->
8
+ <!-- begin print buttons -->
9
9
  <div class="button-wrapper no-flex"
10
10
  v-if="(fancyboxOptions.printButtons && (fancyboxOptions.printButtons.color || fancyboxOptions.printButtons.grayscale)) || fancyboxOptions.closeIcon">
11
11
  <a href="#"
@@ -22,15 +22,27 @@
22
22
  id="print-grayscale"
23
23
  @click.prevent="printInGrayscale = true">
24
24
  </a>
25
- <!-- end print button -->
25
+ <!-- end print buttons -->
26
+
27
+ <!-- begin close-icon -->
26
28
  <a href="#"
27
29
  v-if="fancyboxOptions.closeIcon"
28
30
  :class="fancyboxOptions.closeIcon.iconClass"
29
31
  :title="fancyboxOptions.closeIcon.tooltip"
30
32
  @click.prevent="close">
31
33
  </a>
34
+ <!-- end close-icon -->
32
35
  </div>
33
36
  <div :class="{'grayscale' : printInGrayscale}">
37
+ <!-- begin CmdHeadline -->
38
+ <CmdHeadline
39
+ v-show="cmdHeadline?.show"
40
+ :headlineText="cmdHeadline?.headlineText"
41
+ :headlineLevel="cmdHeadline?.headlineLevel"
42
+ :id="htmlId"
43
+ />
44
+ <!-- end CmdHeadline -->
45
+
34
46
  <div v-if="fancyBoxImageUrl" class="content">
35
47
  <img :src="fancyBoxImageUrl" :alt="altText" />
36
48
  </div>
@@ -75,7 +87,11 @@
75
87
  <script>
76
88
  import {defineComponent, createApp} from "vue"
77
89
 
90
+ // import mixins
91
+ import Identifier from "../mixins/Identifier"
92
+
78
93
  // import components
94
+ import CmdHeadline from "./CmdHeadline"
79
95
  import CmdSlideButton from "./CmdSlideButton.vue"
80
96
  import CmdThumbnailScroller from './CmdThumbnailScroller.vue'
81
97
 
@@ -92,9 +108,23 @@
92
108
  const FancyBox = defineComponent({
93
109
  name: "CmdFancyBox",
94
110
  components: {
111
+ CmdHeadline,
95
112
  CmdSlideButton,
96
113
  CmdThumbnailScroller
97
114
  },
115
+ mixins: [
116
+ Identifier
117
+ ],
118
+ data() {
119
+ return {
120
+ fancyBoxContent: null,
121
+ fancyBoxElements: null,
122
+ fancyBoxImageUrl: null,
123
+ index: this.defaultGalleryIndex,
124
+ printInGrayscale: false,
125
+ showFancyBox: this.show
126
+ }
127
+ },
98
128
  props: {
99
129
  /**
100
130
  * set if content should be loaded by url
@@ -188,16 +218,15 @@
188
218
  altText: {
189
219
  type: String,
190
220
  required: false
191
- }
192
- },
193
- data() {
194
- return {
195
- fancyBoxImageUrl: null,
196
- fancyBoxContent: null,
197
- fancyBoxElements: null,
198
- showFancyBox: this.show,
199
- printInGrayscale: false,
200
- index: this.defaultGalleryIndex
221
+ },
222
+ /**
223
+ * properties for CmdHeadline-component
224
+ *
225
+ * @requiredForAccessibility: true
226
+ */
227
+ cmdHeadline: {
228
+ type: Object,
229
+ required: false
201
230
  }
202
231
  },
203
232
  created() {
@@ -362,6 +391,10 @@
362
391
  border-radius: var(--border-radius);
363
392
  overflow-y: auto;
364
393
 
394
+ .cmd-cookie-disclaimer {
395
+ padding: 0;
396
+ }
397
+
365
398
  > .grayscale {
366
399
  filter: grayscale(1);
367
400
  }
@@ -15,13 +15,14 @@
15
15
  'has-state': validationStatus
16
16
  }
17
17
  ]"
18
- :for="labelId"
18
+ :for="htmlId"
19
19
  :title="$attrs.title"
20
20
  ref="label">
21
21
 
22
22
  <!-- begin label-text (+ required asterisk) -->
23
23
  <span v-if="(labelText || $slots.labeltext) && $attrs.type !== 'checkbox' && $attrs.type !== 'radio'"
24
- :class="['label-text', !showLabel ? 'hidden' : undefined]">
24
+ v-show="showLabel"
25
+ class="label-text">
25
26
  <span>
26
27
  <template v-if="labelText">{{ labelText }}</template>
27
28
  <!-- begin slot 'labeltext' -->
@@ -36,9 +37,9 @@
36
37
  ref="tooltip"
37
38
  :validationStatus="validationStatus"
38
39
  :validationMessage="getValidationMessage"
39
- :validationTooltip="validationTooltip"
40
40
  :relatedId="tooltipId"
41
41
  :cmdListOfRequirements="listOfRequirements"
42
+ :role="validationStatus === 'error' ? 'alert' : 'dialog'"
42
43
  />
43
44
  <!-- end CmdTooltipForInputElements -->
44
45
 
@@ -47,10 +48,9 @@
47
48
  @click.prevent
48
49
  :class="getStatusIconClass"
49
50
  :title="validationTooltip"
50
- :aria-errormessage="getValidationMessage"
51
+ :aria-errormessage="tooltipId"
51
52
  aria-live="assertive"
52
- :id="tooltipId"
53
- :role="validationStatus === 'error' ? 'alert' : 'dialog'">
53
+ :id="tooltipId">
54
54
  </a>
55
55
  </span>
56
56
  <!-- end label-text (+ required asterisk) -->
@@ -63,13 +63,14 @@
63
63
  <template v-if="element === 'input' && $attrs.type !== 'checkbox' && $attrs.type !== 'radio' && $attrs.type !== 'search'">
64
64
  <input
65
65
  v-bind="elementAttributes"
66
- :id="labelId"
66
+ :id="htmlId"
67
67
  :class="inputClass"
68
68
  @focus="tooltip = true"
69
69
  @blur="onBlur"
70
70
  @input="onInput"
71
71
  @mouseover="datalistFocus"
72
72
  @keyup="checkForCapsLock"
73
+ @change="$emit('change', $event)"
73
74
  :autocomplete="autocomplete"
74
75
  :list="datalist ? datalist.id : null"
75
76
  :value="modelValue"
@@ -109,7 +110,7 @@
109
110
  :checked="isChecked"
110
111
  :value="inputValue"
111
112
  :class="[inputClass, validationStatus, toggleSwitchIconClass, { 'replace-input-type': replaceInputType, 'toggle-switch': toggleSwitch }]"
112
- :id="labelId"
113
+ :id="htmlId"
113
114
  :disabled="$attrs.disabled"
114
115
  :aria-invalid="validationStatus === 'error'"
115
116
  />
@@ -133,7 +134,7 @@
133
134
  :checked="isChecked"
134
135
  :value="inputValue"
135
136
  :class="{inputClass, validationStatus}"
136
- :id="labelId"
137
+ :id="htmlId"
137
138
  :disabled="$attrs.disabled"
138
139
  :aria-invalid="validationStatus === 'error'"
139
140
  />
@@ -152,7 +153,7 @@
152
153
  <!-- begin selectbox -->
153
154
  <select v-if="element === 'select'"
154
155
  v-bind="elementAttributes"
155
- :id="labelId"
156
+ :id="htmlId"
156
157
  @blur="onBlur"
157
158
  @change="$emit('update:modelValue', $event.target.value)">
158
159
  <option v-for="(option, index) in selectOptions" :key="index" :value="option.value"
@@ -164,7 +165,7 @@
164
165
  <!-- begin textarea -->
165
166
  <textarea v-if="element === 'textarea'"
166
167
  v-bind="elementAttributes"
167
- :id="labelId"
168
+ :id="htmlId"
168
169
  :value="modelValue"
169
170
  :maxlength="getMaxLength()"
170
171
  @input="onInput"
@@ -179,7 +180,7 @@
179
180
  <span class="search-field-wrapper flex-container no-gap">
180
181
  <input
181
182
  v-bind="elementAttributes"
182
- :id="labelId"
183
+ :id="htmlId"
183
184
  @input="onInput"
184
185
  :maxlength="getMaxLength()"
185
186
  :value="modelValue"
@@ -206,13 +207,11 @@
206
207
  </template>
207
208
 
208
209
  <script>
209
- // import utils
210
- import {createUuid} from "../utils/common.js"
211
-
212
210
  // import mixins
213
211
  import I18n from "../mixins/I18n"
214
212
  import DefaultMessageProperties from "../mixins/CmdFormElement/DefaultMessageProperties"
215
213
  import FieldValidation from "../mixins/FieldValidation.js"
214
+ import Identifier from "../mixins/Identifier.js"
216
215
  import Tooltip from "../mixins/Tooltip.js"
217
216
 
218
217
  // import components
@@ -228,6 +227,7 @@ export default {
228
227
  I18n,
229
228
  DefaultMessageProperties,
230
229
  FieldValidation,
230
+ Identifier,
231
231
  Tooltip
232
232
  ],
233
233
  data() {
@@ -347,13 +347,6 @@ export default {
347
347
  type: String,
348
348
  required: false
349
349
  },
350
- /**
351
- * if for native form-element
352
- */
353
- id: {
354
- type: String,
355
- required: false
356
- },
357
350
  /**
358
351
  * set if a native datalist should be used
359
352
  */
@@ -682,13 +675,6 @@ export default {
682
675
  }
683
676
  return null
684
677
  },
685
- // get ID for accessibility
686
- labelId() {
687
- if (this.$attrs.id !== undefined) {
688
- return this.$attrs.id
689
- }
690
- return "label-" + createUuid()
691
- },
692
678
  // toggle icons for toggle-switch
693
679
  toggleSwitchIconClass() {
694
680
  if(this.toggleSwitch && this.useIconsForToggleSwitch && this.toggleSwitchUncheckedIconClass && this.toggleSwitchCheckedIconClass) {
@@ -742,6 +728,8 @@ export default {
742
728
  }
743
729
  }
744
730
  }
731
+
732
+ this.$emit('validation-status-change', this.validationStatus)
745
733
  }
746
734
  },
747
735
  onBlur(event) {
@@ -4,7 +4,7 @@
4
4
  :key="index"
5
5
  @click.prevent="showFancyBox(index)"
6
6
  href="#"
7
- :title="getMessage('cmdsitesearch.labeltext.open_large_image')">
7
+ :title="getMessage('cmdimagegallery.tooltip.open_large_image')">
8
8
  <figure>
9
9
  <figcaption v-if="image.figcaption && figcaptionPosition === 'top'">{{ image.figcaption }}</figcaption>
10
10
  <img :src="image.srcImageSmall" :alt="image.alt" />
@@ -19,7 +19,7 @@ import {openFancyBox} from "./CmdFancyBox"
19
19
 
20
20
  // import mixins
21
21
  import I18n from "../mixins/I18n"
22
- import DefaultMessageProperties from "../mixins/CmdSiteSearch/DefaultMessageProperties"
22
+ import DefaultMessageProperties from "../mixins/CmdImageGallery/DefaultMessageProperties"
23
23
 
24
24
  export default {
25
25
  name: "CmdImageGallery",
@@ -8,9 +8,10 @@
8
8
  'toggle-switch': toggleSwitch,
9
9
  'has-state': validationStatus
10
10
  }
11
- ]">
12
- <span :class="['label-text', { hidden: !showLabel}]" :id="labelId" :aria-labelledby="labelId">
13
- <span>{{ labelText }}<sup v-if="required">*</sup></span>
11
+ ]"
12
+ :aria-labelledby="htmlId">
13
+ <span v-show="showLabel" class="label-text">
14
+ <span :id="htmlId">{{ labelText }}<sup v-if="required">*</sup></span>
14
15
 
15
16
  <!-- begin CmdTooltipForInputElements -->
16
17
  <CmdTooltipForInputElements
@@ -20,11 +21,11 @@
20
21
  :inputRequirements="inputRequirements"
21
22
  :validationStatus="validationStatus"
22
23
  :validationMessage="getValidationMessage"
23
- :validationTooltip="validationTooltip"
24
24
  :inputAttributes="$attrs"
25
25
  :inputModelValue="modelValue"
26
26
  :helplink="helplink"
27
27
  :relatedId="tooltipId"
28
+ :role="validationStatus === 'error' ? 'alert' : 'dialog'"
28
29
  />
29
30
  <!-- end CmdTooltipForInputElements -->
30
31
 
@@ -33,10 +34,9 @@
33
34
  @click.prevent
34
35
  :class="getStatusIconClass"
35
36
  :title="validationTooltip"
36
- :aria-errormessage="getValidationMessage"
37
+ :aria-errormessage="tooltipId"
37
38
  aria-live="assertive"
38
- :id="tooltipId"
39
- :role="validationStatus === 'error' ? 'alert' : 'dialog'">
39
+ :id="tooltipId">
40
40
  </a>
41
41
  </span>
42
42
  <span v-if="!useSlot" :class="['flex-container', {'no-flex': !stretchHorizontally, 'no-gap': multipleSwitch}]">
@@ -66,10 +66,9 @@
66
66
  </template>
67
67
 
68
68
  <script>
69
- import {createUuid} from "../utils/common"
70
-
71
69
  // import mixins
72
70
  import FieldValidation from "../mixins/FieldValidation.js"
71
+ import Identifier from "../mixins/Identifier"
73
72
  import Tooltip from "../mixins/Tooltip.js"
74
73
 
75
74
  // import components
@@ -81,6 +80,7 @@ export default {
81
80
  },
82
81
  mixins: [
83
82
  FieldValidation,
83
+ Identifier,
84
84
  Tooltip
85
85
  ],
86
86
  data() {
@@ -239,13 +239,6 @@ export default {
239
239
  }
240
240
  return this.getMessage("cmdformelement.validationTooltip.open_field_requirements")
241
241
  },
242
- // get ID for accessibility
243
- labelId() {
244
- if (this.$attrs.id !== undefined) {
245
- return this.$attrs.id
246
- }
247
- return "label-" + createUuid()
248
- },
249
242
  inputValue: {
250
243
  // read inputValue
251
244
  get() {
@@ -4,7 +4,7 @@
4
4
  <legend :class="{hidden : !showLegend}">{{ textLegend }}</legend>
5
5
  <!-- begin CmdHeadline -->
6
6
  <CmdHeadline v-if="cmdHeadlineLoginForm"
7
- v-bind="cmdHeadlineLoginForm"/>
7
+ v-bind="cmdHeadlineLoginForm"/>
8
8
  <!-- end CmdHeadline -->
9
9
 
10
10
  <!-- being form elements -->
@@ -1,14 +1,14 @@
1
1
  <template>
2
2
  <div
3
3
  :class="[
4
- 'cmd-main-navigation main-navigation-wrapper',
4
+ 'cmd-main-navigation',
5
5
  {
6
6
  'hide-sub-navigation' : !showSubNavigations,
7
7
  'open-off-canvas': showOffcanvas,
8
8
  'persist-on-mobile': persistOnMobile,
9
9
  'show-content-overlay': showContentOverlay
10
10
  }
11
- ]">
11
+ ]" id="main-navigation-wrapper">
12
12
  <nav>
13
13
  <!-- begin main-level -->
14
14
  <ul :class="{'stretch-items' : stretchMainItems}">
@@ -31,7 +31,7 @@
31
31
  <span v-if="navigationEntry.iconClass" :class="navigationEntry.iconClass"></span>
32
32
  <span v-if="navigationEntry.text">{{ navigationEntry.text }}</span>
33
33
  <span v-if="navigationEntry?.subentries?.length"
34
- :class="subentriesIconClass"
34
+ :class="['subentry-icon', subentriesIconClass]"
35
35
  ></span>
36
36
  </a>
37
37
  <!-- end type === href -->
@@ -47,7 +47,7 @@
47
47
  <span v-if="navigationEntry.iconClass" :class="navigationEntry.iconClass"></span>
48
48
  <span v-if="navigationEntry.text">{{ navigationEntry.text }}</span>
49
49
  <span v-if="navigationEntry.subentries && navigationEntry.subentries.length > 0"
50
- :class="subentriesIconClass"></span>
50
+ :class="['subentry-icon', subentriesIconClass]"></span>
51
51
  </router-link>
52
52
  <!-- end type === router -->
53
53
 
@@ -64,7 +64,7 @@
64
64
  <span v-if="navigationSubEntry.iconClass" :class="navigationSubEntry.iconClass"></span>
65
65
  <span v-if="navigationSubEntry.text">{{ navigationSubEntry.text }}</span>
66
66
  <span v-if="navigationSubEntry.subentries && navigationSubEntry.subentries.length > 0"
67
- :class="subentriesIconClass"
67
+ :class="['subentry-icon', subentriesIconClass]"
68
68
  ></span>
69
69
  </a>
70
70
  <!-- end type === href -->
@@ -78,7 +78,7 @@
78
78
  <span v-if="navigationSubEntry.iconClass" :class="navigationSubEntry.iconClass"></span>
79
79
  <span v-if="navigationSubEntry.text">{{ navigationSubEntry.text }}</span>
80
80
  <span v-if="navigationSubEntry.subentries && navigationSubEntry.subentries.length > 0"
81
- :class="subentriesIconClass"></span>
81
+ :class="['subentry-icon', subentriesIconClass]"></span>
82
82
  </router-link>
83
83
  <!-- end type === router -->
84
84
 
@@ -95,7 +95,7 @@
95
95
  <span v-if="navigationSubSubEntry.iconClass" :class="navigationSubSubEntry.iconClass"></span>
96
96
  <span v-if="navigationSubSubEntry.text">{{ navigationSubSubEntry.text }}</span>
97
97
  <span v-if="navigationSubSubEntry.subentries && navigationSubSubEntry.subentries.length > 0"
98
- :class="subentriesIconClass"
98
+ :class="['subentry-icon', subentriesIconClass]"
99
99
  ></span>
100
100
  </a>
101
101
  <!-- end type === href -->
@@ -109,7 +109,7 @@
109
109
  <span v-if="navigationSubSubEntry.iconClass" :class="navigationSubSubEntry.iconClass"></span>
110
110
  <span v-if="navigationSubSubEntry.text">{{ navigationSubSubEntry.text }}</span>
111
111
  <span v-if="navigationSubSubEntry.subentries && navigationSubSubEntry.subentries.length > 0"
112
- :class="subentriesIconClass"></span>
112
+ :class="['subentry-icon', subentriesIconClass]"></span>
113
113
  </router-link>
114
114
  <!-- end type === router -->
115
115
  </li>
@@ -225,22 +225,27 @@ export default {
225
225
  },
226
226
  methods: {
227
227
  executeLink(event, navigationEntry) {
228
+ // execute default-link
228
229
  if (navigationEntry.target || (navigationEntry.path.length > 1)) {
229
230
  this.showOffcanvas = false
230
231
  return true
231
232
  }
232
- if (navigationEntry.path === '#' || navigationEntry.path === '') {
233
- event.preventDefault()
234
- this.showOffcanvas = false
235
- this.$emit('click', navigationEntry.path)
236
233
 
237
- }
238
- if (!(navigationEntry?.subentries?.length)) {
239
- this.showOffcanvas = false
240
- } else {
234
+ // toggle subentries (no link execution)
235
+ if(navigationEntry?.subentries?.length) {
236
+ event.preventDefault()
241
237
  // add entry "open" to navigationEntry-object (will be watched by vue3 automatically)
242
238
  navigationEntry.open = !navigationEntry.open
239
+ return
240
+ }
241
+
242
+ // emit event to handle navigation from outside
243
+ if (navigationEntry.path === '#' || navigationEntry.path === '') {
244
+ event.preventDefault()
245
+ this.$emit('click', navigationEntry.path)
243
246
  }
247
+
248
+ this.showOffcanvas = false
244
249
  },
245
250
  getRoute(navigationEntry) {
246
251
  return getRoute(navigationEntry)
@@ -295,9 +300,8 @@ export default {
295
300
  }
296
301
  }
297
302
 
298
-
299
303
  @media only screen and (max-width: $medium-max-width) {
300
- .cmd-main-navigation {
304
+ .cmd-main-navigation#main-navigation-wrapper {
301
305
  --nav-transition: all .5s linear;
302
306
  display: flex;
303
307
  background: none; /* overwrite framework-css */
@@ -388,14 +392,6 @@ export default {
388
392
  }
389
393
  }
390
394
 
391
- > a {
392
- span {
393
- & + span[class*="icon"]::before {
394
- display: inline-block;
395
- }
396
- }
397
- }
398
-
399
395
  /* sub-level 1 */
400
396
  ul {
401
397
  li {
@@ -406,9 +402,15 @@ export default {
406
402
  &:last-child {
407
403
  border-bottom: 0;
408
404
  }
409
-
410
- a {
405
+ > a {
411
406
  padding-left: calc(var(--default-margin) * 2);
407
+
408
+ span {
409
+ & + span[class*="icon"]::before {
410
+ display: inline-block;
411
+ transform: rotate(0);
412
+ }
413
+ }
412
414
  }
413
415
 
414
416
  /* sub-level 2 */
@@ -435,26 +437,6 @@ export default {
435
437
  display: block;
436
438
  opacity: 1;
437
439
  transition: var(--nav-transition);
438
-
439
- > li {
440
- > a {
441
- span {
442
- + span[class*="icon"]::before {
443
-
444
- }
445
- }
446
- }
447
-
448
- &.open {
449
- > a {
450
- span {
451
- + span[class*="icon"]::before {
452
-
453
- }
454
- }
455
- }
456
- }
457
- }
458
440
  }
459
441
  }
460
442
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div :class="['cmd-multiple-switch multiple-switch label', {disabled: status === 'disabled', error: status === 'error'}]" :aria-labelledby="labelId">
3
- <span :class="{hidden: !showLabel}" :id="labelId">{{ labelText }}</span>
3
+ <span v-show="showLabel" :id="htmlId">{{ labelText }}</span>
4
4
  <span class="flex-container no-gap no-flex">
5
5
  <label :class="{disabled: status === 'disabled'}" :for="multipleswitch.id"
6
6
  v-for="(multipleswitch, index) in multipleSwitches" :key="index">
@@ -20,11 +20,12 @@
20
20
  </template>
21
21
 
22
22
  <script>
23
- // import utils
24
- import {createUuid} from "../utils/common.js"
23
+ // import mixins
24
+ import Identifier from "../mixins/Identifier"
25
25
 
26
26
  export default {
27
27
  name: "CmdMultipleSwitch",
28
+ mixins: [Identifier],
28
29
  props: {
29
30
  /**
30
31
  * value for v-model
@@ -83,15 +84,6 @@ export default {
83
84
  required: false
84
85
  }
85
86
  },
86
- computed: {
87
- // get ID for accessibility
88
- labelId() {
89
- if(this.$attrs.id !== undefined) {
90
- return this.$attrs.id
91
- }
92
- return "label-" + createUuid()
93
- }
94
- },
95
87
  methods: {
96
88
  onChange(e) {
97
89
  if (typeof this.value === "string") {