@carbon/vue 2.45.1 → 3.0.4-alpha.0

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.
Files changed (354) hide show
  1. package/README.md +34 -264
  2. package/dist/carbon-vue-3.common.js +27392 -0
  3. package/dist/carbon-vue-3.common.js.map +1 -0
  4. package/dist/carbon-vue-3.umd.js +27403 -0
  5. package/dist/carbon-vue-3.umd.js.map +1 -0
  6. package/dist/carbon-vue-3.umd.min.js +17 -0
  7. package/dist/carbon-vue-3.umd.min.js.map +1 -0
  8. package/dist/demo.html +1 -34
  9. package/package.json +185 -62
  10. package/src/components/CvAccordion/CvAccordion.stories.js +54 -0
  11. package/src/components/CvAccordion/CvAccordion.vue +95 -0
  12. package/src/components/CvAccordion/CvAccordionItem.vue +101 -0
  13. package/src/components/{cv-accordion/cv-accordion-skeleton.vue → CvAccordion/CvAccordionSkeleton.vue} +14 -18
  14. package/src/components/CvAccordion/_CvAccordionItemSkeleton.vue +30 -0
  15. package/src/components/CvAccordion/consts.js +17 -0
  16. package/src/components/CvAccordion/index.js +6 -0
  17. package/src/components/CvAspectRatio/CvAspectRatio.stories.js +56 -0
  18. package/src/components/CvAspectRatio/CvAspectRatio.stories.scss +4 -0
  19. package/src/components/CvAspectRatio/CvAspectRatio.vue +33 -0
  20. package/src/components/CvAspectRatio/consts.js +2 -0
  21. package/src/components/CvAspectRatio/index.js +4 -0
  22. package/src/components/CvBreadcrumb/CvBreadcrumb.stories.js +75 -0
  23. package/src/components/CvBreadcrumb/CvBreadcrumb.vue +37 -0
  24. package/src/components/CvBreadcrumb/CvBreadcrumbItem.vue +28 -0
  25. package/src/components/CvBreadcrumb/CvBreadcrumbSkeleton.vue +29 -0
  26. package/src/components/CvBreadcrumb/CvBreadcrumbSkeletonItem.vue +14 -0
  27. package/src/components/CvBreadcrumb/index.js +11 -0
  28. package/src/components/CvButton/CvButton.stories.js +119 -0
  29. package/src/components/CvButton/CvButton.vue +68 -0
  30. package/src/components/CvButton/CvButtonCommon.js +75 -0
  31. package/src/components/CvButton/CvButtonSet.stories.js +36 -0
  32. package/src/components/CvButton/CvButtonSet.vue +30 -0
  33. package/src/components/CvButton/CvIconButton.stories.js +139 -0
  34. package/src/components/CvButton/CvIconButton.vue +88 -0
  35. package/src/components/CvButton/index.js +7 -0
  36. package/src/components/CvButton/sbBtnPrefix.js +2 -0
  37. package/src/components/CvCheckbox/CvCheckbox.stories.js +111 -0
  38. package/src/components/CvCheckbox/CvCheckbox.vue +73 -0
  39. package/src/components/CvCheckbox/index.js +3 -0
  40. package/src/components/CvCodeSnippet/CvCodeSnippet.stories.js +181 -0
  41. package/src/components/CvCodeSnippet/CvCodeSnippet.stories.scss +4 -0
  42. package/src/components/CvCodeSnippet/CvCodeSnippet.vue +125 -0
  43. package/src/components/CvCodeSnippet/CvCodeSnippetSkeleton.vue +43 -0
  44. package/src/components/CvCodeSnippet/_CviCodeSnippetInline.vue +72 -0
  45. package/src/components/CvCodeSnippet/_CviCodeSnippetMultiline.vue +199 -0
  46. package/src/components/CvCodeSnippet/_CviCodeSnippetOneline.vue +106 -0
  47. package/src/components/CvCodeSnippet/consts.js +2 -0
  48. package/src/components/CvCodeSnippet/index.js +4 -0
  49. package/src/components/CvComboBox/CvComboBox.stories.js +174 -0
  50. package/src/components/CvComboBox/CvComboBox.vue +460 -0
  51. package/src/components/CvComboBox/index.js +3 -0
  52. package/src/components/CvContentSwitcher/CvContentSwitcher.stories.mdx +196 -0
  53. package/src/components/CvContentSwitcher/CvContentSwitcher.vue +64 -0
  54. package/src/components/CvContentSwitcher/CvContentSwitcherButton.vue +117 -0
  55. package/src/components/CvContentSwitcher/CvContentSwitcherContent.vue +21 -0
  56. package/src/components/CvContentSwitcher/cvContentSwitcherStore.js +30 -0
  57. package/src/components/CvContentSwitcher/index.js +3 -0
  58. package/src/components/CvCopyButton/CvCopyButton.stories.js +28 -0
  59. package/src/components/CvCopyButton/CvCopyButton.vue +45 -0
  60. package/src/components/CvCopyButton/_CviCopyButton.vue +71 -0
  61. package/src/components/CvCopyButton/index.js +3 -0
  62. package/src/components/CvDataTable/CvDataTable.stories.mdx +304 -0
  63. package/src/components/CvDataTable/CvDataTable.vue +648 -0
  64. package/src/components/CvDataTable/CvDataTableAction.vue +22 -0
  65. package/src/components/CvDataTable/CvDataTableCell.vue +11 -0
  66. package/src/components/CvDataTable/CvDataTableHeading.vue +143 -0
  67. package/src/components/CvDataTable/CvDataTableRow.vue +139 -0
  68. package/src/components/CvDataTable/CvDataTableSkeleton.vue +48 -0
  69. package/src/components/CvDataTable/_CvDataTableRowInner.vue +169 -0
  70. package/src/components/CvDataTable/cvDataTableStore.js +340 -0
  71. package/src/components/CvDataTable/index.js +3 -0
  72. package/src/components/CvEmpty/_CvEmpty.vue +22 -0
  73. package/src/components/CvGrid/CvColumn.vue +85 -0
  74. package/src/components/CvGrid/CvGrid.vue +42 -0
  75. package/src/components/{cv-grid/cv-row.vue → CvGrid/CvRow.vue} +8 -12
  76. package/src/components/CvGrid/GvGrid.stories.mdx +217 -0
  77. package/src/components/CvGrid/_SbContainer.vue +22 -0
  78. package/src/components/CvGrid/_cvColumnValidation.js +48 -0
  79. package/src/components/CvLink/CvLink.stories.js +169 -0
  80. package/src/components/CvLink/CvLink.vue +38 -0
  81. package/src/components/CvLink/index.js +4 -0
  82. package/src/components/CvList/CvList.stories.js +88 -0
  83. package/src/components/CvList/CvList.vue +50 -0
  84. package/src/components/CvList/CvListItem.vue +12 -0
  85. package/src/components/CvList/index.js +4 -0
  86. package/src/components/CvLoading/CvLoading.stories.js +78 -0
  87. package/src/components/CvLoading/CvLoading.stories.scss +4 -0
  88. package/src/components/CvLoading/CvLoading.vue +106 -0
  89. package/src/components/CvLoading/index.js +4 -0
  90. package/src/components/CvNotification/CvInlineNotification.stories.js +109 -0
  91. package/src/components/CvNotification/CvInlineNotification.vue +102 -0
  92. package/src/components/CvNotification/CvToastNotification.stories.js +108 -0
  93. package/src/components/CvNotification/CvToastNotification.vue +88 -0
  94. package/src/components/CvNotification/consts.js +31 -0
  95. package/src/components/CvNotification/index.js +5 -0
  96. package/src/components/CvOverflowMenu/CvOverflowMenu.stories.mdx +119 -0
  97. package/src/components/CvOverflowMenu/CvOverflowMenu.vue +283 -0
  98. package/src/components/{cv-overflow-menu/cv-overflow-menu-item.vue → CvOverflowMenu/CvOverflowMenuItem.vue} +26 -20
  99. package/src/components/CvOverflowMenu/index.js +3 -0
  100. package/src/components/CvPagination/CvPagination.stories.mdx +160 -0
  101. package/src/components/CvPagination/CvPagination.vue +246 -0
  102. package/src/components/CvPagination/index.js +3 -0
  103. package/src/components/CvSelect/CvSelect.stories.mdx +227 -0
  104. package/src/components/CvSelect/CvSelect.vue +224 -0
  105. package/src/components/CvSelect/CvSelectOptgroup.vue +9 -0
  106. package/src/components/CvSelect/CvSelectOption.vue +22 -0
  107. package/src/components/CvSelect/index.js +3 -0
  108. package/src/components/CvSkeletonText/CvSkeletonText.stories.js +56 -0
  109. package/src/components/CvSkeletonText/CvSkeletonText.vue +63 -0
  110. package/src/components/CvSkeletonText/index.js +3 -0
  111. package/src/components/CvSvg/_CvSvg.vue +48 -0
  112. package/src/components/CvSvg/__tests__/_TestIcon.vue +19 -0
  113. package/src/components/CvSvg/__tests__/test-svg.svg +5 -0
  114. package/src/components/CvTag/CvTag.stories.js +64 -0
  115. package/src/components/CvTag/CvTag.vue +105 -0
  116. package/src/components/CvTag/consts.js +15 -0
  117. package/src/components/CvTag/index.js +5 -0
  118. package/src/components/CvUIShell/CvHeader.vue +203 -0
  119. package/src/components/CvUIShell/CvHeaderGlobalAction.vue +105 -0
  120. package/src/components/{cv-ui-shell/cv-header-menu.vue → CvUIShell/CvHeaderMenu.vue} +41 -37
  121. package/src/components/CvUIShell/CvHeaderMenuButton.vue +103 -0
  122. package/src/components/CvUIShell/CvHeaderMenuItem.vue +38 -0
  123. package/src/components/CvUIShell/CvHeaderName.vue +25 -0
  124. package/src/components/CvUIShell/CvHeaderNav.vue +18 -0
  125. package/src/components/CvUIShell/CvHeaderPanel.vue +106 -0
  126. package/src/components/CvUIShell/CvSideNav.vue +131 -0
  127. package/src/components/CvUIShell/CvSideNavIcon.vue +17 -0
  128. package/src/components/CvUIShell/CvSideNavItems.vue +22 -0
  129. package/src/components/CvUIShell/CvSideNavLink.vue +47 -0
  130. package/src/components/CvUIShell/CvSideNavMenu.vue +85 -0
  131. package/src/components/CvUIShell/CvSideNavMenuDivider.vue +7 -0
  132. package/src/components/CvUIShell/CvSideNavMenuItem.vue +31 -0
  133. package/src/components/CvUIShell/CvSkipToContent.vue +20 -0
  134. package/src/components/CvUIShell/CvSwitcher.vue +9 -0
  135. package/src/components/CvUIShell/CvSwitcherItem.vue +9 -0
  136. package/src/components/CvUIShell/CvSwitcherItemLink.vue +26 -0
  137. package/src/components/CvUIShell/CvUIShell.stories.mdx +454 -0
  138. package/src/components/{cv-ui-shell/_cv-side-nav-footer.vue → CvUIShell/_CvSideNavFooter.vue} +11 -15
  139. package/src/components/CvUIShell/_CvSideNavLinkText.vue +9 -0
  140. package/src/components/CvWrapper/CvWrapper.js +23 -0
  141. package/src/global/component-utils/event-bus.js +23 -0
  142. package/src/global/component-utils/validators.js +14 -0
  143. package/src/global/settings.js +5 -0
  144. package/src/global/storybook-utils/__tests__/story-source-code.js +162 -0
  145. package/src/global/storybook-utils/controls-from-props.js +72 -0
  146. package/src/global/storybook-utils/index.js +5 -0
  147. package/src/global/storybook-utils/sbCompPrefix.js +1 -0
  148. package/src/global/storybook-utils/split-slot-args.js +14 -0
  149. package/src/global/storybook-utils/story-source-code.js +52 -0
  150. package/src/index.js +13 -83
  151. package/src/use/components.js +24 -0
  152. package/src/use/cvCheck.js +94 -0
  153. package/src/use/cvId.js +57 -0
  154. package/src/use/cvLink.js +42 -0
  155. package/src/use/cvTheme.js +30 -0
  156. package/src/use/index.js +1 -0
  157. package/src/use/overflow.js +37 -0
  158. package/dist/carbon-vue.common.js +0 -23411
  159. package/dist/carbon-vue.common.js.map +0 -1
  160. package/dist/carbon-vue.umd.js +0 -23421
  161. package/dist/carbon-vue.umd.js.map +0 -1
  162. package/dist/carbon-vue.umd.min.js +0 -30
  163. package/dist/carbon-vue.umd.min.js.map +0 -1
  164. package/src/assets/images/component-icons.svg +0 -57
  165. package/src/assets/images/example-icon-svg.js +0 -10
  166. package/src/assets/images/example-icon.svg +0 -6
  167. package/src/assets/images/example-icons.svg +0 -6
  168. package/src/carbon.yml +0 -442
  169. package/src/components/cv-accordion/_cv-accordion-item-skeleton.vue +0 -29
  170. package/src/components/cv-accordion/cv-accordion-item.vue +0 -87
  171. package/src/components/cv-accordion/cv-accordion.vue +0 -59
  172. package/src/components/cv-accordion/index.js +0 -5
  173. package/src/components/cv-aspect-ratio/cv-aspect-ratio.vue +0 -28
  174. package/src/components/cv-aspect-ratio/index.js +0 -2
  175. package/src/components/cv-breadcrumb/_cv-breadcrumb-item-skeleton.vue +0 -13
  176. package/src/components/cv-breadcrumb/cv-breadcrumb-item.vue +0 -28
  177. package/src/components/cv-breadcrumb/cv-breadcrumb-skeleton.vue +0 -30
  178. package/src/components/cv-breadcrumb/cv-breadcrumb.vue +0 -21
  179. package/src/components/cv-breadcrumb/index.js +0 -5
  180. package/src/components/cv-button/button-mixin.js +0 -91
  181. package/src/components/cv-button/cv-button-set.vue +0 -17
  182. package/src/components/cv-button/cv-button-skeleton.vue +0 -12
  183. package/src/components/cv-button/cv-button.vue +0 -19
  184. package/src/components/cv-button/cv-icon-button.vue +0 -42
  185. package/src/components/cv-button/index.js +0 -6
  186. package/src/components/cv-checkbox/cv-checkbox-skeleton.vue +0 -15
  187. package/src/components/cv-checkbox/cv-checkbox.vue +0 -70
  188. package/src/components/cv-checkbox/index.js +0 -3
  189. package/src/components/cv-code-snippet/_cv-code-snippet-inline.vue +0 -39
  190. package/src/components/cv-code-snippet/_cv-code-snippet-multiline.vue +0 -79
  191. package/src/components/cv-code-snippet/_cv-code-snippet-oneline.vue +0 -47
  192. package/src/components/cv-code-snippet/cv-code-snippet-skeleton.vue +0 -30
  193. package/src/components/cv-code-snippet/cv-code-snippet.vue +0 -83
  194. package/src/components/cv-code-snippet/index.js +0 -3
  195. package/src/components/cv-combo-box/cv-combo-box.vue +0 -386
  196. package/src/components/cv-combo-box/index.js +0 -3
  197. package/src/components/cv-content-switcher/cv-content-switcher-button.vue +0 -104
  198. package/src/components/cv-content-switcher/cv-content-switcher-content.vue +0 -26
  199. package/src/components/cv-content-switcher/cv-content-switcher-store.js +0 -22
  200. package/src/components/cv-content-switcher/cv-content-switcher.vue +0 -117
  201. package/src/components/cv-content-switcher/index.js +0 -4
  202. package/src/components/cv-data-table/_cv-data-table-row-inner.vue +0 -139
  203. package/src/components/cv-data-table/cv-data-table-action.vue +0 -25
  204. package/src/components/cv-data-table/cv-data-table-cell.vue +0 -14
  205. package/src/components/cv-data-table/cv-data-table-heading.vue +0 -109
  206. package/src/components/cv-data-table/cv-data-table-row.vue +0 -113
  207. package/src/components/cv-data-table/cv-data-table-skeleton.vue +0 -64
  208. package/src/components/cv-data-table/cv-data-table.vue +0 -525
  209. package/src/components/cv-data-table/index.js +0 -8
  210. package/src/components/cv-date-picker/cv-date-picker.vue +0 -362
  211. package/src/components/cv-date-picker/index.js +0 -3
  212. package/src/components/cv-date-picker/plugins/appendToPlugin.js +0 -52
  213. package/src/components/cv-date-picker/plugins/fixEventsPlugin.js +0 -75
  214. package/src/components/cv-date-picker/plugins/monthSelectPlugin.js +0 -66
  215. package/src/components/cv-date-picker/plugins/rangePlugin.js +0 -45
  216. package/src/components/cv-dropdown/cv-dropdown-item.vue +0 -84
  217. package/src/components/cv-dropdown/cv-dropdown-skeleton.vue +0 -20
  218. package/src/components/cv-dropdown/cv-dropdown.vue +0 -373
  219. package/src/components/cv-dropdown/index.js +0 -5
  220. package/src/components/cv-feedback-button/_cv-feedback-button.vue +0 -74
  221. package/src/components/cv-file-uploader/consts.js +0 -12
  222. package/src/components/cv-file-uploader/cv-file-uploader-skeleton.vue +0 -22
  223. package/src/components/cv-file-uploader/cv-file-uploader.vue +0 -348
  224. package/src/components/cv-file-uploader/index.js +0 -5
  225. package/src/components/cv-form/cv-form-group.vue +0 -32
  226. package/src/components/cv-form/cv-form-item.vue +0 -13
  227. package/src/components/cv-form/cv-form.vue +0 -13
  228. package/src/components/cv-form/index.js +0 -5
  229. package/src/components/cv-grid/cv-column.vue +0 -77
  230. package/src/components/cv-grid/cv-grid.vue +0 -32
  231. package/src/components/cv-grid/index.js +0 -5
  232. package/src/components/cv-icon/_cv-icon.vue +0 -30
  233. package/src/components/cv-inline-loading/consts.js +0 -8
  234. package/src/components/cv-inline-loading/cv-inline-loading.vue +0 -91
  235. package/src/components/cv-inline-loading/index.js +0 -4
  236. package/src/components/cv-inline-notification/cv-inline-notification.vue +0 -89
  237. package/src/components/cv-inline-notification/index.js +0 -3
  238. package/src/components/cv-link/cv-link.vue +0 -30
  239. package/src/components/cv-link/index.js +0 -3
  240. package/src/components/cv-list/cv-list-item.vue +0 -13
  241. package/src/components/cv-list/cv-list.vue +0 -42
  242. package/src/components/cv-list/index.js +0 -4
  243. package/src/components/cv-loading/cv-loading.vue +0 -86
  244. package/src/components/cv-loading/index.js +0 -3
  245. package/src/components/cv-modal/cv-modal.vue +0 -299
  246. package/src/components/cv-modal/index.js +0 -2
  247. package/src/components/cv-multi-select/cv-multi-select.vue +0 -484
  248. package/src/components/cv-multi-select/index.js +0 -3
  249. package/src/components/cv-number-input/cv-number-input-skeleton.vue +0 -14
  250. package/src/components/cv-number-input/cv-number-input.vue +0 -215
  251. package/src/components/cv-number-input/index.js +0 -3
  252. package/src/components/cv-overflow-menu/cv-overflow-menu.vue +0 -253
  253. package/src/components/cv-overflow-menu/index.js +0 -4
  254. package/src/components/cv-pagination/cv-pagination.vue +0 -268
  255. package/src/components/cv-pagination/index.js +0 -2
  256. package/src/components/cv-progress/cv-progress-step.vue +0 -135
  257. package/src/components/cv-progress/cv-progress.vue +0 -82
  258. package/src/components/cv-progress/index.js +0 -4
  259. package/src/components/cv-radio-button/cv-radio-button.vue +0 -40
  260. package/src/components/cv-radio-button/cv-radio-group.vue +0 -24
  261. package/src/components/cv-radio-button/index.js +0 -4
  262. package/src/components/cv-search/cv-search.vue +0 -194
  263. package/src/components/cv-search/index.js +0 -2
  264. package/src/components/cv-select/cv-select-optgroup.vue +0 -14
  265. package/src/components/cv-select/cv-select-option.vue +0 -14
  266. package/src/components/cv-select/cv-select.vue +0 -158
  267. package/src/components/cv-select/index.js +0 -4
  268. package/src/components/cv-skeleton-text/cv-skeleton-text.vue +0 -64
  269. package/src/components/cv-skeleton-text/index.js +0 -2
  270. package/src/components/cv-slider/cv-slider-skeleton.vue +0 -22
  271. package/src/components/cv-slider/cv-slider.vue +0 -247
  272. package/src/components/cv-slider/index.js +0 -4
  273. package/src/components/cv-structured-list/_cv-structured-list-item-selectable.vue +0 -37
  274. package/src/components/cv-structured-list/_cv-structured-list-item-standard.vue +0 -13
  275. package/src/components/cv-structured-list/cv-structured-list-data.vue +0 -23
  276. package/src/components/cv-structured-list/cv-structured-list-heading.vue +0 -13
  277. package/src/components/cv-structured-list/cv-structured-list-item.vue +0 -46
  278. package/src/components/cv-structured-list/cv-structured-list.vue +0 -38
  279. package/src/components/cv-structured-list/index.js +0 -5
  280. package/src/components/cv-svg/_cv-svg.vue +0 -38
  281. package/src/components/cv-tabs/cv-tab.vue +0 -68
  282. package/src/components/cv-tabs/cv-tabs-skeleton.vue +0 -20
  283. package/src/components/cv-tabs/cv-tabs.vue +0 -410
  284. package/src/components/cv-tabs/index.js +0 -5
  285. package/src/components/cv-tag/cv-tag-skeleton.vue +0 -19
  286. package/src/components/cv-tag/cv-tag.vue +0 -121
  287. package/src/components/cv-tag/index.js +0 -4
  288. package/src/components/cv-text-area/cv-text-area.vue +0 -98
  289. package/src/components/cv-text-area/index.js +0 -2
  290. package/src/components/cv-text-input/cv-text-input.vue +0 -173
  291. package/src/components/cv-text-input/index.js +0 -2
  292. package/src/components/cv-tile/_cv-tile-clickable.vue +0 -22
  293. package/src/components/cv-tile/_cv-tile-expandable.vue +0 -92
  294. package/src/components/cv-tile/_cv-tile-selectable.vue +0 -48
  295. package/src/components/cv-tile/_cv-tile-standard.vue +0 -11
  296. package/src/components/cv-tile/cv-tile.vue +0 -83
  297. package/src/components/cv-tile/index.js +0 -2
  298. package/src/components/cv-time-picker/cv-time-picker.vue +0 -138
  299. package/src/components/cv-time-picker/index.js +0 -2
  300. package/src/components/cv-toast-notification/cv-toast-notification.vue +0 -72
  301. package/src/components/cv-toast-notification/index.js +0 -2
  302. package/src/components/cv-toggle/cv-toggle-skeleton.vue +0 -25
  303. package/src/components/cv-toggle/cv-toggle.vue +0 -52
  304. package/src/components/cv-toggle/index.js +0 -3
  305. package/src/components/cv-toolbar/cv-toolbar-divider.vue +0 -11
  306. package/src/components/cv-toolbar/cv-toolbar-option.vue +0 -16
  307. package/src/components/cv-toolbar/cv-toolbar-search.vue +0 -40
  308. package/src/components/cv-toolbar/cv-toolbar-title.vue +0 -14
  309. package/src/components/cv-toolbar/cv-toolbar.vue +0 -13
  310. package/src/components/cv-toolbar/index.js +0 -6
  311. package/src/components/cv-tooltip/consts.js +0 -2
  312. package/src/components/cv-tooltip/cv-definition-tooltip.vue +0 -44
  313. package/src/components/cv-tooltip/cv-interactive-tooltip.vue +0 -241
  314. package/src/components/cv-tooltip/cv-tooltip.vue +0 -44
  315. package/src/components/cv-tooltip/index.js +0 -6
  316. package/src/components/cv-ui-shell/_cv-side-nav-link-text.vue +0 -13
  317. package/src/components/cv-ui-shell/cv-content.vue +0 -16
  318. package/src/components/cv-ui-shell/cv-header-global-action.vue +0 -84
  319. package/src/components/cv-ui-shell/cv-header-menu-button.vue +0 -80
  320. package/src/components/cv-ui-shell/cv-header-menu-item.vue +0 -36
  321. package/src/components/cv-ui-shell/cv-header-name.vue +0 -18
  322. package/src/components/cv-ui-shell/cv-header-nav.vue +0 -18
  323. package/src/components/cv-ui-shell/cv-header-panel.vue +0 -72
  324. package/src/components/cv-ui-shell/cv-header-side-nav-items.vue +0 -21
  325. package/src/components/cv-ui-shell/cv-header.vue +0 -119
  326. package/src/components/cv-ui-shell/cv-side-nav-divider.vue +0 -12
  327. package/src/components/cv-ui-shell/cv-side-nav-icon.vue +0 -16
  328. package/src/components/cv-ui-shell/cv-side-nav-items.vue +0 -21
  329. package/src/components/cv-ui-shell/cv-side-nav-link.vue +0 -54
  330. package/src/components/cv-ui-shell/cv-side-nav-menu-item.vue +0 -30
  331. package/src/components/cv-ui-shell/cv-side-nav-menu.vue +0 -84
  332. package/src/components/cv-ui-shell/cv-side-nav.vue +0 -97
  333. package/src/components/cv-ui-shell/cv-skip-to-content.vue +0 -19
  334. package/src/components/cv-ui-shell/cv-switcher-item-link.vue +0 -26
  335. package/src/components/cv-ui-shell/cv-switcher-item.vue +0 -13
  336. package/src/components/cv-ui-shell/cv-switcher.vue +0 -13
  337. package/src/components/cv-ui-shell/index.js +0 -45
  338. package/src/components/cv-wrapper/_cv-wrapper.js +0 -33
  339. package/src/directives/clickout.js +0 -29
  340. package/src/index-components-vue.js +0 -5
  341. package/src/internal/feature-flags.js +0 -22
  342. package/src/mixins/carbon-prefix-mixin.js +0 -7
  343. package/src/mixins/check-mixin.js +0 -106
  344. package/src/mixins/index.js +0 -12
  345. package/src/mixins/link-mixin.js +0 -23
  346. package/src/mixins/methods-mixin.js +0 -18
  347. package/src/mixins/notification-mixin.js +0 -18
  348. package/src/mixins/radio-mixin.js +0 -36
  349. package/src/mixins/theme-mixin.js +0 -23
  350. package/src/mixins/uid-mixin.js +0 -23
  351. package/src/thumbnails/inline-notification.svg +0 -23
  352. package/src/thumbnails/skeleton-text.svg +0 -15
  353. package/src/thumbnails/toast-notification.svg +0 -34
  354. /package/src/components/{cv-button → CvButton}/consts.js +0 -0
