comand-component-library 3.1.82 → 3.1.85

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) 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 +1 -1
  4. package/src/App.vue +16 -6
  5. package/src/assets/data/address-data.json +2 -1
  6. package/src/components/CmdAddressData.vue +46 -39
  7. package/src/components/CmdCompanyLogo.vue +1 -1
  8. package/src/components/CmdFakeSelect.vue +5 -1
  9. package/src/components/CmdFormElement.vue +56 -26
  10. package/src/components/CmdListOfRequirements.vue +9 -2
  11. package/src/components/CmdMainNavigation.vue +4 -4
  12. package/src/components/CmdOpeningHours.vue +10 -8
  13. package/src/components/CmdShareButtons.vue +1 -1
  14. package/src/components/CmdSlideButton.vue +1 -1
  15. package/src/components/CmdSwitchLanguage.vue +18 -5
  16. package/src/components/CmdTable.vue +0 -7
  17. package/src/components/CmdThumbnailScroller.vue +24 -15
  18. package/src/components/CmdToggleDarkMode.vue +31 -6
  19. package/src/components/CmdTooltip.vue +1 -1
  20. package/src/components/CmdTooltipForInputElements.vue +20 -54
  21. package/src/documentation/generated/CmdAddressDataPropertyDescriptions.json +6 -6
  22. package/src/documentation/generated/CmdFormElementPropertyDescriptions.json +17 -4
  23. package/src/documentation/generated/CmdListOfRequirementsPropertyDescriptions.json +5 -0
  24. package/src/documentation/generated/CmdOpeningHoursPropertyDescriptions.json +5 -5
  25. package/src/documentation/generated/CmdShareButtonsPropertyDescriptions.json +1 -1
  26. package/src/documentation/generated/CmdThumbnailScrollerPropertyDescriptions.json +10 -0
  27. package/src/documentation/generated/CmdTooltipForInputElementsPropertyDescriptions.json +2 -27
  28. package/src/mixins/FieldValidation.js +2 -2
  29. package/src/mixins/GlobalDefaultMessageProperties.js +2 -1
  30. package/src/utilities.js +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comand-component-library",
3
- "version": "3.1.82",
3
+ "version": "3.1.85",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -50,6 +50,7 @@
50
50
  <li><a href="#section-tabs">Tabs</a></li>
51
51
  <li><a href="#section-thumbnail-scroller">Thumbnail-Scroller</a></li>
52
52
  <li><a href="#section-toggle-darkmode">ToggleDarkMode</a></li>
53
+ <li><a href="#section-tooltip">Tooltip</a></li>
53
54
  <li><a href="#section-upload-form">Upload-Form</a></li>
54
55
  </ul>
55
56
  </div>
@@ -137,7 +138,6 @@
137
138
  <h2>Inputfields in Columns</h2>
138
139
  <div class="flex-container">
139
140
  <CmdFormElement element="input"
140
- labelText="Label for inputfield (with tooltip):"
141
141
  type="text"
142
142
  minlength="5"
143
143
  id="inputfield1"
@@ -145,10 +145,13 @@
145
145
  v-model="inputField1"
146
146
  tooltipText="This is a tooltip!"
147
147
  :status="validationStatus"
148
- :disabled="disabledStatus"
149
- />
148
+ :disabled="disabledStatus">
149
+ <template v-slot:labeltext>
150
+ <span v-html="'Label with <a href=\'#\'>Link</a> given by slot'"></span>
151
+ </template>
152
+ </CmdFormElement>
150
153
  <CmdFormElement element="input"
151
- labelText="Label for inputfield (required):"
154
+ labelText="Label for inputfield (required, with tooltip):"
152
155
  type="text"
153
156
  required="required"
154
157
  minlength="5"
@@ -457,10 +460,14 @@
457
460
  checkbox with boolean: {{ checkboxValue }}<br/>
458
461
  checkboxes with values: {{ checkboxValues }}
459
462
  </p>
463
+
460
464
  <h3>Toggle Dark-Mode</h3>
461
465
  <a id="section-toggle-darkmode"></a>
466
+ <h4>Toggle Dark-Mode (with label, not styled)</h4>
462
467
  <CmdToggleDarkMode :showLabel="true"/>
