comand-component-library 4.0.2 → 4.0.4
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.
- package/README.md +32 -32
- package/dist/comand-component-library.js +3315 -1486
- package/dist/comand-component-library.umd.cjs +3 -4
- package/dist/index.html +16 -16
- package/dist/style.css +1 -1
- package/dist/styles/demopage-only.css +4 -0
- package/dist/styles/templates/casual.css +3 -0
- package/package.json +4 -4
- package/src/App.vue +2117 -0
- package/src/ComponentLibrary.vue +275 -610
- package/src/assets/data/fake-select-options.json +3 -2
- package/src/assets/data/form-elements.json +1 -1
- package/src/assets/styles/{global-styles.scss → component-library-global-styles.scss} +27 -14
- package/src/componentSettingsDataAndControls.vue +705 -0
- package/src/components/CmdAddressData.vue +1 -2
- package/src/components/CmdBox.vue +106 -52
- package/src/components/CmdCopyrightInformation.vue +5 -3
- package/src/components/CmdFakeSelect.vue +149 -78
- package/src/components/CmdFancyBox.vue +2 -2
- package/src/components/CmdFormElement.vue +62 -36
- package/src/components/CmdGoogleMaps.vue +5 -0
- package/src/components/CmdHeadline.vue +13 -5
- package/src/components/CmdIcon.vue +6 -2
- package/src/components/CmdImage.vue +6 -1
- package/src/components/CmdImageGallery.vue +15 -4
- package/src/components/CmdInputGroup.vue +87 -35
- package/src/components/CmdListOfLinks.vue +20 -7
- package/src/components/CmdListOfRequirements.vue +10 -18
- package/src/components/CmdLoginForm.vue +14 -2
- package/src/components/CmdMainNavigation.vue +5 -1
- package/src/components/CmdMultistepFormProgressBar.vue +13 -8
- package/src/components/CmdNewsletterSubscription.vue +18 -1
- package/src/components/CmdOpeningHoursItem.vue +1 -3
- package/src/components/CmdPagination.vue +5 -1
- package/src/components/CmdSiteFooter.vue +12 -2
- package/src/components/CmdSiteHeader.vue +2 -1
- package/src/components/CmdSlideButton.vue +7 -1
- package/src/components/CmdSlideshow.vue +33 -5
- package/src/components/CmdSocialNetworks.vue +18 -13
- package/src/components/CmdSocialNetworksItem.vue +5 -1
- package/src/components/CmdSystemMessage.vue +7 -1
- package/src/components/CmdTabs.vue +7 -7
- package/src/components/CmdTextImageBlock.vue +11 -2
- package/src/components/CmdThumbnailScroller.vue +23 -5
- package/src/components/CmdToggleDarkMode.vue +2 -2
- package/src/components/CmdTooltip.vue +50 -15
- package/src/components/CmdTooltipForFormElements.vue +96 -0
- package/src/components/CmdUploadForm.vue +29 -24
- package/src/components/CmdWidthLimitationWrapper.vue +1 -1
- package/src/components/ComponentSettings.vue +1 -1
- package/src/components/EditComponentWrapper.vue +1 -1
- package/src/main.js +2 -2
- package/src/assets/data/accordion.json +0 -45
@@ -1,6 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<!-- begin boxType 'content' -->
|
3
3
|
<div v-if="boxType === 'content'"
|
4
|
+
ref="cmdBox"
|
4
5
|
:class="[
|
5
6
|
'cmd-box box content',
|
6
7
|
{
|
@@ -57,7 +58,11 @@
|
|
57
58
|
|
58
59
|
<!-- begin box-body -->
|
59
60
|
<div v-show="open" :class="['box-body', boxBodyClass]" aria-expanded="true" role="article">
|
60
|
-
<div v-if="useSlots?.includes('body')"
|
61
|
+
<div v-if="useSlots?.includes('body')"
|
62
|
+
:class="{'default-padding': useDefaultPadding, 'allow-scroll': allowContentToScroll}"
|
63
|
+
ref="boxBody"
|
64
|
+
:style="'max-height: ' + calculatedBodyHeight"
|
65
|
+
>
|
61
66
|
<!-- begin slot 'body' -->
|
62
67
|
<slot name="body">
|
63
68
|
<transition-group :name="toggleTransition">
|
@@ -69,7 +74,9 @@
|
|
69
74
|
{{ textBody }}
|
70
75
|
</p>
|
71
76
|
<a v-if="cutoffTextLines > 0" href="#" @click.prevent="toggleCutOffText">
|
72
|
-
{{
|
77
|
+
{{
|
78
|
+
showCutOffText ? getMessage("cmdbox.contentbox.collapse_text") : getMessage("cmdbox.contentbox.expand_text")
|
79
|
+
}}
|
73
80
|
</a>
|
74
81
|
</transition-group>
|
75
82
|
</slot>
|
@@ -122,13 +129,17 @@
|
|
122
129
|
</div>
|
123
130
|
<!-- end ribbons -->
|
124
131
|
</div>
|
132
|
+
<!-- begin box-body -->
|
125
133
|
<div class="box-body">
|
126
|
-
<p v-if="product.articleNumber">{{ getMessage("cmdbox.productbox.article_no") }} {{
|
134
|
+
<p v-if="product.articleNumber">{{ getMessage("cmdbox.productbox.article_no") }} {{
|
135
|
+
product.articleNumber
|
136
|
+
}}</p>
|
127
137
|
<p v-if="product.price" class="price">
|
128
138
|
<span>{{ product.price }}</span><span :title="globalCurrency.name">{{ globalCurrency.symbol }}</span>
|
129
139
|
</p>
|
130
140
|
<p v-if="product.description">{{ product.description }}</p>
|
131
141
|
</div>
|
142
|
+
<!-- end box-body -->
|
132
143
|
</a>
|
133
144
|
<!-- end boxType 'product' -->
|
134
145
|
|
@@ -143,30 +154,41 @@
|
|
143
154
|
'row-view': rowView
|
144
155
|
}
|
145
156
|
]">
|
157
|
+
<!-- begin box-header -->
|
146
158
|
<div class="box-header flex-container vertical">
|
147
159
|
<figure v-if="user.image">
|
148
160
|
<img :src="user.image.src" :alt="user.image.alt"/>
|
149
|
-
<figcaption>{{ user.name }} <span v-if="user.age">, {{user.age}}</span></figcaption>
|
161
|
+
<figcaption>{{ user.name }} <span v-if="user.age">, {{ user.age }}</span></figcaption>
|
150
162
|
</figure>
|
151
163
|
<div v-else>
|
152
164
|
<span :class="defaultProfileIconClass" :title="user.name"></span>
|
153
165
|
<p v-if="!rowView">{{ user.name }}</p>
|
154
166
|
</div>
|
155
167
|
</div>
|
168
|
+
<!-- end box-header -->
|
169
|
+
|
170
|
+
<!-- begin box-body -->
|
156
171
|
<div class="box-body">
|
157
172
|
<p v-if="rowView">{{ user.name }}</p>
|
158
173
|
<p v-if="user.profession">{{ user.profession }}</p>
|
159
174
|
<p v-if="user.position">{{ user.position }}</p>
|
160
175
|
<p v-if="user.description" class="description">{{ user.description }}</p>
|
161
176
|
</div>
|
162
|
-
|
177
|
+
<!-- end box-body -->
|
178
|
+
|
179
|
+
<!-- begin user-tags -->
|
180
|
+
<ul v-if="user.tags && user.tags.length" class="tags">
|
163
181
|
<li v-for="(tag, index) in user.tags" :key="index">
|
164
|
-
{{tag}}
|
182
|
+
{{ tag }}
|
165
183
|
</li>
|
166
184
|
</ul>
|
167
|
-
|
185
|
+
<!-- end user-tags -->
|
186
|
+
|
187
|
+
<!-- begin box-footer -->
|
188
|
+
<div v-if="user.links && user.links.length" class="box-footer">
|
168
189
|
<CmdListOfLinks :links="user.links" orientation="horizontal" :useGap="false"/>
|
169
190
|
</div>
|
191
|
+
<!-- end box-footer -->
|
170
192
|
</div>
|
171
193
|
<!-- end boxType 'user' -->
|
172
194
|
</template>
|
@@ -189,7 +211,8 @@ export default {
|
|
189
211
|
return {
|
190
212
|
open: this.collapsible ? this.openCollapsedBox : true,
|
191
213
|
active: true,
|
192
|
-
showCutOffText: false
|
214
|
+
showCutOffText: false,
|
215
|
+
calculatedBodyHeight: this.maxBoxBodyHeight
|
193
216
|
}
|
194
217
|
},
|
195
218
|
props: {
|
@@ -217,7 +240,12 @@ export default {
|
|
217
240
|
*/
|
218
241
|
boxType: {
|
219
242
|
type: String,
|
220
|
-
default: "content"
|
243
|
+
default: "content",
|
244
|
+
validator(value) {
|
245
|
+
return value === "content" ||
|
246
|
+
value === "product" ||
|
247
|
+
value === "user"
|
248
|
+
}
|
221
249
|
},
|
222
250
|
/**
|
223
251
|
* set if content (in box-body) should scroll
|
@@ -232,8 +260,8 @@ export default {
|
|
232
260
|
* set max-height for body (should only be used it allowContentToScroll-property is active)
|
233
261
|
*/
|
234
262
|
maxBoxBodyHeight: {
|
235
|
-
|
236
|
-
|
263
|
+
type: String,
|
264
|
+
default: "100rem"
|
237
265
|
},
|
238
266
|
/**
|
239
267
|
* activate if box should be collapsible
|
@@ -324,7 +352,12 @@ export default {
|
|
324
352
|
*/
|
325
353
|
profileType: {
|
326
354
|
type: String,
|
327
|
-
default: "business"
|
355
|
+
default: "business",
|
356
|
+
validator(value) {
|
357
|
+
return value === "business" ||
|
358
|
+
value === "influencer" ||
|
359
|
+
value === "dating"
|
360
|
+
}
|
328
361
|
},
|
329
362
|
/**
|
330
363
|
* activated if all content (incl. headline) is given by slot
|
@@ -405,13 +438,13 @@ export default {
|
|
405
438
|
required: false
|
406
439
|
}
|
407
440
|
},
|
441
|
+
mounted() {
|
442
|
+
if (this.allowContentToScroll && this.$refs.boxBody) {
|
443
|
+
const topPosition = this.$refs.boxBody.getBoundingClientRect().top
|
444
|
+
this.calculatedBodyHeight = (document.documentElement.clientHeight - topPosition) + "px"
|
445
|
+
}
|
446
|
+
},
|
408
447
|
computed: {
|
409
|
-
setMaxBoxBodyHeight() {
|
410
|
-
if (this.allowContentToScroll && this.maxBoxBodyHeight) {
|
411
|
-
return this.maxBoxBodyHeight
|
412
|
-
}
|
413
|
-
return null
|
414
|
-
},
|
415
448
|
toggleTransition() {
|
416
449
|
if (this.useTransition) {
|
417
450
|
return "fade"
|
@@ -435,6 +468,18 @@ export default {
|
|
435
468
|
// for boxType === product
|
436
469
|
clickOnProduct(product) {
|
437
470
|
this.$emit('click', product)
|
471
|
+
},
|
472
|
+
// set focus on first input if box contains form-elements
|
473
|
+
setFocus() {
|
474
|
+
this.$nextTick(() => {
|
475
|
+
if(this.open) {
|
476
|
+
const firstFormElement = this.$refs.cmdBox.querySelector(":is(input, select, textarea):first-of-type")
|
477
|
+
|
478
|
+
if(firstFormElement) {
|
479
|
+
firstFormElement.focus()
|
480
|
+
}
|
481
|
+
}
|
482
|
+
})
|
438
483
|
}
|
439
484
|
},
|
440
485
|
watch: {
|
@@ -442,7 +487,11 @@ export default {
|
|
442
487
|
// toggle collapse-status of all boxes if changed in outer component
|
443
488
|
if (this.collapsible) {
|
444
489
|
this.open = this.openCollapsedBox
|
490
|
+
this.setFocus()
|
445
491
|
}
|
492
|
+
},
|
493
|
+
open() {
|
494
|
+
this.setFocus()
|
446
495
|
}
|
447
496
|
}
|
448
497
|
}
|
@@ -473,7 +522,8 @@ export default {
|
|
473
522
|
&.collapsible {
|
474
523
|
a.box-header {
|
475
524
|
justify-content: space-between;
|
476
|
-
background: var(--
|
525
|
+
background: var(--box-header-background);
|
526
|
+
border-radius: var(--box-border-radius);
|
477
527
|
|
478
528
|
&:hover, &:active, &:focus {
|
479
529
|
background: var(--pure-white);
|
@@ -488,7 +538,10 @@ export default {
|
|
488
538
|
.box-body {
|
489
539
|
.allow-scroll {
|
490
540
|
overflow-y: auto;
|
491
|
-
|
541
|
+
|
542
|
+
& * {
|
543
|
+
flex-shrink: 0;
|
544
|
+
}
|
492
545
|
}
|
493
546
|
}
|
494
547
|
|
@@ -505,15 +558,14 @@ export default {
|
|
505
558
|
border-bottom-left-radius: 0;
|
506
559
|
border-bottom-right-radius: 0;
|
507
560
|
}
|
561
|
+
|
562
|
+
fieldset {
|
563
|
+
border: 0;
|
564
|
+
padding: var(--default-padding);
|
565
|
+
}
|
508
566
|
}
|
509
567
|
|
510
568
|
> .box-header {
|
511
|
-
display: flex;
|
512
|
-
align-items: center;
|
513
|
-
border-radius: var(--border-radius);
|
514
|
-
padding: calc(var(--default-padding) / 2) var(--default-padding);
|
515
|
-
background: var(--secondary-color);
|
516
|
-
color: var(--pure-white);
|
517
569
|
text-decoration: none;
|
518
570
|
|
519
571
|
> .cmd-custom-headline {
|
@@ -536,7 +588,7 @@ export default {
|
|
536
588
|
|
537
589
|
.box-body {
|
538
590
|
flex-grow: 1;
|
539
|
-
border-top: var(--
|
591
|
+
border-top: var(--box-border);
|
540
592
|
|
541
593
|
p.cutoff-text {
|
542
594
|
padding: var(--default-padding);
|
@@ -551,7 +603,7 @@ export default {
|
|
551
603
|
left: 0;
|
552
604
|
bottom: 0;
|
553
605
|
height: calc(var(--line-of-text-height) * 3);
|
554
|
-
background: linear-gradient(to bottom, transparent 0%, var(--default-background
|
606
|
+
background: linear-gradient(to bottom, transparent 0%, var(--default-background) 100%);
|
555
607
|
}
|
556
608
|
|
557
609
|
&.show-text {
|
@@ -559,7 +611,7 @@ export default {
|
|
559
611
|
}
|
560
612
|
|
561
613
|
& + a {
|
562
|
-
border-top: var(--
|
614
|
+
border-top: var(--box-border);
|
563
615
|
display: block;
|
564
616
|
padding: var(--default-padding);
|
565
617
|
margin: 0;
|
@@ -583,7 +635,7 @@ export default {
|
|
583
635
|
display: block;
|
584
636
|
padding: var(--default-padding);
|
585
637
|
text-decoration: none;
|
586
|
-
border-bottom: var(--
|
638
|
+
border-bottom: var(--box-border);
|
587
639
|
|
588
640
|
&:hover, &:active, &:focus {
|
589
641
|
background: var(--primary-color);
|
@@ -599,13 +651,6 @@ export default {
|
|
599
651
|
}
|
600
652
|
}
|
601
653
|
}
|
602
|
-
|
603
|
-
.box-footer {
|
604
|
-
border-bottom-left-radius: var(--border-radius);
|
605
|
-
border-bottom-right-radius: var(--border-radius);
|
606
|
-
padding: var(--default-padding);
|
607
|
-
border-top: var(--default-border);
|
608
|
-
}
|
609
654
|
}
|
610
655
|
|
611
656
|
/* boyType === 'product' and boxType === 'user' */
|
@@ -660,6 +705,8 @@ export default {
|
|
660
705
|
}
|
661
706
|
|
662
707
|
> .box-header {
|
708
|
+
padding: 0;
|
709
|
+
|
663
710
|
> img, > div {
|
664
711
|
display: table;
|
665
712
|
margin: 0 auto;
|
@@ -674,12 +721,14 @@ export default {
|
|
674
721
|
figcaption {
|
675
722
|
font-size: 2rem;
|
676
723
|
font-weight: bold;
|
677
|
-
padding
|
724
|
+
padding: var(--default-padding);
|
678
725
|
}
|
679
726
|
}
|
680
727
|
|
681
728
|
.box-body {
|
682
729
|
flex-grow: 1;
|
730
|
+
padding: var(--default-padding);
|
731
|
+
padding-bottom: 0;
|
683
732
|
|
684
733
|
> * {
|
685
734
|
text-align: center;
|
@@ -703,15 +752,13 @@ export default {
|
|
703
752
|
/* boxType === 'user' */
|
704
753
|
&.user {
|
705
754
|
> .box-header {
|
706
|
-
--icon-size: 6rem;
|
755
|
+
--default-icon-size: 6rem;
|
756
|
+
--box-header-text-color: var(--primary-color);
|
707
757
|
|
708
|
-
|
758
|
+
background: none;
|
709
759
|
|
710
|
-
|
711
|
-
|
712
|
-
display: block;
|
713
|
-
text-align: center;
|
714
|
-
}
|
760
|
+
> div:first-child > [class*="icon-"] {
|
761
|
+
aspect-ratio: 1/1;
|
715
762
|
}
|
716
763
|
|
717
764
|
img, > div:first-child > [class*="icon-"] {
|
@@ -719,7 +766,7 @@ export default {
|
|
719
766
|
margin: 0 auto var(--default-margin) auto;
|
720
767
|
padding: calc(var(--default-padding) * 3);
|
721
768
|
border-radius: var(--full-circle);
|
722
|
-
background: var(--
|
769
|
+
background: var(--box-header-background);
|
723
770
|
color: var(--pure-white);
|
724
771
|
|
725
772
|
& + p, & + figcaption {
|
@@ -732,17 +779,20 @@ export default {
|
|
732
779
|
|
733
780
|
img {
|
734
781
|
padding: 0;
|
735
|
-
width: calc(var(--icon-size) * 2);
|
782
|
+
width: calc(var(--default-icon-size) * 2);
|
736
783
|
aspect-ratio: 1/1;
|
737
784
|
}
|
738
785
|
|
739
786
|
> div:first-child > [class*="icon-"] {
|
740
|
-
|
787
|
+
margin: 0;
|
788
|
+
font-size: var(--default-icon-size);
|
741
789
|
}
|
742
790
|
}
|
743
791
|
|
744
792
|
.box-body {
|
745
793
|
flex-grow: 1;
|
794
|
+
padding: var(--default-padding);
|
795
|
+
padding-top: 0;
|
746
796
|
|
747
797
|
p {
|
748
798
|
text-align: center;
|
@@ -760,7 +810,8 @@ export default {
|
|
760
810
|
|
761
811
|
.box-footer {
|
762
812
|
margin-top: auto;
|
763
|
-
|
813
|
+
padding: 0;
|
814
|
+
border-top: var(--box-border);
|
764
815
|
|
765
816
|
.cmd-list-of-links {
|
766
817
|
ul {
|
@@ -769,13 +820,15 @@ export default {
|
|
769
820
|
|
770
821
|
li {
|
771
822
|
flex: 1;
|
823
|
+
border-radius: var(--box-border-radius);
|
772
824
|
|
773
825
|
a {
|
774
826
|
flex: 1;
|
775
827
|
padding: var(--default-padding);
|
776
828
|
text-align: center;
|
777
|
-
background: var(--color-scheme-background
|
778
|
-
border-left: var(--
|
829
|
+
background: var(--color-scheme-background);
|
830
|
+
border-left: var(--box-border);
|
831
|
+
border-radius: var(--box-border-radius);
|
779
832
|
}
|
780
833
|
|
781
834
|
&:hover, &:active, &:focus {
|
@@ -801,7 +854,7 @@ export default {
|
|
801
854
|
|
802
855
|
&.row-view {
|
803
856
|
[class*="icon"] {
|
804
|
-
--icon-size: 3rem;
|
857
|
+
--default-icon-size: 3rem;
|
805
858
|
}
|
806
859
|
|
807
860
|
.box-header > div:first-child > [class*="icon-"] {
|
@@ -814,6 +867,7 @@ export default {
|
|
814
867
|
|
815
868
|
.box-footer {
|
816
869
|
border: 0;
|
870
|
+
background: none;
|
817
871
|
|
818
872
|
.cmd-list-of-links {
|
819
873
|
background: none;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="cmd-copyright-information" role="contentinfo">
|
3
|
-
<a href="http://www.comand-cms.com" target="
|
3
|
+
<a href="http://www.comand-cms.com" target="comand-website" lang="en" title="CoManD-Website">© CoManD</a>
|
4
4
|
</div>
|
5
5
|
</template>
|
6
6
|
|
@@ -13,10 +13,12 @@ export default {
|
|
13
13
|
<style>
|
14
14
|
/* begin cmd-copyright-information ---------------------------------------------------------------------------------------- */
|
15
15
|
.cmd-copyright-information {
|
16
|
-
background: var(--text-color);
|
17
|
-
border-top: var(--border-width) var(--border-style) var(--pure-white);
|
16
|
+
background: var(--default-text-color);
|
17
|
+
border-top: var(--default-border-width) var(--default-border-style) var(--pure-white);
|
18
18
|
text-align: center;
|
19
19
|
padding: var(--default-padding);
|
20
|
+
margin-top: auto;
|
21
|
+
flex: none;
|
20
22
|
|
21
23
|
a {
|
22
24
|
text-decoration: none;
|