@gitlab/ui 33.1.2 → 36.0.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 +55 -0
- package/dist/components/base/avatars_inline/avatars_inline.documentation.js +1 -1
- package/dist/components/base/avatars_inline/avatars_inline.js +5 -1
- package/dist/components/base/nav/nav.documentation.js +2 -7
- package/dist/components/base/tabs/tabs/tabs.documentation.js +1 -1
- package/dist/components/base/tabs/tabs/tabs.js +2 -12
- 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/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/documentation/all_components.js +2 -2
- package/documentation/components_documentation.js +0 -2
- package/documentation/documented_stories.js +4 -0
- package/package.json +15 -18
- package/src/charts.js +19 -0
- package/src/components/base/alert/alert.stories.js +1 -1
- package/src/components/base/avatar/avatar.stories.js +8 -0
- package/src/components/base/avatar_labeled/avatar_labeled.stories.js +7 -0
- package/src/components/base/avatar_link/avatar_link.stories.js +7 -0
- package/src/components/base/avatars_inline/avatars_inline.md +5 -0
- package/src/components/base/avatars_inline/avatars_inline.spec.js +21 -1
- package/src/components/base/avatars_inline/avatars_inline.stories.js +23 -9
- package/src/components/base/avatars_inline/avatars_inline.vue +11 -1
- package/src/components/base/badge/badge.stories.js +115 -10
- package/src/components/base/banner/banner.stories.js +1 -1
- package/src/components/base/breadcrumb/breadcrumb.stories.js +1 -1
- package/src/components/base/broadcast_message/broadcast_message.stories.js +3 -3
- package/src/components/base/button/button.stories.js +11 -11
- package/src/components/base/button_group/button_group.stories.js +1 -1
- package/src/components/base/collapse/collapse.stories.js +1 -1
- package/src/components/base/drawer/drawer.stories.js +1 -1
- package/src/components/base/dropdown/dropdown.stories.js +5 -3
- package/src/components/base/dropdown/dropdown_divider.stories.js +1 -1
- package/src/components/base/dropdown/dropdown_form.stories.js +1 -1
- package/src/components/base/dropdown/dropdown_item.stories.js +1 -1
- package/src/components/base/dropdown/dropdown_section_header.stories.js +1 -1
- package/src/components/base/dropdown/dropdown_text.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search.stories.js +11 -1
- package/src/components/base/filtered_search/filtered_search_suggestion.stories.js +2 -0
- package/src/components/base/filtered_search/filtered_search_suggestion_list.stories.js +2 -0
- package/src/components/base/filtered_search/filtered_search_token.stories.js +2 -0
- package/src/components/base/filtered_search/filtered_search_token_segment.stories.js +2 -0
- package/src/components/base/form/form.stories.js +1 -1
- package/src/components/base/form/form_checkbox/form_checkbox.stories.js +1 -1
- package/src/components/base/form/form_group/form_group.stories.js +6 -5
- package/src/components/base/form/form_input/form_input.stories.js +1 -1
- package/src/components/base/form/form_input_group/form_input_group.stories.js +1 -1
- package/src/components/base/form/form_radio/form_radio.stories.js +1 -1
- package/src/components/base/form/form_radio_group/form_radio_group.stories.js +2 -1
- package/src/components/base/form/form_select/form_select.stories.js +1 -1
- package/src/components/base/form/form_text/form_text.vue +3 -1
- package/src/components/base/form/form_textarea/form_textarea.stories.js +1 -1
- package/src/components/base/icon/icon.stories.js +1 -1
- package/src/components/base/infinite_scroll/infinite_scroll.stories.js +1 -1
- package/src/components/base/label/label.stories.js +1 -1
- package/src/components/base/link/link.stories.js +1 -1
- package/src/components/base/loading_icon/loading_icon.stories.js +2 -1
- package/src/components/base/modal/modal.scss +5 -2
- package/src/components/base/modal/modal.stories.js +1 -1
- 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/base/navbar/navbar.stories.js +1 -1
- package/src/components/base/paginated_list/paginated_list.stories.js +1 -1
- package/src/components/base/pagination/pagination.stories.js +7 -0
- package/src/components/base/path/path.stories.js +2 -2
- package/src/components/base/popover/popover.stories.js +6 -0
- package/src/components/base/progress_bar/progress_bar.stories.js +1 -1
- package/src/components/base/search_box_by_click/search_box_by_click.stories.js +1 -1
- package/src/components/base/search_box_by_type/search_box_by_type.stories.js +1 -1
- package/src/components/base/segmented_control/segmented_control.stories.js +1 -1
- package/src/components/base/skeleton_loader/skeleton_loader.stories.js +1 -1
- package/src/components/base/skeleton_loading/skeleton_loading.stories.js +1 -1
- package/src/components/base/sorting/sorting.stories.js +1 -1
- package/src/components/base/sorting/sorting_item.stories.js +1 -1
- package/src/components/base/table/table.stories.js +6 -1
- package/src/components/base/tabs/tabs/scrollable_tabs.spec.js +0 -1
- package/src/components/base/tabs/tabs/tabs.md +2 -2
- package/src/components/base/tabs/tabs/tabs.scss +3 -115
- package/src/components/base/tabs/tabs/tabs.spec.js +8 -5
- package/src/components/base/tabs/tabs/tabs.stories.js +9 -13
- package/src/components/base/tabs/tabs/tabs.vue +2 -11
- package/src/components/base/toast/toast.stories.js +6 -4
- package/src/components/base/toggle/toggle.stories.js +1 -1
- package/src/components/base/token/token.stories.js +2 -2
- package/src/components/base/tooltip/tooltip.stories.js +2 -1
- package/src/components/charts/area/area.stories.js +1 -1
- package/src/components/charts/bar/bar.stories.js +1 -1
- package/src/components/charts/chart/chart.stories.js +2 -2
- package/src/components/charts/column/column.stories.js +1 -1
- package/src/components/charts/discrete_scatter/discrete_scatter.stories.js +1 -1
- package/src/components/charts/heatmap/heatmap.stories.js +1 -1
- package/src/components/charts/legend/legend.stories.js +1 -1
- package/src/components/charts/line/line.stories.js +1 -1
- package/src/components/charts/series_label/series_label.stories.js +1 -1
- package/src/components/charts/single_stat/single_stat.stories.js +1 -1
- package/src/components/charts/sparkline/sparkline.stories.js +1 -1
- package/src/components/charts/stacked_column/stacked_column.stories.js +1 -1
- package/src/components/charts/tooltip/tooltip.stories.js +1 -1
- package/src/components/regions/dashboard_skeleton/dashboard_skeleton.stories.js +1 -1
- package/src/components/regions/empty_state/empty_state.stories.js +1 -1
- package/src/components/utilities/friendly_wrap/friendly_wrap.stories.js +1 -1
- package/src/components/utilities/intersection_observer/intersection_observer.stories.js +1 -1
- package/src/components/utilities/intersperse/intersperse.stories.js +1 -1
- package/src/components/utilities/sprintf/sprintf.stories.js +1 -1
- 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 +38 -27
- package/src/components/utilities/truncate/truncate.vue +9 -0
- package/{config.js → src/config.js} +1 -1
- package/src/directives/hover_load/hover_load.stories.js +1 -1
- package/src/directives/outside/outside.stories.js +1 -1
- package/src/directives/resize_observer/resize_observer.stories.js +1 -1
- package/src/directives/safe_html/safe_html.stories.js +1 -1
- package/src/index.js +111 -0
- package/src/scss/utilities.scss +8 -0
- package/src/scss/utility-mixins/box-shadow.scss +4 -0
- package/{utils.js → src/utils.js} +1 -1
- package/charts.js +0 -19
- 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/index.js +0 -111
- 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 -51
- package/src/components/utilities/truncate/examples/index.js +0 -15
- package/src/components/utilities/truncate/examples/truncate.basic.example.vue +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlButton } from '
|
|
1
|
+
import { GlButton, GlButtonGroup, GlBadge, GlDropdown, GlDropdownItem } from '../../../index';
|
|
2
2
|
import {
|
|
3
3
|
buttonCategoryOptions,
|
|
4
4
|
buttonVariantOptions,
|
|
@@ -111,7 +111,7 @@ IconButton.args = generateProps({
|
|
|
111
111
|
|
|
112
112
|
export const DropdownButton = (args, { argTypes }) => ({
|
|
113
113
|
props: Object.keys(argTypes),
|
|
114
|
-
components,
|
|
114
|
+
components: { GlDropdown, GlDropdownItem },
|
|
115
115
|
template: wrapDropdownButton(`
|
|
116
116
|
<gl-dropdown
|
|
117
117
|
text="Some dropdown"
|
|
@@ -129,7 +129,7 @@ DropdownButton.args = generateProps();
|
|
|
129
129
|
|
|
130
130
|
export const DropdownIconButton = (args, { argTypes }) => ({
|
|
131
131
|
props: Object.keys(argTypes),
|
|
132
|
-
components,
|
|
132
|
+
components: { GlDropdown, GlDropdownItem },
|
|
133
133
|
template: wrapDropdownButton(`
|
|
134
134
|
<gl-dropdown
|
|
135
135
|
icon="download"
|
|
@@ -149,7 +149,7 @@ DropdownIconButton.args = generateProps();
|
|
|
149
149
|
|
|
150
150
|
export const DropdownIconTextButton = (args, { argTypes }) => ({
|
|
151
151
|
props: Object.keys(argTypes),
|
|
152
|
-
components,
|
|
152
|
+
components: { GlDropdown, GlDropdownItem },
|
|
153
153
|
template: wrapDropdownButton(`
|
|
154
154
|
<gl-dropdown
|
|
155
155
|
icon="notifications"
|
|
@@ -168,7 +168,7 @@ DropdownIconTextButton.args = generateProps();
|
|
|
168
168
|
|
|
169
169
|
export const DropdownIconOnlyButton = (args, { argTypes }) => ({
|
|
170
170
|
props: Object.keys(argTypes),
|
|
171
|
-
components,
|
|
171
|
+
components: { GlDropdown, GlDropdownItem },
|
|
172
172
|
template: wrapDropdownButton(`
|
|
173
173
|
<gl-dropdown
|
|
174
174
|
icon="ellipsis_v"
|
|
@@ -191,7 +191,7 @@ DropdownIconOnlyButton.args = generateProps({
|
|
|
191
191
|
|
|
192
192
|
export const DropdownSplitButton = (args, { argTypes }) => ({
|
|
193
193
|
props: Object.keys(argTypes),
|
|
194
|
-
components,
|
|
194
|
+
components: { GlDropdown, GlDropdownItem },
|
|
195
195
|
template: wrapDropdownButton(`
|
|
196
196
|
<gl-dropdown
|
|
197
197
|
split
|
|
@@ -210,7 +210,7 @@ DropdownSplitButton.args = generateProps({ category: 'primary', variant: 'confir
|
|
|
210
210
|
|
|
211
211
|
export const DropdownIconSplitButton = (args, { argTypes }) => ({
|
|
212
212
|
props: Object.keys(argTypes),
|
|
213
|
-
components,
|
|
213
|
+
components: { GlDropdown, GlDropdownItem },
|
|
214
214
|
template: wrapDropdownButton(`
|
|
215
215
|
<gl-dropdown
|
|
216
216
|
split
|
|
@@ -230,7 +230,7 @@ DropdownIconSplitButton.args = generateProps({ category: 'secondary', variant: '
|
|
|
230
230
|
|
|
231
231
|
export const DropdownLoadingButton = (args, { argTypes }) => ({
|
|
232
232
|
props: Object.keys(argTypes),
|
|
233
|
-
components,
|
|
233
|
+
components: { GlDropdown, GlDropdownItem },
|
|
234
234
|
template: `
|
|
235
235
|
<gl-dropdown text="Some dropdown" :category="category" :loading="true">
|
|
236
236
|
<gl-dropdown-item>Dropdown item</gl-dropdown-item>
|
|
@@ -333,7 +333,7 @@ BorderlessTertiary.args = generateProps({ category: 'tertiary' });
|
|
|
333
333
|
|
|
334
334
|
export const LabelButton = (args, { argTypes = {} }) => ({
|
|
335
335
|
props: Object.keys(argTypes),
|
|
336
|
-
components,
|
|
336
|
+
components: { GlButton, GlButtonGroup },
|
|
337
337
|
template: `
|
|
338
338
|
<div>
|
|
339
339
|
<gl-button label>Label</gl-button>
|
|
@@ -451,7 +451,7 @@ Sizes.parameters = { controls: { disable: true } };
|
|
|
451
451
|
|
|
452
452
|
export const Badges = (args, { argTypes = {} }) => ({
|
|
453
453
|
props: Object.keys(argTypes),
|
|
454
|
-
components,
|
|
454
|
+
components: { GlButton, GlBadge },
|
|
455
455
|
variants: Object.keys(badgeForButtonOptions),
|
|
456
456
|
categories: buttonCategoryOptions,
|
|
457
457
|
style: {
|
|
@@ -483,7 +483,7 @@ Badges.parameters = { controls: { disable: true } };
|
|
|
483
483
|
|
|
484
484
|
export const BadgeWithSROnlyText = (args, { argTypes = {} }) => ({
|
|
485
485
|
props: Object.keys(argTypes),
|
|
486
|
-
components,
|
|
486
|
+
components: { GlButton, GlBadge },
|
|
487
487
|
template: `
|
|
488
488
|
<gl-button variant="confirm" buttonTextClasses="gl-display-flex gl-align-items-center">
|
|
489
489
|
Submit review
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlButton, GlButtonGroup, GlDropdown, GlDropdownItem } from '
|
|
1
|
+
import { GlButton, GlButtonGroup, GlDropdown, GlDropdownItem } from '../../../index';
|
|
2
2
|
import readme from './button_group.md';
|
|
3
3
|
|
|
4
4
|
const generateProps = ({ vertical = false } = {}) => ({ vertical });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlButton } from '
|
|
3
|
+
import { GlButton } from '../../../index';
|
|
4
4
|
import readme from './drawer.md';
|
|
5
5
|
import GlDrawer from './drawer.vue';
|
|
6
6
|
|
|
@@ -9,7 +9,9 @@ import {
|
|
|
9
9
|
GlDropdownItem,
|
|
10
10
|
GlDropdownText,
|
|
11
11
|
GlDropdownForm,
|
|
12
|
-
|
|
12
|
+
GlButton,
|
|
13
|
+
GlSearchBoxByType,
|
|
14
|
+
} from '../../../index';
|
|
13
15
|
import {
|
|
14
16
|
buttonCategoryOptions,
|
|
15
17
|
buttonSizeOptions,
|
|
@@ -213,7 +215,7 @@ documentedStoriesOf('base/dropdown', readme)
|
|
|
213
215
|
}))
|
|
214
216
|
.add('with form', () => ({
|
|
215
217
|
props: generateProps({ text: 'Some dropdown' }),
|
|
216
|
-
components,
|
|
218
|
+
components: { ...components, GlButton },
|
|
217
219
|
template: wrap`
|
|
218
220
|
<gl-dropdown-form class="gl-px-4">
|
|
219
221
|
<gl-button>One</gl-button>
|
|
@@ -242,7 +244,7 @@ documentedStoriesOf('base/dropdown', readme)
|
|
|
242
244
|
}))
|
|
243
245
|
.add('with header and footer', () => ({
|
|
244
246
|
props: generateProps({ text: 'Some dropdown', headerText: 'Header', hideHeaderBorder: true }),
|
|
245
|
-
components,
|
|
247
|
+
components: { ...components, GlSearchBoxByType },
|
|
246
248
|
template: wrap`
|
|
247
249
|
<template #header>
|
|
248
250
|
<gl-search-box-by-type />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlDropdownDivider } from '
|
|
3
|
+
import { GlDropdownDivider } from '../../../index';
|
|
4
4
|
import readme from './dropdown_divider.md';
|
|
5
5
|
|
|
6
6
|
const components = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlDropdownForm, GlButton } from '
|
|
3
|
+
import { GlDropdownForm, GlButton } from '../../../index';
|
|
4
4
|
import readme from './dropdown_form.md';
|
|
5
5
|
|
|
6
6
|
const components = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlDropdownItem } from '
|
|
3
|
+
import { GlDropdownItem } from '../../../index';
|
|
4
4
|
import readme from './dropdown_item.md';
|
|
5
5
|
|
|
6
6
|
const components = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlDropdownSectionHeader } from '
|
|
3
|
+
import { GlDropdownSectionHeader } from '../../../index';
|
|
4
4
|
import readme from './dropdown_section_header.md';
|
|
5
5
|
|
|
6
6
|
const components = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlDropdownText } from '
|
|
3
|
+
import { GlDropdownText } from '../../../index';
|
|
4
4
|
import readme from './dropdown_text.md';
|
|
5
5
|
|
|
6
6
|
const components = {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
GlFilteredSearch,
|
|
5
|
+
GlFilteredSearchToken,
|
|
6
|
+
GlFilteredSearchSuggestion,
|
|
7
|
+
GlLoadingIcon,
|
|
8
|
+
GlToken,
|
|
9
|
+
GlAvatar,
|
|
10
|
+
} from '../../../index';
|
|
4
11
|
import { setStoryTimeout } from '../../../utils/test_utils';
|
|
5
12
|
import readme from './filtered_search.md';
|
|
6
13
|
|
|
@@ -29,6 +36,7 @@ const fakeLabels = [
|
|
|
29
36
|
];
|
|
30
37
|
|
|
31
38
|
const UserToken = {
|
|
39
|
+
components: { GlFilteredSearchToken, GlFilteredSearchSuggestion, GlLoadingIcon, GlAvatar },
|
|
32
40
|
props: ['value', 'active'],
|
|
33
41
|
inheritAttrs: false,
|
|
34
42
|
data() {
|
|
@@ -104,6 +112,7 @@ const UserToken = {
|
|
|
104
112
|
};
|
|
105
113
|
|
|
106
114
|
const MilestoneToken = {
|
|
115
|
+
components: { GlFilteredSearchToken, GlFilteredSearchSuggestion, GlLoadingIcon },
|
|
107
116
|
props: ['value', 'active'],
|
|
108
117
|
inheritAttrs: false,
|
|
109
118
|
data() {
|
|
@@ -163,6 +172,7 @@ const MilestoneToken = {
|
|
|
163
172
|
};
|
|
164
173
|
|
|
165
174
|
const LabelToken = {
|
|
175
|
+
components: { GlFilteredSearchToken, GlFilteredSearchSuggestion, GlLoadingIcon, GlToken },
|
|
166
176
|
props: ['value', 'active'],
|
|
167
177
|
inheritAttrs: false,
|
|
168
178
|
data() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
|
+
import { GlFilteredSearchSuggestion } from '../../../index';
|
|
2
3
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
4
|
import readme from './filtered_search_suggestion.md';
|
|
4
5
|
|
|
@@ -7,6 +8,7 @@ const noop = () => {};
|
|
|
7
8
|
documentedStoriesOf('base/filtered-search/suggestion', readme)
|
|
8
9
|
.addDecorator(withKnobs)
|
|
9
10
|
.add('default', () => ({
|
|
11
|
+
components: { GlFilteredSearchSuggestion },
|
|
10
12
|
provide: {
|
|
11
13
|
filteredSearchSuggestionListInstance: {
|
|
12
14
|
register: noop,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
|
+
import { GlFilteredSearchSuggestionList, GlFilteredSearchSuggestion } from '../../../index';
|
|
2
3
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
4
|
import { provide } from './common_story_options';
|
|
4
5
|
import readme from './filtered_search_suggestion_list.md';
|
|
@@ -6,6 +7,7 @@ import readme from './filtered_search_suggestion_list.md';
|
|
|
6
7
|
documentedStoriesOf('base/filtered-search/suggestion-list', readme)
|
|
7
8
|
.addDecorator(withKnobs)
|
|
8
9
|
.add('default', () => ({
|
|
10
|
+
components: { GlFilteredSearchSuggestionList, GlFilteredSearchSuggestion },
|
|
9
11
|
data() {
|
|
10
12
|
return {
|
|
11
13
|
iteration: 1,
|
|
@@ -2,6 +2,7 @@ import { withKnobs, boolean } from '@storybook/addon-knobs';
|
|
|
2
2
|
import PortalVue from 'portal-vue';
|
|
3
3
|
import Vue from 'vue';
|
|
4
4
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
5
|
+
import { GlIcon } from '../../../index';
|
|
5
6
|
import { provide } from './common_story_options';
|
|
6
7
|
import GlFilteredSearchSuggestion from './filtered_search_suggestion.vue';
|
|
7
8
|
import readme from './filtered_search_token.md';
|
|
@@ -15,6 +16,7 @@ documentedStoriesOf('base/filtered-search/token', readme)
|
|
|
15
16
|
components: {
|
|
16
17
|
GlFilteredSearchToken,
|
|
17
18
|
GlFilteredSearchSuggestion,
|
|
19
|
+
GlIcon,
|
|
18
20
|
},
|
|
19
21
|
provide,
|
|
20
22
|
props: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { withKnobs, boolean } from '@storybook/addon-knobs';
|
|
2
2
|
import PortalVue from 'portal-vue';
|
|
3
3
|
import Vue from 'vue';
|
|
4
|
+
import { GlFilteredSearchSuggestion } from '../../../index';
|
|
4
5
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
5
6
|
import { provide } from './common_story_options';
|
|
6
7
|
import readme from './filtered_search_term.md';
|
|
@@ -18,6 +19,7 @@ documentedStoriesOf('base/filtered-search/token-segment', readme)
|
|
|
18
19
|
.add('default', () => ({
|
|
19
20
|
components: {
|
|
20
21
|
GlFilteredSearchTokenSegment,
|
|
22
|
+
GlFilteredSearchSuggestion,
|
|
21
23
|
},
|
|
22
24
|
provide,
|
|
23
25
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs, text, select, boolean } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../../documentation/documented_stories';
|
|
3
|
-
import { GlFormGroup } from '
|
|
3
|
+
import { GlFormGroup, GlFormInput, GlFormTextarea } from '../../../../index';
|
|
4
4
|
import { sizeOptions } from '../../../../utils/constants';
|
|
5
5
|
import readme from './form_group.md';
|
|
6
6
|
|
|
@@ -57,7 +57,7 @@ documentedStoriesOf('base/form/form-group', readme)
|
|
|
57
57
|
.addDecorator(withKnobs)
|
|
58
58
|
.add('default', () => ({
|
|
59
59
|
props: generateProps(),
|
|
60
|
-
components,
|
|
60
|
+
components: { ...components, GlFormInput },
|
|
61
61
|
template: `
|
|
62
62
|
<gl-form-group
|
|
63
63
|
:id="id"
|
|
@@ -75,7 +75,7 @@ documentedStoriesOf('base/form/form-group', readme)
|
|
|
75
75
|
}))
|
|
76
76
|
.add('disabled', () => ({
|
|
77
77
|
props: generateProps(),
|
|
78
|
-
components,
|
|
78
|
+
components: { ...components, GlFormInput },
|
|
79
79
|
template: `
|
|
80
80
|
<gl-form-group
|
|
81
81
|
id="group-id"
|
|
@@ -91,6 +91,7 @@ documentedStoriesOf('base/form/form-group', readme)
|
|
|
91
91
|
`,
|
|
92
92
|
}))
|
|
93
93
|
.add('with textarea', () => ({
|
|
94
|
+
components: { ...components, GlFormTextarea },
|
|
94
95
|
props: generateProps({ optional: true }),
|
|
95
96
|
template: `
|
|
96
97
|
<gl-form-group
|
|
@@ -106,7 +107,7 @@ documentedStoriesOf('base/form/form-group', readme)
|
|
|
106
107
|
}))
|
|
107
108
|
.add('with label description', () => ({
|
|
108
109
|
props: generateProps({ optional: true }),
|
|
109
|
-
components,
|
|
110
|
+
components: { ...components, GlFormInput },
|
|
110
111
|
template: `
|
|
111
112
|
<gl-form-group
|
|
112
113
|
:id="id"
|
|
@@ -125,7 +126,7 @@ documentedStoriesOf('base/form/form-group', readme)
|
|
|
125
126
|
}))
|
|
126
127
|
.add('with validations', () => ({
|
|
127
128
|
props: generateProps({ label: 'Name', description: 'Enter a first and last name.' }),
|
|
128
|
-
components,
|
|
129
|
+
components: { ...components, GlFormInput },
|
|
129
130
|
computed: {
|
|
130
131
|
state() {
|
|
131
132
|
return this.name.length >= 4;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs, boolean, object, text } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../../documentation/documented_stories';
|
|
3
|
-
import { GlFormInputGroup, GlInputGroupText } from '
|
|
3
|
+
import { GlFormInputGroup, GlInputGroupText } from '../../../../index';
|
|
4
4
|
import readme from './form_input_group.md';
|
|
5
5
|
|
|
6
6
|
const components = {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { withKnobs, object, text } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../../documentation/documented_stories';
|
|
3
|
-
import { GlFormRadioGroup } from '
|
|
3
|
+
import { GlFormRadioGroup, GlFormRadio } from '../../../../index';
|
|
4
4
|
import readme from './form_radio_group.md';
|
|
5
5
|
|
|
6
6
|
const components = {
|
|
7
7
|
GlFormRadioGroup,
|
|
8
|
+
GlFormRadio,
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
const defaultOptions = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlFormSelect } from '
|
|
1
|
+
import { GlFormSelect } from '../../../../index';
|
|
2
2
|
import { sizeOptions, formStateOptions } from '../../../../utils/constants';
|
|
3
3
|
import { formSelectOptions } from './constants';
|
|
4
4
|
import readme from './form_select.md';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlLoadingIcon } from '
|
|
1
|
+
import { GlLoadingIcon } from '../../../index';
|
|
2
2
|
import { viewModeOptions, loadingIconSizes } from '../../../utils/constants';
|
|
3
3
|
import readme from './loading_icon.md';
|
|
4
4
|
|
|
@@ -23,6 +23,7 @@ const generateProps = () => ({
|
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
const Template = (args) => ({
|
|
26
|
+
components: { GlLoadingIcon },
|
|
26
27
|
props: Object.keys(args),
|
|
27
28
|
template,
|
|
28
29
|
});
|
|
@@ -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
|
+
};
|