@carbon/vue 3.0.7-alpha.0 → 3.0.9-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.
Files changed (91) hide show
  1. package/README.md +7 -0
  2. package/dist/carbon-vue-3.common.js +3850 -217
  3. package/dist/carbon-vue-3.common.js.map +1 -1
  4. package/dist/carbon-vue-3.umd.js +3850 -217
  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 +7 -4
  9. package/src/components/CvCheckbox/CvCheckbox.stories.js +18 -7
  10. package/src/components/CvCheckbox/CvCheckbox.vue +19 -3
  11. package/src/components/CvCheckbox/CvCheckboxSkeleton.vue +16 -0
  12. package/src/components/CvCheckbox/__tests__/__snapshots__/CvCheckboxSkeleton.spec.js.snap +3 -0
  13. package/src/components/CvCheckbox/index.js +2 -1
  14. package/src/components/CvDropdown/CvDropdown.vue +0 -2
  15. package/src/components/CvFileUploader/CvFileUploader.stories.mdx +333 -0
  16. package/src/components/CvFileUploader/CvFileUploader.vue +286 -0
  17. package/src/components/CvFileUploader/CvFileUploaderItem.vue +92 -0
  18. package/src/components/CvFileUploader/CvFileUploaderSkeleton.vue +16 -0
  19. package/src/components/CvFileUploader/const.js +10 -0
  20. package/src/components/CvFileUploader/index.js +5 -0
  21. package/src/components/CvMultiSelect/CvMultiSelect.stories.mdx +1 -1
  22. package/src/components/CvNotification/CvToastNotification.stories.js +71 -1
  23. package/src/components/CvNotification/CvToastNotification.vue +6 -4
  24. package/src/components/CvOverflowMenu/CvOverflowMenu.stories.mdx +68 -12
  25. package/src/components/CvOverflowMenu/CvOverflowMenu.vue +39 -45
  26. package/src/components/CvOverflowMenu/CvOverflowMenuItem.vue +6 -11
  27. package/src/components/CvOverflowMenu/index.js +2 -1
  28. package/src/components/CvProgress/CvProgress.stories.mdx +202 -0
  29. package/src/components/CvProgress/CvProgress.vue +78 -0
  30. package/src/components/CvProgress/CvProgressStep.vue +124 -0
  31. package/src/components/CvProgress/index.js +4 -0
  32. package/src/components/CvRadioButton/CvRadioButton.stories.js +166 -0
  33. package/src/components/CvRadioButton/CvRadioButton.vue +57 -0
  34. package/src/components/CvRadioButton/CvRadioGroup.vue +27 -0
  35. package/src/components/CvRadioButton/__tests__/__snapshots__/CvRadioButton.spec.js.snap +27 -0
  36. package/src/components/CvRadioButton/index.js +6 -0
  37. package/src/components/CvSearch/CvSearch.stories.mdx +168 -0
  38. package/src/components/CvSearch/CvSearch.vue +250 -0
  39. package/src/components/CvSearch/index.js +3 -0
  40. package/src/components/CvSelect/CvSelect.vue +27 -6
  41. package/src/components/CvSlider/CvSlider.stories.js +166 -0
  42. package/src/components/CvSlider/CvSlider.vue +324 -0
  43. package/src/components/CvSlider/CvSliderSkeleton.stories.js +26 -0
  44. package/src/components/CvSlider/CvSliderSkeleton.vue +18 -0
  45. package/src/components/CvSlider/__tests__/__snapshots__/CvSlider.spec.js.snap +13 -0
  46. package/src/components/CvSlider/__tests__/__snapshots__/CvSliderSkeleton.spec.js.snap +13 -0
  47. package/src/components/CvSlider/index.js +5 -0
  48. package/src/components/CvSlider/sbSliderPrefix.js +2 -0
  49. package/src/components/CvStructuredList/CvStructuredList.stories.js +141 -0
  50. package/src/components/CvStructuredList/CvStructuredList.vue +44 -0
  51. package/src/components/CvStructuredList/CvStructuredListData.vue +19 -0
  52. package/src/components/CvStructuredList/CvStructuredListHeading.vue +11 -0
  53. package/src/components/CvStructuredList/CvStructuredListItem.vue +47 -0
  54. package/src/components/CvStructuredList/CvStructuredListItemSelectable.vue +56 -0
  55. package/src/components/CvStructuredList/CvStructuredListItemStandard.vue +11 -0
  56. package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredList.spec.js.snap +73 -0
  57. package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredListData.spec.js.snap +5 -0
  58. package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredListHeading.spec.js.snap +9 -0
  59. package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredListItem.spec.js.snap +7 -0
  60. package/src/components/CvStructuredList/index.js +12 -0
  61. package/src/components/CvTextArea/CvTextArea.stories.js +2 -2
  62. package/src/components/CvTextArea/CvTextAreaSkeleton.stories.js +29 -0
  63. package/src/components/CvTextArea/CvTextAreaSkeleton.vue +10 -0
  64. package/src/components/CvTextArea/StorybookGroupConst.js +1 -0
  65. package/src/components/CvTextArea/__tests__/__snapshots__/CvTextAreaSkeleton.spec.js.snap +7 -0
  66. package/src/components/CvTextArea/index.js +2 -1
  67. package/src/components/CvTimePicker/CvTimePicker.stories.mdx +325 -0
  68. package/src/components/CvTimePicker/CvTimePicker.vue +217 -0
  69. package/src/components/CvTimePicker/index.js +21 -0
  70. package/src/components/CvToggle/CvToggle-Skeleton.vue +27 -12
  71. package/src/components/CvToggle/CvToggle.stories.js +20 -3
  72. package/src/components/CvToggle/CvToggle.vue +22 -5
  73. package/src/components/CvToggle/__tests__/__snapshots__/CvToggle.spec.js.snap +3 -3
  74. package/src/components/CvTooltip/CvDefinitionTooltip.stories.js +80 -0
  75. package/src/components/CvTooltip/CvDefinitionTooltip.vue +61 -0
  76. package/src/components/CvTooltip/CvInteractiveTooltip.stories.js +90 -0
  77. package/src/components/CvTooltip/CvInteractiveTooltip.vue +267 -0
  78. package/src/components/CvTooltip/CvTooltip.stories.js +128 -0
  79. package/src/components/CvTooltip/CvTooltip.vue +44 -0
  80. package/src/components/CvTooltip/__tests__/__snapshots__/CvTooltip.spec.js.snap +525 -0
  81. package/src/components/CvTooltip/consts.js +15 -0
  82. package/src/components/CvTooltip/index.js +6 -0
  83. package/src/components/CvTooltip/sbTooltipPrefix.js +2 -0
  84. package/src/components/CvUIShell/CvSideNav.vue +10 -1
  85. package/src/components/CvUIShell/CvUIShell.stories.mdx +116 -50
  86. package/src/index.d.ts +6 -0
  87. package/src/index.js +11 -0
  88. package/src/use/cvCheck.js +3 -0
  89. package/src/use/index.js +2 -0
  90. package/src/use/useMethods.js +18 -0
  91. package/src/use/useRadio.js +24 -0
