@bethinkpl/design-system 15.0.2 → 15.1.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 (48) hide show
  1. package/dist/design-system.umd.js +1433 -1107
  2. package/dist/design-system.umd.js.map +1 -1
  3. package/dist/lib/js/components/PopOver/PopOver.consts.d.ts +4 -0
  4. package/dist/lib/js/components/PopOver/PopOver.stories.d.ts +1 -0
  5. package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.consts.d.ts +38 -0
  6. package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.spec.d.ts +1 -0
  7. package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.stories.d.ts +531 -0
  8. package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +267 -0
  9. package/dist/lib/js/components/ProgressDonutChart/index.d.ts +3 -0
  10. package/dist/lib/js/index.d.ts +2 -0
  11. package/docs/iframe.html +1 -1
  12. package/docs/main.981b94a0.iframe.bundle.js +1 -0
  13. package/docs/project.json +1 -1
  14. package/lib/js/components/Badges/Badge/Badge.vue +2 -2
  15. package/lib/js/components/Badges/BadgeScore/BadgeScore.vue +2 -2
  16. package/lib/js/components/Banner/Banner.vue +15 -15
  17. package/lib/js/components/Buttons/IconButton/IconButton.vue +2 -2
  18. package/lib/js/components/IconText/IconText.vue +1 -1
  19. package/lib/js/components/Modals/Modal/Modal.vue +6 -6
  20. package/lib/js/components/NumberInCircle/NumberInCircle.vue +7 -7
  21. package/lib/js/components/Pagination/Pagination.vue +17 -17
  22. package/lib/js/components/Pill/Pill.vue +2 -2
  23. package/lib/js/components/PopOver/PopOver.consts.ts +5 -0
  24. package/lib/js/components/PopOver/PopOver.stories.ts +44 -6
  25. package/lib/js/components/PopOver/PopOver.vue +57 -5
  26. package/lib/js/components/ProgressBar/ProgressBar.vue +3 -3
  27. package/lib/js/components/ProgressDonutChart/ProgressDonutChart.consts.ts +47 -0
  28. package/lib/js/components/ProgressDonutChart/ProgressDonutChart.spec.ts +97 -0
  29. package/lib/js/components/ProgressDonutChart/ProgressDonutChart.stories.ts +64 -0
  30. package/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue +293 -0
  31. package/lib/js/components/ProgressDonutChart/index.ts +4 -0
  32. package/lib/js/components/SectionHeader/SectionHeader.vue +1 -1
  33. package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue +2 -2
  34. package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue +4 -4
  35. package/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue +2 -2
  36. package/lib/js/components/SurveyToggle/SurveyToggle.vue +5 -5
  37. package/lib/js/components/Toggles/CounterToggle/CounterToggle.vue +2 -2
  38. package/lib/js/index.ts +2 -0
  39. package/lib/js/styles/ItemsList.vue +1 -1
  40. package/lib/styles/components/_buttons.scss +2 -2
  41. package/lib/styles/components/_items-list-item.scss +1 -1
  42. package/lib/styles/components/_links.scss +2 -2
  43. package/lib/styles/mixins/_layout.scss +1 -1
  44. package/lib/styles/mixins/_scrollbars.scss +2 -2
  45. package/lib/styles/storybook.scss +3 -3
  46. package/package.json +3 -3
  47. package/stylelint.config.js +2 -0
  48. package/docs/main.3a64fb8a.iframe.bundle.js +0 -1
