@bethinkpl/design-system 39.1.0 → 40.0.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 (83) hide show
  1. package/dist/design-system.css +1 -1
  2. package/dist/design-system.js +19329 -19161
  3. package/dist/design-system.js.map +1 -1
  4. package/dist/lib/js/components/ActionContent/ActionContent.vue.d.ts +42 -0
  5. package/dist/lib/js/components/ActionContent/index.d.ts +3 -0
  6. package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +3 -1
  7. package/dist/lib/js/components/Cards/Card/Card.consts.d.ts +13 -8
  8. package/dist/lib/js/components/Cards/Card/Card.vue.d.ts +22 -9
  9. package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +77 -21
  10. package/dist/lib/js/components/Chip/Chip.vue.d.ts +2 -0
  11. package/dist/lib/js/components/DatePickers/DateBox/DateBox.vue.d.ts +3 -1
  12. package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +7 -5
  13. package/dist/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue.d.ts +4 -2
  14. package/dist/lib/js/components/Divider/Divider.vue.d.ts +1 -1
  15. package/dist/lib/js/components/Drawer/DrawerDivider/DrawerDivider.vue.d.ts +1 -1
  16. package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +10 -3
  17. package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +2 -0
  18. package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +10 -4
  19. package/dist/lib/js/components/Drawer/DrawerTile/DrawerTile.vue.d.ts +4 -4
  20. package/dist/lib/js/components/Dropdown/Dropdown.vue.d.ts +1 -1
  21. package/dist/lib/js/components/Form/FormField/FormField.utils.d.ts +1 -1
  22. package/dist/lib/js/components/Form/InputField/InputField.vue.d.ts +2 -2
  23. package/dist/lib/js/components/Form/PasswordField/PasswordField.vue.d.ts +2 -2
  24. package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +2 -0
  25. package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +9 -5
  26. package/dist/lib/js/components/Headers/PageHeader/PageHeader.vue.d.ts +1 -1
  27. package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +7 -3
  28. package/dist/lib/js/components/IconText/IconText.vue.d.ts +1 -1
  29. package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +2 -0
  30. package/dist/lib/js/components/Image/Image.vue.d.ts +1 -1
  31. package/dist/lib/js/components/Menu/MenuDivider/MenuDivider.vue.d.ts +1 -1
  32. package/dist/lib/js/components/Modal/Modal.vue.d.ts +2 -0
  33. package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +6 -2
  34. package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +6 -2
  35. package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +6 -2
  36. package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +2 -0
  37. package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +2 -0
  38. package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +44 -23
  39. package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +6 -4
  40. package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue.d.ts +1 -1
  41. package/dist/lib/js/components/Skeleton/Skeleton.vue.d.ts +1 -1
  42. package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +2 -0
  43. package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +2 -0
  44. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +82 -22
  45. package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +82 -22
  46. package/dist/lib/js/components/Switch/Switch.vue.d.ts +2 -0
  47. package/dist/lib/js/components/TextGroup/TextGroup.consts.d.ts +14 -3
  48. package/dist/lib/js/components/TextGroup/TextGroup.vue.d.ts +8 -3
  49. package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +4 -2
  50. package/dist/lib/js/components/Tile/Tile.vue.d.ts +2 -2
  51. package/dist/lib/js/components/Toast/Toast.vue.d.ts +76 -22
  52. package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +4 -2
  53. package/dist/lib/js/components/Well/Well.consts.d.ts +24 -0
  54. package/dist/lib/js/components/Well/Well.vue.d.ts +13 -1
  55. package/dist/lib/js/icons/fontawesome.d.ts +1 -0
  56. package/dist/lib/js/index.d.ts +2 -0
  57. package/dist/lib/js/utils/type.utils.d.ts +3 -0
  58. package/lib/images/icons/comment-lock.svg +1 -0
  59. package/lib/js/components/ActionContent/ActionContent.spec.ts +99 -0
  60. package/lib/js/components/ActionContent/ActionContent.stories.ts +141 -0
  61. package/lib/js/components/ActionContent/ActionContent.vue +104 -0
  62. package/lib/js/components/ActionContent/index.ts +3 -0
  63. package/lib/js/components/Cards/Card/Card.consts.ts +15 -8
  64. package/lib/js/components/Cards/Card/Card.spec.ts +61 -1
  65. package/lib/js/components/Cards/Card/Card.stories.ts +20 -13
  66. package/lib/js/components/Cards/Card/Card.vue +65 -34
  67. package/lib/js/components/Chip/Chip.spec.ts +28 -0
  68. package/lib/js/components/Chip/Chip.stories.ts +7 -2
  69. package/lib/js/components/Chip/Chip.vue +14 -3
  70. package/lib/js/components/Icons/Icon/Icon.consts.ts +2 -0
  71. package/lib/js/components/ProgressDonutChart/ProgressDonutChart.spec.ts +3 -3
  72. package/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue +8 -1
  73. package/lib/js/components/TextGroup/TextGroup.consts.ts +15 -1
  74. package/lib/js/components/TextGroup/TextGroup.stories.ts +14 -5
  75. package/lib/js/components/TextGroup/TextGroup.vue +51 -28
  76. package/lib/js/components/Well/Well.consts.ts +16 -0
  77. package/lib/js/components/Well/Well.spec.ts +112 -0
  78. package/lib/js/components/Well/Well.stories.ts +90 -1
  79. package/lib/js/components/Well/Well.vue +135 -4
  80. package/lib/js/icons/fontawesome.ts +2 -0
  81. package/lib/js/index.ts +2 -0
  82. package/lib/js/utils/type.utils.ts +16 -0
  83. package/package.json +14 -6
