@bethinkpl/design-system 22.3.0 → 23.0.1

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 (70) hide show
  1. package/dist/design-system.umd.js +1528 -288
  2. package/dist/design-system.umd.js.map +1 -1
  3. package/dist/lib/js/components/Banner/Banner.vue.d.ts +5 -1
  4. package/dist/lib/js/components/Buttons/Button/Button.vue.d.ts +5 -1
  5. package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +5 -1
  6. package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +5 -1
  7. package/dist/lib/js/components/Chip/Chip.vue.d.ts +5 -1
  8. package/dist/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue.d.ts +5 -1
  9. package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +5 -1
  10. package/dist/lib/js/components/Form/Checkbox/Checkbox.vue.d.ts +5 -1
  11. package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +5 -1
  12. package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +5 -1
  13. package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +5 -1
  14. package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +5 -1
  15. package/dist/lib/js/components/Image/Image.consts.d.ts +5 -0
  16. package/dist/lib/js/components/Image/Image.stories.d.ts +5 -0
  17. package/dist/lib/js/components/Image/Image.vue.d.ts +43 -0
  18. package/dist/lib/js/components/Image/index.d.ts +2 -0
  19. package/dist/lib/js/components/Modal/Modal.vue.d.ts +5 -1
  20. package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +5 -1
  21. package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.vue.d.ts +5 -1
  22. package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +5 -1
  23. package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +5 -1
  24. package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +5 -1
  25. package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.stories.d.ts +1 -0
  26. package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +2 -1
  27. package/dist/lib/js/components/RichList/RichListItem/RichListItem.stories.d.ts +1 -0
  28. package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +8 -2
  29. package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue.d.ts +8 -3
  30. package/dist/lib/js/components/SelectionTile/SelectionTile.vue.d.ts +5 -1
  31. package/dist/lib/js/components/Skeleton/Skeleton.consts.d.ts +6 -0
  32. package/dist/lib/js/components/Skeleton/Skeleton.stories.d.ts +5 -0
  33. package/dist/lib/js/components/Skeleton/Skeleton.vue.d.ts +3 -0
  34. package/dist/lib/js/components/Skeleton/index.d.ts +2 -0
  35. package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +5 -1
  36. package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +5 -1
  37. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +3 -262
  38. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +3 -305
  39. package/dist/lib/js/components/SurveyToggle/SurveyToggle.vue.d.ts +3 -71
  40. package/dist/lib/js/components/Switch/Switch.vue.d.ts +5 -1
  41. package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +5 -1
  42. package/dist/lib/js/components/Tile/Tile.vue.d.ts +5 -1
  43. package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +5 -1
  44. package/dist/lib/js/icons/fontawesome.d.ts +4 -1
  45. package/dist/lib/js/index.d.ts +3 -0
  46. package/docs/42.4a7f9b4c.iframe.bundle.js +2 -0
  47. package/docs/iframe.html +1 -1
  48. package/docs/main.bb419248.iframe.bundle.js +2 -0
  49. package/docs/project.json +1 -1
  50. package/lib/images/icons/sidebar-flip-solid.svg +6 -0
  51. package/lib/js/components/Icons/Icon/Icon.consts.ts +2 -0
  52. package/lib/js/components/Image/Image.consts.ts +6 -0
  53. package/lib/js/components/Image/Image.stories.ts +36 -0
  54. package/lib/js/components/Image/Image.vue +94 -0
  55. package/lib/js/components/Image/index.ts +3 -0
  56. package/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.stories.ts +162 -98
  57. package/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue +9 -3
  58. package/lib/js/components/RichList/RichListItem/RichListItem.stories.ts +201 -135
  59. package/lib/js/components/RichList/RichListItem/RichListItem.vue +33 -3
  60. package/lib/js/components/Skeleton/Skeleton.consts.ts +7 -0
  61. package/lib/js/components/Skeleton/Skeleton.stories.ts +41 -0
  62. package/lib/js/components/Skeleton/Skeleton.vue +56 -0
  63. package/lib/js/components/Skeleton/index.ts +3 -0
  64. package/lib/js/icons/fontawesome.ts +8 -2
  65. package/lib/js/index.ts +3 -0
  66. package/package.json +1 -1
  67. package/docs/166.463f1d4f.iframe.bundle.js +0 -2
  68. package/docs/main.f33ff81a.iframe.bundle.js +0 -2
  69. /package/docs/{166.463f1d4f.iframe.bundle.js.LICENSE.txt → 42.4a7f9b4c.iframe.bundle.js.LICENSE.txt} +0 -0
  70. /package/docs/{main.f33ff81a.iframe.bundle.js.LICENSE.txt → main.bb419248.iframe.bundle.js.LICENSE.txt} +0 -0