package/docs/project.json CHANGED
@@ -1 +1 @@
1
- {"generatedAt":1679915424872,"builder":{"name":"webpack4"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"metaFramework":{"name":"vue-cli","packageName":"@vue/cli-service","version":"4.5.13"},"packageManager":{"type":"yarn","version":"1.22.19"},"storybookVersion":"6.5.13","language":"typescript","storybookPackages":{"@storybook/vue":{"version":"6.5.13"},"eslint-plugin-storybook":{"version":"0.6.6"}},"framework":{"name":"vue"},"addons":{"@storybook/addon-docs":{"version":"6.5.13"},"@storybook/addon-controls":{"version":"6.5.13"},"@storybook/addon-actions":{"version":"6.5.13"},"@storybook/addon-storysource":{"version":"6.5.13"},"@storybook/addon-viewport":{"version":"6.5.13"},"storybook-addon-designs":{"version":"6.3.1"}}}
1
+ {"generatedAt":1680180973827,"builder":{"name":"webpack4"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"metaFramework":{"name":"vue-cli","packageName":"@vue/cli-service","version":"4.5.13"},"packageManager":{"type":"yarn","version":"1.22.19"},"storybookVersion":"6.5.13","language":"typescript","storybookPackages":{"@storybook/vue":{"version":"6.5.13"},"eslint-plugin-storybook":{"version":"0.6.6"}},"framework":{"name":"vue"},"addons":{"@storybook/addon-docs":{"version":"6.5.13"},"@storybook/addon-controls":{"version":"6.5.13"},"@storybook/addon-actions":{"version":"6.5.13"},"@storybook/addon-storysource":{"version":"6.5.13"},"@storybook/addon-viewport":{"version":"6.5.13"},"storybook-addon-designs":{"version":"6.3.1"}}}
@@ -36,10 +36,10 @@ $badge-min-height: 20px;
36
36
  }
37
37
 
38
38
  &__slot {
39
- display: flex;
40
39
  align-items: center;
41
- margin-right: $space-xxs;
40
+ display: flex;
42
41
  height: $icon-xxs;
42
+ margin-right: $space-xxs;
43
43
  width: $icon-xxs;
44
44
  }
45
45
  }
@@ -119,8 +119,8 @@ $badge-score-colors: (
119
119
  }
120
120
 
121
121
  &__icon {
122
- margin-right: $space-xxxxxs;
123
122
  align-self: center;
123
+ margin-right: $space-xxxxxs;
124
124
  }
125
125
 
126
126
  &__suffix {
@@ -132,8 +132,8 @@ $badge-score-colors: (
132
132
  &.-small {
133
133
  @include label-xl-default-bold;
134
134
 
135
- padding: $space-xxs $space-xxs;
136
135
  min-width: $badge-score-small-min-width;
136
+ padding: $space-xxs $space-xxs;
137
137
  #{$self}__suffix {
138
138
  @include label-l-default-bold;
139
139
  }
@@ -124,8 +124,8 @@
124
124
  }
125
125
 
126
126
  #{$self}__rightSlot {
127
- padding: $space-xs 0 $space-xs 0;
128
127
  flex-grow: initial;
128
+ padding: $space-xs 0 $space-xs 0;
129
129
  }
130
130
  }
131
131
  }
@@ -172,8 +172,8 @@
172
172
  &__header {
173
173
  display: flex;
174
174
  justify-content: space-between;
175
- width: 100%;
176
175
  padding: 0 $space-xxxxs;
176
+ width: 100%;
177
177
  }
178
178
 
179
179
  &__title {
@@ -189,8 +189,8 @@
189
189
  }
190
190
 
191
191
  &__textWrapper {
192
- flex: 1;
193
192
  display: flex;
193
+ flex: 1;
194
194
  flex-direction: column;
195
195
  justify-content: space-between;
196
196
  }
@@ -198,15 +198,15 @@
198
198
  &__titleWrapper {
199
199
  display: flex;
200
200
  flex-direction: column;
201
- justify-content: center;
202
201
  flex-grow: 1;
202
+ justify-content: center;
203
203
  padding: $space-xxxxs 0;
204
204
  }
205
205
 
206
206
  &__rightWrapper {
207
207
  display: flex;
208
- flex-wrap: nowrap;
209
208
  flex-shrink: 0;
209
+ flex-wrap: nowrap;
210
210
  padding: 0;
211
211
  }
212
212
 
@@ -215,8 +215,8 @@
215
215
  }
216
216
 
