@carbon/vue 3.0.21 → 3.0.22

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 (49) hide show
  1. package/dist/carbon-vue-3.common.js +686 -1162
  2. package/dist/carbon-vue-3.common.js.map +1 -1
  3. package/dist/carbon-vue-3.umd.js +686 -1162
  4. package/dist/carbon-vue-3.umd.js.map +1 -1
  5. package/dist/carbon-vue-3.umd.min.js +4 -4
  6. package/dist/carbon-vue-3.umd.min.js.map +1 -1
  7. package/dist/web-types.json +1 -1
  8. package/package.json +4 -4
  9. package/src/components/CvAspectRatio/CvAspectRatio.stories.js +2 -5
  10. package/src/components/CvBreadcrumb/CvBreadcrumb.stories.js +2 -5
  11. package/src/components/CvButton/CvButton.stories.js +1 -3
  12. package/src/components/CvButton/CvButtonSet.stories.js +2 -6
  13. package/src/components/CvButton/CvButtonSkeleton.stories.js +1 -3
  14. package/src/components/CvButton/CvIconButton.stories.js +1 -3
  15. package/src/components/CvCheckbox/CvCheckbox.stories.js +1 -2
  16. package/src/components/CvCodeSnippet/CvCodeSnippet.stories.js +1 -2
  17. package/src/components/CvComboBox/CvComboBox.stories.js +2 -5
  18. package/src/components/CvCopyButton/CvCopyButton.stories.js +2 -5
  19. package/src/components/CvDataTable/CvDataTable.stories.mdx +56 -9
  20. package/src/components/CvDataTable/CvDataTable.vue +71 -97
  21. package/src/components/CvDataTable/CvDataTableHeading.vue +25 -45
  22. package/src/components/CvDataTable/CvDataTableRow.vue +46 -50
  23. package/src/components/CvDataTable/_CvDataTableRowInner.vue +9 -18
  24. package/src/components/CvDatePicker/CvDatePicker.stories.js +2 -5
  25. package/src/components/CvDatePicker/CvDatePicker.vue +1 -1
  26. package/src/components/CvLink/CvLink.stories.js +1 -2
  27. package/src/components/CvList/CvList.stories.js +2 -5
  28. package/src/components/CvLoading/CvLoading.stories.js +2 -5
  29. package/src/components/CvMultiSelect/CvMultiSelect.vue +4 -1
  30. package/src/components/CvNotification/CvInlineNotification.stories.js +2 -2
  31. package/src/components/CvNotification/CvToastNotification.stories.js +2 -2
  32. package/src/components/CvNumberInput/CvNumberInput.stories.js +2 -6
  33. package/src/components/CvNumberInput/CvNumberInputSkeleton.stories.js +2 -6
  34. package/src/components/CvRadioButton/CvRadioButton.stories.js +2 -5
  35. package/src/components/CvSkeletonText/CvSkeletonText.stories.js +2 -5
  36. package/src/components/CvSlider/CvSlider.stories.js +2 -6
  37. package/src/components/CvSlider/CvSliderSkeleton.stories.js +2 -6
  38. package/src/components/CvStructuredList/CvStructuredList.stories.js +2 -5
  39. package/src/components/CvTag/CvTag.stories.js +2 -5
  40. package/src/components/CvTag/CvTagSkeleton.stories.js +2 -5
  41. package/src/components/CvTextArea/CvTextArea.stories.js +2 -6
  42. package/src/components/CvTextArea/CvTextAreaSkeleton.stories.js +2 -6
  43. package/src/components/CvTextInput/CvTextInput.stories.js +2 -5
  44. package/src/components/CvToggle/CvToggle.stories.js +2 -5
  45. package/src/components/CvTooltip/CvDefinitionTooltip.stories.js +2 -6
  46. package/src/components/CvTooltip/CvInteractiveTooltip.stories.js +2 -6
  47. package/src/components/CvTooltip/CvTooltip.stories.js +2 -6
  48. package/src/use/overflow.js +2 -2
  49. package/src/components/CvDataTable/cvDataTableStore.js +0 -314
@@ -1,10 +1,5 @@
1
1
  <template>
2
- <th
3
- :id="cvId"
4
- ref="el"
5
- :aria-sort="internalOrder"
6
- :style="skeleton && headingStyle"
7
- >
2
+ <th :id="cvId" :aria-sort="internalOrder" :style="skeleton && headingStyle">
8
3
  <button
