@bethinkpl/design-system 14.1.2 → 15.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.
- package/dist/design-system.umd.js +582 -309
- package/dist/design-system.umd.js.map +1 -1
- package/dist/lib/js/components/Banner/Banner.stories.d.ts +56 -8
- package/dist/lib/js/components/Banner/Banner.vue.d.ts +28 -4
- package/dist/lib/js/components/Buttons/Button/Button.stories.d.ts +14 -2
- package/dist/lib/js/components/Buttons/Button/Button.vue.d.ts +7 -1
- package/dist/lib/js/components/Buttons/IconButton/IconButton.stories.d.ts +98 -14
- package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +14 -2
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.stories.d.ts +14 -2
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +7 -1
- package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +7 -1
- package/dist/lib/js/components/Modal/Modal.vue.d.ts +7 -1
- package/dist/lib/js/components/Modals/Modal/Modal.stories.d.ts +140 -20
- package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +28 -4
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.stories.d.ts +112 -16
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +28 -4
- package/dist/lib/js/components/OverlayHeader/OverlayHeader.stories.d.ts +42 -6
- package/dist/lib/js/components/OverlayHeader/OverlayHeader.vue.d.ts +21 -3
- package/dist/lib/js/components/Pagination/Pagination.stories.d.ts +42 -6
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +21 -3
- package/dist/lib/js/components/Pill/Pill.stories.d.ts +42 -6
- package/dist/lib/js/components/Pill/Pill.vue.d.ts +21 -3
- package/dist/lib/js/components/ProgressBar/ProgressBar.consts.d.ts +34 -13
- package/dist/lib/js/components/ProgressBar/ProgressBar.stories.d.ts +1477 -169
- package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +246 -28
- package/dist/lib/js/components/SectionHeader/SectionHeader.stories.d.ts +14 -2
- package/dist/lib/js/components/SectionHeader/SectionHeader.vue.d.ts +7 -1
- package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.stories.d.ts +14 -2
- package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.vue.d.ts +7 -1
- package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.stories.d.ts +14 -2
- package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue.d.ts +7 -1
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.stories.d.ts +14 -2
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +7 -1
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +7 -1
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockedeStatus.stories.d.ts +14 -2
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.stories.d.ts +70 -10
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +35 -5
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.stories.d.ts +140 -20
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +35 -5
- package/dist/lib/js/components/Tile/Tile.consts.d.ts +1 -0
- package/dist/lib/js/components/Tile/Tile.stories.d.ts +21 -3
- package/dist/lib/js/components/Tile/Tile.vue.d.ts +7 -1
- package/dist/lib/js/icons/fontawesome.d.ts +7 -0
- package/docs/iframe.html +1 -1
- package/docs/main.a243e1cc.iframe.bundle.js +1 -0
- package/docs/project.json +1 -1
- package/docs/vendors~main.09187a93.iframe.bundle.js +3 -0
- package/docs/vendors~main.09187a93.iframe.bundle.js.map +1 -0
- package/lib/js/components/Icons/Icon/Icon.consts.ts +0 -2
- package/lib/js/components/Modals/Modal/Modal.vue +3 -0
- package/lib/js/components/Modals/ModalDialog/ModalDialog.vue +3 -0
- package/lib/js/components/ProgressBar/ProgressBar.consts.ts +41 -15
- package/lib/js/components/ProgressBar/ProgressBar.stories.ts +37 -49
- package/lib/js/components/ProgressBar/ProgressBar.vue +169 -113
- package/lib/js/components/Tile/Tile.consts.ts +1 -0
- package/lib/js/components/Tile/Tile.vue +16 -0
- package/lib/js/icons/fontawesome.ts +14 -0
- package/package.json +1 -1
- package/docs/main.2e6f520b.iframe.bundle.js +0 -1
- package/docs/vendors~main.3e958b34.iframe.bundle.js +0 -3
- package/docs/vendors~main.3e958b34.iframe.bundle.js.map +0 -1
- package/lib/images/icons/clipboard-add.svg +0 -1
- /package/docs/{vendors~main.3e958b34.iframe.bundle.js.LICENSE.txt → vendors~main.09187a93.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendors~main.09187a93.iframe.bundle.js","sources":[],"mappings":";A","sourceRoot":""}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import ClipboardAdd from '../../../../images/icons/clipboard-add.svg';
|
|
2
1
|
import HeadWithQuestionMark from '../../../../images/icons/head-with-question-mark.svg';
|
|
3
2
|
import Ribbon from '../../../../images/icons/ribbon.svg';
|
|
4
3
|
import SlidersSearch from '../../../../images/icons/sliders-search.svg';
|
|
@@ -16,7 +15,6 @@ export const ICON_SIZES = {
|
|
|
16
15
|
};
|
|
17
16
|
|
|
18
17
|
const BETHINK_ICONS = {
|
|
19
|
-
CLIPBOARD_ADD: ClipboardAdd,
|
|
20
18
|
HEAD_WITH_QUESTION_MARK: HeadWithQuestionMark,
|
|
21
19
|
RIBBON: Ribbon,
|
|
22
20
|
SLIDERS_SEARCH: SlidersSearch,
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
:type="BUTTON_TYPES.TEXT"
|
|
67
67
|
:color="BUTTON_COLORS.NEUTRAL"
|
|
68
68
|
:icon-left="footerTertiaryButtonIcon"
|
|
69
|
+
@click="$emit('tertiary-button-click')"
|
|
69
70
|
>
|
|
70
71
|
{{ footerTertiaryButtonText }}
|
|
71
72
|
</wnl-button>
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
:type="BUTTON_TYPES.OUTLINED"
|
|
81
82
|
:color="calcFooterSecondaryButtonColor"
|
|
82
83
|
:icon-right="footerSecondaryButtonIcon"
|
|
84
|
+
@click="$emit('secondary-button-click')"
|
|
83
85
|
>
|
|
84
86
|
{{ footerSecondaryButtonText }}
|
|
85
87
|
</wnl-button>
|
|
@@ -88,6 +90,7 @@
|
|
|
88
90
|
class="ds-modal__buttonPrimary"
|
|
89
91
|
:color="calcFooterPrimaryButtonColor"
|
|
90
92
|
:icon-right="footerPrimaryButtonIcon"
|
|
93
|
+
@click="$emit('primary-button-click')"
|
|
91
94
|
>
|
|
92
95
|
{{ footerPrimaryButtonText }}
|
|
93
96
|
</wnl-button>
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
:footer-primary-button-icon="footerPrimaryButtonIcon"
|
|
15
15
|
:footer-secondary-button-text="footerSecondaryButtonText"
|
|
16
16
|
:footer-secondary-button-icon="footerSecondaryButtonIcon"
|
|
17
|
+
@close-modal="$emit('close-modal')"
|
|
18
|
+
@primary-button-click="$emit('primary-button-click')"
|
|
19
|
+
@secondary-button-click="$emit('secondary-button-click')"
|
|
17
20
|
>
|
|
18
21
|
<slot />
|
|
19
22
|
</ds-modal>
|
|
@@ -1,7 +1,39 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const PROGRESS_BAR_RANGE_COLORS = {
|
|
2
|
+
PRIMARY_MEDIUM: 'primaryMedium',
|
|
3
|
+
PRIMARY: 'primary',
|
|
4
|
+
PRIMARY_WEAK: 'primaryWeak',
|
|
5
|
+
PRIMARY_GHOST: 'primaryGhost',
|
|
6
|
+
|
|
7
|
+
NEUTRAL_MEDIUM: 'neutralMedium',
|
|
2
8
|
NEUTRAL: 'neutral',
|
|
9
|
+
NEUTRAL_WEAK: 'neutralWeak',
|
|
10
|
+
NEUTRAL_GHOST: 'neutralGhost',
|
|
11
|
+
|
|
12
|
+
INFO_MEDIUM: 'infoMedium',
|
|
3
13
|
INFO: 'info',
|
|
14
|
+
INFO_WEAK: 'infoWeak',
|
|
15
|
+
INFO_GHOST: 'infoGhost',
|
|
16
|
+
|
|
17
|
+
SUCCESS_MEDIUM: 'successMedium',
|
|
18
|
+
SUCCESS: 'success',
|
|
19
|
+
SUCCESS_WEAK: 'successWeak',
|
|
20
|
+
SUCCESS_GHOST: 'successGhost',
|
|
21
|
+
|
|
22
|
+
WARNING_MEDIUM: 'warningMedium',
|
|
23
|
+
WARNING: 'warning',
|
|
24
|
+
WARNING_WEAK: 'warningWeak',
|
|
25
|
+
WARNING_GHOST: 'warningGhost',
|
|
26
|
+
|
|
27
|
+
FAIL_MEDIUM: 'failMedium',
|
|
28
|
+
FAIL: 'fail',
|
|
29
|
+
FAIL_WEAK: 'failWeak',
|
|
30
|
+
FAIL_GHOST: 'failGhost',
|
|
31
|
+
} as const;
|
|
32
|
+
|
|
33
|
+
export const PROGRESS_BAR_BADGE_COLORS = {
|
|
4
34
|
PRIMARY: 'primary',
|
|
35
|
+
NEUTRAL: 'neutral',
|
|
36
|
+
INFO: 'info',
|
|
5
37
|
SUCCESS: 'success',
|
|
6
38
|
WARNING: 'warning',
|
|
7
39
|
FAIL: 'fail',
|
|
@@ -13,6 +45,11 @@ export const PROGRESS_BAR_SIZES = {
|
|
|
13
45
|
XSMALL: 'extra small',
|
|
14
46
|
} as const;
|
|
15
47
|
|
|
48
|
+
export const PROGRESS_BAR_LABEL_TEXT_SIZES = {
|
|
49
|
+
MEDIUM: 'medium',
|
|
50
|
+
SMALL: 'small',
|
|
51
|
+
} as const;
|
|
52
|
+
|
|
16
53
|
export const PROGRESS_BAR_RADII = {
|
|
17
54
|
DEFAULT: 'default',
|
|
18
55
|
NONE: 'none',
|
|
@@ -23,19 +60,8 @@ export const PROGRESS_BAR_LAYOUTS = {
|
|
|
23
60
|
COMPACT: 'compact',
|
|
24
61
|
};
|
|
25
62
|
|
|
26
|
-
export const PROGRESS_BAR_LAYERS = {
|
|
27
|
-
ONE: 1,
|
|
28
|
-
TWO: 2,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const PROGRESS_BAR_COLOR_SCHEMES = {
|
|
32
|
-
DEFAULT: 'default',
|
|
33
|
-
MEDIUM: 'medium',
|
|
34
|
-
MEDIUM_NEUTRAL: 'medium-neutral',
|
|
35
|
-
};
|
|
36
|
-
|
|
37
63
|
export interface ProgressBarRange {
|
|
38
|
-
|
|
39
|
-
start:
|
|
40
|
-
length:
|
|
64
|
+
color: typeof PROGRESS_BAR_RANGE_COLORS[keyof typeof PROGRESS_BAR_RANGE_COLORS];
|
|
65
|
+
start: number;
|
|
66
|
+
length: number;
|
|
41
67
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import ProgressBar from './ProgressBar.vue';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
PROGRESS_BAR_RANGE_COLORS,
|
|
4
4
|
PROGRESS_BAR_SIZES,
|
|
5
5
|
PROGRESS_BAR_LAYOUTS,
|
|
6
6
|
PROGRESS_BAR_RADII,
|
|
7
|
-
PROGRESS_BAR_LAYERS,
|
|
8
|
-
PROGRESS_BAR_COLOR_SCHEMES,
|
|
9
7
|
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';
|
|
@@ -19,43 +19,39 @@ export default {
|
|
|
19
19
|
const StoryTemplate: StoryFn<typeof ProgressBar> = (argTypes) => ({
|
|
20
20
|
components: { ProgressBar },
|
|
21
21
|
props: Object.keys(argTypes),
|
|
22
|
-
template:
|
|
22
|
+
template: `
|
|
23
|
+
<ProgressBar
|
|
24
|
+
v-bind=$props
|
|
25
|
+
:badge-position="(typeof ($props.badgePosition) === 'undefined' || $props.badgePosition === '') ? null : parseInt($props.badgePosition, 10)"
|
|
26
|
+
/>`,
|
|
23
27
|
});
|
|
24
28
|
|
|
25
29
|
export const Interactive = StoryTemplate.bind({});
|
|
26
30
|
|
|
27
31
|
const argTypes = {
|
|
28
|
-
numberOfLayers: {
|
|
29
|
-
control: { type: 'select', options: Object.values(PROGRESS_BAR_LAYERS) },
|
|
30
|
-
defaultValue: PROGRESS_BAR_LAYERS.ONE,
|
|
31
|
-
},
|
|
32
|
-
colorScheme: {
|
|
33
|
-
control: { type: 'select', options: Object.values(PROGRESS_BAR_COLOR_SCHEMES) },
|
|
34
|
-
defaultValue: PROGRESS_BAR_COLOR_SCHEMES.DEFAULT,
|
|
35
|
-
},
|
|
36
|
-
color: {
|
|
37
|
-
control: { type: 'select', options: Object.values(PROGRESS_BAR_COLORS) },
|
|
38
|
-
defaultValue: PROGRESS_BAR_COLORS.INFO,
|
|
39
|
-
},
|
|
40
32
|
size: {
|
|
41
33
|
control: { type: 'select', options: Object.values(PROGRESS_BAR_SIZES) },
|
|
42
|
-
defaultValue: PROGRESS_BAR_SIZES.
|
|
34
|
+
defaultValue: PROGRESS_BAR_SIZES.SMALL,
|
|
35
|
+
},
|
|
36
|
+
labelTextSize: {
|
|
37
|
+
control: { type: 'select', options: Object.values(PROGRESS_BAR_LABEL_TEXT_SIZES) },
|
|
38
|
+
defaultValue: PROGRESS_BAR_LABEL_TEXT_SIZES.SMALL,
|
|
43
39
|
},
|
|
44
40
|
ranges: {
|
|
45
41
|
control: { type: 'array' },
|
|
46
42
|
defaultValue: [
|
|
47
43
|
{
|
|
48
|
-
|
|
44
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO,
|
|
49
45
|
start: 0,
|
|
50
46
|
length: 30,
|
|
51
47
|
} as ProgressBarRange,
|
|
52
48
|
{
|
|
53
|
-
|
|
49
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO_WEAK,
|
|
54
50
|
start: 30,
|
|
55
51
|
length: 10,
|
|
56
52
|
} as ProgressBarRange,
|
|
57
53
|
{
|
|
58
|
-
|
|
54
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO_GHOST,
|
|
59
55
|
start: 40,
|
|
60
56
|
length: 10,
|
|
61
57
|
} as ProgressBarRange,
|
|
@@ -85,6 +81,15 @@ const argTypes = {
|
|
|
85
81
|
control: { type: 'text' },
|
|
86
82
|
defaultValue: '(%)',
|
|
87
83
|
},
|
|
84
|
+
badgePosition: {
|
|
85
|
+
// we use `text` type, because Storybook doesn't allow empty field in `number` type which imitates null
|
|
86
|
+
control: { type: 'text' },
|
|
87
|
+
defaultValue: '50',
|
|
88
|
+
},
|
|
89
|
+
badgeColor: {
|
|
90
|
+
control: { type: 'select', options: Object.values(PROGRESS_BAR_BADGE_COLORS) },
|
|
91
|
+
defaultValue: PROGRESS_BAR_BADGE_COLORS.INFO,
|
|
92
|
+
},
|
|
88
93
|
} as ArgTypes;
|
|
89
94
|
|
|
90
95
|
Interactive.argTypes = argTypes;
|
|
@@ -96,90 +101,74 @@ Interactive.parameters = {
|
|
|
96
101
|
},
|
|
97
102
|
};
|
|
98
103
|
|
|
99
|
-
const argTypesColorOnly = {
|
|
100
|
-
color: {
|
|
101
|
-
control: { type: 'select', options: Object.values(PROGRESS_BAR_COLORS) },
|
|
102
|
-
defaultValue: PROGRESS_BAR_COLORS.INFO,
|
|
103
|
-
},
|
|
104
|
-
} as ArgTypes;
|
|
105
|
-
|
|
106
104
|
export const WithoutLabels = StoryTemplate.bind({});
|
|
107
105
|
|
|
108
106
|
WithoutLabels.args = {
|
|
109
|
-
color: PROGRESS_BAR_COLORS.PRIMARY,
|
|
110
107
|
ranges: [
|
|
111
108
|
{
|
|
112
|
-
|
|
109
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO,
|
|
113
110
|
start: 0,
|
|
114
111
|
length: 30,
|
|
115
112
|
} as ProgressBarRange,
|
|
116
113
|
],
|
|
117
114
|
} as Args;
|
|
118
|
-
WithoutLabels.argTypes = argTypesColorOnly;
|
|
119
115
|
|
|
120
|
-
export const
|
|
116
|
+
export const TwoColors = StoryTemplate.bind({});
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
color: PROGRESS_BAR_COLORS.PRIMARY,
|
|
124
|
-
numberOfLayers: 2,
|
|
118
|
+
TwoColors.args = {
|
|
125
119
|
ranges: [
|
|
126
120
|
{
|
|
127
|
-
|
|
121
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO,
|
|
128
122
|
start: 0,
|
|
129
123
|
length: 30,
|
|
130
124
|
} as ProgressBarRange,
|
|
131
125
|
{
|
|
132
|
-
|
|
126
|
+
color: PROGRESS_BAR_RANGE_COLORS.WARNING,
|
|
133
127
|
start: 30,
|
|
134
128
|
length: 30,
|
|
135
129
|
} as ProgressBarRange,
|
|
136
130
|
],
|
|
137
131
|
} as Args;
|
|
138
|
-
TwoLayers.argTypes = argTypesColorOnly;
|
|
139
132
|
|
|
140
133
|
export const WithGaps = StoryTemplate.bind({});
|
|
141
134
|
|
|
142
135
|
WithGaps.args = {
|
|
143
|
-
color: PROGRESS_BAR_COLORS.PRIMARY,
|
|
144
|
-
numberOfLayers: 2,
|
|
145
136
|
ranges: [
|
|
146
137
|
{
|
|
147
|
-
|
|
138
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO,
|
|
148
139
|
start: 0,
|
|
149
140
|
length: 10,
|
|
150
141
|
} as ProgressBarRange,
|
|
151
142
|
{
|
|
152
|
-
|
|
143
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO_WEAK,
|
|
153
144
|
start: 20,
|
|
154
145
|
length: 10,
|
|
155
146
|
} as ProgressBarRange,
|
|
156
147
|
{
|
|
157
|
-
|
|
148
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO,
|
|
158
149
|
start: 40,
|
|
159
150
|
length: 10,
|
|
160
151
|
} as ProgressBarRange,
|
|
161
152
|
{
|
|
162
|
-
|
|
153
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO_WEAK,
|
|
163
154
|
start: 50,
|
|
164
155
|
length: 10,
|
|
165
156
|
} as ProgressBarRange,
|
|
166
157
|
{
|
|
167
|
-
|
|
158
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO,
|
|
168
159
|
start: 70,
|
|
169
|
-
length:
|
|
160
|
+
length: 30,
|
|
170
161
|
} as ProgressBarRange,
|
|
171
162
|
],
|
|
172
163
|
} as Args;
|
|
173
|
-
WithGaps.argTypes = argTypesColorOnly;
|
|
174
164
|
|
|
175
165
|
export const Compact = StoryTemplate.bind({});
|
|
176
166
|
|
|
177
167
|
Compact.args = {
|
|
178
|
-
color: PROGRESS_BAR_COLORS.PRIMARY,
|
|
179
168
|
layout: PROGRESS_BAR_LAYOUTS.COMPACT,
|
|
180
169
|
ranges: [
|
|
181
170
|
{
|
|
182
|
-
|
|
171
|
+
color: PROGRESS_BAR_RANGE_COLORS.INFO,
|
|
183
172
|
start: 0,
|
|
184
173
|
length: 30,
|
|
185
174
|
} as ProgressBarRange,
|
|
@@ -189,4 +178,3 @@ Compact.args = {
|
|
|
189
178
|
labelDataSupporting: '100',
|
|
190
179
|
labelDataSuffix: '(%)',
|
|
191
180
|
} as Args;
|
|
192
|
-
Compact.argTypes = argTypesColorOnly;
|