@bethinkpl/design-system 32.0.0 → 33.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 (46) hide show
  1. package/dist/design-system.css +1 -1
  2. package/dist/design-system.js +7911 -7833
  3. package/dist/design-system.js.map +1 -1
  4. package/dist/lib/js/components/Banner/Banner.vue.d.ts +53 -34
  5. package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +3 -0
  6. package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +3 -0
  7. package/dist/lib/js/components/Chip/Chip.vue.d.ts +6 -0
  8. package/dist/lib/js/components/DatePickers/DateBox/DateBox.vue.d.ts +3 -0
  9. package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +3 -0
  10. package/dist/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue.d.ts +3 -0
  11. package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +12 -0
  12. package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +3 -0
  13. package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +21 -7
  14. package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +3 -0
  15. package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +6 -0
  16. package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +6 -0
  17. package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +3 -0
  18. package/dist/lib/js/components/Menu/MenuItem/MenuItem.consts.d.ts +0 -4
  19. package/dist/lib/js/components/Menu/MenuItem/MenuItem.vue.d.ts +105 -49
  20. package/dist/lib/js/components/Modal/Modal.vue.d.ts +3 -0
  21. package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +6 -0
  22. package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +6 -0
  23. package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +9 -0
  24. package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +3 -0
  25. package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +3 -0
  26. package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +3 -0
  27. package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +3 -0
  28. package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.vue.d.ts +3 -0
  29. package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue.d.ts +3 -0
  30. package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +3 -0
  31. package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +3 -0
  32. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +9 -0
  33. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +9 -0
  34. package/dist/lib/js/components/Switch/Switch.vue.d.ts +3 -0
  35. package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +6 -14
  36. package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +3 -0
  37. package/dist/lib/js/icons/fontawesome.d.ts +3 -0
  38. package/lib/js/components/Banner/Banner.vue +7 -36
  39. package/lib/js/components/Drawer/DrawerSection/DrawerSection.stories.ts +16 -7
  40. package/lib/js/components/Drawer/DrawerSection/DrawerSection.vue +15 -4
  41. package/lib/js/components/Menu/MenuItem/MenuItem.consts.ts +0 -9
  42. package/lib/js/components/Menu/MenuItem/MenuItem.spec.ts +102 -23
  43. package/lib/js/components/Menu/MenuItem/MenuItem.stories.ts +103 -27
  44. package/lib/js/components/Menu/MenuItem/MenuItem.vue +138 -57
  45. package/lib/js/icons/fontawesome.ts +6 -0
  46. package/package.json +1 -1
@@ -3,41 +3,49 @@ import DsChip from '../../Chip/Chip.vue';
3
3
  import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
4
4
  import { toRefs } from 'vue';
5
5
  import { ICONS } from '../../Icons/Icon';
6
- import {
7
- MENU_ITEM_ACCESSORY_STATES,
8
- MENU_ITEM_BACKGROUND_COLORS,
9
- MENU_ITEM_SIZES,
10
- MENU_ITEM_STATES,
11
- } from './MenuItem.consts';
6
+ import SectionHeader, { SECTION_HEADER_SIZES } from '../../Headers/SectionHeader';
7
+ import { MENU_ITEM_BACKGROUND_COLORS, MENU_ITEM_SIZES, MENU_ITEM_STATES } from './MenuItem.consts';
12
8
  import DsMenu from '../Menu';
13
9
  import SlotPlaceholder, {
14
10
  SLOT_PLACEHOLDER_SIZES,
15
11
  } from '../../../../../.storybook/SlotPlaceholder/SlotPlaceholder.vue';
12
+ import { useArgs } from '@storybook/preview-api';
16
13
 
17
14
  export default {
18
15
  title: 'Components/Menu/MenuItem',
19
16
  component: MenuItem,
20
17
  } as Meta<typeof MenuItem>;
21
18
 
