comand-component-library 4.3.26 → 4.3.28

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.
Files changed (50) hide show
  1. package/dist/comand-component-library.css +1 -1
  2. package/dist/comand-component-library.js +8574 -8438
  3. package/dist/styles/demopage-only.css +48 -0
  4. package/package.json +2 -2
  5. package/src/ComponentLibrary.vue +1923 -1881
  6. package/src/assets/data/text-image-block.json +3 -1
  7. package/src/assets/data/thumbnail-scroller-images.json +1 -1
  8. package/src/components/CmdAccordion.vue +1 -1
  9. package/src/components/CmdAddressData.vue +60 -72
  10. package/src/components/CmdBankAccountData.vue +55 -33
  11. package/src/components/CmdBasicForm.vue +19 -7
  12. package/src/components/CmdBox.vue +8 -0
  13. package/src/components/CmdBoxWrapper.vue +14 -0
  14. package/src/components/CmdBreadcrumbs.vue +10 -27
  15. package/src/components/CmdCompanyLogo.vue +3 -0
  16. package/src/components/CmdContainer.vue +21 -2
  17. package/src/components/CmdCookieDisclaimer.vue +5 -5
  18. package/src/components/CmdFakeSelect.vue +27 -17
  19. package/src/components/CmdFancyBox.vue +73 -85
  20. package/src/components/CmdFootnote.vue +2 -1
  21. package/src/components/CmdForm.vue +118 -160
  22. package/src/components/CmdFormFilters.vue +1 -0
  23. package/src/components/CmdGoogleMaps.vue +9 -2
  24. package/src/components/CmdHeadline.vue +10 -9
  25. package/src/components/CmdImage.vue +44 -21
  26. package/src/components/CmdImageGallery.vue +13 -8
  27. package/src/components/CmdLink.vue +20 -5
  28. package/src/components/CmdList.vue +7 -2
  29. package/src/components/CmdLoginForm.vue +156 -255
  30. package/src/components/CmdMailToolEntry.vue +2 -1
  31. package/src/components/CmdMultistepFormProgressBar.vue +2 -2
  32. package/src/components/CmdMultistepFormWrapper.vue +2 -6
  33. package/src/components/CmdOpeningHours.vue +14 -2
  34. package/src/components/CmdSidebar.vue +2 -2
  35. package/src/components/CmdSiteWrapper.vue +66 -58
  36. package/src/components/CmdSlideshow.vue +5 -0
  37. package/src/components/CmdSocialNetworks.vue +27 -17
  38. package/src/components/CmdSwitchLanguage.vue +16 -19
  39. package/src/components/CmdSystemMessage.vue +71 -66
  40. package/src/components/CmdTable.vue +42 -24
  41. package/src/components/CmdTabs.vue +15 -7
  42. package/src/components/CmdTag.vue +28 -23
  43. package/src/components/CmdTextImageBlock.vue +62 -53
  44. package/src/components/CmdThumbnailScroller.vue +18 -6
  45. package/src/components/CmdToast.vue +60 -17
  46. package/src/components/CmdToggleDarkMode.vue +31 -32
  47. package/src/components/CmdTooltip.vue +33 -20
  48. package/src/components/CmdUploadForm.vue +212 -183
  49. package/src/components/CmdWidthLimitationWrapper.vue +19 -3
  50. package/dist/styles/templates/casual.css +0 -3
@@ -14,7 +14,7 @@
14
14
  :itemProvider="editModeConfig?.allowAddItem !== false ? itemProvider : null"
15
15
  >
16
16
  <template v-slot="slotProps">
17
- <figure :class="['cmd-image flex-container no-gap vertical', textAlign]">
17
+ <figure :class="['cmd-image flex-container no-gap vertical', alignContent]">
18
18
  <!-- begin figcaption above image -->
19
19
  <template v-if="figcaption?.show && figcaption?.position === 'top'">
