comand-component-library 3.1.96 → 3.1.98

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.96",
3
+ "version": "3.1.98",
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>
@@ -20,6 +20,7 @@
20
20
  "name": "User name 2",
21
21
  "profession": "User profession",
22
22
  "position": "User position",
23
+ "description": "User description",
23
24
  "links": [
24
25
  {
25
26
  "path": "mailto:",
@@ -38,6 +39,7 @@
38
39
  "name": "User name 3",
39
40
  "profession": "User profession",
40
41
  "position": "User position",
42
+ "description": "User with a long text as description that wraps over multiple lines",
41
43
  "links": [
42
44
  {
43
45
  "path": "mailto:",
@@ -61,6 +63,7 @@
61
63
  "name": "User name 4",
62
64
  "profession": "User profession",
63
65
  "position": "User position",
66
+ "description": "User description",
64
67
  "links": [
65
68
  {
66
69
  "path": "mailto:",
@@ -84,6 +87,7 @@
84
87
  "name": "User name 5",
85
88
  "profession": "User profession",
86
89
  "position": "User position",
90
+ "description": "User description",
87
91
  "links": [
88
92
  {
89
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,7 +65,7 @@
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
70
  <figure v-if="product.image">
71
71
  <img :src="product.image.src" :alt="product.image.alt"/>
@@ -91,7 +91,7 @@
91
91
  <!-- end boxType 'product' -->
92
92
 
93
93
  <!-- begin boxType 'user' -->
94
- <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}]">
95
95
  <div class="box-header flex-container vertical">
96
96
  <figure v-if="user.image">
97
97
  <img :src="user.image.src" :alt="user.image.alt"/>
@@ -244,6 +244,13 @@ export default {
244
244
  }
245
245
  }
246
246
  },
247
+ /**
248
+ * allow box to be stretched as wide as parent-element
249
+ */
250
+ stretchHorizontally: {
251
+ type: Boolean,
252
+ default: true
253
+ },
247
254
  /**
248
255
  * allow box to be stretched as high as parent-element
249
256
  */
@@ -294,17 +301,29 @@ export default {
294
301
  <style lang="scss">
295
302
  /* begin cmd-box ---------------------------------------------------------------------------------------- */
296
303
  .cmd-box {
297
- display: flex;
304
+ display: inline-flex;
298
305
  flex-direction: column;
299
306
  padding: 0;
300
307
 
301
- > .cmd-custom-headline {
308
+ &.stretch-horizontally {
309
+ display: flex;
310
+ }
311
+
312
+ > .cmd-headline {
302
313
  margin-bottom: 0;
303
314
  }
304
315
 
305
316
  &.collapsible {
306
317
  .box-header {
307
318
  justify-content: space-between;
319
+
320
+ &:hover, &:active, &:focus {
321
+ background: var(--pure-white);
322
+
323
+ * {
324
+ color: var(--text-color);
325
+ }
326
+ }
308
327
  }
309
328
  }
310
329
 
@@ -329,7 +348,7 @@ export default {
329
348
  border-top-left-radius: var(--border-radius);
330
349
  border-top-right-radius: var(--border-radius);
331
350
  padding: calc(var(--default-padding) / 2) var(--default-padding);
332
- background: var(--primary-color);
351
+ background: var(--medium-gray);
333
352
  color: var(--pure-white);
334
353
  text-decoration: none;
335
354
 
@@ -347,16 +366,6 @@ export default {
347
366
  }
348
367
  }
349
368
 
350
- .box-header {
351
- &:hover, &:active, &:focus {
352
- background: var(--pure-white);
353
-
354
- * {
355
- color: var(--primary-color);
356
- }
357
- }
358
- }
359
-
360
369
  .box-body {
361
370
  flex-grow: 1;
362
371
  padding: 0;
@@ -464,9 +473,15 @@ export default {
464
473
  margin: 0 auto;
465
474
  }
466
475
 
467
- > img {
476
+ img {
468
477
  border: 0;
469
478
  }
479
+
480
+ figcaption {
481
+ font-size: 2rem;
482
+ font-weight: bold;
483
+ padding-top: var(--default-padding)
484
+ }
470
485
  }
471
486
 
472
487
  .box-body {
@@ -477,7 +492,7 @@ export default {
477
492
  }
478
493
 
479
494
  .price {
480
- font-size: 2rem;
495
+ font-size: 1.8rem;
481
496
  font-weight: bold;
482
497
 
483
498
  span:last-child {
@@ -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>
@@ -72,9 +70,7 @@
72
70
  <!-- begin type === router -->
73
71
  <router-link v-if="navigationSubEntry.type === 'router'"
74
72
  :to="getRoute(navigationSubEntry)"
75
- :title="navigationSubEntry.tooltip"
76
- :target="navigationSubEntry.target"
77
- @click="executeLink($event, navigationSubEntry)">
73
+ :title="navigationSubEntry.tooltip">
78
74
  <span v-if="navigationSubEntry.iconClass" :class="navigationSubEntry.iconClass"></span>
79
75
  <span v-if="navigationSubEntry.text">{{ navigationSubEntry.text }}</span>
80
76
  <span v-if="navigationSubEntry.subentries && navigationSubEntry.subentries.length > 0"
@@ -103,9 +99,7 @@
103
99
  <!-- begin type === router -->
104
100
  <router-link v-if="navigationEntry.type === 'router'"
105
101
  :to="getRoute(navigationSubSubEntry)"
106
- :target="navigationSubSubEntry.target"
107
- :title="navigationSubSubEntry.tooltip"
108
- @click="executeLink($event, navigationSubSubEntry)">
102
+ :target="navigationSubSubEntry.target">
109
103
  <span v-if="navigationSubSubEntry.iconClass" :class="navigationSubSubEntry.iconClass"></span>
110
104
  <span v-if="navigationSubSubEntry.text">{{ navigationSubSubEntry.text }}</span>
111
105
  <span v-if="navigationSubSubEntry.subentries && navigationSubSubEntry.subentries.length > 0"
@@ -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"