@carbon/vue 2.42.0 → 2.44.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 (54) hide show
  1. package/README.md +24 -2
  2. package/dist/carbon-vue.common.js +1103 -1007
  3. package/dist/carbon-vue.common.js.map +1 -1
  4. package/dist/carbon-vue.umd.js +1103 -1007
  5. package/dist/carbon-vue.umd.js.map +1 -1
  6. package/dist/carbon-vue.umd.min.js +3 -3
  7. package/dist/carbon-vue.umd.min.js.map +1 -1
  8. package/package.json +5 -5
  9. package/src/carbon.yml +388 -0
  10. package/src/components/cv-accordion/cv-accordion-skeleton.vue +1 -1
  11. package/src/components/cv-accordion/cv-accordion.vue +1 -1
  12. package/src/components/cv-aspect-ratio/cv-aspect-ratio.vue +3 -2
  13. package/src/components/cv-aspect-ratio/index.js +2 -2
  14. package/src/components/cv-breadcrumb/cv-breadcrumb-skeleton.vue +8 -1
  15. package/src/components/cv-button/button-mixin.js +7 -4
  16. package/src/components/cv-button/consts.js +14 -0
  17. package/src/components/cv-button/cv-icon-button.vue +2 -2
  18. package/src/components/cv-checkbox/cv-checkbox.vue +0 -1
  19. package/src/components/cv-code-snippet/_cv-code-snippet-inline.vue +2 -1
  20. package/src/components/cv-code-snippet/_cv-code-snippet-multiline.vue +2 -1
  21. package/src/components/cv-code-snippet/_cv-code-snippet-oneline.vue +2 -1
  22. package/src/components/cv-code-snippet/cv-code-snippet-skeleton.vue +1 -1
  23. package/src/components/cv-code-snippet/cv-code-snippet.vue +2 -1
  24. package/src/components/cv-data-table/cv-data-table-heading.vue +1 -1
  25. package/src/components/cv-data-table/cv-data-table-skeleton.vue +1 -2
  26. package/src/components/cv-data-table/cv-data-table.vue +45 -43
  27. package/src/components/cv-date-picker/plugins/monthSelectPlugin.js +1 -1
  28. package/src/components/cv-feedback-button/_cv-feedback-button.vue +1 -1
  29. package/src/components/cv-file-uploader/cv-file-uploader.vue +22 -12
  30. package/src/components/cv-inline-loading/cv-inline-loading.vue +1 -0
  31. package/src/components/cv-link/cv-link.vue +8 -1
  32. package/src/components/cv-loading/cv-loading.vue +4 -1
  33. package/src/components/cv-modal/cv-modal.vue +4 -3
  34. package/src/components/cv-multi-select/cv-multi-select.vue +9 -2
  35. package/src/components/cv-number-input/cv-number-input.vue +39 -31
  36. package/src/components/cv-overflow-menu/cv-overflow-menu.vue +3 -3
  37. package/src/components/cv-search/cv-search.vue +30 -14
  38. package/src/components/cv-slider/cv-slider.vue +1 -0
  39. package/src/components/cv-tabs/cv-tabs-skeleton.vue +7 -19
  40. package/src/components/cv-tabs/cv-tabs.vue +0 -2
  41. package/src/components/cv-tag/cv-tag-skeleton.vue +1 -3
  42. package/src/components/cv-tag/cv-tag.vue +6 -7
  43. package/src/components/cv-tag/index.js +3 -2
  44. package/src/components/cv-tile/_cv-tile-selectable.vue +0 -1
  45. package/src/components/cv-toggle/cv-toggle.vue +0 -1
  46. package/src/components/cv-tooltip/consts.js +2 -0
  47. package/src/components/cv-tooltip/cv-definition-tooltip.vue +5 -5
  48. package/src/components/cv-tooltip/cv-interactive-tooltip.vue +7 -7
  49. package/src/components/cv-tooltip/cv-tooltip.vue +5 -5
  50. package/src/components/cv-tooltip/index.js +1 -0
  51. package/src/components/cv-ui-shell/cv-header-global-action.vue +1 -1
  52. package/src/thumbnails/inline-notification.svg +23 -0
  53. package/src/thumbnails/skeleton-text.svg +15 -0
  54. package/src/thumbnails/toast-notification.svg +34 -0
@@ -7,7 +7,9 @@
7
7
  `cv-tag ${carbonPrefix}--tag`,
8
8
  `${carbonPrefix}--tag--${tagKind}`,
