comand-component-library 4.0.37 → 4.0.39

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,7 +25,7 @@
25
25
 
26
26
  <!-- begin CmdHeadline -->
27
27
  <CmdHeadline
28
- v-else-if="cmdHeadline?.headlineText"
28
+ v-else-if="cmdHeadline?.headlineText && headlinePosition === 'header'"
29
29
  v-bind="cmdHeadline"
30
30
  />
31
31
  <!-- end CmdHeadline -->
@@ -41,14 +41,14 @@
41
41
 
42
42
  <!-- begin default header with slot -->
43
43
  <template v-else>
44
- <div v-if="useSlots?.includes('header') || cmdHeadline?.headlineText" class="box-header">
44
+ <div v-if="useSlots?.includes('header') || (cmdHeadline?.headlineText && headlinePosition === 'header')" class="box-header">
45
45
  <!-- begin slot 'header' -->
46
46
  <slot v-if="useSlots?.includes('header')" name="header"></slot>
47
47
  <!-- end slot 'header' -->
48
48
 
49
49
  <!-- begin CmdHeadline -->
50
50
  <CmdHeadline
51
- v-if="cmdHeadline?.headlineText"
51
+ v-if="cmdHeadline?.headlineText && headlinePosition === 'header'"
52
52
  v-bind="cmdHeadline"
53
53
  />
54
54
  <!-- end CmdHeadline -->
@@ -67,6 +67,19 @@
67
67
  >
68
68
  <!-- begin slot 'body' -->
69
69
  <slot name="body">
70
+ <!-- begin CmdHeadline -->
71
+ <CmdHeadline
72
+ v-if="cmdHeadline?.headlineText && headlinePosition === 'body'"
73
+ v-bind="cmdHeadline"
74
+ />
75
+ <!-- end CmdHeadline -->
76
+
77
+ <div v-if="cmdIcon !== undefined" class="body-icon-wrapper">
78
+ <!-- begin CmdIcon -->
79
+ <CmdIcon :iconClass="cmdIcon.iconClass" :type="cmdIcon.type" />
80
+ <!-- end CmdIcon -->
81
+ </div>
82
+
70
83
  <transition-group :name="toggleTransition">
71
84
  <p
72
85
  :class="{
@@ -97,9 +110,15 @@
97
110
 
98
111
  <div v-if="textBody"
99
112
  :class="{'default-padding': useDefaultPadding, 'allow-scroll': allowContentToScroll}">
113
+ <div v-if="cmdIcon !== undefined" class="body-icon-wrapper">
114
+ <!-- begin CmdIcon -->
115
+ <CmdIcon :iconClass="cmdIcon.iconClass" :type="cmdIcon.type" />
116
+ <!-- end CmdIcon -->
117
+ </div>
118
+
100
119
  <!-- begin CmdHeadline -->
101
120
  <CmdHeadline
102
- v-if="cmdHeadline?.headlineText && repeatHeadlineInBoxBody"
121
+ v-if="cmdHeadline?.headlineText && headlinePosition === 'body'"
103
122
  v-bind="cmdHeadline"
104
123
  />
105
124
  <!-- end CmdHeadline -->
@@ -108,17 +127,17 @@
108
127
  <p v-if="textBody" v-html="textBody"></p>
109
128
  <!-- end textBody -->
110
129
  </div>
111
-
112
- <!-- begin additionalLink in box-footer -->
113
- <div v-if="cmdLink?.linkType" class="box-footer">
114
- <CmdLink v-bind="cmdLink" />
115
- </div>
116
- <!-- end additionalLink in box-footer -->
117
130
  </div>
118
131
  <!-- end content given by properties -->
119
132
  </div>
120
133
  <!-- end box-body -->
121
134
 
135
+ <!-- begin additionalLink in box-footer -->
136
+ <div v-if="cmdLink?.linkType" class="box-footer">
137
+ <CmdLink v-bind="cmdLink" />
138
+ </div>
139
+ <!-- end additionalLink in box-footer -->
140
+
122
141
  <div v-if="useSlots?.includes('footer')" class="box-footer">
123
142
  <!-- begin slot 'footer' -->
124
143
  <slot name="footer"></slot>
@@ -307,13 +326,6 @@ export default {
307
326
  type: Boolean,
308
327
  default: true
309
328
  },
310
- /**
311
- * repeats headline (used in box-header) given by cmdHeadline-property in box-body
312
- */
313
- repeatHeadlineInBoxBody: {
314
- type: Boolean,
315
- default: false
316
- },
317
329
  /**
318
330
  * show fade-effect on last line
319
331
  *
@@ -451,6 +463,18 @@ export default {
451
463
  type: Boolean,
452
464
  default: true
453
465
  },
466
+ /**
467
+ * position of headline
468
+ *
469
+ * cmdHeadline-property must be set
470
+ */
471
+ headlinePosition: {
472
+ type: String,
473
+ default: "header",
474
+ validator(value) {
475
+ return value === "header" || value === "body"
476
+ }
477
+ },
454
478
  /**
455
479
  * properties for CmdHeadline-component
456
480
  */
