@bethinkpl/design-system 16.5.0 → 16.6.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 (64) hide show
  1. package/.eslintrc.js +1 -0
  2. package/dist/design-system.umd.js +982 -238
  3. package/dist/design-system.umd.js.map +1 -1
  4. package/dist/lib/js/components/Banner/Banner.vue.d.ts +1 -0
  5. package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +1 -0
  6. package/dist/lib/js/components/Drawer/DrawerContent/DrawerContent.vue.d.ts +4 -3
  7. package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +218 -3
  8. package/dist/lib/js/components/Dropdown/Dropdown.vue.d.ts +1 -0
  9. package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +1 -0
  10. package/dist/lib/js/components/Layouts/ThreeColumnLayout/ThreeColumnLayout.vue.d.ts +1 -0
  11. package/dist/lib/js/components/Modal/Modal.vue.d.ts +1 -0
  12. package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +1 -0
  13. package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +1 -0
  14. package/dist/lib/js/components/Outline/OutlineDivider/OutlineDivider.stories.d.ts +5 -0
  15. package/dist/lib/js/components/Outline/OutlineDivider/OutlineDivider.vue.d.ts +20 -0
  16. package/dist/lib/js/components/Outline/OutlineDivider/index.d.ts +2 -0
  17. package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.consts.d.ts +12 -0
  18. package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.stories.d.ts +5 -0
  19. package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.vue.d.ts +275 -0
  20. package/dist/lib/js/components/Outline/OutlineItem/index.d.ts +3 -0
  21. package/dist/lib/js/components/Outline/OutlineSectionHeader/OutlineSectionHeader.stories.d.ts +5 -0
  22. package/dist/lib/js/components/Outline/OutlineSectionHeader/OutlineSectionHeader.vue.d.ts +10 -0
  23. package/dist/lib/js/components/Outline/OutlineSectionHeader/index.d.ts +2 -0
  24. package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +1 -0
  25. package/dist/lib/js/components/Pill/Pill.vue.d.ts +1 -0
  26. package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue.d.ts +8 -3
  27. package/dist/lib/js/components/SelectList/SelectListItemTile/SelectListItemTile.vue.d.ts +59 -3
  28. package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue.d.ts +57 -3
  29. package/dist/lib/js/components/SelectList/SelectListSectionTitle/SelectListSectionTitle.vue.d.ts +14 -3
  30. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +1 -0
  31. package/dist/lib/js/components/TabItem/TabItem.vue.d.ts +1 -0
  32. package/dist/lib/js/index.d.ts +4 -0
  33. package/docs/iframe.html +1 -1
  34. package/docs/main.36230dbf.iframe.bundle.js +1 -0
  35. package/docs/project.json +1 -1
  36. package/lib/js/components/Banner/Banner.vue +1 -0
  37. package/lib/js/components/Cards/CardExpandable/CardExpandable.vue +1 -0
  38. package/lib/js/components/Dropdown/Dropdown.vue +1 -0
  39. package/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue +1 -0
  40. package/lib/js/components/Headers/SectionHeader/SectionHeader.vue +1 -0
  41. package/lib/js/components/Layouts/ThreeColumnLayout/ThreeColumnLayout.vue +1 -0
  42. package/lib/js/components/Modal/Modal.vue +1 -0
  43. package/lib/js/components/Modals/Modal/Modal.vue +7 -0
  44. package/lib/js/components/Modals/ModalDialog/ModalDialog.vue +1 -0
  45. package/lib/js/components/Outline/OutlineDivider/OutlineDivider.stories.ts +38 -0
  46. package/lib/js/components/Outline/OutlineDivider/OutlineDivider.vue +36 -0
  47. package/lib/js/components/Outline/OutlineDivider/index.ts +3 -0
  48. package/lib/js/components/Outline/OutlineItem/OutlineItem.consts.ts +13 -0
  49. package/lib/js/components/Outline/OutlineItem/OutlineItem.stories.ts +94 -0
  50. package/lib/js/components/Outline/OutlineItem/OutlineItem.vue +306 -0
  51. package/lib/js/components/Outline/OutlineItem/index.ts +4 -0
  52. package/lib/js/components/Outline/OutlineSectionHeader/OutlineSectionHeader.stories.ts +33 -0
  53. package/lib/js/components/Outline/OutlineSectionHeader/OutlineSectionHeader.vue +28 -0
  54. package/lib/js/components/Outline/OutlineSectionHeader/index.ts +3 -0
  55. package/lib/js/components/Pagination/Pagination.vue +1 -0
  56. package/lib/js/components/Pill/Pill.vue +1 -0
  57. package/lib/js/components/PopOver/PopOver.vue +1 -0
  58. package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue +1 -0
  59. package/lib/js/components/TabItem/TabItem.vue +1 -0
  60. package/lib/js/index.ts +4 -0
  61. package/package.json +1 -1
  62. package/.env +0 -1
  63. package/.yarnrc.yml +0 -1
  64. package/docs/main.8bf14698.iframe.bundle.js +0 -1