217
217
  &__rightSlot {
218
- padding: $space-xxs 0 0 0;
219
218
  flex-grow: 1;
219
+ padding: $space-xxs 0 0 0;
220
220
 
221
221
  &:nth-child(2) {
222
222
  margin-left: $space-xxxxs;
@@ -224,8 +224,8 @@
224
224
  }
225
225
 
226
226
  &__iconContainer {
227
- padding: $space-xxxxs 0;
228
227
  margin-right: $space-s;
228
+ padding: $space-xxxxs 0;
229
229
 
230
230
  &.-hideOnMobile {
231
231
  display: none;
@@ -241,38 +241,38 @@
241
241
  padding: $space-xxs;
242
242
 
243
243
  &.-neutral {
244
- color: $color-neutral-icon;
245
244
  background-color: $color-neutral-background-medium;
245
+ color: $color-neutral-icon;
246
246
  }
247
247
 
248
248
  &.-default {
249
- color: $color-neutral-icon;
250
249
  background-color: $color-neutral-background-medium;
250
+ color: $color-neutral-icon;
251
251
  }
252
252
 
253
253
  &.-warning {
254
- color: $color-warning-icon;
255
254
  background-color: $color-warning-background-medium;
255
+ color: $color-warning-icon;
256
256
  }
257
257
 
258
258
  &.-success {
259
- color: $color-success-icon;
260
259
  background-color: $color-success-background-medium;
260
+ color: $color-success-icon;
261
261
  }
262
262
 
263
263
  &.-info {
264
- color: $color-info-icon;
265
264
  background-color: $color-info-background-medium;
265
+ color: $color-info-icon;
266
266
  }
267
267
 
268
268
  &.-fail {
269
- color: $color-fail-icon;
270
269
  background-color: $color-fail-background-medium;
270
+ color: $color-fail-icon;
271
271
  }
272
272
 
273
273
  &.-danger {
274
- color: $color-danger-icon;
275
274
  background-color: $color-danger-background-medium;
275
+ color: $color-danger-icon;
276
276
  }
277
277
  }
278
278
 
@@ -281,8 +281,8 @@
281
281
  }
282
282
 
283
283
  &__expander {
284
- padding: 0;
285
284
  margin-left: $space-xxs;
285
+ padding: 0;
286
286
  }
287
287
 
288
288
  &__expandedContainer {
@@ -221,8 +221,8 @@
221
221
  &.-xx-small {
222
222
  #{$self}__button {
223
223
  height: $icon-button-xx-small-size;
224
- width: $icon-button-xx-small-size;
225
224
  padding: $space-xxxxs;
225
+ width: $icon-button-xx-small-size;
226
226
  }
227
227
 
228
228
  #{$self}__label {
@@ -233,8 +233,8 @@
233
233
  &.-x-small {
234
234
  #{$self}__button {
235
235
  height: $icon-button-x-small-size;
236
- width: $icon-button-x-small-size;
237
236
  padding: $space-xxxxs;
237
+ width: $icon-button-x-small-size;
238
238
  }
239
239
 
240
240
  #{$self}__label {
@@ -26,8 +26,8 @@
26
26
  $root: &;
27
27
 
28
28
  align-items: flex-start;
29
- pointer-events: none;
30
29
  display: flex;
30
+ pointer-events: none;
31
31
 
32
32
  &.-neutralWeak {
33
33
  color: $color-neutral-text-weak;
@@ -224,9 +224,9 @@ $image-height-small: 140px;
224
224
  }
225
225
 
226
226
  &__checkbox {
227
+ align-items: center;
227
228
  cursor: pointer;
228
229
  display: flex;
229
- align-items: center;
230
230
  margin-top: $space-s;
231
231
 
232
232
  @media #{breakpoint-s()} {
@@ -249,14 +249,14 @@ $image-height-small: 140px;
249
249
  }
250
250
 
251
251
  &__image {
252
- width: 100%;
253
252
  display: block;
253
+ width: 100%;
254
254
  }
255
255
 
256
256
  &__footer {
257
257
  display: flex;
258
- justify-content: space-between;
259
258
  flex-direction: column-reverse;
259
+ justify-content: space-between;
260
260
  padding-top: $space-m;
261
261
 
262
262
  @media #{breakpoint-s()} {
@@ -265,16 +265,16 @@ $image-height-small: 140px;
265
265
 
266
266
  &.-singleColumn {
267
267
  #{$self}__footerColumn {
268
- width: 100%;
269
268
  justify-content: center;
269
+ width: 100%;
270
270
  }
271
271
  }
272
272
  }
273
273
 
274
274
  &__footerColumn {
275
275
  display: flex;
276
- gap: 0 $space-s;
277
276
  flex-direction: column-reverse;
277
+ gap: 0 $space-s;
278
278
 
279
279
  &.--cta {
280
280
  @media #{breakpoint-s()} {
@@ -297,8 +297,8 @@ $image-height-small: 140px;
297
297
  justify-content: center;
298
298
 
299
299
  @media #{breakpoint-s()} {
300
- justify-content: left;
301
300
  flex-direction: row;
301
+ justify-content: left;
302
302
  }
303
303
  }
304
304
  }