@@ -0,0 +1,112 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { ComponentMountingOptions, mount } from '@vue/test-utils';
3
+
4
+ import Well from './Well.vue';
5
+ import { WELL_RIBBON_POSITIONS } from './Well.consts';
6
+
7
+ describe('Well', () => {
8
+ const createComponent = (options: ComponentMountingOptions<typeof Well> = {}) => {
9
+ return mount(Well, options);
10
+ };
11
+
12
+ it('should create', () => {
13
+ const component = createComponent();
14
+
15
+ expect(component.find('.ds-well').exists()).toBe(true);
16
+ });
17
+
18
+ it('should render default slot content', () => {
19
+ const content = 'Wpłynąlem na suchego przestwór oceanu';
20
+ const component = createComponent({
21
+ slots: { default: () => content },
22
+ });
23
+
24
+ expect(component.find('.ds-well__content').text()).toContain(content);
25
+ });
26
+
27
+ it('should not set no-radius class by default', () => {
28
+ const component = createComponent();
29
+
30
+ expect(component.find('.ds-well').classes()).not.toContain('-ds-noRadius');
31
+ });
32
+
33
+ it('should set no-radius class when hasRadius is false', () => {
34
+ const component = createComponent({
35
+ props: { hasRadius: false },
36
+ });
37
+
38
+ expect(component.find('.ds-well').classes()).toContain('-ds-noRadius');
39
+ });
40
+
41
+ it('should not set border class by default', () => {
42
+ const component = createComponent();
43
+
44
+ expect(component.find('.ds-well').classes()).not.toContain('-ds-hasBorder');
45
+ });
46
+
47
+ it('should set border class when hasBorder is true', () => {
48
+ const component = createComponent({
49
+ props: { hasBorder: true },
50
+ });
51
+
52
+ expect(component.find('.ds-well').classes()).toContain('-ds-hasBorder');
53
+ });
54
+
55
+ it('should not render a ribbon by default', () => {
56
+ const component = createComponent();
57
+
58
+ expect(component.find('.ds-well__ribbon').exists()).toBe(false);
59
+ expect(component.find('.ds-container-ribbon').exists()).toBe(false);
60
+ });
61
+
62
+ it('should render a horizontal ribbon for the top position', () => {
63
+ const component = createComponent({
64
+ props: { hasRibbon: true, ribbonPosition: WELL_RIBBON_POSITIONS.TOP },
65
+ });
66
+
67
+ expect(component.find('.ds-container-ribbon').classes()).toContain('-ds-layout-horizontal');
68
+ expect(component.find('.ds-well').classes()).not.toContain('-ds-leftRibbon');
69
+ });
70
+
71
+ it('should render a vertical ribbon and left-ribbon class for the left position', () => {
72
+ const component = createComponent({
73
+ props: { hasRibbon: true, ribbonPosition: WELL_RIBBON_POSITIONS.LEFT },
74
+ });
75
+
76
+ expect(component.find('.ds-container-ribbon').classes()).toContain('-ds-layout-vertical');
77
+ expect(component.find('.ds-well').classes()).toContain('-ds-leftRibbon');
78
+ });
79
+
80
+ it('should not give the ribbon a radius when the well is rounded', () => {
81
+ const component = createComponent({
82
+ props: { hasRibbon: true, hasRadius: true },
83
+ });
84
+
85
+ expect(component.find('.-ds-radius-bottom').exists()).toBe(false);
86
+ expect(component.find('.-ds-radius-right').exists()).toBe(false);
87
+ });
88
+
89
+ it('should give a top ribbon a bottom radius when the well is square', () => {
90
+ const component = createComponent({
91
+ props: {
92
+ hasRibbon: true,
93
+ hasRadius: false,
94
+ ribbonPosition: WELL_RIBBON_POSITIONS.TOP,
95
+ },
96
+ });
97
+
98
+ expect(component.find('.-ds-radius-bottom').exists()).toBe(true);
99
+ });
100
+
101
+ it('should give a left ribbon a right radius when the well is square', () => {
102
+ const component = createComponent({
103
+ props: {
104
+ hasRibbon: true,
105
+ hasRadius: false,
106
+ ribbonPosition: WELL_RIBBON_POSITIONS.LEFT,
107
+ },
108
+ });
109
+
110
+ expect(component.find('.-ds-radius-right').exists()).toBe(true);
111
+ });
112
+ });
@@ -2,7 +2,14 @@
2
2
 
