comand-component-library 3.1.95 → 3.1.97

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comand-component-library",
3
- "version": "3.1.95",
3
+ "version": "3.1.97",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -792,6 +792,10 @@
792
792
  <a id="section-boxes"></a>
793
793
  <CmdWidthLimitationWrapper>
794
794
  <h2 class="headline-demopage">Boxes</h2>
795
+ <h3>Boxes in BoxWrapper with Flexbox</h3>
796
+ <CmdBoxWrapper :useFlexbox="true">
797
+ <CmdBox v-for="index in 14" :key="index" textBody="Content" :cmd-headline="{headlineText: 'Headline ' + index, headlineLevel: 5}" />
798
+ </CmdBoxWrapper>
795
799
  <h3>Content boxes</h3>
796
800
  <div class="grid-container-create-columns">
797
801
  <div class="grid-small-item">
@@ -1329,6 +1333,7 @@ import CmdAddressData from "@/components/CmdAddressData"
1329
1333
  import CmdBackToTopButton from "@/components/CmdBackToTopButton.vue"
1330
1334
  import CmdBankAccountData from "./components/CmdBankAccountData"
1331
1335
  import CmdBox from "@/components/CmdBox.vue"
1336
+ import CmdBoxWrapper from "@/components/CmdBoxWrapper.vue"
1332
1337
  import CmdBreadcrumbs from "@/components/CmdBreadcrumbs.vue"
1333
1338
  import CmdCompanyLogo from "@/components/CmdCompanyLogo.vue"
1334
1339
  import CmdCopyrightInformation from "@/components/CmdCopyrightInformation.vue"
@@ -1380,6 +1385,7 @@ export default {
1380
1385
  CmdBackToTopButton,
1381
1386
  CmdBankAccountData,
1382
1387
  CmdBox,
1388
+ CmdBoxWrapper,
1383
1389
  CmdBreadcrumbs,
1384
1390
  CmdCompanyLogo,
1385
1391
  CmdCopyrightInformation,
@@ -1621,4 +1627,9 @@ export default {
1621
1627
  background: none;
1622
1628
  }
1623
1629
  }
1630
+
1631
+ main .cmd-width-limitation-wrapper:not(:last-of-type) {
1632
+ border-bottom: var(--default-border);
1633
+ border-style: dashed;
1634
+ }
1624
1635
  </style>