9
4
  v-if="sortable"
10
5
  type="button"
@@ -46,9 +41,7 @@ import Arrows16 from '@carbon/icons-vue/es/arrows--vertical/16';
46
41
  import CvEmpty from '../CvEmpty/_CvEmpty.vue';
47
42
  import { props as propsCvId, useCvId } from '../../use/cvId';
48
43
  import { carbonPrefix } from '../../global/settings';
49
- import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';
50
- import { getBus } from '../../global/component-utils/event-bus';
51
- import store from './cvDataTableStore';
44
+ import { computed, onBeforeUnmount, onMounted, ref, watch, inject } from 'vue';
52
45
 
53
46
  const nextOrder = {
54
47
  ascending: 'descending',
@@ -67,69 +60,56 @@ const props = defineProps({
67
60
  });
68
61
  const cvId = useCvId(props, true);
69
62
  const dataOrder = ref(props.order);
70
- const parent = ref(null);
71
63
  watch(
72
64
  () => props.order,
73
65
  () => {
74
66
  if (dataOrder.value !== props.order) {
75
67
  dataOrder.value = props.order;
76
- store.updateHeading(parent, {
77
- id: cvId.value,
78
- order: dataOrder.value,
79
- });
80
68
  onSortClick();
81
69
  }
82
70
  }
83
71
  );
72
+ const sortableHeaders = inject('sortableHeadings', ref(new Set()));
84
73
  watch(
85
74
  () => props.sortable,
86
75
  () => {
87
- store.updateHeading(parent, {
88
- id: cvId.value,
89
- sortable: props.sortable,
90
- });
76
+ if (props.sortable) sortableHeaders.value.add(cvId.value);
77
+ else sortableHeaders.value.delete(cvId.value);
91
78
  }
92
79
  );
93
80
 
94
- let bus = undefined;
95
- const el = ref(null);
81
+ const headingIds = inject('heading-ids', ref(new Set()));
96
82
  onMounted(() => {
97
- const pe = el.value.closest('.cv-data-table');
98
- parent.value = pe?.getAttribute('id');
99
- if (parent.value) bus = getBus(parent);
100
- else console.warn('data table not found');
101
-
102
- const exists = store.findHeading(parent, cvId);
103
- if (exists)
104
- console.error(
105
- `CvDataTable: Duplicate ID specified for CvDataTableHeading, may cause issues. {id: ${cvId.value}, name: ${props.name}`
106
- );
107
- else
108
- store.updateHeading(parent, {
109
- id: cvId.value,
110
- name: props.name,
111
- order: dataOrder.value,
112
- sortable: props.sortable,
113
- });
83
+ headingIds.value.add(cvId.value);
84
+ if (props.sortable) {
85
+ sortableHeaders.value.add(cvId.value);
86
+ if (props.order !== 'none') onSortClick();
87
+ }
114
88
  });
115
89
 
116
90
  onBeforeUnmount(() => {
117
- store.removeHeading(parent, cvId);
91
+ headingIds.value.delete(cvId.value);
92
+ sortableHeaders.value.delete(cvId.value);
118
93
  });
119
- function onSortClick() {
120
- bus?.emit('cv:sort', {
94
+
95
+ const notifyHeaderSort = inject('cv:sort');
96
+ function onSortClick(ev) {
97
+ // If this is a click event, update to next sort order. Otherwise, this is
98
+ // being called from a watcher.
99
+ if (ev) dataOrder.value = nextOrder[dataOrder.value];
100
+ notifyHeaderSort({
121
101
  heading: { id: cvId.value, name: props.name },
122
- value: nextOrder[internalOrder.value],
102
+ value: dataOrder.value,
123
103
  });
124
104
  }
105
+
106
+ const currentSortHeadingId = inject('current-sort-heading-id', ref(null));
125
107
  const internalOrder = computed(() => {
126
108
  if (!props.sortable) {
127
109
  return undefined;
128
110
  }
129
- const heading = store.findHeading(parent, cvId);
130
- if (['ascending', 'descending', 'none'].includes(heading?.order))
131
- return heading.order;
132
- else return 'none';
111
+ if (currentSortHeadingId.value !== cvId.value) return 'none';
112
+ return dataOrder.value;
133
113
  });
134
114
 
135
115
  const headingLabelTag = computed(() => {
@@ -33,7 +33,7 @@
33
33
  v-bind="$attrs"
34
34
  :id="cvId"
35
35
  ref="row"
36
- :value="value"
36
+ :value="rowValue"
37
37
  class="cv-data-table-row"
38
38
  :row-id="cvId"
39
39
  @checked-change="onCheckedChange"
@@ -50,15 +50,13 @@ import {
50
50
  computed,
51
51
  onBeforeUnmount,
52
52
  onMounted,
53
- onUpdated,
54
53
  ref,
55
54
  useAttrs,
56
55
  useSlots,
57
56
  watch,
58
57
  inject,
58
+ onUpdated,
59
59
  } from 'vue';
60
- import store from './cvDataTableStore';
61
- import { getBus } from '../../global/component-utils/event-bus';
62
60
 
63
61
  const props = defineProps({
64
62
  /** The value associated with the input (required for tables with batch actions) */
@@ -68,85 +66,83 @@ const props = defineProps({
68
66
  ...propsCvId,
69
67
  });
70
68
  const cvId = useCvId(props, true);
69
+ // For historical reasons we have a prop named "value" but this makes the code
70
+ // hard to read since .value is used for refs. So it would be props.value
71
+ // which is weird. Let's shadow this as "rowValue"
72
+ const rowValue = ref(props.value);
73
+ watch(
74
+ () => props.value,
75
+ () => (rowValue.value = props.value)
76
+ );
71
77
 
72
78
  /** @type {Ref<Set<String>>} */
73
79
  const expandingRowIds = inject('expanding-row-ids', ref(new Set()));
74
80
  const dataExpandable = ref(false);
75
81
  watch(dataExpandable, () => {
76
- if (dataExpandable.value) expandingRowIds.value?.add(cvId.value);
82
+ if (dataExpandable.value) expandingRowIds.value.add(cvId.value);
77
83
  else expandingRowIds.value?.delete(cvId.value);
78
84
  });
79
85
  const dataSomeExpandingRows = computed(() => {
80
86
  return expandingRowIds.value?.size > 0;
81
87
  });
82
-
83
88
  const attrs = useAttrs();
89
+ const rowIds = inject('row-ids', ref(new Set()));
90
+ const expandedRowIds = inject('expanded-row-ids', ref(new Set()));
91
+
84
92
  const slots = useSlots();
85
93
  const row = ref(null);
86
- const parent = ref(null);
87
- let bus;
88
- onMounted(() => {
89
- const el = row.value?.$el;
90
- const pe = el?.closest('.cv-data-table');
91
- parent.value = pe?.getAttribute('id');
92
- if (parent.value) {
93
- bus = getBus(parent);
94
- store.getTable(parent);
95
- } else console.warn('data table not found');
94
+ const rowsSelected = inject('rows-selected');
96
95
 
96
+ onMounted(() => {
97
97
  dataExpandable.value = !!slots.expandedContent;
98
- const exists = store.findRow(parent, cvId);
99
- if (exists)
100
- console.error(
101
- `CvDataTable: Duplicate ID specified for CvDataTableRow, may cause issues. {id: ${cvId.value}, value: ${attrs.value}}`
102
- );
103
- else
104
- store.updateRow(parent, {
105
- id: cvId.value,
106
- value: attrs.value,
107
- expandable: dataExpandable.value,
108
- isExpanded: props.expanded,
109
- isChecked: false,
110
- });
98
+ rowIds.value.add(cvId.value);
99
+ if (props.expanded) expandedRowIds.value.add(cvId.value);
111
100
  });
112
101
  onUpdated(() => {
113
- const curr = dataExpandable.value;
114
102
  dataExpandable.value = !!slots.expandedContent;
115
- if (dataExpandable.value !== curr)
116
- store.updateRow(parent, {
117
- id: cvId.value,
118
- expandable: dataExpandable.value,
119
- });
120
103
  });
121
104
  onBeforeUnmount(() => {
122
- store.removeRow(parent, cvId);
105
+ rowIds.value.delete(cvId.value);
106
+ expandingRowIds.value.delete(cvId.value);
107
+ expandedRowIds.value.delete(cvId.value);
108
+ const index = rowsSelected.value.indexOf(rowValue.value);
109
+ if (index > -1) rowsSelected.value.splice(index, 1);
123
110
  });
124
111
  const dataExpanded = computed(() => {
125
- return Boolean(props.expanded || store.isRowExpanded(parent, cvId));
112
+ return Boolean(props.expanded || expandedRowIds.value.has(cvId.value));
126
113
  });
127
114
  watch(
128
115
  () => props.expanded,
129
116
  () => {
130
- store.updateRow(parent, {
131
- id: cvId.value,
132
- isExpanded: props.expanded,
133
- });
117
+ if (props.expanded) expandedRowIds.value.add(cvId.value);
118
+ else expandingRowIds.value.delete(cvId.value);
134
119
  }
135
120
  );
136
121
 
122
+ const notifyExpandedChange = inject('cv:expanded-change');
123
+
137
124
  function onExpandedChange(val) {
138
- const row = store.findRow(parent, cvId);
139
- store.updateRow(parent, {
125
+ notifyExpandedChange({
140
126
  id: cvId.value,
127
+ value: rowValue.value,
128
+ expandable: expandingRowIds.value.has(cvId.value),
141
129
  isExpanded: val,
130
+ isChecked: rowsSelected.value.includes(rowValue.value),
142
131
  });
143
- bus?.emit('cv:expanded-change', row);
144
132
  }
145
- function onCheckedChange(val) {
146
- store.updateRow(parent, {
147
- id: cvId.value,
148
- isChecked: val,
149
- });
150
- bus?.emit('cv:check-change', { value: props.value, checked: val });
133
+
134
+ // Manage the checkmark on the row. Notify the table if it changes.
135
+ const notifyCheckedChange = inject('cv:check-change');
136
+ function onCheckedChange(isChecked) {
137
+ if (!rowsSelected.value) return;
138
+ const index = rowsSelected.value.indexOf(rowValue.value);
139
+ if (isChecked) {
140
+ // if the row value is not already in the rowsSelected array, add it.
141
+ if (index === -1) rowsSelected.value.push(rowValue.value);
142
+ } else {
143
+ // if the row value is in the rowsSelected array, delete it.
144
+ if (index > -1) rowsSelected.value.splice(index, 1);
145
+ }
146
+ notifyCheckedChange(attrs.value, isChecked);
151
147
  }
152
148
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <tr
3
- ref="el"
4
3
  class="cv-data-table-row-inner"
4
+ :data-value="value"
5
5
  :class="{
6
6
  [`${carbonPrefix}--parent-row`]: expandingRow,
7
7
  [`${carbonPrefix}--expandable-row`]: dataExpanded,
@@ -76,8 +76,6 @@ import {
76
76
  watch,
77
77
  inject,
78
78
  } from 'vue';
79
- import store from './cvDataTableStore';
80
- import { getBus } from '../../global/component-utils/event-bus';
81
79
 
82
80
  const props = defineProps({
83
81
  ariaLabelForBatchCheckbox: { type: String, default: undefined },
@@ -124,21 +122,11 @@ function checkSlots() {
124
122
  onMounted(checkSlots);
125
123
  onUpdated(checkSlots);
126
124
 
127
- const el = ref(null);
128
- const parent = ref(null);
129
- let bus;
130
- onMounted(() => {
131
- const pe = el.value.closest('.cv-data-table');
132
- parent.value = pe?.getAttribute('id');
133
- if (parent.value) {
134
- store.getTable(parent);
135
- bus = getBus(parent);
136
- } else console.warn('data table not found');
137
- });
138
125
  const hasBatchActions = inject('has-batch-actions', ref(false));
139
126
 
127
+ const emitClick = inject('cv:click');
140
128
  function onMenuItemClick(val) {
141
- bus.emit('cv:click', val);
129
+ emitClick(val);
142
130
  }
143
131
 
144
132
  const emit = defineEmits(['expanded-change', 'checked-change']);
@@ -165,11 +153,14 @@ watch(
165
153
  emit('checked-change', dataExpanded.value);
166
154
  }
167
155
  );
156
+ const rowsSelected = inject('rows-selected');
168
157
  watch(
169
- () => store.state[parent.value]?.rows,
158
+ () => rowsSelected,
170
159
  () => {
171
- const row = store.findRow(parent, props.rowId);
172
- const isChecked = row?.isChecked;
160
+ // For historical reasons we have a prop named "value" but this makes the code
161
+ // below look weird since .value is used for refs. So just a note that this
162
+ // is not a ref is a prop named "value"
163
+ const isChecked = rowsSelected.value.includes(props.value);
173
164
  if (isChecked !== undefined) {
174
165
  dataChecked.value = isChecked;
175
166
  }
@@ -1,7 +1,4 @@
1
- import {
2
- sbCompPrefix,
3
- storyParametersObject,
4
- } from '../../global/storybook-utils';
1
+ import { storyParametersObject } from '../../global/storybook-utils';
5
2
 
6
3
  import { CvDatePicker } from '.';
7
4
  import { CvDatePickerSkeleton } from '.';
@@ -20,7 +17,7 @@ tomorrow.setDate(now.getDate() + 1);
20
17
  nextWeek.setDate(now.getDate() + 7);
21
18
 
22
19
  export default {
23
- title: `${sbCompPrefix}/CvDatePicker`,
20
+ title: 'Component/CvDatePicker',
24
21
  component: CvDatePicker,
25
22
  parameters: {
26
23
  a11y: {
@@ -311,7 +311,7 @@ watch(
311
311
  () => props.calOptions,
312
312
  () => {
313
313
  for (const [key, value] of Object.entries(props.calOptions)) {
314
- calendar.value.set(key, value);
314
+ calendar.value?.set(key, value);
315
315
  }
316
316
  },
317
317
  { deep: true }
@@ -1,5 +1,4 @@
1
1
  import {
2
- sbCompPrefix,
3
2
  storybookControlsFromProps,
4
3
  storyParametersObject,
5
4
  } from '../../global/storybook-utils';
@@ -9,7 +8,7 @@ import { Download16 } from '@carbon/icons-vue';
9
8
  import { props as propsCvLink, linkSizes } from '../../use/cvLink';
10
9
 
11
10
  export default {
12
- title: `${sbCompPrefix}/CvLink`,
11
+ title: 'Component/CvLink',
13
12
  component: CvLink,
14
13
  argTypes: {
15
14
  ...storybookControlsFromProps(propsCvLink),
@@ -1,12 +1,9 @@
1
1
  import { CvList, CvListItem } from '.';
2
2
 
3
- import {
4
- sbCompPrefix,
5
- storyParametersObject,
6
- } from '../../global/storybook-utils';
3
+ import { storyParametersObject } from '../../global/storybook-utils';
7
4
 
8
5
  export default {
9
- title: `${sbCompPrefix}/CvList`,
6
+ title: 'Component/CvList',
10
7
  component: CvList,
11
8
  argTypes: {
12
9
  ordered: {
@@ -2,14 +2,11 @@ import CvLoading from '.';
2
2
 
3
3
  import { ref, computed } from 'vue';
4
4
  import { action } from '@storybook/addon-actions';
5
- import {
6
- sbCompPrefix,
7
- storyParametersObject,
8
- } from '../../global/storybook-utils';
5
+ import { storyParametersObject } from '../../global/storybook-utils';
9
6
  import './CvLoading.stories.scss';
10
7
 
11
8
  export default {
12
- title: `${sbCompPrefix}/CvLoading`,
9
+ title: 'Component/CvLoading',
13
10
  component: CvLoading,
14
11
  argTypes: {
15
12
  'loading-end': {
@@ -163,7 +163,10 @@
163
163
  @mousemove="onMousemove(item.value)"
164
164
  @mousedown.prevent
165
165
  >
166
- <div :class="`${carbonPrefix}--list-box__menu-item__option`">
166
+ <div
167
+ :class="`${carbonPrefix}--list-box__menu-item__option`"
168
+ :title="item.label"
169
+ >
167
170
  <cv-checkbox
168
171
  v-model="data.selectedItems"
169
172
  tabindex="-1"
@@ -1,11 +1,11 @@
1
1
  import { action } from '@storybook/addon-actions';
2
- import { sbCompPrefix, storySourceCode } from '../../global/storybook-utils';
2
+ import { storySourceCode } from '../../global/storybook-utils';
3
3
 
4
4
  import { CvInlineNotification, CvNotificationConsts } from '.';
5
5
  import DocumentationTemplate from './CvInlineNotificationTemplate.mdx';
6
6
 
7
7
  export default {
8
- title: `${sbCompPrefix}/CvInlineNotification`,
8
+ title: 'Component/CvInlineNotification',
9
9
  component: CvInlineNotification,
10
10
  argTypes: {
11
11
  kind: {
@@ -1,10 +1,10 @@
1
1
  import { action } from '@storybook/addon-actions';
2
2
  import DocumentationTemplate from './CvToastNotificationTemplate.mdx';
3
- import { sbCompPrefix, storySourceCode } from '../../global/storybook-utils';
3
+ import { storySourceCode } from '../../global/storybook-utils';
4
4
  import { CvToastNotification, CvNotificationConsts } from '.';
5
5
 
6
6
  export default {
7
- title: `${sbCompPrefix}/CvToastNotification`,
7
+ title: 'Component/CvToastNotification',
8
8
  component: CvToastNotification,
9
9
  argTypes: {
10
10
  kind: {
@@ -1,13 +1,9 @@
1
1
  import { ref } from 'vue';
2
- import {
3
- sbCompPrefix,
4
- storyParametersObject,
5
- } from '../../global/storybook-utils';
6
- import { StorybookGroupConst } from './StorybookGroupConst';
2
+ import { storyParametersObject } from '../../global/storybook-utils';
7
3
  import CvNumberInput from './CvNumberInput.vue';
8
4
 
9
5
  export default {
10
- title: `${sbCompPrefix}/${StorybookGroupConst}/CvNumberInput`,
6
+ title: 'Component/CvNumberInput',
11
7
  component: CvNumberInput,
12
8
  argTypes: {
13
9
  // attrs
@@ -1,12 +1,8 @@
1
- import {
2
- sbCompPrefix,
3
- storyParametersObject,
4
- } from '../../global/storybook-utils';
5
- import { StorybookGroupConst } from './StorybookGroupConst';
1
+ import { storyParametersObject } from '../../global/storybook-utils';
6
2
  import CvNumberInputSkeleton from './CvNumberInputSkeleton.vue';
7
3
 
8
4
  export default {
9
- title: `${sbCompPrefix}/${StorybookGroupConst}/CvNumberInputSkeleton`,
5
+ title: 'Component/CvNumberInputSkeleton',
10
6
  component: CvNumberInputSkeleton,
11
7
  };
12
8
 
@@ -1,13 +1,10 @@
1
1
  import { action } from '@storybook/addon-actions';
2
2
  import { CvRadioButton, CvRadioGroup } from '.';
3
- import {
4
- sbCompPrefix,
5
- storyParametersObject,
6
- } from '../../global/storybook-utils';
3
+ import { storyParametersObject } from '../../global/storybook-utils';
7
4
  import { ref } from 'vue';
8
5
 
9
6
  export default {
10
- title: `${sbCompPrefix}/CvRadioButton`,
7
+ title: 'Component/CvRadioButton',
11
8
  component: CvRadioButton,
12
9
  argTypes: {
13
10
  checked: {
@@ -1,12 +1,9 @@
1
- import {
2
- sbCompPrefix,
3
- storyParametersObject,
4
- } from '../../global/storybook-utils';
1
+ import { storyParametersObject } from '../../global/storybook-utils';
5
2
 
6
3
  import { CvSkeletonText } from '.';
7
4
 
8
5
  export default {
9
- title: `${sbCompPrefix}/CvSkeletonText`,
6
+ title: 'Component/CvSkeletonText',
10
7
  component: CvSkeletonText,
11
8
  argTypes: {
12
9
  heading: { control: { type: 'boolean' } },
@@ -1,14 +1,10 @@
1
1
  import { ref } from 'vue';
2
2
  import { action } from '@storybook/addon-actions';
3
- import {
4
- sbCompPrefix,
5
- storyParametersObject,
6
- } from '../../global/storybook-utils';
7
- import { sbSliderPrefix } from './sbSliderPrefix';
3
+ import { storyParametersObject } from '../../global/storybook-utils';
8
4
  import { CvSlider } from '.';
9
5
 
10
6
  export default {
11
- title: `${sbCompPrefix}/${sbSliderPrefix}/CvSlider`,
7
+ title: 'Component/CvSlider',
12
8
  component: CvSlider,
13
9
  argTypes: {
14
10
  disabled: {
@@ -1,12 +1,8 @@
1
- import {
2
- sbCompPrefix,
3
- storyParametersObject,
4
- } from '../../global/storybook-utils';
5
- import { sbSliderPrefix } from './sbSliderPrefix';
1
+ import { storyParametersObject } from '../../global/storybook-utils';
6
2
  import { CvSliderSkeleton } from '.';
7
3
 
8
4
  export default {
9
- title: `${sbCompPrefix}/${sbSliderPrefix}/CvSliderSkeleton`,
5
+ title: 'Component/CvSliderSkeleton',
10
6
  component: CvSliderSkeleton,
11
7
  };
12
8
 
@@ -1,9 +1,6 @@
1
1
  import { action } from '@storybook/addon-actions';
2
2
  import { ref } from 'vue';
3
- import {
4
- sbCompPrefix,
5
- storyParametersObject,
6
- } from '../../global/storybook-utils';
3
+ import { storyParametersObject } from '../../global/storybook-utils';
7
4
  import {
8
5
  CvStructuredList,
9
6
  CvStructuredListHeading,
@@ -12,7 +9,7 @@ import {
12
9
  } from '.';
13
10
 
14
11
  export default {
15
- title: `${sbCompPrefix}/CvStructuredList`,
12
+ title: 'Component/CvStructuredList',
16
13
  component: CvStructuredList,
17
14
  argTypes: {
18
15
  selectable: {
@@ -1,10 +1,7 @@
1
1
  import CvTag from './CvTag.vue';
2
2
  import { tagKinds } from './consts.js';
3
3
  import { action } from '@storybook/addon-actions';
4
- import {
5
- sbCompPrefix,
6
- storyParametersObject,
7
- } from '../../global/storybook-utils';
4
+ import { storyParametersObject } from '../../global/storybook-utils';
8
5
  import {
9
6
  DataDefinition20,
10
7
  Bee20,
@@ -27,7 +24,7 @@ const icons = {
27
24
  };
28
25
 
29
26
  export default {
30
- title: `${sbCompPrefix}/CvTag`,
27
+ title: 'Component/CvTag',
31
28
  component: CvTag,
32
29
  argTypes: {
33
30
  kind: { control: 'select', options: tagKinds },
@@ -1,11 +1,8 @@
1
- import {
2
- sbCompPrefix,
3
- storyParametersObject,
4
- } from '../../global/storybook-utils';
1
+ import { storyParametersObject } from '../../global/storybook-utils';
5
2
  import CvTagSkeleton from './CvTagSkeleton.vue';
6
3
 
7
4
  export default {
8
- title: `${sbCompPrefix}/CvTagSkeleton`,
5
+ title: 'Component/CvTagSkeleton',
9
6
  component: CvTagSkeleton,
10
7
  };
11
8
 
@@ -1,13 +1,9 @@
1
- import {
2
- sbCompPrefix,
3
- storyParametersObject,
4
- } from '../../global/storybook-utils';
5
- import { StorybookGroupConst } from './StorybookGroupConst';
1
+ import { storyParametersObject } from '../../global/storybook-utils';
6
2
  import CvTextArea from '.';
7
3
  import { ref } from 'vue';
8
4
 
9
5
  export default {
10
- title: `${sbCompPrefix}/${StorybookGroupConst}/CvTextArea`,
6
+ title: 'Component/CvTextArea',
11
7
  component: CvTextArea,
12
8
  argTypes: {
13
9
  // attrs
@@ -1,12 +1,8 @@
1
- import {
2
- sbCompPrefix,
3
- storyParametersObject,
4
- } from '../../global/storybook-utils';
5
- import { StorybookGroupConst } from './StorybookGroupConst';
1
+ import { storyParametersObject } from '../../global/storybook-utils';
6
2
  import { CvTextAreaSkeleton } from './';
7
3
 
8
4
  export default {
9
- title: `${sbCompPrefix}/${StorybookGroupConst}/CvTextAreaSkeleton`,
5
+ title: 'Component/CvTextAreaSkeleton',
10
6
  component: CvTextAreaSkeleton,
11
7
  };
12
8
 
@@ -1,13 +1,10 @@
1
- import {
2
- sbCompPrefix,
3
- storyParametersObject,
4
- } from '../../global/storybook-utils';
1
+ import { storyParametersObject } from '../../global/storybook-utils';
5
2
 
6
3
  import { CvTextInput, CvTextInputSkeleton } from '.';
7
4
  import { ref } from 'vue';
8
5
 
9
6
  export default {
10
- title: `${sbCompPrefix}/CvTextInput`,
7
+ title: 'Component/CvTextInput',
11
8
  component: CvTextInput,
12
9
  argTypes: {
13
10
  // attrs