3
3
  import { Args, ArgTypes, Meta, StoryObj } from '@storybook/vue3';
4
4
  import Well from './Well.vue';
5
- import { WELL_COLORS, WELL_PADDINGS } from './Well.consts';
5
+ import {
6
+ WELL_COLORS,
7
+ WELL_DEFAULT_COLOR,
8
+ WELL_PADDINGS,
9
+ WELL_RIBBON_COLORS,
10
+ WELL_RIBBON_POSITIONS,
11
+ WELL_RIBBON_SIZES,
12
+ } from './Well.consts';
6
13
  import type { ComponentProps } from 'vue-component-type-helpers';
7
14
  import Chip, { CHIP_RADIUSES } from '../Chip';
8
15
 
@@ -27,6 +34,27 @@ const meta: Meta<WellProps> = {
27
34
  control: 'select',
28
35
  options: Object.values(WELL_COLORS),
29
36
  },
37
+ hasRadius: {
38
+ control: 'boolean',
39
+ },
40
+ hasBorder: {
41
+ control: 'boolean',
42
+ },
43
+ hasRibbon: {
44
+ control: 'boolean',
45
+ },
46
+ ribbonPosition: {
47
+ control: 'select',
48
+ options: Object.values(WELL_RIBBON_POSITIONS),
49
+ },
50
+ ribbonSize: {
51
+ control: 'select',
52
+ options: Object.values(WELL_RIBBON_SIZES),
53
+ },
54
+ ribbonColor: {
55
+ control: 'select',
56
+ options: Object.values(WELL_RIBBON_COLORS),
57
+ },
30
58
  content: {
31
59
  control: 'text',
32
60
  },
@@ -48,6 +76,13 @@ export const Interactive: Story = {
48
76
  content:
49
77
  '<h3 style="margin-top: 0">Content</h3>' +
50
78
  'Voluptatem saepe suscipit optio et delectus esse sed velit. Autem maxime soluta aliquam perspiciatis quidem dolor saepe rerum.',
79
+ hasRadius: true,
80
+ hasBorder: false,
81
+ hasRibbon: false,
82
+ ribbonPosition: WELL_RIBBON_POSITIONS.TOP,
83
+ ribbonColor: WELL_RIBBON_COLORS.NEUTRAL_HEAVY,
84
+ ribbonSize: WELL_RIBBON_SIZES.MEDIUM,
85
+ color: WELL_DEFAULT_COLOR,
51
86
  } as Args,
52
87
  };
53
88
 
@@ -85,5 +120,59 @@ export const WithMultipleChips: Story = {
85
120
  },