package/docs/project.json CHANGED
@@ -1 +1 @@
1
- {"generatedAt":1721980686635,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"metaFramework":{"name":"vue-cli","packageName":"@vue/cli-service","version":"5.0.8"},"packageManager":{"type":"yarn","version":"1.22.22"},"storybookVersion":"6.5.13","language":"typescript","storybookPackages":{"@storybook/builder-webpack5":{"version":"6.5.13"},"@storybook/manager-webpack5":{"version":"6.5.13"},"@storybook/vue3":{"version":"6.5.13"},"eslint-plugin-storybook":{"version":"0.6.6"}},"framework":{"name":"vue3"},"addons":{"@storybook/addon-actions":{"version":"6.5.16"},"@storybook/addon-docs":{"version":"6.5.15"},"@storybook/addon-controls":{"version":"6.5.15"},"@storybook/addon-storysource":{"version":"6.5.15"},"@storybook/addon-viewport":{"version":"6.5.15"},"storybook-addon-designs":{"version":"6.3.1"}}}
1
+ {"generatedAt":1722343378818,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"metaFramework":{"name":"vue-cli","packageName":"@vue/cli-service","version":"5.0.8"},"packageManager":{"type":"yarn","version":"1.22.22"},"storybookVersion":"6.5.13","language":"typescript","storybookPackages":{"@storybook/builder-webpack5":{"version":"6.5.13"},"@storybook/manager-webpack5":{"version":"6.5.13"},"@storybook/vue3":{"version":"6.5.13"},"eslint-plugin-storybook":{"version":"0.6.6"}},"framework":{"name":"vue3"},"addons":{"@storybook/addon-actions":{"version":"6.5.16"},"@storybook/addon-docs":{"version":"6.5.15"},"@storybook/addon-controls":{"version":"6.5.15"},"@storybook/addon-storysource":{"version":"6.5.15"},"@storybook/addon-viewport":{"version":"6.5.15"},"storybook-addon-designs":{"version":"6.3.1"}}}
@@ -0,0 +1,6 @@
1
+ <svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M53 17C53 15.375 51.625 14 50 14H44C42.25 14 41 15.375 41 17C41 18.75 42.25 20 44 20H50C51.625 20 53 18.75 53 17Z" />
3
+ <path d="M50 26H44C42.25 26 41 27.375 41 29C41 30.75 42.25 32 44 32H50C51.625 32 53 30.75 53 29C53 27.375 51.625 26 50 26Z" />
4
+ <path d="M50 38C51.625 38 53 39.375 53 41C53 42.75 51.625 44 50 44H44C42.25 44 41 42.75 41 41C41 39.375 42.25 38 44 38H50Z" />
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8 4C3.58172 4 0 7.58172 0 12V52C0 56.4183 3.58172 60 8 60H56C60.5 60 64 56.5 64 52V12C64 7.625 60.5 4 56 4H8ZM36 10V54H56C57.125 54 58 53.125 58 52V12C58 11 57.125 10 56 10H36Z" />
6
+ </svg>
@@ -4,6 +4,7 @@ import SlidersSearch from '../../../../images/icons/sliders-search.svg';
4
4
  import CommentsCheck from '../../../../images/icons/comments-check.svg';
5
5
  import Answers from '../../../../images/icons/icon-answers.svg';
6
6
  import HideAnswers from '../../../../images/icons/icon-hide-answers.svg';
7
+ import SidebarFlipSolid from '../../../../images/icons/sidebar-flip-solid.svg';
7
8
 
8
9
  import { FONTAWESOME_ICONS } from '../../../icons/fontawesome';
9
10
  import { Value } from '../../../utils/type.utils';
@@ -46,6 +47,7 @@ const BETHINK_ICONS = {
46
47
  COMMENTS_CHECK: CommentsCheck,
47
48
  ANSWERS: Answers,
48
49
  HIDE_ANSWERS: HideAnswers,
50
+ SIDEBAR_FLIP_SOLID: SidebarFlipSolid,
49
51
  } as const;
