@gitlab/ui 35.0.0 → 35.1.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/CHANGELOG.md +7 -0
- package/dist/components/base/nav/nav.documentation.js +2 -7
- package/dist/components/utilities/truncate/truncate.documentation.js +2 -17
- package/dist/components/utilities/truncate/truncate.js +11 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/documentation/components_documentation.js +0 -2
- package/documentation/documented_stories.js +4 -0
- package/package.json +5 -5
- package/src/components/base/modal/modal.scss +5 -2
- package/src/components/base/nav/nav.documentation.js +0 -4
- package/src/components/base/nav/nav.md +8 -5
- package/src/components/base/nav/nav.stories.js +52 -15
- package/src/components/utilities/truncate/truncate.documentation.js +0 -14
- package/src/components/utilities/truncate/truncate.md +0 -4
- package/src/components/utilities/truncate/truncate.stories.js +37 -26
- package/src/components/utilities/truncate/truncate.vue +9 -0
- package/dist/components/base/nav/examples/index.js +0 -13
- package/dist/components/base/nav/examples/nav.basic.example.js +0 -38
- package/dist/components/base/nav/nav_item.documentation.js +0 -13
- package/dist/components/base/nav/nav_item_dropdown.documentation.js +0 -14
- package/dist/components/utilities/truncate/examples/index.js +0 -13
- package/dist/components/utilities/truncate/examples/truncate.basic.example.js +0 -38
- package/src/components/base/nav/examples/index.js +0 -15
- package/src/components/base/nav/examples/nav.basic.example.vue +0 -8
- package/src/components/base/nav/nav_item.documentation.js +0 -6
- package/src/components/base/nav/nav_item.md +0 -7
- package/src/components/base/nav/nav_item.stories.js +0 -23
- package/src/components/base/nav/nav_item_dropdown.documentation.js +0 -7
- package/src/components/base/nav/nav_item_dropdown.md +0 -7
- package/src/components/base/nav/nav_item_dropdown.stories.js +0 -52
- package/src/components/utilities/truncate/examples/index.js +0 -15
- package/src/components/utilities/truncate/examples/truncate.basic.example.vue +0 -5
|
@@ -9,9 +9,7 @@ export { default as GlFormTextDocumentation } from '../src/components/base/form/
|
|
|
9
9
|
export { default as GlFormComboboxDocumentation } from '../src/components/base/form/form_combobox/form_combobox.documentation';
|
|
10
10
|
export { default as GlGaugeChartDocumentation } from '../src/components/charts/gauge/gauge.documentation';
|
|
11
11
|
export { default as GlTokenSelectorDocumentation } from '../src/components/base/token_selector/token_selector.documentation';
|
|
12
|
-
export { default as GlNavItemDropdownDocumentation } from '../src/components/base/nav/nav_item_dropdown.documentation';
|
|
13
12
|
export { default as GlNavDocumentation } from '../src/components/base/nav/nav.documentation';
|
|
14
|
-
export { default as GlNavItemDocumentation } from '../src/components/base/nav/nav_item.documentation';
|
|
15
13
|
export { default as GlFormCheckboxTreeDocumentation } from '../src/components/base/form/form_checkbox_tree/form_checkbox_tree.documentation';
|
|
16
14
|
export { default as GlMarkdownDocumentation } from '../src/components/base/markdown/markdown.documentation';
|
|
17
15
|
export { default as GlNavbarDocumentation } from '../src/components/base/navbar/navbar.documentation';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "35.
|
|
3
|
+
"version": "35.1.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"@arkweid/lefthook": "^0.7.6",
|
|
86
86
|
"@babel/core": "^7.10.2",
|
|
87
87
|
"@babel/preset-env": "^7.10.2",
|
|
88
|
-
"@gitlab/eslint-plugin": "10.0.
|
|
89
|
-
"@gitlab/stylelint-config": "
|
|
88
|
+
"@gitlab/eslint-plugin": "10.0.2",
|
|
89
|
+
"@gitlab/stylelint-config": "4.0.0",
|
|
90
90
|
"@gitlab/svgs": "2.2.0",
|
|
91
91
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
92
92
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"npm-run-all": "^4.1.5",
|
|
130
130
|
"pikaday": "^1.8.0",
|
|
131
131
|
"plop": "^2.5.4",
|
|
132
|
-
"postcss": "
|
|
132
|
+
"postcss": "8.4.5",
|
|
133
133
|
"postcss-loader": "^3.0.0",
|
|
134
134
|
"postcss-scss": "^2.1.1",
|
|
135
135
|
"prettier": "2.2.1",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"sass-true": "^5.0.0",
|
|
148
148
|
"start-server-and-test": "^1.10.6",
|
|
149
149
|
"storybook-readme": "5.0.9",
|
|
150
|
-
"stylelint": "
|
|
150
|
+
"stylelint": "14.3.0",
|
|
151
151
|
"stylelint-config-prettier": "9.0.3",
|
|
152
152
|
"stylelint-prettier": "2.0.0",
|
|
153
153
|
"vue": "^2.6.11",
|
|
@@ -53,7 +53,8 @@ body.modal-open {
|
|
|
53
53
|
|
|
54
54
|
.modal-header {
|
|
55
55
|
@include gl-bg-white;
|
|
56
|
-
@include gl-
|
|
56
|
+
@include gl-pb-3;
|
|
57
|
+
@include gl-border-none;
|
|
57
58
|
|
|
58
59
|
.modal-title {
|
|
59
60
|
@include gl-font-lg;
|
|
@@ -68,6 +69,7 @@ body.modal-open {
|
|
|
68
69
|
@include gl-bg-white;
|
|
69
70
|
@include gl-relative;
|
|
70
71
|
@include gl-p-5;
|
|
72
|
+
@include gl-py-3;
|
|
71
73
|
@include gl-text-left;
|
|
72
74
|
@include gl-white-space-normal;
|
|
73
75
|
@include gl-font-base;
|
|
@@ -78,7 +80,8 @@ body.modal-open {
|
|
|
78
80
|
@include gl-display-flex;
|
|
79
81
|
@include gl-flex-direction-row;
|
|
80
82
|
@include gl-p-5;
|
|
81
|
-
@include gl-
|
|
83
|
+
@include gl-pt-3;
|
|
84
|
+
@include gl-border-none;
|
|
82
85
|
|
|
83
86
|
.btn {
|
|
84
87
|
@include gl-m-0;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
The navigation component is built with flexbox and provides a strong foundation for building all
|
|
2
|
+
types of navigation components.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
## `GlNavItem`
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Use `GlNavItem` to add actionable links (or router links) to your nav. `GlNavItem` wraps [`BNavItem`](https://bootstrap-vue.org/docs/components/navbar#b-nav-item).
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
## `GlNavItemDropdown`
|
|
9
|
+
|
|
10
|
+
Use `GlNavItemDropdown` to place dropdown items within your nav.
|
|
11
|
+
`GlNavItemDropdown` wraps [`BNavItemDropdown`](https://bootstrap-vue.org/docs/components/navbar#b-nav-item-dropdown).
|
|
@@ -1,23 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlNav, GlNavItem } from '../../../../index';
|
|
4
|
-
import readme from './nav.md';
|
|
5
|
-
|
|
6
|
-
const components = {
|
|
1
|
+
import {
|
|
7
2
|
GlNav,
|
|
8
3
|
GlNavItem,
|
|
9
|
-
|
|
4
|
+
GlNavItemDropdown,
|
|
5
|
+
GlDropdownItem,
|
|
6
|
+
GlDropdownDivider,
|
|
7
|
+
GlIcon,
|
|
8
|
+
} from '../../../../index';
|
|
9
|
+
import readme from './nav.md';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
export const Default = (_args, { argTypes }) => ({
|
|
12
|
+
props: Object.keys(argTypes),
|
|
13
|
+
components: {
|
|
14
|
+
GlNav,
|
|
15
|
+
GlNavItem,
|
|
16
|
+
GlNavItemDropdown,
|
|
17
|
+
GlDropdownItem,
|
|
18
|
+
GlDropdownDivider,
|
|
19
|
+
GlIcon,
|
|
20
|
+
},
|
|
21
|
+
template: `
|
|
22
|
+
<div style="height: 150px">
|
|
16
23
|
<gl-nav>
|
|
17
24
|
<gl-nav-item active>Active</gl-nav-item>
|
|
18
25
|
<gl-nav-item>Link</gl-nav-item>
|
|
19
|
-
<gl-nav-item
|
|
26
|
+
<gl-nav-item-dropdown text="Dropdown">
|
|
27
|
+
<gl-dropdown-item>Above divider</gl-dropdown-item>
|
|
28
|
+
<gl-dropdown-divider />
|
|
29
|
+
<gl-dropdown-item>Below divider</gl-dropdown-item>
|
|
30
|
+
</gl-nav-item-dropdown>
|
|
31
|
+
<gl-nav-item-dropdown text="Dropdown">
|
|
32
|
+
<template #button-content>
|
|
33
|
+
<gl-icon name="question" />
|
|
34
|
+
<gl-icon name="angle-down" />
|
|
35
|
+
</template>
|
|
36
|
+
<gl-dropdown-item>One</gl-dropdown-item>
|
|
37
|
+
<gl-dropdown-item>Two</gl-dropdown-item>
|
|
38
|
+
</gl-nav-item-dropdown>
|
|
20
39
|
<gl-nav-item disabled>Disabled</gl-nav-item>
|
|
21
40
|
</gl-nav>
|
|
22
|
-
|
|
23
|
-
|
|
41
|
+
</div>`,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export default {
|
|
45
|
+
title: 'base/nav',
|
|
46
|
+
component: GlNav,
|
|
47
|
+
subcomponents: {
|
|
48
|
+
GlNavItem,
|
|
49
|
+
GlNavItemDropdown,
|
|
50
|
+
},
|
|
51
|
+
parameters: {
|
|
52
|
+
bootstrapComponent: 'b-nav',
|
|
53
|
+
knobs: { disable: true },
|
|
54
|
+
docs: {
|
|
55
|
+
description: {
|
|
56
|
+
component: readme,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
import examples from './examples';
|
|
2
1
|
import description from './truncate.md';
|
|
3
2
|
|
|
4
3
|
export default {
|
|
5
4
|
description,
|
|
6
|
-
examples,
|
|
7
|
-
propsInfo: {
|
|
8
|
-
text: {
|
|
9
|
-
additionalInfo: 'Text to be ellipsized',
|
|
10
|
-
},
|
|
11
|
-
position: {
|
|
12
|
-
additionalInfo: 'Ellipsis position',
|
|
13
|
-
enum: 'truncateOptions',
|
|
14
|
-
},
|
|
15
|
-
withTooltip: {
|
|
16
|
-
additionalInfo: 'Display the full text in a tooltip only if it is being truncated',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
5
|
};
|
|
@@ -1,40 +1,51 @@
|
|
|
1
|
-
import { withKnobs, text, select, boolean } from '@storybook/addon-knobs';
|
|
2
|
-
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
1
|
import { GlTruncate } from '../../../../index';
|
|
4
2
|
import { POSITION } from './constants';
|
|
5
3
|
import readme from './truncate.md';
|
|
6
4
|
|
|
7
|
-
const components = {
|
|
8
|
-
GlTruncate,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
5
|
const template = '<gl-truncate :text="text" :position="position" :with-tooltip="withTooltip" />';
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
const generateProps = ({
|
|
8
|
+
text = 'src/thisIs/AVeryLongFilePath/that/needs/to/be/smartly/truncated/from/the/middle/so/we/dont/lose/important/information/here.vue',
|
|
15
9
|
position = 'middle',
|
|
16
10
|
withTooltip = false,
|
|
17
|
-
} = {}) {
|
|
18
|
-
|
|
11
|
+
} = {}) => ({
|
|
12
|
+
text,
|
|
13
|
+
position,
|
|
14
|
+
withTooltip,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const Template = (args, { argTypes }) => ({
|
|
18
|
+
components: {
|
|
19
|
+
GlTruncate,
|
|
20
|
+
},
|
|
21
|
+
props: Object.keys(argTypes),
|
|
22
|
+
template,
|
|
23
|
+
});
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = generateProps();
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
title: 'utilities/truncate',
|
|
29
|
+
component: GlTruncate,
|
|
30
|
+
parameters: {
|
|
31
|
+
knobs: { disable: true },
|
|
32
|
+
storyshots: { disable: true },
|
|
33
|
+
docs: {
|
|
34
|
+
description: {
|
|
35
|
+
component: readme,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
argTypes: {
|
|
19
40
|
text: {
|
|
20
|
-
|
|
21
|
-
default: text('text', longText),
|
|
41
|
+
control: 'text',
|
|
22
42
|
},
|
|
23
43
|
position: {
|
|
24
|
-
|
|
25
|
-
|
|
44
|
+
options: Object.values(POSITION),
|
|
45
|
+
control: 'select',
|
|
26
46
|
},
|
|
27
47
|
withTooltip: {
|
|
28
|
-
|
|
48
|
+
control: 'boolean',
|
|
29
49
|
},
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
documentedStoriesOf('utilities/truncate', readme)
|
|
34
|
-
.addParameters({ storyshots: false })
|
|
35
|
-
.addDecorator(withKnobs)
|
|
36
|
-
.add('default', () => ({
|
|
37
|
-
props: generateProps(),
|
|
38
|
-
components,
|
|
39
|
-
template,
|
|
40
|
-
}));
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -10,16 +10,25 @@ export default {
|
|
|
10
10
|
GlResizeObserver: GlResizeObserverDirective,
|
|
11
11
|
},
|
|
12
12
|
props: {
|
|
13
|
+
/**
|
|
14
|
+
* Text to be ellipsized
|
|
15
|
+
*/
|
|
13
16
|
text: {
|
|
14
17
|
type: String,
|
|
15
18
|
required: true,
|
|
16
19
|
},
|
|
20
|
+
/**
|
|
21
|
+
* Ellipsis position
|
|
22
|
+
*/
|
|
17
23
|
position: {
|
|
18
24
|
type: String,
|
|
19
25
|
required: false,
|
|
20
26
|
default: POSITION.END,
|
|
21
27
|
validator: (value) => Object.values(POSITION).includes(value),
|
|
22
28
|
},
|
|
29
|
+
/**
|
|
30
|
+
* Display the full text in a tooltip only if it is being truncated
|
|
31
|
+
*/
|
|
23
32
|
withTooltip: {
|
|
24
33
|
type: Boolean,
|
|
25
34
|
required: false,
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
/* script */
|
|
4
|
-
|
|
5
|
-
/* template */
|
|
6
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-nav',[_c('gl-nav-item',{attrs:{"active":""}},[_vm._v("Active")]),_vm._v(" "),_c('gl-nav-item',[_vm._v("Link")]),_vm._v(" "),_c('gl-nav-item',[_vm._v("Another Link")]),_vm._v(" "),_c('gl-nav-item',{attrs:{"disabled":""}},[_vm._v("Disabled")])],1)};
|
|
7
|
-
var __vue_staticRenderFns__ = [];
|
|
8
|
-
|
|
9
|
-
/* style */
|
|
10
|
-
const __vue_inject_styles__ = undefined;
|
|
11
|
-
/* scoped */
|
|
12
|
-
const __vue_scope_id__ = undefined;
|
|
13
|
-
/* module identifier */
|
|
14
|
-
const __vue_module_identifier__ = undefined;
|
|
15
|
-
/* functional template */
|
|
16
|
-
const __vue_is_functional_template__ = false;
|
|
17
|
-
/* style inject */
|
|
18
|
-
|
|
19
|
-
/* style inject SSR */
|
|
20
|
-
|
|
21
|
-
/* style inject shadow dom */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const __vue_component__ = __vue_normalize__(
|
|
26
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
27
|
-
__vue_inject_styles__,
|
|
28
|
-
{},
|
|
29
|
-
__vue_scope_id__,
|
|
30
|
-
__vue_is_functional_template__,
|
|
31
|
-
__vue_module_identifier__,
|
|
32
|
-
false,
|
|
33
|
-
undefined,
|
|
34
|
-
undefined,
|
|
35
|
-
undefined
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
export default __vue_component__;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
var nav_item = "# Nav Item\n\n<!-- STORY -->\n\n## Usage\n\nThe navigation item component is meant to be used for for actionable links (or router-links).\n";
|
|
2
|
-
|
|
3
|
-
var description = /*#__PURE__*/Object.freeze({
|
|
4
|
-
__proto__: null,
|
|
5
|
-
'default': nav_item
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
var nav_item_documentation = {
|
|
9
|
-
description,
|
|
10
|
-
bootstrapComponent: 'b-nav-item'
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default nav_item_documentation;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
var nav_item_dropdown = "# Nav Item Dropdown\n\n<!-- STORY -->\n\n## Usage\n\nUse `<gl-nav-item-dropdown>` to place dropdown items within your nav.\n";
|
|
2
|
-
|
|
3
|
-
var description = /*#__PURE__*/Object.freeze({
|
|
4
|
-
__proto__: null,
|
|
5
|
-
'default': nav_item_dropdown
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
var nav_item_dropdown_documentation = {
|
|
9
|
-
followsDesignSystem: false,
|
|
10
|
-
description,
|
|
11
|
-
bootstrapComponent: 'b-nav-item-dropdown'
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default nav_item_dropdown_documentation;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
/* script */
|
|
4
|
-
|
|
5
|
-
/* template */
|
|
6
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-truncate',{attrs:{"text":"ee/app/assets/javascripts/vue_shared/security_reports/components/utils/truncate/smart-truncate/src/index.js"}})};
|
|
7
|
-
var __vue_staticRenderFns__ = [];
|
|
8
|
-
|
|
9
|
-
/* style */
|
|
10
|
-
const __vue_inject_styles__ = undefined;
|
|
11
|
-
/* scoped */
|
|
12
|
-
const __vue_scope_id__ = undefined;
|
|
13
|
-
/* module identifier */
|
|
14
|
-
const __vue_module_identifier__ = undefined;
|
|
15
|
-
/* functional template */
|
|
16
|
-
const __vue_is_functional_template__ = false;
|
|
17
|
-
/* style inject */
|
|
18
|
-
|
|
19
|
-
/* style inject SSR */
|
|
20
|
-
|
|
21
|
-
/* style inject shadow dom */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const __vue_component__ = __vue_normalize__(
|
|
26
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
27
|
-
__vue_inject_styles__,
|
|
28
|
-
{},
|
|
29
|
-
__vue_scope_id__,
|
|
30
|
-
__vue_is_functional_template__,
|
|
31
|
-
__vue_module_identifier__,
|
|
32
|
-
false,
|
|
33
|
-
undefined,
|
|
34
|
-
undefined,
|
|
35
|
-
undefined
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
export default __vue_component__;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
|
-
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlNav, GlNavItem } from '../../../../index';
|
|
4
|
-
import readme from './nav_item.md';
|
|
5
|
-
|
|
6
|
-
const components = {
|
|
7
|
-
GlNav,
|
|
8
|
-
GlNavItem,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
documentedStoriesOf('base/nav/nav-item', readme)
|
|
12
|
-
.addDecorator(withKnobs)
|
|
13
|
-
.add('default', () => ({
|
|
14
|
-
components,
|
|
15
|
-
template: `
|
|
16
|
-
<gl-nav>
|
|
17
|
-
<gl-nav-item active>Active</gl-nav-item>
|
|
18
|
-
<gl-nav-item>Link</gl-nav-item>
|
|
19
|
-
<gl-nav-item>Another Link</gl-nav-item>
|
|
20
|
-
<gl-nav-item disabled>Disabled</gl-nav-item>
|
|
21
|
-
</gl-nav>
|
|
22
|
-
`,
|
|
23
|
-
}));
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
|
-
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlNav, GlNavItemDropdown, GlDropdownItem, GlDropdownDivider } from '../../../../index';
|
|
4
|
-
import readme from './nav_item_dropdown.md';
|
|
5
|
-
|
|
6
|
-
const components = {
|
|
7
|
-
GlNav,
|
|
8
|
-
GlNavItemDropdown,
|
|
9
|
-
GlDropdownItem,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
documentedStoriesOf('base/nav/nav-item-dropdown', readme)
|
|
13
|
-
.addDecorator(withKnobs)
|
|
14
|
-
.add('default', () => ({
|
|
15
|
-
components,
|
|
16
|
-
template: `
|
|
17
|
-
<gl-nav>
|
|
18
|
-
<gl-nav-item-dropdown text="Dropdown">
|
|
19
|
-
<gl-dropdown-item>One</gl-dropdown-item>
|
|
20
|
-
<gl-dropdown-item>Two</gl-dropdown-item>
|
|
21
|
-
<gl-dropdown-item>Three</gl-dropdown-item>
|
|
22
|
-
</gl-nav-item-dropdown>
|
|
23
|
-
</gl-nav>
|
|
24
|
-
`,
|
|
25
|
-
}))
|
|
26
|
-
.add('with divider', () => ({
|
|
27
|
-
components: { ...components, GlDropdownDivider },
|
|
28
|
-
template: `
|
|
29
|
-
<gl-nav>
|
|
30
|
-
<gl-nav-item-dropdown text="Dropdown">
|
|
31
|
-
<gl-dropdown-item>Above divider</gl-dropdown-item>
|
|
32
|
-
<gl-dropdown-divider />
|
|
33
|
-
<gl-dropdown-item>Below divider</gl-dropdown-item>
|
|
34
|
-
</gl-nav-item-dropdown>
|
|
35
|
-
</gl-nav>
|
|
36
|
-
`,
|
|
37
|
-
}))
|
|
38
|
-
.add('custom button', () => ({
|
|
39
|
-
components,
|
|
40
|
-
template: `
|
|
41
|
-
<gl-nav>
|
|
42
|
-
<gl-nav-item-dropdown text="Dropdown">
|
|
43
|
-
<template #button-content>
|
|
44
|
-
<gl-icon name="question" />
|
|
45
|
-
<gl-icon name="angle-down" />
|
|
46
|
-
</template>
|
|
47
|
-
<gl-dropdown-item>One</gl-dropdown-item>
|
|
48
|
-
<gl-dropdown-item>Two</gl-dropdown-item>
|
|
49
|
-
</gl-nav-item-dropdown>
|
|
50
|
-
</gl-nav>
|
|
51
|
-
`,
|
|
52
|
-
}));
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import TruncateBasicExample from './truncate.basic.example.vue';
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
{
|
|
5
|
-
name: 'Basic',
|
|
6
|
-
items: [
|
|
7
|
-
{
|
|
8
|
-
id: 'truncate',
|
|
9
|
-
name: 'Basic',
|
|
10
|
-
description: 'Basic truncation',
|
|
11
|
-
component: TruncateBasicExample,
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
];
|