@carbon/vue 2.42.0 → 2.43.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 (38) hide show
  1. package/dist/carbon-vue.common.js +1015 -954
  2. package/dist/carbon-vue.common.js.map +1 -1
  3. package/dist/carbon-vue.umd.js +1015 -954
  4. package/dist/carbon-vue.umd.js.map +1 -1
  5. package/dist/carbon-vue.umd.min.js +3 -3
  6. package/dist/carbon-vue.umd.min.js.map +1 -1
  7. package/package.json +5 -5
  8. package/src/components/cv-accordion/cv-accordion-skeleton.vue +1 -1
  9. package/src/components/cv-accordion/cv-accordion.vue +1 -1
  10. package/src/components/cv-aspect-ratio/cv-aspect-ratio.vue +3 -2
  11. package/src/components/cv-aspect-ratio/index.js +2 -2
  12. package/src/components/cv-breadcrumb/cv-breadcrumb-skeleton.vue +8 -1
  13. package/src/components/cv-button/button-mixin.js +7 -4
  14. package/src/components/cv-button/consts.js +14 -0
  15. package/src/components/cv-button/cv-icon-button.vue +2 -2
  16. package/src/components/cv-code-snippet/cv-code-snippet-skeleton.vue +1 -1
  17. package/src/components/cv-code-snippet/cv-code-snippet.vue +1 -1
  18. package/src/components/cv-data-table/cv-data-table-heading.vue +1 -1
  19. package/src/components/cv-data-table/cv-data-table-skeleton.vue +1 -2
  20. package/src/components/cv-feedback-button/_cv-feedback-button.vue +1 -1
  21. package/src/components/cv-file-uploader/cv-file-uploader.vue +22 -11
  22. package/src/components/cv-inline-loading/cv-inline-loading.vue +1 -0
  23. package/src/components/cv-link/cv-link.vue +8 -1
  24. package/src/components/cv-loading/cv-loading.vue +4 -1
  25. package/src/components/cv-number-input/cv-number-input.vue +38 -30
  26. package/src/components/cv-overflow-menu/cv-overflow-menu.vue +3 -3
  27. package/src/components/cv-search/cv-search.vue +17 -12
  28. package/src/components/cv-tabs/cv-tabs-skeleton.vue +7 -19
  29. package/src/components/cv-tag/cv-tag-skeleton.vue +1 -3
  30. package/src/components/cv-tag/cv-tag.vue +6 -7
  31. package/src/components/cv-tag/index.js +3 -2
  32. package/src/components/cv-tile/_cv-tile-selectable.vue +0 -1
  33. package/src/components/cv-tooltip/consts.js +2 -0
  34. package/src/components/cv-tooltip/cv-definition-tooltip.vue +5 -5
  35. package/src/components/cv-tooltip/cv-interactive-tooltip.vue +7 -7
  36. package/src/components/cv-tooltip/cv-tooltip.vue +5 -5
  37. package/src/components/cv-tooltip/index.js +1 -0
  38. package/src/components/cv-ui-shell/cv-header-global-action.vue +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/vue",
3
3
  "description": "A collection of components for the Carbon Design System built using Vue.js",
4
- "version": "2.42.0",
4
+ "version": "2.43.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -64,9 +64,9 @@
64
64
  },
65
65
  "sideEffects": true,
66
66
  "dependencies": {
67
- "@carbon/icons-vue": "10.41.0",
68
- "@carbon/telemetry": "^0.0.0-alpha.6",
69
- "carbon-components": "10.46.0",
67
+ "@carbon/icons-vue": "10.49.1",
68
+ "@carbon/telemetry": "^0.1.0",
69
+ "carbon-components": "10.56.0",
70
70
  "flatpickr": "4.6.9",
71
71
  "vue": "^2.6.14"
72
72
  },
@@ -75,5 +75,5 @@
75
75
  "eslint-plugin-prettier": "^3.3.1",