50
52
 
51
53
  export const ICONS = {
@@ -0,0 +1,6 @@
1
+ export const IMAGE_FITS = {
2
+ CONTAIN: 'contain',
3
+ COVER: 'cover',
4
+ };
5
+
6
+ export type ImageFit = typeof IMAGE_FITS[keyof typeof IMAGE_FITS];
@@ -0,0 +1,36 @@
1
+ import { Args, Meta, StoryFn } from '@storybook/vue3';
2
+ import DsImage from './Image.vue';
3
+ import { IMAGE_FITS } from './Image.consts';
4
+
5
+ export default {
6
+ title: 'Components/Image',
7
+ component: DsImage,
8
+ } as Meta<typeof DsImage>;
9
+
10
+ const StoryTemplate: StoryFn<typeof DsImage> = (args) => ({
11
+ components: { DsImage },
12
+ setup() {
13
+ return { ...args };
14
+ },
15
+ template: `
16
+ <div style="height: 500px; width: 800px;">
17
+ <ds-image
18
+ :fit="fit"
19
+ :src="src"
20
+ />
21
+ </div>`,
22
+ });
23
+
24
+ export const Interactive = StoryTemplate.bind({});
25
+
26
+ Interactive.args = {
27
+ fit: IMAGE_FITS.COVER,
28
+ src: 'https://storage.googleapis.com/media-manager/lek/018f6291-3956-7342-8e6b-0ee901d48643/018f6291-3a56-7213-aef6-b5da7253839f.jpg',
29
+ } as Args;
30
+
31
+ Interactive.argTypes = {
32
+ fit: {
33
+ control: { type: 'select', options: Object.values(IMAGE_FITS) },
34
+ defaultValue: IMAGE_FITS.COVER,
35
+ },
36
+ };
@@ -0,0 +1,94 @@
1
+ <template>
2
+ <div class="ds-image">
3
+ <img
4
+ class="ds-image__image"
5
+ :class="{
6
+ '-ds-accelerate': accelerate,
7
+ '-ds-contain': fit === IMAGE_FITS.CONTAIN,
8
+ '-ds-cover': fit === IMAGE_FITS.COVER,
9
+ }"
10
+ draggable="false"
11
+ loading="lazy"
12
+ :src="src"
13
+ @error="isLoading = false"
14
+ @load="isLoading = false"
15
+ />
16
+ <div v-if="isLoading" class="ds-image__loader">
17
+ <ds-skeleton :radius="SKELETON_RADIUS_SIZES.SMALL" />
18
+ </div>
19
+ </div>
20
+ </template>
21
+
22
+ <style lang="scss" scoped>
23
+ .ds-image {
24
+ height: 100%;
25
+ position: relative;
26
+
27
+ &__image {
28
+ height: 100%;
29
+ user-select: none;
30
+ width: 100%;
31
+
32
+ &.-ds-accelerate {
33
+ transform: translate3d(0, 0, 0);
34
+ }
35
+
36
+ &.-ds-contain {
37
+ object-fit: contain;
38
+ }
39
+
40
+ &.-ds-cover {
41
+ object-fit: cover;
42
+ }
43
+ }
44
+
45
+ &__loader {
46
+ bottom: 0;
47
+ left: 0;
48
+ position: absolute;
49
+ right: 0;
50
+ top: 0;
51
+ }
52
+ }
53
+ </style>
54
+
55
+ <script lang="ts">
56
+ import { defineComponent, PropType } from 'vue';
57
+ import { IMAGE_FITS, ImageFit } from './Image.consts';
58
+ import { SKELETON_RADIUS_SIZES } from '../Skeleton/Skeleton.consts';
59
+ import DsSkeleton from '../Skeleton/Skeleton.vue';
60
+
61
+ export default defineComponent({
62
+ // <image> is "an ancient and poorly supported precursor to the <img> element"
63
+ // so there should be no conflicts. Also, we prefix all DS components with ds-
64
+ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element#obsolete_and_deprecated_elements
65
+ // eslint-disable-next-line vue/no-reserved-component-names
66
+ name: 'Image',
67
+ components: {
68
+ DsSkeleton,
69
+ },
70
+ props: {
71
+ // Use when there are performance issues when other elements are overlayed
72
+ // on the image, e.g. a RichListItem border covers a part of the image
73
+ accelerate: {
74
+ type: Boolean,
75
+ default: false,
76
+ },
77
+ fit: {
78
+ type: String as PropType<ImageFit>,
79
+ default: IMAGE_FITS.COVER,
80
+ },
81
+ src: {
82
+ type: String,
83
+ required: true,
84
+ },
85
+ },
86
+ data() {
87
+ return {
88
+ isLoading: true,
89
+ IMAGE_FITS: Object.freeze(IMAGE_FITS),
90
+ SKELETON_RADIUS_SIZES: Object.freeze(SKELETON_RADIUS_SIZES),
91
+ };
92
+ },
93
+ });
94
+ </script>
@@ -0,0 +1,3 @@
1
+ import Image from './Image.vue';
2
+
3
+ export default Image;
@@ -10,6 +10,7 @@ import {
10
10
  RICH_LIST_ITEM_TYPE,
11
11
  } from '../RichListItem';
