comand-component-library 3.1.44 → 3.1.47

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. package/dist/comand-component-library.css +1 -1
  2. package/dist/comand-component-library.umd.min.js +1 -1
  3. package/package.json +47 -41
  4. package/src/App.vue +373 -135
  5. package/src/ComponentDocumentation.vue +156 -0
  6. package/src/ComponentLibraryHelp.vue +20 -0
  7. package/src/assets/data/accordion.json +21 -24
  8. package/src/assets/data/address-data.json +34 -0
  9. package/src/assets/data/bank-account-data.json +22 -0
  10. package/src/assets/data/box-product.json +14 -4
  11. package/src/assets/data/box-user.json +48 -22
  12. package/src/assets/data/breadcrumbs.json +11 -3
  13. package/src/assets/data/cookie-disclaimer.json +4 -4
  14. package/src/assets/data/fake-select-colors.json +4 -0
  15. package/src/assets/data/fake-select-countries.json +12 -12
  16. package/src/assets/data/fake-select-filter-options.json +14 -0
  17. package/src/assets/data/fake-select-options-with-icons.json +6 -12
  18. package/src/assets/data/fake-select-options.json +3 -3
  19. package/src/assets/data/list-of-links-section-anchors.json +23 -0
  20. package/src/assets/data/list-of-links-top-header-navigation.json +20 -0
  21. package/src/assets/data/list-of-links.json +42 -0
  22. package/src/assets/data/main-navigation.json +48 -0
  23. package/src/assets/data/multistep-form-progress-bar.json +33 -0
  24. package/src/assets/data/select-options.json +4 -0
  25. package/src/assets/data/{share-buttons.json → share-buttons-page-by-json.json} +8 -8
  26. package/src/assets/data/share-buttons-page-by-property.json +30 -0
  27. package/src/assets/data/switch-language.json +20 -0
  28. package/src/assets/data/table-large.json +1 -1
  29. package/src/assets/data/table-small.json +1 -1
  30. package/src/assets/styles/global-styles.scss +43 -14
  31. package/src/assets/styles/transitions.scss +21 -1
  32. package/src/components/CmdAccordion.vue +43 -42
  33. package/src/components/CmdAddressData.vue +124 -56
  34. package/src/components/CmdBackToTopButton.vue +3 -3
  35. package/src/components/CmdBankAccountData.vue +104 -0
  36. package/src/components/CmdBox.vue +253 -56
  37. package/src/components/CmdBoxSiteSearch.vue +138 -39
  38. package/src/components/CmdBoxWrapper.vue +206 -0
  39. package/src/components/CmdBreadcrumbs.vue +29 -13
  40. package/src/components/CmdCompanyLogo.vue +6 -4
  41. package/src/components/CmdCookieDisclaimer.vue +99 -75
  42. package/src/components/CmdCopyrightInformation.vue +1 -1
  43. package/src/components/CmdCustomHeadline.vue +93 -0
  44. package/src/components/CmdFakeSelect.vue +330 -66
  45. package/src/components/CmdFancyBox.vue +47 -33
  46. package/src/components/CmdForm.vue +107 -0
  47. package/src/components/CmdFormElement.vue +528 -79
  48. package/src/components/CmdFormFilters.vue +25 -11
  49. package/src/components/CmdGoogleMaps.vue +9 -3
  50. package/src/components/CmdImageGallery.vue +28 -5
  51. package/src/components/CmdImageZoom.vue +9 -1
  52. package/src/components/CmdListOfLinks.vue +169 -0
  53. package/src/components/CmdLoginForm.vue +143 -63
  54. package/src/components/CmdMainNavigation.vue +140 -42
  55. package/src/components/CmdMultipleSwitch.vue +33 -2
  56. package/src/components/CmdMultistepFormProgressBar.vue +60 -10
  57. package/src/components/CmdOpeningHours.vue +36 -10
  58. package/src/components/CmdPager.vue +7 -5
  59. package/src/components/CmdProgressBar.vue +20 -3
  60. package/src/components/CmdShareButtons.vue +64 -9
  61. package/src/components/CmdSiteHeader.vue +25 -12
  62. package/src/components/CmdSlideButton.vue +5 -2
  63. package/src/components/CmdSlideshow.vue +23 -7
  64. package/src/components/CmdSwitchButton.vue +10 -3
  65. package/src/components/CmdSwitchLanguage.vue +18 -10
  66. package/src/components/CmdSystemMessage.vue +30 -17
  67. package/src/components/CmdTable.vue +15 -7
  68. package/src/components/CmdTabs.vue +43 -3
  69. package/src/components/CmdThumbnailScroller.vue +22 -6
  70. package/src/components/CmdTooltip.vue +184 -11
  71. package/src/components/CmdUploadForm.vue +198 -92
  72. package/src/components/CmdWidthLimitationWrapper.vue +9 -6
  73. package/src/composables/event.js +8 -0
  74. package/src/composables/scrollspy.js +52 -0
  75. package/src/directives/focus.js +19 -0
  76. package/src/directives/telephone.js +1 -1
  77. package/src/documentation/commonProps.js +6 -0
  78. package/src/documentation/components/ComponentCode.vue +50 -0
  79. package/src/documentation/components/ComponentProperties.vue +237 -0
  80. package/src/documentation/components/ExampleSectionWrapper.vue +46 -0
  81. package/src/documentation/components/ViewCodeData.vue +113 -0
  82. package/src/documentation/data/CmdAccordionHelp.js +22 -0
  83. package/src/documentation/data/CmdAddressDataHelp.js +17 -0
  84. package/src/documentation/data/CmdBackToTopButtonHelp.js +3 -0
  85. package/src/documentation/data/CmdBankAccountDataHelp.js +8 -0
  86. package/src/documentation/data/CmdBoxHelp.js +45 -0
  87. package/src/documentation/data/CmdBoxSiteSearchHelp.js +11 -0
  88. package/src/documentation/data/CmdBreadcrumbsHelp.js +6 -0
  89. package/src/documentation/data/CmdCompanyLogoHelp.js +8 -0
  90. package/src/documentation/data/CmdCookieDisclaimerHelp.js +9 -0
  91. package/src/documentation/data/CmdCopyrightInformation.js +2 -0
  92. package/src/documentation/data/CmdCustomHeadlineHelp.js +8 -0
  93. package/src/documentation/data/CmdFakeSelectHelp.js +60 -0
  94. package/src/documentation/data/CmdFancyBoxHelp.js +7 -0
  95. package/src/documentation/data/CmdFooterNavigationHelp.js +5 -0
  96. package/src/documentation/data/CmdFormElementHelp.js +189 -0
  97. package/src/documentation/data/CmdFormFiltersHelp.js +6 -0
  98. package/src/documentation/data/CmdFormHelp.js +10 -0
  99. package/src/documentation/data/CmdGoogleMapsHelp.js +5 -0
  100. package/src/documentation/data/CmdImageGalleryHelp.js +5 -0
  101. package/src/documentation/data/CmdImageZoomHelp.js +6 -0
  102. package/src/documentation/data/CmdListOfLinksHelp.js +24 -0
  103. package/src/documentation/data/CmdLoginFormHelp.js +6 -0
  104. package/src/documentation/data/CmdMainNavigationHelp.js +7 -0
  105. package/src/documentation/data/CmdMultistepFormProgressBarHelp.js +6 -0
  106. package/src/documentation/data/CmdOpeningHoursHelp.js +10 -0
  107. package/src/documentation/data/CmdPagerHelp.js +7 -0
  108. package/src/documentation/data/CmdProgressBarHelp.js +13 -0
  109. package/src/documentation/data/CmdShareButtonsHelp.js +13 -0
  110. package/src/documentation/data/CmdSiteHeaderHelp.js +21 -0
  111. package/src/documentation/data/CmdSlideButtonHelp.js +10 -0
  112. package/src/documentation/data/CmdSlideshowHelp.js +7 -0
  113. package/src/documentation/data/CmdSwitchLanguageHelp.js +6 -0
  114. package/src/documentation/data/CmdSystemMessageHelp.js +32 -0
  115. package/src/documentation/data/CmdTableHelp.js +14 -0
  116. package/src/documentation/data/CmdTabsHelp.js +10 -0
  117. package/src/documentation/data/CmdThumbnailScrollerHelp.js +5 -0
  118. package/src/documentation/data/CmdTooltipHelp.js +13 -0
  119. package/src/documentation/data/CmdUploadFormHelp.js +17 -0
  120. package/src/documentation/data/CmdWidthLimitationWrapperHelp.js +7 -0
  121. package/src/documentation/data/componentsDescription.json +158 -0
  122. package/src/documentation/generated/CmdAccordionPropertyDescriptions.json +57 -0
  123. package/src/documentation/generated/CmdAddressDataPropertyDescriptions.json +32 -0
  124. package/src/documentation/generated/CmdBackToTopButtonPropertyDescriptions.json +12 -0
  125. package/src/documentation/generated/CmdBankAccountDataPropertyDescriptions.json +34 -0
  126. package/src/documentation/generated/CmdBoxPropertyDescriptions.json +91 -0
  127. package/src/documentation/generated/CmdBoxSiteSearchPropertyDescriptions.json +41 -0
  128. package/src/documentation/generated/CmdBoxWrapperPropertyDescriptions.json +47 -0
  129. package/src/documentation/generated/CmdBreadcrumbsPropertyDescriptions.json +17 -0
  130. package/src/documentation/generated/CmdCompanyLogoPropertyDescriptions.json +27 -0
  131. package/src/documentation/generated/CmdCookieDisclaimerPropertyDescriptions.json +22 -0
  132. package/src/documentation/generated/CmdCustomHeadlinePropertyDescriptions.json +22 -0
  133. package/src/documentation/generated/CmdFakeSelectPropertyDescriptions.json +79 -0
  134. package/src/documentation/generated/CmdFancyBoxPropertyDescriptions.json +62 -0
  135. package/src/documentation/generated/CmdFooterNavigationPropertyDescriptions.json +17 -0
  136. package/src/documentation/generated/CmdFormElementPropertyDescriptions.json +178 -0
  137. package/src/documentation/generated/CmdFormFiltersPropertyDescriptions.json +32 -0
  138. package/src/documentation/generated/CmdFormPropertyDescriptions.json +40 -0
  139. package/src/documentation/generated/CmdGoogleMapsPropertyDescriptions.json +7 -0
  140. package/src/documentation/generated/CmdImageGalleryPropertyDescriptions.json +22 -0
  141. package/src/documentation/generated/CmdImageZoomPropertyDescriptions.json +12 -0
  142. package/src/documentation/generated/CmdListOfLinksPropertyDescriptions.json +60 -0
  143. package/src/documentation/generated/CmdLoginFormPropertyDescriptions.json +90 -0
  144. package/src/documentation/generated/CmdMainNavigationPropertyDescriptions.json +62 -0
  145. package/src/documentation/generated/CmdMultipleSwitchPropertyDescriptions.json +52 -0
  146. package/src/documentation/generated/CmdMultistepFormProgressBarPropertyDescriptions.json +17 -0
  147. package/src/documentation/generated/CmdOpeningHoursPropertyDescriptions.json +42 -0
  148. package/src/documentation/generated/CmdPagerPropertyDescriptions.json +37 -0
  149. package/src/documentation/generated/CmdProgressBarPropertyDescriptions.json +32 -0
  150. package/src/documentation/generated/CmdShareButtonsPropertyDescriptions.json +34 -0
  151. package/src/documentation/generated/CmdSiteHeaderPropertyDescriptions.json +27 -0
  152. package/src/documentation/generated/CmdSlideButtonPropertyDescriptions.json +25 -0
  153. package/src/documentation/generated/CmdSlideshowPropertyDescriptions.json +42 -0
  154. package/src/documentation/generated/CmdSwitchButtonPropertyDescriptions.json +79 -0
  155. package/src/documentation/generated/CmdSwitchLanguagePropertyDescriptions.json +7 -0
  156. package/src/documentation/generated/CmdSystemMessagePropertyDescriptions.json +40 -0
  157. package/src/documentation/generated/CmdTablePropertyDescriptions.json +62 -0
  158. package/src/documentation/generated/CmdTabsPropertyDescriptions.json +27 -0
  159. package/src/documentation/generated/CmdThumbnailScrollerPropertyDescriptions.json +32 -0
  160. package/src/documentation/generated/CmdTooltipPropertyDescriptions.json +17 -0
  161. package/src/documentation/generated/CmdUploadFormPropertyDescriptions.json +90 -0
  162. package/src/documentation/generated/CmdWidthLimitationWrapperPropertyDescriptions.json +41 -0
  163. package/src/documentation/generated/frameworkIcons.json +730 -0
  164. package/src/documentation/generated/logosIcons.json +110 -0
  165. package/src/documentation/tabs.js +46 -0
  166. package/src/documentation/views/ContainerPage.vue +237 -0
  167. package/src/documentation/views/HelpHome.vue +13 -0
  168. package/src/documentation/views/IconFont.vue +80 -0
  169. package/src/documentation/views/components/CmdAccordionHelp.vue +78 -0
  170. package/src/documentation/views/components/CmdAddressDataHelp.vue +65 -0
  171. package/src/documentation/views/components/CmdBackToTopButtonHelp.vue +62 -0
  172. package/src/documentation/views/components/CmdBankAccountDataHelp.vue +88 -0
  173. package/src/documentation/views/components/CmdBoxHelp.vue +137 -0
  174. package/src/documentation/views/components/CmdBoxSiteSearchHelp.vue +60 -0
  175. package/src/documentation/views/components/CmdBoxWrapperHelp.vue +111 -0
  176. package/src/documentation/views/components/CmdBreadcrumbsHelp.vue +51 -0
  177. package/src/documentation/views/components/CmdCompanyLogoHelp.vue +48 -0
  178. package/src/documentation/views/components/CmdCookieDisclaimerHelp.vue +105 -0
  179. package/src/documentation/views/components/CmdCustomHeadlineHelp.vue +53 -0
  180. package/src/documentation/views/components/CmdFakeSelectHelp.vue +175 -0
  181. package/src/documentation/views/components/CmdFancyBoxHelp.vue +79 -0
  182. package/src/documentation/views/components/CmdFormElementHelp.vue +412 -0
  183. package/src/documentation/views/components/CmdFormFiltersHelp.vue +69 -0
  184. package/src/documentation/views/components/CmdFormHelp.vue +41 -0
  185. package/src/documentation/views/components/CmdGoogleMapsHelp.vue +55 -0
  186. package/src/documentation/views/components/CmdImageGalleryHelp.vue +46 -0
  187. package/src/documentation/views/components/CmdImageZoomHelp.vue +34 -0
  188. package/src/documentation/views/components/CmdListOfLinksHelp.vue +64 -0
  189. package/src/documentation/views/components/CmdLoginFormHelp.vue +117 -0
  190. package/src/documentation/views/components/CmdMainNavigationHelp.vue +94 -0
  191. package/src/documentation/views/components/CmdMultistepFormProgressBarHelp.vue +49 -0
  192. package/src/documentation/views/components/CmdOpeningHoursHelp.vue +49 -0
  193. package/src/documentation/views/components/CmdPagerHelp.vue +57 -0
  194. package/src/documentation/views/components/CmdProgressBarHelp.vue +47 -0
  195. package/src/documentation/views/components/CmdShareButtonsHelp.vue +65 -0
  196. package/src/documentation/views/components/CmdSiteHeaderHelp.vue +72 -0
  197. package/src/documentation/views/components/CmdSlideButtonHelp.vue +90 -0
  198. package/src/documentation/views/components/CmdSlideshowHelp.vue +60 -0
  199. package/src/documentation/views/components/CmdSwitchLanguageHelp.vue +64 -0
  200. package/src/documentation/views/components/CmdSystemMessageHelp.vue +86 -0
  201. package/src/documentation/views/components/CmdTableHelp.vue +84 -0
  202. package/src/documentation/views/components/CmdTabsHelp.vue +52 -0
  203. package/src/documentation/views/components/CmdThumbnailScrollerHelp.vue +50 -0
  204. package/src/documentation/views/components/CmdTooltipHelp.vue +59 -0
  205. package/src/documentation/views/components/CmdUploadFormHelp.vue +59 -0
  206. package/src/documentation/views/components/CmdWidthLimitationWrapperHelp.vue +46 -0
  207. package/src/index.js +7 -3
  208. package/src/main.js +25 -15
  209. package/src/mixins/CmdAddressData/DefaultMessageProperties.js +17 -0
  210. package/src/mixins/CmdBox/DefaultMessageProperties.js +10 -0
  211. package/src/mixins/CmdFakeSelect/DefaultMessageProperties.js +9 -0
  212. package/src/mixins/CmdFormElement/DefaultMessageProperties.js +9 -0
  213. package/src/mixins/CmdImageGallery/DefaultMessageProperties.js +9 -0
  214. package/src/mixins/CmdSiteSearch/DefaultMessageProperties.js +14 -0
  215. package/src/mixins/CmdUploadForm/DefaultMessageProperties.js +5 -1
  216. package/src/mixins/FieldValidation.js +220 -0
  217. package/src/mixins/GlobalDefaultMessageProperties.js +15 -0
  218. package/src/mixins/Tooltip.js +26 -0
  219. package/src/router/index.js +67 -0
  220. package/src/utilities.js +3 -6
  221. package/src/utils/common.js +6 -0
  222. package/src/utils/dom.js +8 -0
  223. package/src/utils/globalSequence.js +13 -0
  224. package/src/utils/string.js +8 -0
  225. package/src/assets/data/address.json +0 -13
  226. package/src/assets/data/footer-navigation.json +0 -38
  227. package/src/assets/data/languages.json +0 -31
  228. package/src/assets/data/multisteps.json +0 -27
  229. package/src/assets/data/navigation.json +0 -47
  230. package/src/assets/data/pager.json +0 -11
  231. package/src/assets/data/top-header-navigation.json +0 -27
  232. package/src/components/CmdFooterNavigation.vue +0 -71
  233. package/src/components/CmdMainHeadline.vue +0 -75
  234. package/src/components/CmdTopHeaderNavigation.vue +0 -88
