@bethinkpl/design-system 19.0.1 → 19.0.3
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/.storybook/preview.js +8 -0
- package/README.md +3 -1
- package/dist/design-system.umd.js +25651 -81
- 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/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 +2 -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/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/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/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/dist/lib/js/icons/fontawesome.d.ts +2 -0
- package/docs/3.9151d012.iframe.bundle.js +2 -0
- package/docs/{945.e016d4dc.iframe.bundle.js.LICENSE.txt → 3.9151d012.iframe.bundle.js.LICENSE.txt} +6 -0
- package/docs/iframe.html +1 -1
- package/docs/main.eb803853.iframe.bundle.js +1 -0
- package/docs/project.json +1 -1
- package/lib/js/components/Drawer/DrawerHeader/DrawerHeader.stories.ts +34 -11
- package/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue +38 -30
- package/lib/js/components/Modals/Modal/Modal.vue +1 -0
- package/lib/js/icons/fontawesome.ts +4 -0
- package/lib/styles/settings/_media-queries.scss +4 -0
- package/package.json +1 -1
- package/docs/945.e016d4dc.iframe.bundle.js +0 -2
- package/docs/main.74394c0a.iframe.bundle.js +0 -1
package/docs/project.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1710759807141,"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"}}}
|
|
@@ -32,31 +32,54 @@ const StoryTemplate: StoryFn<typeof DrawerHeader> = (args) => ({
|
|
|
32
32
|
:title-color="titleColor"
|
|
33
33
|
:title-ellipsis="titleEllipsis"
|
|
34
34
|
:title="title"
|
|
35
|
-
|
|
35
|
+
>
|
|
36
|
+
<template #actions v-if="actions">
|
|
37
|
+
<div v-html="actions" />
|
|
38
|
+
</template>
|
|
39
|
+
<template #titleTrailing v-if="titleTrailing">
|
|
40
|
+
<div v-html="titleTrailing" />
|
|
41
|
+
</template>
|
|
42
|
+
</drawer-header>`,
|
|
36
43
|
});
|
|
37
44
|
|
|
38
45
|
export const Interactive = StoryTemplate.bind({});
|
|
39
46
|
|
|
40
|
-
const args = {
|
|
47
|
+
const args = {
|
|
48
|
+
eyebrowText: 'eyebrow',
|
|
49
|
+
isInteractiveEyebrow: false,
|
|
50
|
+
eyebrowEllipsis: false,
|
|
51
|
+
title: 'Header Title',
|
|
52
|
+
titleEllipsis: false,
|
|
53
|
+
titleColor: DRAWER_HEADER_TITLE_COLORS.NEUTRAL_STRONG,
|
|
54
|
+
leftIcon: null,
|
|
55
|
+
chipLabel: 'chip',
|
|
56
|
+
isClosable: true,
|
|
57
|
+
hasDivider: false,
|
|
58
|
+
isSecondLevel: false,
|
|
59
|
+
actions: 'actions slot',
|
|
60
|
+
titleTrailing: 'trailing slot',
|
|
61
|
+
} as Args;
|
|
41
62
|
|
|
42
63
|
const argTypes = {
|
|
43
|
-
title: { control: { type: 'text' }, defaultValue: 'Header Title' },
|
|
44
64
|
eyebrowText: { control: { type: 'text' }, defaultValue: 'eyebrow' },
|
|
45
|
-
chipLabel: { control: { type: 'text' }, defaultValue: 'chip' },
|
|
46
|
-
hasDivider: { control: { type: 'boolean' }, defaultValue: false },
|
|
47
|
-
isClosable: { control: { type: 'boolean' }, defaultValue: true },
|
|
48
|
-
isSecondLevel: { control: { type: 'boolean' }, defaultValue: false },
|
|
49
65
|
isInteractiveEyebrow: { control: { type: 'boolean' }, defaultValue: false },
|
|
50
|
-
leftIcon: {
|
|
51
|
-
control: { type: 'select', options: [...Object.keys(ICONS), null] },
|
|
52
|
-
defaultValue: null,
|
|
53
|
-
},
|
|
54
66
|
eyebrowEllipsis: { control: { type: 'boolean' }, defaultValue: false },
|
|
67
|
+
title: { control: { type: 'text' }, defaultValue: 'Header Title' },
|
|
55
68
|
titleEllipsis: { control: { type: 'boolean' }, defaultValue: false },
|
|
56
69
|
titleColor: {
|
|
57
70
|
control: { type: 'select', options: Object.values(DRAWER_HEADER_TITLE_COLORS) },
|
|
58
71
|
defaultValue: DRAWER_HEADER_TITLE_COLORS.NEUTRAL_STRONG,
|
|
59
72
|
},
|
|
73
|
+
leftIcon: {
|
|
74
|
+
control: { type: 'select', options: [...Object.keys(ICONS), null] },
|
|
75
|
+
defaultValue: null,
|
|
76
|
+
},
|
|
77
|
+
chipLabel: { control: { type: 'text' }, defaultValue: 'chip' },
|
|
78
|
+
hasDivider: { control: { type: 'boolean' }, defaultValue: false },
|
|
79
|
+
isSecondLevel: { control: { type: 'boolean' }, defaultValue: false },
|
|
80
|
+
isClosable: { control: { type: 'boolean' }, defaultValue: true },
|
|
81
|
+
actions: { control: { type: 'text' }, defaultValue: 'actions slot' },
|
|
82
|
+
titleTrailing: { control: { type: 'text' }, defaultValue: 'trailing slot' },
|
|
60
83
|
} as ArgTypes;
|
|
61
84
|
|
|
62
85
|
Interactive.argTypes = argTypes;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
>
|
|
23
23
|
{{ eyebrowText }}
|
|
24
24
|
</span>
|
|
25
|
-
<div class="drawerHeader__title"
|
|
25
|
+
<div class="drawerHeader__title">
|
|
26
26
|
<icon
|
|
27
27
|
v-if="leftIcon"
|
|
28
28
|
:icon="leftIcon"
|
|
@@ -31,16 +31,22 @@
|
|
|
31
31
|
/>
|
|
32
32
|
<span
|
|
33
33
|
v-if="title"
|
|
34
|
-
|
|
34
|
+
class="drawerHeader__titleText"
|
|
35
|
+
:class="{ '-ellipsis': titleEllipsis, [`-${titleColor}`]: true }"
|
|
35
36
|
:title="titleEllipsis ? title : undefined"
|
|
36
37
|
>{{ title }}</span
|
|
37
38
|
>
|
|
38
39
|
<chip v-if="chipLabel" :label="chipLabel" />
|
|
40
|
+
<div v-if="$slots.titleTrailing">
|
|
41
|
+
<slot name="titleTrailing" />
|
|
42
|
+
</div>
|
|
39
43
|
</div>
|
|
40
44
|
</div>
|
|
45
|
+
<div v-if="$slots.actions" class="drawerHeader__actions">
|
|
46
|
+
<slot name="actions" />
|
|
47
|
+
</div>
|
|
41
48
|
<icon-button
|
|
42
49
|
v-if="isClosable"
|
|
43
|
-
class="drawerHeader__closeButton"
|
|
44
50
|
:icon="ICONS.FA_XMARK"
|
|
45
51
|
:size="ICON_BUTTON_SIZES.MEDIUM"
|
|
46
52
|
:touchable="false"
|
|
@@ -99,11 +105,13 @@ $minimal-drawer-header-height: 82px;
|
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
&__title {
|
|
102
|
-
@include heading-s-default-bold-uppercase;
|
|
103
|
-
|
|
104
108
|
align-items: center;
|
|
105
109
|
column-gap: $space-xxxs;
|
|
106
110
|
display: flex;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&__titleText {
|
|
114
|
+
@include heading-s-default-bold-uppercase;
|
|
107
115
|
|
|
108
116
|
&.-neutralStrong {
|
|
109
117
|
color: $color-neutral-text-strong;
|
|
@@ -113,7 +121,7 @@ $minimal-drawer-header-height: 82px;
|
|
|
113
121
|
color: $color-neutral-text-weak;
|
|
114
122
|
}
|
|
115
123
|
|
|
116
|
-
|
|
124
|
+
&.-ellipsis {
|
|
117
125
|
overflow: hidden;
|
|
118
126
|
text-overflow: ellipsis;
|
|
119
127
|
white-space: nowrap;
|
|
@@ -129,8 +137,8 @@ $minimal-drawer-header-height: 82px;
|
|
|
129
137
|
padding: $space-m $space-xs $space-m $space-s;
|
|
130
138
|
}
|
|
131
139
|
|
|
132
|
-
&
|
|
133
|
-
|
|
140
|
+
&__actions {
|
|
141
|
+
margin-left: auto;
|
|
134
142
|
}
|
|
135
143
|
}
|
|
136
144
|
</style>
|
|
@@ -159,50 +167,50 @@ export default {
|
|
|
159
167
|
Chip,
|
|
160
168
|
},
|
|
161
169
|
props: {
|
|
162
|
-
title: {
|
|
163
|
-
type: String,
|
|
164
|
-
default: null,
|
|
165
|
-
},
|
|
166
170
|
eyebrowText: {
|
|
167
171
|
type: String,
|
|
168
172
|
default: null,
|
|
169
173
|
},
|
|
170
|
-
|
|
174
|
+
isInteractiveEyebrow: {
|
|
175
|
+
type: Boolean,
|
|
176
|
+
default: false,
|
|
177
|
+
},
|
|
178
|
+
eyebrowEllipsis: {
|
|
179
|
+
type: Boolean,
|
|
180
|
+
default: false,
|
|
181
|
+
},
|
|
182
|
+
title: {
|
|
171
183
|
type: String,
|
|
172
184
|
default: null,
|
|
173
185
|
},
|
|
186
|
+
titleEllipsis: {
|
|
187
|
+
type: Boolean,
|
|
188
|
+
default: false,
|
|
189
|
+
},
|
|
190
|
+
titleColor: {
|
|
191
|
+
type: String as PropType<DrawerHeaderTitleColor>,
|
|
192
|
+
default: DRAWER_HEADER_TITLE_COLORS.NEUTRAL_STRONG,
|
|
193
|
+
},
|
|
174
194
|
leftIcon: {
|
|
175
195
|
type: [Object, null],
|
|
176
196
|
default: null,
|
|
177
197
|
},
|
|
198
|
+
chipLabel: {
|
|
199
|
+
type: String,
|
|
200
|
+
default: null,
|
|
201
|
+
},
|
|
178
202
|
isClosable: {
|
|
179
203
|
type: Boolean,
|
|
180
204
|
default: true,
|
|
181
205
|
},
|
|
182
|
-
isSecondLevel: {
|
|
183
|
-
type: Boolean,
|
|
184
|
-
default: false,
|
|
185
|
-
},
|
|
186
|
-
isInteractiveEyebrow: {
|
|
187
|
-
type: Boolean,
|
|
188
|
-
default: false,
|
|
189
|
-
},
|
|
190
206
|
hasDivider: {
|
|
191
207
|
type: Boolean,
|
|
192
208
|
default: false,
|
|
193
209
|
},
|
|
194
|
-
|
|
195
|
-
type: Boolean,
|
|
196
|
-
default: false,
|
|
197
|
-
},
|
|
198
|
-
titleEllipsis: {
|
|
210
|
+
isSecondLevel: {
|
|
199
211
|
type: Boolean,
|
|
200
212
|
default: false,
|
|
201
213
|
},
|
|
202
|
-
titleColor: {
|
|
203
|
-
type: String as PropType<DrawerHeaderTitleColor>,
|
|
204
|
-
default: DRAWER_HEADER_TITLE_COLORS.NEUTRAL_STRONG,
|
|
205
|
-
},
|
|
206
214
|
},
|
|
207
215
|
emits: ['backClicked', 'close', 'eyebrowClicked'],
|
|
208
216
|
data() {
|
|
@@ -50,6 +50,7 @@ import { faClipboardList } from '@fortawesome/pro-regular-svg-icons/faClipboardL
|
|
|
50
50
|
import { faClock } from '@fortawesome/pro-regular-svg-icons/faClock';
|
|
51
51
|
import { faClockRotateLeft } from '@fortawesome/pro-regular-svg-icons/faClockRotateLeft';
|
|
52
52
|
import { faCode } from '@fortawesome/pro-regular-svg-icons/faCode';
|
|
53
|
+
import { faCodeSimple } from '@fortawesome/pro-regular-svg-icons';
|
|
53
54
|
import { faComment } from '@fortawesome/pro-regular-svg-icons/faComment';
|
|
54
55
|
import { faCommentDots } from '@fortawesome/pro-regular-svg-icons/faCommentDots';
|
|
55
56
|
import { faComments } from '@fortawesome/pro-regular-svg-icons/faComments';
|
|
@@ -108,6 +109,7 @@ import { faPenField } from '@fortawesome/pro-regular-svg-icons/faPenField';
|
|
|
108
109
|
import { faPlay } from '@fortawesome/pro-regular-svg-icons/faPlay';
|
|
109
110
|
import { faPlus } from '@fortawesome/pro-regular-svg-icons/faPlus';
|
|
110
111
|
import { faPrint } from '@fortawesome/pro-regular-svg-icons/faPrint';
|
|
112
|
+
import { faRectangleCode } from '@fortawesome/pro-regular-svg-icons/faRectangleCode';
|
|
111
113
|
import { faReply } from '@fortawesome/pro-regular-svg-icons/faReply';
|
|
112
114
|
import { faRotateLeft } from '@fortawesome/pro-regular-svg-icons/faRotateLeft';
|
|
113
115
|
import { faShare } from '@fortawesome/pro-regular-svg-icons/faShare';
|
|
@@ -248,6 +250,7 @@ export const FONTAWESOME_ICONS = {
|
|
|
248
250
|
FA_CLOCK: faClock,
|
|
249
251
|
FA_CLOCK_ROTATE_LEFT: faClockRotateLeft,
|
|
250
252
|
FA_CODE: faCode,
|
|
253
|
+
FA_CODE_SIMPLE: faCodeSimple,
|
|
251
254
|
FA_COMMENT: faComment,
|
|
252
255
|
FA_COMMENT_DOTS: faCommentDots,
|
|
253
256
|
FA_COMMENT_SOLID: fasComment,
|
|
@@ -325,6 +328,7 @@ export const FONTAWESOME_ICONS = {
|
|
|
325
328
|
FA_PLAY: faPlay,
|
|
326
329
|
FA_PLUS: faPlus,
|
|
327
330
|
FA_PRINT: faPrint,
|
|
331
|
+
FA_RECTANGLE_CODE: faRectangleCode,
|
|
328
332
|
FA_REPLY: faReply,
|
|
329
333
|
FA_ROTATE_LEFT: faRotateLeft,
|
|
330
334
|
FA_SHARE: faShare,
|