comand-component-library 4.2.39 → 4.2.40

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.
@@ -0,0 +1,81 @@
1
+ <template>
2
+ <section :class="['cmd-section flex-container', {box: styleAsBox, 'vertical': orientation === 'vertical'}]">
3
+ <!-- begin CmdHeadline -->
4
+ <CmdHeadline
5
+ v-if="cmdHeadline?.headlineText"
6
+ v-bind="cmdHeadlineProperties"
7
+ />
8
+ <!-- end CmdHeadline -->
9
+
10
+ <!-- begin content provided by property -->
11
+ <div v-if="content && !useSlot" v-html="content"></div>
12
+ <!-- end content provided by property -->
13
+
14
+ <!-- begin slot -->
15
+ <slot v-else></slot>
16
+ <!-- end slot -->
17
+ </section>
18
+ </template>
19
+
20
+ <script>
21
+ export default {
22
+ name: "CmdSection",
23
+ props: {
24
+ /**
25
+ * provide content for section
26
+ */
27
+ content: {
28
+ type: String,
29
+ required: false
30
+ },
31
+ /**
32
+ * define if (default) slot should be used
33
+ */
34
+ useSlot: {
35
+ type: Boolean,
36
+ default: false
37
+ },
38
+ /**
39
+ * set if section should be styled as box
40
+ */
41
+ styleAsBox: {
42
+ type: Boolean,
43
+ default: false
44
+ },
45
+ /**
46
+ * set orientation for content
47
+ *
48
+ * @allowedValues: horizontal, vertical
49
+ */
50
+ orientation: {
51
+ type: String,
52
+ default: "vertical"
53
+ },
54
+ /**
55
+ * set properties for CmdHeadline-component
56
+ *
57
+ * @requiredForAccessibility: true
58
+ */
59
+ cmdHeadline: {
60
+ type: Object,
61
+ default: false
62
+ }
63
+ },
64
+ computed: {
65
+ cmdHeadlineProperties() {
66
+ return {
67
+ headlineLevel: 2,
68
+ ...this.cmdHeadline
69
+ }
70
+ }
71
+ }
72
+ }
73
+ </script>
74
+
75
+ <style>
76
+ .cmd-section {
77
+ &:not(.box) {
78
+ padding: 0;
79
+ }
80
+ }
81
+ </style>
package/src/index.js CHANGED
@@ -34,6 +34,7 @@ export { default as CmdPagination } from '@/components/CmdPagination.vue'
34
34
  export { default as CmdPageFooter } from '@/components/CmdPageFooter.vue'
35
35
  export { default as CmdPageHeader } from '@/components/CmdPageHeader.vue'
36
36
  export { default as CmdProgressBar } from '@/components/CmdProgressBar.vue'
37
+ export { default as CmdSection } from '@/components/CmdSection.vue'
37
38
  export { default as CmdSidebar } from '@/components/CmdSidebar.vue'
38
39
  export { default as CmdSiteFooter } from '@/components/CmdSiteFooter.vue'
39
40
  export { default as CmdSiteHeader } from '@/components/CmdSiteHeader.vue'