@carbon/vue 2.45.0 → 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 -295
  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,247 +0,0 @@
1
- <template>
2
- <div :class="`cv-slider ${carbonPrefix}--form-item`">
3
- <label
4
- v-show="label"
5
- :for="uid"
6
- :class="[`${carbonPrefix}--label`, { [`${carbonPrefix}--label--disabled`]: disabled }]"
7
- :id="labelId"
8
- >
9
- {{ label }}
10
- </label>
11
- <div :class="`${carbonPrefix}--slider-container`">
12
- <span :class="`${carbonPrefix}--slider__range-label`">{{ internalMinLabel }}</span>
13
- <div
14
- :class="[`${carbonPrefix}--slider`, { [`${carbonPrefix}--slider--disabled`]: disabled }]"
15
- data-slider
16
- data-slider-input-box="#slider-input-box"
17
- >
18
- <div :class="`${carbonPrefix}--slider__track`" @click="onTrackClick" ref="track"></div>
19
- <div :class="`${carbonPrefix}--slider__filled-track`" :style="`width: ${percentage};`"></div>
20
- <div
21
- :class="[
22
- `${carbonPrefix}--slider__thumb`,
23
- {
24
- [`${carbonPrefix}--slider__thumb--clicked`]: animateClick,
25
- },
26
- ]"
27
- tabindex="0"
28
- :aria-labelledby="labelId"
29
- :style="`left: ${percentage};`"
30
- ref="thumb"
31
- @keydown.up.right.prevent="onUp"
32
- @keydown.down.left.prevent="onDown"
33
- @mousedown="onStartDrag"
34
- ></div>
35
- <input
36
- :id="uid"
37
- :class="`${carbonPrefix}--slider__input`"
38
- type="range"
39
- :step="step"
40
- :min="min"
41
- :max="max"
42
- ref="range"
43
- />
44
- </div>
45
- <span :class="`${carbonPrefix}--slider__range-label`">{{ internalMaxLabel }}</span>
46
- <input
47
- type="number"
48
- :class="[
49
- `${carbonPrefix}--text-input ${carbonPrefix}--slider-text-input`,
50
- { [`${carbonPrefix}--text-input--light`]: isLight },
51
- ]"
52
- :placeholder="min"
53
- v-model="internalValue"
54
- @change="onChange"
55
- ref="inputBox"
56
- @keydown.up.prevent="onUp"
57
- @keydown.down.prevent="onDown"
58
- :disabled="disabled"
59
- />
60
- </div>
61
- </div>
62
- </template>
63
-
64
- <script>
65
- import { uidMixin, themeMixin, carbonPrefixMixin, methodsMixin } from '../../mixins';
66
-
67
- export default {
68
- name: 'CvSlider',
69
- mixins: [uidMixin, themeMixin, carbonPrefixMixin, methodsMixin({ thumb: ['blur', 'focus'] })],
70
- props: {
71
- disabled: Boolean,
72
- label: String,
73
- // NOTE: It is not safe to rely on Numbers for non-integer steps
74
- min: { type: String, default: '0' },
75
- max: { type: String, default: '100' },
76
- step: { type: String, default: '1' },
77
- stepMultiplier: {
78
- type: String,
79
- default: '4',
80
- validator(val) {
81
- if (val.length) {
82
- let intMultiplier = parseInt(val);
83
- if (isNaN(intMultiplier) || intMultiplier < 1) {
84
- console.warn('cv-slider: multiplier must be >= 1');
85
- return false;
86
- }
87
- }
88
- return true;
89
- },
90
- },
91
- value: String,
92
- minLabel: String,
93
- maxLabel: String,
94
- },
95
- model: {
96
- prop: 'value',
97
- event: 'modelEvent',
98
- },
99
- data() {
100
- return {
101
- internalValue: '',
102
- animateClick: false,
103
- isDragging: false,
104
- dragStartX: 0,
105
- dragStartValue: 0,
106
- percentage: '0%',
107
- };
108
- },
109
- computed: {
110
- labelId() {
111
- return `${this.uid}-label`;
112
- },
113
- internalMinLabel() {
114
- return this.minLabel !== undefined ? this.minLabel : this.getMin();
115
- },
116
- internalMaxLabel() {
117
- return this.maxLabel !== undefined ? this.maxLabel : this.getMax();
118
- },
119
- internalMultiplier() {
120
- let intMultiplier = parseInt(this.stepMultiplier);
121
- // default to 4 fro multiplier
122
- return isNaN(intMultiplier) ? 4 : Math.max(intMultiplier, 1);
123
- },
124
- },
125
- mounted() {
126
- this.$refs.range.value = this.value;
127
- this.internalValue = this.$refs.range.value;
128
- this.percentage = `${((this.internalValue - this.getMin()) * 100) / (this.getMax() - this.getMin())}%`;
129
- },
130
- watch: {
131
- value(val) {
132
- this.setValue(val);
133
- },
134
- min() {
135
- this.$nextTick(() => {
136
- this.setValue(this.internalValue);
137
- });
138
- // this.internalMin = val && val.length ? val : '0';
139
- },
140
- max() {
141
- this.$nextTick(() => {
142
- this.setValue(this.internalValue);
143
- });
144
- },
145
- step() {
146
- this.$nextTick(() => {
147
- this.setValue(this.internalValue);
148
- });
149
- },
150
- },
151
- methods: {
152
- // NOTE: It is not safe to rely on Numbers for non-integer steps
153
- getMin() {
154
- if (this.$refs.range) {
155
- const val = parseFloat(this.$refs.range.min);
156
- return isNaN(val) ? 0 : val;
157
- }
158
- return 0;
159
- },
160
- getMax() {
161
- if (this.$refs.range) {
162
- const val = parseFloat(this.$refs.range.max);
163
- return isNaN(val) ? 100 : val;
164
- }
165
- return 100;
166
- },
167
- getValue() {
168
- if (this.$refs.range) {
169
- const val = parseFloat(this.$refs.range.value);
170
- return isNaN(val) ? 0 : val;
171
- }
172
- return (this.getMax() + this.getMin()) / 2;
173
- },
174
- getStep() {
175
- if (this.$refs.range) {
176
- const val = parseFloat(this.$refs.range.step);
177
- return isNaN(val) ? 0 : val;
178
- }
179
- return 1;
180
- },
181
-
182
- setValue(newValue) {
183
- if (this.disabled) return;
184
-
185
- this.$refs.range.value = newValue;
186
- this.internalValue = this.$refs.range.value;
187
-
188
- this.percentage = `${((this.internalValue - this.getMin()) * 100) / (this.getMax() - this.getMin())}%`;
189
-
190
- this.$emit('modelEvent', this.$refs.range.value);
191
- this.$emit('change', this.$refs.range.value);
192
- },
193
- onChange() {
194
- let newValue = this.internalValue.length ? parseFloat(this.internalValue) : this.getMin();
195
- this.setValue(newValue);
196
- },
197
- onStartDrag(ev) {
198
- document.body.addEventListener('mousemove', this.onDrag);
199
- document.body.addEventListener('mouseup', this.onStopDrag);
200
-
201
- this.dragStartX = ev.clientX;
202
- this.dragStartValue = this.getValue();
203
- this.isDragging = true;
204
- },
205
- onDrag(ev) {
206
- if (this.isDragging) {
207
- // percentage change
208
- let newValue = (ev.clientX - this.dragStartX) / this.$refs.track.offsetWidth;
209
- // uncapped new value
210
- newValue = this.dragStartValue + (this.getMax() - this.getMin()) * newValue;
211
-
212
- this.setValue(newValue, ev);
213
- }
214
- },
215
- onStopDrag() {
216
- this.isDragging = false;
217
- document.body.removeEventListener('mousemove', this.onDrag);
218
- document.body.removeEventListener('mouseup', this.onStopDrag);
219
- },
220
- onTrackClick(ev) {
221
- const afterAnimate = ev => {
222
- if (ev.propertyName === 'left') {
223
- this.animateClick = false;
224
- this.$refs.thumb.removeEventListener('transitionend', afterAnimate);
225
- }
226
- };
227
-
228
- let newValue = ev.offsetX / this.$refs.track.offsetWidth;
229
- newValue = (this.getMax() - this.getMin()) * newValue + this.getMin();
230
- this.$refs.thumb.addEventListener('transitionend', afterAnimate);
231
- this.animateClick = true;
232
-
233
- this.setValue(newValue, ev);
234
- },
235
- onUp(ev) {
236
- let curValue = ev.target.type === 'number' ? parseFloat(ev.target.value) : this.getValue();
237
- let newValue = curValue + (ev.shiftKey ? this.internalMultiplier * this.getStep() : this.getStep());
238
- this.setValue(newValue, ev);
239
- },
240
- onDown(ev) {
241
- let curValue = ev.target.type === 'number' ? parseFloat(ev.target.value) : this.getValue();
242
- let newValue = curValue - (ev.shiftKey ? this.internalMultiplier * this.getStep() : this.getStep());
243
- this.setValue(newValue, ev);
244
- },
245
- },
246
- };
247
- </script>
@@ -1,4 +0,0 @@
1
- import CvSliderSkeleton from './cv-slider-skeleton';
2
- import CvSlider from './cv-slider';
3
-
4
- export { CvSlider, CvSliderSkeleton };
@@ -1,37 +0,0 @@
1
- <template>
2
- <label
3
- :for="uid"
4
- :aria-label="label"
5
- :class="[
6
- `cv-structured-list-item--selectable ${carbonPrefix}--structured-list-row`,
7
- { ' ${carbonPrefix}--structured-list-row--selected': isChecked },
8
- ]"
9
- tabindex="0"
10
- >
11
- <slot></slot>
12
- <input
13
- v-bind="$attrs"
14
- v-on="inputListeners"
15
- tabindex="-1"
16
- :id="uid"
17
- :class="`${carbonPrefix}--structured-list-input`"
18
- :checked="isChecked"
19
- :value="value"
20
- type="radio"
21
- />
22
- <div :class="`${carbonPrefix}--structured-list-td`">
23
- <CheckmarkFilled16 :class="`${carbonPrefix}--structured-list-svg`" />
24
- </div>
25
- </label>
26
- </template>
27
-
28
- <script>
29
- import { uidMixin, radioMixin, carbonPrefixMixin } from '../../mixins';
30
- import CheckmarkFilled16 from '@carbon/icons-vue/es/checkmark--filled/16';
31
- export default {
32
- name: 'CvStructuredListItemSelectable',
33
- components: { CheckmarkFilled16 },
34
- inheritAttrs: false,
35
- mixins: [uidMixin, radioMixin, carbonPrefixMixin],
36
- };
37
- </script>
@@ -1,13 +0,0 @@
1
- <template>
2
- <div :class="`cv-structured-list-item--standard ${carbonPrefix}--structured-list-row`">
3
- <slot></slot>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- import { carbonPrefixMixin } from '../../mixins';
9
- export default {
10
- name: 'CvStructuredListItemStandard',
11
- mixins: [carbonPrefixMixin],
12
- };
13
- </script>
@@ -1,23 +0,0 @@
1
- <template>
2
- <div
3
- :class="[
4
- `cv-structured-list-data ${carbonPrefix}--structured-list-td`,
5
- {
6
- [`${carbonPrefix}--structured-list-content--nowrap`]: noWrap,
7
- },
8
- ]"
9
- >
10
- <slot></slot>
11
- </div>
12
- </template>
13
-
14
- <script>
15
- import { carbonPrefixMixin } from '../../mixins';
16
- export default {
17
- name: 'CvStructuredListData',
18
- mixins: [carbonPrefixMixin],
19
- props: {
20
- noWrap: Boolean,
21
- },
22
- };
23
- </script>
@@ -1,13 +0,0 @@
1
- <template>
2
- <div :class="`cv-structured-list-heading ${carbonPrefix}--structured-list-th`">
3
- <slot></slot>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- import { carbonPrefixMixin } from '../../mixins';
9
- export default {
10
- name: 'CvStructuredListHeading',
11
- mixins: [carbonPrefixMixin],
12
- };
13
- </script>
@@ -1,46 +0,0 @@
1
- <template>
2
- <component
3
- :is="tagType"
4
- v-bind="$attrs"
5
- v-on="$listeners"
6
- class="cv-structured-list-item"
7
- :value="value"
8
- :modelValue="modelValue"
9
- >
10
- <slot></slot>
11
- </component>
12
- </template>
13
-
14
- <script>
15
- import CvStructuredListItemStandard from './_cv-structured-list-item-standard';
16
- import CvStructuredListItemSelectable from './_cv-structured-list-item-selectable';
17
-
18
- export default {
19
- name: 'CvStructuredListItem',
20
- inheritAttrs: false,
21
- components: { CvStructuredListItemStandard, CvStructuredListItemSelectable },
22
- props: {
23
- value: { type: String, default: '' },
24
- modelValue: { type: String },
25
- },
26
- mounted() {
27
- // pass on cv-structured-list-item-selectable change events
28
- this.$on('cv:change', val => {
29
- this.$parent.$emit('cv:change', this.value); // emit to parent
30
- this.$emit('change', val);
31
- });
32
- },
33
- computed: {
34
- tagType() {
35
- return this.selectable ? 'cv-structured-list-item-selectable' : 'cv-structured-list-item-standard';
36
- },
37
- selectable() {
38
- return this.$parent.selectable;
39
- },
40
- },
41
- model: {
42
- prop: 'modelValue',
43
- event: 'change',
44
- },
45
- };
46
- </script>
@@ -1,38 +0,0 @@
1
- <template>
2
- <div
3
- :class="[
4
- `${carbonPrefix}--structured-list`,
5
- {
6
- [`${carbonPrefix}--structured-list--selection`]: selectable,
7
- [`${carbonPrefix}--structured-list--condensed`]: condensed,
8
- },
9
- ]"
10
- :data-structured-list="selectable"
11
- >
12
- <div :class="`${carbonPrefix}--structured-list-thead`">
13
- <div :class="`${carbonPrefix}--structured-list-row ${carbonPrefix}--structured-list-row--header-row`">
14
- <slot name="headings"></slot>
15
- <div v-if="selectable" :class="`${carbonPrefix}--structured-list-th`"></div>
16
- </div>
17
- </div>
18
- <div :class="`${carbonPrefix}--structured-list-tbody`">
19
- <slot name="items"></slot>
20
- </div>
21
- </div>
22
- </template>
23
-
24
- <script>
25
- import { carbonPrefixMixin } from '../../mixins';
26
- export default {
27
- name: 'CvStructuredList',
28
- mixins: [carbonPrefixMixin],
29
- props: {
30
- selectable: Boolean,
31
- condensed: Boolean,
32
- },
33
- mounted() {
34
- // pass on cv-structured-list-item change events
35
- this.$on('cv:change', val => this.$emit('change', val));
36
- },
37
- };
38
- </script>
@@ -1,5 +0,0 @@
1
- import CvStructuredListData from './cv-structured-list-data';
2
- import CvStructuredListHeading from './cv-structured-list-heading';
3
- import CvStructuredListItem from './cv-structured-list-item';
4
- import CvStructuredList from './cv-structured-list';
5
- export { CvStructuredList, CvStructuredListItem, CvStructuredListHeading, CvStructuredListData };
@@ -1,38 +0,0 @@
1
- <script>
2
- export default {
3
- name: 'CvSvg',
4
- props: {
5
- svg: {
6
- type: [String, Object],
7
- default: undefined,
8
- validator(val) {
9
- if (!val || typeof val === 'string') {
10
- return true;
11
- }
12
- return val.render !== null;
13
- },
14
- },
15
- },
16
- computed: {
17
- isSvg() {
18
- return this.svg !== undefined && this.svg.indexOf('<svg') >= 0;
19
- },
20
- isSymbol() {
21
- return this.svg !== undefined && !this.isSvg && this.svg.indexOf('#') >= 0;
22
- },
23
- },
24
- render(createElement) {
25
- if (typeof this.svg === 'object') {
26
- return createElement('component', { is: this.svg });
27
- } else if (this.isSvg) {
28
- return createElement('svg', { domProps: { innerHTML: this.svg } });
29
- } else {
30
- if (this.isSymbol) {
31
- return createElement('svg', {}, [createElement('use', { attrs: { href: this.svg } })]);
32
- } else {
33
- return createElement('img', { attrs: { src: this.svg } });
34
- }
35
- }
36
- },
37
- };
38
- </script>
@@ -1,68 +0,0 @@
1
- <template>
2
- <div
3
- class="cv-tab"
4
- :id="uid"
5
- role="tabpanel"
6
- :aria-labelledby="`${uid}-link`"
7
- :aria-hidden="!dataSelected ? 'true' : 'false'"
8
- :hidden="!dataSelected"
9
- >
10
- <slot>
11
- <!-- Content for first tab goes here. -->
12
- </slot>
13
- </div>
14
- </template>
15
-
16
- <script>
17
- import { uidMixin } from '../../mixins';
18
-
19
- export default {
20
- name: 'CvTab',
21
- mixins: [uidMixin],
22
- props: {
23
- selected: Boolean,
24
- disabled: Boolean,
25
- label: { type: String, required: true },
26
- },
27
- data() {
28
- return {
29
- dataSelected: this.selected,
30
- };
31
- },
32
- watch: {
33
- selected() {
34
- if (this.selected) {
35
- this.$parent.$emit('cv:selected', this);
36
- }
37
- },
38
- disabled() {
39
- if (this.disabled) {
40
- this.$parent.$emit('cv:disabled', this);
41
- } else {
42
- this.$parent.$emit('cv:enabled', this);
43
- }
44
- },
45
- },
46
- computed: {
47
- internalSelected: {
48
- get() {
49
- return this.dataSelected;
50
- },
51
- set(val) {
52
- this.dataSelected = val;
53
- },
54
- },
55
- internalDisabled() {
56
- return this.disabled;
57
- },
58
- },
59
- mounted() {
60
- this.$_CvTab = true; // for use by parent with $children
61
-
62
- this.$parent.$emit('cv:mounted', this);
63
- },
64
- beforeDestroy() {
65
- this.$parent.$emit('cv:beforeDestroy', this);
66
- },
67
- };
68
- </script>
@@ -1,20 +0,0 @@
1
- <template>
2
- <div :class="`cv-tabs ${carbonPrefix}--tabs ${carbonPrefix}--skeleton ${carbonPrefix}--tabs--scrollable`">
3
- <ul :class="`${carbonPrefix}--tabs--scrollable__nav`">
4
- <li v-for="index in tabCount" :key="index" :class="`${carbonPrefix}--tabs--scrollable__nav-item`">
5
- <div :class="`${carbonPrefix}--tabs__nav-link`"><span></span></div>
6
- </li>
7
- </ul>
8
- </div>
9
- </template>
10
-
11
- <script>
12
- import { carbonPrefixMixin } from '../../mixins';
13
- export default {
14
- name: 'CvTabsSkeleton',
15
- mixins: [carbonPrefixMixin],
16
- props: {
17
- tabCount: { type: Number, default: 5 },
18
- },
19
- };
20
- </script>