468
+ <h4>Toggle Dark-Mode (without label, styled)</h4>
463
469
  <CmdToggleDarkMode :showLabel="false" :use-styled-layout="true" />
470
+
464
471
  <h2>Checkboxes and Radiobuttons</h2>
465
472
  <h3>Checkboxes [native]</h3>
466
473
  <div class="label inline">
@@ -1079,7 +1086,10 @@
1079
1086
  <a id="section-thumbnail-scroller"></a>
1080
1087
  <CmdWidthLimitationWrapper>
1081
1088
  <h2 class="headline-demopage">Thumbnail-Scroller</h2>
1089
+ <h3>Thumbnail-Scroller as wide as content</h3>
1082
1090
  <CmdThumbnailScroller :thumbnail-scroller-items="thumbnailScrollerData"/>
1091
+ <h3>Thumbnail-Scroller stretched to full width</h3>
1092
+ <CmdThumbnailScroller :thumbnail-scroller-items="thumbnailScrollerData" :fullWidth="true" />
1083
1093
  </CmdWidthLimitationWrapper>
1084
1094
 
1085
1095
  <a id="section-tooltip"></a>
@@ -1134,7 +1144,7 @@
1134
1144
  textMiscInfo="Miscellaneous information"
1135
1145
  />
1136
1146
  <CmdAddressData :addressData="addressData"
1137
- :linkGoogleMaps="true"
1147
+ :linkGoogleMaps="false"
1138
1148
  :cmdHeadline="{headlineText: 'Address data', headlineLevel: 6}"
1139
1149
  />
1140
1150
  </div>
@@ -1226,8 +1236,8 @@ import CmdSiteHeader from "./components/CmdSiteHeader"
1226
1236
  import CmdSlideshow from "@/components/CmdSlideshow.vue"
1227
1237
  import CmdSwitchLanguage from "@/components/CmdSwitchLanguage.vue"
1228
1238
  import CmdSystemMessage from "@/components/CmdSystemMessage.vue"
1229
- import CmdTabs from "@/components/CmdTabs.vue"
1230
1239
  import CmdTable from "@/components/CmdTable.vue"
1240
+ import CmdTabs from "@/components/CmdTabs.vue"
1231
1241
  import CmdThumbnailScroller from "@/components/CmdThumbnailScroller.vue"
1232
1242
  import CmdToggleDarkMode from "@/components/CmdToggleDarkMode.vue"
1233
1243
  import CmdTooltip from "@/components/CmdTooltip.vue"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "company": {
3
- "iconClass": "icon-home",
3
+ "iconClass": "icon-company",
4
4
  "value": "Your company name"
5
5
  },
