@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,52 +0,0 @@
1
- <template>
2
- <div :class="{ [`${carbonPrefix}--form-item`]: formItem }">
3
- <input
4
- v-bind="$attrs"
5
- v-on="inputListeners"
6
- :class="[`${carbonPrefix}--toggle-input`, { 'bx--toggle-input--small': small }]"
7
- type="checkbox"
8
- :id="uid"
9
- :checked="isChecked === true"
10
- :value="value"
11
- ref="input"
12
- />
13
- <label :class="`${carbonPrefix}--toggle-input__label`" :for="uid" :aria-label="hiddenLabel">
14
- {{ visibleLabel }}
15
- <span :class="`${carbonPrefix}--toggle__switch`">
16
- <svg :class="`${carbonPrefix}--toggle__check`" width="6px" height="5px" viewBox="0 0 6 5">
17
- <path d="M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z" />
18
- </svg>
19
- <span :class="`${carbonPrefix}--toggle__text--off`" aria-hidden="true">
20
- <slot name="text-left">Off</slot>
21
- </span>
22
- <span :class="`${carbonPrefix}--toggle__text--on`" aria-hidden="true">
23
- <slot name="text-right">On</slot>
24
- </span>
25
- </span>
26
- </label>
27
- </div>
28
- </template>
29
-
30
- <script>
31
- import { uidMixin, checkMixin, carbonPrefixMixin, methodsMixin } from '../../mixins';
32
-
33
- export default {
34
- name: 'CvToggle',
35
- mixins: [uidMixin, checkMixin, carbonPrefixMixin, methodsMixin({ input: ['blur', 'focus'] })],
36
- inheritAttrs: false,
37
- props: {
38
- small: Boolean,
39
- label: String,
40
- formItem: { type: Boolean, default: true },
41
- hideLabel: Boolean,
42
- },
43
- computed: {
44
- hiddenLabel() {
45
- return this.hideLabel ? this.label : undefined;
46
- },
47
- visibleLabel() {
48
- return this.hideLabel ? undefined : this.label;
49
- },
50
- },
51
- };
52
- </script>
@@ -1,3 +0,0 @@
1
- import CvToggle from './cv-toggle';
2
- import CvToggleSkeleton from './cv-toggle-skeleton';
3
- export { CvToggle, CvToggleSkeleton };
@@ -1,11 +0,0 @@
1
- <template>
2
- <hr :class="`cv-toolbar-divider ${carbonPrefix}--toolbar-menu__divider`" />
3
- </template>
4
-
5
- <script>
6
- import { carbonPrefixMixin } from '../../mixins';
7
- export default {
8
- name: 'CvToolbarDivider',
9
- mixins: [carbonPrefixMixin],
10
- };
11
- </script>
@@ -1,16 +0,0 @@
1
- <template>
2
- <li
3
- :class="`cv-toolbar-option ${carbonPrefix}--toolbar-menu__option`"
4
- @keydown.esc.prevent="$parent.$emit('cv:close')"
5
- >
6
- <slot></slot>
7
- </li>
8
- </template>
9
-
10
- <script>
11
- import { carbonPrefixMixin } from '../../mixins';
12
- export default {
13
- name: 'CvToolbarOption',
14
- mixins: [carbonPrefixMixin],
15
- };
16
- </script>
@@ -1,40 +0,0 @@
1
- <template>
2
- <cv-search
3
- kind="toolbar"
4
- class="cv-toolbar-search"
5
- :form-item="false"
6
- v-bind="$attrs"
7
- v-on="$listeners"
8
- @focus="onFocus"
9
- @blur="onBlur"
10
- :value="value"
11
- small
12
- ></cv-search>
13
- </template>
14
-
15
- <script>
16
- import CvSearch from '../cv-search/cv-search';
17
- import { carbonPrefixMixin } from '../../mixins';
18
-
19
- export default {
20
- name: 'CvToolbarSearch',
21
- mixins: [carbonPrefixMixin],
22
- components: {
23
- CvSearch,
24
- },
25
- inheritAttrs: false,
26
- props: {
27
- value: String,
28
- },
29
- methods: {
30
- onBlur(ev) {
31
- if (!this.$el.contains(ev.target)) {
32
- this.$el.classList.remove(`${this.carbonPrefix}--toolbar-search--active`);
33
- }
34
- },
35
- onFocus() {
36
- this.$el.classList.add(`${this.carbonPrefix}--toolbar-search--active`);
37
- },
38
- },
39
- };
40
- </script>
@@ -1,14 +0,0 @@
1
- <template>
2
- <li :class="`cv-toolbar-title ${carbonPrefix}--toolbar-menu__title`">{{ title }}</li>
3
- </template>
4
-
5
- <script>
6
- import { carbonPrefixMixin } from '../../mixins';
7
- export default {
8
- name: 'CvToolbarTitle',
9
- mixins: [carbonPrefixMixin],
10
- props: {
11
- title: { type: String, required: true },
12
- },
13
- };
14
- </script>
@@ -1,13 +0,0 @@
1
- <template>
2
- <div :class="`${carbonPrefix}--toolbar`" data-toolbar>
3
- <slot></slot>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- import { carbonPrefixMixin } from '../../mixins';
9
- export default {
10
- name: 'CvToolbar',
11
- mixins: [carbonPrefixMixin],
12
- };
13
- </script>
@@ -1,6 +0,0 @@
1
- import CvToolbar from './cv-toolbar';
2
- import CvToolbarTitle from './cv-toolbar-title';
3
- import CvToolbarSearch from './cv-toolbar-search';
4
- import CvToolbarOption from './cv-toolbar-option';
5
- import CvToolbarDivider from './cv-toolbar-divider';
6
- export { CvToolbar, CvToolbarTitle, CvToolbarSearch, CvToolbarOption, CvToolbarDivider };
@@ -1,2 +0,0 @@
1
- export const alignments = ['start', 'center', 'end'];
2
- export const directions = ['top', 'bottom', 'right', 'left'];
@@ -1,44 +0,0 @@
1
- <template>
2
- <div :class="`cv-definition-tooltip ${carbonPrefix}--tooltip--definition ${carbonPrefix}--tooltip--a11y`" :id="uid">
3
- <button
4
- :aria-describedby="`${uid}-label`"
5
- :class="[
6
- `${carbonPrefix}--tooltip__trigger`,
7
- `${carbonPrefix}--tooltip--a11y`,
8
- `${carbonPrefix}--tooltip__trigger--definition`,
9
- `${carbonPrefix}--tooltip--${direction}`,
10
- `${carbonPrefix}--tooltip--align-${alignment}`,
11
- ]"
12
- type="button"
13
- >
14
- {{ term }}
15
- </button>
16
- <div :class="`${carbonPrefix}--assistive-text`" :id="`${uid}-label`" role="tooltip">{{ definition }}</div>
17
- </div>
18
- </template>
19
-
20
- <script>
21
- import { uidMixin, carbonPrefixMixin } from '../../mixins';
22
- import { alignments, directions } from './consts';
23
-
24
- export default {
25
- name: 'CvDefinitionTooltip',
26
- mixins: [uidMixin, carbonPrefixMixin],
27
- props: {
28
- alignment: { type: String, default: 'center', validator: val => alignments.includes(val) },
29
- definition: { type: String, required: true },
30
- direction: {
31
- type: String,
32
- default: 'top',
33
- validator: val => {
34
- const valid = directions.includes(val);
35
- if (!valid) {
36
- console.warn(`CVDefinitionTooltip.direction must be one of the following: ${directions}`);
37
- }
38
- return valid;
39
- },
40
- },
41
- term: { type: String, required: true },
42
- },
43
- };
44
- </script>
@@ -1,241 +0,0 @@
1
- <template>
2
- <div class="cv-interactive-tooltip">
3
- <div :id="`${uid}-label`" :class="`${carbonPrefix}--tooltip__label`">
4
- <slot name="label"></slot>
5
-
6
- <button
7
- :aria-expanded="dataVisible ? 'true' : 'false'"
8
- :aria-labelledby="`${uid}-label`"
9
- :class="`${carbonPrefix}--tooltip__trigger`"
10
- :aria-controls="`${uid}`"
11
- aria-haspopup="true"
12
- ref="trigger"
13
- type="button"
14
- @click="toggle"
15
- @keydown.tab="onTriggerTab"
16
- @focusout="checkFocusOut"
17
- >
18
- <slot name="trigger">
19
- <Information16 />
20
- </slot>
21
- </button>
22
- </div>
23
-
24
- <div
25
- :id="uid"
26
- aria-hidden="true"
27
- :data-floating-menu-direction="direction"
28
- :class="[
29
- `${carbonPrefix}--tooltip`,
30
- {
31
- [`${carbonPrefix}--tooltip--shown`]: dataVisible,
32
- [`${carbonPrefix}--tooltip--${direction}`]: direction,
33
- [`${carbonPrefix}--tooltip--align-${alignment}`]: alignment,
34
- },
35
- ]"
36
- ref="popup"
37
- role="dialog"
38
- :aria-describedby="`${uid}-body`"
39
- :aria-labelledby="`${uid}-label`"
40
- @focusout="checkFocusOut"
41
- :style="{ left: left + 'px', top: top + 'px' }"
42
- tabindex="-1"
43
- @mousedown.prevent="preventFocusOut"
44
- >
45
- <div
46
- class="cv-interactive-tooltip__before-content"
47
- ref="beforeContent"
48
- tabindex="0"
49
- style="position: absolute; left: -9999px; width: 1px; height: 1px"
50
- @focus="focusBeforeContent"
51
- />
52
- <span :class="`${carbonPrefix}--tooltip__caret`"></span>
53
- <div :class="`${carbonPrefix}--tooltip__content`">
54
- <slot name="content"></slot>
55
- </div>
56
- <div
57
- class="cv-interactive-tooltip__after-content"
58
- ref="afterContent"
59
- tabindex="0"
60
- style="position: absolute; left: -9999px; width: 1px; height: 1px"
61
- @focus="focusAfterContent"
62
- />
63
- </div>
64
- </div>
65
- </template>
66
-
67
- <script>
68
- import { uidMixin, carbonPrefixMixin } from '../../mixins';
69
- import Information16 from '@carbon/icons-vue/es/information/16';
70
- import { alignments, directions } from './consts';
71
-
72
- export default {
73
- name: 'CvInteractiveTooltip',
74
- mixins: [uidMixin, carbonPrefixMixin],
75
- components: { Information16 },
76
- props: {
77
- alignment: { type: String, default: 'center', validator: val => alignments.includes(val) },
78
- direction: {
79
- type: String,
80
- default: 'top',
81
- validator: val => {
82
- const valid = directions.includes(val);
83
- if (!valid) {
84
- console.warn(`CVInteractiveTooltip.direction must be one of the following: ${directions}`);
85
- }
86
- return valid;
87
- },
88
- },
89
- visible: { type: Boolean, default: false },
90
- },
91
- data() {
92
- return {
93
- dataVisible: false,
94
- left: -9999, // offscreen
95
- top: 0,
96
- };
97
- },
98
- computed: {
99
- contentAfter() {
100
- return this.direction === 'right' || this.direction === 'bottom';
101
- },
102
- },
103
- watch: {
104
- visible() {
105
- if (this.visible) {
106
- this.show();
107
- } else {
108
- this.hide();
109
- }
110
- },
111
- direction() {
112
- if (this.visible) {
113
- this.position();
114
- }
115
- },
116
- dataVisible() {
117
- if (this.dataVisible) {
118
- this.$emit('tooltip-shown');
119
- } else {
120
- this.$emit('tooltip-hidden');
121
- }
122
- },
123
- },
124
- methods: {
125
- positionListen(on) {
126
- if (on) {
127
- window.addEventListener('scroll', this.position);
128
- window.addEventListener('resize', this.position);
129
- } else {
130
- window.removeEventListener('scroll', this.position);
131
- window.removeEventListener('resize', this.position);
132
- }
133
- },
134
- position() {
135
- const menuPosition = this.$refs.trigger.getBoundingClientRect();
136
- const pixelsScrolledX = window.scrollX || window.pageXOffset;
137
- const pixelsScrolledY = window.scrollY || window.pageYOffset;
138
-
139
- if (this.direction === 'top' || this.direction === 'bottom') {
140
- this.left =
141
- menuPosition.left +
142
- 0.5 +
143
- (this.$refs.trigger.offsetWidth - this.$refs.popup.offsetWidth) / 2 +
144
- pixelsScrolledX;
145
-
146
- if (this.direction === 'bottom') {
147
- this.top = menuPosition.bottom + 10 + pixelsScrolledY;
148
- } else {
149
- this.top = menuPosition.top - 15 - this.$refs.popup.offsetHeight + pixelsScrolledY;
150
- }
151
- } else {
152
- this.top =
153
- menuPosition.top +
154
- (this.$refs.trigger.offsetHeight - 0.5 - this.$refs.popup.offsetHeight) / 2 +
155
- pixelsScrolledY;
156
- if (this.direction === 'left') {
157
- this.left = menuPosition.left - 10 - this.$refs.popup.offsetWidth + pixelsScrolledX;
158
- } else {
159
- this.left = menuPosition.right + 15 + pixelsScrolledX;
160
- }
161
- }
162
- },
163
- show() {
164
- this.dataVisible = true;
165
- this.positionListen(true);
166
-
167
- this.$nextTick(() => {
168
- this.position();
169
- this.$refs.trigger.focus();
170
- });
171
- },
172
- hide() {
173
- this.dataVisible = false;
174
- this.positionListen(true);
175
- },
176
- toggle() {
177
- if (this.dataVisible) {
178
- this.hide();
179
- } else {
180
- this.show();
181
- }
182
- },
183
- onTriggerTab(ev) {
184
- if (!ev.shiftKey) {
185
- if (this.contentAfter) {
186
- // move focus before content before tab press
187
- this.$refs.beforeContent.focus();
188
- }
189
- } else {
190
- if (!this.contentAfter) {
191
- // move focus after content before tab press
192
- this.$refs.afterContent.focus();
193
- }
194
- }
195
- },
196
- checkFocusOut(ev) {
197
- this.dataVisible = ev.relatedTarget === this.$refs.trigger || this.$refs.popup.contains(ev.relatedTarget);
198
- },
199
- focusBeforeContent(ev) {
200
- if (this.contentAfter) {
201
- if (this.$refs.popup.contains(ev.relatedTarget)) {
202
- this.$refs.trigger.focus();
203
- }
204
- } else {
205
- this.$refs.trigger.focus();
206
- this.dataVisible = this.contentAfter;
207
- }
208
- },
209
- focusAfterContent(ev) {
210
- if (!this.contentAfter) {
211
- if (this.$refs.popup.contains(ev.relatedTarget)) {
212
- this.$refs.trigger.focus();
213
- }
214
- } else {
215
- this.$refs.trigger.focus();
216
- this.dataVisible = !this.contentAfter;
217
- }
218
- },
219
- preventFocusOut() {
220
- // This is here to prevent focus being lost if the user clicks on the contents of the interactive tool tip
221
- },
222
- },
223
- mounted() {
224
- // move popup out to body to ensure it appears above other elements
225
- this.popupEl = document.body.appendChild(this.$refs.popup);
226
-
227
- if (this.visible) {
228
- this.show();
229
- } else {
230
- this.hide();
231
- }
232
- },
233
- beforeDestroy() {
234
- this.positionListen(false);
235
- if (this.popupEl) {
236
- // move back to where it came from
237
- this.$el.appendChild(this.popupEl);
238
- }
239
- },
240
- };
241
- </script>
@@ -1,44 +0,0 @@
1
- <template>
2
- <button
3
- :class="[
4
- `cv-tooltip`,
5
- `${carbonPrefix}--tooltip__trigger`,
6
- `${carbonPrefix}--tooltip--a11y`,
7
- `${carbonPrefix}--tooltip--${direction}`,
8
- `${carbonPrefix}--tooltip--align-${alignment}`,
9
- ]"
10
- type="button"
11
- >
12
- <span :class="`${carbonPrefix}--assistive-text`">{{ tip }}</span>
13
- <slot>
14
- <Information16 />
15
- </slot>
16
- </button>
17
- </template>
18
-
19
- <script>
20
- import Information16 from '@carbon/icons-vue/es/information/16';
21
- import { carbonPrefixMixin } from '../../mixins';
22
- import { alignments, directions } from './consts';
23
-
24
- export default {
25
- name: 'CvTooltip',
26
- mixins: [carbonPrefixMixin],
27
- components: { Information16 },
28
- props: {
29
- alignment: { type: String, default: 'center', validator: val => alignments.includes(val) },
30
- direction: {
31
- type: String,
32
- default: 'top',
33
- validator: val => {
34
- const valid = directions.includes(val);
35
- if (!valid) {
36
- console.warn(`CVTooltip.direction must be one of the following: ${directions}`);
37
- }
38
- return valid;
39
- },
40
- },
41
- tip: { type: String, required: true },
42
- },
43
- };
44
- </script>
@@ -1,6 +0,0 @@
1
- import CvTooltip from './cv-tooltip';
2
- import CvInteractiveTooltip from './cv-interactive-tooltip';
3
- import CvDefinitionTooltip from './cv-definition-tooltip';
4
-
5
- export { alignments, directions } from './consts';
6
- export { CvTooltip, CvInteractiveTooltip, CvDefinitionTooltip };
@@ -1,13 +0,0 @@
1
- <template>
2
- <span :class="`${carbonPrefix}--side-nav__link-text`">
3
- <slot />
4
- </span>
5
- </template>
6
-
7
- <script>
8
- import { carbonPrefixMixin } from '../../mixins';
9
- export default {
10
- name: 'CvSideNavLinkText',
11
- mixins: [carbonPrefixMixin],
12
- };
13
- </script>
@@ -1,16 +0,0 @@
1
- <template>
2
- <component :is="tagType" :class="`${carbonPrefix}--content`">
3
- <slot />
4
- </component>
5
- </template>
6
-
7
- <script>
8
- import { carbonPrefixMixin } from '../../mixins';
9
- export default {
10
- name: 'CvContent',
11
- mixins: [carbonPrefixMixin],
12
- props: {
13
- tagType: { type: String, default: 'main' },
14
- },
15
- };
16
- </script>
@@ -1,84 +0,0 @@
1
- <template>
2
- <cv-icon-button
3
- v-on="$listeners"
4
- :class="[
5
- `cv-header-global-action`,
6
- `${carbonPrefix}--header__action`,
7
- { [`${carbonPrefix}--header__action--active`]: dataActive },
8
- ]"
9
- type="button"
10
- aria-haspopup="true"
11
- :aria-controls="ariaControls"
12
- :aria-expanded="active ? 'true' : 'false'"
13
- @click="gaToggle"
14
- @focusout="gaFocusout"
15
- :id="uid"
16
- :label="label"
17
- :tipAlignment="tipAlignment"
18
- :tipPosition="tipPosition"
19
- >
20
- <template slot="icon">
21
- <slot />
22
- </template>
23
- </cv-icon-button>
24
- </template>
25
-
26
- <script>
27
- import { uidMixin, carbonPrefixMixin } from '../../mixins';
28
- import { CvIconButton } from '../cv-button';
29
-
30
- export default {
31
- components: { CvIconButton },
32
- name: 'CvHeaderGlobalAction',
33
- mixins: [uidMixin, carbonPrefixMixin],
34
- props: {
35
- active: Boolean,
36
- ariaControls: String,
37
- label: { type: String, default: undefined },
38
- tipPosition: {
39
- type: String,
40
- default: 'bottom',
41
- validator: val => ['top', 'left', 'bottom', 'right'].includes(val),
42
- },
43
- tipAlignment: { type: String, default: 'center', validator: val => ['start', 'center', 'end'].includes(val) },
44
- },
45
- mounted() {
46
- this.$parent.$emit('cv:panel-control-mounted', this);
47
- },
48
- beforeDestroy() {
49
- this.$parent.$emit('cv:panel-control-beforeDestroy', this);
50
- },
51
- data() {
52
- return {
53
- dataActive: this.active,
54
- };
55
- },
56
- watch: {
57
- expanded() {
58
- if (this.active !== this.dataActive) {
59
- this.gaToggle();
60
- }
61
- },
62
- },
63
- computed: {
64
- panelExpanded: {
65
- get() {
66
- return this.dataActive;
67
- },
68
- set(val) {
69
- // do not emit 'cv:panel-control-toggle'
70
- this.dataActive = val;
71
- },
72
- },
73
- },
74
- methods: {
75
- gaToggle() {
76
- this.$el.focus();
77
- this.$parent.$emit('cv:panel-control-toggle', this);
78
- },
79
- gaFocusout(ev) {
80
- this.$parent.$emit('cv:panel-control-focusout', this, ev);
81
- },
82
- },
83
- };
84
- </script>