22
- const StoryTemplate: StoryFn<typeof MenuItem> = (args) => ({
23
- components: { MenuItem, DsChip, SlotPlaceholder },
24
- setup() {
25
- const reactiveArgs = toRefs(args);
19
+ const StoryTemplate: StoryFn<typeof MenuItem> = (args) => {
20
+ const [_, updateArgs] = useArgs();
26
21
 
27
- return {
28
- ...reactiveArgs,
29
- ICONS,
30
- SLOT_PLACEHOLDER_SIZES,
31
- };
32
- },
33
- template: `
22
+ return {
23
+ components: { MenuItem, DsChip, SlotPlaceholder },
24
+ setup() {
25
+ const reactiveArgs = toRefs(args);
26
+
27
+ return {
28
+ ...reactiveArgs,
29
+ ICONS,
30
+ SLOT_PLACEHOLDER_SIZES,
31
+ };
32
+ },
33
+ methods: {
34
+ isExpandedUpdated(isExpanded: boolean) {
35
+ updateArgs({
36
+ isExpanded,
37
+ });
38
+ },
39
+ },
40
+ template: `
34
41
  <menu-item :label="label" :additional-text="additionalText" :size="size" :state="state"
35
42
  :icon-left="ICONS[iconLeft]" :icon-right="ICONS[iconRight]" :is-done="isDone"
36
43
  :is-selected="isSelected" :background-color="backgroundColor" :index="index"
37
44
  :is-label-uppercase="isLabelUppercase" :icon-right-rotation="iconRightRotation"
38
- :has-selected-icons-color-primary="hasSelectedIconsColorPrimary"
45
+ :has-selected-accessories-primary="hasSelectedAccessoriesPrimary"
39
46
  :is-selected-interactive="isSelectedInteractive" :level="level"
40
- :accessoryState="accessoryState">
47
+ :is-expandable="isExpandable" :is-expanded="isExpanded"
48
+ @update:isExpanded="isExpandedUpdated">
41
49
  <template #labelSlot v-if="labelSlot">
42
50
  <span v-html="labelSlot" />
43
51
  </template>
@@ -45,10 +53,11 @@ const StoryTemplate: StoryFn<typeof MenuItem> = (args) => ({
45
53
  <slot-placeholder label="defaul slot" :size="SLOT_PLACEHOLDER_SIZES.SMALL" />
46
54
  </template>
47
55
  <template #children>
48
- <slot-placeholder label="children slot" />
56
+ <slot-placeholder label="children slot" :size="SLOT_PLACEHOLDER_SIZES.MEDIUM" />
49
57
  </template>
50
58
  </menu-item>`,
51
- });
59
+ };
60
+ };
52
61
 
53
62
  export const Interactive = StoryTemplate.bind({});
54
63
 
@@ -65,10 +74,11 @@ const args = {
65
74
  label: 'Menu Item label',
66
75
  isLabelUppercase: false,
67
76
  state: MENU_ITEM_STATES.DEFAULT,
68
- accessoryState: null,
77
+ isExpandable: false,
78
+ isExpanded: false,
69
79
  isSelected: false,
70
80
  isDone: false,
71
- hasSelectedIconsColorPrimary: true,
81
+ hasSelectedAccessoriesPrimary: true,
72
82
  isSelectedInteractive: false,
73
83
  } as Args;
74
84
 
@@ -109,9 +119,11 @@ const argTypes = {
109
119
  control: 'select',
110
120
  options: Object.values(MENU_ITEM_STATES),
111
121
  },
112
- accessoryState: {
113
- control: 'select',
114
- options: [null, ...Object.values(MENU_ITEM_ACCESSORY_STATES)],
122
+ isExpandable: {
123
+ control: 'boolean',
124
+ },
125
+ isExpanded: {
126
+ control: 'boolean',
115
127
  },
116
128
  isSelected: {
117
129
  control: 'boolean',
@@ -119,7 +131,7 @@ const argTypes = {
119
131
  isDone: {
120
132
  control: 'boolean',
121
133
  },
122
- hasSelectedIconsColorPrimary: {
134
+ hasSelectedAccessoriesPrimary: {
123
135
  control: 'boolean',
124
136
  },
125
137
  isSelectedInteractive: {
@@ -137,6 +149,31 @@ Interactive.parameters = {
137
149
  },
138
150
  };
139
151
 
152
+ const SectionHeaderMenuTemplate: StoryFn<typeof MenuItem> = (args) => ({
153
+ components: { MenuItem, DsMenu, SectionHeader },
154
+ setup() {
155
+ return {
156
+ SECTION_HEADER_SIZES,
157
+ };
158
+ },
159
+ template: `
160
+ <menu-item label="level 1">
161
+ <template #children>
162
+ <section-header title="Section Header XXS Level 2" :size="SECTION_HEADER_SIZES.XX_SMALL" :has-divider="false" />
163
+ <menu-item label="level 2">
164
+ <template #children>
165
+ <menu-item label="level 3 first item" />
166
+ <section-header title="Section Header XXS Level 3" :size="SECTION_HEADER_SIZES.XX_SMALL" :has-divider="false" />
167
+ <menu-item label="level 3 second item" />
168
+ </template>
169
+ </menu-item>
170
+ <menu-item label="level 2 another item" />
171
+ </template>
172
+ </menu-item>`,
173
+ });
174
+
175
+ export const SectionHeaderMenu = SectionHeaderMenuTemplate.bind({});
176
+
140
177
  const NestedMenuTemplate: StoryFn<typeof MenuItem> = (args) => ({
141
178
  components: { MenuItem, DsMenu },
142
179
  template: `
@@ -175,3 +212,42 @@ const NestedMenuTemplate: StoryFn<typeof MenuItem> = (args) => ({
175
212
  </menu-item>`,
176
213
  });
177
214
  export const Nested = NestedMenuTemplate.bind({});
215
+
216
+ const NestedExpandableMenuTemplate: StoryFn<typeof MenuItem> = (args) => ({
217
+ components: { MenuItem, DsMenu },
218
+ template: `
219
+ <menu-item is-expandable label="level 1">
220
+ <template #children>
221
+ <ds-menu>
222
+ <menu-item is-expandable label="level 2" />
223
+ <menu-item is-expandable label="level 2">
224
+ <template #children>
225
+ <ds-menu>
226
+ <menu-item is-expandable label="level 3">
227
+ <template #children>
228
+ <ds-menu>
229
+ <menu-item is-expandable label="level 4">
230
+ <template #children>
231
+ <ds-menu>
232
+ <menu-item is-expandable label="level 5">
233
+ <template #children>
234
+ <ds-menu>
235
+ <menu-item is-expandable label="level 6" />
236
+ </ds-menu>
237
+ </template>
238
+ </menu-item>
239
+ </ds-menu>
240
+ </template>
241
+ </menu-item>
242
+ </ds-menu>
243
+ </template>
244
+ </menu-item>
245
+ </ds-menu>
246
+ </template>
247
+ </menu-item>
248
+ <menu-item is-expandable label="level 2" />
249
+ </ds-menu>
250
+ </template>
251
+ </menu-item>`,
252
+ });
253
+ export const NestedExpandable = NestedExpandableMenuTemplate.bind({});
@@ -11,49 +11,77 @@
11
11
  '-ds-disabled': isDisabled,
12
12
  '-ds-medium': size === MENU_ITEM_SIZES.MEDIUM,
13
13
  '-ds-selected': isSelected,
14
+ '-ds-expandable': isExpandable,
14
15
  '-ds-hoverable': !isSelected || isSelectedInteractive,
15
16
  '-ds-backgroundNeutral':
16
17
  backgroundColor === MENU_ITEM_BACKGROUND_COLORS.NEUTRAL,
17
18
  },
18
19
  ]"
19
20
  >
20
- <span class="ds-menuItem__content">
21
- <ds-icon
22
- v-if="accessoryState === MENU_ITEM_ACCESSORY_STATES.DOT"
23
- :class="['ds-menuItem__accessory', { '-ds-active': isSelected }]"
24
- :icon="ICONS.FA_DOT_SOLID"
25
- :size="ICON_SIZES.XXX_SMALL"
26
- />
27
- <span
28
- v-if="index !== null"
29
- class="ds-menuItem__index"
30
- :class="{ '-ds-active': isSelected }"
31
- >
32
- {{ index }}.
33
- </span>
34
- <ds-icon
35
- v-if="iconLeft"
36
- class="ds-menuItem__icon"
37
- :class="{
38
- '-ds-active': isSelected && hasSelectedIconsColorPrimary,
39
- }"
40
- :icon="iconLeft"
41
- :size="ICON_SIZES.X_SMALL"
42
- />
43
- <span class="ds-menuItem__text">
44
- <span class="ds-menuItem__label" :class="{ '-ds-uppercase': isLabelUppercase }">
45
- <template v-if="$slots.labelSlot">
46
- <slot name="labelSlot" />
47
- </template>
48
- <template v-else>
49
- {{ label }}
50
- </template>
51
- </span>
52
- <span v-if="additionalText" class="ds-menuItem__additionalText">
53
- {{ additionalText }}
21
+ <span class="ds-menuItem__contentWrapper">
22
+ <span class="ds-menuItem__content">
23
+ <span class="ds-menuItem__text">
24
+ <ds-icon-button
25
+ v-if="isExpandable && $slots.children"
26
+ class="ds-menuItem__expander"
27
+ :color="ICON_BUTTON_COLORS.NEUTRAL"
28
+ :radius="BUTTON_RADIUSES.ROUNDED"
29
+ :icon="expanderIcon"
30
+ :size="ICON_BUTTON_SIZES.X_SMALL"
31
+ :state="
32
+ isDisabled
33
+ ? ICON_BUTTON_STATES.DISABLED
34
+ : ICON_BUTTON_STATES.DEFAULT
35
+ "
36
+ :touchable="false"
37
+ @click.stop="isExpanded = !isExpanded"
38
+ />
39
+ <span
40
+ v-else-if="isExpandable && !$slots.children"
41
+ class="ds-menuItem__expanderDotWrapper"
42
+ >
43
+ <ds-icon :icon="ICONS.FA_DOT_SOLID" :size="ICON_SIZES.XX_SMALL" />
44
+ </span>
45
+ <span class="ds-menuItem__itemsWrapper">
46
+ <span
47
+ v-if="index !== null"
48
+ class="ds-menuItem__index"
49
+ :class="{
50
+ '-ds-active': isSelected && hasSelectedAccessoriesPrimary,
51
+ }"
52
+ >
53
+ {{ index }}.
54
+ </span>
55
+ <ds-icon
56
+ v-if="iconLeft"
57
+ class="ds-menuItem__icon"
58
+ :class="{
59
+ '-ds-active': isSelected && hasSelectedAccessoriesPrimary,
60
+ }"
61
+ :icon="iconLeft"
62
+ :size="ICON_SIZES.X_SMALL"
63
+ />
64
+ <span class="ds-menuItem__labelWrapper">
65
+ <span
66
+ class="ds-menuItem__label"
67
+ :class="{ '-ds-uppercase': isLabelUppercase }"
68
+ >
69
+ <template v-if="$slots.labelSlot">
70
+ <slot name="labelSlot" />
71
+ </template>
72
+ <template v-else>
73
+ {{ label }}
74
+ </template>
75
+ </span>
76
+ <span v-if="additionalText" class="ds-menuItem__additionalText">
77
+ {{ additionalText }}
78
+ </span>
79
+ </span>
80
+ </span>
54
81
  </span>
55
82
  </span>
56
83
  </span>
84
+
57
85
  <span
58
86
  v-if="shouldRenderRightContent"
59
87
  class="ds-menuItem__rightContent"
@@ -72,7 +100,7 @@
72
100
  v-else-if="iconRight"
73
101
  class="ds-menuItem__icon"
74
102
  :class="{
75
- '-ds-active': isSelected && hasSelectedIconsColorPrimary,
103
+ '-ds-active': isSelected && hasSelectedAccessoriesPrimary,
76
104
  }"
77
105
  :icon="iconRight"
78
106
  :size="ICON_SIZES.X_SMALL"
@@ -80,7 +108,7 @@
80
108
  ></ds-icon>
81
109
  </span>
82
110
  </component>
83
- <slot name="children" />
111
+ <slot v-if="!isExpandable || isExpanded" name="children" />
84
112
  </li>
85
113
  </template>
86
114
 
@@ -92,29 +120,40 @@
92
120
 
93
121
  .ds-menuItem {
94
122
  $root: &;
95
- $menu-item-horizontal-padding: $space-2xs;
123
+ $menu-item-horizontal-padding: $space-xs;
124
+ $menu-item-expandable-horizontal-padding: $space-4xs;
96
125
 
97
126
  @for $i from 2 through 6 {
98
127
  &.-ds-level#{$i} {
99
128
  padding-left: $menu-item-horizontal-padding + ($i - 1) * $space-2xs;
129
+
130
+ &.-ds-expandable {
131
+ padding-left: $menu-item-expandable-horizontal-padding + ($i - 1) * $space-2xs;
132
+ }
100
133
  }
101
134
  }
102
135
 
136
+ align-items: center;
103
137
  background-color: $color-neutral-background-weak;
104
138
  border-radius: $radius-s;
105
139
  column-gap: $space-2xs;
106
140
  display: flex;
107
141
  justify-content: space-between;
108
- padding: $space-s $menu-item-horizontal-padding;
142
+ min-height: 40px;
143
+ padding: $space-2xs $space-2xs $space-2xs $menu-item-horizontal-padding;
109
144
  text-decoration: none;
110
145
 
146
+ &.-ds-expandable {
147
+ padding-left: $menu-item-expandable-horizontal-padding;
148
+ }
149
+
111
150
  &__wrapper {
112
151
  list-style-type: none;
113
152
  }
114
153
 
115
154
  &__rightContent,
116
- &__content {
117
- align-items: flex-start;
155
+ &__contentWrapper {
156
+ align-items: center;
118
157
  display: flex;
119
158
  max-width: 100%;
120
159
  }
@@ -127,17 +166,45 @@
127
166
  }
128
167
  }
129
168
 
130
- &__content {
169
+ &__contentWrapper {
131
170
  overflow-x: clip;
132
171
  }
133
172
 
134
- &__accessory {
173
+ &__content {
174
+ align-items: flex-start;
175
+ display: flex;
176
+ flex: 1 0 0;
177
+ flex-direction: column;
178
+ }
179
+
180
+ &__text {
181
+ align-items: flex-start;
182
+ align-self: stretch;
183
+ display: flex;
184
+ }
185
+
186
+ &__expander {
187
+ align-items: center;
135
188
  color: $color-neutral-icon-weak;
136
- padding: $space-4xs $space-5xs;
189
+ display: flex;
190
+ margin-right: $space-5xs;
191
+ }
137
192
 
138
- &.-ds-active {
139
- color: $color-primary-icon;
140
- }
193
+ &__expanderDotWrapper {
194
+ align-items: center;
195
+ color: $color-neutral-icon-weak;
196
+ display: inline-flex;
197
+ height: 20px;
198
+ justify-content: center;
199
+ margin-right: $space-5xs;
200
+ width: 20px;
201
+ }
202
+
203
+ &__itemsWrapper {
204
+ align-items: flex-start;
205
+ display: flex;
206
+ flex: 1 0 0;
207
+ padding: $space-5xs 0;
141
208
  }
142
209
 
143
210
  &__index {
@@ -151,7 +218,7 @@
151
218
  }
152
219
  }
153
220
 
154
- &__text {
221
+ &__labelWrapper {
155
222
  @include label-l-default-regular; // it fixes whole component height
156
223
 
157
224
  // To hide scrollbar in case Chrome renders __label higher than line-height - there are some problems with fraction of a pixel on Retina screens
@@ -186,7 +253,7 @@
186
253
 
187
254
  &__icon {
188
255
  color: $color-neutral-icon-weak;
189
- margin-right: $space-3xs;
256
+ margin-right: $space-4xs;
190
257
 
191
258
  &.-ds-active {
192
259
  color: $color-primary-icon;
@@ -231,7 +298,8 @@
231
298
  }
232
299
 
233
300
  &.-ds-medium {
234
- padding: $space-s $space-xs;
301
+ min-height: 48px;
302
+ padding: $space-s $space-2xs $space-s $space-xs;
235
303
 
236
304
  #{$root}__label {
237
305
  @include label-l-default-bold;
@@ -255,17 +323,21 @@
255
323
  <script setup lang="ts">
256
324
  import { computed, inject, provide } from 'vue';
257
325
  import DsIcon, { ICON_SIZES, IconItem, ICONS } from '../../Icons/Icon';
326
+ import DsIconButton, {
327
+ ICON_BUTTON_COLORS,
328
+ ICON_BUTTON_SIZES,
329
+ ICON_BUTTON_STATES,
330
+ } from '../../Buttons/IconButton';
258
331
  import {
259
- MENU_ITEM_ACCESSORY_STATES,
260
332
  MENU_ITEM_BACKGROUND_COLORS,
261
333
  MENU_ITEM_LEVEL_INJECTION_KEY,
262
334
  MENU_ITEM_SIZES,
263
335
  MENU_ITEM_STATES,
264
- type MenuItemAccessoryState,
265
336
  type MenuItemBackgroundColor,
266
337
  type MenuItemSize,
267
338
  type MenuItemState,
268
- } from './MenuItem.consts'; // DS don't have vue-router installed, so we define a loose type which should match RouteLocationRaw
339
+ } from './MenuItem.consts';
340
+ import { BUTTON_RADIUSES } from '../../Buttons/Button';
269
341
 
270
342
  // DS don't have vue-router installed, so we define a loose type which should match RouteLocationRaw
271
343
  type RouterLocation = string | Record<string, unknown>;
@@ -283,10 +355,10 @@ const {
283
355
  isLabelUppercase = false,
284
356
  additionalText = '',
285
357
  state = MENU_ITEM_STATES.DEFAULT,
286
- accessoryState = null,
358
+ isExpandable = false,
287
359
  isSelected = false,
288
360
  isDone = false,
289
- hasSelectedIconsColorPrimary = true,
361
+ hasSelectedAccessoriesPrimary = true,
290
362
  isSelectedInteractive = false,
291
363
  level = null,
292
364
  } = defineProps<{
@@ -302,10 +374,10 @@ const {
302
374
  isLabelUppercase?: boolean;
303
375
  additionalText?: string;
304
376
  state?: MenuItemState;
305
- accessoryState?: MenuItemAccessoryState | null;
377
+ isExpandable?: boolean;
306
378
  isSelected?: boolean;
307
379
  isDone?: boolean;
308
- hasSelectedIconsColorPrimary?: boolean;
380
+ hasSelectedAccessoriesPrimary?: boolean;
309
381
  isSelectedInteractive?: boolean;
310
382
  level?: number | null;
311
383
  }>();
@@ -316,6 +388,8 @@ const slots = defineSlots<{
316
388
  default?: () => any;
317
389
  }>();
318
390
 
391
+ const isExpanded = defineModel<boolean>('isExpanded');
392
+
319
393
  const as = computed(() => {
320
394
  if (href) {
321
395
  return 'a';
@@ -361,7 +435,6 @@ const shouldRenderComponent = computed(
361
435
  label ||
362
436
  additionalText ||
363
437
  slots.labelSlot ||
364
- accessoryState ||
365
438
  index !== null ||
366
439
  iconLeft ||
367
440
  shouldRenderRightContent.value,
@@ -373,5 +446,13 @@ const levelClass = computed(() => {
373
446
  return `-ds-level${limitedLevel}`;
374
447
  });
375
448
 
449
+ const expanderIcon = computed(() => {
450
+ if (!slots.children) {
451
+ return ICONS.FA_DOT_SOLID;
452
+ }
453
+
454
+ return isExpanded.value ? ICONS.FA_CHEVRON_DOWN : ICONS.FA_CHEVRON_RIGHT;
455
+ });
456
+
376
457
  provide(MENU_ITEM_LEVEL_INJECTION_KEY, levelComputed.value + 1);
377
458
  </script>
@@ -11,10 +11,13 @@ import { faArrowPointer } from '@fortawesome/pro-regular-svg-icons/faArrowPointe
11
11
  import { faArrowRightFromBracket } from '@fortawesome/pro-regular-svg-icons/faArrowRightFromBracket';
12
12
  import { faArrowRotateLeft } from '@fortawesome/pro-regular-svg-icons/faArrowRotateLeft';
13
13
  import { faArrowRotateRight } from '@fortawesome/pro-regular-svg-icons/faArrowRotateRight';
14
+ import { faArrowsFromDottedLine } from '@fortawesome/pro-regular-svg-icons/faArrowsFromDottedLine';
14
15
  import { faArrowsMaximize } from '@fortawesome/pro-regular-svg-icons/faArrowsMaximize';
15
16
  import { faArrowsRotate } from '@fortawesome/pro-regular-svg-icons/faArrowsRotate';
17
+ import { faArrowsToDottedLine } from '@fortawesome/pro-regular-svg-icons/faArrowsToDottedLine';
16
18
  import { faArrowUpRightAndArrowDownLeftFromCenter } from '@fortawesome/pro-regular-svg-icons/faArrowUpRightAndArrowDownLeftFromCenter';
17
19
  import { faArrowUpRightFromSquare } from '@fortawesome/pro-regular-svg-icons/faArrowUpRightFromSquare';
20
+ import { faArrowLeftToDottedLine } from '@fortawesome/pro-regular-svg-icons/faArrowLeftToDottedLine';
18
21
  import { faAtom as fasAtom } from '@fortawesome/pro-solid-svg-icons/faAtom';
19
22
  import { faBadgePercent } from '@fortawesome/pro-regular-svg-icons/faBadgePercent';
20
23
  import { faBan } from '@fortawesome/pro-regular-svg-icons/faBan';
@@ -259,6 +262,7 @@ export const FONTAWESOME_ICONS = {
259
262
  FA_ARROW_DOWN_SOLID: fasArrowDown,
260
263
  FA_ARROW_DOWN_TO_LINE: faArrowDownToLine,
261
264
  FA_ARROW_LEFT_SOLID: fasArrowLeft,
265
+ FA_ARROW_LEFT_TO_DOTTED_LINE: faArrowLeftToDottedLine,
262
266
  FA_ARROW_POINTER: faArrowPointer,
263
267
  FA_ARROW_RIGHT_FROM_BRACKET: faArrowRightFromBracket,
264
268
  FA_ARROW_RIGHT_SOLID: fasArrowRight,
@@ -269,8 +273,10 @@ export const FONTAWESOME_ICONS = {
269
273
  FA_ARROW_UP_RIGHT_FROM_SQUARE: faArrowUpRightFromSquare,
270
274
  FA_ARROW_UP_SOLID: fasArrowUp,
271
275
  FA_ARROWS_LEFT_RIGHT_SOLID: fasArrowsLeftRight,
276
+ FA_ARROWS_FROM_DOTTED_LINE: faArrowsFromDottedLine,
272
277
  FA_ARROWS_MAXIMIZE: faArrowsMaximize,
273
278
  FA_ARROWS_ROTATE: faArrowsRotate,
279
+ FA_ARROWS_TO_DOTTED_LINE: faArrowsToDottedLine,
274
280
  FA_ATOM_SOLID: fasAtom,
275
281
  FA_BADGE_PERCENT: faBadgePercent,
276
282
  FA_BAN: faBan,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bethinkpl/design-system",
3
- "version": "32.0.0",
3
+ "version": "33.0.1",
4
4
  "description": "Bethink universe design-system",
5
5
  "repository": {
6
6
  "type": "git",