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
@@ -1,39 +1,30 @@
1
1
  <template>
2
2
  <!-- begin CmdTextImageBlock ---------------------------------------------------------------------------------------- -->
3
3
  <div :class="['cmd-text-image-block flex-container', orientation]">
4
- <!-- begin cmdHeadline -->
5
- <CmdHeadline
6
- v-if="(cmdHeadline?.headlineText || editModeContext) && (headlinePosition === 'aboveImage' && orientation === 'vertical')"
7
- v-bind="cmdHeadline"
8
- />
9
- <!-- end cmdHeadline -->
10
-
11
- <!-- begin cmdImage -->
12
- <CmdImage
13
- v-if="cmdImage"
14
- :image="cmdImage?.image"
15
- :figcaption="cmdImage?.figcaption"
16
- :editModeConfig="{allowAddItem: false}"
17
- />
18
- <!-- end cmdImage -->
19
-
20
- <div v-if="!editModeContext" class="flex-container vertical" :class="setInnerClass">
21
- <!-- begin cmdHeadline -->
4
+ <slot>
22
5
  <CmdHeadline
23
- v-if="(cmdHeadline?.headlineText || editModeContext) && (headlinePosition === 'belowImage' || orientation === 'horizontal')"
24
- v-bind="cmdHeadline"
6
+ v-if="((cmdHeadlineProperties?.show && cmdHeadlineProperties?.headlineText) || editModeContext) && (headlinePosition === 'aboveImage' && orientation === 'vertical')"
7
+ v-bind="cmdHeadlineProperties"
25
8
  />
26
- <!-- end cmdHeadline -->
27
9
 
28
- <!-- begin continuous text -->
29
- <div v-if="htmlContent" v-html="htmlContent"></div>
30
- <!-- end continuous text -->
10
+ <CmdImage
11
+ v-if="cmdImageProperties.show"
12
+ v-bind="cmdImageProperties"
13
+ :editModeConfig="{allowAddItem: false}"
14
+ />
31
15
 
32
- <!-- begin slot-content -->
33
- <slot></slot>
34
- <!-- end slot-content -->
35
- </div>
16
+ <div v-if="!editModeContext" class="flex-container vertical" :class="setInnerClass">
17
+ <CmdHeadline
18
+ v-if="((cmdHeadlineProperties?.show && cmdHeadlineProperties?.headlineText) || editModeContext) && (headlinePosition === 'belowImage' && orientation === 'horizontal')"
19
+ v-bind="cmdHeadlineProperties"
20
+ />
36
21
 
22
+ <!-- begin continuous text -->
23
+ <CmdParagraph v-if="cmdParagraphProperties.show" v-bind="cmdParagraphProperties" />
24
+ <!-- end continuous text -->
25
+ </div>
26
+ </slot>
27
+
37
28
  <!-- begin edit-mode -->
38
29
  <EditComponentWrapper
39
30
  v-if="editModeContext"