20
20
  <!-- begin CmdFormElement -->
@@ -28,14 +28,14 @@
28
28
  v-model="editableFigcaptionText"
29
29
  />
30
30
  <!-- end CmdFormElement -->
31
- <figcaption v-else-if="figcaption?.text" v-html="figcaption?.text"/>
31
+ <figcaption v-else-if="figcaptionProperties?.text" v-html="figcaptionProperties?.text"/>
32
32
  </template>
33
33
  <!-- end figcaption above image -->
34
34
 
35
35
  <!-- begin image-wrapper -->
36
36
  <template v-if="slotProps.editing">
37
37
  <!-- begin image with drop-area -->
38
- <a href="#" :class="['box drop-area flex-container vertical', { 'allow-drop': allowDrop }]"
38
+ <a href="#" :class="['box drop-area flex-container flex-direction-column', { 'allow-drop': allowDrop }]"
39
39
  v-on="dragAndDropHandler"
40
40
  @click.prevent="selectFiles"
41
41
  title="Drag new image to this area to replace old one!">
@@ -64,7 +64,7 @@
64
64
  <!-- end image-wrapper -->
65
65
 
66
66
  <!-- begin figcaption below image -->
67
- <template v-if="figcaption?.show && figcaption?.position !== 'top'">
67
+ <template v-if="figcaptionProperties?.show && figcaptionProperties?.position !== 'top'">
68
68
  <!-- begin CmdFormElement -->
69
69
  <CmdFormElement
70
70
  v-if="slotProps.editing"
@@ -78,7 +78,7 @@
78
78
  placeholder="figcaption"
79
79
  />
80
80
  <!-- end CmdFormElement -->
81
- <figcaption v-else-if="figcaption?.text" v-html="figcaption?.text"/>
81
+ <figcaption v-else-if="figcaptionProperties?.text" v-html="figcaptionProperties?.text"/>
82
82
  </template>
83
83
  <!-- end figcaption below image -->
84
84
 
@@ -98,10 +98,10 @@
98
98
 
99
99
  <!-- begin default-view -->
100
100
  <!-- begin image with figure/figcaption -->
101
- <figure v-else-if="useFigureTag" :class="['cmd-image', textAlign]">
102
- <figcaption v-if="figcaption?.position === 'top' && figcaption?.text && figcaption?.show" v-html="figcaption?.text"/>
101
+ <figure v-else-if="useFigureTag" :class="['cmd-image flex-container flex-direction-column', alignContent]">
102
+ <figcaption v-if="figcaptionProperties?.position === 'top' && figcaptionProperties?.text && figcaptionProperties?.show" v-html="figcaptionProperties?.text"/>
103
103
  <img :src="imageSource" :alt="image?.alt" :title="image?.tooltip" :loading="image?.lazyLoading !== false ? 'lazy' : null" @load="onImageLoaded"/>
104
- <figcaption v-if="figcaption?.position !== 'top' && figcaption?.text && figcaption?.show" v-html="figcaption?.text"/>
104
+ <figcaption v-if="figcaptionProperties?.position === 'bottom' && figcaptionProperties?.text && figcaptionProperties?.show" v-html="figcaptionProperties?.text"/>
105
105
  </figure>
106
106
  <!-- end image with figure/figcaption -->
107
107
 