@@ -0,0 +1,206 @@
1
+ <template>
2
+ <div class="cmd-box-wrapper">
3
+ <div v-if="allowUserToToggleView || allowTogglingCollapsingBoxes" class="flex-container no-flex toggle-view">
4
+ <a v-if="allowTogglingCollapsingBoxes" href="#" @click.prevent="toggleCollapsingBoxes" :title="collapsingBoxesOpen ? collapseBoxesIcon.tooltip : expandBoxesIcon.tooltip">
5
+ <span :class="collapsingBoxesOpen ? expandBoxesIcon.iconClass : collapseBoxesIcon.iconClass"></span>
6
+ </a>
7
+ <a v-if="allowUserToToggleView" href="#" @click.prevent="oneBoxPerRow = !oneBoxPerRow" :title="oneBoxPerRow ? iconRowView.tooltip : iconGridView.tooltip">
8
+ <span :class="oneBoxPerRow ? iconGridView.iconClass : iconRowView.iconClass"></span>
9
+ </a>
10
+ </div>
11
+ <div :class="[useFlexbox ? 'flex-container' : 'grid-container-create-columns', {'one-box-per-row': oneBoxPerRow}]">
12
+ <slot :collapsingBoxesOpen="collapsingBoxesOpen" :boxToggled="boxToggled" :currentOpenBox="currentOpenBox"></slot>
13
+ </div>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ name: "CmdBoxWrapper",
20
+ data() {
21
+ return {
22
+ oneBoxPerRow: this.useRowViewAsDefault,
23
+ collapsingBoxesOpen: true,
24
+ currentOpenBox: 0
25
+ }
26
+ },
27
+ props: {
28
+ /**
29
+ * activate if boxes should be arranged vertically (each box is a row) by default
30
+ */
31
+ useRowViewAsDefault: {
32
+ type: Boolean,
33
+ default: false
34
+ },
35
+ /**
36
+ * activate if user can toggle grid- and row-view by himself
37
+ */
38
+ allowUserToToggleView: {
39
+ type: Boolean,
40
+ default: true
41
+ },
42
+ /**
43
+ * activate if user can toggle grid- and row-view by himself
44
+ */
45
+ allowTogglingCollapsingBoxes: {
46
+ type: Boolean,
47
+ default: false
48
+ },
49
+ /**
50
+ * icon for collapsed box
51
+ */
52
+ collapseBoxesIcon: {
53
+ type: Object,
54
+ default() {
55
+ return {
56
+ iconClass: "icon-double-arrow-down",
57
+ tooltip: "Collapse all boxes"
58
+ }
59
+ }
60
+ },
61
+ /**
62
+ * icon for expanded box
63
+ */
64
+ expandBoxesIcon: {
65
+ type: Object,
66
+ default() {
67
+ return {
68
+ iconClass: "icon-double-arrow-up",
69
+ tooltip: "Expand all boxes"
70
+ }
71
+ }
72
+ },
73
+ /**
74
+ * activate if you want to use a flex-container instead of a css-grid-container
75
+ */
76
+ useFlexbox: {
77
+ type: Boolean,
78
+ default: false
79
+ },
80
+ /**
81
+ * define the number of boxes per row (if view is grid-view)
82
+ */
83
+ boxesPerRow: {
84
+ type: [Number, Array],
85
+ default: 4
86
+ },
87
+ /**
88
+ * define icon for grid-view
89
+ */
90
+ iconGridView: {
91
+ type: Object,
92
+ default
93
+ () {
94
+ return {
95
+ iconClass: 'icon-blocks-small',
96
+ tooltip: 'Toggle to row view'
97
+ }
98
+ }
99
+ }
100
+ ,
101
+ /**
102
+ * define icon for row-view
103
+ */
104
+ iconRowView: {
105
+ type: Object,
106
+ default () {
107
+ return {
108
+ iconClass: 'icon-rows',
109
+ tooltip: 'Toggle to grid view'
110
+ }
111
+ }
112
+ }
113
+ },
114
+ computed: {
115
+ // if a custom grid is used, the number of boxes per row (in grid-view) can be customized
116
+ boxesPerRowLarge() {
117
+ return this.boxesPerRowResponsive(0, 4)
118
+ }
119
+ ,
120
+ boxesPerRowMedium() {
121
+ return this.boxesPerRowResponsive(1, 3)
122
+ }
123
+ ,
124
+ boxesPerRowSmall() {
125
+ return this.boxesPerRowResponsive(2, 1)
126
+ }
127
+ }
128
+ ,
129
+ methods: {
130
+ boxesPerRowResponsive(index, defaultBoxesPerRow) {
131
+ // show only one box per row in row-view
132
+ if (this.allowUserToToggleView && this.oneBoxPerRow) {
133
+ return 1
134
+ }
135
+
136
+ // if a boxes per row is defined
137
+ if (typeof this.boxesPerRow === 'number') {
138
+ if (index === 0) {
139
+ return this.boxesPerRow
140
+ }
141
+ return Math.min(this.boxesPerRow, defaultBoxesPerRow)
142
+ }
143
+
144
+ if (this.boxesPerRow.length > index) {
145
+ return this.boxesPerRow[index]
146
+ }
147
+
148
+ return defaultBoxesPerRow
149
+ },
150
+ toggleCollapsingBoxes() {
151
+ this.collapsingBoxesOpen = !this.collapsingBoxesOpen
152
+ },
153
+ boxToggled(boxIndex, open) {
154
+ this.currentOpenBox = open ? boxIndex : 0
155
+ }
156
+ },
157
+ watch: {
158
+ useRowViewAsDefault() {
159
+ this.oneBoxPerRow = this.useRowViewAsDefault
160
+ }
161
+ }
162
+ }
163
+ </script>
164
+
165
+ <style lang="scss">
166
+ /* begin cmd-box-wrapper ---------------------------------------------------------------------------------------- */
167
+ @import '../assets/styles/variables';
168
+
169
+ .cmd-box-wrapper {
170
+ > .toggle-view {
171
+ justify-content: flex-end;
172
+ }
173
+
174
+ > .flex-container {
175
+ &.one-box-per-row {
176
+ flex-direction: column;
177
+ }
178
+ }
179
+
180
+ > .grid-container-create-columns {
181
+ grid-template-columns: repeat(v-bind(boxesPerRowLarge), minmax(0, 1fr));
182
+ }
183
+
184
+ .cmd-box {
185
+ &.content {
186
+ &.collapsible {
187
+ align-self: flex-start;
188
+ }
189
+ }
190
+ }
191
+
192
+ @media only screen and (max-width: $medium-max-width) {
193
+ > .grid-container-create-columns {
194
+ grid-template-columns: repeat(v-bind(boxesPerRowMedium), minmax(0, 1fr));
195
+ }
196
+ }
197
+
198
+ @media only screen and (max-width: $small-max-width) {
199
+ > .grid-container-create-columns {
200
+ grid-template-columns: repeat(v-bind(boxesPerRowSmall), minmax(0, 1fr));
201
+ }
202
+ }
203
+ }
204
+
205
+ /* end cmd-box-wrapper ---------------------------------------------------------------------------------------- */
206
+ </style>
@@ -1,40 +1,49 @@
1
1
  <template>