@@ -1,348 +0,0 @@
1
- <template>
2
- <cv-form-item class="cv-file-uploader">
3
- <p :class="`${carbonPrefix}--file--label`">{{ label }}</p>
4
- <p :class="`${carbonPrefix}--label-description`">{{ helperText }}</p>
5
- <div :class="`${carbonPrefix}--file`" data-file>
6
- <label
7
- v-if="kind === 'button'"
8
- :for="uid"
9
- :class="[
10
- {
11
- [`${carbonPrefix}--file-browse-btn`]: kind !== 'button',
12
- [`${carbonPrefix}--btn`]: kind === 'button',
13
- [`${carbonPrefix}--btn--primary`]: kind === 'button',
14
- },
15
- ]"
16
- tabindex="0"
17
- ref="focusTarget"
18
- @keydown.enter.prevent="onShow()"
19
- @keydown.space.prevent
20
- @keyup.space.prevent="onShow()"
21
- >
22
- <slot name="drop-target">{{ internalDropTargetLabel }}</slot>
23
- <input
24
- v-if="kind !== 'button'"
25
- v-bind="$attrs"
26
- type="file"
27
- :accept="accept"
28
- :class="`${carbonPrefix}--file-input`"
29
- :id="uid"
30
- data-file-uploader
31
- data-target="[data-file-container]"
32
- v-on="inputListeners"
33
- ref="file-input"
34
- />
35
- </label>
36
- <label v-else :for="uid">
37
- <div
38
- tabindex="0"
39
- ref="focusTarget"
40
- data-file-drop-container
41
- :class="wrapperClass"
42
- role="button"
43
- @dragover="onDragEvent"
44
- @dragleave="onDragEvent"
45
- @drop="onDragEvent"
46
- @keydown.enter.prevent="onShow()"
47
- @keydown.space.prevent
48
- @keyup.space.prevent="onShow()"
49
- >
50
- <slot name="drop-target">{{ internalDropTargetLabel }}</slot>
51
- <input
52
- v-if="kind !== 'button'"
53
- v-bind="$attrs"
54
- type="file"
55
- :accept="accept"
56
- :class="`${carbonPrefix}--file-input`"
57
- :id="uid"
58
- data-file-uploader
59
- data-target="[data-file-container]"
60
- v-on="inputListeners"
61
- ref="file-input"
62
- />
63
- </div>
64
- </label>
65
- <input
66
- v-if="kind === 'button'"
67
- v-bind="$attrs"
68
- type="file"
69
- :accept="accept"
70
- :class="`${carbonPrefix}--file-input`"
71
- :id="uid"
72
- data-file-uploader
73
- data-target="[data-file-container]"
74
- v-on="inputListeners"
75
- ref="file-input"
76
- />
77
-
78
- <div data-file-container :class="`${carbonPrefix}--file-container`">
79
- <div
80
- v-for="(file, index) in internalFiles"
81
- :key="index"
82
- :class="
83
- isInvalid(index)
84
- ? `${carbonPrefix}--file__selected-file--invalid__wrapper`
85
- : `${carbonPrefix}--file__selected-file`
86
- "
87
- >
88
- <cv-wrapper
89
- :tag-type="isInvalid(index) ? 'div' : ''"
90
- :class="`${carbonPrefix}--file__selected-file ${carbonPrefix}--file__selected-file--invalid`"
91
- >
92
- <p :class="`${carbonPrefix}--file-filename`" :title="file.file.name">{{ file.file.name }}</p>
93
-
94
- <span
95
- :data-for="uid"
96
- :class="`${carbonPrefix}--file__state-container`"
97
- :data-test="file.state"
98
- :style="stateStyleOverides"
99
- >
100
- <div v-if="file.state === 'uploading'" :class="`${carbonPrefix}--inline-loading__animation`">
101
- <div data-inline-loading-spinner :class="`${carbonPrefix}--loading ${carbonPrefix}--loading--small`">
102
- <svg :class="`${carbonPrefix}--loading__svg`" viewBox="-75 -75 150 150">
103
- <circle :class="`${carbonPrefix}--loading__background`" cx="0" cy="0" r="37.5" />
104
- <circle :class="`${carbonPrefix}--loading__stroke`" cx="0" cy="0" r="37.5" />
105
- </svg>
106
- </div>
107
- </div>
108
- <CheckmarkFilled16 v-if="file.state === 'complete'" :class="`${carbonPrefix}--file-complete`" />
109
- <WarningFilled16 v-if="isInvalid(index)" :class="`${carbonPrefix}--file--invalid`" />
110
- <button
111
- type="button"
112
- :class="`${carbonPrefix}--file-close`"
113
- v-if="removable"
114
- :alt="removeAriaLabel"
115
- :arial-label="removeAriaLabel"
116
- @click="remove(index)"
117
- >
118
- <Close16 />
119
- </button>
120
- </span>
121
- <div v-if="isInvalid(index)" :class="`${carbonPrefix}--form-requirement`">
122
- <div :class="`${carbonPrefix}--form-requirement__title`">
123
- {{ file.invalidMessageTitle || 'Invalid file' }}
124
- </div>
125
- <p :class="`${carbonPrefix}--form-requirement__supplement`">{{ file.invalidMessage }}</p>
126
- </div>
127
- </cv-wrapper>
128
- </div>
129
- </div>
130
- </div>
131
- </cv-form-item>
132
- </template>
133
-
134
- <script>
135
- import { uidMixin, carbonPrefixMixin, methodsMixin } from '../../mixins';
136
- import CvFormItem from '../cv-form/cv-form-item';
137
- import CheckmarkFilled16 from '@carbon/icons-vue/es/checkmark--filled/16';
138
- import WarningFilled16 from '@carbon/icons-vue/es/warning--filled/16';
139
- import Close16 from '@carbon/icons-vue/es/close/16';
140
- import CvWrapper from '../cv-wrapper/_cv-wrapper';
141
- import { STATES, KINDS } from './consts.js';
142
-
143
- export default {
144
- name: 'CvFileUploader',
145
- components: { CvFormItem, CheckmarkFilled16, WarningFilled16, Close16, CvWrapper },
146
- mixins: [uidMixin, carbonPrefixMixin, methodsMixin({ focusTarget: ['blur', 'focus'] })],
147
- inheritAttrs: false,
148
- props: {
149
- clearOnReselect: Boolean,
150
- files: Array,
151
- kind: {
152
- type: String,
153
- default: 'drag-target',
154
- validator: val => {
155
- const validValues = Object.values(KINDS);
156
-
157
- if (!validValues.includes(val)) {
158
- console.warn(`CvFileUploader: valid values for 'kind' are ${validValues}`);
159
- }
160
- return true;
161
- },
162
- },
163
- label: String,
164
- helperText: String,
165
- accept: String,
166
- initialStateUploading: Boolean,
167
- removable: Boolean,
168
- buttonLabel: {
169
- type: String,
170
- default: undefined,
171
- deprecated: true,
172
- validator: val => {
173
- if (val !== undefined && process.env.NODE_ENV === 'development') {
174
- console.warn('CvFileUploader: button-label prop deprecated in favour of drop-target-label');
175
- }
176
- return true;
177
- },
178
- },
179
- dropTargetLabel: { type: String, default: undefined },
180
- removeAriaLabel: { type: String, default: 'Remove selected file' },
181
- },
182
- model: {
183
- prop: 'files',
184
- event: 'change',
185
- },
186
- created() {
187
- this.STATES = Object.freeze(STATES);
188
- },
189
- data() {
190
- return {
191
- internalFiles: [],
192
- allowDrop: false,
193
- };
194
- },
195
- mounted() {
196
- this.internalFiles = this.files ? this.files : [];
197
- },
198
- watch: {
199
- files() {
200
- this.internalFiles = this.files ? this.files : [];
201
- },
202
- },
203
- computed: {
204
- // Bind listeners at the component level to the embedded input element and
205
- // add our own input listener to service the v-model. See:
206
- // https://vuejs.org/v2/guide/components-custom-events.html#Customizing-Component-v-model
207
- inputListeners() {
208
- return {
209
- ...this.$listeners,
210
- change: event => this.onChange(event),
211
- };
212
- },
213
- isInvalid() {
214
- return index => {
215
- const result = this.internalFiles[index].invalidMessage && this.internalFiles[index].invalidMessage.length;
216
- return result;
217
- };
218
- },
219
- internalDropTargetLabel() {
220
- return this.dropTargetLabel || this.buttonLabel || 'Drag and drop files here or upload';
221
- },
222
- stateStyleOverides() {
223
- // <style carbon tweaks - DO NOT USE STYLE TAG as it causes SSR issues
224
- return { display: 'inline-flex', alignItems: 'center' };
225
- },
226
- allowDropClass() {
227
- return this.allowDrop ? ` ${this.carbonPrefix}--file__drop-container--drag-over` : '';
228
- },
229
- wrapperClass() {
230
- const staticClass = `${this.carbonPrefix}--file__drop-container${this.allowDropClass}`;
231
- const dynamicClass =
232
- this.kind !== 'button'
233
- ? `${this.carbonPrefix}--file-browse-btn`
234
- : `${this.carbonPrefix}--btn ${this.carbonPrefix}--btn--primary`;
235
-
236
- return `${staticClass} ${dynamicClass}`;
237
- },
238
- },
239
- methods: {
240
- remove(index) {
241
- this.internalFiles.splice(index, 1);
242
- this.$emit('change', this.internalFiles);
243
- },
244
- addFiles(files) {
245
- for (const file of files) {
246
- const internalFile = this.internalFiles.find(item => item.file.name === file.name);
247
-
248
- if (internalFile) {
249
- internalFile.state = this.initialStateUploading ? STATES.UPLOADING : STATES.NONE;
250
- internalFile.invalidMessageTitle = '';
251
- internalFile.invalidMessage = '';
252
- } else {
253
- const internalFile = {
254
- state: this.initialStateUploading ? STATES.UPLOADING : STATES.NONE,
255
- file,
256
- invalidMessageTitle: '',
257
- invalidMessage: '',
258
- };
259
-
260
- if (file.messageBundle) {
261
- internalFile.invalidMessageTitle = file.messageBundle.invalidMessageTitle;
262
- internalFile.invalidMessage = file.messageBundle.invalidMessage;
263
- delete file.messageBundle;
264
- }
265
- this.internalFiles.push(internalFile);
266
- }
267
- }
268
- // clear input we do not need to maintain it
269
- this.$refs['file-input'].value = '';
270
- this.$emit('change', this.internalFiles);
271
- },
272
- onChange(ev) {
273
- if (ev.target.files.length !== 0 && this.clearOnReselect) {
274
- this.internalFiles = [];
275
- }
276
- this.addFiles(ev.target.files);
277
- },
278
- onShow() {
279
- this.$refs['file-input'].click();
280
- },
281
- setState(index, state) {
282
- if (['uploading', 'complete', ''].includes(state)) {
283
- this.internalFiles[index].state = state;
284
- }
285
- },
286
- clear() {
287
- this.internalFiles = [];
288
- this.$emit('change', this.internalFiles);
289
- },
290
- setInvalidMessage(index, message) {
291
- this.internalFiles[index].invalidMessage = message;
292
- },
293
- onDragEvent(evt) {
294
- if (Array.prototype.indexOf.call(evt.dataTransfer.types, 'Files') === -1) {
295
- return;
296
- }
297
-
298
- if (evt.type === 'dragleave') {
299
- this.allowDrop = false;
300
- return;
301
- }
302
-
303
- if (evt.type === 'dragover') {
304
- evt.preventDefault();
305
- const dropEffect = 'copy';
306
- if (Array.isArray(evt.dataTransfer.types)) {
307
- try {
308
- // IE11 throws a "permission denied" error accessing `.effectAllowed`
309
- evt.dataTransfer.effectAllowed = dropEffect;
310
- } catch (e) {
311
- // ignore
312
- }
313
- }
314
- evt.dataTransfer.dropEffect = dropEffect;
315
- this.allowDrop = true;
316
- }
317
-
318
- if (evt.type === 'drop') {
319
- evt.preventDefault();
320
- if (this.accept) {
321
- this.markInvalidFileTypes(evt.dataTransfer.files);
322
- }
323
- this.addFiles(evt.dataTransfer.files);
324
- this.allowDrop = false;
325
- }
326
- },
327
- markInvalidFileTypes(files) {
328
- const isFileAllowed = file => {
329
- const extension = '.' + file.name.split('.').pop();
330
- const allowed = this.accept.split(',').map(x => x.trim());
331
- if (allowed.includes('.jpg')) {
332
- allowed.push('.jpeg');
333
- }
334
- return allowed.includes(file.type) || allowed.includes(extension);
335
- };
336
-
337
- for (const file of files) {
338
- if (!isFileAllowed(file)) {
339
- file.messageBundle = {
340
- invalidMessageTitle: 'Invalid file type',
341
- invalidMessage: `"${file.name}" does not have a valid file type.`,
342
- };
343
- }
344
- }
345
- },
346
- },
347
- };
348
- </script>
@@ -1,5 +0,0 @@
1
- import CvFileUploader from './cv-file-uploader';
2
- import CvFileUploaderSkeleton from './cv-file-uploader-skeleton';
3
- import { KINDS, STATES } from './consts';
4
-
5
- export { CvFileUploader, CvFileUploaderSkeleton, KINDS, STATES };
@@ -1,32 +0,0 @@
1
- <template>
2
- <fieldset
3
- :class="[
4
- `cv-form-group ${carbonPrefix}--fieldset`,
5
- {
6
- [`${carbonPrefix}--fieldset--no-margin`]: noMargin,
7
- },
8
- ]"
9
- :data-invalid="invalid"
10
- >
11
- <legend :class="`${carbonPrefix}--label`">
12
- <slot name="label"></slot>
13
- </legend>
14
- <slot name="content"></slot>
15
- <div v-if="message" :class="`${carbonPrefix}--form__requirements`">
16
- {{ message }}
17
- </div>
18
- </fieldset>
19
- </template>
20
-
21
- <script>
22
- import { carbonPrefixMixin } from '../../mixins';
23
- export default {
24
- name: 'CvFormGroup',
25
- mixins: [carbonPrefixMixin],
26
- props: {
27
- noMargin: Boolean,
28
- invalid: Boolean,
29
- message: String,
30
- },
31
- };
32
- </script>
@@ -1,13 +0,0 @@
1
- <template>
2
- <div :class="`cv-form-item ${carbonPrefix}--form-item`">
3
- <slot></slot>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- import { carbonPrefixMixin } from '../../mixins';
9
- export default {
10
- name: 'CvFormItem',
11
- mixins: [carbonPrefixMixin],
12
- };
13
- </script>
@@ -1,13 +0,0 @@
1
- <template>
2
- <form :class="`cv-form ${carbonPrefix}--form`" v-on="$listeners">
3
- <slot></slot>
4
- </form>
5
- </template>
6
-
7
- <script>
8
- import { carbonPrefixMixin } from '../../mixins';
9
- export default {
10
- name: 'CvForm',
11
- mixins: [carbonPrefixMixin],
12
- };
13
- </script>
@@ -1,5 +0,0 @@
1
- import CvForm from './cv-form';
2
- import CvFormItem from './cv-form-item';
3
- import CvFormGroup from './cv-form-group';
4
-
5
- export { CvForm, CvFormItem, CvFormGroup };
@@ -1,77 +0,0 @@
1
- <template>
2
- <div class="cv-column" :class="classes">
3
- <slot></slot>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- import carbonPrefixMixin from '../../mixins/carbon-prefix-mixin';
9
-
10
- const breakpointProp = {
11
- type: [Boolean, Number, Object],
12
- validator: value => {
13
- if (typeof value === 'number' || typeof value === 'boolean') {
14
- return true;
15
- } else if (typeof value === 'object') {
16
- return 'span' in value && typeof value.span === 'number' && 'offset' in value && typeof value.offset === 'number';
17
- }
18
-
19
- return false;
20
- },
21
- };
22
-
23
- export default {
24
- name: 'CvColumn',
25
- mixins: [carbonPrefixMixin],
26
- props: {
27
- sm: breakpointProp,
28
- md: breakpointProp,
29
- lg: breakpointProp,
30
- xlg: breakpointProp,
31
- max: breakpointProp,
32
- },
33
- computed: {
34
- classes() {
35
- const classnames = [];
36
-
37
- const breakpoints = [
38
- { name: 'sm', value: this.sm },
39
- { name: 'md', value: this.md },
40
- { name: 'lg', value: this.lg },
41
- { name: 'xlg', value: this.xlg },
42
- { name: 'max', value: this.max },
43
- ].filter(breakpoint => breakpoint.value !== false);
44
-
45
- for (let i = 0; i < breakpoints.length; i += 1) {
46
- const { name, value } = breakpoints[i];
47
-
48
- if (typeof value === 'boolean') {
49
- // auto-column
50
- classnames.push(`${this.carbonPrefix}--col-${name}`);
51
- } else if (typeof value === 'number') {
52
- classnames.push(`${this.carbonPrefix}--col-${name}-${value}`);
53
- } else {
54
- const { span, offset } = value;
55
-
56
- if (typeof span === 'boolean') {
57
- classnames.push(`${this.carbonPrefix}--col-${name}`);
58
- } else if (typeof span === 'number') {
59
- classnames.push(`${this.carbonPrefix}--col-${name}-${span}`);
60
- }
61
-
62
- if (typeof offset === 'number') {
63
- classnames.push(`${this.carbonPrefix}--offset-${name}-${offset}`);
64
- }
65
- }
66
- }
67
-
68
- if (classnames.length === 0) {
69
- // no breakpoints were defined. use auto-column
70
- classnames.push(`${this.carbonPrefix}--col`);
71
- }
72
-
73
- return classnames;
74
- },
75
- },
76
- };
77
- </script>
@@ -1,32 +0,0 @@
1
- <template>
2
- <div
3
- class="cv-grid"
4
- :class="[
5
- `${carbonPrefix}--grid`,
6
- {
7
- [`${carbonPrefix}--grid--full-width`]: fullWidth,
8
- [`${carbonPrefix}--grid--condensed`]: kind === 'condensed',
9
- [`${carbonPrefix}--grid--narrow`]: kind === 'narrow',
10
- },
11
- ]"
12
- >
13
- <slot></slot>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import carbonPrefixMixin from '../../mixins/carbon-prefix-mixin';
19
-
20
- export default {
21
- name: 'CvGrid',
22
- mixins: [carbonPrefixMixin],
23
- props: {
24
- fullWidth: Boolean,
25
- kind: {
26
- type: String,
27
- default: 'wide',
28
- validator: val => ['wide', 'narrow', 'condensed'].includes(val),
29
- },
30
- },
31
- };
32
- </script>
@@ -1,5 +0,0 @@
1
- import CvGrid from './cv-grid';
2
- import CvRow from './cv-row';
3
- import CvColumn from './cv-column';
4
-
5
- export { CvGrid, CvRow, CvColumn };
@@ -1,30 +0,0 @@
1
- <template>
2
- <svg class="cv-icon">
3
- <title v-if="title">{{ title }}</title>
4
- <use v-bind:xlink:href="iconHref" />
5
- </svg>
6
- </template>
7
-
8
- <script>
9
- const spritePath = require('../../assets/images/component-icons.svg');
10
-
11
- export default {
12
- name: 'CvIcon',
13
- props: {
14
- href: {
15
- type: String,
16
- required: true,
17
- },
18
- title: { type: String, default: undefined },
19
- },
20
- computed: {
21
- iconHref() {
22
- // syntax used to load a knwon icon
23
- if (this.href.toLowerCase().startsWith('cv(')) {
24
- return `${spritePath}#${this.href.substring(3, this.href.length - 1)}`;
25
- }
26
- return this.href;
27
- },
28
- },
29
- };
30
- </script>
@@ -1,8 +0,0 @@
1
- const STATES = {
2
- LOADED: 'loaded',
3
- ERROR: 'error',
4
- LOADING: 'loading',
5
- ENDING: 'ending',
6
- };
7
-
8
- export { STATES };
@@ -1,91 +0,0 @@
1
- <template>
2
- <div data-inline-loading :class="`${carbonPrefix}--inline-loading`" role="alert" aria-live="assertive">
3
- <div
4
- :class="[
5
- `${carbonPrefix}--inline-loading__animation`,
6
- { [`${carbonPrefix}--loading--stop`]: internalState === STATES.ENDING },
7
- ]"
8
- >
9
- <div
10
- v-show="internalState === STATES.LOADING || internalState === STATES.ENDING"
11
- :class="`${carbonPrefix}--loading ${carbonPrefix}--loading--small`"
12
- >
13
- <cv-loading :description="description" :active="active" small />
14
- </div>
15
- <CheckmarkFilled16
16
- :hidden="internalState !== STATES.LOADED"
17
- :class="`${carbonPrefix}--inline-loading__checkmark-container`"
18
- />
19
- <ErrorFilled16 :hidden="internalState !== STATES.ERROR" :class="`${carbonPrefix}--inline-loading--error`" />
20
- </div>
21
- <p :class="`${carbonPrefix}--inline-loading__text`">{{ stateText }}</p>
22
- </div>
23
- </template>
24
-
25
- <script>
26
- import { STATES } from './consts';
27
- import ErrorFilled16 from '@carbon/icons-vue/lib/error--filled/16';
28
- import CheckmarkFilled16 from '@carbon/icons-vue/lib/checkmark--filled/16';
29
- import { carbonPrefixMixin } from '../../mixins';
30
- import CvLoading from '../cv-loading/cv-loading.vue';
31
-
32
- export default {
33
- name: 'CvInlineLoading',
34
- components: { ErrorFilled16, CheckmarkFilled16, CvLoading },
35
- mixins: [carbonPrefixMixin],
36
- created() {
37
- this.STATES = STATES;
38
- },
39
- props: {
40
- active: {
41
- type: Boolean,
42
- default: undefined,
43
- deprecated: true,
44
- validator: val => {
45
- if (val !== undefined && process.env.NODE_ENV === 'development') {
46
- console.warn('CvInlineLoading: active prop deprecated in favour of state prop');
47
- }
48
- return true;
49
- },
50
- },
51
- description: { type: String, default: 'Loading' },
52
- endingText: { type: String, default: 'Load ending...' },
53
- errorText: { type: String, default: 'Loading data failed.' },
54
- loadingText: { type: String, default: 'Loading data...' },
55
- loadedText: { type: String, default: 'Data loaded.' },
56
- state: {
57
- type: String,
58
- default: undefined,
59
- validator: val => {
60
- if (Object.keys(STATES).some(state => STATES[state] === val.toLowerCase())) {
61
- return true;
62
- } else {
63
- console.error(`CvInlineLoading: Valid states are ${JSON.stringify(Object.values(STATES))}`);
64
- return false;
65
- }
66
- },
67
- },
68
- },
69
- computed: {
70
- internalState() {
71
- if (this.state !== undefined) {
72
- return this.state.toLowerCase();
73
- } else {
74
- return this.active ? STATES.LOADING : STATES.LOADED;
75
- }
76
- },
77
- stateText() {
78
- switch (this.internalState) {
79
- case STATES.LOADED:
80
- return this.loadedText;
81
- case STATES.ERROR:
82
- return this.errorText;
83
- case STATES.ENDING:
84
- return this.endingText;
85
- default:
86
- return this.loadingText;
87
- }
88
- },
89
- },
90
- };
91
- </script>
@@ -1,4 +0,0 @@
1
- import CvInlineLoading from './cv-inline-loading';
2
- import { STATES } from './consts';
3
-
4
- export { CvInlineLoading, STATES };