@carbon/vue 3.0.22 → 3.0.24

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 (31) hide show
  1. package/README.md +2 -3
  2. package/dist/carbon-vue-3.common.js +920 -1924
  3. package/dist/carbon-vue-3.common.js.map +1 -1
  4. package/dist/carbon-vue-3.umd.js +920 -1924
  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/dist/web-types.json +52 -5
  9. package/package.json +13 -10
  10. package/src/components/CvAccordion/CvAccordionItem.vue +1 -7
  11. package/src/components/CvDataTable/CvDataTable.stories.mdx +6 -22
  12. package/src/components/CvDataTable/CvDataTable.vue +16 -13
  13. package/src/components/CvDataTable/CvDataTableRow.vue +11 -6
  14. package/src/components/CvDataTable/_CvDataTableRowInner.vue +10 -1
  15. package/src/components/CvFileUploader/CvFileUploader.stories.mdx +2 -1
  16. package/src/components/CvFileUploader/CvFileUploader.vue +9 -1
  17. package/src/components/CvMultiSelect/CvMultiSelect.vue +9 -8
  18. package/src/components/CvNumberInput/CvNumberInput.stories.js +5 -0
  19. package/src/components/CvNumberInput/CvNumberInput.vue +13 -0
  20. package/src/components/CvNumberInput/const.js +1 -0
  21. package/src/components/CvPagination/CvPagination.stories.mdx +1 -0
  22. package/src/components/CvPagination/CvPagination.vue +6 -1
  23. package/src/components/CvRadioButton/__tests__/__snapshots__/CvRadioButton.spec.js.snap +2 -2
  24. package/src/components/CvTextInput/CvTextInput.stories.js +7 -10
  25. package/src/components/CvTextInput/CvTextInput.vue +15 -1
  26. package/src/components/CvTextInput/const.js +1 -0
  27. package/src/components/CvTooltip/__tests__/__snapshots__/CvTooltip.spec.js.snap +18 -18
  28. package/src/components/CvUIShell/CvContent.stories.js +22 -0
  29. package/src/components/CvUIShell/CvContent.vue +14 -0
  30. package/src/index.js +1 -0
  31. package/telemetry.yml +1 -1
@@ -2,6 +2,7 @@ import { storyParametersObject } from '../../global/storybook-utils';
2
2
 
3
3
  import { CvTextInput, CvTextInputSkeleton } from '.';
4
4
  import { ref } from 'vue';
5
+ import { sizeTypes, inputTypes } from './const';
5
6
 
6
7
  export default {
7
8
  title: 'Component/CvTextInput',
@@ -92,17 +93,13 @@ export default {
92
93
  category: 'props',
93
94
  },
94
95
  },
96
+ size: {
97
+ type: 'select',
98
+ options: Array.from(sizeTypes),
99
+ },
95
100
  type: {
96
- type: 'string',
97
- table: {
98
- type: { summary: 'string' },
99
- category: 'props',
100
- defaultValue: { summary: 'text' },
101
- },
102
- options: ['text', 'password'],
103
- control: {
104
- type: 'select',
105
- },
101
+ type: 'select',
102
+ options: Array.from(inputTypes),
106
103
  },
107
104
  warnText: {
108
105
  type: 'string',
@@ -44,6 +44,10 @@
44
44
  [`${carbonPrefix}--text-input--light`]: isLight,
45
45
  [`${carbonPrefix}--text-input--warning`]: isWarn,
46
46
  [`${carbonPrefix}--password-input`]: isPassword,
47
+ [`${carbonPrefix}--text-input--sm`]: size === 'sm',
48
+ [`${carbonPrefix}--text-input--md`]: size === 'md',
49
+ [`${carbonPrefix}--text-input--lg`]: size === 'lg',
50
+ [`${carbonPrefix}--text-input--xl`]: size === 'xl',
47
51
  },
48
52
  ]"
49
53
  v-bind="$attrs"