12
12
  import { ICON_COLORS, ICONS } from '../../Icons/Icon';
13
+ import { DsImage } from '../../../index';
13
14
 
14
15
  export default {
15
16
  title: 'Components/RichList/BasicRichListItem',
@@ -22,7 +23,108 @@ export default {
22
23
  ],
23
24
  } as Meta<typeof BasicRichListItem>;
24
25
 
25
- const StoryTemplate: StoryFn<typeof BasicRichListItem> = (args, { updateArgs }) => ({
26
+ const expandStory = (story: StoryFn<typeof BasicRichListItem>, args = {}) => {
27
+ story.argTypes = {
28
+ type: {
29
+ options: Object.values(RICH_LIST_ITEM_TYPE),
30
+ control: { type: 'select' },
31
+ },
32
+ size: {
33
+ options: Object.values(RICH_LIST_ITEM_SIZE),
34
+ control: { type: 'select' },
35
+ },
36
+ state: {
37
+ options: Object.values(RICH_LIST_ITEM_STATE),
38
+ control: { type: 'select' },
39
+ },
40
+ iconColor: {
41
+ options: [null, ...Object.values(ICON_COLORS)],
42
+ control: { type: 'select' },
43
+ },
44
+ borderColor: {
45
+ options: [null, ...Object.values(RICH_LIST_ITEM_BORDER_COLOR)],
46
+ control: { type: 'select' },
47
+ },
48
+ icon: {
49
+ options: [null, ...Object.keys(ICONS)],
50
+ control: { type: 'select' },
51
+ },
52
+ iconColorHex: {
53
+ control: { type: 'text' },
54
+ },
55
+ borderColorHex: {
56
+ control: { type: 'text' },
57
+ },
58
+ text: {
59
+ control: { type: 'text' },
60
+ },
61
+ eyebrow: {
62
+ control: { type: 'text' },
63
+ },
64
+ meta: {
65
+ control: { type: 'text' },
66
+ },
67
+ actions: {
68
+ control: { type: 'text' },
69
+ },
70
+ draggableIconClassName: {
71
+ control: { type: 'text' },
72
+ },
73
+ backgroundColor: {
74
+ options: [null, ...Object.values(RICH_LIST_ITEM_BACKGROUND_COLOR)],
75
+ control: { type: 'select' },
76
+ },
77
+ elevation: {
78
+ options: [null, ...Object.values(RICH_LIST_ITEM_ELEVATION)],
79
+ control: { type: 'select' },
80
+ },
81
+ } as ArgTypes;
82
+
83
+ story.args = {
84
+ size: RICH_LIST_ITEM_SIZE.MEDIUM,
85
+ type: RICH_LIST_ITEM_TYPE.DEFAULT,
86
+ backgroundColor: RICH_LIST_ITEM_BACKGROUND_COLOR.NEUTRAL,
87
+ elevation: null,
88
+ isDimmed: false,
89
+ isDraggable: true,
90
+ hasDraggableHandler: true,
91
+ icon: null,
92
+ iconColor: null,
93
+ iconColorHex: '',
94
+ hasActionsSlotDivider: true,
95
+ isSelectable: true,
96
+ isSelected: true,
97
+ borderColor: null,
98
+ borderColorHex: '',
99
+ state: RICH_LIST_ITEM_STATE.DEFAULT,
100
+ isInteractive: true,
101
+ draggableIconClassName: 'draggableIconClassName-1',
102
+
103
+ eyebrow: 'Eyebrow Uppercase',
104
+ text: 'Długa nazwa gdy się nie mieści Praesentium dicta sit. Molestiae unde voluptatem eaque labore.',
105
+ isEyebrowUppercase: false,
106
+
107
+ meta: 'Meta Slot',
108
+ actions: 'ACS',
109
+
110
+ ...args,
111
+ } as Args;
112
+
113
+ story.parameters = {
114
+ actions: {
115
+ handles: ['icon-click', 'click', 'update:is-selected'],
116
+ },
117
+ layout: 'fullscreen',
118
+ design: {
119
+ type: 'figma',
120
+ url: 'https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?type=design&node-id=8673-2345&mode=design&t=QeEz8TmzxDbrGYK3-4',
121
+ },
122
+ };
123
+
124
+ return story;
125
+ };
126
+
127
+ const InteractiveStoryTemplate: StoryFn<typeof BasicRichListItem> = (args, { updateArgs }) => ({
26
128
  components: { BasicRichListItem },
27
129
  setup() {
28
130
  return { ...args };
@@ -70,102 +172,64 @@ const StoryTemplate: StoryFn<typeof BasicRichListItem> = (args, { updateArgs })
70
172
  </basic-rich-list-item>`,
71
173
  });
72
174
 
73
- export const Interactive = StoryTemplate.bind({});
74
-
75
- const args = {
76
- size: RICH_LIST_ITEM_SIZE.MEDIUM,
77
- type: RICH_LIST_ITEM_TYPE.DEFAULT,
78
- backgroundColor: RICH_LIST_ITEM_BACKGROUND_COLOR.NEUTRAL,
79
- elevation: null,
80
- isDimmed: false,
81
- isDraggable: true,
82
- hasDraggableHandler: true,
83
- icon: null,
84
- iconColor: null,
85
- iconColorHex: '',
86
- hasActionsSlotDivider: true,
87
- isSelectable: true,
88
- isSelected: true,
89
- borderColor: null,
90
- borderColorHex: '',
91
- state: RICH_LIST_ITEM_STATE.DEFAULT,
92
- isInteractive: true,
93
- draggableIconClassName: 'draggableIconClassName-1',
175
+ export const Interactive = InteractiveStoryTemplate.bind({});
176
+ expandStory(Interactive);
94
177
 
95
- eyebrow: 'Eyebrow Uppercase',
96
- text: 'Długa nazwa gdy się nie mieści Praesentium dicta sit. Molestiae unde voluptatem eaque labore.',
97
- isEyebrowUppercase: false,
98
-
99
- meta: 'Meta Slot',
100
- actions: 'ACS',
101
- } as Args;
102
-
103
- const argTypes = {
104
- type: {
105
- options: Object.values(RICH_LIST_ITEM_TYPE),
106
- control: { type: 'select' },
107
- },
108
- size: {
109
- options: Object.values(RICH_LIST_ITEM_SIZE),
110
- control: { type: 'select' },
111
- },
112
- state: {
113
- options: Object.values(RICH_LIST_ITEM_STATE),
114
- control: { type: 'select' },
115
- },
116
- iconColor: {
117
- options: [null, ...Object.values(ICON_COLORS)],
118
- control: { type: 'select' },
119
- },
120
- borderColor: {
121
- options: [null, ...Object.values(RICH_LIST_ITEM_BORDER_COLOR)],
122
- control: { type: 'select' },
123
- },
124
- icon: {
125
- options: [null, ...Object.keys(ICONS)],
126
- control: { type: 'select' },
127
- },
128
- iconColorHex: {
129
- control: { type: 'text' },
130
- },
131
- borderColorHex: {
132
- control: { type: 'text' },
133
- },
134
- text: {
135
- control: { type: 'text' },
136
- },
137
- eyebrow: {
138
- control: { type: 'text' },
139
- },
140
- meta: {
141
- control: { type: 'text' },
142
- },
143
- actions: {
144
- control: { type: 'text' },
145
- },
146
- draggableIconClassName: {
147
- control: { type: 'text' },
148
- },
149
- backgroundColor: {
150
- options: [null, ...Object.values(RICH_LIST_ITEM_BACKGROUND_COLOR)],
151
- control: { type: 'select' },
152
- },
153
- elevation: {
154
- options: [null, ...Object.values(RICH_LIST_ITEM_ELEVATION)],
155
- control: { type: 'select' },
156
- },
157
- } as ArgTypes;
158
-
159
- Interactive.argTypes = argTypes;
160
- Interactive.args = args;
161
-
162
- Interactive.parameters = {
163
- actions: {
164
- handles: ['icon-click', 'click', 'update:is-selected'],
165
- },
166
- layout: 'fullscreen',
167
- design: {
168
- type: 'figma',
169
- url: 'https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?type=design&node-id=8673-2345&mode=design&t=QeEz8TmzxDbrGYK3-4',
170
- },
178
+ const WithMediaStoryTemplate: StoryFn<typeof BasicRichListItem> = (args, { updateArgs }) => {
179
+ return {
180
+ components: { BasicRichListItem, DsImage },
181
+ setup() {
182
+ return { ...args };
183
+ },
184
+ data() {
185
+ return {
186
+ ICONS: Object.freeze(ICONS),
187
+ };
188
+ },
189
+ methods: {
190
+ updateIsSelected(isSelected) {
191
+ updateArgs({ isSelected });
192
+ },
193
+ },
194
+ template: `
195
+ <basic-rich-list-item
196
+ :size="size"
197
+ :type="type"
198
+ :is-interactive="isInteractive"
199
+ :is-draggable="isDraggable"
200
+ :icon="ICONS[icon]"
201
+ :icon-color="iconColor"
202
+ :icon-color-hex="iconColorHex"
203
+ :is-dimmed="isDimmed"
204
+ :border-color="borderColor"
205
+ :border-color-hex="borderColorHex"
206
+ :state="state"
207
+ :text="text"
208
+ :eyebrow="eyebrow"
209
+ :is-eyebrow-uppercase="isEyebrowUppercase"
210
+ :background-color="backgroundColor"
211
+ :elevation="elevation"
212
+ :has-draggable-handler="hasDraggableHandler"
213
+ :has-actions-slot-divider="hasActionsSlotDivider"
214
+ :is-selectable="isSelectable"
215
+ :is-selected="isSelected"
216
+ @update:is-selected="updateIsSelected"
217
+ >
218
+ <template #media>
219
+ <ds-image :src="imageSrcUsedInStoryBook" />
220
+ </template>
221
+ <template v-if="meta" #meta>
222
+ <div v-html="meta" />
223
+ </template>
224
+ <template v-if="actions" #actions>
225
+ <div v-html="actions" />
226
+ </template>
227
+ </basic-rich-list-item>`,
228
+ };
171
229
  };
230
+
231
+ export const WithMedia = WithMediaStoryTemplate.bind({});
232
+ expandStory(WithMedia, {
233
+ imageSrcUsedInStoryBook:
234
+ 'https://storage.googleapis.com/media-manager/lek/018f6291-3956-7342-8e6b-0ee901d48643/018f6291-3a56-7213-aef6-b5da7253839f.jpg',
235
+ });
@@ -23,6 +23,9 @@
23
23
  }"
24
24
  @update:is-selected="$emit('update:is-selected', $event)"
25
25
  >
26
+ <template v-if="$slots.media" #media>
27
+ <slot name="media" />
28
+ </template>
26
29
  <template #content>
27
30
  <div class="ds-basicRichListItem__content">
28
31
  <div
@@ -127,8 +130,8 @@ import RichListItem, {
127
130
  RichListItemState,
128
131
  RichListItemType,
129
132
  } from '../RichListItem';
130
- import { PropType } from 'vue';
131
- import { ICON_COLORS, IconColor } from '../../Icons/Icon';
133
+ import { PropType, toRaw } from 'vue';
134
+ import { ICON_COLORS, IconColor, IconItem, ICONS } from '../../Icons/Icon';
132
135
 
133
136
  export default {
134
137
  name: 'BasicRichListItem',
@@ -170,8 +173,11 @@ export default {
170
173
  default: true,
171
174
  },
172
175
  icon: {
173
- type: String,
176
+ type: Object as PropType<IconItem>,
174
177
  default: null,
178
+ validator(icon) {
179
+ return Object.values(ICONS).includes(toRaw(icon));
180
+ },
175
181
  },
176
182
  iconColor: {
177
183
  type: String as PropType<IconColor>,