@bethinkpl/design-system 19.0.2 → 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 +59 -46
- package/dist/design-system.umd.js.map +1 -1
- package/dist/lib/js/components/Drawer/DrawerContent/DrawerContent.vue.d.ts +3 -4
- package/dist/lib/js/components/Drawer/DrawerDivider/DrawerDivider.vue.d.ts +3 -20
- package/dist/lib/js/components/Drawer/DrawerListItemGroup/DrawerListItemGroup.vue.d.ts +3 -4
- package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +3 -234
- package/dist/lib/js/components/Drawer/DrawerTile/DrawerTile.vue.d.ts +3 -63
- package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue.d.ts +3 -8
- package/dist/lib/js/components/SelectList/SelectListItemTile/SelectListItemTile.vue.d.ts +3 -62
- package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue.d.ts +3 -58
- package/dist/lib/js/components/SelectList/SelectListSectionTitle/SelectListSectionTitle.vue.d.ts +3 -14
- 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/styles/settings/_media-queries.scss +4 -0
- package/package.json +1 -1
- package/docs/main.3c2b566e.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() {
|