@carbon/vue 3.0.8-alpha.0 → 3.0.9

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 (37) hide show
  1. package/README.md +60 -21
  2. package/dist/carbon-vue-3.common.js +539 -69
  3. package/dist/carbon-vue-3.common.js.map +1 -1
  4. package/dist/carbon-vue-3.umd.js +539 -69
  5. package/dist/carbon-vue-3.umd.js.map +1 -1
  6. package/dist/carbon-vue-3.umd.min.js +4 -4
  7. package/dist/carbon-vue-3.umd.min.js.map +1 -1
  8. package/package.json +2 -2
  9. package/src/components/CvFileUploader/CvFileUploader.stories.mdx +24 -6
  10. package/src/components/CvFileUploader/CvFileUploader.vue +58 -19
  11. package/src/components/CvNotification/CvToastNotification.stories.js +71 -1
  12. package/src/components/CvNotification/CvToastNotification.vue +6 -4
  13. package/src/components/CvOverflowMenu/CvOverflowMenu.stories.mdx +68 -12
  14. package/src/components/CvOverflowMenu/CvOverflowMenu.vue +39 -45
  15. package/src/components/CvOverflowMenu/CvOverflowMenuItem.vue +6 -11
  16. package/src/components/CvOverflowMenu/index.js +2 -1
  17. package/src/components/CvStructuredList/CvStructuredList.stories.js +141 -0
  18. package/src/components/CvStructuredList/CvStructuredList.vue +44 -0
  19. package/src/components/CvStructuredList/CvStructuredListData.vue +19 -0
  20. package/src/components/CvStructuredList/CvStructuredListHeading.vue +11 -0
  21. package/src/components/CvStructuredList/CvStructuredListItem.vue +47 -0
  22. package/src/components/CvStructuredList/CvStructuredListItemSelectable.vue +56 -0
  23. package/src/components/CvStructuredList/CvStructuredListItemStandard.vue +11 -0
  24. package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredList.spec.js.snap +73 -0
  25. package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredListData.spec.js.snap +5 -0
  26. package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredListHeading.spec.js.snap +9 -0
  27. package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredListItem.spec.js.snap +7 -0
  28. package/src/components/CvStructuredList/index.js +12 -0
  29. package/src/components/CvTabs/CvTabs.stories.mdx +84 -3
  30. package/src/components/CvTabs/CvTabs.vue +3 -1
  31. package/src/components/CvTabs/__tests__/__snapshots__/CvTabs.spec.js.snap +24 -0
  32. package/src/components/CvTag/CvTag.stories.js +2 -1
  33. package/src/components/CvTag/CvTag.vue +10 -5
  34. package/src/components/CvTag/CvTagSkeleton.stories.js +39 -0
  35. package/src/components/CvTag/CvTagSkeleton.vue +20 -0
  36. package/src/components/CvTag/index.js +2 -1
  37. package/src/use/useRadio.js +0 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @carbon/vue-3
2
2
 
3
- <p align="center">
3
+ <p>
4
4
  <a href="https://github.com/carbon-design-system/carbon/blob/master/LICENSE">
5
5
  <img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="Carbon is released under the Apache-2.0 license" />
6
6
  </a>
@@ -13,6 +13,9 @@
13
13
  <a href="https://github.com/carbon-design-system/carbon/blob/master/.github/CONTRIBUTING.md">
14
14
  <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome" />
15
15
  </a>
16
+ <a href="https://discord.gg/J7JEUEkTRX">
17
+ <img src="https://img.shields.io/discord/689212587170201628?color=5865F2" alt="Chat with us on Discord">
18
+ </a>
16
19
  </p>
17
20
 
18
21
  > Vue implementation of the Carbon Design System