@@ -22,8 +22,8 @@
22
22
 
23
23
  align-items: center;
24
24
  border-radius: 50%;
25
- border-width: 1px;
26
25
  border-style: solid;
26
+ border-width: 1px;
27
27
  display: inline-flex;
28
28
  height: $icon-xl;
29
29
  justify-content: center;
@@ -39,41 +39,41 @@
39
39
  &.-is1,
40
40
  &.-is6,
41
41
  &.-primary {
42
- color: $color-primary-text;
43
42
  border-color: $color-primary-border;
43
+ color: $color-primary-text;
44
44
  }
45
45
 
46
46
  &.-is5,
47
47
  &.-is10,
48
48
  &.-neutral {
49
- color: $color-neutral-text;
50
49
  border-color: $color-neutral-border-heavy;
50
+ color: $color-neutral-text;
51
51
  }
52
52
 
53
53
  &.-is2,
54
54
  &.-is7,
55
55
  &.-success {
56
- color: $color-success-text;
57
56
  border-color: $color-success-border;
57
+ color: $color-success-text;
58
58
  }
59
59
 
60
60
  &.-danger {
61
- color: $color-danger-text;
62
61
  border-color: $color-danger-border;
62
+ color: $color-danger-text;
63
63
  }
64
64
 
65
65
  &.-is4,
66
66
  &.-is9,
67
67
  &.-info {
68
- color: $color-info-text;
69
68
  border-color: $color-info-border;
69
+ color: $color-info-text;
70
70
  }
71
71
 
72
72
  &.-is3,
73
73
  &.-is8,
74
74
  &.-accent {
75
- color: $color-accent-text;
76
75
  border-color: $color-accent-border;
76
+ color: $color-accent-text;
77
77
  }
78
78
 
79
79
  &.-medium {
@@ -97,27 +97,27 @@ $pagination-input-height: 32px;
97
97
 
98
98
  @include centeredSpread();
99
99
 
100
- flex-grow: 1;
101
- flex-direction: row;
102
100
  align-items: stretch;
101
+ flex-direction: row;
102
+ flex-grow: 1;
103
103
 
104
104
  &__itemsWrapper {
105
+ align-content: center;
105
106
  display: flex;
106
107
  flex-wrap: nowrap;
107
- align-content: center;
108
108
  justify-content: center;
109
109
  }
110
110
 
111
111
  &.-centered {
112
112
  #{$self}__itemsWrapper {
113
- flex-grow: 1;
114
113
  align-items: center;
114
+ flex-grow: 1;
115
115
  }
116
116
  }
117
117
 
