@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.
- package/README.md +34 -264
- package/dist/carbon-vue-3.common.js +27392 -0
- package/dist/carbon-vue-3.common.js.map +1 -0
- package/dist/carbon-vue-3.umd.js +27403 -0
- package/dist/carbon-vue-3.umd.js.map +1 -0
- package/dist/carbon-vue-3.umd.min.js +17 -0
- package/dist/carbon-vue-3.umd.min.js.map +1 -0
- package/dist/demo.html +1 -34
- package/package.json +185 -62
- package/src/components/CvAccordion/CvAccordion.stories.js +54 -0
- package/src/components/CvAccordion/CvAccordion.vue +95 -0
- package/src/components/CvAccordion/CvAccordionItem.vue +101 -0
- package/src/components/{cv-accordion/cv-accordion-skeleton.vue → CvAccordion/CvAccordionSkeleton.vue} +14 -18
- package/src/components/CvAccordion/_CvAccordionItemSkeleton.vue +30 -0
- package/src/components/CvAccordion/consts.js +17 -0
- package/src/components/CvAccordion/index.js +6 -0
- package/src/components/CvAspectRatio/CvAspectRatio.stories.js +56 -0
- package/src/components/CvAspectRatio/CvAspectRatio.stories.scss +4 -0
- package/src/components/CvAspectRatio/CvAspectRatio.vue +33 -0
- package/src/components/CvAspectRatio/consts.js +2 -0
- package/src/components/CvAspectRatio/index.js +4 -0
- package/src/components/CvBreadcrumb/CvBreadcrumb.stories.js +75 -0
- package/src/components/CvBreadcrumb/CvBreadcrumb.vue +37 -0
- package/src/components/CvBreadcrumb/CvBreadcrumbItem.vue +28 -0
- package/src/components/CvBreadcrumb/CvBreadcrumbSkeleton.vue +29 -0
- package/src/components/CvBreadcrumb/CvBreadcrumbSkeletonItem.vue +14 -0
- package/src/components/CvBreadcrumb/index.js +11 -0
- package/src/components/CvButton/CvButton.stories.js +119 -0
- package/src/components/CvButton/CvButton.vue +68 -0
- package/src/components/CvButton/CvButtonCommon.js +75 -0
- package/src/components/CvButton/CvButtonSet.stories.js +36 -0
- package/src/components/CvButton/CvButtonSet.vue +30 -0
- package/src/components/CvButton/CvIconButton.stories.js +139 -0
- package/src/components/CvButton/CvIconButton.vue +88 -0
- package/src/components/CvButton/index.js +7 -0
- package/src/components/CvButton/sbBtnPrefix.js +2 -0
- package/src/components/CvCheckbox/CvCheckbox.stories.js +111 -0
- package/src/components/CvCheckbox/CvCheckbox.vue +73 -0
- package/src/components/CvCheckbox/index.js +3 -0
- package/src/components/CvCodeSnippet/CvCodeSnippet.stories.js +181 -0
- package/src/components/CvCodeSnippet/CvCodeSnippet.stories.scss +4 -0
- package/src/components/CvCodeSnippet/CvCodeSnippet.vue +125 -0
- package/src/components/CvCodeSnippet/CvCodeSnippetSkeleton.vue +43 -0
- package/src/components/CvCodeSnippet/_CviCodeSnippetInline.vue +72 -0
- package/src/components/CvCodeSnippet/_CviCodeSnippetMultiline.vue +199 -0
- package/src/components/CvCodeSnippet/_CviCodeSnippetOneline.vue +106 -0
- package/src/components/CvCodeSnippet/consts.js +2 -0
- package/src/components/CvCodeSnippet/index.js +4 -0
- package/src/components/CvComboBox/CvComboBox.stories.js +174 -0
- package/src/components/CvComboBox/CvComboBox.vue +460 -0
- package/src/components/CvComboBox/index.js +3 -0
- package/src/components/CvContentSwitcher/CvContentSwitcher.stories.mdx +196 -0
- package/src/components/CvContentSwitcher/CvContentSwitcher.vue +64 -0
- package/src/components/CvContentSwitcher/CvContentSwitcherButton.vue +117 -0
- package/src/components/CvContentSwitcher/CvContentSwitcherContent.vue +21 -0
- package/src/components/CvContentSwitcher/cvContentSwitcherStore.js +30 -0
- package/src/components/CvContentSwitcher/index.js +3 -0
- package/src/components/CvCopyButton/CvCopyButton.stories.js +28 -0
- package/src/components/CvCopyButton/CvCopyButton.vue +45 -0
- package/src/components/CvCopyButton/_CviCopyButton.vue +71 -0
- package/src/components/CvCopyButton/index.js +3 -0
- package/src/components/CvDataTable/CvDataTable.stories.mdx +304 -0
- package/src/components/CvDataTable/CvDataTable.vue +648 -0
- package/src/components/CvDataTable/CvDataTableAction.vue +22 -0
- package/src/components/CvDataTable/CvDataTableCell.vue +11 -0
- package/src/components/CvDataTable/CvDataTableHeading.vue +143 -0
- package/src/components/CvDataTable/CvDataTableRow.vue +139 -0
- package/src/components/CvDataTable/CvDataTableSkeleton.vue +48 -0
- package/src/components/CvDataTable/_CvDataTableRowInner.vue +169 -0
- package/src/components/CvDataTable/cvDataTableStore.js +340 -0
- package/src/components/CvDataTable/index.js +3 -0
- package/src/components/CvEmpty/_CvEmpty.vue +22 -0
- package/src/components/CvGrid/CvColumn.vue +85 -0
- package/src/components/CvGrid/CvGrid.vue +42 -0
- package/src/components/{cv-grid/cv-row.vue → CvGrid/CvRow.vue} +8 -12
- package/src/components/CvGrid/GvGrid.stories.mdx +217 -0
- package/src/components/CvGrid/_SbContainer.vue +22 -0
- package/src/components/CvGrid/_cvColumnValidation.js +48 -0
- package/src/components/CvLink/CvLink.stories.js +169 -0
- package/src/components/CvLink/CvLink.vue +38 -0
- package/src/components/CvLink/index.js +4 -0
- package/src/components/CvList/CvList.stories.js +88 -0
- package/src/components/CvList/CvList.vue +50 -0
- package/src/components/CvList/CvListItem.vue +12 -0
- package/src/components/CvList/index.js +4 -0
- package/src/components/CvLoading/CvLoading.stories.js +78 -0
- package/src/components/CvLoading/CvLoading.stories.scss +4 -0
- package/src/components/CvLoading/CvLoading.vue +106 -0
- package/src/components/CvLoading/index.js +4 -0
- package/src/components/CvNotification/CvInlineNotification.stories.js +109 -0
- package/src/components/CvNotification/CvInlineNotification.vue +102 -0
- package/src/components/CvNotification/CvToastNotification.stories.js +108 -0
- package/src/components/CvNotification/CvToastNotification.vue +88 -0
- package/src/components/CvNotification/consts.js +31 -0
- package/src/components/CvNotification/index.js +5 -0
- package/src/components/CvOverflowMenu/CvOverflowMenu.stories.mdx +119 -0
- package/src/components/CvOverflowMenu/CvOverflowMenu.vue +283 -0
- package/src/components/{cv-overflow-menu/cv-overflow-menu-item.vue → CvOverflowMenu/CvOverflowMenuItem.vue} +26 -20
- package/src/components/CvOverflowMenu/index.js +3 -0
- package/src/components/CvPagination/CvPagination.stories.mdx +160 -0
- package/src/components/CvPagination/CvPagination.vue +246 -0
- package/src/components/CvPagination/index.js +3 -0
- package/src/components/CvSelect/CvSelect.stories.mdx +227 -0
- package/src/components/CvSelect/CvSelect.vue +224 -0
- package/src/components/CvSelect/CvSelectOptgroup.vue +9 -0
- package/src/components/CvSelect/CvSelectOption.vue +22 -0
- package/src/components/CvSelect/index.js +3 -0
- package/src/components/CvSkeletonText/CvSkeletonText.stories.js +56 -0
- package/src/components/CvSkeletonText/CvSkeletonText.vue +63 -0
- package/src/components/CvSkeletonText/index.js +3 -0
- package/src/components/CvSvg/_CvSvg.vue +48 -0
- package/src/components/CvSvg/__tests__/_TestIcon.vue +19 -0
- package/src/components/CvSvg/__tests__/test-svg.svg +5 -0
- package/src/components/CvTag/CvTag.stories.js +64 -0
- package/src/components/CvTag/CvTag.vue +105 -0
- package/src/components/CvTag/consts.js +15 -0
- package/src/components/CvTag/index.js +5 -0
- package/src/components/CvUIShell/CvHeader.vue +203 -0
- package/src/components/CvUIShell/CvHeaderGlobalAction.vue +105 -0
- package/src/components/{cv-ui-shell/cv-header-menu.vue → CvUIShell/CvHeaderMenu.vue} +41 -37
- package/src/components/CvUIShell/CvHeaderMenuButton.vue +103 -0
- package/src/components/CvUIShell/CvHeaderMenuItem.vue +38 -0
- package/src/components/CvUIShell/CvHeaderName.vue +25 -0
- package/src/components/CvUIShell/CvHeaderNav.vue +18 -0
- package/src/components/CvUIShell/CvHeaderPanel.vue +106 -0
- package/src/components/CvUIShell/CvSideNav.vue +131 -0
- package/src/components/CvUIShell/CvSideNavIcon.vue +17 -0
- package/src/components/CvUIShell/CvSideNavItems.vue +22 -0
- package/src/components/CvUIShell/CvSideNavLink.vue +47 -0
- package/src/components/CvUIShell/CvSideNavMenu.vue +85 -0
- package/src/components/CvUIShell/CvSideNavMenuDivider.vue +7 -0
- package/src/components/CvUIShell/CvSideNavMenuItem.vue +31 -0
- package/src/components/CvUIShell/CvSkipToContent.vue +20 -0
- package/src/components/CvUIShell/CvSwitcher.vue +9 -0
- package/src/components/CvUIShell/CvSwitcherItem.vue +9 -0
- package/src/components/CvUIShell/CvSwitcherItemLink.vue +26 -0
- package/src/components/CvUIShell/CvUIShell.stories.mdx +454 -0
- package/src/components/{cv-ui-shell/_cv-side-nav-footer.vue → CvUIShell/_CvSideNavFooter.vue} +11 -15
- package/src/components/CvUIShell/_CvSideNavLinkText.vue +9 -0
- package/src/components/CvWrapper/CvWrapper.js +23 -0
- package/src/global/component-utils/event-bus.js +23 -0
- package/src/global/component-utils/validators.js +14 -0
- package/src/global/settings.js +5 -0
- package/src/global/storybook-utils/__tests__/story-source-code.js +162 -0
- package/src/global/storybook-utils/controls-from-props.js +72 -0
- package/src/global/storybook-utils/index.js +5 -0
- package/src/global/storybook-utils/sbCompPrefix.js +1 -0
- package/src/global/storybook-utils/split-slot-args.js +14 -0
- package/src/global/storybook-utils/story-source-code.js +52 -0
- package/src/index.js +13 -83
- package/src/use/components.js +24 -0
- package/src/use/cvCheck.js +94 -0
- package/src/use/cvId.js +57 -0
- package/src/use/cvLink.js +42 -0
- package/src/use/cvTheme.js +30 -0
- package/src/use/index.js +1 -0
- package/src/use/overflow.js +37 -0
- package/dist/carbon-vue.common.js +0 -23411
- package/dist/carbon-vue.common.js.map +0 -1
- package/dist/carbon-vue.umd.js +0 -23421
- package/dist/carbon-vue.umd.js.map +0 -1
- package/dist/carbon-vue.umd.min.js +0 -30
- package/dist/carbon-vue.umd.min.js.map +0 -1
- package/src/assets/images/component-icons.svg +0 -57
- package/src/assets/images/example-icon-svg.js +0 -10
- package/src/assets/images/example-icon.svg +0 -6
- package/src/assets/images/example-icons.svg +0 -6
- package/src/carbon.yml +0 -442
- package/src/components/cv-accordion/_cv-accordion-item-skeleton.vue +0 -29
- package/src/components/cv-accordion/cv-accordion-item.vue +0 -87
- package/src/components/cv-accordion/cv-accordion.vue +0 -59
- package/src/components/cv-accordion/index.js +0 -5
- package/src/components/cv-aspect-ratio/cv-aspect-ratio.vue +0 -28
- package/src/components/cv-aspect-ratio/index.js +0 -2
- package/src/components/cv-breadcrumb/_cv-breadcrumb-item-skeleton.vue +0 -13
- package/src/components/cv-breadcrumb/cv-breadcrumb-item.vue +0 -28
- package/src/components/cv-breadcrumb/cv-breadcrumb-skeleton.vue +0 -30
- package/src/components/cv-breadcrumb/cv-breadcrumb.vue +0 -21
- package/src/components/cv-breadcrumb/index.js +0 -5
- package/src/components/cv-button/button-mixin.js +0 -91
- package/src/components/cv-button/cv-button-set.vue +0 -17
- package/src/components/cv-button/cv-button-skeleton.vue +0 -12
- package/src/components/cv-button/cv-button.vue +0 -19
- package/src/components/cv-button/cv-icon-button.vue +0 -42
- package/src/components/cv-button/index.js +0 -6
- package/src/components/cv-checkbox/cv-checkbox-skeleton.vue +0 -15
- package/src/components/cv-checkbox/cv-checkbox.vue +0 -70
- package/src/components/cv-checkbox/index.js +0 -3
- package/src/components/cv-code-snippet/_cv-code-snippet-inline.vue +0 -39
- package/src/components/cv-code-snippet/_cv-code-snippet-multiline.vue +0 -79
- package/src/components/cv-code-snippet/_cv-code-snippet-oneline.vue +0 -47
- package/src/components/cv-code-snippet/cv-code-snippet-skeleton.vue +0 -30
- package/src/components/cv-code-snippet/cv-code-snippet.vue +0 -83
- package/src/components/cv-code-snippet/index.js +0 -3
- package/src/components/cv-combo-box/cv-combo-box.vue +0 -386
- package/src/components/cv-combo-box/index.js +0 -3
- package/src/components/cv-content-switcher/cv-content-switcher-button.vue +0 -104
- package/src/components/cv-content-switcher/cv-content-switcher-content.vue +0 -26
- package/src/components/cv-content-switcher/cv-content-switcher-store.js +0 -22
- package/src/components/cv-content-switcher/cv-content-switcher.vue +0 -117
- package/src/components/cv-content-switcher/index.js +0 -4
- package/src/components/cv-data-table/_cv-data-table-row-inner.vue +0 -139
- package/src/components/cv-data-table/cv-data-table-action.vue +0 -25
- package/src/components/cv-data-table/cv-data-table-cell.vue +0 -14
- package/src/components/cv-data-table/cv-data-table-heading.vue +0 -109
- package/src/components/cv-data-table/cv-data-table-row.vue +0 -113
- package/src/components/cv-data-table/cv-data-table-skeleton.vue +0 -64
- package/src/components/cv-data-table/cv-data-table.vue +0 -525
- package/src/components/cv-data-table/index.js +0 -8
- package/src/components/cv-date-picker/cv-date-picker.vue +0 -362
- package/src/components/cv-date-picker/index.js +0 -3
- package/src/components/cv-date-picker/plugins/appendToPlugin.js +0 -52
- package/src/components/cv-date-picker/plugins/fixEventsPlugin.js +0 -75
- package/src/components/cv-date-picker/plugins/monthSelectPlugin.js +0 -66
- package/src/components/cv-date-picker/plugins/rangePlugin.js +0 -45
- package/src/components/cv-dropdown/cv-dropdown-item.vue +0 -84
- package/src/components/cv-dropdown/cv-dropdown-skeleton.vue +0 -20
- package/src/components/cv-dropdown/cv-dropdown.vue +0 -373
- package/src/components/cv-dropdown/index.js +0 -5
- package/src/components/cv-feedback-button/_cv-feedback-button.vue +0 -74
- package/src/components/cv-file-uploader/consts.js +0 -12
- package/src/components/cv-file-uploader/cv-file-uploader-skeleton.vue +0 -22
- package/src/components/cv-file-uploader/cv-file-uploader.vue +0 -348
- package/src/components/cv-file-uploader/index.js +0 -5
- package/src/components/cv-form/cv-form-group.vue +0 -32
- package/src/components/cv-form/cv-form-item.vue +0 -13
- package/src/components/cv-form/cv-form.vue +0 -13
- package/src/components/cv-form/index.js +0 -5
- package/src/components/cv-grid/cv-column.vue +0 -77
- package/src/components/cv-grid/cv-grid.vue +0 -32
- package/src/components/cv-grid/index.js +0 -5
- package/src/components/cv-icon/_cv-icon.vue +0 -30
- package/src/components/cv-inline-loading/consts.js +0 -8
- package/src/components/cv-inline-loading/cv-inline-loading.vue +0 -91
- package/src/components/cv-inline-loading/index.js +0 -4
- package/src/components/cv-inline-notification/cv-inline-notification.vue +0 -89
- package/src/components/cv-inline-notification/index.js +0 -3
- package/src/components/cv-link/cv-link.vue +0 -30
- package/src/components/cv-link/index.js +0 -3
- package/src/components/cv-list/cv-list-item.vue +0 -13
- package/src/components/cv-list/cv-list.vue +0 -42
- package/src/components/cv-list/index.js +0 -4
- package/src/components/cv-loading/cv-loading.vue +0 -86
- package/src/components/cv-loading/index.js +0 -3
- package/src/components/cv-modal/cv-modal.vue +0 -295
- package/src/components/cv-modal/index.js +0 -2
- package/src/components/cv-multi-select/cv-multi-select.vue +0 -484
- package/src/components/cv-multi-select/index.js +0 -3
- package/src/components/cv-number-input/cv-number-input-skeleton.vue +0 -14
- package/src/components/cv-number-input/cv-number-input.vue +0 -215
- package/src/components/cv-number-input/index.js +0 -3
- package/src/components/cv-overflow-menu/cv-overflow-menu.vue +0 -253
- package/src/components/cv-overflow-menu/index.js +0 -4
- package/src/components/cv-pagination/cv-pagination.vue +0 -268
- package/src/components/cv-pagination/index.js +0 -2
- package/src/components/cv-progress/cv-progress-step.vue +0 -135
- package/src/components/cv-progress/cv-progress.vue +0 -82
- package/src/components/cv-progress/index.js +0 -4
- package/src/components/cv-radio-button/cv-radio-button.vue +0 -40
- package/src/components/cv-radio-button/cv-radio-group.vue +0 -24
- package/src/components/cv-radio-button/index.js +0 -4
- package/src/components/cv-search/cv-search.vue +0 -194
- package/src/components/cv-search/index.js +0 -2
- package/src/components/cv-select/cv-select-optgroup.vue +0 -14
- package/src/components/cv-select/cv-select-option.vue +0 -14
- package/src/components/cv-select/cv-select.vue +0 -158
- package/src/components/cv-select/index.js +0 -4
- package/src/components/cv-skeleton-text/cv-skeleton-text.vue +0 -64
- package/src/components/cv-skeleton-text/index.js +0 -2
- package/src/components/cv-slider/cv-slider-skeleton.vue +0 -22
- package/src/components/cv-slider/cv-slider.vue +0 -247
- package/src/components/cv-slider/index.js +0 -4
- package/src/components/cv-structured-list/_cv-structured-list-item-selectable.vue +0 -37
- package/src/components/cv-structured-list/_cv-structured-list-item-standard.vue +0 -13
- package/src/components/cv-structured-list/cv-structured-list-data.vue +0 -23
- package/src/components/cv-structured-list/cv-structured-list-heading.vue +0 -13
- package/src/components/cv-structured-list/cv-structured-list-item.vue +0 -46
- package/src/components/cv-structured-list/cv-structured-list.vue +0 -38
- package/src/components/cv-structured-list/index.js +0 -5
- package/src/components/cv-svg/_cv-svg.vue +0 -38
- package/src/components/cv-tabs/cv-tab.vue +0 -68
- package/src/components/cv-tabs/cv-tabs-skeleton.vue +0 -20
- package/src/components/cv-tabs/cv-tabs.vue +0 -410
- package/src/components/cv-tabs/index.js +0 -5
- package/src/components/cv-tag/cv-tag-skeleton.vue +0 -19
- package/src/components/cv-tag/cv-tag.vue +0 -121
- package/src/components/cv-tag/index.js +0 -4
- package/src/components/cv-text-area/cv-text-area.vue +0 -98
- package/src/components/cv-text-area/index.js +0 -2
- package/src/components/cv-text-input/cv-text-input.vue +0 -173
- package/src/components/cv-text-input/index.js +0 -2
- package/src/components/cv-tile/_cv-tile-clickable.vue +0 -22
- package/src/components/cv-tile/_cv-tile-expandable.vue +0 -92
- package/src/components/cv-tile/_cv-tile-selectable.vue +0 -48
- package/src/components/cv-tile/_cv-tile-standard.vue +0 -11
- package/src/components/cv-tile/cv-tile.vue +0 -83
- package/src/components/cv-tile/index.js +0 -2
- package/src/components/cv-time-picker/cv-time-picker.vue +0 -138
- package/src/components/cv-time-picker/index.js +0 -2
- package/src/components/cv-toast-notification/cv-toast-notification.vue +0 -72
- package/src/components/cv-toast-notification/index.js +0 -2
- package/src/components/cv-toggle/cv-toggle-skeleton.vue +0 -25
- package/src/components/cv-toggle/cv-toggle.vue +0 -52
- package/src/components/cv-toggle/index.js +0 -3
- package/src/components/cv-toolbar/cv-toolbar-divider.vue +0 -11
- package/src/components/cv-toolbar/cv-toolbar-option.vue +0 -16
- package/src/components/cv-toolbar/cv-toolbar-search.vue +0 -40
- package/src/components/cv-toolbar/cv-toolbar-title.vue +0 -14
- package/src/components/cv-toolbar/cv-toolbar.vue +0 -13
- package/src/components/cv-toolbar/index.js +0 -6
- package/src/components/cv-tooltip/consts.js +0 -2
- package/src/components/cv-tooltip/cv-definition-tooltip.vue +0 -44
- package/src/components/cv-tooltip/cv-interactive-tooltip.vue +0 -241
- package/src/components/cv-tooltip/cv-tooltip.vue +0 -44
- package/src/components/cv-tooltip/index.js +0 -6
- package/src/components/cv-ui-shell/_cv-side-nav-link-text.vue +0 -13
- package/src/components/cv-ui-shell/cv-content.vue +0 -16
- package/src/components/cv-ui-shell/cv-header-global-action.vue +0 -84
- package/src/components/cv-ui-shell/cv-header-menu-button.vue +0 -80
- package/src/components/cv-ui-shell/cv-header-menu-item.vue +0 -36
- package/src/components/cv-ui-shell/cv-header-name.vue +0 -18
- package/src/components/cv-ui-shell/cv-header-nav.vue +0 -18
- package/src/components/cv-ui-shell/cv-header-panel.vue +0 -72
- package/src/components/cv-ui-shell/cv-header-side-nav-items.vue +0 -21
- package/src/components/cv-ui-shell/cv-header.vue +0 -119
- package/src/components/cv-ui-shell/cv-side-nav-divider.vue +0 -12
- package/src/components/cv-ui-shell/cv-side-nav-icon.vue +0 -16
- package/src/components/cv-ui-shell/cv-side-nav-items.vue +0 -21
- package/src/components/cv-ui-shell/cv-side-nav-link.vue +0 -54
- package/src/components/cv-ui-shell/cv-side-nav-menu-item.vue +0 -30
- package/src/components/cv-ui-shell/cv-side-nav-menu.vue +0 -84
- package/src/components/cv-ui-shell/cv-side-nav.vue +0 -97
- package/src/components/cv-ui-shell/cv-skip-to-content.vue +0 -19
- package/src/components/cv-ui-shell/cv-switcher-item-link.vue +0 -26
- package/src/components/cv-ui-shell/cv-switcher-item.vue +0 -13
- package/src/components/cv-ui-shell/cv-switcher.vue +0 -13
- package/src/components/cv-ui-shell/index.js +0 -45
- package/src/components/cv-wrapper/_cv-wrapper.js +0 -33
- package/src/directives/clickout.js +0 -29
- package/src/index-components-vue.js +0 -5
- package/src/internal/feature-flags.js +0 -22
- package/src/mixins/carbon-prefix-mixin.js +0 -7
- package/src/mixins/check-mixin.js +0 -106
- package/src/mixins/index.js +0 -12
- package/src/mixins/link-mixin.js +0 -23
- package/src/mixins/methods-mixin.js +0 -18
- package/src/mixins/notification-mixin.js +0 -18
- package/src/mixins/radio-mixin.js +0 -36
- package/src/mixins/theme-mixin.js +0 -23
- package/src/mixins/uid-mixin.js +0 -23
- package/src/thumbnails/inline-notification.svg +0 -23
- package/src/thumbnails/skeleton-text.svg +0 -15
- package/src/thumbnails/toast-notification.svg +0 -34
- /package/src/components/{cv-button → CvButton}/consts.js +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li :class="`${carbonPrefix}--side-nav__item`">
|
|
3
|
+
<component
|
|
4
|
+
:is="tagType"
|
|
5
|
+
:class="[
|
|
6
|
+
'cv-side-nav-item-link',
|
|
7
|
+
`${carbonPrefix}--side-nav__link`,
|
|
8
|
+
{ [`${carbonPrefix}--side-nav__link--current`]: active },
|
|
9
|
+
]"
|
|
10
|
+
v-bind="{ ...$attrs, ...linkProps }"
|
|
11
|
+
>
|
|
12
|
+
<cv-side-nav-icon v-if="data.hasNavIcon" small>
|
|
13
|
+
<slot name="nav-icon" />
|
|
14
|
+
</cv-side-nav-icon>
|
|
15
|
+
<cv-side-nav-link-text>
|
|
16
|
+
<slot />
|
|
17
|
+
</cv-side-nav-link-text>
|
|
18
|
+
</component>
|
|
19
|
+
</li>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
import { carbonPrefix } from '../../global/settings';
|
|
24
|
+
import { useTagType, useLinkProps, props as propsLink } from '../../use/cvLink';
|
|
25
|
+
import CvSideNavIcon from './CvSideNavIcon.vue';
|
|
26
|
+
import CvSideNavLinkText from './_CvSideNavLinkText.vue';
|
|
27
|
+
import { onMounted, onUpdated, reactive, useSlots } from 'vue';
|
|
28
|
+
|
|
29
|
+
const props = defineProps({
|
|
30
|
+
active: Boolean,
|
|
31
|
+
icon: Object,
|
|
32
|
+
...propsLink,
|
|
33
|
+
});
|
|
34
|
+
const tagType = useTagType(props);
|
|
35
|
+
const linkProps = useLinkProps(props);
|
|
36
|
+
|
|
37
|
+
const data = reactive({
|
|
38
|
+
hasNavIcon: false,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const slots = useSlots();
|
|
42
|
+
onMounted(checkSlots);
|
|
43
|
+
onUpdated(checkSlots);
|
|
44
|
+
function checkSlots() {
|
|
45
|
+
data.hasNavIcon = !!slots['nav-icon'];
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li
|
|
3
|
+
:class="[
|
|
4
|
+
`cv-side-nav-menu`,
|
|
5
|
+
`${carbonPrefix}--side-nav__item`,
|
|
6
|
+
{
|
|
7
|
+
[`${carbonPrefix}--side-nav__item--active`]: active,
|
|
8
|
+
[`${carbonPrefix}--side-nav__item--icon`]: hasIcon,
|
|
9
|
+
},
|
|
10
|
+
]"
|
|
11
|
+
>
|
|
12
|
+
<button
|
|
13
|
+
aria-haspopup="true"
|
|
14
|
+
:aria-expanded="isExpanded ? 'true' : 'false'"
|
|
15
|
+
:class="`${carbonPrefix}--side-nav__submenu`"
|
|
16
|
+
role="menuitem"
|
|
17
|
+
type="button"
|
|
18
|
+
@click="doToggle"
|
|
19
|
+
@keydown.space.prevent
|
|
20
|
+
@keyup.space.prevent="doToggle"
|
|
21
|
+
@keydown.enter.prevent="doToggle"
|
|
22
|
+
>
|
|
23
|
+
<cv-side-nav-icon v-if="hasIcon">
|
|
24
|
+
<slot name="nav-icon" />
|
|
25
|
+
</cv-side-nav-icon>
|
|
26
|
+
<span :class="`${carbonPrefix}--side-nav__submenu-title`">{{
|
|
27
|
+
title
|
|
28
|
+
}}</span>
|
|
29
|
+
<cv-side-nav-icon
|
|
30
|
+
:class="`${carbonPrefix}--side-nav__submenu-chevron`"
|
|
31
|
+
small
|
|
32
|
+
:aria-label="isExpanded ? 'collapse nav menu' : 'expand nav menu'"
|
|
33
|
+
>
|
|
34
|
+
<chevron-down20 class="cv-side-nav-menu__chevron-svg" />
|
|
35
|
+
</cv-side-nav-icon>
|
|
36
|
+
</button>
|
|
37
|
+
<ul :class="`${carbonPrefix}--side-nav__menu`">
|
|
38
|
+
<slot></slot>
|
|
39
|
+
</ul>
|
|
40
|
+
</li>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script setup>
|
|
44
|
+
import { carbonPrefix } from '../../global/settings';
|
|
45
|
+
import ChevronDown20 from '@carbon/icons-vue/es/chevron--down/20';
|
|
46
|
+
import CvSideNavIcon from './CvSideNavIcon.vue';
|
|
47
|
+
import { computed, onMounted, onUpdated, reactive, useSlots, watch } from 'vue';
|
|
48
|
+
|
|
49
|
+
const props = defineProps({
|
|
50
|
+
active: Boolean,
|
|
51
|
+
title: { type: String, required: true },
|
|
52
|
+
expanded: { type: Boolean, default: false },
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const data = reactive({
|
|
56
|
+
isExpanded: false,
|
|
57
|
+
hasNavIcon: false,
|
|
58
|
+
});
|
|
59
|
+
const isExpanded = computed(() => data.isExpanded);
|
|
60
|
+
|
|
61
|
+
const slots = useSlots();
|
|
62
|
+
onMounted(() => {
|
|
63
|
+
// NOTE: slots is not reactive so needs to be managed on updated
|
|
64
|
+
data.hasNavIcon = !!slots['nav-icon'];
|
|
65
|
+
});
|
|
66
|
+
onUpdated(() => {
|
|
67
|
+
data.hasNavIcon = !!slots['nav-icon'];
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const hasIcon = computed(() => {
|
|
71
|
+
return slots['nav-icon'];
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
function doToggle() {
|
|
75
|
+
data.isExpanded = !data.isExpanded;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
watch(
|
|
79
|
+
() => props.expanded,
|
|
80
|
+
value => {
|
|
81
|
+
data.isExpanded = value;
|
|
82
|
+
},
|
|
83
|
+
{ immediate: true }
|
|
84
|
+
);
|
|
85
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li :class="`${carbonPrefix}--side-nav__menu-item`">
|
|
3
|
+
<component
|
|
4
|
+
:is="tagType"
|
|
5
|
+
:class="[
|
|
6
|
+
`${carbonPrefix}--side-nav__link`,
|
|
7
|
+
{ [`${carbonPrefix}--side-nav__link--current`]: active },
|
|
8
|
+
]"
|
|
9
|
+
v-bind="{ ...$attrs, ...linkProps }"
|
|
10
|
+
role="menuitem"
|
|
11
|
+
>
|
|
12
|
+
<cv-side-nav-link-text>
|
|
13
|
+
<slot />
|
|
14
|
+
</cv-side-nav-link-text>
|
|
15
|
+
</component>
|
|
16
|
+
</li>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import { carbonPrefix } from '../../global/settings';
|
|
21
|
+
import { useTagType, useLinkProps, props as propsLink } from '../../use/cvLink';
|
|
22
|
+
import CvSideNavLinkText from './_CvSideNavLinkText.vue';
|
|
23
|
+
|
|
24
|
+
const props = defineProps({
|
|
25
|
+
active: Boolean,
|
|
26
|
+
...propsLink,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const tagType = useTagType(props);
|
|
30
|
+
const linkProps = useLinkProps(props);
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="tagType"
|
|
4
|
+
v-bind="linkProps"
|
|
5
|
+
:class="`cv-skip-to-content ${carbonPrefix}--skip-to-content`"
|
|
6
|
+
>
|
|
7
|
+
<slot>Skip to main content</slot>
|
|
8
|
+
</component>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import { useTagType, useLinkProps, props as propsLink } from '../../use/cvLink';
|
|
13
|
+
import { carbonPrefix } from '../../global/settings';
|
|
14
|
+
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
...propsLink,
|
|
17
|
+
});
|
|
18
|
+
const tagType = useTagType(props);
|
|
19
|
+
const linkProps = useLinkProps(props);
|
|
20
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="tagType"
|
|
4
|
+
v-bind="linkProps"
|
|
5
|
+
:class="[
|
|
6
|
+
`cv-switcher-item-link`,
|
|
7
|
+
`${carbonPrefix}--switcher__item-link`,
|
|
8
|
+
{ [`${carbonPrefix}--switcher__item-link--selected`]: selected },
|
|
9
|
+
]"
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</component>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup>
|
|
16
|
+
import { carbonPrefix } from '../../global/settings';
|
|
17
|
+
import { useTagType, useLinkProps, props as propsLink } from '../../use/cvLink';
|
|
18
|
+
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
selected: Boolean,
|
|
21
|
+
...propsLink,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const tagType = useTagType(props);
|
|
25
|
+
const linkProps = useLinkProps(props);
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import { sbCompPrefix } from '../../global/storybook-utils';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import CvHeader from './CvHeader.vue'
|
|
5
|
+
import CvSkipToContent from "./CvSkipToContent.vue";
|
|
6
|
+
import CvHeaderName from "./CvHeaderName.vue";
|
|
7
|
+
import CvHeaderNav from "./CvHeaderNav.vue";
|
|
8
|
+
import CvHeaderMenuItem from "./CvHeaderMenuItem.vue";
|
|
9
|
+
import CvHeaderMenuButton from "./CvHeaderMenuButton.vue";
|
|
10
|
+
import CvHeaderMenu from "./CvHeaderMenu.vue";
|
|
11
|
+
import CvHeaderGlobalAction from "./CvHeaderGlobalAction.vue";
|
|
12
|
+
import CvHeaderPanel from "./CvHeaderPanel.vue";
|
|
13
|
+
import CvSwitcher from "./CvSwitcher.vue";
|
|
14
|
+
import CvSwitcherItem from "./CvSwitcherItem.vue";
|
|
15
|
+
import CvSwitcherItemLink from "./CvSwitcherItemLink.vue";
|
|
16
|
+
import CvSideNav from "./CvSideNav.vue";
|
|
17
|
+
import CvSideNavItems from "./CvSideNavItems.vue";
|
|
18
|
+
import CvSideNavLink from "./CvSideNavLink.vue";
|
|
19
|
+
import CvSideNavMenu from "./CvSideNavMenu.vue";
|
|
20
|
+
import CvSideNavMenuDivider from "./CvSideNavMenuDivider.vue";
|
|
21
|
+
import CvSideNavMenuItem from "./CvSideNavMenuItem.vue";
|
|
22
|
+
import { Notification20, UserAvatar20, Login20, Switcher20, Home16, ChatBot16, ConnectionTwoWay16, MachineLearningModel16 } from '@carbon/icons-vue'
|
|
23
|
+
import { ref } from "vue";
|
|
24
|
+
const loggedIn = ref(false)
|
|
25
|
+
|
|
26
|
+
<Meta title={`${sbCompPrefix}/ui-select/CvHeader`} component={CvHeader} />
|
|
27
|
+
|
|
28
|
+
export const Template = args => ({
|
|
29
|
+
// Components used in your story `template` are defined in the `components` object
|
|
30
|
+
components: {
|
|
31
|
+
CvHeader,
|
|
32
|
+
CvSkipToContent,
|
|
33
|
+
CvHeaderName,
|
|
34
|
+
CvHeaderNav,
|
|
35
|
+
CvHeaderMenuItem,
|
|
36
|
+
CvHeaderMenuButton,
|
|
37
|
+
CvHeaderMenu,
|
|
38
|
+
CvHeaderGlobalAction,
|
|
39
|
+
CvHeaderPanel,
|
|
40
|
+
CvSwitcher,
|
|
41
|
+
CvSwitcherItem,
|
|
42
|
+
CvSwitcherItemLink,
|
|
43
|
+
CvSideNav,
|
|
44
|
+
CvSideNavItems,
|
|
45
|
+
CvSideNavLink,
|
|
46
|
+
CvSideNavMenu,
|
|
47
|
+
CvSideNavMenuDivider,
|
|
48
|
+
CvSideNavMenuItem,
|
|
49
|
+
Notification20,
|
|
50
|
+
UserAvatar20,
|
|
51
|
+
Login20,
|
|
52
|
+
Switcher20,
|
|
53
|
+
Home16,
|
|
54
|
+
ChatBot16,
|
|
55
|
+
ConnectionTwoWay16,
|
|
56
|
+
MachineLearningModel16
|
|
57
|
+
},
|
|
58
|
+
// The story's `args` need to be mapped into the template through the `setup()` method
|
|
59
|
+
setup() {
|
|
60
|
+
return {
|
|
61
|
+
...args,
|
|
62
|
+
actionNotifications: () => {},
|
|
63
|
+
actionUserAvatar: () => { loggedIn.value = !loggedIn.value},
|
|
64
|
+
actionAppSwitcher: () => {},
|
|
65
|
+
onPanelResize: action('panel-resize'),
|
|
66
|
+
loggedIn
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
// And then the `args` are bound to your component with `v-bind="args"`
|
|
70
|
+
template: args.template,
|
|
71
|
+
});
|
|
72
|
+
const defaultTemplate = `
|
|
73
|
+
<cv-header aria-label="Carbon header">
|
|
74
|
+
<cv-skip-to-content href="#main-content">
|
|
75
|
+
Skip to content
|
|
76
|
+
</cv-skip-to-content>
|
|
77
|
+
<cv-header-name href="javascript:void(0)" prefix="IBM">
|
|
78
|
+
[Platform]
|
|
79
|
+
</cv-header-name>
|
|
80
|
+
<cv-header-nav aria-label="Carbon nav">
|
|
81
|
+
<cv-header-menu-item href="javascript:void(0)">
|
|
82
|
+
Link 1
|
|
83
|
+
</cv-header-menu-item>
|
|
84
|
+
<cv-header-menu-item href="javascript:void(0)">
|
|
85
|
+
Link 2
|
|
86
|
+
</cv-header-menu-item>
|
|
87
|
+
<cv-header-menu aria-label="Link 3" title="Link 3">
|
|
88
|
+
<cv-header-menu-item href="javascript:void(0)">
|
|
89
|
+
Submenu Link 1
|
|
90
|
+
</cv-header-menu-item>
|
|
91
|
+
<cv-header-menu-item href="javascript:void(0)">
|
|
92
|
+
Submenu Link 2
|
|
93
|
+
</cv-header-menu-item>
|
|
94
|
+
<cv-header-menu-item href="javascript:void(0)">
|
|
95
|
+
Submenu Link 3
|
|
96
|
+
</cv-header-menu-item>
|
|
97
|
+
</cv-header-menu>
|
|
98
|
+
</cv-header-nav>
|
|
99
|
+
<template v-slot:header-global>
|
|
100
|
+
<cv-header-global-action
|
|
101
|
+
aria-label="Notifications"
|
|
102
|
+
aria-controls="notifications-panel"
|
|
103
|
+
@click="actionNotifications"
|
|
104
|
+
label="Notifications"
|
|
105
|
+
tipPosition="bottom"
|
|
106
|
+
tipAlignment="start"
|
|
107
|
+
>
|
|
108
|
+
<notification20/>
|
|
109
|
+
</cv-header-global-action>
|
|
110
|
+
<cv-header-global-action
|
|
111
|
+
aria-label="User avatar"
|
|
112
|
+
@click="actionUserAvatar"
|
|
113
|
+
aria-controls="user-panel"
|
|
114
|
+
label="Log in"
|
|
115
|
+
tipPosition="bottom"
|
|
116
|
+
tipAlignment="center"
|
|
117
|
+
>
|
|
118
|
+
<user-avatar20 v-if="loggedIn"/>
|
|
119
|
+
<login20 v-else />
|
|
120
|
+
</cv-header-global-action>
|
|
121
|
+
<cv-header-global-action
|
|
122
|
+
aria-label="App switcher"
|
|
123
|
+
aria-controls="switcher-panel"
|
|
124
|
+
@click="actionAppSwitcher"
|
|
125
|
+
label="App switcher"
|
|
126
|
+
tipPosition="bottom"
|
|
127
|
+
tipAlignment="end"
|
|
128
|
+
>
|
|
129
|
+
<switcher20 />
|
|
130
|
+
</cv-header-global-action>
|
|
131
|
+
</template>
|
|
132
|
+
<template v-slot:right-panels>
|
|
133
|
+
<cv-header-panel id="user-panel" @panel-resize="onPanelResize">
|
|
134
|
+
An empty user panel
|
|
135
|
+
</cv-header-panel>
|
|
136
|
+
<cv-header-panel id="notifications-panel" @panel-resize="onPanelResize">
|
|
137
|
+
An empty panel
|
|
138
|
+
</cv-header-panel>
|
|
139
|
+
<cv-header-panel id="switcher-panel" @panel-resize="onPanelResize">
|
|
140
|
+
<cv-switcher>
|
|
141
|
+
<cv-switcher-item>
|
|
142
|
+
<cv-switcher-item-link href="javascript:void(0)" selected>Selected app</cv-switcher-item-link>
|
|
143
|
+
</cv-switcher-item>
|
|
144
|
+
<cv-switcher-item>
|
|
145
|
+
<cv-switcher-item-link href="javascript:void(0)">Other app</cv-switcher-item-link>
|
|
146
|
+
</cv-switcher-item>
|
|
147
|
+
<cv-switcher-item>
|
|
148
|
+
<cv-switcher-item-link href="javascript:void(0)">Yet another app</cv-switcher-item-link>
|
|
149
|
+
</cv-switcher-item>
|
|
150
|
+
</cv-switcher>
|
|
151
|
+
</cv-header-panel>
|
|
152
|
+
</template>
|
|
153
|
+
</cv-header>
|
|
154
|
+
`
|
|
155
|
+
const railTemplate = `
|
|
156
|
+
<cv-header aria-label="Carbon header">
|
|
157
|
+
<cv-header-menu-button aria-label="Header menu" aria-controls="side-nav" :active="expandedSideNav"/>
|
|
158
|
+
<cv-skip-to-content href="#main-content">Skip to content</cv-skip-to-content>
|
|
159
|
+
<cv-header-name href="javascript:void(0)" prefix="IBM">[Platform]</cv-header-name>
|
|
160
|
+
<template v-slot:left-panels>
|
|
161
|
+
<cv-side-nav id="side-nav" @panel-resize="onPanelResize" :rail="true" :fixed="useFixed" :expanded="expandedSideNav">
|
|
162
|
+
<cv-side-nav-items>
|
|
163
|
+
<cv-side-nav-menu title="Home">
|
|
164
|
+
<template v-slot:nav-icon><home16 /></template>
|
|
165
|
+
<cv-side-nav-menu-item href="javascript:void(0)" active>Lawn care</cv-side-nav-menu-item>
|
|
166
|
+
<cv-side-nav-menu-item href="javascript:void(0)">Plumbing</cv-side-nav-menu-item>
|
|
167
|
+
<cv-side-nav-menu-item href="javascript:void(0)">Heating & Air</cv-side-nav-menu-item>
|
|
168
|
+
</cv-side-nav-menu>
|
|
169
|
+
<cv-side-nav-menu title="Chat ">
|
|
170
|
+
<template v-slot:nav-icon><chat-bot16 /></template>
|
|
171
|
+
<cv-side-nav-menu-item href="javascript:void(0)">Bender</cv-side-nav-menu-item>
|
|
172
|
+
<cv-side-nav-menu-item href="javascript:void(0)" aria-current="page">Sonny</cv-side-nav-menu-item>
|
|
173
|
+
<cv-side-nav-menu-item href="javascript:void(0)">Rosie</cv-side-nav-menu-item>
|
|
174
|
+
</cv-side-nav-menu>
|
|
175
|
+
<cv-side-nav-menu-divider/>
|
|
176
|
+
<cv-side-nav-link href="javascript:void(0)">
|
|
177
|
+
<template v-slot:nav-icon><connection-two-way16 /></template>
|
|
178
|
+
Connection
|
|
179
|
+
</cv-side-nav-link>
|
|
180
|
+
<cv-side-nav-link href="javascript:void(0)">
|
|
181
|
+
<template v-slot:nav-icon><machine-learning-model16 /></template>
|
|
182
|
+
Machine Learning
|
|
183
|
+
</cv-side-nav-link>
|
|
184
|
+
</cv-side-nav-items>
|
|
185
|
+
</cv-side-nav>
|
|
186
|
+
</template>
|
|
187
|
+
</cv-header>
|
|
188
|
+
`
|
|
189
|
+
const fixedSideNavTemplate = `
|
|
190
|
+
<cv-header aria-label="Carbon header">
|
|
191
|
+
<cv-skip-to-content href="#main-content">
|
|
192
|
+
Skip to content
|
|
193
|
+
</cv-skip-to-content>
|
|
194
|
+
<cv-header-name href="javascript:void(0)" prefix="IBM">
|
|
195
|
+
[Platform]
|
|
196
|
+
</cv-header-name>
|
|
197
|
+
</cv-header>
|
|
198
|
+
<cv-side-nav id="side-nav" @panel-resize="onPanelResize" :rail="false" :fixed="true" :expanded="true">
|
|
199
|
+
<cv-side-nav-items>
|
|
200
|
+
<cv-side-nav-menu title="Home">
|
|
201
|
+
<template v-slot:nav-icon><home16 /></template>
|
|
202
|
+
<cv-side-nav-menu-item href="javascript:void(0)" active>Lawn care</cv-side-nav-menu-item>
|
|
203
|
+
<cv-side-nav-menu-item href="javascript:void(0)">Plumbing</cv-side-nav-menu-item>
|
|
204
|
+
<cv-side-nav-menu-item href="javascript:void(0)">Heating & Air</cv-side-nav-menu-item>
|
|
205
|
+
</cv-side-nav-menu>
|
|
206
|
+
<cv-side-nav-menu title="Chat ">
|
|
207
|
+
<template v-slot:nav-icon><chat-bot16 /></template>
|
|
208
|
+
<cv-side-nav-menu-item href="javascript:void(0)">Bender</cv-side-nav-menu-item>
|
|
209
|
+
<cv-side-nav-menu-item href="javascript:void(0)" aria-current="page">Sonny</cv-side-nav-menu-item>
|
|
210
|
+
<cv-side-nav-menu-item href="javascript:void(0)">Rosie</cv-side-nav-menu-item>
|
|
211
|
+
</cv-side-nav-menu>
|
|
212
|
+
<cv-side-nav-menu-divider/>
|
|
213
|
+
<cv-side-nav-link href="javascript:void(0)">
|
|
214
|
+
<template v-slot:nav-icon><connection-two-way16 /></template>
|
|
215
|
+
Connection
|
|
216
|
+
</cv-side-nav-link>
|
|
217
|
+
<cv-side-nav-link href="javascript:void(0)">
|
|
218
|
+
<template v-slot:nav-icon><machine-learning-model16 /></template>
|
|
219
|
+
Machine Learning
|
|
220
|
+
</cv-side-nav-link>
|
|
221
|
+
</cv-side-nav-items>
|
|
222
|
+
</cv-side-nav>
|
|
223
|
+
`
|
|
224
|
+
|
|
225
|
+
# UI Shell components
|
|
226
|
+
Set of components for managing navigation and header bars.
|
|
227
|
+
|
|
228
|
+
## CvHeader
|
|
229
|
+
Slots:
|
|
230
|
+
- default - buttons links etc
|
|
231
|
+
- header-global - Global button content
|
|
232
|
+
- left-panels - Content panel on the left - side nav
|
|
233
|
+
- right-panels - Right panel content - users, languages, notifications, switcher, etc
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## CvHeaderGlobalAction
|
|
237
|
+
Properties:
|
|
238
|
+
- active - `Boolean` - Specify whether the menu button is "active".
|
|
239
|
+
- ariaControls - `String` Specify the id of a panel that this button controls
|
|
240
|
+
- label - `String` - button label
|
|
241
|
+
- tipPosition - `String` - `top`, `left`, `bottom`, `right`. Default: `bottom`
|
|
242
|
+
- tipAlignment - `String` - `start`, `center`, `end`. Default `center`
|
|
243
|
+
|
|
244
|
+
Slots:
|
|
245
|
+
- icon - Icon for the action
|
|
246
|
+
|
|
247
|
+
## CvHeaderMenu
|
|
248
|
+
Properties:
|
|
249
|
+
- title - `String` - Provide a label for the link text
|
|
250
|
+
- hoverToggle - `Boolean` - activate the menu on hover. Default `true`
|
|
251
|
+
|
|
252
|
+
Slots:
|
|
253
|
+
- default - menu content
|
|
254
|
+
|
|
255
|
+
## CvHeaderMenuButton
|
|
256
|
+
Properties:
|
|
257
|
+
- active - `Boolean` - Specify whether the menu button is "active".
|
|
258
|
+
- ariaControls - **required** `String` Specify the id of a panel that this button controls
|
|
259
|
+
|
|
260
|
+
## CvHeaderMenuItem
|
|
261
|
+
Properties:
|
|
262
|
+
- disabled - `Boolean` link is disabled
|
|
263
|
+
- to - link router path
|
|
264
|
+
- href - `String` destination. If `to` is specified this value is ignored
|
|
265
|
+
- active - `Boolean` - Specify whether the menu button is "active".
|
|
266
|
+
- ariaCurrent - `String` - `aria-current` for this button
|
|
267
|
+
- role - `String` - role value for the main component. Default `undefned`
|
|
268
|
+
|
|
269
|
+
Slots:
|
|
270
|
+
- default - menu content
|
|
271
|
+
|
|
272
|
+
## CvHeaderName
|
|
273
|
+
Properties:
|
|
274
|
+
- prefix - `String` - Optionally specify a prefix to your header name. Useful for companies, for example: IBM [Product Name] versus solely [Product Name]
|
|
275
|
+
- disabled - `Boolean` link is disabled
|
|
276
|
+
- to - link router path
|
|
277
|
+
- href - `String` destination. If `to` is specified this value is ignored
|
|
278
|
+
|
|
279
|
+
Slots:
|
|
280
|
+
- default - header content
|
|
281
|
+
|
|
282
|
+
## CvHeaderNav
|
|
283
|
+
Properties:
|
|
284
|
+
- ariaLabelledBy - `String` `aria-labelledby` value
|
|
285
|
+
|
|
286
|
+
Slots:
|
|
287
|
+
- default - nav content
|
|
288
|
+
|
|
289
|
+
## CvHeaderPanel
|
|
290
|
+
Properties:
|
|
291
|
+
- **Migration Note** - The `v-model` has changed in Vue 3. To control expanded as a `v-model` specify `v-model:expanded`
|
|
292
|
+
- expanded - `Boolean` - Specify whether the panel is expanded
|
|
293
|
+
- id - `String` - **required** this id must match the `ariaControls` value of the button that controls this panel
|
|
294
|
+
|
|
295
|
+
Slots:
|
|
296
|
+
- default - panel content
|
|
297
|
+
|
|
298
|
+
## CvSideNav
|
|
299
|
+
Properties:
|
|
300
|
+
- **Migration Note** - The `v-model` has changed in Vue 3. To control expanded as a `v-model` specify `v-model:expanded`
|
|
301
|
+
- expanded - `Boolean` - Specify whether the panel is expanded
|
|
302
|
+
- id - `String` - **required** this id must match the `ariaControls` value of the button that controls this side nav
|
|
303
|
+
- fixed - `Boolean` - Specify if side nav is standalone. Default: `false`
|
|
304
|
+
- rail - `Boolean` - Optional prop to display the side nav as a rail
|
|
305
|
+
- assistiveToggleText - `String` - Assistive text for a non-rail, non-fixed, non-header controlled side nav
|
|
306
|
+
|
|
307
|
+
Slots:
|
|
308
|
+
- default - nav content
|
|
309
|
+
|
|
310
|
+
## CvSideNavIcon
|
|
311
|
+
Properties:
|
|
312
|
+
- small - `Boolean` - Use a smaller icon
|
|
313
|
+
|
|
314
|
+
Slots:
|
|
315
|
+
- default - icon
|
|
316
|
+
|
|
317
|
+
## CvSideNavLink
|
|
318
|
+
Properties:
|
|
319
|
+
- active - `Boolean` - Specify whether the menu button is "active".
|
|
320
|
+
- icon - icon object to display with the link
|
|
321
|
+
- disabled - `Boolean` link is disabled
|
|
322
|
+
- to - link router path
|
|
323
|
+
- href - `String` destination. If `to` is specified this value is ignored
|
|
324
|
+
|
|
325
|
+
Slots:
|
|
326
|
+
- default - nav content
|
|
327
|
+
|
|
328
|
+
## CvSideNavMenu
|
|
329
|
+
Properties:
|
|
330
|
+
- active - `Boolean` - Specify whether the menu is "active".
|
|
331
|
+
- title - `String` - Provide a label for the link text
|
|
332
|
+
- expanded - `Boolean` - Specify whether the menu is expanded
|
|
333
|
+
|
|
334
|
+
Slots:
|
|
335
|
+
- default - menu content
|
|
336
|
+
- nav-icon - icon
|
|
337
|
+
|
|
338
|
+
## CvSideNavMenuDivider
|
|
339
|
+
Draw a divider line. No props or slots.
|
|
340
|
+
|
|
341
|
+
## CvSideNavMenuItem
|
|
342
|
+
Properties:
|
|
343
|
+
- active - `Boolean` - Specify whether the menu is "active".
|
|
344
|
+
- disabled - `Boolean` link is disabled
|
|
345
|
+
- to - Vue router path
|
|
346
|
+
- href - `String` destination. If `to` is specified this value is ignored
|
|
347
|
+
|
|
348
|
+
Slots:
|
|
349
|
+
- default - menu content
|
|
350
|
+
|
|
351
|
+
## CvSkipToContent
|
|
352
|
+
Properties:
|
|
353
|
+
- disabled - `Boolean` link is disabled
|
|
354
|
+
- to - Vue router path
|
|
355
|
+
- href - `String` destination. If `to` is specified this value is ignored
|
|
356
|
+
|
|
357
|
+
Slots:
|
|
358
|
+
- default - default "Skip to main content"
|
|
359
|
+
|
|
360
|
+
## CvSwitcher
|
|
361
|
+
Slots:
|
|
362
|
+
- default - include switcher content
|
|
363
|
+
|
|
364
|
+
## CvSwitcherItem
|
|
365
|
+
Slots:
|
|
366
|
+
- default - include switcher item content
|
|
367
|
+
|
|
368
|
+
## CvSwitcherItemLink
|
|
369
|
+
Properties:
|
|
370
|
+
- disabled - `Boolean` link is disabled
|
|
371
|
+
- to - Vue router path
|
|
372
|
+
- href - `String` destination. If `to` is specified this value is ignored
|
|
373
|
+
- selected - `Boolean` is this item selected
|
|
374
|
+
|
|
375
|
+
Slots:
|
|
376
|
+
- default - item content
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
<Canvas>
|
|
380
|
+
<Story
|
|
381
|
+
name="Default"
|
|
382
|
+
parameters={{
|
|
383
|
+
controls: { exclude: [
|
|
384
|
+
'template',
|
|
385
|
+
'default',
|
|
386
|
+
'header-global',
|
|
387
|
+
'left-panels',
|
|
388
|
+
'right-panels'
|
|
389
|
+
] },
|
|
390
|
+
docs: { source: { code: defaultTemplate.replace('v-bind="args"', '') } },
|
|
391
|
+
}}
|
|
392
|
+
args={{
|
|
393
|
+
template: defaultTemplate,
|
|
394
|
+
}}
|
|
395
|
+
argTypes={{
|
|
396
|
+
}}
|
|
397
|
+
>
|
|
398
|
+
{Template.bind({})}
|
|
399
|
+
</Story>
|
|
400
|
+
</Canvas>
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
# CvHeader with side rail
|
|
404
|
+
|
|
405
|
+
<Canvas>
|
|
406
|
+
<Story
|
|
407
|
+
name="Side rail"
|
|
408
|
+
parameters={{
|
|
409
|
+
controls: { exclude: [
|
|
410
|
+
'template',
|
|
411
|
+
'default',
|
|
412
|
+
'header-global',
|
|
413
|
+
'left-panels',
|
|
414
|
+
'right-panels'
|
|
415
|
+
] },
|
|
416
|
+
docs: { source: { code: railTemplate.replace('v-bind="args"', '') } },
|
|
417
|
+
}}
|
|
418
|
+
args={{
|
|
419
|
+
template: railTemplate,
|
|
420
|
+
useFixed: false,
|
|
421
|
+
expandedSideNav: false,
|
|
422
|
+
}}
|
|
423
|
+
argTypes={{
|
|
424
|
+
}}
|
|
425
|
+
>
|
|
426
|
+
{Template.bind({})}
|
|
427
|
+
</Story>
|
|
428
|
+
</Canvas>
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
# CvHeader with fixed side nav
|
|
432
|
+
|
|
433
|
+
<Canvas>
|
|
434
|
+
<Story
|
|
435
|
+
name="Fixed side nav"
|
|
436
|
+
parameters={{
|
|
437
|
+
controls: { exclude: [
|
|
438
|
+
'template',
|
|
439
|
+
'default',
|
|
440
|
+
'header-global',
|
|
441
|
+
'left-panels',
|
|
442
|
+
'right-panels'
|
|
443
|
+
] },
|
|
444
|
+
docs: { source: { code: fixedSideNavTemplate.replace('v-bind="args"', '') } },
|
|
445
|
+
}}
|
|
446
|
+
args={{
|
|
447
|
+
template: fixedSideNavTemplate,
|
|
448
|
+
}}
|
|
449
|
+
argTypes={{
|
|
450
|
+
}}
|
|
451
|
+
>
|
|
452
|
+
{Template.bind({})}
|
|
453
|
+
</Story>
|
|
454
|
+
</Canvas>
|