comand-component-library 4.3.28 → 5.0.0
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/dist/comand-component-library.css +1 -1
- package/dist/comand-component-library.js +9587 -9482
- package/dist/styles/demopage-only.css +12 -2
- package/package.json +47 -46
- package/src/ComponentLibrary.vue +2697 -2688
- package/src/assets/data/component-structure.json +1 -1
- package/src/assets/data/form-elements.json +224 -224
- package/src/assets/data/social-networks-page-by-json.json +43 -43
- package/src/assets/styles/component-library-global-styles.scss +296 -295
- package/src/componentSettingsDataAndControls.vue +1 -18
- package/src/components/CmdAccordion.vue +1 -1
- package/src/components/CmdAddressData.vue +6 -1
- package/src/components/CmdAddressDataItem.vue +6 -1
- package/src/components/CmdBasicForm.vue +2 -2
- package/src/components/CmdBox.vue +1103 -1092
- package/src/components/CmdBoxWrapper.vue +7 -1
- package/src/components/CmdBreadcrumbs.vue +2 -2
- package/src/components/CmdCodeOutput.vue +1 -1
- package/src/components/CmdCookieDisclaimer.vue +480 -480
- package/src/components/CmdFakeSelect.vue +930 -916
- package/src/components/CmdFlexibleScrollContainer.vue +42 -42
- package/src/components/CmdForm.vue +481 -481
- package/src/components/CmdFormElement.vue +1110 -1091
- package/src/components/CmdFormFilters.vue +146 -146
- package/src/components/CmdGoogleMaps.vue +1 -1
- package/src/components/CmdHeadline.vue +21 -4
- package/src/components/CmdIcon.vue +8 -2
- package/src/components/CmdImage.vue +14 -16
- package/src/components/CmdImageZoom.vue +9 -8
- package/src/components/CmdInputGroup.vue +436 -435
- package/src/components/CmdLink.vue +1 -1
- package/src/components/CmdList.vue +1 -1
- package/src/components/CmdListOfRequirements.vue +192 -192
- package/src/components/CmdLoginForm.vue +618 -618
- package/src/components/CmdMailToolFilter.vue +217 -217
- package/src/components/CmdMainNavigation.vue +581 -572
- package/src/components/CmdMultistepFormProgressBar.vue +9 -9
- package/src/components/CmdNewsletterSubscription.vue +199 -199
- package/src/components/CmdPagination.vue +4 -2
- package/src/components/CmdParagraph.vue +10 -4
- package/src/components/CmdProgressBar.vue +72 -72
- package/src/components/CmdSiteHeader.vue +382 -389
- package/src/components/CmdSiteSearch.vue +420 -420
- package/src/components/CmdSiteWrapper.vue +12 -5
- package/src/components/CmdSlideshow.vue +519 -519
- package/src/components/CmdSmartSearch.vue +291 -291
- package/src/components/CmdSystemMessage.vue +3 -2
- package/src/components/CmdTable.vue +401 -401
- package/src/components/CmdTabs.vue +262 -262
- package/src/components/CmdTag.vue +1 -1
- package/src/components/CmdTextImageBlock.vue +8 -2
- package/src/components/CmdThumbnailScroller.vue +0 -7
- package/src/components/CmdToggleDarkMode.vue +13 -11
- package/src/components/CmdTooltip.vue +305 -301
- package/src/components/CmdUploadForm.vue +1299 -1305
- package/src/components/CmdWidthLimitationWrapper.vue +1 -1
- package/src/components/EditComponentWrapper.vue +5 -5
- package/src/index.js +5 -0
- package/src/main.js +4 -3
- package/src/utils/template.js +57 -0
- package/src/assets/styles/template.css +0 -1
|
@@ -1,263 +1,263 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- begin CmdTabs ---------------------------------------------------------------------------------------- -->
|
|
3
|
-
<div :class="['cmd-tabs', highlightLevel]">
|
|
4
|
-
<!-- being tab-list -->
|
|
5
|
-
<ul :class="{'stretch-tabs' : stretchTabs}" role="tablist">
|
|
6
|
-
<li v-for="(tab, index) in tabs" :class="{active : showTab === index}" :key="index" role="
|
|
7
|
-
<a href="#" :class="highlightLevel" @click.prevent="setActiveTab(index)" :title="!tab.text ? tab.tooltip : undefined">
|
|
8
|
-
<!-- begin CmdIcon -->
|
|
9
|
-
<CmdIcon v-if="tab.iconClass" :iconClass="tab.iconClass" :type="tab.iconType" />
|
|
10
|
-
<!-- end CmdIcon -->
|
|
11
|
-
<span v-if="tab.text">{{ tab.text }}</span>
|
|
12
|
-
</a>
|
|
13
|
-
</li>
|
|
14
|
-
</ul>
|
|
15
|
-
<!-- end tab-list -->
|
|
16
|
-
|
|
17
|
-
<!-- being tab-content -->
|
|
18
|
-
<!-- begin slot -->
|
|
19
|
-
<template v-if="useSlot">
|
|
20
|
-
<div v-show="showTab === index - 1" v-for="index in tabs.length" :key="index" aria-live="assertive" :class="['tab-content-' + (index - 1), {'no-padding': !useDefaultPadding}]">
|
|
21
|
-
<!-- begin named slot-content -->
|
|
22
|
-
<slot :name="'tab-content-' + (index - 1)"></slot>
|
|
23
|
-
<!-- end named slot-content -->
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
<!-- end slot -->
|
|
27
|
-
|
|
28
|
-
<div v-else aria-live="assertive">
|
|
29
|
-
<CmdHeadline
|
|
30
|
-
v-if="cmdHeadlineProperties.show"
|
|
31
|
-
v-bind="cmdHeadlineProperties"
|
|
32
|
-
:headlineText="tabs[showTab].headlineText"
|
|
33
|
-
/>
|
|
34
|
-
|
|
35
|
-
<!-- begin html-content -->
|
|
36
|
-
<div v-html="tabs[showTab].htmlContent" :class="{'no-padding': !useDefaultPadding}"></div>
|
|
37
|
-
<!-- end html-content -->
|
|
38
|
-
</div>
|
|
39
|
-
<!-- end tab-content -->
|
|
40
|
-
</div>
|
|
41
|
-
<!-- end CmdTabs ---------------------------------------------------------------------------------------- -->
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<script>
|
|
45
|
-
// import functions
|
|
46
|
-
import {addCollection} from "@iconify/vue"
|
|
47
|
-
|
|
48
|
-
// import data
|
|
49
|
-
import IconData from '@/assets/data/icon.json'
|
|
50
|
-
|
|
51
|
-
addCollection(IconData)
|
|
52
|
-
|
|
53
|
-
export default {
|
|
54
|
-
name: "CmdTabs",
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
showTab: this.defaultActiveTab
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
emits: ["active-tab"],
|
|
61
|
-
props: {
|
|
62
|
-
/**
|
|
63
|
-
* set if content should use default-padding
|
|
64
|
-
*/
|
|
65
|
-
useDefaultPadding: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: true
|
|
68
|
-
},
|
|
69
|
-
/**
|
|
70
|
-
* activate if tabs should be (equally) stretched horizontally over full width of tab-content
|
|
71
|
-
*/
|
|
72
|
-
stretchTabs: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
default: false
|
|
75
|
-
},
|
|
76
|
-
/**
|
|
77
|
-
* list of tabs (incl. tab-name and tab-content (optional))
|
|
78
|
-
*/
|
|
79
|
-
tabs: {
|
|
80
|
-
type: Array,
|
|
81
|
-
required: true
|
|
82
|
-
},
|
|
83
|
-
/**
|
|
84
|
-
* activate if content should be given by slot
|
|
85
|
-
*/
|
|
86
|
-
useSlot: {
|
|
87
|
-
type: Boolean,
|
|
88
|
-
default: false
|
|
89
|
-
},
|
|
90
|
-
/**
|
|
91
|
-
* set highlight-level for tabs
|
|
92
|
-
*
|
|
93
|
-
* @allowedValues: null, "primary", "secondary", "tertiary"
|
|
94
|
-
*/
|
|
95
|
-
highlightLevel: {
|
|
96
|
-
type: String,
|
|
97
|
-
default: "primary",
|
|
98
|
-
validator(value) {
|
|
99
|
-
return value === null ||
|
|
100
|
-
value === "primary" ||
|
|
101
|
-
value === "secondary" ||
|
|
102
|
-
value === "tertiary"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
/**
|
|
106
|
-
* set default active/shown tab
|
|
107
|
-
*/
|
|
108
|
-
defaultActiveTab: {
|
|
109
|
-
type: Number,
|
|
110
|
-
default: 0
|
|
111
|
-
},
|
|
112
|
-
/**
|
|
113
|
-
* properties for CmdHeadline-component
|
|
114
|
-
*
|
|
115
|
-
* headlineText is provided by tabs-property for each tab
|
|
116
|
-
*/
|
|
117
|
-
cmdHeadline: {
|
|
118
|
-
type: Object,
|
|
119
|
-
required: false
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
computed: {
|
|
123
|
-
cmdHeadlineProperties() {
|
|
124
|
-
return {
|
|
125
|
-
show: true,
|
|
126
|
-
headlineLevel: 3,
|
|
127
|
-
...this.cmdHeadline
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
methods: {
|
|
132
|
-
setActiveTab(index) {
|
|
133
|
-
this.showTab = index
|
|
134
|
-
this.$emit("active-tab", index)
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
watch: {
|
|
138
|
-
defaultActiveTab() {
|
|
139
|
-
this.showTab = this.defaultActiveTab
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
</script>
|
|
144
|
-
|
|
145
|
-
<style>
|
|
146
|
-
/* begin cmd-tabs ------------------------------------------------------------------------------------------ */
|
|
147
|
-
.cmd-tabs {
|
|
148
|
-
> ul {
|
|
149
|
-
margin: 0;
|
|
150
|
-
display: flex;
|
|
151
|
-
|
|
152
|
-
> li {
|
|
153
|
-
z-index: 10;
|
|
154
|
-
margin-left: 0;
|
|
155
|
-
border-top-left-radius: var(--default-border-radius);
|
|
156
|
-
border-top-right-radius: var(--default-border-radius);
|
|
157
|
-
list-style-type: none;
|
|
158
|
-
background: var(--color-scheme-background);
|
|
159
|
-
|
|
160
|
-
a {
|
|
161
|
-
display: flex;
|
|
162
|
-
align-items: center;
|
|
163
|
-
justify-content: center;
|
|
164
|
-
padding: var(--default-padding);
|
|
165
|
-
border: var(--default-border);
|
|
166
|
-
border-bottom: 0;
|
|
167
|
-
border-top-left-radius: var(--default-border-radius);
|
|
168
|
-
border-top-right-radius: var(--default-border-radius);
|
|
169
|
-
text-decoration: none !important;
|
|
170
|
-
|
|
171
|
-
span, span[class*="icon-"] {
|
|
172
|
-
text-decoration: none !important;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&:hover, &:active, &:focus {
|
|
176
|
-
cursor: pointer;
|
|
177
|
-
color: var(--hyperlink-color-highlighted);
|
|
178
|
-
border-color: var(--hyperlink-color);
|
|
179
|
-
|
|
180
|
-
span, [class*="icon-"] {
|
|
181
|
-
color: inherit;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
&.active {
|
|
187
|
-
span, [class*="icon-"] {
|
|
188
|
-
color: var(--color-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
&:hover, &:active {
|
|
192
|
-
a, a:focus {
|
|
193
|
-
color: var(--hyperlink-color);
|
|
194
|
-
background: var(--color-
|
|
195
|
-
|
|
196
|
-
span, [class*="icon-"] {
|
|
197
|
-
color: var(--hyperlink-color-highlighted);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
a:focus {
|
|
203
|
-
color: var(--color-
|
|
204
|
-
|
|
205
|
-
span, span[class*="icon-"], .iconify {
|
|
206
|
-
color: inherit !important;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
&.stretch-tabs {
|
|
213
|
-
> li {
|
|
214
|
-
flex: 1;
|
|
215
|
-
text-align: center;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
> div {
|
|
219
|
-
border-top-right-radius: 0;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.headline {
|
|
225
|
-
margin-top: 0;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
> div {
|
|
229
|
-
padding: var(--default-padding);
|
|
230
|
-
border: var(--default-border);
|
|
231
|
-
border-radius: var(--default-border-radius);
|
|
232
|
-
background: var(--color-scheme-background);
|
|
233
|
-
border-top-left-radius: 0;
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
> div {
|
|
237
|
-
*:last-child {
|
|
238
|
-
margin-bottom: 0;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
&.primary {
|
|
244
|
-
& > div {
|
|
245
|
-
border-color: var(--primary-color);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
&.secondary {
|
|
250
|
-
& > div {
|
|
251
|
-
border-color: var(--secondary-color);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
&.tertiary {
|
|
256
|
-
& > div {
|
|
257
|
-
border-color: var(--tertiary-color);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/* end cmd-tabs ------------------------------------------------------------------------------------------ */
|
|
1
|
+
<template>
|
|
2
|
+
<!-- begin CmdTabs ---------------------------------------------------------------------------------------- -->
|
|
3
|
+
<div :class="['cmd-tabs', highlightLevel]">
|
|
4
|
+
<!-- being tab-list -->
|
|
5
|
+
<ul :class="{'stretch-tabs' : stretchTabs}" role="tablist">
|
|
6
|
+
<li v-for="(tab, index) in tabs" :class="{active : showTab === index}" :key="index" role="presentation">
|
|
7
|
+
<a href="#" role="tab" :aria-selected="showTab === index ? 'true' : 'false'" :class="highlightLevel" @click.prevent="setActiveTab(index)" :title="!tab.text ? tab.tooltip : undefined" :aria-label="!tab.text ? tab.tooltip : undefined">
|
|
8
|
+
<!-- begin CmdIcon -->
|
|
9
|
+
<CmdIcon v-if="tab.iconClass" :iconClass="tab.iconClass" :type="tab.iconType" />
|
|
10
|
+
<!-- end CmdIcon -->
|
|
11
|
+
<span v-if="tab.text">{{ tab.text }}</span>
|
|
12
|
+
</a>
|
|
13
|
+
</li>
|
|
14
|
+
</ul>
|
|
15
|
+
<!-- end tab-list -->
|
|
16
|
+
|
|
17
|
+
<!-- being tab-content -->
|
|
18
|
+
<!-- begin slot -->
|
|
19
|
+
<template v-if="useSlot">
|
|
20
|
+
<div v-show="showTab === index - 1" v-for="index in tabs.length" :key="index" aria-live="assertive" :class="['tab-content-' + (index - 1), {'no-padding': !useDefaultPadding}]">
|
|
21
|
+
<!-- begin named slot-content -->
|
|
22
|
+
<slot :name="'tab-content-' + (index - 1)"></slot>
|
|
23
|
+
<!-- end named slot-content -->
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<!-- end slot -->
|
|
27
|
+
|
|
28
|
+
<div v-else aria-live="assertive">
|
|
29
|
+
<CmdHeadline
|
|
30
|
+
v-if="cmdHeadlineProperties.show"
|
|
31
|
+
v-bind="cmdHeadlineProperties"
|
|
32
|
+
:headlineText="tabs[showTab].headlineText"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<!-- begin html-content -->
|
|
36
|
+
<div v-html="tabs[showTab].htmlContent" :class="{'no-padding': !useDefaultPadding}"></div>
|
|
37
|
+
<!-- end html-content -->
|
|
38
|
+
</div>
|
|
39
|
+
<!-- end tab-content -->
|
|
40
|
+
</div>
|
|
41
|
+
<!-- end CmdTabs ---------------------------------------------------------------------------------------- -->
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
// import functions
|
|
46
|
+
import {addCollection} from "@iconify/vue"
|
|
47
|
+
|
|
48
|
+
// import data
|
|
49
|
+
import IconData from '@/assets/data/icon.json'
|
|
50
|
+
|
|
51
|
+
addCollection(IconData)
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
name: "CmdTabs",
|
|
55
|
+
data() {
|
|
56
|
+
return {
|
|
57
|
+
showTab: this.defaultActiveTab
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
emits: ["active-tab"],
|
|
61
|
+
props: {
|
|
62
|
+
/**
|
|
63
|
+
* set if content should use default-padding
|
|
64
|
+
*/
|
|
65
|
+
useDefaultPadding: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: true
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* activate if tabs should be (equally) stretched horizontally over full width of tab-content
|
|
71
|
+
*/
|
|
72
|
+
stretchTabs: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: false
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* list of tabs (incl. tab-name and tab-content (optional))
|
|
78
|
+
*/
|
|
79
|
+
tabs: {
|
|
80
|
+
type: Array,
|
|
81
|
+
required: true
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* activate if content should be given by slot
|
|
85
|
+
*/
|
|
86
|
+
useSlot: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: false
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* set highlight-level for tabs
|
|
92
|
+
*
|
|
93
|
+
* @allowedValues: null, "primary", "secondary", "tertiary"
|
|
94
|
+
*/
|
|
95
|
+
highlightLevel: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: "primary",
|
|
98
|
+
validator(value) {
|
|
99
|
+
return value === null ||
|
|
100
|
+
value === "primary" ||
|
|
101
|
+
value === "secondary" ||
|
|
102
|
+
value === "tertiary"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
/**
|
|
106
|
+
* set default active/shown tab
|
|
107
|
+
*/
|
|
108
|
+
defaultActiveTab: {
|
|
109
|
+
type: Number,
|
|
110
|
+
default: 0
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
113
|
+
* properties for CmdHeadline-component
|
|
114
|
+
*
|
|
115
|
+
* headlineText is provided by tabs-property for each tab
|
|
116
|
+
*/
|
|
117
|
+
cmdHeadline: {
|
|
118
|
+
type: Object,
|
|
119
|
+
required: false
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
computed: {
|
|
123
|
+
cmdHeadlineProperties() {
|
|
124
|
+
return {
|
|
125
|
+
show: true,
|
|
126
|
+
headlineLevel: 3,
|
|
127
|
+
...this.cmdHeadline
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
methods: {
|
|
132
|
+
setActiveTab(index) {
|
|
133
|
+
this.showTab = index
|
|
134
|
+
this.$emit("active-tab", index)
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
watch: {
|
|
138
|
+
defaultActiveTab() {
|
|
139
|
+
this.showTab = this.defaultActiveTab
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<style>
|
|
146
|
+
/* begin cmd-tabs ------------------------------------------------------------------------------------------ */
|
|
147
|
+
.cmd-tabs {
|
|
148
|
+
> ul {
|
|
149
|
+
margin: 0;
|
|
150
|
+
display: flex;
|
|
151
|
+
|
|
152
|
+
> li {
|
|
153
|
+
z-index: 10;
|
|
154
|
+
margin-left: 0;
|
|
155
|
+
border-top-left-radius: var(--default-border-radius);
|
|
156
|
+
border-top-right-radius: var(--default-border-radius);
|
|
157
|
+
list-style-type: none;
|
|
158
|
+
background: var(--color-scheme-background);
|
|
159
|
+
|
|
160
|
+
a {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
padding: var(--default-padding);
|
|
165
|
+
border: var(--default-border);
|
|
166
|
+
border-bottom: 0;
|
|
167
|
+
border-top-left-radius: var(--default-border-radius);
|
|
168
|
+
border-top-right-radius: var(--default-border-radius);
|
|
169
|
+
text-decoration: none !important;
|
|
170
|
+
|
|
171
|
+
span, span[class*="icon-"] {
|
|
172
|
+
text-decoration: none !important;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&:hover, &:active, &:focus {
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
color: var(--hyperlink-color-highlighted);
|
|
178
|
+
border-color: var(--hyperlink-color);
|
|
179
|
+
|
|
180
|
+
span, [class*="icon-"] {
|
|
181
|
+
color: inherit;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&.active {
|
|
187
|
+
span, [class*="icon-"] {
|
|
188
|
+
color: var(--hyperlink-color-contrast-text);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:hover, &:active {
|
|
192
|
+
a, a:focus {
|
|
193
|
+
color: var(--hyperlink-color);
|
|
194
|
+
background: var(--color-scheme-background);
|
|
195
|
+
|
|
196
|
+
span, [class*="icon-"] {
|
|
197
|
+
color: var(--hyperlink-color-highlighted);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
a:focus {
|
|
203
|
+
color: var(--hyperlink-color-contrast-text);
|
|
204
|
+
|
|
205
|
+
span, span[class*="icon-"], .iconify {
|
|
206
|
+
color: inherit !important;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
&.stretch-tabs {
|
|
213
|
+
> li {
|
|
214
|
+
flex: 1;
|
|
215
|
+
text-align: center;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
> div {
|
|
219
|
+
border-top-right-radius: 0;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.headline {
|
|
225
|
+
margin-top: 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
> div {
|
|
229
|
+
padding: var(--default-padding);
|
|
230
|
+
border: var(--default-border);
|
|
231
|
+
border-radius: var(--default-border-radius);
|
|
232
|
+
background: var(--color-scheme-background);
|
|
233
|
+
border-top-left-radius: 0;
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
> div {
|
|
237
|
+
*:last-child {
|
|
238
|
+
margin-bottom: 0;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&.primary {
|
|
244
|
+
& > div {
|
|
245
|
+
border-color: var(--primary-color);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&.secondary {
|
|
250
|
+
& > div {
|
|
251
|
+
border-color: var(--secondary-color);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&.tertiary {
|
|
256
|
+
& > div {
|
|
257
|
+
border-color: var(--tertiary-color);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* end cmd-tabs ------------------------------------------------------------------------------------------ */
|
|
263
263
|
</style>
|
|
@@ -170,11 +170,17 @@ export default {
|
|
|
170
170
|
...this.cmdParagraph
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
|
+
/**
|
|
174
|
+
* html-content of the paragraph (only used in edit-mode)
|
|
175
|
+
*/
|
|
176
|
+
htmlContent() {
|
|
177
|
+
return this.cmdParagraph?.content
|
|
178
|
+
},
|
|
173
179
|
paragraphComponentPath() {
|
|
174
180
|
/* because paragraph is no component on its own, besides the componentPath (for the property),
|
|
175
181
|
an additional flag (here $isComponent-key) is used to let the store identify this edge case.
|
|
176
182
|
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 */
|
|
177
|
-
return [{componentPath: ["props", "
|
|
183
|
+
return [{componentPath: ["props", "cmdParagraph", "content"], $isComponent: false}]
|
|
178
184
|
},
|
|
179
185
|
setInnerClass() {
|
|
180
186
|
return "inner-text-wrapper " + this.textAlign + " " + (this.innerClass || "")
|
|
@@ -194,7 +200,7 @@ export default {
|
|
|
194
200
|
|
|
195
201
|
return updateHandlerProvider(this, {
|
|
196
202
|
update(props) {
|
|
197
|
-
props.
|
|
203
|
+
props.cmdParagraph = {...props.cmdParagraph, content: htmlContent}
|
|
198
204
|
}
|
|
199
205
|
})
|
|
200
206
|
}
|
|
@@ -66,8 +66,19 @@ export default {
|
|
|
66
66
|
EditMode
|
|
67
67
|
],
|
|
68
68
|
data() {
|
|
69
|
+
// start with the real color-scheme (saved choice of the user or browser/os-setting) instead of 'false':
|
|
70
|
+
// otherwise every instance of this component first announces 'light-mode' (via 'toggle-color-scheme') and
|
|
71
|
+
// switches already initialized instances to light-mode (depending on the creation-order)
|
|
72
|
+
let darkMode = false
|
|
73
|
+
try {
|
|
74
|
+
const savedColorScheme = window.localStorage.getItem("cmd-color-scheme")
|
|
75
|
+
darkMode = savedColorScheme ? savedColorScheme === "dark-mode" : window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
76
|
+
} catch {
|
|
77
|
+
darkMode = window.matchMedia?.("(prefers-color-scheme: dark)").matches || false
|
|
78
|
+
}
|
|
79
|
+
|
|
69
80
|
return {
|
|
70
|
-
darkMode
|
|
81
|
+
darkMode,
|
|
71
82
|
editableLabelTextLightMode: null,
|
|
72
83
|
editableLabelTextDarkMode: null
|
|
73
84
|
}
|
|
@@ -146,18 +157,9 @@ export default {
|
|
|
146
157
|
}
|
|
147
158
|
},
|
|
148
159
|
created() {
|
|
160
|
+
// react on changes of the browser/os-color-scheme (the initial value is already set in data())
|
|
149
161
|
const mql = window.matchMedia("(prefers-color-scheme: dark)")
|
|
150
162
|
mql.addEventListener("change", this.onColorSchemeChange)
|
|
151
|
-
this.onColorSchemeChange(mql)
|
|
152
|
-
|
|
153
|
-
this.$nextTick(() => {
|
|
154
|
-
// load color-scheme from local-storage
|
|
155
|
-
const savedColorScheme = window.localStorage.getItem("cmd-color-scheme")
|
|
156
|
-
|
|
157
|
-
if(savedColorScheme) {
|
|
158
|
-
this.darkMode = savedColorScheme === "dark-mode"
|
|
159
|
-
}
|
|
160
|
-
})
|
|
161
163
|
|
|
162
164
|
// add eventListener on html-tag (= documentElement) to react on 'toggle-color-scheme'-event
|
|
163
165
|
document.documentElement.addEventListener("toggle-color-scheme", this.onToggleColorScheme)
|