@@ -0,0 +1,141 @@
1
+ import { action } from '@storybook/addon-actions';
2
+ import { ref } from 'vue';
3
+ import {
4
+ sbCompPrefix,
5
+ storyParametersObject,
6
+ } from '../../global/storybook-utils';
7
+ import {
8
+ CvStructuredList,
9
+ CvStructuredListHeading,
10
+ CvStructuredListData,
11
+ CvStructuredListItem,
12
+ } from '.';
13
+
14
+ export default {
15
+ title: `${sbCompPrefix}/CvStructuredList`,
16
+ component: CvStructuredList,
17
+ argTypes: {
18
+ selectable: {
19
+ type: 'boolean',
20
+ table: {
21
+ type: { summary: 'boolean' },
22
+ category: 'props',
23
+ },
24
+ description:
25
+ 'Makes list items selectable (prop on cv-structured-list component)',
26
+ },
27
+ condensed: {
28
+ type: 'boolean',
29
+ table: {
30
+ type: { summary: 'boolean' },
31
+ category: 'props',
32
+ },
33
+ description:
34
+ 'Condense spacing of the structured list (prop on cv-structured-list component)',
35
+ },
36
+ noWrap: {
37
+ type: 'boolean',
38
+ table: {
39
+ type: { summary: 'boolean' },
40
+ category: 'props',
41
+ },
42
+ description:
43
+ 'Prevent text wrapping in list data (prop on cv-structured-list-data component)',
44
+ },
45
+ },
46
+ };
47
+
48
+ const DefaultListItems = [
49
+ {
50
+ id: 'item-1',
51
+ data: [
52
+ 'Item_1',
53
+ 'Item_1',
54
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dui magna, finibus id tortor sed, aliquet bibendum augue. Aenean posuere sem vel euismod dignissim. Nulla ut cursus dolor. Pellentesque vulputate nisl a porttitor interdum.',
55
+ ],
56
+ },
57
+ {
58
+ id: 'item-2',
59
+ data: [
60
+ 'Item_2',
61
+ 'Item_2',
62
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dui magna, finibus id tortor sed, aliquet bibendum augue. Aenean posuere sem vel euismod dignissim. Nulla ut cursus dolor. Pellentesque vulputate nisl a porttitor interdum.',
63
+ ],
64
+ },
65
+ ];
66
+
67
+ const template = `
68
+ <div>
69
+ <cv-structured-list v-bind="args">
70
+ <template v-slot:headings>
71
+ <cv-structured-list-heading>
72
+ Heading 1
73
+ </cv-structured-list-heading>
74
+ <cv-structured-list-heading>
75
+ Heading 2
76
+ </cv-structured-list-heading>
77
+ <cv-structured-list-heading>
78
+ Heading 3
79
+ </cv-structured-list-heading>
80
+ </template>
81
+
82
+ <template v-slot:items>
83
+ <cv-structured-list-item v-for="({id, data}, index) in DefaultListItems" :key="index" name="group-1" :value="id" v-model="listValue" @change="onChange">
84
+ <cv-structured-list-data v-for="(itemData, dataIndex) in data" :key="dataIndex" :no-wrap="args.noWrap">{{ itemData }}</cv-structured-list-data>
85
+ </cv-structured-list-item>
86
+ </template>
87
+ </cv-structured-list>
88
+
89
+ <div style="margin-top:1rem; background-color: #888888; padding:1rem" v-if="args.withVModel">
90
+ <div style="font-size: 150%">Sample interaction</div>
91
+ <template
92
+ v-for="({id}, vmodelIndex) in DefaultListItems"
93
+ :key="vmodelIndex"
94
+ >
95
+ <input name="listValue" :id="id" type="radio" @change="(ev) => {listValue = ev.target.id}" :checked="id === listValue" />
96
+ <label :for="id" style="margin-right: 16px;">{{id}}:</label>
97
+ </template>
98
+
99
+ <div style="margin-top: 16px;">Checked: <span style="font-weight: bold;">{{ listValue }}</span></div>
100
+ </div>
101
+ </div>
102
+ `;
103
+
104
+ const Template = args => {
105
+ return {
106
+ components: {
107
+ CvStructuredList,
108
+ CvStructuredListHeading,
109
+ CvStructuredListData,
110
+ CvStructuredListItem,
111
+ },
112
+ setup: () => ({
113
+ args,
114
+ listValue: ref(DefaultListItems[0].id),
115
+ DefaultListItems,
116
+ onChange: action('change'),
117
+ }),
118
+ template,
119
+ };
120
+ };
121
+
122
+ export const Default = Template.bind({});
123
+ Default.args = {
124
+ withVModel: false,
125
+ };
126
+ Default.parameters = storyParametersObject(
127
+ Default.parameters,
128
+ template,
129
+ Default.args
130
+ );
131
+
132
+ export const VModel = Template.bind({});
133
+ VModel.args = {
134
+ selectable: true,
135
+ withVModel: true,
136
+ };
137
+ VModel.parameters = storyParametersObject(
138
+ VModel.parameters,
139
+ template,
140
+ VModel.args
141
+ );
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <div
3
+ :class="[
4
+ `${carbonPrefix}--structured-list`,
5
+ {
6
+ [`${carbonPrefix}--structured-list--selection`]: selectable,
7
+ [`${carbonPrefix}--structured-list--condensed`]: condensed,
8
+ },
9
+ ]"
10
+ :data-structured-list="selectable"
11
+ >
12
+ <div :class="`${carbonPrefix}--structured-list-thead`">
13
+ <div
14
+ :class="`${carbonPrefix}--structured-list-row ${carbonPrefix}--structured-list-row--header-row`"
15
+ >
16
+ <slot name="headings"></slot>
17
+ <div
18
+ v-if="selectable"
19
+ :class="`${carbonPrefix}--structured-list-th`"
20
+ ></div>
21
+ </div>
22
+ </div>
23
+ <div :class="`${carbonPrefix}--structured-list-tbody`">
24
+ <slot name="items"></slot>
25
+ </div>
26
+ </div>
27
+ </template>
28
+
29
+ <script setup>
30
+ import { defineEmits, provide } from 'vue';
31
+ import { carbonPrefix } from '../../global/settings';
32
+
33
+ const props = defineProps({
34
+ selectable: Boolean,
35
+ condensed: Boolean,
36
+ });
37
+
38
+ const emit = defineEmits(['change']);
39
+
40
+ provide('change', val => {
41
+ emit('change', val);
42
+ });
43
+ provide('selectable', props.selectable);
44
+ </script>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <div
3
+ :class="[
4
+ `cv-structured-list-data ${carbonPrefix}--structured-list-td`,
5
+ {
6
+ [`${carbonPrefix}--structured-list-content--nowrap`]: noWrap,
7
+ },
8
+ ]"
9
+ >
10
+ <slot></slot>
11
+ </div>
12
+ </template>
13
+
14
+ <script setup>
15
+ import { carbonPrefix } from '../../global/settings';
16
+ defineProps({
17
+ noWrap: Boolean,
18
+ });
19
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div
3
+ :class="`cv-structured-list-heading ${carbonPrefix}--structured-list-th`"
4
+ >
5
+ <slot></slot>
6
+ </div>
7
+ </template>
8
+
9
+ <script setup>
10
+ import { carbonPrefix } from '../../global/settings';
11
+ </script>
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <component
3
+ :is="tagType"
4
+ v-bind="$attrs"
5
+ class="cv-structured-list-item"
6
+ :value="value"
7
+ :modelValue="modelValue"
8
+ >
9
+ <slot></slot>
10
+ </component>
11
+ </template>
12
+
13
+ <script setup>
14
+ import { computed, inject, provide } from 'vue';
15
+ import CvStructuredListItemStandard from './CvStructuredListItemStandard.vue';
16
+ import CvStructuredListItemSelectable from './CvStructuredListItemSelectable.vue';
17
+
18
+ defineOptions({
19
+ inheritAttrs: false,
20
+ });
21
+
22
+ defineProps({
23
+ modelValue: {
24
+ type: String,
25
+ default: undefined,
26
+ },
27
+ value: {
28
+ type: String,
29
+ default: undefined,
30
+ },
31
+ });
32
+
33
+ const selectable = inject('selectable');
34
+ const change = inject('change');
35
+ const emit = defineEmits(['change']);
36
+
37
+ provide('onRadioItemChange', clickedItemCvId => {
38
+ emit('change', clickedItemCvId);
39
+ change(clickedItemCvId); //emit to parent
40
+ });
41
+
42
+ const tagType = computed(() => {
43
+ return selectable
44
+ ? CvStructuredListItemSelectable
45
+ : CvStructuredListItemStandard;
46
+ });
47
+ </script>
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <label
3
+ :for="cvId"
4
+ :aria-label="label"
5
+ :class="[
6
+ `cv-structured-list-item--selectable ${carbonPrefix}--structured-list-row`,
7
+ { ' ${carbonPrefix}--structured-list-row--selected': isChecked },
8
+ ]"
9
+ tabindex="0"
10
+ >
11
+ <slot></slot>
12
+ <input
13
+ v-bind="$attrs"
14
+ tabindex="-1"
15
+ :id="cvId"
16
+ :class="`${carbonPrefix}--structured-list-input`"
17
+ :checked="isChecked"
18
+ :value="value"
19
+ type="radio"
20
+ @change="onChange"
21
+ />
22
+ <div :class="`${carbonPrefix}--structured-list-td`">
23
+ <CheckmarkFilled16 :class="`${carbonPrefix}--structured-list-svg`" />
24
+ </div>
25
+ </label>
26
+ </template>
27
+
28
+ <script setup>
29
+ import { carbonPrefix } from '../../global/settings';
30
+ import { useCvId, propsCvId, useRadio } from '../../use';
31
+ import CheckmarkFilled16 from '@carbon/icons-vue/es/checkmark--filled/16';
32
+
33
+ defineOptions({
34
+ inheritAttrs: false,
35
+ });
36
+
37
+ const props = defineProps({
38
+ label: {
39
+ type: String,
40
+ default: undefined,
41
+ },
42
+ modelValue: {
43
+ type: String,
44
+ default: undefined,
45
+ },
46
+ value: {
47
+ type: String,
48
+ default: undefined,
49
+ },
50
+ ...propsCvId,
51
+ });
52
+
53
+ const cvId = useCvId(props);
54
+ const emit = defineEmits(['update:modelValue', 'change']);
55
+ const { isChecked, onChange } = useRadio(props, emit);
56
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div
3
+ :class="`cv-structured-list-item--standard ${carbonPrefix}--structured-list-row`"
4
+ >
5
+ <slot></slot>
6
+ </div>
7
+ </template>
8
+
9
+ <script setup>
10
+ import { carbonPrefix } from '../../global/settings';
11
+ </script>
@@ -0,0 +1,73 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`CvStructuredList should render \`headings\` slot correctly 1`] = `
4
+ <div class="bx--structured-list bx--structured-list--selection bx--structured-list--condensed" data-structured-list="true" defaultid="test-1">
5
+ <div class="bx--structured-list-thead">
6
+ <div class="bx--structured-list-row bx--structured-list-row--header-row">
7
+ <div class="headings-slot-test">Headings slot test</div>
8
+ <div class="bx--structured-list-th"></div>
9
+ </div>
10
+ </div>
11
+ <div class="bx--structured-list-tbody"></div>
12
+ </div>
13
+ `;
14
+
15
+ exports[`CvStructuredList should render \`items\` slot correctly 1`] = `
16
+ <div class="bx--structured-list bx--structured-list--selection bx--structured-list--condensed" data-structured-list="true" defaultid="test-1">
17
+ <div class="bx--structured-list-thead">
18
+ <div class="bx--structured-list-row bx--structured-list-row--header-row">
19
+ <div class="bx--structured-list-th"></div>
20
+ </div>
21
+ </div>
22
+ <div class="bx--structured-list-tbody">
23
+ <ul class="items-slot-test">
24
+ <li>Test 1.1</li>
25
+ <li>Test 1.2</li>
26
+ </ul>
27
+ </div>
28
+ </div>
29
+ `;
30
+
31
+ exports[`CvStructuredList should render correctly when condensed 1`] = `
32
+ <div class="bx--structured-list bx--structured-list--condensed" data-structured-list="false" defaultid="test-1">
33
+ <div class="bx--structured-list-thead">
34
+ <div class="bx--structured-list-row bx--structured-list-row--header-row">
35
+ <!--v-if-->
36
+ </div>
37
+ </div>
38
+ <div class="bx--structured-list-tbody"></div>
39
+ </div>
40
+ `;
41
+
42
+ exports[`CvStructuredList should render correctly when not selectable and not condensed 1`] = `
43
+ <div class="bx--structured-list" data-structured-list="false" defaultid="test-1">
44
+ <div class="bx--structured-list-thead">
45
+ <div class="bx--structured-list-row bx--structured-list-row--header-row">
46
+ <!--v-if-->
47
+ </div>
48
+ </div>
49
+ <div class="bx--structured-list-tbody"></div>
50
+ </div>
51
+ `;
52
+
53
+ exports[`CvStructuredList should render correctly when selectable 1`] = `
54
+ <div class="bx--structured-list bx--structured-list--selection" data-structured-list="true" defaultid="test-1">
55
+ <div class="bx--structured-list-thead">
56
+ <div class="bx--structured-list-row bx--structured-list-row--header-row">
57
+ <div class="bx--structured-list-th"></div>
58
+ </div>
59
+ </div>
60
+ <div class="bx--structured-list-tbody"></div>
61
+ </div>
62
+ `;
63
+
64
+ exports[`CvStructuredList should render correctly when selectable and condensed 1`] = `
65
+ <div class="bx--structured-list bx--structured-list--selection bx--structured-list--condensed" data-structured-list="true" defaultid="test-1">
66
+ <div class="bx--structured-list-thead">
67
+ <div class="bx--structured-list-row bx--structured-list-row--header-row">
68
+ <div class="bx--structured-list-th"></div>
69
+ </div>
70
+ </div>
71
+ <div class="bx--structured-list-tbody"></div>
72
+ </div>
73
+ `;
@@ -0,0 +1,5 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`CvStructuredListData should render correctly when not wrapping text 1`] = `<div class="cv-structured-list-data bx--structured-list-td bx--structured-list-content--nowrap" id="test-3"></div>`;
4
+
5
+ exports[`CvStructuredListData should render correctly when wrapping text 1`] = `<div class="cv-structured-list-data bx--structured-list-td" id="test-3"></div>`;
@@ -0,0 +1,9 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`CvStructuredListHeading should render correctly 1`] = `<div class="cv-structured-list-heading bx--structured-list-th"></div>`;
4
+
5
+ exports[`CvStructuredListHeading should render with slot correctly 1`] = `
6
+ <div class="cv-structured-list-heading bx--structured-list-th">
7
+ <div class="headings-slot-default-test">Headings slot default test</div>
8
+ </div>
9
+ `;
@@ -0,0 +1,7 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`CvStructuredListItem should render correctly when \`value\` is default 1`] = `<cv-structured-list-item-standard-stub id="test-2" class="cv-structured-list-item" modelvalue="test"></cv-structured-list-item-standard-stub>`;
4
+
5
+ exports[`CvStructuredListItem should render correctly when \`value\` is set 1`] = `<cv-structured-list-item-standard-stub id="test-2" class="cv-structured-list-item" modelvalue="test" value="strictured list item value test"></cv-structured-list-item-standard-stub>`;
6
+
7
+ exports[`CvStructuredListItem should render correctly when slot is specified 1`] = `<cv-structured-list-item-standard-stub id="test-2" class="cv-structured-list-item" modelvalue="test"></cv-structured-list-item-standard-stub>`;
@@ -0,0 +1,12 @@
1
+ import CvStructuredListData from './CvStructuredListData.vue';
2
+ import CvStructuredListHeading from './CvStructuredListHeading.vue';
3
+ import CvStructuredListItem from './CvStructuredListItem.vue';
4
+ import CvStructuredList from './CvStructuredList.vue';
5
+ export {
6
+ CvStructuredList,
7
+ CvStructuredListItem,
8
+ CvStructuredListHeading,
9
+ CvStructuredListData,
10
+ };
11
+
12
+ export default CvStructuredList;
@@ -2,12 +2,12 @@ import {
2
2
  sbCompPrefix,
3
3
  storyParametersObject,
4
4
  } from '../../global/storybook-utils';