86
121
  args: {
87
122
  padding: WELL_PADDINGS.SMALL,
123
+ hasRadius: true,
124
+ hasBorder: false,
125
+ hasRibbon: false,
126
+ ribbonPosition: WELL_RIBBON_POSITIONS.TOP,
127
+ ribbonColor: WELL_RIBBON_COLORS.NEUTRAL_HEAVY,
128
+ ribbonSize: WELL_RIBBON_SIZES.MEDIUM,
129
+ color: WELL_DEFAULT_COLOR,
88
130
  },
89
131
  };
132
+
133
+ export const WithRibbon: Story = {
134
+ args: {
135
+ padding: WELL_PADDINGS.MEDIUM,
136
+ hasRibbon: true,
137
+ ribbonPosition: WELL_RIBBON_POSITIONS.TOP,
138
+ ribbonColor: WELL_RIBBON_COLORS.PRIMARY,
139
+ content:
140
+ '<h3 style="margin-top: 0">Content</h3>' +
141
+ 'Voluptatem saepe suscipit optio et delectus esse sed velit. Autem maxime soluta aliquam perspiciatis quidem dolor saepe rerum.',
142
+ hasRadius: true,
143
+ hasBorder: false,
144
+ color: WELL_DEFAULT_COLOR,
145
+ } as Args,
146
+ };
147
+
148
+ export const WithLeftRibbonNoRadius: Story = {
149
+ args: {
150
+ padding: WELL_PADDINGS.MEDIUM,
151
+ hasRadius: false,
152
+ hasRibbon: true,
153
+ ribbonPosition: WELL_RIBBON_POSITIONS.LEFT,
154
+ ribbonColor: WELL_RIBBON_COLORS.SUCCESS,
155
+ content:
156
+ '<h3 style="margin-top: 0">Content</h3>' +
157
+ 'Voluptatem saepe suscipit optio et delectus esse sed velit. Autem maxime soluta aliquam perspiciatis quidem dolor saepe rerum.',
158
+ hasBorder: false,
159
+ ribbonSize: WELL_RIBBON_SIZES.MEDIUM,
160
+ color: WELL_DEFAULT_COLOR,
161
+ } as Args,
162
+ };
163
+
164
+ export const WithBorder: Story = {
165
+ args: {
166
+ padding: WELL_PADDINGS.MEDIUM,
167
+ hasBorder: true,
168
+ color: WELL_COLORS.PRIMARY,
169
+ content:
170
+ '<h3 style="margin-top: 0">Content</h3>' +
171
+ 'Voluptatem saepe suscipit optio et delectus esse sed velit. Autem maxime soluta aliquam perspiciatis quidem dolor saepe rerum.',
172
+ hasRadius: true,
173
+ hasRibbon: false,
174
+ ribbonPosition: WELL_RIBBON_POSITIONS.TOP,
175
+ ribbonColor: WELL_RIBBON_COLORS.NEUTRAL_HEAVY,
176
+ ribbonSize: WELL_RIBBON_SIZES.MEDIUM,
177
+ } as Args,
178
+ };
@@ -6,53 +6,136 @@
6
6
  {
7
7
  '-ds-medium': WELL_PADDINGS.MEDIUM === padding,
8
8
  '-ds-small': WELL_PADDINGS.SMALL === padding,
9
+ '-ds-noRadius': !hasRadius,
10
+ '-ds-hasBorder': hasBorder,
11
+ '-ds-leftRibbon': hasRibbon && ribbonPosition === WELL_RIBBON_POSITIONS.LEFT,
9
12
  },
10
13
  ]"
11
14
  >
15
+ <div v-if="hasRibbon" class="ds-well__ribbon">
16
+ <ds-container-ribbon
17
+ :size="ribbonSize"
18
+ :color="ribbonColor"
19
+ :layout="ribbonLayout"
20
+ :radius="ribbonRadius"
21
+ />
22
+ </div>
23
+
12
24
  <div v-if="$slots.accessory" class="ds-well__accessorySlot">
13
25
  <slot name="accessory" />
14
26
  </div>
15
27
 
16
- <slot />
28
+ <div class="ds-well__content">
29
+ <slot />
30
+ </div>
17
31
  </div>
18
32
  </template>
19
33
 
20
34
  <style scoped lang="scss">