package/docs/project.json CHANGED
@@ -1 +1 @@
1
- {"generatedAt":1684849448870,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"metaFramework":{"name":"vue-cli","packageName":"@vue/cli-service","version":"5.0.4"},"packageManager":{"type":"yarn","version":"1.22.19"},"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":1685017383139,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"metaFramework":{"name":"vue-cli","packageName":"@vue/cli-service","version":"5.0.4"},"packageManager":{"type":"yarn","version":"1.22.19"},"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"}}}
@@ -342,6 +342,7 @@ export default {
342
342
  default: false,
343
343
  },
344
344
  },
345
+ emits: ['button-clicked', 'close', 'update:isExpanded'],
345
346
  data() {
346
347
  return {
347
348
  isExpandedInternal: false,
@@ -112,6 +112,7 @@ export default {
112
112
  default: false,
113
113
  },
114
114
  },
115
+ emits: ['update:isExpanded'],
115
116
  data() {
116
117
  return {
117
118
  isExpandedInternal: false,
@@ -114,6 +114,7 @@ export default {
114
114
  },
115
115
  },
116
116
  },
117
+ emits: ['document-click', 'hide', 'show'],
117
118
  data() {
118
119
  return {
119
120
  key: 1,
@@ -295,6 +295,7 @@ export default {
295
295
  default: false,
296
296
  },
297
297
  },
298
+ emits: ['close', 'titleClick'],
298
299
  data() {
299
300
  return {
300
301
  ICON_BUTTON_SIZES: Object.freeze(ICON_BUTTON_SIZES),
@@ -156,6 +156,7 @@
156
156
  }
157
157
 
158
158
  &__info {
159
+ line-height: 0;
159
160
  padding: $space-xxxs 0;
160
161
  }
161
162
 
@@ -235,6 +235,7 @@ export default {
235
235
  default: false,
236
236
  },
237
237
  },
238
+ emits: ['overlay-clicked'],
238
239
  data() {
239
240
  return {
240
241
  THREE_COLUMN_LAYOUT_RIGHT_COLUMN_SIZE: Object.freeze(
@@ -117,6 +117,7 @@ export default {
117
117
  default: false,
118
118
  },
119
119
  },
120
+ emits: ['close-modal'],
120
121
  data() {
121
122
  return {
122
123
  ICONS: Object.freeze(ICONS),
@@ -404,6 +404,13 @@ export default {
404
404
  default: null,
405
405
  },
406
406
  },
407
+ emits: [
408
+ 'tertiary-button-click',
409
+ 'checkbox-change',
410
+ 'close-modal',
411
+ 'secondary-button-click',
412
+ 'primary-button-click',
413
+ ],
407
414
  data() {
408
415
  return {
409
416
  BUTTON_COLORS: Object.freeze(BUTTON_COLORS),
@@ -86,6 +86,7 @@ export default {
86
86
  },
87
87
  },
88
88
  },
89
+ emits: ['close-modal', 'primary-button-click', 'secondary-button-click'],
89
90
  data() {
90
91
  return {
91
92
  MODAL_SIZES: Object.freeze(MODAL_SIZES),
@@ -0,0 +1,38 @@
1
+ import OutlineDivider from './OutlineDivider.vue';
2
+ import { ArgTypes, Meta, StoryFn } from '@storybook/vue3';
3
+ import { DIVIDER_PROMINENCES, DIVIDER_SIZES } from '../../Divider';
4
+
5
+ export default {
6
+ title: 'Components/Outline/OutlineDivider',
7
+ component: OutlineDivider,
8
+ } as Meta<typeof OutlineDivider>;
9
+
10
+ const StoryTemplate: StoryFn<typeof OutlineDivider> = (args) => ({
11
+ components: { OutlineDivider },
12
+ setup() {
13
+ return { ...args };
14
+ },
15
+ template: `<outline-divider :prominence="prominence" :size="size" />`,
16
+ });
17
+
18
+ export const Interactive = StoryTemplate.bind({});
19
+
20
+ const argTypes = {
21
+ prominence: {
22
+ control: { type: 'select', options: Object.values(DIVIDER_PROMINENCES) },
23
+ defaultValue: DIVIDER_PROMINENCES.DEFAULT,
24
+ },
25
+ size: {
26
+ control: { type: 'select', options: Object.values(DIVIDER_SIZES) },
27
+ defaultValue: DIVIDER_SIZES.S,
28
+ },
29
+ } as ArgTypes;
30
+
31
+ Interactive.argTypes = argTypes;
32
+
33
+ Interactive.parameters = {
34
+ design: {
35
+ type: 'figma',
36
+ url: 'https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?type=design&node-id=6148-111431&t=Amd0mke9FMknuKCX-0',
37
+ },
38
+ };
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <div class="outlineDivider">
3
+ <ds-divider :prominence="prominence" :size="size" />
4
+ </div>
5
+ </template>
6
+
7
+ <style scoped lang="scss">
8
+ @import '../../../../styles/settings/spacings';
9
+
10
+ .outlineDivider {
11
+ padding: $space-xxxs 0;
12
+ }
13
+ </style>
14
+
15
+ <script lang="ts">
16
+ import DsDivider, { DIVIDER_PROMINENCES, DIVIDER_SIZES } from '../../Divider';
17
+
18
+ export default {
19
+ name: 'OutlineDivider',
20
+ components: {
21
+ DsDivider,
22
+ },
23
+ props: {
24
+ prominence: {
25
+ type: String,
26
+ default: DIVIDER_PROMINENCES.DEFAULT,
27
+ validator: (value: string) => Object.values(DIVIDER_PROMINENCES).includes(value),
28
+ },
29
+ size: {
30
+ type: String,
31
+ default: DIVIDER_SIZES.S,
32
+ validator: (value: string) => Object.values(DIVIDER_SIZES).includes(value),
33
+ },
34
+ },
35
+ };
36
+ </script>
@@ -0,0 +1,3 @@
1
+ import OutlineDivider from './OutlineDivider.vue';
2
+
3
+ export default OutlineDivider;
@@ -0,0 +1,13 @@
1
+ export const OUTLINE_ITEM_SIZES = {
2
+ SMALL: 'small',
3
+ MEDIUM: 'medium',
4
+ };
5
+ export const OUTLINE_ITEM_STATES = {
6
+ DEFAULT: 'default',
7
+ DISABLED: 'disabled',
8
+ };
9
+
10
+ export const OUTLINE_ITEM_BACKGROUND_COLORS = {
11
+ NEUTRAL_WEAK: 'neutralWeak',
12
+ NEUTRAL: 'neutral',
13
+ };
@@ -0,0 +1,94 @@
1
+ import OutlineItem from './OutlineItem.vue';
2
+ import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
3
+ import { ICONS } from '../../Icons/Icon';
4
+ import {
5
+ OUTLINE_ITEM_BACKGROUND_COLORS,
6
+ OUTLINE_ITEM_SIZES,
7
+ OUTLINE_ITEM_STATES,
8
+ } from './OutlineItem.consts';
9
+
10
+ export default {
11
+ title: 'Components/Outline/OutlineItem',
12
+ component: OutlineItem,
13
+ } as Meta<typeof OutlineItem>;
14
+
15
+ const StoryTemplate: StoryFn<typeof OutlineItem> = (args) => ({
16
+ components: { OutlineItem },
17
+ setup() {
18
+ return { ...args };
19
+ },
20
+ data() {
21
+ return {
22
+ ICONS: Object.freeze(ICONS),
23
+ };
24
+ },
25
+ template: `<outline-item :label="label" :additional-text="additionalText" :size="size" :state="state" :icon-left="ICONS[iconLeft]" :icon-right="ICONS[iconRight]" :is-done="isDone" :is-selected="isSelected" :background-color="backgroundColor" :index="index" :is-label-uppercase="isLabelUppercase" :icon-right-rotation="iconRightRotation" :has-selected-icons-color-primary="hasSelectedIconsColorPrimary" :is-selected-interactive="isSelectedInteractive"><div v-if="defaultSlot && defaultSlot.length > 0" v-html="defaultSlot" style="font-size: 14px; line-height: 16px;"></div></outline-item>`,
26
+ });
27
+
28
+ export const Interactive = StoryTemplate.bind({});
29
+
30
+ const args = {} as Args;
31
+
32
+ const argTypes = {
33
+ defaultSlot: { control: { type: 'text' }, defaultValue: 'Default slot' },
34
+ size: {
35
+ control: { type: 'select', options: Object.values(OUTLINE_ITEM_SIZES) },
36
+ defaultValue: OUTLINE_ITEM_SIZES.SMALL,
37
+ },
38
+ backgroundColor: {
39
+ control: { type: 'select', options: Object.values(OUTLINE_ITEM_BACKGROUND_COLORS) },
40
+ defaultValue: OUTLINE_ITEM_BACKGROUND_COLORS.NEUTRAL_WEAK,
41
+ },
42
+ iconLeft: {
43
+ control: { type: 'select', options: [null, ...Object.keys(ICONS)] },
44
+ defaultValue: null,
45
+ },
46
+ iconRight: {
47
+ control: { type: 'select', options: [null, ...Object.keys(ICONS)] },
48
+ defaultValue: null,
49
+ },
50
+ iconRightRotation: {
51
+ control: { type: 'select', options: [null, 90, 180, 270] },
52
+ defaultValue: null,
53
+ },
54
+ index: {
55
+ control: { type: 'number' },
56
+ defaultValue: null,
57
+ },
58
+ label: { control: { type: 'text' }, defaultValue: 'Outline Item label' },
59
+ isLabelUppercase: {
60
+ control: { type: 'boolean' },
61
+ defaultValue: false,
62
+ },
63
+ additionalText: { control: { type: 'text' } },
64
+ state: {
65
+ control: { type: 'select', options: Object.values(OUTLINE_ITEM_STATES) },
66
+ defaultValue: OUTLINE_ITEM_STATES.DEFAULT,
67
+ },
68
+ isSelected: {
69
+ control: { type: 'boolean' },
70
+ defaultValue: false,
71
+ },
72
+ isDone: {
73
+ control: { type: 'boolean' },
74
+ defaultValue: false,
75
+ },
76
+ hasSelectedIconsColorPrimary: {
77
+ control: { type: 'boolean' },
78
+ defaultValue: true,
79
+ },
80
+ isSelectedInteractive: {
81
+ control: { type: 'boolean' },
82
+ defaultValue: false,
83
+ },
84
+ } as ArgTypes;
85
+
86
+ Interactive.argTypes = argTypes;
87
+ Interactive.args = args;
88
+
89
+ Interactive.parameters = {
90
+ design: {
91
+ type: 'figma',
92
+ url: 'https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?type=design&node-id=6148-111431&t=Amd0mke9FMknuKCX-0',
93
+ },
94
+ };
@@ -0,0 +1,306 @@
1
+ <template>
2
+ <div
3
+ v-ripple:disabled="isSelected && !isSelectedInteractive"
4
+ class="outlineItem"
5
+ :class="{
6
+ '-disabled': isDisabled,
7
+ '-medium': size === OUTLINE_ITEM_SIZES.MEDIUM,
8
+ '-selected': isSelected,
9
+ '-hoverable': !isSelected || isSelectedInteractive,
10
+ '-backgroundNeutral': backgroundColor === OUTLINE_ITEM_BACKGROUND_COLORS.NEUTRAL,
11
+ }"
12
+ >
13
+ <div class="outlineItem__content">
14
+ <span
15
+ v-if="index !== null"
16
+ class="outlineItem__index"
17
+ :class="{ '-active': isSelected }"
18
+ >
19
+ {{ index }}.
20
+ </span>
21
+ <ds-icon
22
+ v-if="iconLeft"
23
+ class="outlineItem__icon"
24
+ :class="{
25
+ '-active': isSelected && hasSelectedIconsColorPrimary,
26
+ }"
27
+ :icon="iconLeft"
28
+ :size="ICON_SIZES.X_SMALL"
29
+ />
30
+ <span class="outlineItem__text">
31
+ <span class="outlineItem__label" :class="{ '-uppercase': isLabelUppercase }">
32
+ {{ label }}
33
+ </span>
34
+ <span v-if="additionalText" class="outlineItem__additionalText">
35
+ {{ additionalText }}
36
+ </span>
37
+ </span>
38
+ </div>
39
+ <div class="outlineItem__rightContent">
40
+ <template v-if="$slots.default">
41
+ <slot />
42
+ </template>
43
+ <ds-icon
44
+ v-if="isDone"
45
+ class="outlineItem__icon -active"
46
+ :icon="ICONS.FA_CHECK_SOLID"
47
+ :size="ICON_SIZES.X_SMALL"
48
+ />
49
+ <ds-icon
50
+ v-else-if="iconRight"
51
+ class="outlineItem__icon"
52
+ :class="{
53
+ '-active': isSelected && hasSelectedIconsColorPrimary,
54
+ }"
55
+ :icon="iconRight"
56
+ :size="ICON_SIZES.X_SMALL"
57
+ :rotation="iconRightRotation"
58
+ ></ds-icon>
59
+ </div>
60
+ </div>
61
+ </template>
62
+
63
+ <style scoped lang="scss">
64
+ @import '../../../../styles/settings/radiuses';
65
+ @import '../../../../styles/settings/spacings';
66
+ @import '../../../../styles/settings/colors/tokens';
67
+ @import '../../../../styles/settings/typography/tokens';
68
+
69
+ .outlineItem {
70
+ $root: &;
71
+ $border-width: 2px;
72
+
73
+ background-color: $color-neutral-background-weak;
74
+ border-radius: $radius-s;
75
+ column-gap: $space-xxs;
76
+ display: flex;
77
+ justify-content: space-between;
78
+ padding: $space-xs;
79
+
80
+ &__rightContent,
81
+ &__content {
82
+ align-items: center;
83
+ column-gap: $space-xxs;
84
+ display: inline-flex;
85
+ }
86
+
87
+ &__index {
88
+ @include label-l-default-bold;
89
+
90
+ align-self: flex-start;
91
+ color: $color-neutral-text-weak;
92
+
93
+ &.-active {
94
+ color: $color-primary-text;
95
+ }
96
+ }
97
+
98
+ &__text {
99
+ @include label-l-default-regular; //it fixes whole component height
100
+ }
101
+
102
+ &__label {
103
+ @include label-l-default-regular;
104
+
105
+ color: $color-neutral-text-heavy;
106
+
107
+ &.-uppercase {
108
+ @include label-l-default-regular-uppercase;
109
+ }
110
+ }
111
+
112
+ &__additionalText {
113
+ @include label-m-default-bold;
114
+
115
+ color: $color-neutral-text-weak;
116
+ margin-left: $space-xxxxs;
117
+ }
118
+
119
+ &__icon {
120
+ align-self: flex-start;
121
+ color: $color-neutral-icon-weak;
122
+
123
+ &.-active {
124
+ color: $color-primary-icon;
125
+ }
126
+ }
127
+
128
+ &.-hoverable:hover {
129
+ background-color: $color-neutral-background-weak-hovered;
130
+ cursor: pointer;
131
+ }
132
+
133
+ &.-selected {
134
+ background-color: $color-neutral-background;
135
+ border-left: $border-width solid $color-primary-border;
136
+ border-radius: $radius-xs $radius-s $radius-s $radius-xs;
137
+ padding-left: $space-xs - $border-width;
138
+ }
139
+
140
+ &.-disabled {
141
+ pointer-events: none;
142
+
143
+ &.-selected {
144
+ border-left: $border-width solid $color-primary-border-disabled;
145
+ }
146
+
147
+ #{$root}__icon {
148
+ color: $color-neutral-icon-weak-disabled;
149
+
150
+ &.-active {
151
+ color: $color-primary-icon-disabled;
152
+ }
153
+ }
154
+
155
+ #{$root}__index {
156
+ color: $color-neutral-text-weak-disabled;
157
+
158
+ &.-active {
159
+ color: $color-primary-text-disabled;
160
+ }
161
+ }
162
+
163
+ #{$root}__label {
164
+ color: $color-neutral-text-heavy-disabled;
165
+ }
166
+ }
167
+
168
+ &.-medium {
169
+ padding: $space-s $space-xs;
170
+
171
+ #{$root}__content {
172
+ column-gap: $space-xxxs;
173
+ }
174
+
175
+ #{$root}__label {
176
+ @include label-l-default-bold;
177
+
178
+ &.-uppercase {
179
+ @include label-l-default-bold-uppercase;
180
+ }
181
+ }
182
+
183
+ &.-selected {
184
+ padding-left: $space-xs - $border-width;
185
+ }
186
+ }
187
+
188
+ &.-backgroundNeutral {
189
+ background-color: $color-neutral-background;
190
+
191
+ &.-hoverable:hover {
192
+ background-color: $color-neutral-background-hovered;
193
+ }
194
+ }
195
+ }
196
+ </style>
197
+
198
+ <script lang="ts">
199
+ import DsIcon, { ICON_SIZES, ICONS } from '../../Icons/Icon';
200
+ import { toRaw } from 'vue';
201
+ import {
202
+ OUTLINE_ITEM_BACKGROUND_COLORS,
203
+ OUTLINE_ITEM_SIZES,
204
+ OUTLINE_ITEM_STATES,
205
+ } from './OutlineItem.consts';
206
+ import Ripple from 'vue-ripple-directive';
207
+
208
+ export default {
209
+ name: 'OutlineItem',
210
+ components: {
211
+ DsIcon,
212
+ },
213
+ directives: {
214
+ ripple: Ripple,
215
+ },
216
+ props: {
217
+ size: {
218
+ type: String,
219
+ default: OUTLINE_ITEM_SIZES.SMALL,
220
+ validator(size) {
221
+ return Object.values(OUTLINE_ITEM_SIZES).includes(size);
222
+ },
223
+ },
224
+ backgroundColor: {
225
+ type: String,
226
+ default: OUTLINE_ITEM_BACKGROUND_COLORS.NEUTRAL_WEAK,
227
+ validator(color) {
228
+ return Object.values(OUTLINE_ITEM_BACKGROUND_COLORS).includes(color);
229
+ },
230
+ },
231
+ iconLeft: {
232
+ type: Object,
233
+ default: null,
234
+ validator(icon) {
235
+ return icon == null || Object.values(ICONS).includes(toRaw(icon));
236
+ },
237
+ },
238
+ iconRight: {
239
+ type: Object,
240
+ default: null,
241
+ validator(icon) {
242
+ return icon == null || Object.values(ICONS).includes(toRaw(icon));
243
+ },
244
+ },
245
+ iconRightRotation: {
246
+ type: Number,
247
+ default: null,
248
+ validator(value: number) {
249
+ return [90, 180, 270].includes(value);
250
+ },
251
+ },
252
+ index: {
253
+ type: Number,
254
+ default: null,
255
+ },
256
+ label: {
257
+ type: String,
258
+ required: true,
259
+ },
260
+ isLabelUppercase: {
261
+ type: Boolean,
262
+ default: false,
263
+ },
264
+ additionalText: {
265
+ type: String,
266
+ default: null,
267
+ },
268
+ state: {
269
+ type: String,
270
+ default: OUTLINE_ITEM_STATES.DEFAULT,
271
+ validator(state) {
272
+ return Object.values(OUTLINE_ITEM_STATES).includes(state);
273
+ },
274
+ },
275
+ isSelected: {
276
+ type: Boolean,
277
+ default: false,
278
+ },
279
+ isDone: {
280
+ type: Boolean,
281
+ default: false,
282
+ },
283
+ hasSelectedIconsColorPrimary: {
284
+ type: Boolean,
285
+ default: true,
286
+ },
287
+ isSelectedInteractive: {
288
+ type: Boolean,
289
+ default: false,
290
+ },
291
+ },
292
+ data() {
293
+ return {
294
+ ICONS: Object.freeze(ICONS),
295
+ ICON_SIZES: Object.freeze(ICON_SIZES),
296
+ OUTLINE_ITEM_BACKGROUND_COLORS: Object.freeze(OUTLINE_ITEM_BACKGROUND_COLORS),
297
+ OUTLINE_ITEM_SIZES: Object.freeze(OUTLINE_ITEM_SIZES),
298
+ };
299
+ },
300
+ computed: {
301
+ isDisabled() {
302
+ return this.state === OUTLINE_ITEM_STATES.DISABLED;
303
+ },
304
+ },
305
+ };
306
+ </script>
@@ -0,0 +1,4 @@
1
+ import OutlineItem from './OutlineItem.vue';
2
+
3
+ export default OutlineItem;
4
+ export * from './OutlineItem.consts';
@@ -0,0 +1,33 @@
1
+ import OutlineSectionHeader from './OutlineSectionHeader.vue';
2
+ import { ArgTypes, Meta, StoryFn } from '@storybook/vue3';
3
+
4
+ export default {
5
+ title: 'Components/Outline/OutlineSectionHeader',
6
+ component: OutlineSectionHeader,
7
+ } as Meta<typeof OutlineSectionHeader>;
8
+
9
+ const StoryTemplate: StoryFn<typeof OutlineSectionHeader> = (args) => ({
10
+ components: { OutlineSectionHeader },
11
+ setup() {
12
+ return { ...args };
13
+ },
14
+ template: `<outline-section-header :title="title" />`,
15
+ });
16
+
17
+ export const Interactive = StoryTemplate.bind({});
18
+
19
+ const argTypes = {
20
+ title: {
21
+ control: { type: 'text' },
22
+ defaultValue: 'section header all caps',
23
+ },
24
+ } as ArgTypes;
25
+
26
+ Interactive.argTypes = argTypes;
27
+
28
+ Interactive.parameters = {
29
+ design: {
30
+ type: 'figma',
31
+ url: 'https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?type=design&node-id=6148-111431&t=Amd0mke9FMknuKCX-0',
32
+ },
33
+ };
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div class="outlineSectionHeader">{{ title }}</div>
3
+ </template>
4
+
5
+ <style scoped lang="scss">
6
+ @import '../../../../styles/settings/spacings';
7
+ @import '../../../../styles/settings/colors/tokens';
8
+ @import '../../../../styles/settings/typography/tokens';
9
+
10
+ .outlineSectionHeader {
11
+ @include info-s-extensive-bold-uppercase;
12
+
13
+ color: $color-neutral-text-weak;
14
+ padding: $space-xxs 0;
15
+ }
16
+ </style>
17
+
18
+ <script lang="ts">
19
+ export default {
20
+ name: 'OutlineSectionHeader',
21
+ props: {
22
+ title: {
23
+ type: String,
24
+ required: true,
25
+ },
26
+ },
27
+ };
28
+ </script>
@@ -0,0 +1,3 @@
1
+ import OutlineSectionHeader from './OutlineSectionHeader.vue';
2
+
3
+ export default OutlineSectionHeader;
@@ -275,6 +275,7 @@ export default {
275
275
  required: true,
276
276
  },
277
277
  },
278
+ emits: ['change-page'],
278
279
  data() {
279
280
  return {
280
281
  ICON_BUTTON_SIZES: Object.freeze(ICON_BUTTON_SIZES),
@@ -254,6 +254,7 @@ export default {
254
254
  default: false,
255
255
  },
256
256
  },
257
+ emits: ['delete'],
257
258
  data() {
258
259
  return {
259
260
  ICONS: Object.freeze(ICONS),
@@ -273,6 +273,7 @@ export default {
273
273
  default: '',
274
274
  },
275
275
  },
276
+ emits: ['button-click'],
276
277
  data() {
277
278
  return {
278
279
  POP_OVER_COLORS: Object.freeze(POP_OVER_COLORS),