6
6
  "address": {
@@ -8,6 +8,7 @@
8
8
  "streetNo": "Your Street/No",
9
9
  "zip": "Your zip",
10
10
  "city": "Your city",
11
+ "miscInfo": "",
11
12
  "country": "Your country",
12
13
  "longitude": "0.0",
13
14
  "latitude": "0.0",
@@ -17,25 +17,28 @@
17
17
  <!-- end company -->
18
18
 
19
19
  <!-- begin address -->
20
- <dt v-if="addressData.address && addressData.address.length">
21
- <span v-if="addressData.address.iconClass && showLabelIcons" :class="addressData.address.iconClass" :title="getMessage('cmdaddressdata.labeltext.address')"></span>
22
- <span v-if="showLabelTexts">{{ getMessage('cmdaddressdata.labeltext.address')}}</span>
23
- </dt>
24
- <dd v-if="addressData.address">
25
- <a v-if="linkGoogleMaps" :href="locateAddress" target="google-maps"
26
- :title="getMessage('cmdaddressdata.title.open_address_on_google_maps')">
27
- <span v-if="addressData.address.streetNo" class="street-address">{{ addressData.address.streetNo }}</span><br/>
28
- <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}&nbsp;</span>
29
- <span v-if="addressData.address.city" class="locality">{{ addressData.address.city }}</span><br/>
30
- <span v-if="addressData.address.country" class="country-name">{{ addressData.address.country }}</span>
31
- </a>
32
- <template v-else>
33
- <span v-if="addressData.address.streetNo" class="street-address">{{addressData.address.streetNo }}</span><br/>
34
- <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }} </span>
35
- <span v-if="addressData.address.city" class="locality">{{ addressData.address.city }}</span><br/>
36
- <span v-if="addressData.address.country" class="country-name">{{ addressData.address.country }}</span>
37
- </template>
38
- </dd>
20
+ <template v-if="addressData.address && addressData.address !== undefined">
21
+ <dt class="address">
22
+ <span v-if="addressData.address.iconClass && showLabelIcons" :class="addressData.address.iconClass" :title="getMessage('cmdaddressdata.labeltext.address')"></span>
23
+ <span v-if="showLabelTexts">{{ getMessage('cmdaddressdata.labeltext.address')}}</span>
24
+ </dt>
25
+ <dd v-if="addressData.address">
26
+ <a v-if="linkGoogleMaps" :href="locateAddress" target="google-maps" :title="getMessage('cmdaddressdata.title.open_address_on_google_maps')">
27
+ <span v-if="addressData.address.streetNo" class="street-address">{{ addressData.address.streetNo }}</span><br/>
28
+ <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}&nbsp;</span>
29
+ <span v-if="addressData.address.city" class="locality">{{ addressData.address.city }}</span><br/>
30
+ <span v-if="addressData.address.miscInfo">{{ addressData.address.miscInfo }}</span><br/>
31
+ <span v-if="addressData.address.country" class="country-name">{{ addressData.address.country }}</span>
32
+ </a>
33
+ <template v-else>
34
+ <span v-if="addressData.address.streetNo" class="street-address">{{addressData.address.streetNo }}</span><br/>
35
+ <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}&nbsp;</span>
36
+ <span v-if="addressData.address.city" class="locality">{{ addressData.address.city }}</span><br/>
37
+ <span v-if="addressData.address.miscInfo">{{ addressData.address.miscInfo }}</span><br/>
38
+ <span v-if="addressData.address.country" class="country-name">{{ addressData.address.country }}</span>
39
+ </template>
40
+ </dd>
41
+ </template>
39
42
  <!-- end address -->
40
43
 
41
44
  <!-- begin telephone -->
@@ -84,18 +87,19 @@
84
87
  <span class="org">{{ addressData.company.value }}</span>
85
88
  </li>
86
89
  <li>
87
- <a :href="locateAddress" target="google-maps" v-if="linkGoogleMaps"
88
- :title="getMessage('cmdaddressdata.title.open_address_on_google_maps')">
89
- <span class="street-address" v-if="addressData.address.streetNo">{{ addressData.address.streetNo }}</span><br/>
90
- <span class="postal-code" v-if="addressData.address.zip">{{ addressData.address.zip }} </span>
91
- <span class="locality" v-if="addressData.address.city">{{ addressData.address.city }}</span><br/>
92
- <span class="country-name" v-if="addressData.address.country">{{ addressData.address.country }}</span>
90
+ <a v-if="linkGoogleMaps" :href="locateAddress" target="google-maps" :title="getMessage('cmdaddressdata.title.open_address_on_google_maps')">
91
+ <span v-if="addressData.address.streetNo" class="street-address">{{ addressData.address.streetNo }}</span><br/>
92
+ <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}&nbsp;</span>
93
+ <span v-if="addressData.address.city" class="locality">{{ addressData.address.city }}</span><br/>
94
+ <span v-if="addressData.address.miscInfo">{{ addressData.address.miscInfo }}</span><br/>
95
+ <span v-if="addressData.address.country" class="country-name">{{ addressData.address.country }}</span>
93
96
  </a>
94
97
  <template v-else>
95
- <span class="street-address" v-if="addressData.address.streetNo">{{ addressData.address.streetNo }}</span><br/>
96
- <span class="postal-code" v-if="addressData.address.zip">{{ addressData.address.zip }} </span>
97
- <span class="locality" v-if="addressData.address.city">{{ addressData.address.city }}</span><br/>
98
- <span class="country-name" v-if="addressData.address.country">{{ addressData.address.country }}</span>
98
+ <span v-if="addressData.address.streetNo" class="street-address">{{ addressData.address.streetNo }}</span><br/>
99
+ <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}&nbsp;</span>
100
+ <span v-if="addressData.address.city" class="locality">{{ addressData.address.city }}</span><br/>
101
+ <span v-if="addressData.address.miscInfo">{{ addressData.address.miscInfo }}</span><br/>
102
+ <span v-if="addressData.address.country" class="country-name">{{ addressData.address.country }}</span>
99
103
  </template>
