comand-component-library 4.0.3 → 4.0.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/comand-component-library.js +83 -67
- package/dist/comand-component-library.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/ComponentLibrary.vue +239 -138
- package/src/assets/styles/{global-styles.scss → component-library-global-styles.scss} +10 -10
- package/src/components/CmdBox.vue +50 -14
- package/src/components/CmdFakeSelect.vue +16 -16
- package/src/components/CmdFormElement.vue +13 -13
- package/src/components/CmdHeadline.vue +1 -1
- package/src/components/CmdInputGroup.vue +35 -29
- package/src/components/CmdMultistepFormProgressBar.vue +1 -1
- package/src/components/CmdNewsletterSubscription.vue +18 -1
- package/src/components/CmdSiteFooter.vue +1 -1
- package/src/components/CmdSiteHeader.vue +1 -1
- package/src/components/CmdTabs.vue +2 -2
- package/src/components/CmdThumbnailScroller.vue +1 -1
- package/src/components/CmdToggleDarkMode.vue +2 -2
- package/src/components/CmdTooltip.vue +1 -1
- package/src/components/CmdUploadForm.vue +5 -5
- package/src/components/EditComponentWrapper.vue +1 -1
- package/src/main.js +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
/* global-styles.scss - last update: 2022/06/11 - IT IS NOT RECOMMENDED TO EDIT THIS FILE (TO AVOID TROUBLESHOOTING AFTER UPDATING) - DO CHANGES IN template.css ONLY */
|
1
|
+
/* component-library-global-styles.scss - last update: 2022/06/11 - IT IS NOT RECOMMENDED TO EDIT THIS FILE (TO AVOID TROUBLESHOOTING AFTER UPDATING) - DO CHANGES IN template.css ONLY */
|
2
2
|
|
3
3
|
/* begin table of contents --------------------------------------------------------------------------------------------------------------------------------------------------- */
|
4
4
|
/*
|
@@ -143,7 +143,7 @@ body.avoid-scrolling {
|
|
143
143
|
|
144
144
|
&:hover, &:active, &:focus {
|
145
145
|
border-color: var(--primary-color);
|
146
|
-
background: var(--default-background
|
146
|
+
background: var(--default-background);
|
147
147
|
}
|
148
148
|
}
|
149
149
|
|
@@ -304,26 +304,26 @@ html {
|
|
304
304
|
&.light-mode {
|
305
305
|
/* assign default colors for custom light-mode set by class */
|
306
306
|
--color-scheme-text-color: var(--light-mode-text-color);
|
307
|
-
--color-scheme-text-color-buttons: var(--light-mode-text-color-buttons);
|
308
|
-
--color-scheme-background-color: var(--light-mode-background-color);
|
309
307
|
--color-scheme-text-color-inverted: var(--dark-mode-text-color);
|
310
|
-
--color-scheme-
|
308
|
+
--color-scheme-text-color-buttons: var(--light-mode-text-color-buttons);
|
309
|
+
--color-scheme-background: var(--light-mode-background);
|
310
|
+
--color-scheme-background-inverted: var(--dark-mode-background);
|
311
311
|
--default-background-color-lightness: 97%;
|
312
312
|
}
|
313
313
|
|
314
314
|
--color-scheme-text-color-buttons: var(--dark-mode-text-color-buttons);
|
315
315
|
--color-scheme-text-color-inverted: var(--light-mode-text-color);
|
316
|
-
--color-scheme-background: var(--dark-mode-background
|
317
|
-
--color-scheme-background-inverted: var(--light-mode-background
|
316
|
+
--color-scheme-background: var(--dark-mode-background);
|
317
|
+
--color-scheme-background-inverted: var(--light-mode-background);
|
318
318
|
--default-background-color-lightness: 20%;
|
319
319
|
|
320
320
|
&.dark-mode {
|
321
321
|
/* assign default colors for custom dark-mode set by class */
|
322
322
|
--color-scheme-text-color: var(--dark-mode-text-color);
|
323
|
-
--color-scheme-text-color-buttons: var(--dark-mode-text-color-buttons);
|
324
|
-
--color-scheme-background-color: var(--dark-mode-background-color);
|
325
323
|
--color-scheme-text-color-inverted: var(--light-mode-text-color);
|
326
|
-
--color-scheme-
|
324
|
+
--color-scheme-text-color-buttons: var(--dark-mode-text-color-buttons);
|
325
|
+
--color-scheme-background: var(--dark-mode-background);
|
326
|
+
--color-scheme-background-inverted: var(--light-mode-background);
|
327
327
|
--default-background-color-lightness: 20%;
|
328
328
|
--hyperlink-color-lightness: 40%; /* hyperlink-color-lightness */
|
329
329
|
--hyperlink-color-highlighted-lightness: 50%; /* hyperlink-color-highlighted-lightness (used for highlighted hyperlinks) */
|
@@ -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
|
{
|
@@ -128,6 +129,7 @@
|
|
128
129
|
</div>
|
129
130
|
<!-- end ribbons -->
|
130
131
|
</div>
|
132
|
+
<!-- begin box-body -->
|
131
133
|
<div class="box-body">
|
132
134
|
<p v-if="product.articleNumber">{{ getMessage("cmdbox.productbox.article_no") }} {{
|
133
135
|
product.articleNumber
|
@@ -137,6 +139,7 @@
|
|
137
139
|
</p>
|
138
140
|
<p v-if="product.description">{{ product.description }}</p>
|
139
141
|
</div>
|
142
|
+
<!-- end box-body -->
|
140
143
|
</a>
|
141
144
|
<!-- end boxType 'product' -->
|
142
145
|
|
@@ -151,6 +154,7 @@
|
|
151
154
|
'row-view': rowView
|
152
155
|
}
|
153
156
|
]">
|
157
|
+
<!-- begin box-header -->
|
154
158
|
<div class="box-header flex-container vertical">
|
155
159
|
<figure v-if="user.image">
|
156
160
|
<img :src="user.image.src" :alt="user.image.alt"/>
|
@@ -161,20 +165,30 @@
|
|
161
165
|
<p v-if="!rowView">{{ user.name }}</p>
|
162
166
|
</div>
|
163
167
|
</div>
|
168
|
+
<!-- end box-header -->
|
169
|
+
|
170
|
+
<!-- begin box-body -->
|
164
171
|
<div class="box-body">
|
165
172
|
<p v-if="rowView">{{ user.name }}</p>
|
166
173
|
<p v-if="user.profession">{{ user.profession }}</p>
|
167
174
|
<p v-if="user.position">{{ user.position }}</p>
|
168
175
|
<p v-if="user.description" class="description">{{ user.description }}</p>
|
169
176
|
</div>
|
170
|
-
|
177
|
+
<!-- end box-body -->
|
178
|
+
|
179
|
+
<!-- begin user-tags -->
|
180
|
+
<ul v-if="user.tags && user.tags.length" class="tags">
|
171
181
|
<li v-for="(tag, index) in user.tags" :key="index">
|
172
182
|
{{ tag }}
|
173
183
|
</li>
|
174
184
|
</ul>
|
175
|
-
|
185
|
+
<!-- end user-tags -->
|
186
|
+
|
187
|
+
<!-- begin box-footer -->
|
188
|
+
<div v-if="user.links && user.links.length" class="box-footer">
|
176
189
|
<CmdListOfLinks :links="user.links" orientation="horizontal" :useGap="false"/>
|
177
190
|
</div>
|
191
|
+
<!-- end box-footer -->
|
178
192
|
</div>
|
179
193
|
<!-- end boxType 'user' -->
|
180
194
|
</template>
|
@@ -454,6 +468,18 @@ export default {
|
|
454
468
|
// for boxType === product
|
455
469
|
clickOnProduct(product) {
|
456
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
|
+
})
|
457
483
|
}
|
458
484
|
},
|
459
485
|
watch: {
|
@@ -461,7 +487,11 @@ export default {
|
|
461
487
|
// toggle collapse-status of all boxes if changed in outer component
|
462
488
|
if (this.collapsible) {
|
463
489
|
this.open = this.openCollapsedBox
|
490
|
+
this.setFocus()
|
464
491
|
}
|
492
|
+
},
|
493
|
+
open() {
|
494
|
+
this.setFocus()
|
465
495
|
}
|
466
496
|
}
|
467
497
|
}
|
@@ -492,8 +522,8 @@ export default {
|
|
492
522
|
&.collapsible {
|
493
523
|
a.box-header {
|
494
524
|
justify-content: space-between;
|
495
|
-
background: var(--
|
496
|
-
border-radius: var(--
|
525
|
+
background: var(--box-header-background);
|
526
|
+
border-radius: var(--box-border-radius);
|
497
527
|
|
498
528
|
&:hover, &:active, &:focus {
|
499
529
|
background: var(--pure-white);
|
@@ -528,6 +558,11 @@ export default {
|
|
528
558
|
border-bottom-left-radius: 0;
|
529
559
|
border-bottom-right-radius: 0;
|
530
560
|
}
|
561
|
+
|
562
|
+
fieldset {
|
563
|
+
border: 0;
|
564
|
+
padding: var(--default-padding);
|
565
|
+
}
|
531
566
|
}
|
532
567
|
|
533
568
|
> .box-header {
|
@@ -553,7 +588,7 @@ export default {
|
|
553
588
|
|
554
589
|
.box-body {
|
555
590
|
flex-grow: 1;
|
556
|
-
border-top: var(--
|
591
|
+
border-top: var(--box-border);
|
557
592
|
|
558
593
|
p.cutoff-text {
|
559
594
|
padding: var(--default-padding);
|
@@ -568,7 +603,7 @@ export default {
|
|
568
603
|
left: 0;
|
569
604
|
bottom: 0;
|
570
605
|
height: calc(var(--line-of-text-height) * 3);
|
571
|
-
background: linear-gradient(to bottom, transparent 0%, var(--default-background
|
606
|
+
background: linear-gradient(to bottom, transparent 0%, var(--default-background) 100%);
|
572
607
|
}
|
573
608
|
|
574
609
|
&.show-text {
|
@@ -576,7 +611,7 @@ export default {
|
|
576
611
|
}
|
577
612
|
|
578
613
|
& + a {
|
579
|
-
border-top: var(--
|
614
|
+
border-top: var(--box-border);
|
580
615
|
display: block;
|
581
616
|
padding: var(--default-padding);
|
582
617
|
margin: 0;
|
@@ -600,7 +635,7 @@ export default {
|
|
600
635
|
display: block;
|
601
636
|
padding: var(--default-padding);
|
602
637
|
text-decoration: none;
|
603
|
-
border-bottom: var(--
|
638
|
+
border-bottom: var(--box-border);
|
604
639
|
|
605
640
|
&:hover, &:active, &:focus {
|
606
641
|
background: var(--primary-color);
|
@@ -731,7 +766,7 @@ export default {
|
|
731
766
|
margin: 0 auto var(--default-margin) auto;
|
732
767
|
padding: calc(var(--default-padding) * 3);
|
733
768
|
border-radius: var(--full-circle);
|
734
|
-
background: var(--box-header-background
|
769
|
+
background: var(--box-header-background);
|
735
770
|
color: var(--pure-white);
|
736
771
|
|
737
772
|
& + p, & + figcaption {
|
@@ -776,7 +811,7 @@ export default {
|
|
776
811
|
.box-footer {
|
777
812
|
margin-top: auto;
|
778
813
|
padding: 0;
|
779
|
-
border-top: var(--
|
814
|
+
border-top: var(--box-border);
|
780
815
|
|
781
816
|
.cmd-list-of-links {
|
782
817
|
ul {
|
@@ -785,15 +820,15 @@ export default {
|
|
785
820
|
|
786
821
|
li {
|
787
822
|
flex: 1;
|
788
|
-
border-radius: var(--
|
823
|
+
border-radius: var(--box-border-radius);
|
789
824
|
|
790
825
|
a {
|
791
826
|
flex: 1;
|
792
827
|
padding: var(--default-padding);
|
793
828
|
text-align: center;
|
794
|
-
background: var(--color-scheme-background
|
795
|
-
border-left: var(--
|
796
|
-
border-radius: var(--
|
829
|
+
background: var(--color-scheme-background);
|
830
|
+
border-left: var(--box-border);
|
831
|
+
border-radius: var(--box-border-radius);
|
797
832
|
}
|
798
833
|
|
799
834
|
&:hover, &:active, &:focus {
|
@@ -832,6 +867,7 @@ export default {
|
|
832
867
|
|
833
868
|
.box-footer {
|
834
869
|
border: 0;
|
870
|
+
background: none;
|
835
871
|
|
836
872
|
.cmd-list-of-links {
|
837
873
|
background: none;
|
@@ -20,18 +20,6 @@
|
|
20
20
|
<span class="label-text">
|
21
21
|
<span :id="htmlId">{{ labelText }}<sup v-if="$attrs.required !== undefined">*</sup></span>
|
22
22
|
|
23
|
-
<!-- begin CmdTooltipForFormElements -->
|
24
|
-
<CmdTooltipForFormElements
|
25
|
-
v-if="useCustomTooltip && (validationStatus === '' || validationStatus === 'error')"
|
26
|
-
ref="tooltip"
|
27
|
-
:validationStatus="validationStatus"
|
28
|
-
:validationMessage="getValidationMessage"
|
29
|
-
:relatedId="tooltipId"
|
30
|
-
:cmdListOfRequirements="listOfRequirements"
|
31
|
-
:role="validationStatus === 'error' ? 'alert' : 'dialog'"
|
32
|
-
/>
|
33
|
-
<!-- end CmdTooltipForFormElements -->
|
34
|
-
|
35
23
|
<a v-if="($attrs.required || inputRequirements.length) && showStatusIcon"
|
36
24
|
href="#"
|
37
25
|
@click.prevent
|
@@ -43,6 +31,18 @@
|
|
43
31
|
<CmdIcon :iconClass="getStatusIconClass"/>
|
44
32
|
<!-- end CmdIcon -->
|
45
33
|
</a>
|
34
|
+
|
35
|
+
<!-- begin CmdTooltipForFormElements -->
|
36
|
+
<CmdTooltipForFormElements
|
37
|
+
v-if="useCustomTooltip && (validationStatus === '' || validationStatus === 'error')"
|
38
|
+
ref="tooltip"
|
39
|
+
:validationStatus="validationStatus"
|
40
|
+
:validationMessage="getValidationMessage"
|
41
|
+
:relatedId="tooltipId"
|
42
|
+
:cmdListOfRequirements="listOfRequirements"
|
43
|
+
:role="validationStatus === 'error' ? 'alert' : 'dialog'"
|
44
|
+
/>
|
45
|
+
<!-- end CmdTooltipForFormElements -->
|
46
46
|
</span>
|
47
47
|
<!-- end label -->
|
48
48
|
</template>
|
@@ -562,7 +562,7 @@ export default {
|
|
562
562
|
> a {
|
563
563
|
height: inherit;
|
564
564
|
border: var(--default-border);
|
565
|
-
background: var(--color-scheme-background
|
565
|
+
background: var(--color-scheme-background);
|
566
566
|
color: var(--color-scheme-text-color);
|
567
567
|
border-radius: var(--default-border-radius);
|
568
568
|
|
@@ -687,7 +687,7 @@ export default {
|
|
687
687
|
margin: 0;
|
688
688
|
border-bottom-right-radius: var(--default-border-radius);
|
689
689
|
border-bottom-left-radius: var(--default-border-radius);
|
690
|
-
background: var(--color-scheme-background
|
690
|
+
background: var(--color-scheme-background);
|
691
691
|
border: var(--primary-border);
|
692
692
|
|
693
693
|
li {
|
@@ -745,7 +745,7 @@ export default {
|
|
745
745
|
}
|
746
746
|
|
747
747
|
&:hover, &:active, &:focus {
|
748
|
-
background: var(--color-scheme-background
|
748
|
+
background: var(--color-scheme-background);
|
749
749
|
|
750
750
|
span {
|
751
751
|
color: var(--status-color);
|
@@ -792,7 +792,7 @@ export default {
|
|
792
792
|
@mixin disabled-styles {
|
793
793
|
color: var(--disabled-color);
|
794
794
|
border-color: var(--disabled-color);
|
795
|
-
background: var(--disabled-background
|
795
|
+
background: var(--disabled-background);
|
796
796
|
}
|
797
797
|
|
798
798
|
.cmd-fake-select {
|
@@ -28,17 +28,6 @@
|
|
28
28
|
<sup v-if="$attrs.required" aria-hidden="true">*</sup>
|
29
29
|
</span>
|
30
30
|
|
31
|
-
<!-- begin CmdTooltipForFormElements -->
|
32
|
-
<CmdTooltipForFormElements
|
33
|
-
v-if="useCustomTooltip && (validationStatus === '' || validationStatus === 'error')"
|
34
|
-
ref="tooltip"
|
35
|
-
:validationStatus="validationStatus"
|
36
|
-
:relatedId="tooltipId"
|
37
|
-
:cmdListOfRequirements="listOfRequirements"
|
38
|
-
:role="validationStatus === 'error' ? 'alert' : 'dialog'"
|
39
|
-
/>
|
40
|
-
<!-- end CmdTooltipForFormElements -->
|
41
|
-
|
42
31
|
<a v-if="($attrs.required || inputRequirements.length) && showStatusIcon"
|
43
32
|
href="#"
|
44
33
|
@click.prevent
|
@@ -50,6 +39,17 @@
|
|
50
39
|
<CmdIcon :iconClass="getStatusIconClass"/>
|
51
40
|
<!-- end CmdIcon -->
|
52
41
|
</a>
|
42
|
+
|
43
|
+
<!-- begin CmdTooltipForFormElements -->
|
44
|
+
<CmdTooltipForFormElements
|
45
|
+
v-if="useCustomTooltip && (validationStatus === '' || validationStatus === 'error')"
|
46
|
+
ref="tooltip"
|
47
|
+
:validationStatus="validationStatus"
|
48
|
+
:relatedId="tooltipId"
|
49
|
+
:cmdListOfRequirements="listOfRequirements"
|
50
|
+
:role="validationStatus === 'error' ? 'alert' : 'dialog'"
|
51
|
+
/>
|
52
|
+
<!-- end CmdTooltipForFormElements -->
|
53
53
|
</span>
|
54
54
|
<!-- end label-text (+ required asterisk) -->
|
55
55
|
|
@@ -878,7 +878,7 @@ export default {
|
|
878
878
|
* {
|
879
879
|
--status-color: var(--error-color);
|
880
880
|
}
|
881
|
-
|
881
|
+
|
882
882
|
::placeholder {
|
883
883
|
color: var(--status-color);
|
884
884
|
}
|
@@ -927,7 +927,7 @@ export default {
|
|
927
927
|
/* set styles to avoid overwriting by has-state-colors */
|
928
928
|
&.button {
|
929
929
|
span {
|
930
|
-
color: var(--color-scheme-background
|
930
|
+
color: var(--color-scheme-background);
|
931
931
|
}
|
932
932
|
|
933
933
|
&:hover, &:active, &:focus {
|
@@ -21,7 +21,7 @@
|
|
21
21
|
</span>
|
22
22
|
</component>
|
23
23
|
</template>
|
24
|
-
<component :is="headlineTag">
|
24
|
+
<component v-else :is="headlineTag">
|
25
25
|
<!-- begin CmdIcon -->
|
26
26
|
<CmdIcon v-if="headlineIcon" :iconClass="headlineIcon?.iconClass" :type="headlineIcon?.iconType"/>
|
27
27
|
<!-- end CmdIcon -->
|
@@ -6,7 +6,7 @@
|
|
6
6
|
inline: labelInline,
|
7
7
|
'multiple-switch': multipleSwitch,
|
8
8
|
disabled: disabled,
|
9
|
-
'toggle-
|
9
|
+
'toggle-switches': toggleSwitches,
|
10
10
|
'has-state': validationStatus
|
11
11
|
}
|
12
12
|
]"
|
@@ -16,6 +16,20 @@
|
|
16
16
|
<span v-show="showLabel" class="label-text">
|
17
17
|
<span :id="htmlId">{{ labelText }}<sup v-if="required">*</sup></span>
|
18
18
|
|
19
|
+
<!-- begin status-icon -->
|
20
|
+
<a v-if="(required || inputRequirements.length > 0) && showStatusIcon"
|
21
|
+
href="#"
|
22
|
+
@click.prevent
|
23
|
+
:title="validationTooltip"
|
24
|
+
:aria-errormessage="tooltipId"
|
25
|
+
aria-live="assertive"
|
26
|
+
:id="tooltipId">
|
27
|
+
<!-- begin CmdIcon -->
|
28
|
+
<CmdIcon :iconClass="getStatusIconClass"/>
|
29
|
+
<!-- end CmdIcon -->
|
30
|
+
</a>
|
31
|
+
<!-- end status-icon -->
|
32
|
+
|
19
33
|
<!-- begin CmdTooltipForFormElements -->
|
20
34
|
<CmdTooltipForFormElements
|
21
35
|
v-if="useCustomTooltip && (validationStatus === '' || validationStatus === 'error')"
|
@@ -31,26 +45,12 @@
|
|
31
45
|
:role="validationStatus === 'error' ? 'alert' : 'dialog'"
|
32
46
|
/>
|
33
47
|
<!-- end CmdTooltipForFormElements -->
|
34
|
-
|
35
|
-
<!-- begin status-icon -->
|
36
|
-
<a v-if="(required || inputRequirements.length > 0) && showStatusIcon"
|
37
|
-
href="#"
|
38
|
-
@click.prevent
|
39
|
-
:title="validationTooltip"
|
40
|
-
:aria-errormessage="tooltipId"
|
41
|
-
aria-live="assertive"
|
42
|
-
:id="tooltipId">
|
43
|
-
<!-- begin CmdIcon -->
|
44
|
-
<CmdIcon :iconClass="getStatusIconClass"/>
|
45
|
-
<!-- end CmdIcon -->
|
46
|
-
</a>
|
47
|
-
<!-- end status-icon -->
|
48
48
|
</span>
|
49
49
|
<!-- end label -->
|
50
50
|
|
51
51
|
<!-- begin view without slot -->
|
52
52
|
<span v-if="!useSlot" :class="['flex-container', {'no-flex': !stretchHorizontally, 'no-gap': multipleSwitch}]">
|
53
|
-
<label v-for="(inputElement, index) in inputElements" :key="index" :for="inputElement.id">
|
53
|
+
<label v-for="(inputElement, index) in inputElements" :key="index" :for="inputElement.id" :class="{'toggle-switch': toggleSwitches}">
|
54
54
|
<input
|
55
55
|
:type="inputTypes"
|
56
56
|
:id="inputElement.id"
|
@@ -58,7 +58,7 @@
|
|
58
58
|
:value="inputElement.value"
|
59
59
|
v-model="inputValue"
|
60
60
|
:disabled="disabled"
|
61
|
-
:class="{'replace-input-type': replaceInputType
|
61
|
+
:class="{'replace-input-type': replaceInputType}"
|
62
62
|
/>
|
63
63
|
<!-- begin CmdIcon -->
|
64
64
|
<CmdIcon
|
@@ -159,7 +159,7 @@ export default {
|
|
159
159
|
/**
|
160
160
|
* for replacing native checkboxes/radio-buttons by custom ones (based on frontend-framework)
|
161
161
|
*
|
162
|
-
*
|
162
|
+
* toggleSwitches-property must be set to 'false'
|
163
163
|
*
|
164
164
|
* @affectsStyling: true
|
165
165
|
*/
|
@@ -174,7 +174,7 @@ export default {
|
|
174
174
|
*
|
175
175
|
* @affectsStyling: true
|
176
176
|
*/
|
177
|
-
|
177
|
+
toggleSwitches: {
|
178
178
|
type: Boolean,
|
179
179
|
default: false
|
180
180
|
},
|
@@ -314,15 +314,11 @@ export default {
|
|
314
314
|
}
|
315
315
|
|
316
316
|
&:hover, &:active, &:focus {
|
317
|
-
span {
|
317
|
+
> span {
|
318
318
|
color: var(--hyperlink-color-highlighted)
|
319
319
|
}
|
320
320
|
|
321
321
|
& + .flex-container {
|
322
|
-
label:not(:has(input:checked)) .label-text {
|
323
|
-
color: var(--default-text-color);
|
324
|
-
}
|
325
|
-
|
326
322
|
input {
|
327
323
|
border-color: var(--default-border-color);
|
328
324
|
}
|
@@ -335,16 +331,26 @@ export default {
|
|
335
331
|
--status-color: var(--error-color);
|
336
332
|
}
|
337
333
|
|
338
|
-
label, [class*="icon-"] {
|
334
|
+
label, span, [class*="icon-"] {
|
339
335
|
color: var(--status-color);
|
340
336
|
}
|
341
337
|
|
342
338
|
&.multiple-switch {
|
343
|
-
|
344
|
-
|
339
|
+
&.error {
|
340
|
+
--status-color: var(--error-color);
|
341
|
+
|
342
|
+
label {
|
343
|
+
border-color: var(--error-color);
|
344
|
+
|
345
|
+
> * {
|
346
|
+
color: var(--error-color);
|
347
|
+
}
|
345
348
|
|
346
|
-
|
347
|
-
|
349
|
+
&:is(:hover, :active, :focus) {
|
350
|
+
span, [class*="icon-"] {
|
351
|
+
color: var(--hyperlink-color-highlighted);
|
352
|
+
}
|
353
|
+
}
|
348
354
|
}
|
349
355
|
}
|
350
356
|
}
|
@@ -34,7 +34,7 @@
|
|
34
34
|
element="button"
|
35
35
|
:type="buttonType"
|
36
36
|
:disabled="buttonDisabled"
|
37
|
-
:nativeButton="
|
37
|
+
:nativeButton="cmdFormElementSubmitDynamicLabel"
|
38
38
|
@click="sendData"
|
39
39
|
/>
|
40
40
|
<!-- end cmd-form-element -->
|
@@ -145,6 +145,14 @@ export default {
|
|
145
145
|
}
|
146
146
|
},
|
147
147
|
computed: {
|
148
|
+
cmdFormElementSubmitDynamicLabel() {
|
149
|
+
return this.updateButtonLabelText
|
150
|
+
},
|
151
|
+
updateButtonLabelText() {
|
152
|
+
const button = {...this.cmdFormElementSubmit}
|
153
|
+
button.text = this.subscription === "subscribe" ? "Subscribe now" : "Unsubscribe from list"
|
154
|
+
return button
|
155
|
+
},
|
148
156
|
subscription: {
|
149
157
|
get() {
|
150
158
|
return this.modelValue.subscription || "subscribe"
|
@@ -169,6 +177,15 @@ export default {
|
|
169
177
|
checkValidationStatus(event) {
|
170
178
|
this.buttonDisabled = event !== "success"
|
171
179
|
}
|
180
|
+
},
|
181
|
+
watch: {
|
182
|
+
modelValue: {
|
183
|
+
handler() {
|
184
|
+
return this.updateButtonLabelText
|
185
|
+
},
|
186
|
+
deep: true,
|
187
|
+
immediate: true
|
188
|
+
}
|
172
189
|
}
|
173
190
|
}
|
174
191
|
</script>
|
@@ -116,7 +116,7 @@ export default {
|
|
116
116
|
border-top-left-radius: var(--default-border-radius);
|
117
117
|
border-top-right-radius: var(--default-border-radius);
|
118
118
|
list-style-type: none;
|
119
|
-
background: var(--color-scheme-background
|
119
|
+
background: var(--color-scheme-background);
|
120
120
|
|
121
121
|
a {
|
122
122
|
display: flex;
|
@@ -186,7 +186,7 @@ export default {
|
|
186
186
|
padding: var(--default-padding);
|
187
187
|
border: var(--primary-border);
|
188
188
|
border-radius: var(--default-border-radius);
|
189
|
-
background: var(--color-scheme-background
|
189
|
+
background: var(--color-scheme-background);
|
190
190
|
border-top-left-radius: 0;
|
191
191
|
|
192
192
|
> div {
|
@@ -265,7 +265,7 @@ export default {
|
|
265
265
|
|
266
266
|
&.dark-mode {
|
267
267
|
input {
|
268
|
-
background: var(--color-scheme-background
|
268
|
+
background: var(--color-scheme-background);
|
269
269
|
border-color: var(--color-scheme-text-color);
|
270
270
|
|
271
271
|
&::before {
|
@@ -273,7 +273,7 @@ export default {
|
|
273
273
|
content: "";
|
274
274
|
width: var(--size);
|
275
275
|
aspect-ratio: 1/1;
|
276
|
-
background: var(--color-scheme-background
|
276
|
+
background: var(--color-scheme-background);
|
277
277
|
border-radius: var(--full-circle);
|
278
278
|
position: absolute;
|
279
279
|
top: 0;
|
@@ -207,7 +207,7 @@ export default {
|
|
207
207
|
line-height: 100%;
|
208
208
|
font-size: var(--font-size-small);
|
209
209
|
position: fixed;
|
210
|
-
background: var(--color-scheme-background
|
210
|
+
background: var(--color-scheme-background);
|
211
211
|
z-index: 100;
|
212
212
|
border: var(--default-border);
|
213
213
|
border-color: hsl(220, 2%, 25%);
|