5
-
5
+ import { StorybookGroupConst } from './StorybookGroupConst';
6
6
  import CvTextArea from '.';
7
7
  import { ref } from 'vue';
8
8
 
9
9
  export default {
10
- title: `${sbCompPrefix}/CvTextArea`,
10
+ title: `${sbCompPrefix}/${StorybookGroupConst}/CvTextArea`,
11
11
  component: CvTextArea,
12
12
  argTypes: {
13
13
  // attrs
@@ -0,0 +1,29 @@
1
+ import {
2
+ sbCompPrefix,
3
+ storyParametersObject,
4
+ } from '../../global/storybook-utils';
5
+ import { StorybookGroupConst } from './StorybookGroupConst';
6
+ import { CvTextAreaSkeleton } from './';
7
+
8
+ export default {
9
+ title: `${sbCompPrefix}/${StorybookGroupConst}/CvTextAreaSkeleton`,
10
+ component: CvTextAreaSkeleton,
11
+ };
12
+
13
+ const template = `<cv-text-area-skeleton></cv-text-area-skeleton>`;
14
+ const Template = args => {
15
+ return {
16
+ components: { CvTextAreaSkeleton },
17
+ template,
18
+ setup() {
19
+ return { args };
20
+ },
21
+ };
22
+ };
23
+
24
+ export const Default = Template.bind({});
25
+ Default.parameters = storyParametersObject(
26
+ Default.parameters,
27
+ template,
28
+ Default.args
29
+ );
@@ -0,0 +1,10 @@
1
+ <template>
2
+ <div :class="`${carbonPrefix}--form-item`">
3
+ <label :class="`${carbonPrefix}--label ${carbonPrefix}--skeleton`" />
4
+ <div :class="`${carbonPrefix}--text-area ${carbonPrefix}--skeleton`" />
5
+ </div>
6
+ </template>
7
+
8
+ <script setup>
9
+ import { carbonPrefix } from '../../global/settings';
10
+ </script>
@@ -0,0 +1 @@
1
+ export const StorybookGroupConst = 'CvTextArea';
@@ -0,0 +1,7 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`CvTextAreaSkeleton should match snapshot 1`] = `
4
+ <div class="bx--form-item"><label class="bx--label bx--skeleton"></label>
5
+ <div class="bx--text-area bx--skeleton"></div>
6
+ </div>
7
+ `;
@@ -1,4 +1,5 @@
1
1
  import CvTextArea from './CvTextArea.vue';
2
+ import CvTextAreaSkeleton from './CvTextAreaSkeleton';
2
3
 
3
- export { CvTextArea };
4
+ export { CvTextArea, CvTextAreaSkeleton };
4
5
  export default CvTextArea;