@gitlab/ui 36.5.0 → 36.5.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/CHANGELOG.md +7 -0
- package/dist/components/base/drawer/drawer.documentation.js +2 -5
- package/documentation/documented_stories.js +1 -0
- package/package.json +1 -1
- package/src/components/base/breadcrumb/breadcrumb.stories.js +8 -8
- package/src/components/base/drawer/drawer.documentation.js +0 -2
- package/src/components/base/drawer/drawer.md +0 -6
- package/src/components/base/drawer/drawer.stories.js +66 -34
- package/dist/components/base/drawer/examples/drawer.basic.example.js +0 -58
- package/dist/components/base/drawer/examples/index.js +0 -13
- package/src/components/base/drawer/examples/drawer.basic.example.vue +0 -29
- package/src/components/base/drawer/examples/index.js +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [36.5.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v36.5.0...v36.5.1) (2022-02-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **breadcrumb:** Use sentence case for examples ([ace4a4f](https://gitlab.com/gitlab-org/gitlab-ui/commit/ace4a4fa048131c768b0442ac0b677f20258446a))
|
|
7
|
+
|
|
1
8
|
# [36.5.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v36.4.0...v36.5.0) (2022-02-10)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var description = "# Drawer\n\n<!-- STORY -->\n\n## Usage\n\nThe drawer is used to show more information about a certain resource in the UI and potentially\nhandle actions on the information.\n\n### By default\n\n```html\n<gl-drawer :open=\"open\" @close=\"close\">\n <template #header>Your Title</template>\n <template>\n ...children\n </template>\n</gl-drawer>\n```\n\n- `v-bind:open` will be a boolean you will pass to `gl-drawer` and `@close` is a listener that will\nbe a function that will toggle open to `false`.\n";
|
|
1
|
+
var description = "The drawer is used to show more information about a certain resource in the UI and potentially\nhandle actions on the information.\n\n### By default\n\n```html\n<gl-drawer :open=\"open\" @close=\"close\">\n <template #header>Your Title</template>\n <template>\n ...children\n </template>\n</gl-drawer>\n```\n\n- `v-bind:open` will be a boolean you will pass to `gl-drawer` and `@close` is a listener that will\nbe a function that will toggle open to `false`.\n";
|
|
4
2
|
|
|
5
3
|
var drawer_documentation = {
|
|
6
4
|
followsDesignSystem: false,
|
|
7
|
-
description
|
|
8
|
-
examples
|
|
5
|
+
description
|
|
9
6
|
};
|
|
10
7
|
|
|
11
8
|
export default drawer_documentation;
|
package/package.json
CHANGED
|
@@ -16,19 +16,19 @@ const template = `
|
|
|
16
16
|
|
|
17
17
|
const defaultItems = [
|
|
18
18
|
{
|
|
19
|
-
text: 'First
|
|
19
|
+
text: 'First item',
|
|
20
20
|
href: '#',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
text: 'Second
|
|
23
|
+
text: 'Second item',
|
|
24
24
|
href: '#',
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
text: 'Third
|
|
27
|
+
text: 'Third item',
|
|
28
28
|
href: '#',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
text: 'Fourth
|
|
31
|
+
text: 'Fourth item',
|
|
32
32
|
to: { name: 'fourth-item' },
|
|
33
33
|
},
|
|
34
34
|
];
|
|
@@ -63,19 +63,19 @@ export default {
|
|
|
63
63
|
|
|
64
64
|
const extraItems = [
|
|
65
65
|
{
|
|
66
|
-
text: 'Fifth
|
|
66
|
+
text: 'Fifth item',
|
|
67
67
|
href: '#',
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
text: 'Sixth
|
|
70
|
+
text: 'Sixth item',
|
|
71
71
|
href: '#',
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
text: 'Seventh
|
|
74
|
+
text: 'Seventh item',
|
|
75
75
|
href: '#',
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
text: 'Eighth
|
|
78
|
+
text: 'Eighth item',
|
|
79
79
|
href: '#',
|
|
80
80
|
},
|
|
81
81
|
];
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlButton } from '../../../index';
|
|
1
|
+
import { GlDrawer, GlButton } from '../../../index';
|
|
4
2
|
import readme from './drawer.md';
|
|
5
|
-
import GlDrawer from './drawer.vue';
|
|
6
3
|
|
|
7
|
-
const components = {
|
|
8
|
-
GlDrawer,
|
|
9
|
-
GlButton,
|
|
10
|
-
};
|
|
4
|
+
const components = { GlDrawer, GlButton };
|
|
11
5
|
|
|
12
6
|
const drawerContent = [
|
|
13
7
|
'One',
|
|
@@ -31,7 +25,8 @@ const drawerContent = [
|
|
|
31
25
|
)
|
|
32
26
|
.join('');
|
|
33
27
|
|
|
34
|
-
const
|
|
28
|
+
export const Default = (_args, { viewMode }) => ({
|
|
29
|
+
components,
|
|
35
30
|
methods: {
|
|
36
31
|
toggle() {
|
|
37
32
|
this.open = !this.open;
|
|
@@ -42,45 +37,68 @@ const getStory = (template) => ({
|
|
|
42
37
|
},
|
|
43
38
|
data() {
|
|
44
39
|
return {
|
|
45
|
-
open:
|
|
40
|
+
open: viewMode !== 'docs',
|
|
46
41
|
};
|
|
47
42
|
},
|
|
48
|
-
|
|
49
|
-
template,
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
documentedStoriesOf('base/drawer', readme)
|
|
53
|
-
.addDecorator(withKnobs)
|
|
54
|
-
.add('default', () =>
|
|
55
|
-
getStory(`
|
|
43
|
+
template: `
|
|
56
44
|
<div>
|
|
57
45
|
<gl-button @click="toggle">Toggle Drawer</gl-button>
|
|
58
46
|
<gl-drawer :open="open" @close="close">
|
|
59
47
|
<template #title>List Settings</template>
|
|
60
48
|
${drawerContent}
|
|
61
49
|
</gl-drawer>
|
|
62
|
-
</div
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
</div>`,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export const WithActions = (_args, { viewMode }) => ({
|
|
54
|
+
components,
|
|
55
|
+
methods: {
|
|
56
|
+
toggle() {
|
|
57
|
+
this.open = !this.open;
|
|
58
|
+
},
|
|
59
|
+
close() {
|
|
60
|
+
this.open = false;
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
open: viewMode !== 'docs',
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
template: `
|
|
66
69
|
<div>
|
|
67
70
|
<gl-button @click="toggle">Toggle Drawer</gl-button>
|
|
68
71
|
<gl-drawer :open="open" @close="close">
|
|
69
|
-
|
|
72
|
+
<template #title>
|
|
70
73
|
<h3>custom-network-policy</h3>
|
|
71
74
|
</template>
|
|
72
75
|
<template #header>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
<div class="gl-mt-5">
|
|
77
|
+
<gl-button variant="confirm">Save</gl-button>
|
|
78
|
+
<gl-button class="gl-ml-3" @click="toggle">Cancel</gl-button>
|
|
79
|
+
</div>
|
|
77
80
|
</template>
|
|
78
|
-
|
|
81
|
+
${drawerContent}
|
|
79
82
|
</gl-drawer>
|
|
80
|
-
</div
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
</div>`,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export const SidebarVariant = (_args, { viewMode }) => ({
|
|
87
|
+
components,
|
|
88
|
+
methods: {
|
|
89
|
+
toggle() {
|
|
90
|
+
this.open = !this.open;
|
|
91
|
+
},
|
|
92
|
+
close() {
|
|
93
|
+
this.open = false;
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
data() {
|
|
97
|
+
return {
|
|
98
|
+
open: viewMode !== 'docs',
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
template: `
|
|
84
102
|
<div>
|
|
85
103
|
<gl-button @click="toggle">Toggle Drawer</gl-button>
|
|
86
104
|
<gl-drawer :open="open" @close="close" variant="sidebar">
|
|
@@ -94,5 +112,19 @@ documentedStoriesOf('base/drawer', readme)
|
|
|
94
112
|
</template>
|
|
95
113
|
${drawerContent}
|
|
96
114
|
</gl-drawer>
|
|
97
|
-
</div
|
|
98
|
-
|
|
115
|
+
</div>`,
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export default {
|
|
119
|
+
title: 'base/drawer',
|
|
120
|
+
component: GlDrawer,
|
|
121
|
+
parameters: {
|
|
122
|
+
knobs: { disabled: true },
|
|
123
|
+
controls: { disable: true },
|
|
124
|
+
docs: {
|
|
125
|
+
description: {
|
|
126
|
+
component: readme,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
var script = {
|
|
4
|
-
data() {
|
|
5
|
-
return {
|
|
6
|
-
drawerOpened: false
|
|
7
|
-
};
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
methods: {
|
|
11
|
-
toggle() {
|
|
12
|
-
this.drawerOpened = !this.drawerOpened;
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
close() {
|
|
16
|
-
this.drawerOpened = false;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/* script */
|
|
23
|
-
const __vue_script__ = script;
|
|
24
|
-
|
|
25
|
-
/* template */
|
|
26
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('gl-button',{on:{"click":_vm.toggle}},[_vm._v("Toggle drawer")]),_vm._v(" "),_c('gl-drawer',{attrs:{"open":_vm.drawerOpened},on:{"close":_vm.close},scopedSlots:_vm._u([{key:"header",fn:function(){return [_vm._v("Your Title")]},proxy:true}])},[_vm._v(" "),_c('div',[_c('p',[_vm._v("First Body Item")])])])],1)};
|
|
27
|
-
var __vue_staticRenderFns__ = [];
|
|
28
|
-
|
|
29
|
-
/* style */
|
|
30
|
-
const __vue_inject_styles__ = undefined;
|
|
31
|
-
/* scoped */
|
|
32
|
-
const __vue_scope_id__ = undefined;
|
|
33
|
-
/* module identifier */
|
|
34
|
-
const __vue_module_identifier__ = undefined;
|
|
35
|
-
/* functional template */
|
|
36
|
-
const __vue_is_functional_template__ = false;
|
|
37
|
-
/* style inject */
|
|
38
|
-
|
|
39
|
-
/* style inject SSR */
|
|
40
|
-
|
|
41
|
-
/* style inject shadow dom */
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const __vue_component__ = __vue_normalize__(
|
|
46
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
47
|
-
__vue_inject_styles__,
|
|
48
|
-
__vue_script__,
|
|
49
|
-
__vue_scope_id__,
|
|
50
|
-
__vue_is_functional_template__,
|
|
51
|
-
__vue_module_identifier__,
|
|
52
|
-
false,
|
|
53
|
-
undefined,
|
|
54
|
-
undefined,
|
|
55
|
-
undefined
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
export default __vue_component__;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
drawerOpened: false,
|
|
6
|
-
};
|
|
7
|
-
},
|
|
8
|
-
methods: {
|
|
9
|
-
toggle() {
|
|
10
|
-
this.drawerOpened = !this.drawerOpened;
|
|
11
|
-
},
|
|
12
|
-
close() {
|
|
13
|
-
this.drawerOpened = false;
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<template>
|
|
20
|
-
<div>
|
|
21
|
-
<gl-button @click="toggle">Toggle drawer</gl-button>
|
|
22
|
-
<gl-drawer :open="drawerOpened" @close="close">
|
|
23
|
-
<template #header>Your Title</template>
|
|
24
|
-
<div>
|
|
25
|
-
<p>First Body Item</p>
|
|
26
|
-
</div>
|
|
27
|
-
</gl-drawer>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|