100
104
  </li>
101
105
  <li v-if="addressData.telephone?.value">
@@ -137,19 +141,12 @@ export default {
137
141
  default: true
138
142
  },
139
143
  /**
140
- * show a label-text
144
+ * show a label-text for each entry
141
145
  */
142
146
  showLabelTexts: {
143
147
  type: Boolean,
144
148
  default: true
145
149
  },
146
- /**
147
- * properties for CmdHeadline-component
148
- */
149
- cmdHeadline: {
150
- type: Object,
151
- required: false
152
- },
153
150
  /**
154
151
  * option to toggle labels (i.e. telephone, email etc.) in front/left of data
155
152
  */
@@ -170,6 +167,13 @@ export default {
170
167
  linkGoogleMaps: {
171
168
  type: Boolean,
172
169
  default: false
170
+ },
171
+ /**
172
+ * properties for CmdHeadline-component
173
+ */
174
+ cmdHeadline: {
175
+ type: Object,
176
+ required: false
173
177
  }
174
178
  },
175
179
  computed: {
@@ -186,13 +190,16 @@ export default {
186
190
  dl {
187
191
  grid-row-gap: calc(var(--default-gap) / 2);
188
192
 
189
- dt, dd {
193
+ dt {
190
194
  display: flex;
191
195
  align-items: center;
196
+
197
+ &.address {
198
+ align-items: flex-start;
199
+ }
192
200
  }
193
201
  }
194
202
 
195
-
196
203
  ul {
197
204
  flex-direction: column;
198
205
  gap: calc(var(--default-gap) / 2);
@@ -13,7 +13,7 @@
13
13
  import {getRoute} from "../utilities.js"
14
14
 
15
15
  export default {
16
- name: "CmdLogo",
16
+ name: "CmdCompanyLogo",
17
17
  data() {
18
18
  return {
19
19
  prefersColorScheme: ""
@@ -478,6 +478,10 @@ export default {
478
478
  margin-left: auto;
479
479
  font-size: 1rem;
480
480
  }
481
+
482
+ &:hover, &:active, &:focus {
483
+ background: var(--primary-color);
484
+ }
481
485
  }
482
486
  }
483
487
  }
@@ -605,7 +609,7 @@ export default {
605
609
  }
606
610
 
607
611
  &:hover, &:active, &:focus {
608
- background: var(--pure-white);
612
+ background: var(--color-scheme-background-color);
609
613
 
610
614
  span {
611
615
  color: var(--status-color);
@@ -20,24 +20,20 @@
20
20
  ref="label">
21
21
 
22
22
  <!-- begin label-text (+ required asterisk) -->
23
- <span v-if="labelText && $attrs.type !== 'checkbox' && $attrs.type !== 'radio'"
23
+ <span v-if="(labelText || $slots.labeltext) && $attrs.type !== 'checkbox' && $attrs.type !== 'radio'"
24
24
  :class="['label-text', !showLabel ? 'hidden' : undefined]">
25
- <span>{{ labelText }}<sup v-if="$attrs.required">*</sup></span>
25
+ <span v-if="labelText">{{ labelText }}<sup v-if="$attrs.required">*</sup></span>
26
+ <slot name="labeltext" />
26
27
 
27
28
  <!-- begin CmdTooltipForInputElements -->
28
29
  <CmdTooltipForInputElements
29
30
  v-if="useCustomTooltip && (validationStatus === '' || validationStatus === 'error')"
30
31
  ref="tooltip"
31
- :showRequirements="showRequirements"
32
- :inputRequirements="inputRequirements"
33
32
  :validationStatus="validationStatus"
34
33
  :validationMessage="getValidationMessage"
35
34
  :validationTooltip="validationTooltip"
36
- :inputAttributes="$attrs"
37
- :inputModelValue="modelValue"
38
- :helplink="helplink"
39
35
  :relatedId="tooltipId"
40
- :labelText="labelText"
36
+ :cmdListOfRequirements="listOfRequirements"
41
37
  />
42
38
  <!-- end CmdTooltipForInputElements -->
43
39
 
@@ -101,18 +97,18 @@
101
97
  <!-- begin checkbox and radiobutton -->
102
98
  <template v-else-if="element === 'input' && ($attrs.type === 'checkbox' || $attrs.type === 'radio')">
103
99
  <template v-if="!(onLabel && offLabel)">
104
- <input
105
- v-bind="elementAttributes"
106
- @change="onChange"
107
- @blur="onBlur"
108
- :checked="isChecked"
109
- :value="inputValue"
110
- :class="[inputClass, validationStatus, toggleSwitchIconClass, { 'replace-input-type': replaceInputType, 'toggle-switch': toggleSwitch }]"
111
- :id="labelId"
112
- :disabled="$attrs.disabled"
113
- :aria-invalid="validationStatus === 'error'"
114
- />
115
- <span v-if="labelText" :class="['label-text', { hidden: !showLabel }]"><span>{{ labelText }}<sup v-if="$attrs.required">*</sup></span></span>
100
+ <input
101
+ v-bind="elementAttributes"
102
+ @change="onChange"
103
+ @blur="onBlur"
104
+ :checked="isChecked"
105
+ :value="inputValue"
106
+ :class="[inputClass, validationStatus, toggleSwitchIconClass, { 'replace-input-type': replaceInputType, 'toggle-switch': toggleSwitch }]"
107
+ :id="labelId"
108
+ :disabled="$attrs.disabled"
109
+ :aria-invalid="validationStatus === 'error'"
110
+ />
111
+ <span v-if="labelText" :class="['label-text', { hidden: !showLabel }]"><span>{{ labelText }}<sup v-if="$attrs.required">*</sup></span></span>
116
112
  </template>
117
113
 
118
114
  <!-- begin labels for toggle-switch with switch-label -->
@@ -211,7 +207,7 @@ import CmdTooltipForInputElements from "./CmdTooltipForInputElements"
211
207
 
212
208
  export default {
213
209
  inheritAttrs: false,
214
- name: "FormElement",
210
+ name: "CmdFormElement",
215
211
  components: {
216
212
  CmdTooltipForInputElements
217
213
  },
@@ -423,6 +419,16 @@ export default {
423
419
  type: Boolean,
424
420
  default: true
425
421
  },
422
+ /**
423
+ * text shown in front of character-count below textarea
424
+ *
425
+ * type-property must be set to textarea
426
+ * showCharactersTextarea-property must be activated
427
+ */
428
+ textCharacters: {
429
+ type: String,
430
+ default: "Characters"
431
+ },
426
432
  /**
427
433
  * toggle visibility of search-button (next to search-field)
428
434
  */
@@ -468,7 +474,7 @@ export default {
468
474
  * icon for error-validated items in list-of-requirements
469
475
  *
470
476
  * element-property must me set to 'input'
471
- * showRequirements-property must be set to 'true'
477
+ * showRequirements-subproperty (of CmdListOfRequirements) must be set to 'true'
472
478
  *
473
479
  */
474
480
  iconHasStateError: {
@@ -485,7 +491,7 @@ export default {
485
491
  * icon for warning-validated items in list-of-requirements
486
492
  *
487
493
  * element-property must me set to 'input'
488
- * showRequirements-property must be set to 'true'
494
+ * showRequirements-subproperty (of CmdListOfRequirements) must be set to 'true'
489
495
  *
490
496
  */
491
497
  iconHasStateWarning: {
@@ -502,7 +508,7 @@ export default {
502
508
  * icon for success-validated items in list-of-requirements
503
509
  *
504
510
  * element-property must me set to 'input'
505
- * showRequirements-property must be set to 'true'
511
+ * showRequirements-subproperty (of CmdListOfRequirements) must be set to 'true'
506
512
  *
507
513
  */
508
514
  iconHasStateSuccess: {
@@ -519,7 +525,7 @@ export default {
519
525
  * icon for info-validated items in list-of-requirements
520
526
  *
521
527
  * element-property must me set to 'input'
522
- * showRequirements-property must be set to 'true'
528
+ * showRequirements-subproperty (of CmdListOfRequirements) must be set to 'true'
523
529
  *
524
530
  */
525
531
  iconHasStateInfo: {
@@ -592,8 +598,32 @@ export default {
592
598
  }
593
599
  }
594
600
  },
601
+ /**
602
+ * properties for CmdListOfRequirements-component
603
+ */
604
+ cmdListOfRequirements: {
605
+ type: Object,
606
+ default() {
607
+ return {}
608
+ }
609
+ }
595
610
  },
596
611
  computed: {
612
+ listOfRequirements() {
613
+ if (this.cmdListOfRequirements === undefined) {
614
+ return {
615
+ showRequirements: true,
616
+ showHeadline: true,
617
+ validationTooltip: this.validationTooltip,
618
+ inputRequirements: [],
619
+ inputAttributes: this.$attrs,
620
+ inputModelValue: this.modelValue,
621
+ helplink: {},
622
+ labelText: this.labelText
623
+ }
624
+ }
625
+ return this.cmdListOfRequirements
626
+ },
597
627
  elementAttributes() {
598
628
  const commonAttributes = ["name", "required", "readonly", "disabled", "autofocus"]
599
629
  const attributes = {
@@ -640,7 +670,7 @@ export default {
640
670
  return false
641
671
  },
642
672
  charactersTextarea() {
643
- return "Characters: " + this.modelValue.length + "/" + this.getMaxLength()
673
+ return this.textCharacters + " " + this.modelValue.length + "/" + this.getMaxLength()
644
674
  },
645
675
  validationTooltip() {
646
676
  if (!this.useCustomTooltip) {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="cmd-list-of-requirements">
3
3
  <!-- begin cmd-custom-headline -->
4
- <CmdHeadline :headline-level="cmdHeadline.headlineLevel">
4
+ <CmdHeadline v-if="showHeadline" :headline-level="cmdHeadline.headlineLevel">
5
5
  {{ headlineRequirements }}<template v-if="labelText"><br/><em>{{ labelText }}</em></template>
6
6
  </CmdHeadline>
7
7
  <!-- end cmd-custom-headline -->
@@ -94,7 +94,7 @@ export default {
94
94
  * set a helplink to a different page for further support
95
95
  */
96
96
  helplink: {
97
- type: String,
97
+ type: Object,
98
98
  required: false
99
99
  },
100
100
  /**
@@ -121,6 +121,13 @@ export default {
121
121
  }
122
122
  }
123
123
  },
124
+ /**
125
+ * toggle headline-visibility
126
+ */
127
+ showHeadline: {
128
+ type: Boolean,
129
+ default: true
130
+ },
124
131
  /**
125
132
  * properties of CmdHeadline-component
126
133
  */
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <div
3
+ v-if="navigationEntries.length"
3
4
  :class="[
4
5
  'cmd-main-navigation main-navigation-wrapper',
5
6
  {
@@ -297,7 +298,6 @@ export default {
297
298
  @media only screen and (max-width: $medium-max-width) {
298
299
  .cmd-main-navigation {
299
300
  --nav-transition: all .5s linear;
300
-
301
301
  display: flex;
302
302
  background: none; /* overwrite framework-css */
303
303
  border: 0; /* overwrite framework-css */
@@ -340,7 +340,7 @@ export default {
340
340
  }
341
341
 
342
342
  nav {
343
- --nav-width: 30%;
343
+ --nav-width: 33%;
344
344
 
345
345
  position: fixed;
346
346
  top: 0;
@@ -439,7 +439,7 @@ export default {
439
439
  > a {
440
440
  span {
441
441
  + span[class*="icon"]::before {
442
- transform: rotate(90deg);
442
+
443
443
  }
444
444
  }
445
445
  }
@@ -448,7 +448,7 @@ export default {
448
448
  > a {
449
449
  span {
450
450
  + span[class*="icon"]::before {
451
- transform: rotate(-90deg);
451
+
452
452
  }
453
453
  }
454
454
  }
@@ -42,15 +42,10 @@ import CmdHeadline from "./CmdHeadline"
42
42
 
43
43
  export default {
44
44
  name: "CmdOpeningHours",
45
- components: {CmdHeadline},
45
+ components: {
46
+ CmdHeadline
47
+ },
46
48
  props: {
47
- /**
48
- * properties for CmdHeadline-component
49
- */
50
- cmdHeadline: {
51
- type: Object,
52
- required: false
53
- },
54
49
  /**
55
50
  * set a link to a detail page
56
51
  */
@@ -94,6 +89,13 @@ export default {
94
89
  textMiscInfo: {
95
90
  type: String,
96
91
  required: false
92
+ },
93
+ /**
94
+ * properties for CmdHeadline-component
95
+ */
96
+ cmdHeadline: {
97
+ type: Object,
98
+ required: false
97
99
  }
98
100
  }
99
101
  }
@@ -49,7 +49,7 @@ export default {
49
49
  required: false
50
50
  },
51
51
  /**
52
- * activate if page to share is not given by json-data)
52
+ * activate if page to share is not given by json-data
53
53
  */
54
54
  appendPage: {
55
55
  type: Boolean,
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <a href="#"
3
3
  @click.prevent
4
- :class="['cmd-slide-button', 'button', slideButtonType ? slideButtonType : 'next']"
4
+ :class="['cmd-slide-button', 'button', slideButtonType]"
5
5
  :title="getDirection.tooltip">
6
6
  <span :class="getDirection.iconClass || 'next'"></span>
7
7
  </a>
@@ -4,18 +4,18 @@
4
4
  <li v-for="(language, index) in languages" :key="index">
5
5
  <!-- begin link-type 'href' -->
6
6
  <a v-if="language.link.type === 'href'" :href="language.link.path"
7
- :class="['flag', language.iso2, {'active': language.active}]"
7
+ :class="['flag', language.iso2, {'active': activeLanguage(language)}]"
8
8
  :title="language.tooltip"
9
9
  @click="$emit('click', { originalEvent: $event, language} )">
10
10
  <img :src="getFlagURL(language.iso2)" :alt="language.name" />
11
11
  </a>
12
- <!-- end link-type 'href -->
12
+ <!-- end link-type 'href' -->
13
13
 
14
14
  <!-- begin link-type 'router' -->
15
15
  <router-link v-else
16
- :class="['flag', language.iso2]"
17
- :to="getRoute(language)" :title="language.tooltip"
18
- @click="$emit('click', { originalEvent: $event, language})">
16
+ :class="['flag', language.iso2]"
17
+ :to="getRoute(language)" :title="language.tooltip"
18
+ @click="$emit('click', { originalEvent: $event, language})">
19
19
  <img :src="getFlagURL(language.iso2)" :alt="language.name" />
20
20
  </router-link>
21
21
  <!-- end link-type 'router' -->
@@ -45,6 +45,11 @@ export default {
45
45
  },
46
46
  getFlagURL(isoCode) {
47
47
  return require("../assets/images/flags/flag-" + isoCode + ".svg")
48
+ },
49
+ activeLanguage(language) {
50
+ if(language.active || language.iso2 === navigator.language) {
51
+ return true
52
+ }
48
53
  }
49
54
  }
50
55
  }
@@ -61,6 +66,14 @@ export default {
61
66
  li {
62
67
  list-style-type: none;
63
68
  margin: 0;
69
+
70
+ a:not(.active) {
71
+ filter: contrast(.5);
72
+
73
+ &:hover, &:focus, &:active {
74
+ filter: none;
75
+ }
76
+ }
64
77
  }
65
78
  }
66
79
  }
@@ -194,19 +194,12 @@ export default {
194
194
  gap: calc(var(--default-gap) / 2);
195
195
 
196
196
  .button {
197
- background: none;
198
197
  padding: 0;
199
198
  min-width: 2rem;
200
199
  min-height: 2rem;
201
- background: var(--pure-white);
202
200
 
203
201
  span[class*="icon"] {
204
- color: var(--primary-color);
205
202
  font-size: 1rem;
206
-
207
- &:hover, &:active, &:focus {
208
- color: var(--hyperlink-color-highlighted);
209
- }
210
203
  }
211
204
  }
212
205
  }