comand-component-library 4.0.5 → 4.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -421,7 +421,7 @@ export default {
421
421
  text-align: center;
422
422
 
423
423
  &.active {
424
- color: var(--pure-white);
424
+ color: var(--hyperlink-color-highlighted);
425
425
  background: none; /* overwrite default behaviour from frontend-framework */
426
426
 
427
427
  span, span[class*="icon"] {
@@ -438,6 +438,7 @@ export default {
438
438
  figcaption {
439
439
  background: var(--primary-color);
440
440
  opacity: 1;
441
+ color: var(--pure-white);
441
442
  }
442
443
  }
443
444
 
@@ -545,7 +546,7 @@ export default {
545
546
  }
546
547
 
547
548
  &.large-icons {
548
- li a {
549
+ ul li a {
549
550
  display: flex;
550
551
  flex-direction: column;
551
552
  gap: calc(var(--default-gap) / 4);
@@ -24,7 +24,8 @@
24
24
  </CmdSystemMessage>
25
25
  <!-- end CmdSystemMessage -->
26
26
 
27
- <div :class="['box flex-container vertical', { 'drop-area': enableDragAndDrop, 'allow-drop': allowDrop }]" v-on="dragAndDropHandler">
27
+ <div :class="['box flex-container vertical', { 'drop-area': enableDragAndDrop, 'allow-drop': allowDrop }]"
28
+ v-on="dragAndDropHandler">
28
29
  <template v-if="!listOfFiles.length">
29
30
  <!-- begin CmdHeadline -->
30
31
  <CmdHeadline v-if="allowMultipleFileUploads" v-bind="cmdHeadlineNoFilesToUpload" headlineLevel="4">
@@ -35,7 +36,8 @@
35
36
 
36
37
  <!-- begin total-upload information -->
37
38
  <div v-else class="flex-container vertical">
38
- <div v-if="showTotalUpload && listOfFiles.length !== 1" class="flex-container vertical list-files-wrapper">
39
+ <div v-if="showTotalUpload && listOfFiles.length !== 1"
40
+ class="flex-container vertical list-files-wrapper">
39
41
  <!-- begin CmdHeadline -->
40
42
  <CmdHeadline v-bind="cmdHeadlineSummaryOfAllFiles" headlineLevel="4">
41
43
  {{ getMessage("cmduploadform.headline.summary_of_all_files") }}
@@ -50,7 +52,7 @@
50
52
  @click.prevent="cancelUpload"
51
53
  >
52
54
  <!-- begin CmdIcon -->
53
- <CmdIcon :iconClass="deleteIcon.iconClass" :type="deleteIcon.iconClass" />
55
+ <CmdIcon :iconClass="deleteIcon.iconClass" :type="deleteIcon.iconClass"/>
54
56
  <!-- end CmdIcon -->
55
57
  </a>
56
58
  <span>
@@ -103,7 +105,7 @@
103
105
  @click.prevent="removeFile(index)"
104
106
  >
105
107
  <!-- begin CmdIcon -->
106
- <CmdIcon :iconClass="iconDelete.iconClass" :type="iconDelete.iconType" />
108
+ <CmdIcon :iconClass="iconDelete.iconClass" :type="iconDelete.iconType"/>
107
109
  <!-- end CmdIcon -->
108
110
  </a>
109
111
  <span
@@ -143,61 +145,65 @@
143
145
  <!-- end list of selected files -->
144
146
 
145
147
  <!-- begin upload conditions -->
146
- <!-- begin CmdHeadline -->
147
- <CmdHeadline v-if="allowMultipleFileUploads && listOfFiles.length" v-bind="cmdHeadlineSelectAdditionalFiles" headlineLevel="4">
148
- {{ getMessage("cmduploadform.headline.select_additional_files") }}
149
- </CmdHeadline>
150
- <!-- end CmdHeadline -->
151
-
152
- <!-- begin CmdHeadline -->
153
- <CmdHeadline v-if="!allowMultipleFileUploads && listOfFiles.length" v-bind="cmdHeadlineSelectNewFile" headlineLevel="4">
154
- {{ getMessage("cmduploadform.headline.select_new_file") }}
155
- </CmdHeadline>
156
- <!-- end CmdHeadline -->
157
-
158
- <dl class="small">
159
- <template v-if="maxTotalUploadSize > 0">
160
- <dt :class="{ error: totalSize > maxTotalUploadSize }">
161
- {{ getMessage("cmduploadform.max_total_upload_size") }}
148
+ <div class="upload-conditions">
149
+ <!-- begin CmdHeadline -->
150
+ <CmdHeadline v-if="allowMultipleFileUploads && listOfFiles.length"
151
+ v-bind="cmdHeadlineSelectAdditionalFiles" headlineLevel="4">
152
+ {{ getMessage("cmduploadform.headline.select_additional_files") }}
153
+ </CmdHeadline>
154
+ <!-- end CmdHeadline -->
155
+
156
+ <!-- begin CmdHeadline -->
157
+ <CmdHeadline v-if="!allowMultipleFileUploads && listOfFiles.length" v-bind="cmdHeadlineSelectNewFile"
158
+ headlineLevel="4">
159
+ {{ getMessage("cmduploadform.headline.select_new_file") }}
160
+ </CmdHeadline>
161
+ <!-- end CmdHeadline -->
162
+
163
+ <dl class="small">
164
+ <template v-if="maxTotalUploadSize > 0">
165
+ <dt :class="{ error: totalSize > maxTotalUploadSize }">
166
+ {{ getMessage("cmduploadform.max_total_upload_size") }}
167
+ </dt>
168
+ <dd :class="['text-align-right', { error: totalSize > maxTotalUploadSize }]">
169
+ {{ formatSize(maxTotalUploadSize) }}
170
+ </dd>
171
+ </template>
172
+ <dt :class="{ error: errors.fileSize }">
173
+ {{ getMessage("cmduploadform.max_file_upload_size") }}
162
174
  </dt>
163
- <dd :class="['text-align-right', { error: totalSize > maxTotalUploadSize }]">
164
- {{ formatSize(maxTotalUploadSize) }}
175
+ <dd :class="['text-align-right', { error: errors.fileSize }]">
176
+ {{ formatSize(maxFileUploadSize) }}
165
177
  </dd>
166
- </template>
167
- <dt :class="{ error: errors.fileSize }">
168
- {{ getMessage("cmduploadform.max_file_upload_size") }}
169
- </dt>
170
- <dd :class="['text-align-right', { error: errors.fileSize }]">
171
- {{ formatSize(maxFileUploadSize) }}
172
- </dd>
173
- <dt :class="{ error: errors.fileType }">
174
- {{ getMessage("cmduploadform.allowed_file_types") }}
175
- </dt>
176
- <dd>
177
- <a
178
- href="#"
179
- @click.prevent="showListOfFileExtensions = !showListOfFileExtensions"
180
- :title="getMessage('cmduploadform.tooltip.toggle_list_of_allowed_file_types')">
181
- <!-- begin CmdIcon -->
182
- <CmdIcon
183
- :iconClass="showListOfFileExtensions ? iconInvisible.iconClass : iconVisible.iconClass"
184
- :type="showListOfFileExtensions ? iconInvisible.iconType : iconVisible.iconType"
185
- />
186
- <!-- end CmdIcon -->
187
- </a>
188
- <transition name="fade">
189
- <ul v-if="showListOfFileExtensions" class="list-of-file-extensions">
190
- <li
191
- v-for="(fileExtension, index) in allowedFileExtensions"
192
- :key="index"
193
- :class="{ error: errors.fileType }"
194
- >
195
- {{ fileExtension }}
196
- </li>
197
- </ul>
198
- </transition>
199
- </dd>
200
- </dl>
178
+ <dt :class="{ error: errors.fileType }">
179
+ {{ getMessage("cmduploadform.allowed_file_types") }}
180
+ </dt>
181
+ <dd>
182
+ <a
183
+ href="#"
184
+ @click.prevent="showListOfFileExtensions = !showListOfFileExtensions"
185
+ :title="getMessage('cmduploadform.tooltip.toggle_list_of_allowed_file_types')">
186
+ <!-- begin CmdIcon -->
187
+ <CmdIcon
188
+ :iconClass="showListOfFileExtensions ? iconInvisible.iconClass : iconVisible.iconClass"
189
+ :type="showListOfFileExtensions ? iconInvisible.iconType : iconVisible.iconType"
190
+ />
191
+ <!-- end CmdIcon -->
192
+ </a>
193
+ <transition name="fade">
194
+ <ul v-if="showListOfFileExtensions" class="list-of-file-extensions">
195
+ <li
196
+ v-for="(fileExtension, index) in allowedFileExtensions"
197
+ :key="index"
198
+ :class="{ error: errors.fileType }"
199
+ >
200
+ {{ fileExtension }}
201
+ </li>
202
+ </ul>
203
+ </transition>
204
+ </dd>
205
+ </dl>
206
+ </div>
201
207
  <!-- end upload conditions -->
202
208
 
203
209
  <!-- begin upload-button and drag-and-drop-text -->
@@ -209,7 +215,7 @@
209
215
  @click="selectFiles()"
210
216
  >
211
217
  <!-- begin CmdIcon -->
212
- <CmdIcon :iconClass="iconFileUpload.iconClass" :type="iconFileUpload.iconType" />
218
+ <CmdIcon :iconClass="iconFileUpload.iconClass" :type="iconFileUpload.iconType"/>
213
219
  <!-- end CmdIcon -->
214
220
  <span v-if="allowMultipleFileUploads">{{
215
221
  getMessage("cmduploadform.labeltext.select_files")
@@ -265,7 +271,7 @@
265
271
  @click="uploadFiles"
266
272
  >
267
273
  <!-- begin CmdIcon -->
268
- <CmdIcon :iconClass="iconUpload.iconClass" :type="iconUpload.iconType" />
274
+ <CmdIcon :iconClass="iconUpload.iconClass" :type="iconUpload.iconType"/>
269
275
  <!-- end CmdIcon -->
270
276
  <span v-if="listOfFiles.length === 1 || !allowMultipleFileUploads">
271
277
  {{ getMessage("cmduploadform.buttontext.upload_file") }}
@@ -274,7 +280,7 @@
274
280
  </button>
275
281
  <button :class="['button', { disabled: listOfFiles.length === 0 }]" @click="cancel">
276
282
  <!-- begin CmdIcon -->
277
- <CmdIcon :iconClass="iconCancel.iconClass" :type="iconCancel.iconType" />
283
+ <CmdIcon :iconClass="iconCancel.iconClass" :type="iconCancel.iconType"/>
278
284
  <!-- end CmdIcon -->
279
285
  <span>{{ getMessage("cmduploadform.buttontext.cancel") }}</span>
280
286
  </button>
@@ -283,7 +289,9 @@
283
289
  <!-- end advanced mode -->
284
290
 
285
291
  <!-- begin simple mode -->
286
- <a v-else href="#" @click.prevent="selectFiles" :class="['cmd-upload-form box', { 'drop-area': enableDragAndDrop, 'allow-drop': allowDrop }]" v-on="dragAndDropHandler">
292
+ <a v-else href="#" @click.prevent="selectFiles"
293
+ :class="['cmd-upload-form box', { 'drop-area': enableDragAndDrop, 'allow-drop': allowDrop }]"
294
+ v-on="dragAndDropHandler">
287
295
  <!-- begin progressbar -->
288
296
  <span class="progressbar" v-if="uploadInitiated">
289
297
  <span>{{ getPercentage(totalUploadProgress) }}</span>
@@ -301,20 +309,20 @@
301
309
  <template v-if="fileTypeImage">
302
310
  <span>{{ getMessage("cmduploadform.select_image") }}</span>
303
311
  <!-- begin CmdIcon -->
304
- <CmdIcon :iconClass="iconImage.iconClass" :type="iconImage.iconType" />
312
+ <CmdIcon :iconClass="iconImage.iconClass" :type="iconImage.iconType"/>
305
313
  <!-- end CmdIcon -->
306
314
  </template>
307
315
  <template v-else>
308
316
  <span>{{ getMessage("cmduploadform.select_file") }}</span>
309
317
  <!-- begin CmdIcon -->
310
- <CmdIcon :iconClass="iconFileUpload.iconClass" :type="iconFileUpload.iconType" />
318
+ <CmdIcon :iconClass="iconFileUpload.iconClass" :type="iconFileUpload.iconType"/>
311
319
  <!-- end CmdIcon -->
312
320
  </template>
313
321
  </template>
314
322
  <template v-else>
315
323
  <span>{{ getMessage("cmduploadform.drag_and_drop_file_here") }}</span>
316
324
  <!-- begin CmdIcon -->
317
- <CmdIcon :iconClass="iconDragAndDrop.iconClass" :type="iconDragAndDrop.iconType" />
325
+ <CmdIcon :iconClass="iconDragAndDrop.iconClass" :type="iconDragAndDrop.iconType"/>
318
326
  <!-- end CmdIcon -->
319
327
  </template>
320
328
  <small>{{ getMessage("cmduploadform.max_upload_size") }} {{ formatSize(maxFileUploadSize) }}</small>
@@ -1187,6 +1195,12 @@ export default {
1187
1195
  }
1188
1196
  }
1189
1197
 
1198
+ .upload-conditions {
1199
+ .cmd-headline > * {
1200
+ text-align: center;
1201
+ }
1202
+ }
1203
+
1190
1204
  p {
1191
1205
  &.text-drag-and-drop {
1192
1206
  &.disabled {
@@ -376,30 +376,39 @@ function buildComponentPath(component) {
376
376
 
377
377
  display: block;
378
378
 
379
+ label {
380
+ &.text-center input {
381
+ text-align: center;
382
+ }
383
+
384
+ &.edit-mode input, select, .cmd-fake-select {
385
+ padding: 0;
386
+ height: auto;
387
+ min-height: calc(var(--input-height) / 2);
388
+ }
389
+ }
390
+
391
+ [data-component="CmdSlideshow"] {
392
+ top: 1.8rem;
393
+ right: 5.3rem;
394
+ }
395
+
379
396
  &.highlight {
380
397
  border-color: var(--hyperlink-color-highlighted);
381
398
  border-style: dotted;
382
399
  }
383
400
 
384
- .cmd-headline {
385
- margin: 0;
386
- }
387
-
388
401
  .component-name {
389
402
  display: none;
390
403
  position: absolute;
391
404
  left: auto;
392
- right: 10rem;
405
+ right: 8rem;
406
+ font-size: 1.1rem;
393
407
  font-style: italic;
394
- z-index: 10;
395
- padding: .2rem;
408
+ z-index: 1;
409
+ padding: .2rem 2rem .2rem .5rem;
396
410
  background: var(--primary-color);
397
- }
398
-
399
- &.active {
400
- .component-name {
401
- display: block;
402
- }
411
+ margin: 0;
403
412
  }
404
413
 
405
414
  .action-buttons {
@@ -451,9 +460,11 @@ function buildComponentPath(component) {
451
460
  left: 0;
452
461
  right: auto; /* avoids container to be stretched */
453
462
  flex-wrap: nowrap;
463
+ border: var(--default-border);
464
+ border-color: var(--pure-white);
454
465
  border-bottom: 0;
455
- backdrop-filter: grayscale(1) brightness(1.5) blur(2rem) opacity(85%);
456
- border-radius: .5rem;
466
+ background: var(--pure-white);
467
+ border-radius: var(--default-border-radius);
457
468
 
458
469
  li {
459
470
  top: 0;
@@ -499,20 +510,70 @@ function buildComponentPath(component) {
499
510
  top: 0;
500
511
  left: 0;
501
512
  transform: none;
513
+
514
+ &::before {
515
+ color: var(--hyperlink-color)
516
+ }
502
517
  }
503
518
 
504
519
  &.primary {
505
520
  background: var(--primary-color);
506
521
  }
522
+
523
+ &:hover, &:active, &:focus {
524
+ span[class*="icon-"] {
525
+ &::before {
526
+ color: var(--hyperlink-color-highlighted)
527
+ }
528
+ }
529
+ }
507
530
  }
508
531
  }
509
532
  }
533
+ }
510
534
 
511
- &.active {
512
- //width: 100%; /* stretch inside flex-container */
513
- background: var(--pure-white);
535
+ &.active {
536
+ //width: 100%; /* stretch inside flex-container */
537
+ background: var(--pure-white);
538
+ border-color: var(--pure-white);
539
+ min-height: 2.5rem;
540
+
541
+ .component-name {
542
+ display: block;
543
+ }
544
+
545
+ label {
546
+ &.cmd-form-element {
547
+ :is(input[type="checkbox"], input[type="radio"]):checked {
548
+ & ~ .label-text span {
549
+ color: var(--pure-white);
550
+ }
551
+ }
552
+ }
553
+ }
554
+ }
555
+
556
+ /* begin edit-mode-styles for specific components */
557
+ .cmd-headline {
558
+ margin: 0;
559
+ }
560
+
561
+ .cmd-thumbnail-scroller {
562
+ .inner-thumbnail-wrapper > ul > li {
563
+ align-self: flex-start;
564
+ }
565
+
566
+ .cmd-image .drop-area span[class*="icon"] {
567
+ font-size: 5rem;
568
+ }
569
+ }
570
+
571
+ .cmd-image {
572
+ input {
573
+ width: 5rem;
514
574
  }
515
575
  }
576
+ /* end edit-mode-styles for specific components */
516
577
 
517
578
  // begin component-level only
518
579
  &:not(.edit-items) {
package/src/index.js CHANGED
@@ -45,6 +45,7 @@ export { default as CmdToggleDarkMode } from '@/components/CmdToggleDarkMode.vue
45
45
  export { default as CmdTooltip } from '@/components/CmdTooltip.vue'
46
46
  export { default as CmdUploadForm } from '@/components/CmdUploadForm.vue'
47
47
  export { default as CmdWidthLimitationWrapper } from '@/components/CmdWidthLimitationWrapper.vue'
48
+ export { default as EditComponentWrapper } from '@/components/EditComponentWrapper.vue'
48
49
 
49
50
  // export directives
50
51
  export { default as DirFocus } from '@/directives/focus'