@@ -71,6 +62,11 @@ import {updateHandlerProvider} from "../utils/editmode.js"
71
62
  export default {
72
63
  name: "CmdTextImageBlock",
73
64
  mixins: [EditMode],
65
+ inject: {
66
+ editModeContext: {
67
+ default: null
68
+ }
69
+ },
74
70
  data() {
75
71
  return {
76
72
  editableHtmlContent: null
@@ -91,27 +87,11 @@ export default {
91
87
  }
92
88
  },
93
89
  /**
94
- * content for continuous text (can contain html-tags)
95
- *
96
- * @canContainHtml: true
97
- */
98
- htmlContent: {
99
- type: String,
100
- required: true
101
- },
102
- /**
103
- * specify class for inner content
104
- */
105
- innerClass: {
106
- type: String,
107
- required: false
108
- },
109
- /**
110
- * text-alignment for paragraph/continuous text
111
- *
90
+ * set text-align for content
91
+ *
112
92
  * @allowedValues: "left", "center", "right"
113
93
  */
114
- paragraphTextAlign: {
94
+ textAlign: {
115
95
  type: String,
116
96
  default: "left",
117
97
  validator(value) {
@@ -119,6 +99,13 @@ export default {
119
99
  value === "center" ||
120
100
  value === "right"
121
101
  }
102
+ },
103
+ /**
104
+ * specify class for inner content
105
+ */
106
+ innerClass: {
107
+ type: String,
108
+ required: false
122
109
  },
123
110
  /**
124
111
  * position for headline
@@ -147,6 +134,15 @@ export default {
147
134
  type: Object,
148
135
  required: false
149
136
  },
137
+ /**
138
+ * properties for CmdParagraph-component
139
+ *
140
+ * @canContainHtml: true
141
+ */
142
+ cmdParagraph: {
143
+ type: Object,
144
+ required: false
145
+ },
150
146
  /**
151
147
  * editMode only
152
148
  */
@@ -155,18 +151,31 @@ export default {
155
151
  }
156
152
  },
157
153
  computed: {
154
+ cmdHeadlineProperties() {
155
+ return {
156
+ show: true,
157
+ headlineLevel: 2,
158
+ ...this.cmdHeadline
159
+ }
160
+ },
161
+ cmdImageProperties() {
162
+ return {
163
+ show: true,
164
+ ...this.cmdImage
165
+ }
166
+ },
167
+ cmdParagraphProperties() {
168
+ return {
169
+ show: true,
170
+ ...this.cmdParagraph
171
+ }
172
+ },
158
173
  paragraphComponentPath() {
159
174
  /* because paragraph is no component on its own, besides the componentPath (for the property),
160
175
  an additional flag (here $isComponent-key) is used to let the store identify this edge case.
161
176
  the '$'-prefix is set to ensure that the flag is not a generic name, that potentially is used as a property-name in any component */
162
177
  return [{componentPath: ["props", "htmlContent"], $isComponent: false}]
163
178
  },
164
- textAlign() {
165
- if (this.paragraphTextAlign) {
166
- return "text-align-" + this.paragraphTextAlign
167
- }
168
- return ""
169
- },
170
179
  setInnerClass() {
171
180
  return "inner-text-wrapper " + this.textAlign + " " + (this.innerClass || "")
172
181
  }
@@ -10,12 +10,11 @@
10
10
  fullWidthClass
11
11
  ]"
12
12
  ref="thumbnail-scroller">
13
- <!-- begin cmd-headline -->
13
+
14
14
  <CmdHeadline
15
- v-if="cmdHeadline?.headlineText || editModeContext"
16
- v-bind="cmdHeadline"
15
+ v-if="(cmdHeadlineProperties?.show && cmdHeadlineProperties?.headlineText) || editModeContext"
16
+ v-bind="cmdHeadlineProperties"
17
17
  />
18
- <!-- end cmd-headline -->
19
18
 
20
19
  <div :class="['inner-thumbnail-wrapper', {box: styleAsBox}]">
21
20
  <!-- begin CmdSlideButton -->
@@ -112,6 +111,11 @@ export default {
112
111
  DefaultMessageProperties,
113
112
  EditMode
114
113
  ],
114
+ inject: {
115
+ editModeContext: {
116
+ default: null
117
+ }
118
+ },
115
119
  data() {
116
120
  return {
117
121
  items: [],
@@ -272,6 +276,13 @@ export default {
272
276
  resizeObserver.observe(thumbnailScrollerWrapper)
273
277
  },
274
278
  computed: {
279
+ cmdHeadlineProperties() {
280
+ return {
281
+ show: true,
282
+ headlineLevel: 2,
283
+ ...this.cmdHeadline
284
+ }
285
+ },
275
286
  tooltip() {
276
287
  if (this.contentType === "image") {
277
288
  return this.getMessage("thumbnail_scroller.tooltip.open_large_image")
@@ -440,6 +451,7 @@ export default {
440
451
  img {
441
452
  min-width: 5rem;
442
453
  max-height: 10rem;
454
+ margin: 0 auto;
443
455
  }
444
456
 
445
457
  a {
@@ -462,9 +474,9 @@ export default {
462
474
  }
463
475
 
464
476
  figcaption {
465
- background: var(--primary-color);
477
+ background: none;
466
478
  opacity: 1;
467
- color: var(--color-white);
479
+ color: var(--hyperlink-color);
468
480
  }
469
481
  }
470
482
 
@@ -1,14 +1,14 @@
1
1
  <template>
2
2
  <!-- begin CmdToast ---------------------------------------------------------------------------------------- -->
3
- <div v-if="showToast" class="cmd-toast box" role="status" aria-live="assertive" aria-atomic="true">
3
+ <div v-if="showToast" class="cmd-toast box flex-container flex-direction-column" role="status" :aria-live="ariaLive" aria-atomic="true">
4
+ <header>
5
+ <CmdHeadline v-if="(cmdHeadlineProperties?.show && cmdHeadlineProperties?.headlineText) || editModeContext"
6
+ v-bind="cmdHeadlineProperties" />
7
+ <CmdLink @click="close" :aria-label="cmdLinkCloseIconProperties?.icon?.tooltip"
8
+ v-bind="cmdLinkCloseIconProperties" />
9
+ </header>
4
10
  <slot>
5
- <header>
6
- <CmdHeadline v-if="cmdHeadlineProps" v-bind="cmdHeadlineProps" />
7
- <a href="#" @click.prevent="close" :aria-label="cmdIconProps.tooltip">
8
- <CmdIcon v-bind="cmdIconProps" />
9
- </a>
10
- </header>
11
- <p>{{ message }}</p>
11
+ <CmdParagraph v-bind="cmdParagraphProperties" />
12
12
  </slot>
13
13
  </div>
14
14
  <!-- end CmdToast ---------------------------------------------------------------------------------------- -->
@@ -17,12 +17,31 @@
17
17
  <script>
18
18
  export default {
19
19
  name: 'CmdToast',
20
+ emits: ["status-changed"],
21
+ inject: {
22
+ editModeContext: {
23
+ default: null
24
+ }
25
+ },
20
26
  data() {
21
27
  return {
22
28
  showToast: false
23
29
  }
24
30
  },
25
31
  props: {
32
+ /**
33
+ * set aria-live-value for accessibility
34
+ *
35
+ * @requiredForAccessibility
36
+ */
37
+ ariaLive: {
38
+ tpye: String,
39
+ default: "assertive",
40
+ validator(value) {
41
+ return value === "assertive" ||
42
+ value === "alert"
43
+ }
44
+ },
26
45
  /**
27
46
  * message shown inside the toast
28
47
  */
@@ -38,26 +57,44 @@ export default {
38
57
  required: false
39
58
  },
40
59
  /**
41
- * properties for CmdIcon-component
60
+ * properties for CmdLink-component
42
61
  */
43
- cmdIcon: {
62
+ cmdLinkCloseIcon: {
63
+ type: Object,
64
+ required: false
65
+ },
66
+ /**
67
+ * properties for CmdParagraph-component
68
+ *
69
+ * content will be set by "message"-property
70
+ */
71
+ cmdParagraph: {
44
72
  type: Object,
45
73
  required: false
46
74
  }
47
75
  },
48
76
  computed: {
49
- cmdHeadlineProps() {
77
+ cmdHeadlineProperties() {
50
78
  return {
79
+ show: true,
51
80
  headlineLevel: 6,
52
81
  headlineText: "Information",
53
- ...this?.cmdHeadline
82
+ ...this.cmdHeadline
54
83
  }
55
84
  },
56
- cmdIconProps() {
85
+ cmdLinkCloseIconProperties() {
57
86
  return {
58
- iconClass: "icon-cancel",
59
- tooltip: "Close Toast",
60
- ...this?.cmdIcon
87
+ icon: {
88
+ iconClass: "icon-cancel-circle",
89
+ tooltip: "Close Toast",
90
+ },
91
+ ...this.cmdLinkCloseIcon
92
+ }
93
+ },
94
+ cmdParagraphProperties() {
95
+ return {
96
+ content: this.message,
97
+ ...this.cmdParagraph
61
98
  }
62
99
  }
63
100
  },
@@ -89,11 +126,17 @@ export default {
89
126
  top: auto;
90
127
  bottom: 7rem;
91
128
  z-index: 1000;
129
+ gap: var(--gap-small);
92
130
 
93
131
  header {
94
132
  display: flex;
133
+ align-items: center;
134
+
135
+ .cmd-headline {
136
+ margin: 0;
137
+ }
95
138
 
96
- a {
139
+ .cmd-link {
97
140
  margin-left: auto;
98
141
  }
99
142
  }
@@ -2,40 +2,40 @@
2
2
  <!-- begin CmdToggleDarkMode ---------------------------------------------------------------------------------------- -->
3
3
  <div :class="['cmd-toggle-dark-mode', {'styled-layout': useStyledLayout, 'dark-mode': darkMode}]">
4
4
  <template v-if="!editing">
5
- <!-- begin button-style -->
6
- <a v-if="styledAsButton"
7
- href="#"
8
- :class="['button', {'dark-mode': darkMode}]"
9
- @click.prevent="toggleColorScheme"
10
- >
11
- <span v-if="showLabel">{{ labelText }}</span>
12
- <!-- begin CmdIcon -->
13
- <CmdIcon
14
- :iconClass="iconClass"
15
- :type="iconType"
16
- :tooltip="!showLabel ? labelText: ''"
17
- />
18
- <!-- end CmdIcon -->
19
- </a>
20
- <!-- end button-style -->
5
+ <!-- begin button-style -->
6
+ <a v-if="styledAsButton"
7
+ href="#"
8
+ :class="['button', {'dark-mode': darkMode}]"
9
+ @click.prevent="toggleColorScheme"
10
+ >
11
+ <span v-if="showLabel">{{ labelText }}</span>
12
+ <!-- begin CmdIcon -->
13
+ <CmdIcon
14
+ :iconClass="iconClass"
15
+ :type="iconType"
16
+ :tooltip="!showLabel ? labelText: ''"
17
+ />
18
+ <!-- end CmdIcon -->
19
+ </a>
20
+ <!-- end button-style -->
21
21
 
22
- <!-- begin CmdFormElement -->
23
- <CmdFormElement
24
- v-else
25
- element="input"
26
- type="checkbox"
27
- :labelText="labelText"
28
- :showLabel="showLabel"
29
- v-model="darkMode"
30
- :toggle-switch="true"
31
- :title="!showLabel ? labelText: ''"
32
- @update:modelValue="setColorScheme"
33
- />
34
- <!-- end CmdFormElement -->
22
+ <!-- begin CmdFormElement -->
23
+ <CmdFormElement
24
+ v-else
25
+ element="input"
26
+ type="checkbox"
27
+ :labelText="labelText"
28
+ :showLabel="showLabel"
29
+ v-model="darkMode"
30
+ :toggle-switch="true"
31
+ :title="!showLabel ? labelText: ''"
32
+ @update:modelValue="setColorScheme"
33
+ />
34
+ <!-- end CmdFormElement -->
35
35
  </template>
36
36
 
37
+ <!-- begin edit-mode -->
37
38
  <template v-else>
38
- <!-- begin edit-mode -->
39
39
  <CmdFormElement
40
40
  element="input"
41
41
  type="text"
@@ -43,7 +43,6 @@
43
43
  placeholder="Label for Light Mode"
44
44
  v-model="labelTextLightModeModel"
45
45
  />
46
-
47
46
  <CmdFormElement
48
47
  element="input"
49
48
  type="text"
@@ -51,8 +50,8 @@
51
50
  placeholder="Label for Dark Mode"
52
51
  v-model="labelTextDarkModeModel"
53
52
  />
54
- <!-- end edit-mode -->
55
53
  </template>
54
+ <!-- end edit-mode -->
56
55
  </div>
57
56
  <!-- end CmdToggleDarkMode ---------------------------------------------------------------------------------------- -->
58
57
  </template>
@@ -5,17 +5,18 @@
5
5
  :style="'position-anchor:' + positionAnchor"
6
6
  >
7
7
  <!-- begin CmdHeadline -->
8
- <CmdHeadline v-if="cmdHeadline" v-bind="cmdHeadline" />
8
+ <CmdHeadline v-if="cmdHeadlineProperties.show && cmdHeadlineProperties.headlineText" v-bind="cmdHeadlineProperties" />
9
9
  <!-- end CmdHeadline -->
10
10
 
11
- <!-- begin icon to close tooltip -->
12
- <button v-if="showCloseIcon" type="button" class="close-tooltip no-style"
13
- popovertargetaction="hide" :popovertarget="popoverTargetName" :title="iconClose.tooltip">
14
- <!-- begin CmdIcon -->
15
- <CmdIcon :iconClass="iconClose.iconClass" :type="iconClose.iconType" />
16
- <!-- end CmdIcon -->
17
- </button>
18
- <!-- end icon to close tooltip -->
11
+ <!-- begin button to close tooltip -->
12
+ <CmdLink
13
+ v-if="cmdLinkCloseButtonProperties.show"
14
+ v-bind="cmdLinkCloseButtonProperties"
15
+ class="close-tooltip no-style"
16
+ popovertargetaction="hide"
17
+ :popovertarget="popoverTargetName"
18
+ />
19
+ <!-- end button to close tooltip -->
19
20
 
20
21
  <!-- begin slot-content -->
21
22
  <slot>
@@ -119,19 +120,11 @@ export default {
119
120
  default: ".site-wrapper"
120
121
  },
121
122
  /**
122
- * icon 'close'
123
- *
124
- * @requiredForAccessibility: partial
123
+ * properties for CmdLink-compoentnfor close-button
125
124
  */
126
- iconClose: {
125
+ cmdLinkCloseButton: {
127
126
  type: Object,
128
- default() {
129
- return {
130
- show: true,
131
- iconClass: "icon-cancel-circle",
132
- tooltip: "Close this tooltip!"
133
- }
134
- }
127
+ required: false
135
128
  },
136
129
  /**
137
130
  * enable toggling tooltip-visibility by click
@@ -148,6 +141,26 @@ export default {
148
141
  requiured: false
149
142
  }
150
143
  },
144
+ computed: {
145
+ cmdHeadlineProperties() {
146
+ return {
147
+ show: true,
148
+ headlineLevel: 6,
149
+ ...this.cmdHeadline
150
+ }
151
+ },
152
+ cmdLinkCloseButtonProperties() {
153
+ return {
154
+ show: true,
155
+ linkType: "button",
156
+ icon: {
157
+ iconClass: "icon-cancel-circle",
158
+ tooltip: "Close this tooltip!"
159
+ },
160
+ ...this.cmdLinkCloseButton
161
+ }
162
+ }
163
+ },
151
164
  mounted() {
152
165
  // provide the container the tooltip scrolls in (and should react to)
153
166
  const scrollContainerSelector = this.injectScrollContainer || this.scrollContainer