2
2
  <ul class="cmd-breadcrumbs">
3
3
  <li v-if="breadcrumbLabel">{{ breadcrumbLabel }}</li>
4
- <li v-for="(link, index) in breadcrumbLinks" :key="index">
5
- <a :href="link.path" v-if="link.type === 'href'">
4
+ <li v-for="(link, index) in breadcrumbLinks || []" :key="index">
5
+ <!-- begin type 'href' -->
6
+ <a v-if="link.type === 'href'" :href="link.path">
6
7
  <span v-if="link.iconClass" :class="link.iconClass"></span>
7
8
  <span v-if="link.text">{{ link.text }}</span>
8
9
  </a>
9
- <router-link v-else-if="link.type === 'router'" :to="link.to">
10
+ <!-- end type 'href' -->
11
+
12
+ <!-- begin type 'router' -->
13
+ <router-link v-else-if="link.type === 'router'" :to="getRoute(link)">
10
14
  <span v-if="link.iconClass" :class="link.iconClass"></span>
11
15
  <span v-if="link.text">{{ link.text }}</span>
12
16
  </router-link>
17
+ <!-- end type 'router' -->
18
+
13
19
  <span v-else>
14
- <span v-if="link.iconClass" :class="link.iconClass"></span>
15
- <span v-if="link.text">{{ link.text }}</span>
16
- </span>
20
+ <span v-if="link.iconClass" :class="link.iconClass"></span>
21
+ <span v-if="link.text">{{ link.text }}</span>
22
+ </span>
17
23
  <span v-if="index < breadcrumbLinks.length - 1">{{ breadcrumbSeparator }}</span>
