@bethinkpl/design-system 34.2.1 → 35.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.
- package/dist/design-system.css +1 -1
- package/dist/design-system.js +4938 -4941
- package/dist/design-system.js.map +1 -1
- package/dist/i18n/en/blockadeStatus.json +4 -0
- package/dist/i18n/en/cardExpandable.json +4 -0
- package/dist/i18n/en/overlayHeader.json +3 -0
- package/dist/i18n/en/survey.json +3 -0
- package/dist/i18n/pl/blockadeStatus.json +4 -0
- package/dist/i18n/pl/cardExpandable.json +4 -0
- package/dist/i18n/pl/overlayHeader.json +3 -0
- package/dist/i18n/pl/survey.json +3 -0
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +9 -5
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +3 -1
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +73 -435
- package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.vue.d.ts +36 -449
- package/dist/lib/js/components/SelectList/SelectListItemContainer/SelectListItemContainer.vue.d.ts +11 -0
- package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue.d.ts +80 -441
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +4 -2
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +12 -6
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +10 -5
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue.d.ts +7 -3
- package/dist/lib/js/components/TextGroup/TextGroup.consts.d.ts +1 -0
- package/dist/lib/js/i18n/en.d.ts +6 -0
- package/dist/lib/js/i18n/index.d.ts +12 -0
- package/dist/lib/js/i18n/pl.d.ts +6 -0
- package/dist/lib/js/index.d.ts +2 -2
- package/lib/js/components/Cards/CardExpandable/CardExpandable.stories.ts +2 -2
- package/lib/js/components/Cards/CardExpandable/CardExpandable.vue +19 -3
- package/lib/js/components/Divider/Divider.vue +1 -0
- package/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue +7 -1
- package/lib/js/components/SelectList/SelectListItem/SelectListItem.stories.ts +26 -16
- package/lib/js/components/SelectList/SelectListItem/SelectListItem.vue +29 -73
- package/lib/js/components/SelectList/SelectListItemContainer/SelectListItemContainer.stories.ts +35 -0
- package/lib/js/components/SelectList/SelectListItemContainer/SelectListItemContainer.vue +19 -0
- package/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue +3 -3
- package/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue +8 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.stories.ts +2 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue +7 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.stories.ts +4 -4
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue +5 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue +13 -2
- package/lib/js/components/TextGroup/TextGroup.consts.ts +1 -0
- package/lib/js/components/TextGroup/TextGroup.vue +21 -0
- package/lib/js/i18n/en/blockadeStatus.json +4 -0
- package/lib/js/i18n/en/cardExpandable.json +4 -0
- package/lib/js/i18n/en/overlayHeader.json +3 -0
- package/lib/js/i18n/en/survey.json +3 -0
- package/lib/js/i18n/en.ts +8 -0
- package/lib/js/i18n/pl/blockadeStatus.json +4 -0
- package/lib/js/i18n/pl/cardExpandable.json +4 -0
- package/lib/js/i18n/pl/overlayHeader.json +3 -0
- package/lib/js/i18n/pl/survey.json +3 -0
- package/lib/js/i18n/pl.ts +8 -0
- package/lib/js/index.ts +2 -2
- package/package.json +1 -1
- package/lib/js/components/SelectList/SelectListItemTile/SelectListItemTile.stories.ts +0 -60
- package/lib/js/components/SelectList/SelectListItemTile/SelectListItemTile.vue +0 -41
package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
class="ds-surveyQuestionOpenEnded__input"
|
|
36
36
|
:disabled="state === SURVEY_QUESTION_STATES.DISABLED"
|
|
37
37
|
:value="value"
|
|
38
|
-
:placeholder="
|
|
38
|
+
:placeholder="resolvedPlaceholder"
|
|
39
39
|
@input="$emit('input', $event)"
|
|
40
40
|
/>
|
|
41
41
|
</div>
|
|
@@ -114,7 +114,7 @@ export default defineComponent({
|
|
|
114
114
|
},
|
|
115
115
|
placeholder: {
|
|
116
116
|
type: String,
|
|
117
|
-
default:
|
|
117
|
+
default: null,
|
|
118
118
|
},
|
|
119
119
|
state: {
|
|
120
120
|
type: String,
|
|
@@ -143,5 +143,10 @@ export default defineComponent({
|
|
|
143
143
|
SURVEY_QUESTION_STATES: Object.freeze(SURVEY_QUESTION_STATES),
|
|
144
144
|
};
|
|
145
145
|
},
|
|
146
|
+
computed: {
|
|
147
|
+
resolvedPlaceholder(): string {
|
|
148
|
+
return this.placeholder ?? this.t('ds.survey.placeholder');
|
|
149
|
+
},
|
|
150
|
+
},
|
|
146
151
|
});
|
|
147
152
|
</script>
|
package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.stories.ts
CHANGED
|
@@ -19,7 +19,7 @@ const StoryTemplate: StoryFn<typeof SurveyQuestionScale> = (args) => {
|
|
|
19
19
|
return args;
|
|
20
20
|
},
|
|
21
21
|
template:
|
|
22
|
-
'<survey-question-scale :title="title" :scale-options="scaleOptions" :elaboration-value="elaborationValue" :elaborationLabel="elaborationLabel" :placeholder="placeholder" :selected-value="selectedValue" :state="state" :containers="containers" @select-change="selectedValueUpdate" @elaboration-change="elaborationUpdate">' +
|
|
22
|
+
'<survey-question-scale :title="title" :scale-options="scaleOptions" :elaboration-value="elaborationValue" :elaborationLabel="elaborationLabel" :placeholder="placeholder !== \'\' ? placeholder: null" :selected-value="selectedValue" :state="state" :containers="containers" @select-change="selectedValueUpdate" @elaboration-change="elaborationUpdate">' +
|
|
23
23
|
'<template v-if="explanation" #explanation><div v-html="explanation" /></template>' +
|
|
24
24
|
'</survey-question-scale>',
|
|
25
25
|
methods: {
|
|
@@ -41,7 +41,7 @@ const args = {
|
|
|
41
41
|
elaborationValue: '',
|
|
42
42
|
explanation:
|
|
43
43
|
'<h3 style="text-align: center; margin-bottom: 16px;">Jak ocenić, czy slajdy i diagramy były zrozumiałe?</h3>\n<div>Wyczerpujące materiały dają poczucie pełnego zrozumienia, przy jednoczesnym usystematyzowaniu informacji. Wpływa na to nie tylko ich jakość, ale też ilość.</div>',
|
|
44
|
-
placeholder: '
|
|
44
|
+
placeholder: '',
|
|
45
45
|
containers: SURVEY_QUESTION_SCALE_CONTAINERS.TWO,
|
|
46
46
|
selectedValue: null,
|
|
47
47
|
scaleOptions: [
|
|
@@ -126,7 +126,7 @@ const StoryLimitedWidthTemplate: StoryFn<typeof SurveyQuestionScale> = (args) =>
|
|
|
126
126
|
return args;
|
|
127
127
|
},
|
|
128
128
|
template:
|
|
129
|
-
'<div style="max-width: 600px"><survey-question-scale :title="title" :scale-options="scaleOptions" :elaboration-value="elaborationValue" :elaborationLabel="elaborationLabel" :placeholder="placeholder" :selected-value="selectedValue" :containers="containers" :state="state" @select-change="selectedValueUpdate" @elaboration-change="elaborationUpdate">' +
|
|
129
|
+
'<div style="max-width: 600px"><survey-question-scale :title="title" :scale-options="scaleOptions" :elaboration-value="elaborationValue" :elaborationLabel="elaborationLabel" :placeholder="placeholder !== \'\' ? placeholder: null" :selected-value="selectedValue" :containers="containers" :state="state" @select-change="selectedValueUpdate" @elaboration-change="elaborationUpdate">' +
|
|
130
130
|
'<template v-if="explanation" #explanation><div v-html="explanation" /></template>' +
|
|
131
131
|
'</survey-question-scale></div>',
|
|
132
132
|
methods: {
|
|
@@ -155,7 +155,7 @@ LimitedWidth.args = {
|
|
|
155
155
|
elaborationValue: '',
|
|
156
156
|
explanation:
|
|
157
157
|
'<h3 class="modalHeader" style="text-align: center; margin-bottom: 16px;">Jak ocenić, czy slajdy i diagramy były zrozumiałe?</h3>\n<div>Wyczerpujące materiały dają poczucie pełnego zrozumienia, przy jednoczesnym usystematyzowaniu informacji. Wpływa na to nie tylko ich jakość, ale też ilość.</div>',
|
|
158
|
-
placeholder: '
|
|
158
|
+
placeholder: '',
|
|
159
159
|
containers: SURVEY_QUESTION_SCALE_CONTAINERS.TWO,
|
|
160
160
|
state: SURVEY_QUESTION_STATES.DEFAULT,
|
|
161
161
|
selectedValue: null,
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
:id="inputId"
|
|
106
106
|
:value="elaborationValue"
|
|
107
107
|
class="ds-surveyQuestionScale__elaborationInput"
|
|
108
|
-
:placeholder="
|
|
108
|
+
:placeholder="resolvedPlaceholder"
|
|
109
109
|
:disabled="state === SURVEY_QUESTION_STATES.DISABLED"
|
|
110
110
|
@input="$emit('elaboration-change', $event)"
|
|
111
111
|
/>
|
|
@@ -293,7 +293,7 @@ export default defineComponent({
|
|
|
293
293
|
},
|
|
294
294
|
placeholder: {
|
|
295
295
|
type: String,
|
|
296
|
-
default:
|
|
296
|
+
default: null,
|
|
297
297
|
},
|
|
298
298
|
selectedValue: {
|
|
299
299
|
type: String,
|
|
@@ -331,6 +331,9 @@ export default defineComponent({
|
|
|
331
331
|
};
|
|
332
332
|
},
|
|
333
333
|
computed: {
|
|
334
|
+
resolvedPlaceholder(): string {
|
|
335
|
+
return this.placeholder ?? this.t('ds.survey.placeholder');
|
|
336
|
+
},
|
|
334
337
|
standaloneOptions() {
|
|
335
338
|
return this.scaleOptions.filter(
|
|
336
339
|
(option: SurveyQuestionScaleOption) => option.standalone,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
ref="textarea"
|
|
4
4
|
class="ds-surveyQuestionTextarea"
|
|
5
5
|
:disabled="disabled"
|
|
6
|
-
:placeholder="
|
|
6
|
+
:placeholder="resolvedPlaceholder"
|
|
7
7
|
:value="value"
|
|
8
8
|
@input="onInput"
|
|
9
9
|
/>
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
<script lang="ts">
|
|
37
37
|
import { defineComponent } from 'vue';
|
|
38
|
+
import { useLegacyI18n } from '../../composables/useLegacyI18n';
|
|
38
39
|
|
|
39
40
|
export default defineComponent({
|
|
40
41
|
name: 'SurveyQuestionTextarea',
|
|
@@ -45,7 +46,7 @@ export default defineComponent({
|
|
|
45
46
|
},
|
|
46
47
|
placeholder: {
|
|
47
48
|
type: String,
|
|
48
|
-
default:
|
|
49
|
+
default: null,
|
|
49
50
|
},
|
|
50
51
|
disabled: {
|
|
51
52
|
type: Boolean,
|
|
@@ -55,6 +56,16 @@ export default defineComponent({
|
|
|
55
56
|
// TODO fix me when touching this file
|
|
56
57
|
// eslint-disable-next-line vue/require-emit-validator
|
|
57
58
|
emits: ['input'],
|
|
59
|
+
setup() {
|
|
60
|
+
const { t } = useLegacyI18n();
|
|
61
|
+
|
|
62
|
+
return { t };
|
|
63
|
+
},
|
|
64
|
+
computed: {
|
|
65
|
+
resolvedPlaceholder(): string {
|
|
66
|
+
return this.placeholder ?? this.t('ds.survey.placeholder');
|
|
67
|
+
},
|
|
68
|
+
},
|
|
58
69
|
watch: {
|
|
59
70
|
value() {
|
|
60
71
|
// we want to update height of textarea based on content that is inside
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
class="ds-textGroup"
|
|
4
4
|
:class="{
|
|
5
|
+
'-ds-x-small': size === TEXT_GROUP_SIZES.X_SMALL,
|
|
5
6
|
'-ds-small': size === TEXT_GROUP_SIZES.SMALL,
|
|
6
7
|
|
|
7
8
|
'-ds-hovered': state === TEXT_GROUP_STATES.HOVERED,
|
|
@@ -281,6 +282,26 @@ $text-group-colors: (
|
|
|
281
282
|
}
|
|
282
283
|
}
|
|
283
284
|
|
|
285
|
+
&.-ds-x-small {
|
|
286
|
+
#{$self}__eyebrow {
|
|
287
|
+
@include info-xs-default-bold;
|
|
288
|
+
|
|
289
|
+
margin-bottom: 0;
|
|
290
|
+
|
|
291
|
+
&.-ds-uppercase {
|
|
292
|
+
@include info-xs-extensive-bold-uppercase;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
#{$self}__main {
|
|
297
|
+
@include info-s-default-bold;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
#{$self}__supporting {
|
|
301
|
+
@include info-s-default-regular;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
284
305
|
&.-ds-interactive:hover,
|
|
285
306
|
&.-ds-hovered {
|
|
286
307
|
cursor: pointer;
|
package/lib/js/i18n/en.ts
CHANGED
|
@@ -3,6 +3,10 @@ import accessStatus from './en/accessStatus.json';
|
|
|
3
3
|
import pagination from './en/pagination.json';
|
|
4
4
|
import statsLayout from './en/statsLayout.json';
|
|
5
5
|
import datePicker from './en/datePicker.json';
|
|
6
|
+
import survey from './en/survey.json';
|
|
7
|
+
import overlayHeader from './en/overlayHeader.json';
|
|
8
|
+
import cardExpandable from './en/cardExpandable.json';
|
|
9
|
+
import blockadeStatus from './en/blockadeStatus.json';
|
|
6
10
|
|
|
7
11
|
export default {
|
|
8
12
|
...globals,
|
|
@@ -10,4 +14,8 @@ export default {
|
|
|
10
14
|
...pagination,
|
|
11
15
|
...statsLayout,
|
|
12
16
|
...datePicker,
|
|
17
|
+
...survey,
|
|
18
|
+
...overlayHeader,
|
|
19
|
+
...cardExpandable,
|
|
20
|
+
...blockadeStatus,
|
|
13
21
|
};
|
package/lib/js/i18n/pl.ts
CHANGED
|
@@ -3,6 +3,10 @@ import accessStatus from './pl/accessStatus.json';
|
|
|
3
3
|
import pagination from './pl/pagination.json';
|
|
4
4
|
import statsLayout from './pl/statsLayout.json';
|
|
5
5
|
import datePicker from './pl/datePicker.json';
|
|
6
|
+
import survey from './pl/survey.json';
|
|
7
|
+
import overlayHeader from './pl/overlayHeader.json';
|
|
8
|
+
import cardExpandable from './pl/cardExpandable.json';
|
|
9
|
+
import blockadeStatus from './pl/blockadeStatus.json';
|
|
6
10
|
|
|
7
11
|
export default {
|
|
8
12
|
...globals,
|
|
@@ -10,4 +14,8 @@ export default {
|
|
|
10
14
|
...pagination,
|
|
11
15
|
...statsLayout,
|
|
12
16
|
...datePicker,
|
|
17
|
+
...survey,
|
|
18
|
+
...overlayHeader,
|
|
19
|
+
...cardExpandable,
|
|
20
|
+
...blockadeStatus,
|
|
13
21
|
};
|
package/lib/js/index.ts
CHANGED
|
@@ -127,8 +127,8 @@ export { default as SelectListItemDivider } from './components/SelectList/Select
|
|
|
127
127
|
export { default as DsSelectListItemDivider } from './components/SelectList/SelectListItemDivider/SelectListItemDivider.vue';
|
|
128
128
|
export { default as SelectListItemToggle } from './components/SelectList/SelectListItemToggle/SelectListItemToggle.vue';
|
|
129
129
|
export { default as DsSelectListItemToggle } from './components/SelectList/SelectListItemToggle/SelectListItemToggle.vue';
|
|
130
|
-
export { default as
|
|
131
|
-
export { default as
|
|
130
|
+
export { default as SelectListItemContainer } from './components/SelectList/SelectListItemContainer/SelectListItemContainer.vue';
|
|
131
|
+
export { default as DsSelectListItemContainer } from './components/SelectList/SelectListItemContainer/SelectListItemContainer.vue';
|
|
132
132
|
export { default as SelectListSectionTitle } from './components/SelectList/SelectListSectionTitle/SelectListSectionTitle.vue';
|
|
133
133
|
export { default as DsSelectListSectionTitle } from './components/SelectList/SelectListSectionTitle/SelectListSectionTitle.vue';
|
|
134
134
|
export * from './components/SelectList/SelectListItem/SelectListItem.consts';
|
package/package.json
CHANGED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import SelectListItemTile from './SelectListItemTile.vue';
|
|
2
|
-
import { TILE_STATES } from '../../Tile';
|
|
3
|
-
|
|
4
|
-
import { Args, Meta, StoryFn } from '@storybook/vue3';
|
|
5
|
-
import { args, argTypes, data, template } from '../../Tile/Tile.sb.shared';
|
|
6
|
-
import { withActions } from '@storybook/addon-actions/decorator';
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Components/SelectList/SelectListItemTile',
|
|
10
|
-
component: SelectListItemTile,
|
|
11
|
-
decorators: [withActions],
|
|
12
|
-
} as Meta<typeof SelectListItemTile>;
|
|
13
|
-
|
|
14
|
-
const StoryTemplate: StoryFn<typeof SelectListItemTile> = (args) => ({
|
|
15
|
-
components: { SelectListItemTile },
|
|
16
|
-
setup() {
|
|
17
|
-
return args;
|
|
18
|
-
},
|
|
19
|
-
template: template('select-list-item-tile'),
|
|
20
|
-
data,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const Interactive = StoryTemplate.bind({});
|
|
24
|
-
|
|
25
|
-
Interactive.argTypes = argTypes;
|
|
26
|
-
Interactive.args = args;
|
|
27
|
-
|
|
28
|
-
Interactive.parameters = {
|
|
29
|
-
actions: {
|
|
30
|
-
handles: ['click'],
|
|
31
|
-
},
|
|
32
|
-
design: {
|
|
33
|
-
type: 'figma',
|
|
34
|
-
url: 'https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?type=design&node-id=5367-94239&t=GqiOb5BFRTyJrsv8-4',
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const StoryStaticTemplate: StoryFn<typeof SelectListItemTile> = (args) => ({
|
|
39
|
-
components: { SelectListItemTile },
|
|
40
|
-
setup() {
|
|
41
|
-
return args;
|
|
42
|
-
},
|
|
43
|
-
template: template('select-list-item-tile'),
|
|
44
|
-
data,
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
export const Static = StoryStaticTemplate.bind({});
|
|
48
|
-
|
|
49
|
-
Static.argTypes = argTypes;
|
|
50
|
-
|
|
51
|
-
Static.args = {
|
|
52
|
-
...args,
|
|
53
|
-
interactive: false,
|
|
54
|
-
iconLeft: null,
|
|
55
|
-
iconRight: null,
|
|
56
|
-
text: 'this is a text text',
|
|
57
|
-
eyebrowText: 'this is an eyebrowText text',
|
|
58
|
-
additionalText: 'this is some additionalText',
|
|
59
|
-
state: TILE_STATES.DEFAULT,
|
|
60
|
-
} as Args;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="ds-selectListItemTile">
|
|
3
|
-
<ds-tile
|
|
4
|
-
:interactive="interactive"
|
|
5
|
-
:icon-left="iconLeft"
|
|
6
|
-
:icon-right="iconRight"
|
|
7
|
-
:text="text"
|
|
8
|
-
:eyebrow-text="eyebrowText"
|
|
9
|
-
:additional-text="additionalText"
|
|
10
|
-
:color="color"
|
|
11
|
-
:is-eyebrow-text-uppercase="isEyebrowTextUppercase"
|
|
12
|
-
:state="state"
|
|
13
|
-
:eyebrow-ellipsis="eyebrowEllipsis"
|
|
14
|
-
:text-ellipsis="textEllipsis"
|
|
15
|
-
:border-color="borderColor"
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<style scoped lang="scss">
|
|
21
|
-
@import '../../../../styles/settings/spacings';
|
|
22
|
-
|
|
23
|
-
.ds-selectListItemTile {
|
|
24
|
-
padding: $space-xs;
|
|
25
|
-
}
|
|
26
|
-
</style>
|
|
27
|
-
|
|
28
|
-
<script lang="ts">
|
|
29
|
-
import Tile from '../../Tile';
|
|
30
|
-
import { props } from '../../Tile/Tile.shared';
|
|
31
|
-
|
|
32
|
-
import { defineComponent } from 'vue';
|
|
33
|
-
|
|
34
|
-
export default defineComponent({
|
|
35
|
-
name: 'SelectListItemTile',
|
|
36
|
-
components: {
|
|
37
|
-
DsTile: Tile,
|
|
38
|
-
},
|
|
39
|
-
props,
|
|
40
|
-
});
|
|
41
|
-
</script>
|