@@ -1,10 +1,13 @@
1
1
  [
2
2
  {
3
3
  "name": "User name 1",
4
- "image": "",
4
+ "image": {
5
+ "src": "/media/images/user-images/fake-user-1.jpg",
6
+ "alt": "Alternative text"
7
+ },
5
8
  "profession": "User profession",
6
9
  "position": "User position",
7
- "description": "Some short description text for further information about the user",
10
+ "description": "User profile with image",
8
11
  "links": [
9
12
  {
10
13
  "path": "mailto:",
@@ -15,9 +18,9 @@
15
18
  },
16
19
  {
17
20
  "name": "User name 2",
18
- "image": "",
19
21
  "profession": "User profession",
20
22
  "position": "User position",
23
+ "description": "User description",
21
24
  "links": [
22
25
  {
23
26
  "path": "mailto:",
@@ -34,9 +37,9 @@
34
37
  },
35
38
  {
36
39
  "name": "User name 3",
37
- "image": "",
38
40
  "profession": "User profession",
39
41
  "position": "User position",
42
+ "description": "User with a long text as description that wraps over multiple lines",
40
43
  "links": [
41
44
  {
42
45
  "path": "mailto:",
@@ -58,9 +61,9 @@
58
61
  },
59
62
  {
60
63
  "name": "User name 4",
61
- "image": "",
62
64
  "profession": "User profession",
63
65
  "position": "User position",
66
+ "description": "User description",
64
67
  "links": [
65
68
  {
66
69
  "path": "mailto:",
@@ -82,9 +85,9 @@
82
85
  },
83
86
  {
84
87
  "name": "User name 5",
85
- "image": "",
86
88
  "profession": "User profession",
87
89
  "position": "User position",
90
+ "description": "User description",
88
91
  "links": [
89
92
  {
90
93
  "path": "mailto:",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <!-- begin boxType 'content' -->
3
- <div v-if="boxType === 'content'" :class="['cmd-box box content', {open : open, collapsible: collapsible, 'stretch-vertically': stretchVertically}]">
3
+ <div v-if="boxType === 'content'" :class="['cmd-box box content', {open : open, collapsible: collapsible, 'stretch-vertically': stretchVertically, 'stretch-horizontally': stretchHorizontally}]">
4
4
  <template v-if="useSlots?.includes('header')">
5
5
  <!-- begin collapsible header with slot -->
6
6
  <div v-if="collapsible" class="box-header">
@@ -65,21 +65,20 @@
65
65
  <!-- end boxType 'content' -->
66
66
 
67
67
  <!-- begin boxType 'product' -->
68
- <a v-else-if="boxType === 'product' && product" :class="['cmd-box box product', {'stretch-vertically': stretchVertically}]" href="#" @click.prevent="clickOnProduct(product)">
68
+ <a v-else-if="boxType === 'product' && product" :class="['cmd-box box product', {'stretch-vertically': stretchVertically, 'stretch-horizontally': stretchHorizontally}]" href="#" @click.prevent="clickOnProduct(product)">
69
69
  <div class="box-header flex-container vertical">
70
- <img v-if="product.image" :src="product.image.src" :alt="product.image.alt"/>
70
+ <figure v-if="product.image">
71
+ <img :src="product.image.src" :alt="product.image.alt"/>
72
+ <figcaption>{{ product.name }}</figcaption>
73
+ </figure>
74
+ <p v-else>{{ product.name }}</p>
75
+
71
76
  <div class="ribbon-new" v-if="product.new">
72
77
  <span>{{ getMessage("cmdbox.productbox.new") }}</span>
73
78
  </div>
74
79
  <div v-if="product.discount" class="ribbon-discount">
75
80
  <span>{{ product.discount }}</span>
76
81
  </div>
77
- <!-- begin CmdHeadline -->
78
- <CmdHeadline
79
- v-if="cmdHeadline?.headlineText || product.name"
80
- v-bind="cmdHeadline || {}"
81
- :headlineText="cmdHeadline?.headlineText ? cmdHeadline?.headlineText : product.name"/>
82
- <!-- end CmdHeadline -->
83
82
  </div>
84
83
  <div class="box-body">
85
84
  <p v-if="product.articleNumber">{{ getMessage("cmdbox.productbox.article_no") }} {{ product.articleNumber }}</p>
@@ -92,17 +91,16 @@
92
91
  <!-- end boxType 'product' -->
93
92
 
94
93
  <!-- begin boxType 'user' -->
95
- <div v-else-if="boxType === 'user' && user" :class="['cmd-box box user', {'stretch-vertically': stretchVertically}]">
94
+ <div v-else-if="boxType === 'user' && user" :class="['cmd-box box user', {'stretch-vertically': stretchVertically,'stretch-horizontally': stretchHorizontally}]">
96
95
  <div class="box-header flex-container vertical">
97
- <img v-if="user.image" :src="user.image.src" :alt="user.image.alt"/>
98
- <div v-else :class="defaultProfileIconClass" :title="user.name"></div>
99
- <!-- begin CmdHeadline -->
100
- <CmdHeadline
101
- v-if="cmdHeadline?.headlineText || user.name"
102
- v-bind="cmdHeadline || {}"
103
- :headlineText="cmdHeadline?.headlineText ? cmdHeadline?.headlineText : user.name"
104
- />
105
- <!-- end CmdHeadline -->
96
+ <figure v-if="user.image">
97
+ <img :src="user.image.src" :alt="user.image.alt"/>
98
+ <figcaption>{{ user.name }}</figcaption>
99
+ </figure>
100
+ <div v-else>
101
+ <span :class="defaultProfileIconClass" :title="user.name"></span>
102
+ <p>{{ user.name }}</p>
103
+ </div>
106
104
  </div>
107
105
  <div class="box-body">
108
106
  <p v-if="user.profession">{{ user.profession }}</p>
@@ -246,6 +244,13 @@ export default {
246
244
  }
247
245
  }
248
246
  },
247
+ /**
248
+ * allow box to be stretched as wide as parent-element
249
+ */
250
+ stretchHorizontally: {
251
+ type: Boolean,
252
+ default: true
253
+ },
249
254
  /**
250
255
  * allow box to be stretched as high as parent-element
251
256
  */
@@ -296,17 +301,29 @@ export default {
296
301
  <style lang="scss">
297
302
  /* begin cmd-box ---------------------------------------------------------------------------------------- */
298
303
  .cmd-box {
299
- display: flex;
304
+ display: inline-flex;
300
305
  flex-direction: column;
301
306
  padding: 0;
302
307
 
303
- > .cmd-custom-headline {
308
+ &.stretch-horizontally {
309
+ display: flex;
310
+ }
311
+
312
+ > .cmd-headline {
304
313
  margin-bottom: 0;
305
314
  }
306
315
 
307
316
  &.collapsible {
308
317
  .box-header {
309
318
  justify-content: space-between;
319
+
320
+ &:hover, &:active, &:focus {
321
+ background: var(--pure-white);
322
+
323
+ * {
324
+ color: var(--text-color);
325
+ }
326
+ }
310
327
  }
311
328
  }
312
329
 
@@ -331,7 +348,7 @@ export default {
331
348
  border-top-left-radius: var(--border-radius);
332
349
  border-top-right-radius: var(--border-radius);
333
350
  padding: calc(var(--default-padding) / 2) var(--default-padding);
334
- background: var(--primary-color);
351
+ background: var(--medium-gray);
335
352
  color: var(--pure-white);
336
353
  text-decoration: none;
337
354
 
@@ -349,16 +366,6 @@ export default {
349
366
  }
350
367
  }
351
368
 
352
- .box-header {
353
- &:hover, &:active, &:focus {
354
- background: var(--pure-white);
355
-
356
- * {
357
- color: var(--primary-color);
358
- }
359
- }
360
- }
361
-
362
369
  .box-body {
363
370
  flex-grow: 1;
364
371
  padding: 0;
@@ -466,9 +473,15 @@ export default {
466
473
  margin: 0 auto;
467
474
  }
468
475
 
469
- > img {
476
+ img {
470
477
  border: 0;
471
478
  }
479
+
480
+ figcaption {
481
+ font-size: 2rem;
482
+ font-weight: bold;
483
+ padding-top: var(--default-padding)
484
+ }
472
485
  }
473
486
 
474
487
  .box-body {
@@ -479,7 +492,7 @@ export default {
479
492
  }
480
493
 
481
494
  .price {
482
- font-size: 2rem;
495
+ font-size: 1.8rem;
483
496
  font-weight: bold;
484
497
 
485
498
  span:last-child {
@@ -495,6 +508,8 @@ export default {
495
508
 
496
509
  &.user {
497
510
  > .box-header {
511
+ --icon-size: 6rem;
512
+
498
513
  padding: var(--default-padding);
499
514
 
500
515
  .cmd-headline {
@@ -504,14 +519,30 @@ export default {
504
519
  }
505
520
  }
506
521
 
507
- > img, > div:first-child {
522
+ img, > div:first-child > [class*="icon"] {
508
523
  display: table;
509
- margin: 0 auto;
524
+ margin: 0 auto var(--default-margin) auto;
510
525
  padding: calc(var(--default-padding) * 3);
511
526
  border-radius: var(--full-circle);
512
527
  background: var(--primary-color);
513
- font-size: 6rem;
514
528
  color: var(--pure-white);
529
+
530
+ & + p, & + figcaption {
531
+ margin: 0 auto;
532
+ text-align: center;
533
+ font-weight: bold;
534
+ font-size: 2rem;
535
+ }
536
+ }
537
+
538
+ img {
539
+ padding: 0;
540
+ width: calc(var(--icon-size) * 2);
541
+ aspect-ratio: 1/1;
542
+ }
543
+
544
+ > div:first-child > [class*="icon"] {
545
+ font-size: var(--icon-size);
515
546
  }
516
547
  }
517
548
 
@@ -172,6 +172,12 @@ export default {
172
172
  }
173
173
 
174
174
  > .flex-container {
175
+ .cmd-headline {
176
+ > * {
177
+ white-space: nowrap;
178
+ }
179
+ }
180
+
175
181
  &.one-box-per-row {
176
182
  flex-direction: column;
177
183
  }
@@ -41,8 +41,6 @@
41
41
  v-if="navigationEntry.type === 'router'"
42
42
  :to="getRoute(navigationEntry)"
43
43
  :title="navigationEntry.tooltip"
44
- :target="navigationEntry.target"
45
- @click="executeLink($event, navigationEntry)"
46
44
  >
47
45
  <span v-if="navigationEntry.iconClass" :class="navigationEntry.iconClass"></span>
48
46
  <span v-if="navigationEntry.text">{{ navigationEntry.text }}</span>
@@ -83,6 +83,11 @@
83
83
  ]
84
84
  }
85
85
  },
86
+ "stretchHorizontally": {
87
+ "comments": [
88
+ "allow box to be stretched as wide as parent-element"
89
+ ]
90
+ },
86
91
  "stretchVertically": {
87
92
  "comments": [
88
93
  "allow box to be stretched as high as parent-element"