@bethinkpl/design-system 15.1.1 → 15.1.2
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.
- package/dist/design-system.umd.js +119 -115
- package/dist/design-system.umd.js.map +1 -1
- package/dist/lib/js/components/PopOver/PopOver.stories.d.ts +1 -1
- package/docs/iframe.html +1 -1
- package/docs/main.c8783f38.iframe.bundle.js +1 -0
- package/docs/project.json +1 -1
- package/lib/js/components/Modals/Modal/Modal.vue +39 -46
- package/lib/js/components/PopOver/PopOver.stories.ts +25 -22
- package/lib/js/components/PopOver/PopOver.vue +9 -5
- package/package.json +1 -1
- package/docs/main.981b94a0.iframe.bundle.js +0 -1
package/docs/project.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1680864193845,"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"}}}
|
|
@@ -43,14 +43,13 @@
|
|
|
43
43
|
>
|
|
44
44
|
<div
|
|
45
45
|
v-if="footerTertiaryButtonText || footerCheckboxText"
|
|
46
|
-
class="ds-
|
|
46
|
+
class="ds-modal__footerCtaSecondary"
|
|
47
47
|
>
|
|
48
48
|
<div v-if="footerCheckboxText" class="ds-modal__checkbox">
|
|
49
49
|
<input
|
|
50
50
|
id="ds-modal__checkboxInput"
|
|
51
51
|
type="checkbox"
|
|
52
52
|
:checked="false"
|
|
53
|
-
class="ds-modal__checkboxInput"
|
|
54
53
|
@change="$emit('checkbox-change', $event.target.checked)"
|
|
55
54
|
/>
|
|
56
55
|
<label
|
|
@@ -62,10 +61,10 @@
|
|
|
62
61
|
</div>
|
|
63
62
|
<wnl-button
|
|
64
63
|
v-if="footerTertiaryButtonText"
|
|
65
|
-
class="ds-modal__buttonSecondary"
|
|
66
64
|
:type="BUTTON_TYPES.TEXT"
|
|
67
65
|
:color="BUTTON_COLORS.NEUTRAL"
|
|
68
66
|
:icon-left="footerTertiaryButtonIcon"
|
|
67
|
+
class="ds-modal__tertiaryButton"
|
|
69
68
|
@click="$emit('tertiary-button-click')"
|
|
70
69
|
>
|
|
71
70
|
{{ footerTertiaryButtonText }}
|
|
@@ -73,11 +72,10 @@
|
|
|
73
72
|
</div>
|
|
74
73
|
<div
|
|
75
74
|
v-if="footerSecondaryButtonText || footerPrimaryButtonText"
|
|
76
|
-
class="ds-
|
|
75
|
+
class="ds-modal__footerCtaPrimary"
|
|
77
76
|
>
|
|
78
77
|
<wnl-button
|
|
79
78
|
v-if="footerSecondaryButtonText"
|
|
80
|
-
class="ds-modal__buttonSecondary"
|
|
81
79
|
:type="BUTTON_TYPES.OUTLINED"
|
|
82
80
|
:color="calcFooterSecondaryButtonColor"
|
|
83
81
|
:icon-right="footerSecondaryButtonIcon"
|
|
@@ -87,7 +85,6 @@
|
|
|
87
85
|
</wnl-button>
|
|
88
86
|
<wnl-button
|
|
89
87
|
v-if="footerPrimaryButtonText"
|
|
90
|
-
class="ds-modal__buttonPrimary"
|
|
91
88
|
:color="calcFooterPrimaryButtonColor"
|
|
92
89
|
:icon-right="footerPrimaryButtonIcon"
|
|
93
90
|
@click="$emit('primary-button-click')"
|
|
@@ -188,17 +185,19 @@ $image-height-small: 140px;
|
|
|
188
185
|
&__header {
|
|
189
186
|
display: flex;
|
|
190
187
|
flex-direction: column;
|
|
188
|
+
margin-bottom: $space-s;
|
|
189
|
+
row-gap: $space-xs;
|
|
191
190
|
}
|
|
192
191
|
|
|
193
192
|
&__headerFeatureIcon {
|
|
194
193
|
align-self: center;
|
|
195
|
-
margin-bottom: $space-
|
|
194
|
+
margin-bottom: $space-xs;
|
|
196
195
|
}
|
|
197
196
|
|
|
198
197
|
&__headerTitle {
|
|
199
198
|
@include heading-xl-default-bold;
|
|
200
199
|
|
|
201
|
-
margin-bottom:
|
|
200
|
+
margin-bottom: 0;
|
|
202
201
|
margin-top: 0;
|
|
203
202
|
|
|
204
203
|
@media #{breakpoint-s()} {
|
|
@@ -213,25 +212,19 @@ $image-height-small: 140px;
|
|
|
213
212
|
&__headerSubtitle {
|
|
214
213
|
@include heading-m-default-regular;
|
|
215
214
|
|
|
216
|
-
margin-bottom:
|
|
215
|
+
margin-bottom: 0;
|
|
217
216
|
margin-top: 0;
|
|
218
217
|
}
|
|
219
218
|
|
|
220
219
|
&__slotContent {
|
|
221
220
|
@include text-m-default-regular;
|
|
222
|
-
|
|
223
|
-
margin-bottom: $space-xs;
|
|
224
221
|
}
|
|
225
222
|
|
|
226
223
|
&__checkbox {
|
|
227
|
-
align-items:
|
|
224
|
+
align-items: flex-start;
|
|
228
225
|
cursor: pointer;
|
|
229
226
|
display: flex;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
@media #{breakpoint-s()} {
|
|
233
|
-
margin-top: 0;
|
|
234
|
-
}
|
|
227
|
+
flex-flow: row;
|
|
235
228
|
}
|
|
236
229
|
|
|
237
230
|
&__checkboxLabel {
|
|
@@ -254,65 +247,65 @@ $image-height-small: 140px;
|
|
|
254
247
|
}
|
|
255
248
|
|
|
256
249
|
&__footer {
|
|
250
|
+
column-gap: $space-s;
|
|
257
251
|
display: flex;
|
|
258
252
|
flex-direction: column-reverse;
|
|
259
253
|
justify-content: space-between;
|
|
254
|
+
line-break: anywhere;
|
|
260
255
|
padding-top: $space-m;
|
|
261
256
|
|
|
262
257
|
@media #{breakpoint-s()} {
|
|
258
|
+
align-items: center;
|
|
263
259
|
flex-direction: row;
|
|
264
260
|
}
|
|
265
261
|
|
|
266
262
|
&.-singleColumn {
|
|
267
|
-
#{$self}
|
|
263
|
+
#{$self}__footerCtaPrimary {
|
|
268
264
|
justify-content: center;
|
|
269
265
|
width: 100%;
|
|
270
266
|
}
|
|
271
267
|
}
|
|
272
268
|
}
|
|
273
269
|
|
|
274
|
-
&
|
|
275
|
-
|
|
276
|
-
flex-direction: column-reverse;
|
|
277
|
-
gap: 0 $space-s;
|
|
270
|
+
&__tertiaryButton {
|
|
271
|
+
flex-shrink: 0;
|
|
278
272
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
flex-direction: row;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
&:not(:first-child) {
|
|
285
|
-
// first-child because of reverse order in flex-direction
|
|
286
|
-
margin-bottom: $space-xs;
|
|
287
|
-
|
|
288
|
-
@media #{breakpoint-s()} {
|
|
289
|
-
margin-bottom: 0;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
273
|
+
&:only-child {
|
|
274
|
+
margin: 0 auto;
|
|
292
275
|
}
|
|
276
|
+
}
|
|
293
277
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
278
|
+
&__footerCtaPrimary {
|
|
279
|
+
display: flex;
|
|
280
|
+
flex-direction: column-reverse;
|
|
281
|
+
flex-shrink: 0;
|
|
282
|
+
gap: $space-s 0;
|
|
298
283
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
284
|
+
@media #{breakpoint-s()} {
|
|
285
|
+
flex-direction: row;
|
|
286
|
+
gap: 0 $space-s;
|
|
303
287
|
}
|
|
304
|
-
}
|
|
305
288
|
|
|
306
|
-
&__buttonPrimary {
|
|
307
289
|
&:not(:first-child) {
|
|
308
290
|
// first-child because of reverse order in flex-direction
|
|
309
|
-
margin-bottom: $space-
|
|
291
|
+
margin-bottom: $space-xs;
|
|
310
292
|
|
|
311
293
|
@media #{breakpoint-s()} {
|
|
312
294
|
margin-bottom: 0;
|
|
313
295
|
}
|
|
314
296
|
}
|
|
315
297
|
}
|
|
298
|
+
|
|
299
|
+
&__footerCtaSecondary {
|
|
300
|
+
align-items: center;
|
|
301
|
+
display: flex;
|
|
302
|
+
gap: 0 $space-m;
|
|
303
|
+
justify-content: space-between;
|
|
304
|
+
|
|
305
|
+
@media #{breakpoint-s()} {
|
|
306
|
+
justify-content: left;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
316
309
|
}
|
|
317
310
|
</style>
|
|
318
311
|
|
|
@@ -17,10 +17,10 @@ const StoryTemplate: StoryFn<typeof PopOver> = (argTypes) => ({
|
|
|
17
17
|
components: { PopOver },
|
|
18
18
|
props: Object.keys(argTypes),
|
|
19
19
|
template:
|
|
20
|
-
'<div style="display: flex; align-items: center; justify-content: center; height:
|
|
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">' +
|
|
20
|
+
'<div style="display: flex; align-items: center; justify-content: center; height: 800px">' +
|
|
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" :size="size" :max-height="maxHeight" :is-pointer-visible="isPointerVisible">' +
|
|
22
22
|
'<template #reference><span>click me!</span></template>' +
|
|
23
|
-
'<div>
|
|
23
|
+
'<div>{{ definitionSlot }}</div>' +
|
|
24
24
|
'</pop-over>' +
|
|
25
25
|
'</div>',
|
|
26
26
|
});
|
|
@@ -28,17 +28,26 @@ const StoryTemplate: StoryFn<typeof PopOver> = (argTypes) => ({
|
|
|
28
28
|
export const Interactive = StoryTemplate.bind({});
|
|
29
29
|
|
|
30
30
|
Interactive.args = {
|
|
31
|
+
size: POP_OVER_SIZES.SMALL,
|
|
32
|
+
maxHeight: false,
|
|
31
33
|
placement: POP_OVER_PLACEMENTS.BOTTOM,
|
|
32
34
|
color: POP_OVER_COLORS.DEFAULT,
|
|
33
|
-
|
|
35
|
+
headerImageUrl:
|
|
36
|
+
'https://wnl-platform-dev-kuba.s3.eu-central-1.amazonaws.com/public/illustation-StatusLekcji.png',
|
|
34
37
|
titleText: 'Lorem ipsum',
|
|
35
38
|
subtitleText: 'Dolor sit amet',
|
|
36
39
|
buttonText: 'button text',
|
|
40
|
+
triggerAction: POP_OVER_TRIGGER_ACTIONS.CLICK,
|
|
37
41
|
forceShow: false,
|
|
38
|
-
|
|
42
|
+
isPointerVisible: true,
|
|
43
|
+
definitionSlot: 'Bacon ipsum dolor amet t-bone meatball ground round turducken buffalo pork.',
|
|
39
44
|
} as Args;
|
|
40
45
|
|
|
41
46
|
const argTypes = {
|
|
47
|
+
size: {
|
|
48
|
+
control: { type: 'select', options: Object.values(POP_OVER_SIZES) },
|
|
49
|
+
defaultValue: POP_OVER_SIZES.SMALL,
|
|
50
|
+
},
|
|
42
51
|
placement: {
|
|
43
52
|
control: { type: 'select', options: Object.values(POP_OVER_PLACEMENTS) },
|
|
44
53
|
defaultValue: POP_OVER_PLACEMENTS.BOTTOM,
|
|
@@ -51,12 +60,10 @@ const argTypes = {
|
|
|
51
60
|
control: { type: 'select', options: Object.values(POP_OVER_TRIGGER_ACTIONS) },
|
|
52
61
|
defaultValue: POP_OVER_TRIGGER_ACTIONS.CLICK,
|
|
53
62
|
},
|
|
54
|
-
size: {
|
|
55
|
-
control: { type: 'select', options: Object.values(POP_OVER_SIZES) },
|
|
56
|
-
defaultValue: POP_OVER_SIZES.SMALL,
|
|
57
|
-
},
|
|
58
63
|
} as ArgTypes;
|
|
59
64
|
|
|
65
|
+
Interactive.argTypes = argTypes;
|
|
66
|
+
|
|
60
67
|
Interactive.parameters = {
|
|
61
68
|
design: {
|
|
62
69
|
type: 'figma',
|
|
@@ -64,34 +71,30 @@ Interactive.parameters = {
|
|
|
64
71
|
},
|
|
65
72
|
};
|
|
66
73
|
|
|
67
|
-
Interactive.argTypes = argTypes;
|
|
68
|
-
|
|
69
74
|
const PopoverWithHTMLStoryTemplate: StoryFn<typeof PopOver> = (argTypes) => ({
|
|
70
75
|
components: { PopOver },
|
|
71
76
|
props: Object.keys(argTypes),
|
|
72
77
|
template:
|
|
73
|
-
'<div style="display: flex; align-items: center; justify-content: center; height:
|
|
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
|
|
78
|
+
'<div style="display: flex; align-items: center; justify-content: center; height: 800px">' +
|
|
79
|
+
'<pop-over :placement="placement" :color="color" :trigger-action="triggerAction" :title-text="titleText" :subtitle-text="subtitleText" :force-show="forceShow" :size="size" :max-height="maxHeight" :is-pointer-visible="isPointerVisible">' +
|
|
75
80
|
'<template #reference><span>click me!</span></template>' +
|
|
76
81
|
'<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
82
|
'</pop-over>' +
|
|
78
83
|
'</div>',
|
|
79
84
|
});
|
|
80
85
|
|
|
81
|
-
export const
|
|
86
|
+
export const PopOverMMaxHeightNoPointer = PopoverWithHTMLStoryTemplate.bind({});
|
|
82
87
|
|
|
83
|
-
|
|
88
|
+
PopOverMMaxHeightNoPointer.args = {
|
|
89
|
+
size: POP_OVER_SIZES.MEDIUM,
|
|
90
|
+
maxHeight: true,
|
|
84
91
|
placement: POP_OVER_PLACEMENTS.BOTTOM,
|
|
85
92
|
color: POP_OVER_COLORS.DEFAULT,
|
|
86
|
-
triggerAction: POP_OVER_TRIGGER_ACTIONS.CLICK,
|
|
87
93
|
titleText: 'Lorem ipsum',
|
|
88
94
|
subtitleText: 'Dolor sit amet',
|
|
89
|
-
|
|
95
|
+
triggerAction: POP_OVER_TRIGGER_ACTIONS.CLICK,
|
|
90
96
|
forceShow: false,
|
|
91
|
-
|
|
92
|
-
visibleArrow: false,
|
|
93
|
-
slotText:
|
|
94
|
-
'<b>Bacon</b> ipsum dolor <u>amet</u> t-bone meatball ground round turducken buffalo pork.',
|
|
97
|
+
isPointerVisible: false,
|
|
95
98
|
} as Args;
|
|
96
99
|
|
|
97
|
-
|
|
100
|
+
PopOverMMaxHeightNoPointer.argTypes = argTypes;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
:delay-on-mouse-over="300"
|
|
10
10
|
:delay-on-mouse-out="300"
|
|
11
11
|
:append-to-body="appendToBody"
|
|
12
|
-
:visible-arrow="
|
|
12
|
+
:visible-arrow="isPointerVisible"
|
|
13
13
|
:root-class="rootClass"
|
|
14
14
|
>
|
|
15
15
|
<div
|
|
@@ -70,12 +70,16 @@
|
|
|
70
70
|
background-color: $color-neutral-background;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
.popOver__contentSlot {
|
|
74
|
+
word-break: break-word;
|
|
75
|
+
}
|
|
76
|
+
|
|
73
77
|
.popOver__contentSlot.-maxHeight {
|
|
74
|
-
overflow: scroll;
|
|
78
|
+
overflow: hidden scroll;
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
&.-small {
|
|
78
|
-
|
|
82
|
+
width: 320px;
|
|
79
83
|
|
|
80
84
|
.popOver__contentSlot.-maxHeight {
|
|
81
85
|
max-height: 160px;
|
|
@@ -83,7 +87,7 @@
|
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
&.-medium {
|
|
86
|
-
|
|
90
|
+
width: min(90vw, 460px);
|
|
87
91
|
|
|
88
92
|
.popOver__contentSlot.-maxHeight {
|
|
89
93
|
max-height: 250px;
|
|
@@ -260,7 +264,7 @@ export default {
|
|
|
260
264
|
type: Boolean,
|
|
261
265
|
default: false,
|
|
262
266
|
},
|
|
263
|
-
|
|
267
|
+
isPointerVisible: {
|
|
264
268
|
type: Boolean,
|
|
265
269
|
default: true,
|
|
266
270
|
},
|