@bethinkpl/design-system 15.2.0 → 15.2.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.
- package/dist/design-system.umd.js +279 -78
- package/dist/design-system.umd.js.map +1 -1
- package/dist/lib/js/components/ProgressBar/ProgressBar.stories.d.ts +24 -0
- package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +4 -0
- package/dist/lib/js/components/Well/Well.consts.d.ts +4 -0
- package/dist/lib/js/components/Well/Well.stories.d.ts +5 -0
- package/dist/lib/js/components/Well/index.d.ts +3 -0
- package/dist/lib/js/index.d.ts +2 -0
- package/docs/iframe.html +1 -1
- package/docs/main.6c57cadf.iframe.bundle.js +1 -0
- package/docs/project.json +1 -1
- package/lib/js/components/ProgressBar/ProgressBar.stories.ts +9 -4
- package/lib/js/components/ProgressBar/ProgressBar.vue +20 -6
- package/lib/js/components/Well/Well.consts.ts +4 -0
- package/lib/js/components/Well/Well.stories.ts +43 -0
- package/lib/js/components/Well/Well.vue +52 -0
- package/lib/js/components/Well/index.ts +3 -0
- package/lib/js/index.ts +2 -0
- package/package.json +1 -1
- package/docs/main.0f310da9.iframe.bundle.js +0 -1
package/docs/project.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1681907031126,"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,12 +1,12 @@
|
|
|
1
1
|
import ProgressBar from './ProgressBar.vue';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
PROGRESS_BAR_BADGE_COLORS,
|
|
4
|
+
PROGRESS_BAR_LABEL_TEXT_SIZES,
|
|
5
5
|
PROGRESS_BAR_LAYOUTS,
|
|
6
6
|
PROGRESS_BAR_RADII,
|
|
7
|
+
PROGRESS_BAR_RANGE_COLORS,
|
|
8
|
+
PROGRESS_BAR_SIZES,
|
|
7
9
|
ProgressBarRange,
|
|
8
|
-
PROGRESS_BAR_LABEL_TEXT_SIZES,
|
|
9
|
-
PROGRESS_BAR_BADGE_COLORS,
|
|
10
10
|
} from './ProgressBar.consts';
|
|
11
11
|
|
|
12
12
|
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue';
|
|
@@ -90,6 +90,10 @@ const argTypes = {
|
|
|
90
90
|
control: { type: 'select', options: Object.values(PROGRESS_BAR_BADGE_COLORS) },
|
|
91
91
|
defaultValue: PROGRESS_BAR_BADGE_COLORS.INFO,
|
|
92
92
|
},
|
|
93
|
+
labelTextEllipsis: {
|
|
94
|
+
control: { type: 'boolean' },
|
|
95
|
+
defaultValue: false,
|
|
96
|
+
},
|
|
93
97
|
} as ArgTypes;
|
|
94
98
|
|
|
95
99
|
Interactive.argTypes = argTypes;
|
|
@@ -177,4 +181,5 @@ Compact.args = {
|
|
|
177
181
|
labelData: '30',
|
|
178
182
|
labelDataSupporting: '100',
|
|
179
183
|
labelDataSuffix: '(%)',
|
|
184
|
+
labelTextEllipsis: false,
|
|
180
185
|
} as Args;
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
<div v-if="labelText || labelDataExists" class="progressBar__label">
|
|
9
9
|
<div
|
|
10
10
|
class="progressBar__labelText"
|
|
11
|
-
:class="{
|
|
11
|
+
:class="{
|
|
12
|
+
'-medium': labelTextSize === PROGRESS_BAR_LABEL_TEXT_SIZES.MEDIUM,
|
|
13
|
+
'-ellipsis': labelTextEllipsis,
|
|
14
|
+
}"
|
|
15
|
+
:title="labelTextEllipsis ? labelText : null"
|
|
12
16
|
>
|
|
13
17
|
{{ labelText }}
|
|
14
18
|
</div>
|
|
@@ -219,6 +223,12 @@ $progress-bar-badge-colors: (
|
|
|
219
223
|
@include label-xl-default-bold;
|
|
220
224
|
}
|
|
221
225
|
}
|
|
226
|
+
|
|
227
|
+
&.-ellipsis {
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
text-overflow: ellipsis;
|
|
230
|
+
white-space: nowrap;
|
|
231
|
+
}
|
|
222
232
|
}
|
|
223
233
|
|
|
224
234
|
&__labelDataWrapper {
|
|
@@ -296,15 +306,15 @@ $progress-bar-badge-colors: (
|
|
|
296
306
|
<script lang="ts">
|
|
297
307
|
import { PropType } from 'vue';
|
|
298
308
|
import {
|
|
299
|
-
|
|
300
|
-
|
|
309
|
+
PROGRESS_BAR_BADGE_COLORS,
|
|
310
|
+
PROGRESS_BAR_LABEL_TEXT_SIZES,
|
|
301
311
|
PROGRESS_BAR_LAYOUTS,
|
|
312
|
+
PROGRESS_BAR_RADII,
|
|
313
|
+
PROGRESS_BAR_SIZES,
|
|
302
314
|
ProgressBarRange,
|
|
303
|
-
PROGRESS_BAR_LABEL_TEXT_SIZES,
|
|
304
|
-
PROGRESS_BAR_BADGE_COLORS,
|
|
305
315
|
} from './ProgressBar.consts';
|
|
306
316
|
|
|
307
|
-
import DsIcon, {
|
|
317
|
+
import DsIcon, { ICON_SIZES, ICONS } from '../Icons/Icon';
|
|
308
318
|
|
|
309
319
|
export default {
|
|
310
320
|
name: 'ProgressBar',
|
|
@@ -366,6 +376,10 @@ export default {
|
|
|
366
376
|
type: String,
|
|
367
377
|
default: null,
|
|
368
378
|
},
|
|
379
|
+
labelTextEllipsis: {
|
|
380
|
+
type: Boolean,
|
|
381
|
+
default: false,
|
|
382
|
+
},
|
|
369
383
|
badgePosition: {
|
|
370
384
|
type: Number,
|
|
371
385
|
default: null,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue';
|
|
2
|
+
import Well from './Well.vue';
|
|
3
|
+
import { WELL_PADDINGS } from './Well.consts';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Well',
|
|
7
|
+
component: Well,
|
|
8
|
+
} as Meta<typeof Well>;
|
|
9
|
+
|
|
10
|
+
const StoryTemplate: StoryFn<typeof Well> = (argTypes) => ({
|
|
11
|
+
components: { Well },
|
|
12
|
+
props: Object.keys(argTypes),
|
|
13
|
+
template: '<well :padding="padding"><div v-html="content" /></well>',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const Interactive = StoryTemplate.bind({});
|
|
17
|
+
|
|
18
|
+
const args = {
|
|
19
|
+
size: null,
|
|
20
|
+
} as Args;
|
|
21
|
+
|
|
22
|
+
const argTypes = {
|
|
23
|
+
padding: {
|
|
24
|
+
control: { type: 'select', options: [null, ...Object.values(WELL_PADDINGS)] },
|
|
25
|
+
defaultValue: null,
|
|
26
|
+
},
|
|
27
|
+
content: {
|
|
28
|
+
control: { type: 'text' },
|
|
29
|
+
defaultValue:
|
|
30
|
+
'<h3 style="margin-top: 0">Content</h3>' +
|
|
31
|
+
'Voluptatem saepe suscipit optio et delectus esse sed velit. Autem maxime soluta aliquam perspiciatis quidem dolor saepe rerum.',
|
|
32
|
+
},
|
|
33
|
+
} as ArgTypes;
|
|
34
|
+
|
|
35
|
+
Interactive.argTypes = argTypes;
|
|
36
|
+
Interactive.args = args;
|
|
37
|
+
|
|
38
|
+
Interactive.parameters = {
|
|
39
|
+
design: {
|
|
40
|
+
type: 'figma',
|
|
41
|
+
url: 'https://www.figma.com/file/oqNhXXGdc4ZnNQ6YNpkLEK/INI-152-Baza-v3---planowanie?node-id=1807-518161&t=sQ5nflpPY2YcPKNc-4',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="well"
|
|
4
|
+
:class="{
|
|
5
|
+
'-medium': WELL_PADDINGS.MEDIUM === padding,
|
|
6
|
+
'-small': WELL_PADDINGS.SMALL === padding,
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
9
|
+
<slot />
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<style scoped lang="scss">
|
|
14
|
+
@import '../../../styles/settings/spacings';
|
|
15
|
+
@import '../../../styles/settings/radiuses';
|
|
16
|
+
@import '../../../styles/settings/colors/tokens';
|
|
17
|
+
|
|
18
|
+
.well {
|
|
19
|
+
background-color: $color-neutral-background;
|
|
20
|
+
border-radius: $radius-m;
|
|
21
|
+
|
|
22
|
+
&.-medium {
|
|
23
|
+
padding: $space-s;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.-small {
|
|
27
|
+
padding: $space-xs;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import { WELL_PADDINGS } from './Well.consts';
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
name: 'Well',
|
|
37
|
+
props: {
|
|
38
|
+
padding: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: null,
|
|
41
|
+
validator(padding) {
|
|
42
|
+
return Object.values(WELL_PADDINGS).includes(padding);
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
WELL_PADDINGS: Object.freeze(WELL_PADDINGS),
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
</script>
|
package/lib/js/index.ts
CHANGED
|
@@ -66,6 +66,8 @@ export { default as Pagination } from './components/Pagination';
|
|
|
66
66
|
export * from './components/Pagination/Pagination.consts';
|
|
67
67
|
export { default as OverlayHeader } from './components/OverlayHeader';
|
|
68
68
|
export * from './components/OverlayHeader/OverlayHeader.consts';
|
|
69
|
+
export { default as Well } from './components/Well';
|
|
70
|
+
export * from './components/Well/Well.consts';
|
|
69
71
|
|
|
70
72
|
export {
|
|
71
73
|
initialize as initializeIcons,
|