76
76
  "vue-template-compiler": "^2.6.14"
77
77
  },
78
- "gitHead": "ab0c2e9ac8f61f208d73291274108ce5c25cb527"
78
+ "gitHead": "fead16d4b7d1f363f99c49aaeb614749ddf128ec"
79
79
  }
@@ -31,7 +31,7 @@ export default {
31
31
  size: {
32
32
  type: String,
33
33
  default: '',
34
- validator: val => ['sm', 'xl', ''].includes(val),
34
+ validator: val => ['sm', 'md', 'lg', 'xl', ''].includes(val),
35
35
  },
36
36
  },
37
37
  mixins: [carbonPrefixMixin],
@@ -23,7 +23,7 @@ export default {
23
23
  size: {
24
24
  type: String,
25
25
  default: '',
26
- validator: val => ['sm', 'xl', ''].includes(val),
26
+ validator: val => ['sm', 'md', 'lg', 'xl', ''].includes(val),
27
27
  },
28
28
  },
29
29
  mixins: [carbonPrefixMixin],
@@ -4,6 +4,8 @@
4
4
 
5
5
  <script>
6
6
  import { carbonPrefixMixin } from '../../mixins';
7
+
8
+ export const ratios = ['16x9', '9x16', '2x1', '1x2', '4x3', '3x4', '1x1'];
7
9
  export default {
8
10
  name: 'CvAspectRatio',
9
11
  mixins: [carbonPrefixMixin],
@@ -11,8 +13,7 @@ export default {
11
13
  ratio: {
12
14
  type: String,
13
15
  validator: val => {
14
- const options = ['16x9', '9x16', '2x1', '1x2', '4x3', '3x4', '1x1'];
15
- const result = options.includes(val);
16
+ const result = ratios.includes(val);
16
17
  if (!result) {
17
18
  console.warn(`Invalid options supplied to "CvAspectRation"-"${val}".`);
18
19
  }
@@ -1,2 +1,2 @@
1
- import CvAspectRatio from './cv-aspect-ratio';
2
- export { CvAspectRatio };
1
+ import CvAspectRatio, { ratios } from './cv-aspect-ratio';
2
+ export { CvAspectRatio, ratios };
@@ -1,5 +1,11 @@
1
1
  <template>
2
- <nav :class="`${carbonPrefix}--breadcrumb ${carbonPrefix}--skeleton`" :aria-label="ariaLabel">
2
+ <nav
3
+ :class="[
4
+ `${carbonPrefix}--breadcrumb ${carbonPrefix}--skeleton`,
5
+ { [`${carbonPrefix}--breadcrumb--no-trailing-slash`]: noTrailingSlash },
6
+ ]"
7
+ :aria-label="ariaLabel"
8
+ >
3
9
  <cv-breadcrumb-item-skeleton></cv-breadcrumb-item-skeleton>
4
10
  <cv-breadcrumb-item-skeleton></cv-breadcrumb-item-skeleton>
5
11
  <cv-breadcrumb-item-skeleton></cv-breadcrumb-item-skeleton>
@@ -18,6 +24,7 @@ export default {
18
24
  },
19
25
  props: {
20
26
  ariaLabel: { type: String, default: 'breadcrumb' },
27
+ noTrailingSlash: Boolean,
21
28
  },
22
29
  };
23
30
  </script>
@@ -13,6 +13,7 @@ export default {
13
13
  },
14
14
  },
15
15
  iconHref: {
16
+ deprecated: true,
16
17
  type: String,
17
18
  default: undefined,
18
19
  validator(val) {
@@ -29,6 +30,7 @@ export default {
29
30
  ['', 'primary', 'secondary', 'tertiary', 'ghost', 'danger', 'danger--ghost', 'danger--tertiary'].includes(val),
30
31
  },
31
32
  small: {
33
+ deprecated: true,
32
34
  type: Boolean,
33
35
  default: undefined,
34
36
  validator(val) {
@@ -56,7 +58,8 @@ export default {
56
58
  buttonClassOpts() {
57
59
  return (opts = {}) => {
58
60
  const classes = [`${carbonSettings.prefix}--btn`];
59
- const lowerCaseKind = this.kind.toLowerCase();
61
+ // ensure lower case and default to primary
62
+ const _kind = this.kind ? this.kind.toLowerCase() : 'primary';
60
63
 
61
64
  if (opts.skeleton) {
62
65
  classes.push(`${carbonSettings.prefix}--skeleton`);
@@ -64,13 +67,13 @@ export default {
64
67
 
65
68
  if (opts.iconOnly) {
66
69
  classes.push(`${carbonSettings.prefix}--btn--icon-only`);
67
- if (this.selected && lowerCaseKind === 'ghost') {
70
+ if (this.selected && _kind === 'ghost') {
68
71
  classes.push(`${carbonSettings.prefix}--btn--selected`);
69
72
  }
70
73
  }
71
74
 
72
- if (this.kind && !opts.skeleton) {
73
- classes.push(`${carbonSettings.prefix}--btn--${lowerCaseKind}`);
75
+ if (_kind && !opts.skeleton) {
76
+ classes.push(`${carbonSettings.prefix}--btn--${_kind}`);
74
77
  }
75
78
 
76
79
  let size = this.size ? this.size : this.small && 'sm';
@@ -0,0 +1,14 @@
1
+ export const buttonKinds = [
2
+ '',
3
+ 'primary',
4
+ 'secondary',
5
+ 'tertiary',
6
+ 'ghost',
7
+ 'danger',
8
+ 'danger--ghost',
9
+ 'danger--tertiary',
10
+ ];
11
+ export const buttonSizes = ['', 'default', 'field', 'small', 'sm', 'lg', 'xl'];
12
+
13
+ const CvButtonConsts = { buttonKinds, buttonSizes };
14
+ export default CvButtonConsts;
@@ -29,12 +29,12 @@ export default {
29
29
  mixins: [buttonMixin, carbonPrefixMixin],
30
30
  components: { CvSvg },
31
31
  props: {
32
- label: { type: String, required: true },
32
+ label: { type: String, default: undefined },
33
33
  selected: Boolean,
34
34
  tipPosition: {
35
35
  type: String,
36
36
  default: 'bottom',
37
- validator: val => ['top', 'left', 'bottom', 'right'.includes(val)],
37
+ validator: val => ['top', 'left', 'bottom', 'right'].includes(val),
38
38
  },
39
39
  tipAlignment: { type: String, default: 'center', validator: val => ['start', 'center', 'end'].includes(val) },
40
40
  },
@@ -19,7 +19,7 @@ export default {
19
19
  name: 'CvCodeSnippetSkeleton',
20
20
  mixins: [carbonPrefixMixin],
21
21
  props: {
22
- kind: { type: String, default: 'oneline' },
22
+ kind: { type: String, default: 'oneline', validator: val => ['multiline', 'oneline'].includes(val) },
23
23
  },
24
24
  computed: {
25
25
  multi() {
@@ -14,7 +14,7 @@
14
14
  <!-- textarea cannot be fully hidden for clipboard to work -->
15
15
  <textarea
16
16
  class="cv-code-snippet__clippy"
17
- style="position: absolute; left: -9999px; max-width: 0; opacity: 0; overflow: hidden;"
17
+ style="position: absolute; left: -9999px; max-width: 0; opacity: 0; overflow: hidden"
18
18
  aria-hidden="true"
19
19
  ref="clippy"
20
20
  ></textarea>
@@ -28,7 +28,7 @@
28
28
 
29
29
  <script>
30
30
  import ArrowDown16 from '@carbon/icons-vue/es/arrow--down/16';
31
- import Arrows16 from '@carbon/icons-vue/es/arrows/16';
31
+ import Arrows16 from '@carbon/icons-vue/es/arrows--vertical/16';
32
32
  import CvWrapper from '../cv-wrapper/_cv-wrapper';
33
33
  import { uidMixin, carbonPrefixMixin } from '../../mixins';
34
34
 
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <cv-data-table skeleton :data="data" :columns="cols" v-on="$listeners" v-bind="$attrs">
3
- <template v-if="hasBatchActions" slot="helper-text">
3
+ <template v-if="hasHelperText" slot="helper-text">
4
4
  <slot name="helper-text" />
5
5
  </template>
6
6
 
@@ -29,7 +29,6 @@ export default {
29
29
  },
30
30
  props: {
31
31
  columns: { type: [Array, Number], default: DEFAULTS.COLS },
32
- hasExpandables: Boolean,
33
32
  rows: { type: Number, default: DEFAULTS.ROWS },
34
33
  },
35
34
  data() {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <button
3
- aria-label="ariaLabel"
3
+ :aria-label="ariaLabel"
4
4
  type="button"
5
5
  class="cv-feedback-button"
6
6
  v-bind="$attrs"
@@ -148,6 +148,7 @@ export default {
148
148
  buttonLabel: {
149
149
  type: String,
150
150
  default: undefined,
151
+ deprecated: true,
151
152
  validator: val => {
152
153
  if (val !== undefined && process.env.NODE_ENV === 'development') {
153
154
  console.warn('CvFileUploader: button-label prop deprecated in favour of drop-target-label');
@@ -213,20 +214,30 @@ export default {
213
214
  },
214
215
  addFiles(files) {
215
216
  for (const file of files) {
216
- const internalFile = {
217
- state: this.initialStateUploading ? STATES.UPLOADING : STATES.NONE,
218
- file,
219
- invalidMessageTitle: '',
220
- invalidMessage: '',
221
- };
217
+ const internalFile = this.internalFiles.find(item => item.file.name === file.name);
222
218
 
223
- if (file.messageBundle) {
224
- internalFile.invalidMessageTitle = file.messageBundle.invalidMessageTitle;
225
- internalFile.invalidMessage = file.messageBundle.invalidMessage;
226
- delete file.messageBundle;
219
+ if (internalFile) {
220
+ internalFile.state = this.initialStateUploading ? STATES.UPLOADING : STATES.NONE;
221
+ internalFile.invalidMessageTitle = '';
222
+ internalFile.invalidMessage = '';
223
+ } else {
224
+ const internalFile = {
225
+ state: this.initialStateUploading ? STATES.UPLOADING : STATES.NONE,
226
+ file,
227
+ invalidMessageTitle: '',
228
+ invalidMessage: '',
229
+ };
230
+
231
+ if (file.messageBundle) {
232
+ internalFile.invalidMessageTitle = file.messageBundle.invalidMessageTitle;
233
+ internalFile.invalidMessage = file.messageBundle.invalidMessage;
234
+ delete file.messageBundle;
235
+ }
236
+ this.internalFiles.push(internalFile);
227
237
  }
228
- this.internalFiles.push(internalFile);
229
238
  }
239
+ // clear input we do not need to maintain it
240
+ this.$refs['file-input'].value = '';
230
241
  this.$emit('change', this.internalFiles);
231
242
  },
232
243
  onChange(ev) {
@@ -40,6 +40,7 @@ export default {
40
40
  active: {
41
41
  type: Boolean,
42
42
  default: undefined,
43
+ deprecated: true,
43
44
  validator: val => {
44
45
  if (val !== undefined && process.env.NODE_ENV === 'development') {
45
46
  console.warn('CvInlineLoading: active prop deprecated in favour of state prop');
@@ -4,7 +4,13 @@
4
4
  v-on="$listeners"
5
5
  v-bind="linkProps"
6
6
  class="cv-link"
7
- :class="[`${carbonPrefix}--link`, { [`${carbonPrefix}--link--inline`]: inline }]"
7
+ :class="[
8
+ `${carbonPrefix}--link`,
9
+ {
10
+ [`${carbonPrefix}--link--disabled`]: disabled,
11
+ [`${carbonPrefix}--link--inline`]: inline,
12
+ },
13
+ ]"
8
14
  >
9
15
  <slot></slot>
10
16
  </component>
@@ -17,6 +23,7 @@ export default {
17
23
  name: 'CvLink',
18
24
  mixins: [linkMixin, carbonPrefixMixin],
19
25
  props: {
26
+ disabled: Boolean,
20
27
  inline: Boolean,
21
28
  },
22
29
  };
@@ -5,7 +5,7 @@
5
5
  :class="{
6
6
  'cv-loading': !overlay,
7
7
  [`${carbonPrefix}--loading`]: active || stopping,
8
- [`${carbonPrefix}--loading--stop`]: !active && stopping,
8
+ [`${carbonPrefix}--loading--stop`]: (!active && stopping) || stopped,
9
9
  [`${carbonPrefix}--loading--small`]: small,
10
10
  }"
11
11
  ref="loading"
@@ -55,6 +55,7 @@ export default {
55
55
  },
56
56
  data() {
57
57
  return {
58
+ stopped: false,
58
59
  stopping: false,
59
60
  };
60
61
  },
@@ -69,10 +70,12 @@ export default {
69
70
  this.$refs.loading.removeEventListener('animationend', this.onEnd);
70
71
 
71
72
  this.stopping = false;
73
+ this.stopped = true;
72
74
  this.$emit('loading-end');
73
75
  }
74
76
  },
75
77
  onActiveUpdate(newValue) {
78
+ this.stopped = false;
76
79
  this.stopping = !newValue;
77
80
  if (!newValue) {
78
81
  this.$refs.loading.addEventListener('animationend', this.onEnd);
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <cv-wrapper :tag-type="formItem ? 'div' : ''" class="cv-number-input" :class="`${carbonPrefix}--form-item`">
3
3
  <div
4
- data-numberinput
5
4
  :class="[
6
5
  `${carbonPrefix}--number`,
7
6
  {
@@ -14,20 +13,12 @@
14
13
  :data-invalid="isInvalid"
15
14
  >
16
15
  <label :for="uid" :class="`${carbonPrefix}--label`">{{ label }}</label>
17
- <div :class="`${carbonPrefix}--form__helper-text`" v-if="isHelper && mobile">
18
- <slot name="helper-text">{{ helperText }}</slot>
19
- </div>
20
- <div :class="`${carbonPrefix}--number__input-wrapper`">
21
- <button
22
- v-if="mobile"
23
- :class="`${carbonPrefix}--number__control-btn down-icon`"
24
- @click="doDown"
25
- type="button"
26
- :aria-label="ariaLabelForDownButton"
27
- :disabled="disabled"
28
- >
29
- <Subtract16 />
30
- </button>
16
+ <div
17
+ :class="[
18
+ `${carbonPrefix}--number__input-wrapper`,
19
+ { [`${carbonPrefix}--number__input-wrapper--warning`]: isWarn },
20
+ ]"
21
+ >
31
22
  <input
32
23
  :data-invalid="isInvalid"
33
24
  :id="uid"
@@ -41,8 +32,9 @@
41
32
  :max="max"
42
33
  ref="input"
43
34
  />
44
- <WarningFilled16 v-if="isInvalid && !mobile" :class="`${carbonPrefix}--number__invalid`" />
45
- <div :class="`${carbonPrefix}--number__controls`" v-if="!mobile">
35
+ <WarningFilled16 v-if="isInvalid" :class="iconClasses" />
36
+ <WarningAltFilled16 v-if="isWarn && !isInvalid" :class="iconClasses" />
37
+ <div :class="`${carbonPrefix}--number__controls`">
46
38
  <button
47
39
  :class="`${carbonPrefix}--number__control-btn down-icon`"
48
40
  @click="doDown"
@@ -68,21 +60,14 @@
68
60
  </button>
69
61
  <div :class="`${carbonPrefix}--number__rule-divider`" />
70
62
  </div>
71
- <button
72
- v-else
73
- :class="`${carbonPrefix}--number__control-btn up-icon`"
74
- @click="doUp"
75
- type="button"
76
- :aria-label="ariaLabelForUpButton"
77
- :disabled="disabled"
78
- >
79
- <Add16 />
80
- </button>
81
63
  </div>
82
64
  <div :class="`${carbonPrefix}--form-requirement`" v-if="isInvalid">
83
65
  <slot name="invalid-message">{{ invalidMessage }}</slot>
84
66
  </div>
85
- <div :class="`${carbonPrefix}--form__helper-text`" v-if="!isInvalid && isHelper && !mobile">
67
+ <div :class="`${carbonPrefix}--form-requirement`" v-if="isWarn && !isInvalid">
68
+ <slot name="warn-text">{{ warnText }}</slot>
69
+ </div>
70
+ <div :class="`${carbonPrefix}--form__helper-text`" v-if="!(isInvalid || isWarn) && isHelper">
86
71
  <slot name="helper-text">{{ helperText }}</slot>
87
72
  </div>
88
73
  </div>
@@ -94,12 +79,13 @@ import { uidMixin, themeMixin, carbonPrefixMixin, methodsMixin } from '../../mix
94
79
  import Add16 from '@carbon/icons-vue/es/add/16';
95
80
  import Subtract16 from '@carbon/icons-vue/es/subtract/16';
96
81
  import WarningFilled16 from '@carbon/icons-vue/es/warning--filled/16';
82
+ import WarningAltFilled16 from '@carbon/icons-vue/es/warning--alt--filled/16';
97
83
  import CvWrapper from '../cv-wrapper/_cv-wrapper';
98
84
 
99
85
  export default {
100
86
  name: 'CvNumberInput',
101
87
  mixins: [uidMixin, themeMixin, carbonPrefixMixin, methodsMixin({ input: ['blur', 'focus'] })],
102
- components: { Add16, Subtract16, WarningFilled16, CvWrapper },
88
+ components: { Add16, Subtract16, WarningFilled16, WarningAltFilled16, CvWrapper },
103
89
  inheritAttrs: false,
104
90
  props: {
105
91
  disabled: Boolean,
@@ -111,6 +97,7 @@ export default {
111
97
  invalid: /* deprecate */ {
112
98
  type: Boolean,
113
99
  default: undefined,
100
+ deprecated: true,
114
101
  validator(val) {
115
102
  if (val !== undefined && process.env.NODE_ENV === 'development') {
116
103
  console.warn('CvNumberInput: invalid prop deprecated in favour of invalidMessage');
@@ -123,13 +110,25 @@ export default {
123
110
  min: { type: [String, Number], default: undefined },
124
111
  max: { type: [String, Number], default: undefined },
125
112
  step: { type: [String, Number], default: undefined },
126
- mobile: Boolean,
113
+ mobile: /* deprecate */ {
114
+ type: Boolean,
115
+ default: undefined,
116
+ deprecated: true,
117
+ validator(val) {
118
+ if (val !== undefined) {
119
+ console.warn('CvNumberInput: mobile prop deprecated as no longer different to standard number input.');
120
+ }
121
+ return true;
122
+ },
123
+ },
124
+ warnText: { type: String, default: undefined },
127
125
  },
128
126
  data() {
129
127
  return {
130
128
  internalValue: 0,
131
129
  isHelper: false,
132
130
  isInvalid: false,
131
+ isWarn: false,
133
132
  };
134
133
  },
135
134
  mounted() {
@@ -159,6 +158,14 @@ export default {
159
158
  input: ev => this.onInput(ev.target.value),
160
159
  });
161
160
  },
161
+ iconClasses() {
162
+ const classes = [];
163
+ (this.isInvalid || this.isWarn) && classes.push(`${this.carbonPrefix}--number__invalid`);
164
+ this.isWarn && !this.isInvalid && classes.push(`${this.carbonPrefix}--number__invalid--warning`);
165
+ this.readOnly && classes.push(`${this.carbonPrefix}--number__readonly-icon`);
166
+
167
+ return classes.join(' ');
168
+ },
162
169
  },
163
170
  methods: {
164
171
  onInput(val) {
@@ -168,6 +175,7 @@ export default {
168
175
  checkSlots() {
169
176
  // NOTE: this.$slots is not reactive so needs to be managed on updated
170
177
  this.isInvalid = !!(this.$slots['invalid-message'] || (this.invalidMessage && this.invalidMessage.length));
178
+ this.isWarn = !!(this.$slots['warn-text'] || (this.warnText && this.warnText.length));
171
179
  this.isHelper = !!(this.$slots['helper-text'] || (this.helperText && this.helperText.length));
172
180
  },
173
181
  doUp() {
@@ -48,7 +48,7 @@
48
48
  class="cv-overflow-menu__before-content"
49
49
  ref="beforeContent"
50
50
  tabindex="0"
51
- style="position: absolute; height: 1px; width: 1px; left: -9999px;"
51
+ style="position: absolute; height: 1px; width: 1px; left: -9999px"
52
52
  @focus="focusBeforeContent"
53
53
  />
54
54
  <ul :class="`${carbonPrefix}--overflow-menu-options__content`">
@@ -58,7 +58,7 @@
58
58
  class="cv-overflow-menu__after-content"
59
59
  ref="afterContent"
60
60
  tabindex="0"
61
- style="position: absolute; height: 1px; width: 1px; left: -9999px;"
61
+ style="position: absolute; height: 1px; width: 1px; left: -9999px"
62
62
  @focus="focusAfterContent"
63
63
  />
64
64
  </div>
@@ -87,7 +87,7 @@ export default {
87
87
  tipPosition: {
88
88
  type: String,
89
89
  default: 'right',
90
- validator: val => ['top', 'left', 'bottom', 'right'.includes(val)],
90
+ validator: val => ['top', 'left', 'bottom', 'right'].includes(val),
91
91
  },
92
92
  tipAlignment: { type: String, default: 'center', validator: val => ['start', 'center', 'end'].includes(val) },
93
93
  },
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <cv-wrapper :tag-type="formItem ? 'div' : ''" :class="`cv-search ${carbonPrefix}--form-item`">
3
3
  <div
4
+ :aria-labelledby="uid"
4
5
  :class="[
5
6
  `${carbonPrefix}--search`,
6
7
  {
@@ -14,6 +15,21 @@
14
15
  role="search"
15
16
  ref="search"
16
17
  >
18
+ <button
19
+ type="button"
20
+ v-if="isToolbarKind"
21
+ :class="`${carbonPrefix}--toolbar-search__btn`"
22
+ :aria-label="toolbarAriaLabel"
23
+ @click="toggleActive(true)"
24
+ @blur="checkFocus"
25
+ >
26
+ <component :is="icon" :class="`${carbonPrefix}--search-magnifier`" />
27
+ </button>
28
+
29
+ <div v-if="!isToolbarKind" :class="`${carbonPrefix}--search-magnifier`">
30
+ <Search20 :class="`${carbonPrefix}--search-magnifier-icon`" />
31
+ </div>
32
+
17
33
  <label :for="uid" :class="`${carbonPrefix}--label`">{{ label }}</label>
18
34
 
19
35
  <input
@@ -30,17 +46,6 @@
30
46
  @blur="checkFocus"
31
47
  />
32
48
 
33
- <button
34
- type="button"
35
- v-if="isToolbarKind"
36
- :class="`${carbonPrefix}--toolbar-search__btn`"
37
- :aria-label="toolbarAriaLabel"
38
- @click="toggleActive(true)"
39
- @blur="checkFocus"
40
- >
41
- <component :is="icon" :class="`${carbonPrefix}--search-magnifier`" />
42
- </button>
43
- <component v-if="!isToolbarKind" :is="icon" :class="`${carbonPrefix}--search-magnifier`" />
44
49
  <button
45
50
  type="button"
46
51
  :class="[`${carbonPrefix}--search-close`, { [`${carbonPrefix}--search-close--hidden`]: !clearVisible }]"
@@ -64,7 +69,7 @@ import CvWrapper from '../cv-wrapper/_cv-wrapper';
64
69
  export default {
65
70
  name: 'CvSearch',
66
71
  mixins: [uidMixin, themeMixin, carbonPrefixMixin, methodsMixin({ input: ['blur', 'focus'] })],
67
- components: { Close16, CvWrapper },
72
+ components: { Close16, CvWrapper, Search20 },
68
73
  inheritAttrs: false,
69
74
  props: {
70
75
  clearAriaLabel: { type: String, default: 'Clear search input' },
@@ -1,23 +1,8 @@
1
1
  <template>
2
- <div :class="`cv-tabs ${carbonPrefix}--tabs ${carbonPrefix}--skeleton`">
3
- <div :class="`${carbonPrefix}--tabs-trigger`">
4
- <div :class="`${carbonPrefix}--tabs-trigger-text`">&nbsp;</div>
5
- <svg width="10" height="5" viewBox="0 0 10 5" fill-rule="evenodd">
6
- <path d="M10 0L5 5 0 0z" />
7
- </svg>
8
- </div>
9
- <ul :class="`${carbonPrefix}--tabs__nav ${carbonPrefix}--tabs__nav--hidden`">
10
- <li :class="`cv-tab ${carbonPrefix}--tabs__nav-item ${carbonPrefix}--tabs__nav-item--selected`">
11
- <div :class="`${carbonPrefix}--tabs__nav-link`">&nbsp;</div>
12
- </li>
13
- <li :class="`cv-tab ${carbonPrefix}--tabs__nav-item`">
14
- <div :class="`${carbonPrefix}--tabs__nav-link`">&nbsp;</div>
15
- </li>
16
- <li :class="`cv-tab ${carbonPrefix}--tabs__nav-item`">
17
- <div :class="`${carbonPrefix}--tabs__nav-link`">&nbsp;</div>
18
- </li>
19
- <li :class="`cv-tab ${carbonPrefix}--tabs__nav-item`">
20
- <div :class="`${carbonPrefix}--tabs__nav-link`">&nbsp;</div>
2
+ <div :class="`cv-tabs ${carbonPrefix}--tabs ${carbonPrefix}--skeleton ${carbonPrefix}--tabs--scrollable`">
3
+ <ul :class="`${carbonPrefix}--tabs--scrollable__nav`">
4
+ <li v-for="index in tabCount" :key="index" :class="`${carbonPrefix}--tabs--scrollable__nav-item`">
5
+ <div :class="`${carbonPrefix}--tabs__nav-link`"><span></span></div>
21
6
  </li>
22
7
  </ul>
23
8
  </div>
@@ -28,5 +13,8 @@ import { carbonPrefixMixin } from '../../mixins';
28
13
  export default {
29
14
  name: 'CvTabsSkeleton',
30
15
  mixins: [carbonPrefixMixin],
16
+ props: {
17
+ tabCount: { type: Number, default: 5 },
18
+ },
31
19
  };
32
20
  </script>
@@ -12,9 +12,7 @@ export default {
12
12
  props: {
13
13
  size: {
14
14
  type: String,
15
- validator(val) {
16
- return !val || val == 'sm';
17
- },
15
+ validator: val => ['sm', ''].includes(val),
18
16
  },
19
17
  },
20
18
  };