9
9
  {
10
+ [`${carbonPrefix}--tag--disabled`]: disabled,
10
11
  [`${carbonPrefix}--tag--filter`]: isFilter,
12
+ [`${carbonPrefix}--tag--interactive`]: hasClickListener,
11
13
  [`${carbonPrefix}--tag--${size}`]: size,
12
14
  },
13
15
  ]"
@@ -19,7 +21,7 @@
19
21
  <div v-if="icon && !filter" :class="`${carbonPrefix}--tag__custom-icon`">
20
22
  <CvSvg :svg="icon" />
21
23
  </div>
22
- <span :class="`${carbonPrefix}--tag__label`">{{ label }}</span>
24
+ <span :class="`${carbonPrefix}--tag__label`" :title="hasClickListener ? label : ''">{{ label }}</span>
23
25
  <button
24
26
  v-if="isFilter"
25
27
  :class="`${carbonPrefix}--tag__close-icon`"
@@ -37,7 +39,7 @@ import Close16 from '@carbon/icons-vue/es/close/16';
37
39
  import { carbonPrefixMixin, uidMixin } from '../../mixins';
38
40
  import CvSvg from '../cv-svg/_cv-svg';
39
41
 
40
- const tagKinds = [
42
+ export const tagKinds = [
41
43
  'red',
42
44
  'magenta',
43
45
  'purple',
@@ -71,8 +73,7 @@ export default {
71
73
  label: { type: String, required: true },
72
74
  kind: {
73
75
  type: String,
74
- default: tagKinds[0],
75
- validator(val) {
76
+ validator: val => {
76
77
  if (val === 'filter' && process.env.NODE_ENV === 'development') {
77
78
  console.warn('DEPRECARTED: Prefer props.filter (bool)');
78
79
  return true;
@@ -86,9 +87,7 @@ export default {
86
87
  },
87
88
  size: {
88
89
  type: String,
89
- validator(val) {
90
- return !val || val == 'sm';
91
- },
90
+ validator: val => ['sm'].includes(val),
92
91
  },
93
92
  },
94
93
  data() {
@@ -1,3 +1,4 @@
1
- import CvTag from './cv-tag';
1
+ import CvTag, { tagKinds } from './cv-tag';
2
2
  import CvTagSkeleton from './cv-tag-skeleton';
3
- export { CvTag, CvTagSkeleton };
3
+
4
+ export { CvTag, CvTagSkeleton, tagKinds };
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <label
3
- :data-wibble="`${isChecked}`"
4
3
  :for="uid"
5
4
  :aria-label="ariaLabel"
6
5
  :class="[
@@ -7,7 +7,6 @@
7
7
  type="checkbox"
8
8
  :id="uid"
9
9
  :checked="isChecked === true"
10
- :aria-checked="`${isChecked}`"
11
10
  :value="value"
12
11
  ref="input"
13
12
  />
@@ -0,0 +1,2 @@
1
+ export const alignments = ['start', 'center', 'end'];
2
+ export const directions = ['top', 'bottom', 'right', 'left'];
@@ -19,21 +19,21 @@
19
19
 
20
20
  <script>
21
21
  import { uidMixin, carbonPrefixMixin } from '../../mixins';
22
+ import { alignments, directions } from './consts';
22
23
 
23
24
  export default {
24
25
  name: 'CvDefinitionTooltip',
25
26
  mixins: [uidMixin, carbonPrefixMixin],
26
27
  props: {
27
- alignment: { type: String, default: 'center', validator: val => ['start', 'center', 'end'].includes(val) },
28
+ alignment: { type: String, default: 'center', validator: val => alignments.includes(val) },
28
29
  definition: { type: String, required: true },
29
30
  direction: {
30
31
  type: String,
31
32
  default: 'top',
32
- validator(val) {
33
- const validValues = ['top', 'left', 'right', 'bottom'];
34
- const valid = validValues.includes(val);
33
+ validator: val => {
34
+ const valid = directions.includes(val);
35
35
  if (!valid) {
36
- console.warn(`CVDefinitionTooltip.direction must be one of the following: ${validValues}`);
36
+ console.warn(`CVDefinitionTooltip.direction must be one of the following: ${directions}`);
37
37
  }
38
38
  return valid;
39
39
  },
@@ -46,7 +46,7 @@
46
46
  class="cv-interactive-tooltip__before-content"
47
47
  ref="beforeContent"
48
48
  tabindex="0"
49
- style="position: absolute; left: -9999px; width: 1px; height: 1px;"
49
+ style="position: absolute; left: -9999px; width: 1px; height: 1px"
50
50
  @focus="focusBeforeContent"
51
51
  />
52
52
  <span :class="`${carbonPrefix}--tooltip__caret`"></span>
@@ -57,7 +57,7 @@
57
57
  class="cv-interactive-tooltip__after-content"
58
58
  ref="afterContent"
59
59
  tabindex="0"
60
- style="position: absolute; left: -9999px; width: 1px; height: 1px;"
60
+ style="position: absolute; left: -9999px; width: 1px; height: 1px"
61
61
  @focus="focusAfterContent"
62
62
  />
63
63
  </div>
@@ -67,21 +67,21 @@
67
67
  <script>
68
68
  import { uidMixin, carbonPrefixMixin } from '../../mixins';
69
69
  import Information16 from '@carbon/icons-vue/es/information/16';
70
+ import { alignments, directions } from './consts';
70
71
 
71
72
  export default {
72
73
  name: 'CvInteractiveTooltip',
73
74
  mixins: [uidMixin, carbonPrefixMixin],
74
75
  components: { Information16 },
75
76
  props: {
76
- alignment: { type: String, default: 'center', validator: val => ['start', 'center', 'end'].includes(val) },
77
+ alignment: { type: String, default: 'center', validator: val => alignments.includes(val) },
77
78
  direction: {
78
79
  type: String,
79
80
  default: 'top',
80
- validator(val) {
81
- const validValues = ['top', 'bottom', 'right', 'left'];
82
- const valid = validValues.includes(val);
81
+ validator: val => {
82
+ const valid = directions.includes(val);
83
83
  if (!valid) {
84
- console.warn(`CVInteractiveTooltip.direction must be one of the following: ${validValues}`);
84
+ console.warn(`CVInteractiveTooltip.direction must be one of the following: ${directions}`);
85
85
  }
86
86
  return valid;
87
87
  },
@@ -19,21 +19,21 @@
19
19
  <script>
20
20
  import Information16 from '@carbon/icons-vue/es/information/16';
21
21
  import { carbonPrefixMixin } from '../../mixins';
22
+ import { alignments, directions } from './consts';
22
23
 
23
24
  export default {
24
25
  name: 'CvTooltip',
25
26
  mixins: [carbonPrefixMixin],
26
27
  components: { Information16 },
27
28
  props: {
28
- alignment: { type: String, default: 'center', validator: val => ['start', 'center', 'end'].includes(val) },
29
+ alignment: { type: String, default: 'center', validator: val => alignments.includes(val) },
29
30
  direction: {
30
31
  type: String,
31
32
  default: 'top',
32
- validator(val) {
33
- const validValues = ['top', 'left', 'right', 'bottom'];
34
- const valid = validValues.includes(val);
33
+ validator: val => {
34
+ const valid = directions.includes(val);
35
35
  if (!valid) {
36
- console.warn(`CVTooltip.direction must be one of the following: ${validValues}`);
36
+ console.warn(`CVTooltip.direction must be one of the following: ${directions}`);
37
37
  }
38
38
  return valid;
39
39
  },
@@ -2,4 +2,5 @@ import CvTooltip from './cv-tooltip';
2
2
  import CvInteractiveTooltip from './cv-interactive-tooltip';
3
3
  import CvDefinitionTooltip from './cv-definition-tooltip';
4
4
 
5
+ export { alignments, directions } from './consts';
5
6
  export { CvTooltip, CvInteractiveTooltip, CvDefinitionTooltip };
@@ -38,7 +38,7 @@ export default {
38
38
  tipPosition: {
39
39
  type: String,
40
40
  default: 'bottom',
41
- validator: val => ['top', 'left', 'bottom', 'right'.includes(val)],
41
+ validator: val => ['top', 'left', 'bottom', 'right'].includes(val),
42
42
  },
43
43
  tipAlignment: { type: String, default: 'center', validator: val => ['start', 'center', 'end'].includes(val) },
44
44
  },
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="320px" height="180px" viewBox="0 0 320 180" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>inline-notification</title>
4
+ <defs>
5
+ <circle id="path-1" cx="5" cy="5" r="4.375"></circle>
6
+ <polygon id="path-3" points="4.375 6.71875 2.8125 5.15625 3.309375 4.6875 4.375 5.734375 6.690625 3.4375 7.1875 3.93125"></polygon>
7
+ </defs>
8
+ <g id="inline-notification" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
9
+ <rect id="Rectangle-2-Copy-27" fill="#393939" x="60" y="77" width="200" height="26"></rect>
10
+ <g id="icon/status/checkmark-filled/16" transform="translate(69.000000, 85.000000)">
11
+ <mask id="mask-2" fill="white">
12
+ <use xlink:href="#path-1"></use>
13
+ </mask>
14
+ <use id="icon-color" fill="#24A148" xlink:href="#path-1"></use>
15
+ <mask id="mask-4" fill="white">
16
+ <use xlink:href="#path-3"></use>
17
+ </mask>
18
+ <use id="icon-color" fill="#FFFFFF" xlink:href="#path-3"></use>
19
+ </g>
20
+ <rect id="Path-Copy-2" fill="#24A148" x="60" y="77" width="2" height="26"></rect>
21
+ <rect id="Rectangle-Copy-14" fill="#F4F4F4" x="85" y="88" width="100.088235" height="4"></rect>
22
+ </g>
23
+ </svg>
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="320px" height="180px" viewBox="0 0 320 180" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>skeleton-text</title>
4
+ <defs>
5
+ <linearGradient x1="-21.9775656%" y1="50%" x2="113.47099%" y2="50%" id="linearGradient-1">
6
+ <stop stop-color="#C6C6C6" stop-opacity="0" offset="0%"></stop>
7
+ <stop stop-color="#C6C6C6" offset="100%"></stop>
8
+ </linearGradient>
9
+ </defs>
10
+ <g id="skeleton-text" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
11
+ <rect id="Rectangle" fill="#E0E0E0" x="56" y="82" width="208" height="16"></rect>
12
+ <rect id="Rectangle" fill="#C6C6C6" x="56" y="82" width="156" height="16"></rect>
13
+ <rect id="Rectangle" fill="url(#linearGradient-1)" transform="translate(215.500000, 90.000000) scale(-1, 1) translate(-215.500000, -90.000000) " x="212" y="82" width="7" height="16"></rect>
14
+ </g>
15
+ </svg>
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="320px" height="180px" viewBox="0 0 320 180" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>toast-notification</title>
4
+ <defs>
5
+ <circle id="path-1" cx="6.125" cy="6.125" r="6.125"></circle>
6
+ <polygon id="path-3" points="3.00668244 -0.342156092 3.99105744 -0.342156092 3.99105744 7.33596891 3.00668244 7.33596891"></polygon>
7
+ </defs>
8
+ <g id="toast-notification" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
9
+ <rect id="Rectangle-2-Copy-27" fill="#393939" x="60" y="56" width="200" height="68"></rect>
10
+ <rect id="Path-Copy-2" fill="#DA1E28" x="60" y="56" width="3" height="68"></rect>
11
+ <g id="Group" transform="translate(73.000000, 68.000000)">
12
+ <g id="Group" transform="translate(7.000000, 7.000000) scale(-1, 1) translate(-7.000000, -7.000000) ">
13
+ <g id="error--filled" transform="translate(0.875000, 0.875000)">
14
+ <g id="icon-2">
15
+ <mask id="mask-2" fill="white">
16
+ <use xlink:href="#path-1"></use>
17
+ </mask>
18
+ <use id="icon-color" fill="#DA1E28" xlink:href="#path-1"></use>
19
+ </g>
20
+ <g id="icon-1" transform="translate(2.625000, 2.625000)">
21
+ <mask id="mask-4" fill="white">
22
+ <use xlink:href="#path-3"></use>
23
+ </mask>
24
+ <use id="icon-color" fill="#000000" transform="translate(3.498870, 3.496906) rotate(-45.000000) translate(-3.498870, -3.496906) " xlink:href="#path-3"></use>
25
+ </g>
26
+ </g>
27
+ <rect id="transparent-rectangle" x="0" y="0" width="14" height="14"></rect>
28
+ </g>
29
+ </g>
30
+ <rect id="Rectangle-Copy-14" fill="#F4F4F4" x="95" y="72" width="71.1191279" height="5"></rect>
31
+ <rect id="Rectangle-Copy-23" fill="#E0E0E0" x="95" y="105" width="93.8444444" height="5"></rect>
32
+ <rect id="Rectangle-Copy-24" fill="#E0E0E0" x="95" y="82" width="123" height="5"></rect>
33
+ </g>
34
+ </svg>