@@ -115,7 +119,7 @@ import {
115
119
  import { carbonPrefix } from '../../global/settings';
116
120
  import { useCvId, props as propsCvId } from '../../use/cvId';
117
121
  import { useIsLight, props as propsTheme } from '../../use/cvTheme';
118
- import { inputTypes } from './const';
122
+ import { inputTypes, sizeTypes } from './const';
119
123
 
120
124
  const props = defineProps({
121
125
  /**
@@ -150,6 +154,16 @@ const props = defineProps({
150
154
  * Toggle password visibility
151
155
  */
152
156
  passwordVisible: { type: Boolean, default: undefined },
157
+ /** Specify the size of the Text Input. Currently, supports the following:
158
+ `sm`,
159
+ `md`,
160
+ `lg`,
161
+ `xl` */
162
+ size: {
163
+ type: String,
164
+ default: undefined,
165
+ validator: value => sizeTypes.has(value),
166
+ },
153
167
  /**
154
168
  * Input type, only `text` and `password` are available
155
169
  */
@@ -1,2 +1,3 @@
1
1
  // Currently available types for CvTextInput
2
2
  export const inputTypes = new Set(['password', 'text']);
3
+ export const sizeTypes = new Set(['sm', 'md', 'lg', 'xl']);
@@ -45,7 +45,7 @@ exports[`CvDefinitionTooltip should render definition tooltip: minimal as expect
45
45
  exports[`CvInteractiveTooltip should render interactive tooltip with direction and visible set as expected 1`] = `
46
46
  <div class="cv-interactive-tooltip">
47
47
  <div id="test-1-label" class="bx--tooltip__label"><button aria-expanded="false" aria-labelledby="test-1-label" class="bx--tooltip__trigger" aria-controls="test-1" aria-haspopup="true" type="button">
48
- <anonymous-stub></anonymous-stub>
48
+ <information16-stub></information16-stub>
49
49
  </button></div>
50
50
  </div>
51
51
  `;
@@ -87,7 +87,7 @@ exports[`CvInteractiveTooltip should render interactive tooltip with direction a
87
87
  exports[`CvInteractiveTooltip should render interactive tooltip with direction set to \`bottom\` as expected 1`] = `
88
88
  <div class="cv-interactive-tooltip">
89
89
  <div id="test-1-label" class="bx--tooltip__label"><button aria-expanded="false" aria-labelledby="test-1-label" class="bx--tooltip__trigger" aria-controls="test-1" aria-haspopup="true" type="button">
90
- <anonymous-stub></anonymous-stub>
90
+ <information16-stub></information16-stub>
91
91
  </button></div>
92
92
  </div>
93
93
  `;
@@ -129,7 +129,7 @@ exports[`CvInteractiveTooltip should render interactive tooltip with direction s
129
129
  exports[`CvInteractiveTooltip should render interactive tooltip with direction set to \`left\` as expected 1`] = `
130
130
  <div class="cv-interactive-tooltip">
131
131
  <div id="test-1-label" class="bx--tooltip__label"><button aria-expanded="false" aria-labelledby="test-1-label" class="bx--tooltip__trigger" aria-controls="test-1" aria-haspopup="true" type="button">
132
- <anonymous-stub></anonymous-stub>
132
+ <information16-stub></information16-stub>
133
133
  </button></div>
134
134
  </div>
135
135
  `;
@@ -171,7 +171,7 @@ exports[`CvInteractiveTooltip should render interactive tooltip with direction s
171
171
  exports[`CvInteractiveTooltip should render interactive tooltip with direction set to \`right\` as expected 1`] = `
172
172
  <div class="cv-interactive-tooltip">
173
173
  <div id="test-1-label" class="bx--tooltip__label"><button aria-expanded="false" aria-labelledby="test-1-label" class="bx--tooltip__trigger" aria-controls="test-1" aria-haspopup="true" type="button">
174
- <anonymous-stub></anonymous-stub>
174
+ <information16-stub></information16-stub>
175
175
  </button></div>
176
176
  </div>
177
177
  `;
@@ -213,7 +213,7 @@ exports[`CvInteractiveTooltip should render interactive tooltip with direction s
213
213
  exports[`CvInteractiveTooltip should render interactive tooltip with direction set to \`top\` as expected 1`] = `
214
214
  <div class="cv-interactive-tooltip">
215
215
  <div id="test-1-label" class="bx--tooltip__label"><button aria-expanded="false" aria-labelledby="test-1-label" class="bx--tooltip__trigger" aria-controls="test-1" aria-haspopup="true" type="button">
216
- <anonymous-stub></anonymous-stub>
216
+ <information16-stub></information16-stub>
217
217
  </button></div>
218
218
  </div>
219
219
  `;
@@ -255,7 +255,7 @@ exports[`CvInteractiveTooltip should render interactive tooltip with direction s
255
255
  exports[`CvInteractiveTooltip should render interactive tooltip with slot \`content\` as expected 1`] = `
256
256
  <div class="cv-interactive-tooltip">
257
257
  <div id="test-1-label" class="bx--tooltip__label"><button aria-expanded="false" aria-labelledby="test-1-label" class="bx--tooltip__trigger" aria-controls="test-1" aria-haspopup="true" type="button">
258
- <anonymous-stub></anonymous-stub>
258
+ <information16-stub></information16-stub>
259
259
  </button></div>
260
260
  </div>
261
261
  `;
@@ -304,7 +304,7 @@ exports[`CvInteractiveTooltip should render interactive tooltip with slot \`labe
304
304
  <div class="cv-interactive-tooltip">
305
305
  <div id="test-1-label" class="bx--tooltip__label">
306
306
  <div>Interactive tooptip label</div><button aria-expanded="false" aria-labelledby="test-1-label" class="bx--tooltip__trigger" aria-controls="test-1" aria-haspopup="true" type="button">
307
- <anonymous-stub></anonymous-stub>
307
+ <information16-stub></information16-stub>
308
308
  </button>
309
309
  </div>
310
310
  </div>
@@ -389,7 +389,7 @@ exports[`CvInteractiveTooltip should render interactive tooltip with slot \`trig
389
389
  exports[`CvInteractiveTooltip should render interactive tooltip with visible set to \`true\` as expected 1`] = `
390
390
  <div class="cv-interactive-tooltip">
391
391
  <div id="test-1-label" class="bx--tooltip__label"><button aria-expanded="false" aria-labelledby="test-1-label" class="bx--tooltip__trigger" aria-controls="test-1" aria-haspopup="true" type="button">
392
- <anonymous-stub></anonymous-stub>
392
+ <information16-stub></information16-stub>
393
393
  </button></div>
394
394
  </div>
395
395
  `;
@@ -431,7 +431,7 @@ exports[`CvInteractiveTooltip should render interactive tooltip with visible set
431
431
  exports[`CvInteractiveTooltip should render interactive tooltip: minimal as expected 1`] = `
432
432
  <div class="cv-interactive-tooltip">
433
433
  <div id="test-1-label" class="bx--tooltip__label"><button aria-expanded="false" aria-labelledby="test-1-label" class="bx--tooltip__trigger" aria-controls="test-1" aria-haspopup="true" type="button">
434
- <anonymous-stub></anonymous-stub>
434
+ <information16-stub></information16-stub>
435
435
  </button></div>
436
436
  </div>
437
437
  `;
@@ -472,54 +472,54 @@ exports[`CvInteractiveTooltip should render interactive tooltip: minimal as expe
472
472
 
473
473
  exports[`CvToopltip should render tooltip with aligment and direction set as expected 1`] = `
474
474
  <button class="cv-tooltip bx--tooltip__trigger bx--tooltip--a11y bx--tooltip--right bx--tooltip--align-end" type="button"><span class="bx--assistive-text">this is a tip</span>
475
- <anonymous-stub></anonymous-stub>
475
+ <information16-stub></information16-stub>
476
476
  </button>
477
477
  `;
478
478
 
479
479
  exports[`CvToopltip should render tooltip with aligment set to \`center\` as expected 1`] = `
480
480
  <button class="cv-tooltip bx--tooltip__trigger bx--tooltip--a11y bx--tooltip--top bx--tooltip--align-center" type="button"><span class="bx--assistive-text">this is a tip</span>
481
- <anonymous-stub></anonymous-stub>
481
+ <information16-stub></information16-stub>
482
482
  </button>
483
483
  `;
484
484
 
485
485
  exports[`CvToopltip should render tooltip with aligment set to \`end\` as expected 1`] = `
486
486
  <button class="cv-tooltip bx--tooltip__trigger bx--tooltip--a11y bx--tooltip--top bx--tooltip--align-end" type="button"><span class="bx--assistive-text">this is a tip</span>
487
- <anonymous-stub></anonymous-stub>
487
+ <information16-stub></information16-stub>
488
488
  </button>
489
489
  `;
490
490
 
491
491
  exports[`CvToopltip should render tooltip with aligment set to \`start\` as expected 1`] = `
492
492
  <button class="cv-tooltip bx--tooltip__trigger bx--tooltip--a11y bx--tooltip--top bx--tooltip--align-start" type="button"><span class="bx--assistive-text">this is a tip</span>
493
- <anonymous-stub></anonymous-stub>
493
+ <information16-stub></information16-stub>
494
494
  </button>
495
495
  `;
496
496
 
497
497
  exports[`CvToopltip should render tooltip with direction set to \`bottom\` as expected 1`] = `
498
498
  <button class="cv-tooltip bx--tooltip__trigger bx--tooltip--a11y bx--tooltip--bottom bx--tooltip--align-center" type="button"><span class="bx--assistive-text">this is a tip</span>
499
- <anonymous-stub></anonymous-stub>
499
+ <information16-stub></information16-stub>
500
500
  </button>
501
501
  `;
502
502
 
503
503
  exports[`CvToopltip should render tooltip with direction set to \`left\` as expected 1`] = `
504
504
  <button class="cv-tooltip bx--tooltip__trigger bx--tooltip--a11y bx--tooltip--left bx--tooltip--align-center" type="button"><span class="bx--assistive-text">this is a tip</span>
505
- <anonymous-stub></anonymous-stub>
505
+ <information16-stub></information16-stub>
506
506
  </button>
507
507
  `;
508
508
 
509
509
  exports[`CvToopltip should render tooltip with direction set to \`right\` as expected 1`] = `
510
510
  <button class="cv-tooltip bx--tooltip__trigger bx--tooltip--a11y bx--tooltip--right bx--tooltip--align-center" type="button"><span class="bx--assistive-text">this is a tip</span>
511
- <anonymous-stub></anonymous-stub>
511
+ <information16-stub></information16-stub>
512
512
  </button>
513
513
  `;
514
514
 
515
515
  exports[`CvToopltip should render tooltip with direction set to \`top\` as expected 1`] = `
516
516
  <button class="cv-tooltip bx--tooltip__trigger bx--tooltip--a11y bx--tooltip--top bx--tooltip--align-center" type="button"><span class="bx--assistive-text">this is a tip</span>
517
- <anonymous-stub></anonymous-stub>
517
+ <information16-stub></information16-stub>
518
518
  </button>
519
519
  `;
520
520
 
521
521
  exports[`CvToopltip should render tooltip: minimal as expected 1`] = `
522
522
  <button class="cv-tooltip bx--tooltip__trigger bx--tooltip--a11y bx--tooltip--top bx--tooltip--align-center" type="button"><span class="bx--assistive-text">this is a tip</span>
523
- <anonymous-stub></anonymous-stub>
523
+ <information16-stub></information16-stub>
524
524
  </button>
525
525
  `;
@@ -0,0 +1,22 @@
1
+ import { storyParametersObject } from '../../global/storybook-utils';
2
+ import CvContent from './CvContent.vue';
3
+
4
+ export default {
5
+ title: 'Component/ui-select/CvContent',
6
+ component: CvContent,
7
+ argTypes: {},
8
+ };
9
+
10
+ const template = `<cv-content>Hello main</cv-content>`;
11
+ const Template = () => {
12
+ return {
13
+ template,
14
+ };
15
+ };
16
+
17
+ export const Default = Template.bind({});
18
+ Default.parameters = storyParametersObject(
19
+ Default.parameters,
20
+ template,
21
+ Default.args
22
+ );
@@ -0,0 +1,14 @@
1
+ <script setup>
2
+ import { carbonPrefix } from '../../global/settings';
3
+ defineProps({
4
+ tagType: { type: String, default: 'main' },
5
+ });
6
+ </script>
7
+
8
+ <template>
9
+ <component :is="tagType" :class="`${carbonPrefix}--content`">
10
+ <slot />
11
+ </component>
12
+ </template>
13
+
14
+ <style scoped lang="scss"></style>
package/src/index.js CHANGED
@@ -138,6 +138,7 @@ export { default as CvToggle } from './components/CvToggle/CvToggle.vue';
138
138
  export { default as CvDefinitionTooltip } from './components/CvTooltip/CvDefinitionTooltip.vue';
139
139
  export { default as CvInteractiveTooltip } from './components/CvTooltip/CvInteractiveTooltip.vue';
140
140
  export { default as CvTooltip } from './components/CvTooltip/CvTooltip.vue';
141
+ export { default as CvContent } from './components/CvUIShell/CvContent.vue';
141
142
  export { default as CvHeader } from './components/CvUIShell/CvHeader.vue';
142
143
  export { default as CvHeaderGlobalAction } from './components/CvUIShell/CvHeaderGlobalAction.vue';
143
144
  export { default as CvHeaderMenu } from './components/CvUIShell/CvHeaderMenu.vue';
package/telemetry.yml CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  version: 1
4
4
  projectId: 084968c7-d247-4ddb-bc07-cbdbe57fdd43
5
- endpoint: https://collector-prod.1am6wm210aow.us-south.codeengine.appdomain.cloud/v1/metrics
5
+ endpoint: https://www-api.ibm.com/ibm-telemetry/v1/telemetry
6
6
  collect:
7
7
  npm:
8
8
  dependencies: null