@@ -26,34 +29,70 @@ The [library](http://vue.carbondesignsystem.com/) provides front-end developers
26
29
 
27
30
  As a community project contributions are not only welcome, but essential for the maintenance and growth of this project.
28
31
 
29
- ### Vue 3 Guidance
32
+ ## Install
33
+
34
+ ```shell
35
+ npm add @carbon/vue
36
+ ```
37
+
38
+ or
39
+
40
+ ```shell
41
+ $ yarn add @carbon/vue
42
+ ```
43
+
44
+ ### Add to Vue project
45
+
46
+ `src/main.js`
47
+
48
+ ```js
49
+ import CarbonVue3 from '@carbon/vue';
50
+ import App from './App.vue';
51
+ const app = createApp(App);
52
+ app.use(CarbonVue3);
53
+ app.mount('#app');
54
+ ```
55
+
56
+ See [Hello Carbon Vue](https://github.com/IBM/hello-carbon-vue3) for an example Vue project with Carbon.
57
+
58
+ ### Add to Nuxt project
59
+
60
+ `plugins/carbon-vue.js`
61
+
62
+ ```js
63
+ import CarbonVue from '@carbon/vue'
64
+
65
+ export default defineNuxtPlugin((nuxtApp) => {
66
+ nuxtApp.vueApp.use(CarbonVue)
67
+ }
68
+ ```
30
69
 
31
- We are actively working on components for Vue 3 and would love to get your help with this. If you want to contribute follow this guidance:
70
+ See [Hello Carbon Nuxt](#add-to-nuxt-project) **coming soon**
32
71
 
33
- 1. Fork this repo and checkout the `vNext` branch
34
- 2. Look to see which components have not yet been implemented. You can do this by comparing the components listed in the [Carbon React storybook](https://react.carbondesignsystem.com/?path=/story/getting-started-welcome--welcome) with the components in the `src/components` directory.
35
- 3. When you find a component that interests you, look in the open issue list to see if someone else might already be working on it. Look for issues with a "V3 - Vue3" label. A "dibs" issue will have that label and a title of "[component name] work in progress" so for example "**CvDatePicker work in progress**".
36
- 4. If no one else is already working on it, create an issue and label it as above.
72
+ ### Vue 3
73
+
74
+ - Vue 2 support will end on Dec 31, 2023. Learn [more](https://vuejs.org/guide/introduction.html).
75
+ - Upgrading from Vue 2? Check out the [Migration Guide](https://v3-migration.vuejs.org/).
76
+ - Vue 2 components can be found on the `vue2` [branch](https://github.com/carbon-design-system/carbon-components-vue/tree/vue2)
77
+
78
+ Vue 3 components for Carbon 10 have reached parity with the Vue 2 components.
79
+ More work is needed especially around accessibility. If you want to improve Vue 3 components follow these guidelines.
80
+
81
+ 1. Fork this repo and checkout the `main` branch
82
+ 2. Look to see which components are currently being improved. You can do this by looking in the [issues list](https://github.com/carbon-design-system/carbon-components-vue/issues).
83
+ 3. If you want to improve a component, look in the open issue list to see if someone else might already be working on it. Look for issues with a "V3 - Vue3" label and the name of the component. For example "**CvDatePicker - improving accessibility**".
84
+ 4. If no one else is already working on it, create an issue using the "🍪 Vue 3 - improve component" and label it as above.
37
85
  - Work on the component and create a PR when you are ready.
38
86
  - Components are expected to be implemented as [single file components](https://vuejs.org/guide/scaling-up/sfc.html) using the Vue [composition api](https://vuejs.org/guide/extras/composition-api-faq.html). See `CvCheckbox` as an example. The Vue 2 components use the options API.
39
- - You should reference the existing Vue 2 component while developing the code. The existing components often have the community enhancements that need to be maintained.
40
- - You should reference the DOM in the React components storybook and be sure to include any accessibility improvements that might be there.
41
- - You should provide a story and test case for the component. For example:
42
- ```
43
- src/components/CvCheckbox/CvCheckbox.stories.js
44
- src/components/CvCheckbox/CvCheckbox.vue
45
- src/components/CvCheckbox/__tests__/CvCheckbox.spec.js
46
- src/components/CvCheckbox/index.js
47
- ```
87
+ - You should reference the DOM in the React components storybook and be sure to include any accessibility
88
+ improvements that might be there.
89
+ - You should update the story and test cases for the component if applicable. Sometimes the story might need updating
90
+ almost always the test cases for the component will need updates.
48
91
  - If you have question tag @davidnixon in your issue and let me know how I can help.
49
92
 
50
93
  ### Changelog
51
94
 
52
- [CHANGELOG.md](./packages/core/CHANGELOG.md)
53
-
54
- ## Getting started
55
-
56
- [Usage and getting started instructions](./packages/core/README.md#getting-started) for @carbon/vue.
95
+ [CHANGELOG.md](./CHANGELOG.md)
57
96
 
58
97
  ### List of available components
59
98