118
118
  &__items {
119
- flex-direction: row;
120
119
  align-items: center;
120
+ flex-direction: row;
121
121
  padding: 0;
122
122
 
123
123
  &.-default {
@@ -146,12 +146,12 @@ $pagination-input-height: 32px;
146
146
  }
147
147
 
148
148
  &__input {
149
- padding: $space-xxxs $space-xxs;
150
149
  background: $color-default-background;
151
150
  border: 1px solid $color-neutral-border-strong;
152
- box-shadow: inset 0 1px 3px $color-neutral-border-strong;
153
151
  border-radius: $radius-s;
152
+ box-shadow: inset 0 1px 3px $color-neutral-border-strong;
154
153
  height: $pagination-input-height;
154
+ padding: $space-xxxs $space-xxs;
155
155
 
156
156
  &:hover {
157
157
  border-color: $color-neutral-border-strong-hovered;
@@ -166,9 +166,9 @@ $pagination-input-height: 32px;
166
166
  &__text {
167
167
  @include text-m-default-regular;
168
168
 
169
- text-align: center;
170
169
  color: $color-neutral-text;
171
170
  padding: $space-xxxs;
171
+ text-align: center;
172
172
  }
173
173
 
174
174
  &__compactItem {
@@ -180,8 +180,8 @@ $pagination-input-height: 32px;
180
180
  &__itemWrapper {
181
181
  @include text-m-default-regular;
182
182
 
183
- text-align: center;
184
183
  padding: $space-xxxxs;
184
+ text-align: center;
185
185
 
186
186
  &.-touchable:hover {
187
187
  cursor: pointer;
@@ -193,14 +193,14 @@ $pagination-input-height: 32px;
193
193
  }
194
194
 
195
195
  &__item {
196
- display: flex;
197
- flex-direction: column;
198
- justify-content: center;
199
196
  align-items: center;
200
- min-width: $pagination-item-min-width;
201
197
  background: $color-neutral-background-weak;
202
198
  border-radius: $radius-xs;
203
199
  color: $color-neutral-text;
200
+ display: flex;
201
+ flex-direction: column;
202
+ justify-content: center;
203
+ min-width: $pagination-item-min-width;
204
204
  padding: $space-xxxs;
205
205
 
206
206
  &.-selected {
@@ -217,19 +217,19 @@ $pagination-input-height: 32px;
217
217
  }
218
218
 
219
219
  &__ellipsis {
220
+ align-items: center;
221
+ color: $color-neutral-text-weak;
220
222
  display: flex;
221
223
  flex-direction: column;
222
224
  justify-content: center;
223
- align-items: center;
224
- color: $color-neutral-text-weak;
225
225
  padding: $space-xxxs;
226
226
  }
227
227
 
228
228
  &__accessorySlot {
229
- display: flex;
230
229
  align-items: center;
231
- padding: 0;
230
+ display: flex;
232
231
  min-height: 0;
232
+ padding: 0;
233
233
  }
234
234
  }
235
235
  </style>
@@ -163,8 +163,8 @@ $pill-colors: (
163
163
  &__label {
164
164
  @include label-s-default-bold;
165
165
 
166
- overflow: hidden;
167
166
  margin: $space-xxxxxs $space-xxxs $space-xxxxxs 0;
167
+ overflow: hidden;
168
168
  text-overflow: ellipsis;
169
169
  white-space: nowrap;
170
170
  }
@@ -174,8 +174,8 @@ $pill-colors: (
174
174
  }
175
175
 
176
176
  &.-x-small {
177
- padding-left: $space-xxxs;
178
177
  min-height: $pill-min-height;
178
+ padding-left: $space-xxxs;
179
179
 
180
180
  #{$self}__leftIcon {
181
181
  margin-right: $space-xxxxxs;
@@ -14,3 +14,8 @@ export const POP_OVER_PLACEMENTS = {
14
14
  LEFT: 'left',
15
15
  RIGHT: 'right',
16
16
  } as const;
17
+
18
+ export const POP_OVER_SIZES = {
19
+ SMALL: 'small',
20
+ MEDIUM: 'medium',
21
+ } as const;
@@ -1,5 +1,10 @@
1
1
  import PopOver from './PopOver.vue';
2
- import { POP_OVER_COLORS, POP_OVER_PLACEMENTS, POP_OVER_TRIGGER_ACTIONS } from './PopOver.consts';
2
+ import {
3
+ POP_OVER_COLORS,
4
+ POP_OVER_PLACEMENTS,
5
+ POP_OVER_SIZES,
6
+ POP_OVER_TRIGGER_ACTIONS,
7
+ } from './PopOver.consts';
3
8
 
4
9
  import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue';
5
10
 
@@ -15,14 +20,14 @@ const StoryTemplate: StoryFn<typeof PopOver> = (argTypes) => ({
15
20
  '<div style="display: flex; align-items: center; justify-content: center; height: 600px">' +
16
21
  '<pop-over :placement="placement" :color="color" :trigger-action="triggerAction" :title-text="titleText" :subtitle-text="subtitleText" :button-text="buttonText" :force-show="forceShow" :header-image-url="headerImageUrl">' +
17
22
  '<template #reference><span>click me!</span></template>' +
18
- '<div>Bacon ipsum dolor amet t-bone meatball ground round turducken buffalo pork. </div>' +
23
+ '<div>Bacon ipsum dolor amet t-bone meatball ground round turducken buffalo pork.</div>' +
19
24
  '</pop-over>' +
20
25
  '</div>',
21
26
  });
22
27
 
23
28
  export const Interactive = StoryTemplate.bind({});
24
29
 
25
- const args = {
30
+ Interactive.args = {
26
31
  placement: POP_OVER_PLACEMENTS.BOTTOM,
27
32
  color: POP_OVER_COLORS.DEFAULT,
28
33
  triggerAction: POP_OVER_TRIGGER_ACTIONS.CLICK,
@@ -46,14 +51,47 @@ const argTypes = {
46
51
  control: { type: 'select', options: Object.values(POP_OVER_TRIGGER_ACTIONS) },
47
52
  defaultValue: POP_OVER_TRIGGER_ACTIONS.CLICK,
48
53
  },
54
+ size: {
55
+ control: { type: 'select', options: Object.values(POP_OVER_SIZES) },
56
+ defaultValue: POP_OVER_SIZES.SMALL,
57
+ },
49
58
  } as ArgTypes;
50
59
 
51
- Interactive.argTypes = argTypes;
52
- Interactive.args = args;
53
-
54
60
  Interactive.parameters = {
55
61
  design: {
56
62
  type: 'figma',
57
63
  url: 'https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS---Components?node-id=3590%3A67741',
58
64
  },
59
65
  };
66
+
67
+ Interactive.argTypes = argTypes;
68
+
69
+ const PopoverWithHTMLStoryTemplate: StoryFn<typeof PopOver> = (argTypes) => ({
70
+ components: { PopOver },
71
+ props: Object.keys(argTypes),
72
+ template:
73
+ '<div style="display: flex; align-items: center; justify-content: center; height: 600px">' +
74
+ '<pop-over :placement="placement" :color="color" :trigger-action="triggerAction" :title-text="titleText" :subtitle-text="subtitleText" :force-show="forceShow" :size="size" :max-height="maxHeight" :visible-arrow="visibleArrow">' +
75
+ '<template #reference><span>click me!</span></template>' +
76
+ '<template #default><b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork. <b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.</template>' +
77
+ '</pop-over>' +
78
+ '</div>',
79
+ });
80
+
81
+ export const PopOverSizeMMaxHeightDisabledArrow = PopoverWithHTMLStoryTemplate.bind({});
82
+
83
+ PopOverSizeMMaxHeightDisabledArrow.args = {
84
+ placement: POP_OVER_PLACEMENTS.BOTTOM,
85
+ color: POP_OVER_COLORS.DEFAULT,
86
+ triggerAction: POP_OVER_TRIGGER_ACTIONS.CLICK,
87
+ titleText: 'Lorem ipsum',
88
+ subtitleText: 'Dolor sit amet',
89
+ size: POP_OVER_SIZES.MEDIUM,
90
+ forceShow: false,
91
+ maxHeight: true,
92
+ visibleArrow: false,
93
+ slotText:
94
+ '<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.',
95
+ } as Args;
96
+
97
+ PopOverSizeMMaxHeightDisabledArrow.argTypes = argTypes;
@@ -9,16 +9,24 @@
9
9
  :delay-on-mouse-over="300"
10
10
  :delay-on-mouse-out="300"
11
11
  :append-to-body="appendToBody"
12
+ :visible-arrow="visibleArrow"
13
+ :root-class="rootClass"
12
14
  >
13
15
  <div
14
16
  class="popper popOver"
15
- :class="{ '-color-neutral': color === POP_OVER_COLORS.NEUTRAL }"
17
+ :class="{
18
+ '-color-neutral': color === POP_OVER_COLORS.NEUTRAL,
19
+ '-small': size === POP_OVER_SIZES.SMALL,
20
+ '-medium': size === POP_OVER_SIZES.MEDIUM,
21
+ }"
16
22
  >
17
23
  <img v-if="headerImageUrl" class="popOver__image" :src="headerImageUrl" alt="" />
18
24
  <div class="popOver__content">
19
25
  <div v-if="titleText" class="popOver__title"> {{ titleText }} </div>
20
26
  <div v-if="subtitleText" class="popOver__subtitle"> {{ subtitleText }} </div>
21
- <slot :close="close" />
27
+ <div class="popOver__contentSlot" :class="{ '-maxHeight': maxHeight }">
28
+ <slot :close="close" />
29
+ </div>
22
30
  </div>
23
31
  <ds-button
24
32
  v-if="buttonText"
@@ -53,7 +61,6 @@
53
61
  display: flex;
54
62
  flex-direction: column;
55
63
  padding: 0;
56
- max-width: 320px;
57
64
 
58
65
  &.-color-neutral ::v-deep .popper__arrow {
59
66
  border-color: $color-neutral-background transparent !important;
@@ -63,6 +70,26 @@
63
70
  background-color: $color-neutral-background;
64
71
  }
65
72
 
73
+ .popOver__contentSlot.-maxHeight {
74
+ overflow: scroll;
75
+ }
76
+
77
+ &.-small {
78
+ max-width: 320px;
79
+
80
+ .popOver__contentSlot.-maxHeight {
81
+ max-height: 160px;
82
+ }
83
+ }
84
+
85
+ &.-medium {
86
+ max-width: 460px;
87
+
88
+ .popOver__contentSlot.-maxHeight {
89
+ max-height: 250px;
90
+ }
91
+ }
92
+
66
93
  &[x-placement^='bottom'] {
67
94
  margin-top: $space-s;
68
95
 
@@ -145,8 +172,8 @@
145
172
  }
146
173
 
147
174
  &__button {
148
- margin: 0 $space-s $space-xs;
149
175
  align-self: flex-end;
176
+ margin: 0 $space-s $space-xs;
150
177
  }
151
178
  }
152
179
  </style>
@@ -154,7 +181,12 @@
154
181
  <script>
155
182
  import VuePopper from 'vue-popperjs';
156
183
  import 'vue-popperjs/dist/vue-popper.css';
157
- import { POP_OVER_COLORS, POP_OVER_PLACEMENTS, POP_OVER_TRIGGER_ACTIONS } from './PopOver.consts';
184
+ import {
185
+ POP_OVER_COLORS,
186
+ POP_OVER_PLACEMENTS,
187
+ POP_OVER_TRIGGER_ACTIONS,
188
+ POP_OVER_SIZES,
189
+ } from './PopOver.consts';
158
190
  import DsButton, { BUTTON_SIZES, BUTTON_TYPES } from '../Buttons/Button';
159
191
 
160
192
  export default {
@@ -217,10 +249,30 @@ export default {
217
249
  type: Object,
218
250
  default: () => ({}),
219
251
  },
252
+ size: {
253
+ type: String,
254
+ default: POP_OVER_SIZES.SMALL,
255
+ validator(size) {
256
+ return Object.values(POP_OVER_SIZES).includes(size);
257
+ },
258
+ },
259
+ maxHeight: {
260
+ type: Boolean,
261
+ default: false,
262
+ },
263
+ visibleArrow: {
264
+ type: Boolean,
265
+ default: true,
266
+ },
267
+ rootClass: {
268
+ type: String,
269
+ default: '',
270
+ },
220
271
  },
221
272
  data() {
222
273
  return {
223
274
  POP_OVER_COLORS: Object.freeze(POP_OVER_COLORS),
275
+ POP_OVER_SIZES: Object.freeze(POP_OVER_SIZES),
224
276
  BUTTON_TYPES: Object.freeze(BUTTON_TYPES),
225
277
  BUTTON_SIZES: Object.freeze(BUTTON_SIZES),
226
278
  key: 1,
@@ -5,7 +5,7 @@
5
5
  '-compact': layout === PROGRESS_BAR_LAYOUTS.COMPACT,
6
6
  }"
7
7
  >
8
- <div class="progressBar__label">
8
+ <div v-if="labelText || labelDataExists" class="progressBar__label">
9
9
  <div
10
10
  class="progressBar__labelText"
11
11
  :class="{ '-medium': labelTextSize === PROGRESS_BAR_LABEL_TEXT_SIZES.MEDIUM }"
@@ -229,8 +229,8 @@ $progress-bar-badge-colors: (
229
229
  display: flex;
230
230
  flex-wrap: wrap;
231
231
  justify-content: right;
232
- margin-left: $space-xxs;
233
232
  margin-bottom: $space-xxxxxs;
233
+ margin-left: $space-xxs;
234
234
  max-width: $progress-bar-label-data-max-width;
235
235
  }
236
236
 
@@ -272,8 +272,8 @@ $progress-bar-badge-colors: (
272
272
  }
273
273
 
274
274
  align-items: center;
275
- border-radius: 50%;
276
275
  border: 1px solid $color-inverted-border;
276
+ border-radius: 50%;
277
277
  display: flex;
278
278
  height: $progress-bar-badge-size;
279
279
  justify-content: center;