@@ -464,6 +488,13 @@ export default {
464
488
  cmdLink: {
465
489
  type: Object,
466
490
  default: {}
491
+ },
492
+ /**
493
+ * properties for CmdIcon-component to set large icon in box-body
494
+ */
495
+ cmdIcon: {
496
+ type: Object,
497
+ required: false
467
498
  }
468
499
  },
469
500
  /*
@@ -564,6 +595,10 @@ export default {
564
595
  }
565
596
  }
566
597
 
598
+ > .box-body:first-child {
599
+ border-top: 0 !important;
600
+ }
601
+
567
602
  .box-body {
568
603
  .allow-scroll {
569
604
  overflow-y: auto;
@@ -624,6 +659,16 @@ export default {
624
659
  flex-grow: 1;
625
660
  }
626
661
 
662
+ .body-icon-wrapper {
663
+ display: flex;
664
+ justify-content: center;
665
+ margin-bottom: var(--default-margin);
666
+
667
+ span[class*="icon"] {
668
+ font-size: 8rem;
669
+ }
670
+ }
671
+
627
672
  p.cutoff-text {
628
673
  padding: var(--default-padding);
629
674
  margin: 0;
@@ -33,7 +33,7 @@
33
33
  <!-- end loop for formElements -->
34
34
 
35
35
  <!-- begin submit-button -->
36
- <button v-if="submitButton && submitButton.position === 'insideFieldset'" :class="['button', {primary: submitButton.primary}]" :type="submitButton.type">
36
+ <button v-if="submitButton && (submitButton.position === 'insideFieldset' || submitButton.position === null) " :class="['button', {primary: submitButton.primary}]" :type="submitButton.type">
37
37
  <span v-if="submitButton.iconClass" :class="submitButton.iconClass"></span>
38
38
  <span v-if="submitButton.text">{{ submitButton.text }}</span>
39
39
  </button>
@@ -42,7 +42,7 @@
42
42
 
43
43
  <div v-if="submitButton && submitButton.position === 'belowFieldset'" class="button-wrapper">
44
44
  <!-- begin submit-button -->
45
- <button :class="['button', {primary: submitButton.primary}]" :type="submitButton.type">
45
+ <button :class="['button', {primary: submitButton.primary}]" :type="submitButton.type || 'submit'">
46
46
  <span v-if="submitButton.iconClass" :class="submitButton.iconClass"></span>
47
47
  <span v-if="submitButton.text">{{ submitButton.text }}</span>
48
48
  </button>
@@ -61,7 +61,7 @@
61
61
  <!-- end label-text (+ required asterisk) -->
62
62
 
63
63
  <span v-if="$attrs.type !== 'checkbox' && $attrs.type !== 'radio' && $attrs.type !== 'search'"
64
- class="flex-container"><!-- container required to place inner icons correctly -->
64
+ class="flex-container inner-input-wrapper"><!-- container required to place inner icons correctly -->
65
65
  <!-- begin CmdIcon (for icon inside field) -->
66
66
  <CmdIcon v-if="fieldIconClass" class="place-inside" :iconClass="fieldIconClass"
67
67
  />
@@ -932,11 +932,17 @@ export default {
932
932
  }
933
933
 
934
934
  &.inline {
935
- & > span {
935
+ .inner-input-wrapper {
936
936
  & > a:not(.button) {
937
937
  margin-left: calc(var(--default-margin) / 2);
938
938
  }
939
939
  }
940
+
941
+ &.stretch-field {
942
+ .inner-input-wrapper {
943
+ width: 100%;
944
+ }
945
+ }
940
946
  }
941
947
 
942
948
  .search-field-wrapper {
@@ -376,7 +376,7 @@ export default {
376
376
  .cmd-thumbnail-scroller {
377
377
  display: inline-flex; /* do not set to table to avoid overflow is not hidden on small devices */
378
378
  flex-direction: column;
379
- gap: var(--default-gap);
379
+ gap: 1rem; /* should not depend on default-gap to avoid odd spacing between headline and scroller */
380
380
  width: 100%;
381
381
 
382
382
  &.full-width:not(.vertical) {
@@ -387,6 +387,10 @@ export default {
387
387
  }
388
388
  }
389
389
 
390
+ .cmd-headline {
391
+ margin: 0;
392
+ }
393
+
390
394
  .cmd-slide-button {
391
395
  top: 50% !important;
392
396
  height: auto;