21
35
  @import '../../../styles/settings/spacings';
22
36
  @import '../../../styles/settings/radiuses';
37
+ @import '../../../styles/settings/borders';
23
38
  @import '../../../styles/settings/colors/tokens';
24
39
 
25
40
  .ds-well {
26
41
  $root: &;
27
42
 
28
43
  border-radius: $radius-m;
44
+ display: flex;
45
+ flex-direction: column;
29
46
  position: relative;
30
47
 
48
+ &.-ds-noRadius {
49
+ border-radius: 0;
50
+ }
51
+
52
+ &.-ds-leftRibbon {
53
+ flex-direction: row;
54
+ }
55
+
56
+ // box-shadow is used instead of border so the border doesn't add to the well's size
57
+ &.-ds-hasBorder {
58
+ box-shadow: inset 0 0 0 $border-xs var(--ds-well-border-color);
59
+
60
+ // when the well is square it spans edge-to-edge, so only top/bottom rules are drawn
61
+ &.-ds-noRadius {
62
+ box-shadow:
63
+ inset 0 $border-xs 0 0 var(--ds-well-border-color),
64
+ inset 0 (-$border-xs) 0 0 var(--ds-well-border-color);
65
+ }
66
+ }
67
+
31
68
  &.-ds-accent {
69
+ --ds-well-border-color: #{$color-accent-border-weak};
70
+
32
71
  background-color: $color-accent-background;
33
72
  }
34
73
  &.-ds-primary {
74
+ --ds-well-border-color: #{$color-primary-border-weak};
75
+
35
76
  background-color: $color-primary-background;
36
77
  }
37
78
  &.-ds-fail {
79
+ --ds-well-border-color: #{$color-fail-border-weak};
80
+
38
81
  background-color: $color-fail-background;
39
82
  }
40
83
  &.-ds-info {
84
+ --ds-well-border-color: #{$color-info-border-weak};
85
+
41
86
  background-color: $color-info-background;
42
87
  }
43
88
  &.-ds-inverted {
89
+ --ds-well-border-color: #{$color-neutral-border-weak};
90
+
44
91
  background-color: $color-default-background;
45
92
  }
46
93
  &.-ds-neutral {
94
+ --ds-well-border-color: #{$color-neutral-border-weak};
95
+
47
96
  background-color: $color-neutral-background;
48
97
  }
49
98
  &.-ds-success {
99
+ --ds-well-border-color: #{$color-success-border-weak};
100
+
50
101
  background-color: $color-success-background;
51
102
  }
52
103
  &.-ds-warning {
104
+ --ds-well-border-color: #{$color-warning-border-weak};
105
+
53
106
  background-color: $color-warning-background;
54
107
  }
55
108
 
109
+ // the border container is added to avoid adding overflow hidden to the well itself
110
+ // which would clip the accessory slot rendered above its top edge
111
+ &__ribbon {
112
+ border-top-left-radius: $radius-m;
113
+ border-top-right-radius: $radius-m;
114
+ display: flex;
115
+ flex-shrink: 0;
116
+ overflow: hidden;
117
+
118
+ #{$root}.-ds-leftRibbon & {
119
+ border-bottom-left-radius: $radius-m;
120
+ border-top-left-radius: $radius-m;
121
+ border-top-right-radius: 0;
122
+ height: 100%;
123
+ left: 0;
124
+ position: absolute;
125
+ top: 0;
126
+ }
127
+
128
+ #{$root}.-ds-noRadius & {
129
+ border-radius: 0;
130
+ }
131
+ }
132
+
133
+ &__content {
134
+ flex: 1;
135
+ // prevents excessive width due to child elements
136
+ min-width: 0;
137
+ }
138
+
56
139
  &__accessorySlot {
57
140
  display: flex;
58
141
  gap: $space-2;
@@ -62,7 +145,9 @@
62
145
  }
63
146
 
64
147
  &.-ds-medium {
65
- padding: $space-8;
148
+ #{$root}__content {
149
+ padding: $space-8;
150
+ }
66
151
 
67
152
  #{$root}__accessorySlot {
68
153
  right: $space-8;
@@ -70,7 +155,9 @@
70
155
  }
71
156
 