18
24
  </li>
19
25
  </ul>
20
26
  </template>
21
27
 
22
28
  <script>
29
+ // import functions
30
+ import {getRoute} from "../utilities.js"
31
+
23
32
  export default {
24
33
  name: "CmdBreadcrumbs",
25
34
  props: {
26
35
  /**
27
- * list of breadcrumb-links (incl. path, icon and text)
36
+ * label in front/left of breadcrumbs
28
37
  */
29
- breadcrumbLinks: {
30
- type: Array,
38
+ breadcrumbLabel: {
39
+ type: String,
31
40
  required: false
32
41
  },
33
42
  /**
34
- * label in front/left of breadcrumbs
43
+ * list of breadcrumb-links (incl. path, icon and text)
35
44
  */
36
- breadcrumbLabel: {
37
- type: String,
45
+ breadcrumbLinks: {
46
+ type: Array,
38
47
  required: false
39
48
  },
40
49
  /**
@@ -44,6 +53,11 @@ export default {
44
53
  type: String,
45
54
  default: ">"
46
55
  }
56
+ },
57
+ methods: {
58
+ getRoute(link) {
59
+ return getRoute(link)
60
+ }
47
61
  }
48
62
  }
49
63
  </script>
@@ -55,7 +69,7 @@ export default {
55
69
  margin: 0;
56
70
 
57
71
  li {
58
- display: flex;
72
+ display: inherit;
59
73
  align-items: center;
60
74
  list-style-type: none;
61
75
  margin: 0;
@@ -75,6 +89,8 @@ export default {
75
89
  }
76
90
 
77
91
  a {
92
+ display: inherit;
93
+ align-items: inherit;
78
94
  text-decoration: none;
79
95
 
80
96
  &:hover, &:active, &:focus {
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <div class="cmd-company-logo">
3
- <router-link v-if="link.type === 'router'" to="./" :title="link.tooltip">
4
- <img :src="pathCurrentLogo" :alt="altText"/>
5
- </router-link>
6
- <a v-else href="./" :title="link.tooltip">
3
+ <a v-if="link.type === 'router'" href="./" :title="link.tooltip">
7
4
  <img :src="pathCurrentLogo" :alt="altText"/>
8
5
  </a>
6
+ <router-link v-else to="./" :title="link.tooltip">
7
+ <img :src="pathCurrentLogo" :alt="altText"/>
8
+ </router-link>
9
9
  </div>
10
10
  </template>
11
11
 
@@ -43,6 +43,8 @@ export default {
43
43
  },
44
44
  /**
45
45
  * alternative text for image
46
+ *
47
+ * @requiredForAccessibility: true
46
48
  */
47
49
  altText: {
48
50
  type: String,
@@ -1,91 +1,115 @@
1
1
  <template>
2
2
  <transition name="fade">
3
- <div class="cmd-cookie-disclaimer">
4
- <h2 v-if="headline">{{ headline }}</h2>
3
+ <div class="cmd-cookie-disclaimer flex-container vertical">
4
+ <!-- begin CmdCustomHeadline -->
5
+ <CmdCustomHeadline
6
+ v-if="cmdCustomHeadline"
7
+ v-bind="cmdCustomHeadline"
8
+ />
9
+ <!-- end CmdCustomHeadline -->
10
+
11
+ <!-- begin slot for cookie-options -->
5
12
  <slot name="cookie-options">
6
- <div v-if="cookieOptions.required">
7
- <h3>{{ cookieOptions.required.headline }}</h3>
8
- <CmdAccordion :accordion-data="cookieOptions.required.cookies.length" :accordionData="2">
9
- <template v-for="(cookie, index) in cookieOptions.required.cookies"
10
- v-slot:[`accordionHeadline${index}`]
11
- :key="index">
12
- <CmdSwitchButton
13
- type="checkbox"
14
- :id="cookie.id"
15
- :labelText="cookie.labelText"
16
- v-model="cookie.checked"
17
- :status="cookie.status"
18
- disabled="disabled"
19
- />
20
- </template>
21
- <template v-for="(cookie, index) in cookieOptions.required.cookies"
22
- v-slot:[`accordionContent${index}`]
23
- :key="index">
24
- <p v-if="cookie.description">{{ cookie.description }}</p>
25
- <p v-if="cookie.linkDataPrivacy">
26
- {{ cookie.linkDataPrivacy.label }}
27
- <a @click="openDataPrivacy"
28
- :href="cookie.linkDataPrivacy.link"
29
- :target="cookie.linkDataPrivacy.target">
30
- {{ cookie.linkDataPrivacy.linkText }}
31
- </a>
32
- </p>
33
- <div v-if="dataPrivacyContent" v-html="dataPrivacyContent"></div>
34
- </template>
35
- </CmdAccordion>
36
- </div>
13
+ <div v-if="cookieOptions.required">
14
+ <h3>{{ cookieOptions.required.headline }}</h3>
15
+
16
+ <!-- begin CmdAccordion -->
17
+ <CmdAccordion :accordion-data="cookieOptions.required.cookies.length" :accordionData="2">
18
+ <template v-for="(cookie, index) in cookieOptions.required.cookies"
19
+ v-slot:[`accordionHeadline${index}`]
20
+ :key="index">
21
+ <!-- begin CmdSwitchButton -->
22
+ <CmdSwitchButton
23
+ type="checkbox"
24
+ :id="cookie.id"
25
+ :labelText="cookie.labelText"
26
+ v-model="cookie.checked"
27
+ :status="cookie.status"
28
+ disabled="disabled"
29
+ />
30
+ <!-- end CmdSwitchButton -->
31
+ </template>
32
+ <template v-for="(cookie, index) in cookieOptions.required.cookies"
33
+ v-slot:[`accordionContent${index}`]
34
+ :key="index">
35
+ <p v-if="cookie.description">{{ cookie.description }}</p>
36
+ <p v-if="cookie.linkDataPrivacy">
37
+ {{ cookie.linkDataPrivacy.label }}
38
+ <a @click="openDataPrivacy"
39
+ :href="cookie.linkDataPrivacy.link"
40
+ :target="cookie.linkDataPrivacy.target">
41
+ {{ cookie.linkDataPrivacy.linkText }}
42
+ </a>
43
+ </p>
44
+ <div v-if="dataPrivacyContent" v-html="dataPrivacyContent"></div>
45
+ </template>
46
+ </CmdAccordion>
47
+ <!-- end CmdAccordion -->
48
+ </div>
37
49
  <hr />
38
- <div v-if="cookieOptions.optional">
39
- <h3>{{ cookieOptions.optional.headline }}</h3>
40
- <CmdAccordion :accordion-data="cookieOptions.optional.cookies.length" :accordionData="2">
41
- <template v-for="(cookie, index) in cookieOptions.optional.cookies"
42
- v-slot:[`accordionHeadline${index}`]
43
- :key="index">
44
- <CmdSwitchButton
45
- type="checkbox"
46
- :id="cookie.id"
47
- :labelText="cookie.labelText"
48
- v-model="cookie.checked"
49
- :status="cookie.status"
50
- />
51
- </template>
52
- <template v-for="(cookie, index) in cookieOptions.optional.cookies"
53
- v-slot:[`accordionContent${index}`]
54
- :key="index">
55
- <p>{{ cookie.description }}</p>
56
- <p v-if="cookie.linkDataPrivacy">
57
- {{ cookie.linkDataPrivacy.label }}
58
- <a @click="openDataPrivacy" :href="cookie.linkDataPrivacy.link"
59
- :target="cookie.linkDataPrivacy.target">{{ cookie.linkDataPrivacy.linkText }}</a>
60
- </p>
61
- <div v-if="dataPrivacyContent" v-html="dataPrivacyContent"></div>
62
- </template>
63
- </CmdAccordion>
64
- </div>
65
- </slot>
66
- <slot name="privacy-text">
50
+ <div v-if="cookieOptions.optional">
51
+ <h3>{{ cookieOptions.optional.headline }}</h3>
52
+ <!-- begin CmdAccordion -->
53
+ <CmdAccordion :accordion-data="cookieOptions.optional.cookies.length" :accordionData="2">
54
+ <template v-for="(cookie, index) in cookieOptions.optional.cookies"
55
+ v-slot:[`accordionHeadline${index}`]
56
+ :key="index">
57
+ <!-- begin CmdSwitchButton -->
58
+ <CmdSwitchButton
59
+ type="checkbox"
60
+ :id="cookie.id"
61
+ :labelText="cookie.labelText"
62
+ v-model="cookie.checked"
63
+ :status="cookie.status"
64
+ />
65
+ <!-- end CmdSwitchButton -->
66
+ </template>
67
+ <template v-for="(cookie, index) in cookieOptions.optional.cookies"
68
+ v-slot:[`accordionContent${index}`]
69
+ :key="index">
70
+ <p>{{ cookie.description }}</p>
71
+ <p v-if="cookie.linkDataPrivacy">
72
+ {{ cookie.linkDataPrivacy.label }}
73
+ <a @click="openDataPrivacy" :href="cookie.linkDataPrivacy.link"
74
+ :target="cookie.linkDataPrivacy.target">{{ cookie.linkDataPrivacy.linkText }}</a>
75
+ </p>
76
+ <div v-if="dataPrivacyContent" v-html="dataPrivacyContent"></div>
77
+ </template>
78
+ </CmdAccordion>
79
+ <!-- end CmdAccordion -->
80
+ </div>
67
81
  </slot>
82
+ <!-- end slot for cookie-options -->
83
+
84
+ <!-- begin slot for privacy-text -->
85
+ <slot name="privacy-text"></slot>
86
+ <!-- end slot for privacy-text -->
87
+
88
+ <!-- begin button-wrapper for 'accept'-buttons -->
68
89
  <div class="button-wrapper align-center">
69
- <button type="button" @click="acceptCookies('currentSettings')" v-if="buttonLabelAcceptCurrentSettings">
70
- {{ buttonLabelAcceptCurrentSettings }}
90
+ <button v-if="buttonLabelAcceptCurrentSettings" type="button" @click="acceptCookies('currentSettings')">
91
+ <span>{{ buttonLabelAcceptCurrentSettings }}</span>
71
92
  </button>
72
- <button type="button" class="primary" @click="acceptCookies('allCookies')"
73
- v-if="buttonLabelAcceptAllCookies">
74
- {{ buttonLabelAcceptAllCookies }}
93
+ <button v-if="buttonLabelAcceptAllCookies" type="button" class="primary" @click="acceptCookies('allCookies')">
94
+ <span>{{ buttonLabelAcceptAllCookies }}</span>
75
95
  </button>
76
96
  </div>
97
+ <!-- end button-wrapper for 'accept'-buttons -->
77
98
  </div>
78
99
  </transition>
79
100
  </template>
80
101
 
81
102
  <script>
82
- import CmdAccordion from "./CmdAccordion";
83
- import CmdSwitchButton from "./CmdSwitchButton";
103
+ // import components
104
+ import CmdAccordion from "./CmdAccordion"
105
+ import CmdCustomHeadline from "./CmdCustomHeadline"
106
+ import CmdSwitchButton from "./CmdSwitchButton"
84
107
 
85
108
  export default {
86
109
  name: "CmdCookieDisclaimer",
87
110
  components: {
88
111
  CmdAccordion,
112
+ CmdCustomHeadline,
89
113
  CmdSwitchButton
90
114
  },
91
115
  data() {
@@ -96,10 +120,10 @@ export default {
96
120
  },
97
121
  props: {
98
122
  /**
99
- * headline show above content
123
+ * properties for CmdCustomHeadline-component
100
124
  */
101
- headline: {
102
- type: String,
125
+ cmdCustomHeadline: {
126
+ type: Object,
103
127
  required: false
104
128
  },
105
129
  /**
@@ -178,10 +202,10 @@ export default {
178
202
  }
179
203
  }
180
204
  }
205
+ }
181
206
 
182
- .toggle-switch {
183
- display: flex;
184
- }
207
+ .toggle-switch {
208
+ display: flex;
185
209
  }
186
210
  }
187
211
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="cmd-copyright-information">
2
+ <div class="cmd-copyright-information" role="contentinfo">
3
3
  <a href="http://www.comand-cms.com" target="_blank" lang="en" title="CoManD-Website">&copy; CoManD</a>
4
4
  </div>
5
5
  </template>
@@ -0,0 +1,93 @@
1
+ <template>
2
+ <header :class="['cmd-custom-headline', { 'has-pre-headline-text': preHeadlineText}]">
3
+ <span v-if="iconClass" :class="iconClass"></span>
4
+ <div v-if="preHeadlineText">
5
+ <span class="pre-headline-text">{{ preHeadlineText }}</span>
6
+ <component :is="getHeadlineTag">
7
+ <slot>{{ headlineText }}</slot>
8
+ </component>
9
+ </div>
10
+ <component v-else :is="getHeadlineTag">
11
+ <slot>{{ headlineText }}</slot>
12
+ </component>
13
+ </header>
14
+ </template>
15
+
16
+ <script>
17
+ export default {
18
+ name: "CmdCustomHeadline",
19
+ props: {
20
+ /**
21
+ * text for headline
22
+ */
23
+ headlineText: {
24
+ type: String,
25
+ required: true
26
+ },
27
+ /**
28
+ * level for headline
29
+ */
30
+ headlineLevel: {
31
+ type: [String, Number],
32
+ required: true
33
+ },
34
+ /**
35
+ * small pre-headline-text above main-headline
36
+ */
37
+ preHeadlineText: {
38
+ type: String,
39
+ required: false
40
+ },
41
+ /**
42
+ * icon-class for icon shown left/before headline
43
+ */
44
+ iconClass: {
45
+ type: String,
46
+ required: false
47
+ }
48
+ },
49
+ computed: {
50
+ getHeadlineTag() {
51
+ return "h" + this.headlineLevel
52
+ }
53
+ }
54
+ }
55
+ </script>
56
+
57
+ <style lang="scss">
58
+ @import '../assets/styles/variables';
59
+
60
+ /* begin cmd-custom-headline ------------------------------------------------------------------------------------------ */
61
+ .cmd-custom-headline {
62
+ display: flex;
63
+ align-items: center;
64
+ margin-bottom: var(--default-margin);
65
+ gap: calc(var(--default-gap) / 2);
66
+
67
+ &.has-pre-headline-text {
68
+ [class*="icon"] {
69
+ font-size: 5rem;
70
+ }
71
+ }
72
+
73
+ p {
74
+ margin-bottom: 0;
75
+ }
76
+
77
+ h1, h2, h3, h4, h5 ,h6 {
78
+ margin: 0;
79
+ display: flex;
80
+ align-items: center;
81
+ }
82
+
83
+ @media only screen and ($small-max-width) {
84
+ flex-direction: column;
85
+
86
+ h1 {
87
+ margin-bottom: calc(var(--default-margin) * 2);
88
+ }
89
+ }
90
+ }
91
+
92
+ /* end cmd-custom-headline ------------------------------------------------------------------------------------------ */
93
+ </style>