@bethinkpl/design-system 21.0.1 → 21.0.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 +148 -25
- package/dist/design-system.umd.js.map +1 -1
- package/dist/lib/js/components/Banner/Banner.vue.d.ts +2 -0
- package/dist/lib/js/components/Buttons/Button/Button.vue.d.ts +2 -0
- package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +2 -0
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +2 -0
- package/dist/lib/js/components/Chip/Chip.vue.d.ts +2 -0
- package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +2 -0
- package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +2 -0
- package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +6 -0
- package/dist/lib/js/components/Form/Checkbox/Checkbox.vue.d.ts +2 -0
- package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +2 -0
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +2 -0
- package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +6 -0
- package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +2 -0
- package/dist/lib/js/components/Modal/Modal.vue.d.ts +2 -0
- package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +2 -0
- package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.vue.d.ts +2 -0
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +2 -0
- package/dist/lib/js/components/PopOver/PopOver.consts.d.ts +2 -0
- package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +2 -0
- package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +2 -0
- package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +2 -0
- package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.vue.d.ts +2 -0
- package/dist/lib/js/components/SelectionTile/SelectionTile.vue.d.ts +2 -0
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +2 -0
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +2 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +2 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +2 -0
- package/dist/lib/js/components/Switch/Switch.vue.d.ts +2 -0
- package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +2 -0
- package/dist/lib/js/components/Tile/Tile.vue.d.ts +2 -0
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +2 -0
- package/docs/iframe.html +1 -1
- package/docs/main.147130f0.iframe.bundle.js +1 -0
- package/docs/project.json +1 -1
- package/lib/images/icons/icon-answers.svg +4 -0
- package/lib/images/icons/icon-hide-answers.svg +7 -0
- package/lib/js/components/Drawer/DrawerSection/DrawerSection.stories.ts +2 -0
- package/lib/js/components/Drawer/DrawerSection/DrawerSection.vue +5 -0
- package/lib/js/components/Headers/SectionHeader/SectionHeader.stories.ts +3 -0
- package/lib/js/components/Headers/SectionHeader/SectionHeader.vue +21 -2
- package/lib/js/components/Icons/Icon/Icon.consts.ts +5 -0
- package/lib/js/components/PopOver/PopOver.consts.ts +2 -0
- package/package.json +1 -1
- package/docs/main.e1d54860.iframe.bundle.js +0 -1
package/docs/project.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1714022462304,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"metaFramework":{"name":"vue-cli","packageName":"@vue/cli-service","version":"5.0.8"},"packageManager":{"type":"yarn","version":"1.22.22"},"storybookVersion":"6.5.13","language":"typescript","storybookPackages":{"@storybook/builder-webpack5":{"version":"6.5.13"},"@storybook/manager-webpack5":{"version":"6.5.13"},"@storybook/vue3":{"version":"6.5.13"},"eslint-plugin-storybook":{"version":"0.6.6"}},"framework":{"name":"vue3"},"addons":{"@storybook/addon-actions":{"version":"6.5.16"},"@storybook/addon-docs":{"version":"6.5.15"},"@storybook/addon-controls":{"version":"6.5.15"},"@storybook/addon-storysource":{"version":"6.5.15"},"@storybook/addon-viewport":{"version":"6.5.15"},"storybook-addon-designs":{"version":"6.3.1"}}}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 37" fill="none">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9279 4.95849e-08C17.1399 -0.000218791 18.2347 0.723966 18.7086 1.83944L31.6285 32.2452C32.2809 33.7806 31.5651 35.5543 30.0296 36.2067C28.4942 36.8592 26.7205 36.1433 26.0681 34.6079L24.3991 30.6801H7.46905L5.80221 34.6069C5.15032 36.1426 3.37693 36.859 1.84122 36.2071C0.305517 35.5553 -0.410957 33.7819 0.240931 32.2462L13.1478 1.84044C13.6214 0.7248 14.7159 0.000219338 15.9279 4.95849e-08ZM15.9298 10.7484L21.618 24.1351H10.2473L15.9298 10.7484Z" fill="currentColor"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.2245 4.95849e-08C38.5561 4.95849e-08 37.2037 1.35245 37.2037 3.02079V33.4135C37.2037 35.0819 38.5561 36.4343 40.2245 36.4343H51.4969C51.6322 36.4343 51.7654 36.4254 51.8959 36.4082H53.5334C59.4204 36.4082 64 31.4837 64 25.6563C64 21.9291 62.1266 18.5714 59.236 16.6351C60.8036 14.8695 61.7559 12.5453 61.7559 9.99958C61.7559 4.47864 57.2773 4.95849e-08 51.7563 4.95849e-08H40.2245ZM53.5334 30.3666H43.2453V20.9459H53.5334C55.8706 20.9459 57.9584 22.9483 57.9584 25.6563C57.9584 28.3642 55.8706 30.3666 53.5334 30.3666ZM51.7563 6.04158H43.2453V13.9576H51.7563C53.9406 13.9576 55.7143 12.1838 55.7143 9.99958C55.7143 7.81531 53.9406 6.04158 51.7563 6.04158Z" fill="currentColor"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
|
2
|
+
<g clip-path="url(#clip0_2574_94)">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.8478 6.63647C6.54251 5.61597 4.6571 5.84684 3.63661 7.15212C2.61612 8.4574 2.84698 10.3428 4.15226 11.3633L59.1523 54.3633C60.4575 55.3838 62.343 55.1529 63.3634 53.8477C64.3839 52.5424 64.1531 50.657 62.8478 49.6365L60.4296 47.7459C62.6317 45.7569 64 42.8414 64 39.6562C64 35.929 62.1266 32.5712 59.236 30.635C60.8036 28.8694 61.7559 26.5452 61.7559 23.9995C61.7559 18.4785 57.2773 13.9999 51.7563 13.9999H40.2245C38.5561 13.9999 37.2037 15.3523 37.2037 17.0207V29.5874L7.8478 6.63647ZM44.0574 34.9458L55.4845 43.8797C56.9183 43.1274 57.9584 41.5675 57.9584 39.6562C57.9584 36.9482 55.8706 34.9458 53.5334 34.9458H44.0574ZM43.2453 20.0415H51.7563C53.9406 20.0415 55.7143 21.8152 55.7143 23.9995C55.7143 26.1837 53.9406 27.9575 51.7563 27.9575H43.2453V20.0415Z" fill="currentColor"/>
|
|
4
|
+
<path d="M0.240931 46.246L9.97552 23.3135L14.9034 27.1662L10.2473 38.135H21.618L17.979 29.5707L27.8089 37.256L31.6285 46.245C32.2809 47.7805 31.5651 49.5542 30.0296 50.2066C28.4942 50.8591 26.7205 50.1432 26.0681 48.6077L24.3991 44.68H7.46905L5.80221 48.6067C5.15032 50.1425 3.37693 50.8589 1.84122 50.207C0.305517 49.5551 -0.410957 47.7818 0.240931 46.246Z" fill="currentColor"/>
|
|
5
|
+
<path d="M37.2037 47.4134V44.601L44.6648 50.4342H40.2245C38.5561 50.4342 37.2037 49.0818 37.2037 47.4134Z" fill="currentColor"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
|
@@ -33,6 +33,7 @@ const StoryTemplate: StoryFn<typeof DrawerSection> = (args, { updateArgs }) => (
|
|
|
33
33
|
<drawer-section
|
|
34
34
|
:size="size"
|
|
35
35
|
:title="title"
|
|
36
|
+
:title-ellipsis="titleEllipsis"
|
|
36
37
|
:supporting-text="supportingText"
|
|
37
38
|
:eyebrow="eyebrow"
|
|
38
39
|
:icon-left="ICONS[iconLeft]"
|
|
@@ -56,6 +57,7 @@ export const Interactive = StoryTemplate.bind({});
|
|
|
56
57
|
const args = {
|
|
57
58
|
size: SECTION_HEADER_SIZES.XX_SMALL,
|
|
58
59
|
title: 'Drawer Section Header',
|
|
60
|
+
titleEllipsis: false,
|
|
59
61
|
supportingText: '',
|
|
60
62
|
eyebrow: '',
|
|
61
63
|
iconLeft: null,
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
:info="info"
|
|
11
11
|
:size="size"
|
|
12
12
|
:title="title"
|
|
13
|
+
:title-ellipsis="titleEllipsis"
|
|
13
14
|
:eyebrow="eyebrow"
|
|
14
15
|
:supporting-text="supportingText"
|
|
15
16
|
:has-divider="hasDivider"
|
|
@@ -91,6 +92,10 @@ export default {
|
|
|
91
92
|
type: String,
|
|
92
93
|
required: true,
|
|
93
94
|
},
|
|
95
|
+
titleEllipsis: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: false,
|
|
98
|
+
},
|
|
94
99
|
eyebrow: {
|
|
95
100
|
type: String,
|
|
96
101
|
default: '',
|
|
@@ -42,6 +42,7 @@ const StoryTemplate: StoryFn<typeof SectionHeader> = (args, { updateArgs }) => (
|
|
|
42
42
|
' :size="size"' +
|
|
43
43
|
' :info="info"' +
|
|
44
44
|
' :title="title"' +
|
|
45
|
+
' :title-ellipsis="titleEllipsis"' +
|
|
45
46
|
' :eyebrow="eyebrow"' +
|
|
46
47
|
' :has-divider="hasDivider"' +
|
|
47
48
|
' :mobile-layout="mobileLayout"' +
|
|
@@ -57,6 +58,7 @@ export const Interactive = StoryTemplate.bind({});
|
|
|
57
58
|
const args = {
|
|
58
59
|
size: SECTION_HEADER_SIZES.MEDIUM,
|
|
59
60
|
title: 'Section Header',
|
|
61
|
+
titleEllipsis: false,
|
|
60
62
|
supportingText:
|
|
61
63
|
'Supporting text. Et doloribus aspernatur suscipit provident maiores. Natus natus et pariatur. Eligendi illo quo esse. Tenetur ad neque veniam.',
|
|
62
64
|
eyebrow: 'eyebrow text',
|
|
@@ -108,6 +110,7 @@ const argTypes = {
|
|
|
108
110
|
defaultValue: SECTION_HEADER_MOBILE_LAYOUTS.VERTICAL,
|
|
109
111
|
},
|
|
110
112
|
},
|
|
113
|
+
titleEllipsis: { control: { type: 'boolean' }, defaultValue: false },
|
|
111
114
|
} as ArgTypes;
|
|
112
115
|
|
|
113
116
|
Interactive.argTypes = argTypes;
|
|
@@ -22,7 +22,12 @@
|
|
|
22
22
|
/>
|
|
23
23
|
<div class="sectionHeader__titleContainer">
|
|
24
24
|
<div v-if="eyebrow" class="sectionHeader__eyebrow">{{ eyebrow }}</div>
|
|
25
|
-
<div
|
|
25
|
+
<div
|
|
26
|
+
class="sectionHeader__title"
|
|
27
|
+
:class="{ '-ellipsis': titleEllipsis }"
|
|
28
|
+
:title="titleEllipsis ? title : undefined"
|
|
29
|
+
>{{ title }}
|
|
30
|
+
</div>
|
|
26
31
|
</div>
|
|
27
32
|
<ds-icon
|
|
28
33
|
v-if="iconRight"
|
|
@@ -121,6 +126,7 @@
|
|
|
121
126
|
align-items: center;
|
|
122
127
|
display: flex;
|
|
123
128
|
gap: $space-2xs;
|
|
129
|
+
min-width: 0;
|
|
124
130
|
width: 100%;
|
|
125
131
|
|
|
126
132
|
@media #{breakpoint-s()} {
|
|
@@ -159,17 +165,26 @@
|
|
|
159
165
|
&__titleWrapper {
|
|
160
166
|
align-items: center;
|
|
161
167
|
display: flex;
|
|
168
|
+
min-width: 0;
|
|
162
169
|
}
|
|
163
170
|
|
|
164
171
|
&__titleContainer {
|
|
165
172
|
display: flex;
|
|
166
173
|
flex-direction: column;
|
|
167
174
|
gap: $space-5xs;
|
|
175
|
+
min-width: 0;
|
|
168
176
|
padding: $space-2xs 0;
|
|
169
177
|
}
|
|
170
178
|
|
|
171
179
|
&__title {
|
|
172
180
|
color: $color-neutral-text-strong;
|
|
181
|
+
min-width: 0;
|
|
182
|
+
|
|
183
|
+
&.-ellipsis {
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
text-overflow: ellipsis;
|
|
186
|
+
white-space: nowrap;
|
|
187
|
+
}
|
|
173
188
|
}
|
|
174
189
|
|
|
175
190
|
&__info {
|
|
@@ -323,9 +338,9 @@
|
|
|
323
338
|
|
|
324
339
|
<script lang="ts">
|
|
325
340
|
import {
|
|
341
|
+
SECTION_HEADER_ICON_COLORS,
|
|
326
342
|
SECTION_HEADER_MOBILE_LAYOUTS,
|
|
327
343
|
SECTION_HEADER_SIZES,
|
|
328
|
-
SECTION_HEADER_ICON_COLORS,
|
|
329
344
|
SectionHeaderIconColor,
|
|
330
345
|
} from './SectionHeader.consts';
|
|
331
346
|
import DsIcon, { ICON_SIZES, IconItem, ICONS } from '../../Icons/Icon';
|
|
@@ -396,6 +411,10 @@ export default {
|
|
|
396
411
|
type: String,
|
|
397
412
|
required: true,
|
|
398
413
|
},
|
|
414
|
+
titleEllipsis: {
|
|
415
|
+
type: Boolean,
|
|
416
|
+
default: false,
|
|
417
|
+
},
|
|
399
418
|
eyebrow: {
|
|
400
419
|
type: String,
|
|
401
420
|
default: '',
|
|
@@ -2,6 +2,9 @@ import HeadWithQuestionMark from '../../../../images/icons/head-with-question-ma
|
|
|
2
2
|
import Ribbon from '../../../../images/icons/ribbon.svg';
|
|
3
3
|
import SlidersSearch from '../../../../images/icons/sliders-search.svg';
|
|
4
4
|
import CommentsCheck from '../../../../images/icons/comments-check.svg';
|
|
5
|
+
import Answers from '../../../../images/icons/icon-answers.svg';
|
|
6
|
+
import HideAnswers from '../../../../images/icons/icon-hide-answers.svg';
|
|
7
|
+
|
|
5
8
|
import { FONTAWESOME_ICONS } from '../../../icons/fontawesome';
|
|
6
9
|
import { Value } from '../../../utils/type.utils';
|
|
7
10
|
|
|
@@ -41,6 +44,8 @@ const BETHINK_ICONS = {
|
|
|
41
44
|
RIBBON: Ribbon,
|
|
42
45
|
SLIDERS_SEARCH: SlidersSearch,
|
|
43
46
|
COMMENTS_CHECK: CommentsCheck,
|
|
47
|
+
ANSWERS: Answers,
|
|
48
|
+
HIDE_ANSWERS: HideAnswers,
|
|
44
49
|
} as const;
|
|
45
50
|
|
|
46
51
|
export const ICONS = {
|