72
157
  &.-ds-small {
73
- padding: $space-6;
158
+ #{$root}__content {
159
+ padding: $space-6;
160
+ }
74
161
 
75
162
  #{$root}__accessorySlot {
76
163
  right: $space-6;
@@ -81,17 +168,41 @@
81
168
 
82
169
  <script lang="ts" setup>
83
170
  import { computed } from 'vue';
171
+
172
+ import DsContainerRibbon from '../ContainerRibbon/ContainerRibbon.vue';
173
+ import { CONTAINER_RIBBON_LAYOUTS, CONTAINER_RIBBON_RADIUSES } from '../ContainerRibbon';
84
174
  import {
85
175
  WELL_PADDINGS,
86
176
  WELL_COLORS,
87
177
  WELL_DEFAULT_COLOR,
178
+ WELL_RIBBON_POSITIONS,
88
179
  WellPadding,
89
180
  WellColor,
181
+ WellRibbonPosition,
182
+ WellRibbonSize,
183
+ WellRibbonColor,
184
+ WELL_RIBBON_SIZES,
185
+ WELL_RIBBON_COLORS,
90
186
  } from './Well.consts';
91
187
 
92
- const { padding = null, color = WELL_DEFAULT_COLOR } = defineProps<{
188
+ const {
189
+ padding = null,
190
+ color = WELL_DEFAULT_COLOR,
191
+ hasRadius = true,
192
+ hasBorder = false,
193
+ hasRibbon = false,
194
+ ribbonPosition = WELL_RIBBON_POSITIONS.TOP,
195
+ ribbonSize = WELL_RIBBON_SIZES.MEDIUM,
196
+ ribbonColor = WELL_RIBBON_COLORS.NEUTRAL_HEAVY,
197
+ } = defineProps<{
93
198
  padding?: WellPadding | null;
94
199
  color?: WellColor;
200
+ hasRadius?: boolean;
201
+ hasBorder?: boolean;
202
+ hasRibbon?: boolean;
203
+ ribbonPosition?: WellRibbonPosition;
204
+ ribbonSize?: WellRibbonSize;
205
+ ribbonColor?: WellRibbonColor;
95
206
  }>();
96
207
 
97
208
  const colorClass = computed(() => {
@@ -107,4 +218,24 @@ const colorClass = computed(() => {
107
218
  };
108
219
  return colorMap[color];
109
220
  });
221
+
222
+ const ribbonLayout = computed(() => {
223
+ const layoutMap = {
224
+ [WELL_RIBBON_POSITIONS.TOP]: CONTAINER_RIBBON_LAYOUTS.HORIZONTAL,
225
+ [WELL_RIBBON_POSITIONS.LEFT]: CONTAINER_RIBBON_LAYOUTS.VERTICAL,
226
+ };
227
+ return layoutMap[ribbonPosition];
228
+ });
229
+
230
+ const ribbonRadius = computed(() => {
231
+ const ribbonPositionToRibbonRadiusMap = {
232
+ [WELL_RIBBON_POSITIONS.TOP]: CONTAINER_RIBBON_RADIUSES.BOTTOM,
233
+ [WELL_RIBBON_POSITIONS.LEFT]: CONTAINER_RIBBON_RADIUSES.RIGHT,
234
+ };
235
+ // when the well is rounded the outer corners are clipped by .ds-well__ribbon,
236
+ // so the ribbon only needs its own radius on the inner edge of a square well
237
+ return hasRadius
238
+ ? CONTAINER_RIBBON_RADIUSES.NONE
239
+ : ribbonPositionToRibbonRadiusMap[ribbonPosition];
240
+ });
110
241
  </script>
@@ -69,6 +69,7 @@ import { faCode } from '@fortawesome/pro-regular-svg-icons/faCode';
69
69
  import { faCodeSimple } from '@fortawesome/pro-regular-svg-icons/faCodeSimple';
70
70
  import { faComment } from '@fortawesome/pro-regular-svg-icons/faComment';
71
71
  import { faCommentDots } from '@fortawesome/pro-regular-svg-icons/faCommentDots';
72
+ import { faCommentPlus } from '@fortawesome/pro-regular-svg-icons/faCommentPlus';
72
73
  import { faComments } from '@fortawesome/pro-regular-svg-icons/faComments';
73
74
  import { faCompress } from '@fortawesome/pro-regular-svg-icons/faCompress';
74
75
  import { faCopy } from '@fortawesome/pro-regular-svg-icons/faCopy';
@@ -362,6 +363,7 @@ export const FONTAWESOME_ICONS = {
362
363
  FA_CODE_SIMPLE: faCodeSimple,
363
364
  FA_CODE: faCode,
364
365
  FA_COMMENT_DOTS: faCommentDots,
366
+ FA_COMMENT_PLUS: faCommentPlus,
365
367
  FA_COMMENT_SOLID: fasComment,
366
368
  FA_COMMENT: faComment,
367
369
  FA_COMMENTS_QUESTION_CHECK: faCommentsQuestionCheck,
package/lib/js/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { default as DsActionContent } from './components/ActionContent';
1
2
  export { default as Avatar } from './components/Avatar';
2
3
  export * from './components/Avatar/Avatar.consts';
3
4
  export { default as Badge } from './components/Badge';
@@ -84,6 +85,7 @@ export * from './components/Headers/PageHeader/PageHeader.consts';
84
85
  export { default as SectionTitle } from './components/SectionTitle/SectionTitle.vue';
85
86
  export { default as DsSectionTitle } from './components/SectionTitle/SectionTitle.vue';
86
87
  export * from './components/SectionTitle/SectionTitle.consts';
88
+ export { default as DsSpinnerLoading } from './components/SpinnerLoading/SpinnerLoading.vue';
87
89
  export { default as Drawer } from './components/Drawer';
88
90
  export { default as DsDrawer } from './components/Drawer';
89
91
  export * from './components/Drawer/Drawer.consts';
@@ -1 +1,17 @@
1
1
  export type Value<T extends {}> = T[keyof T];
2
+
3
+ /**
4
+ * Marks a renamed/removed prop so any leftover usage fails type-checking.
5
+ *
6
+ * Using `never` directly inside `defineProps<{...}>()` breaks Vue's reactive
7
+ * props destructure inference, so this incompatible marker type is used instead:
8
+ * passing any real value (boolean, string, enum) to such a prop is a type error,
9
+ * and the message documents the migration.
10
+ *
11
+ * NOTE: the name `RemovedProp` is matched verbatim against the docgen `type.name`
12
+ * in `.storybook/disable-removed-props.ts` to hide these props from Storybook
13
+ * controls. Renaming this type requires updating that matcher too.
14
+ */
15
+ export interface RemovedProp<TMessage extends string> {
16
+ __removed?: TMessage;
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bethinkpl/design-system",
3
- "version": "39.1.0",
3
+ "version": "40.0.0",
4
4
  "description": "Bethink universe design-system",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,9 +18,9 @@
18
18
  ],
19
19
  "license": "UNLICENSED",
20
20
  "engines": {
21
- "yarn": ">=1.22.1",
22
- "npm": ">=6.0.0",
23
- "node": "^16.13.0 || ^18.17.0 || ^20.9.0 || ^22.0.0 || ^24.0.0"
21
+ "yarn": "^4.17.0",
22
+ "npm": ">=11.5.1",
23
+ "node": "^24.5.0"
24
24
  },
25
25
  "scripts": {
26
26
  "build": "vite build",
@@ -61,7 +61,7 @@
61
61
  "@storybook/vue3": "^8.3.4",
62
62
  "@storybook/vue3-vite": "^8.3.4",
63
63
  "@types/lodash-es": "^4",
64
- "@types/node": "^17.0.9",
64
+ "@types/node": "^24.0.0",
65
65
  "@typescript-eslint/eslint-plugin": "8.45.0",
66
66
  "@typescript-eslint/parser": "8.45.0",
67
67
  "@vee-validate/zod": "4.15.1",
@@ -122,5 +122,13 @@
122
122
  "vue": ">=3.5.0",
123
123
  "vue-i18n": ">=9.8.0"
124
124
  },
125
- "packageManager": "yarn@4.11.0"
125
+ "dependenciesMeta": {
126
+ "esbuild": {
127
+ "built": true
128
+ },
129
+ "vue-demi": {
130
+ "built": true
131
+ }
132
+ },
133
+ "packageManager": "yarn@4.17.0"
126
134
  }