@@ -121,6 +121,11 @@ import {updateHandlerProvider} from "../utils/editmode.js"
121
121
  export default {
122
122
  name: "CmdImage",
123
123
  mixins: [EditMode],
124
+ inject: {
125
+ editModeContext: {
126
+ default: null
127
+ }
128
+ },
124
129
  data() {
125
130
  return {
126
131
  mediumMaxWidth: 1023,
@@ -185,6 +190,13 @@ export default {
185
190
  },
186
191
  /**
187
192
  * figcaption-object including visibility, position (top/bottom), text
193
+ *
194
+ * {
195
+ * position: "top"/"bottom",
196
+ * show: true/false,
197
+ * tooltip: "text",
198
+ * textAlign: "left"/"center"/"right"
199
+ * }
188
200
  */
189
201
  figcaption: {
190
202
  type: Object,
@@ -218,6 +230,14 @@ export default {
218
230
  window.removeEventListener("resize", this.updateWindowWidth)
219
231
  },
220
232
  computed: {
233
+ figcaptionProperties() {
234
+ return {
235
+ "show": true,
236
+ "position": "bottom",
237
+ "textAlign": "center",
238
+ ...this.figcaption
239
+ }
240
+ },
221
241
  imageComponentPath() {
222
242
  return this.componentPath || ["props", "cmdImage"]
223
243
  },
@@ -250,9 +270,21 @@ export default {
250
270
  // else return large (will be used if images for small-and -medium-devices do not exist or if screen resolution is larger than mediumMaxWidth)
251
271
  return imgSrc.large
252
272
  },
273
+ alignContent() {
274
+ switch (this.figcaption?.textAlign) {
275
+ case "left":
276
+ return "align-items-flex-start";
277
+ case "center":
278
+ return "align-items-center";
279
+ case "right":
280
+ return "align-item-flex-end";
281
+ default:
282
+ return null;
283
+ }
284
+ },
253
285
  textAlign() {
254
286
  if (this.figcaption?.textAlign) {
255
- return "text-" + this.figcaption.textAlign
287
+ return "text-align-" + this.figcaption.textAlign
256
288
  }
257
289
  return ''
258
290
  },
@@ -402,27 +434,18 @@ export default {
402
434
  <style>
403
435
  /* begin cmd-image ------------------------------------------------------------------------------------------ */
404
436
  .cmd-image {
437
+ gap: var(--gap-small);
438
+
405
439
  img {
406
440
  display: block;
407
441
  }
408
442
 
409
443
  figcaption {
444
+ padding: 0;
410
445
  border-bottom-left-radius: var(--default-border-radius);
411
446
  border-bottom-right-radius: var(--default-border-radius);
412
447
  }
413
448
 
414
- &.text-center {
415
- figcaption {
416
- text-align: center;
417
- }
418
- }
419
-
420
- &.text-right {
421
- figcaption {
422
- text-align: right;
423
- }
424
- }
425
-
426
449
  .drop-area {
427
450
  border: 0;
428
451
  align-items: center;
@@ -60,14 +60,12 @@ import {buildComponentPath, updateHandlerProvider} from "../utils/editmode.js"
60
60
  export default {
61
61
  name: "CmdImageGallery",
62
62
  mixins: [EditMode],
63
+ inject: {
64
+ editModeContext: {
65
+ default: null
66
+ }
67
+ },
63
68
  props: {
64
- /**
65
- * properties for CmdHeadline-component
66
- */
67
- cmdHeadline: {
68
- type: Object,
69
- required: false
70
- },
71
69
  /**
72
70
  * set if large version of images can be opened in a fancybox
73
71
  */
@@ -96,7 +94,14 @@ export default {
96
94
  return value === "top" ||
97
95
  value === "bottom"
98
96
  }
99
- }
97
+ },
98
+ /**
99
+ * properties for CmdHeadline-component
100
+ */
101
+ cmdHeadline: {
102
+ type: Object,
103
+ required: false
104
+ },
100
105
  },
101
106
  methods: {
102
107
  itemProvider() {
@@ -2,11 +2,13 @@
2
2
  <!-- begin CmdLink ---------------------------------------------------------------------------------------- -->
3
3
  <!-- begin href -->
4
4
  <a v-if="linkType === 'href'"
5
+ ref="cmd-link"
5
6
  :href="!disabled ? path : null"
6
7
  :target="target"
7
8
  :class="['cmd-link', highlightLevel, {'button': styleAsButton, 'disabled': disabled, 'box': styleAsBox, 'fancybox': fancybox}]"
8
9
  @click.prevent="emitClick($event, 'href')"
9
10
  :title="icon?.tooltip"
11
+ :role="styleAsButton ? 'button' : null"
10
12
  >
11
13
  <!-- begin CmdInnterLink -->
12
14
  <CmdInnerLink :text="text" :icon="icon" :image="image">
@@ -23,7 +25,8 @@
23
25
  :to="!disabled ? path : {}"
24
26
  exact-active-class="router-link-exact-active active"
25
27
  :class="['cmd-link', highlightLevel, {'button': styleAsButton, 'disabled': disabled, 'box': styleAsBox, 'fancybox': fancybox}]"
26
- @click="emitClick($event, 'router')"
28
+ @click="emitClick($event, 'router')"
29
+ :role="styleAsButton ? 'button' : null"
27
30
  :title="icon?.tooltip">
28
31
  <!-- begin CmdInnterLink -->
29
32
  <CmdInnerLink :text="text" :icon="icon" :image="image">
@@ -37,6 +40,7 @@
37
40
 
38
41
  <!-- begin button -->
39
42
  <button v-else-if="linkType === 'button' || linkType === 'submit'"
43
+ ref="cmd-link"
40
44
  :class="['cmd-link button', highlightLevel, {'disabled': disabled, 'box': styleAsBox, 'fancybox': fancybox}]"
41
45
  type="submit"
42
46
  :disabled="disabled"
@@ -125,13 +129,13 @@ export default {
125
129
  },
126
130
  /**
127
131
  * set highlight-level for link/button
128
- * null"none", "primary", "secondary", "tertiary"
132
+ * null, "primary", "secondary", "tertiary"
129
133
  */
130
134
  highlightLevel: {
131
135
  type: String,
132
136
  default: "primary",
133
137
  validator(value) {
134
- return value === null||
138
+ return value === null ||
135
139
  value === "primary" ||
136
140
  value === "secondary" ||
137
141
  value === "tertiary"
@@ -160,6 +164,19 @@ export default {
160
164
  }
161
165
  },
162
166
  methods: {
167
+ /**
168
+ * public function to enable calling foucs() on main-component from outside
169
+ */
170
+ focus() {
171
+ const link = this.$refs["cmd-link"]
172
+ // check if link provides native function focus() (for a/button)
173
+ if(typeof link.focus === "function" ) {
174
+ link.focus()
175
+ } else {
176
+ // set focus for router-link
177
+ link.$el.focus()
178
+ }
179
+ },
163
180
  emitClick(event, linkType) {
164
181
  this.$emit("click", {originalEvent: event, linkType: linkType})
165
182
  }
@@ -182,8 +199,6 @@ export default {
182
199
 
183
200
  img {
184
201
  max-height: 4rem;
185
- aspect-ratio: 1/1;
186
- border-radius: var(--full-circle);
187
202
  margin: 0;
188
203
  }
189
204
 
@@ -127,6 +127,11 @@ export default {
127
127
  name: "CmdListOfLinks",
128
128
  emits: ["click"],
129
129
  mixins: [EditMode],
130
+ inject: {
131
+ editModeContext: {
132
+ default: null
133
+ }
134
+ },
130
135
  data() {
131
136
  return {
132
137
  listOfTagItems: [...(this.items || [])]
@@ -392,7 +397,7 @@ export default {
392
397
  .cmd-list {
393
398
  > ul {
394
399
  flex-direction: column;
395
- gap: var(--default-gap-half);
400
+ gap: var(--gap-small);
396
401
  margin: 0;
397
402
 
398
403
  li {
@@ -402,7 +407,7 @@ export default {
402
407
 
403
408
  &:has(.tag) {
404
409
  .tag {
405
- gap: var(--default-gap-half);
410
+ gap: var(--gap-small);
406
411
 
407
412
  &.primary, &.secondary, &.tertiary {
408
413
  [class*="icon-"] {