@gitlab/ui 35.1.0 → 36.3.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 +35 -0
- package/dist/components/base/filtered_search/filtered_search.documentation.js +6 -0
- package/dist/components/base/filtered_search/filtered_search.js +12 -2
- package/dist/components/base/filtered_search/filtered_search_term.documentation.js +6 -0
- package/dist/components/base/filtered_search/filtered_search_term.js +11 -1
- package/dist/components/base/filtered_search/filtered_search_token_segment.documentation.js +6 -0
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +11 -1
- package/dist/components/base/popover/popover.documentation.js +1 -23
- package/dist/components/base/popover/popover.js +10 -0
- package/dist/components/base/search_box_by_click/search_box_by_click.documentation.js +3 -0
- package/dist/components/base/search_box_by_click/search_box_by_click.js +6 -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/documented_stories.js +1 -0
- package/package.json +4 -7
- package/src/charts.js +19 -0
- package/src/components/base/alert/alert.stories.js +1 -1
- package/src/components/base/avatar/avatar.stories.js +1 -1
- package/src/components/base/avatar_labeled/avatar_labeled.stories.js +1 -1
- package/src/components/base/avatar_link/avatar_link.stories.js +1 -1
- package/src/components/base/avatars_inline/avatars_inline.stories.js +1 -1
- package/src/components/base/badge/badge.stories.js +1 -1
- 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 +1 -1
- package/src/components/base/button/button.stories.js +1 -1
- 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 +1 -1
- 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.documentation.js +6 -0
- package/src/components/base/filtered_search/filtered_search.spec.js +81 -47
- package/src/components/base/filtered_search/filtered_search.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search.vue +13 -0
- package/src/components/base/filtered_search/filtered_search_suggestion.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search_suggestion_list.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search_term.documentation.js +6 -0
- package/src/components/base/filtered_search/filtered_search_term.spec.js +42 -9
- package/src/components/base/filtered_search/filtered_search_term.vue +13 -0
- package/src/components/base/filtered_search/filtered_search_token.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search_token_segment.documentation.js +6 -0
- package/src/components/base/filtered_search/filtered_search_token_segment.spec.js +53 -0
- package/src/components/base/filtered_search/filtered_search_token_segment.stories.js +1 -1
- package/src/components/base/filtered_search/filtered_search_token_segment.vue +12 -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 +1 -1
- 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 +1 -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 +1 -1
- package/src/components/base/modal/modal.stories.js +1 -1
- package/src/components/base/nav/nav.stories.js +1 -1
- 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/path/path.stories.js +1 -1
- package/src/components/base/popover/popover.documentation.js +0 -25
- package/src/components/base/popover/popover.stories.js +79 -75
- package/src/components/base/popover/popover.vue +8 -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.documentation.js +3 -0
- package/src/components/base/search_box_by_click/search_box_by_click.spec.js +14 -3
- package/src/components/base/search_box_by_click/search_box_by_click.stories.js +1 -1
- package/src/components/base/search_box_by_click/search_box_by_click.vue +7 -0
- 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 +1 -1
- package/src/components/base/tabs/tabs/tabs.spec.js +1 -1
- package/src/components/base/tabs/tabs/tabs.stories.js +1 -1
- package/src/components/base/toast/toast.stories.js +1 -1
- package/src/components/base/toggle/toggle.stories.js +1 -1
- package/src/components/base/token/token.stories.js +1 -1
- package/src/components/base/tooltip/tooltip.stories.js +1 -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.stories.js +1 -1
- 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 +20 -0
- package/src/scss/utility-mixins/color.scss +4 -0
- package/src/scss/utility-mixins/spacing.scss +6 -0
- package/{utils.js → src/utils.js} +1 -1
- package/charts.js +0 -19
- package/dist/components/base/popover/examples/index.js +0 -25
- package/dist/components/base/popover/examples/popover.basic.example.js +0 -38
- package/dist/components/base/popover/examples/popover.loading.example.js +0 -38
- package/dist/components/base/popover/examples/popover.notitle.example.js +0 -38
- package/index.js +0 -111
- package/src/components/base/popover/examples/index.js +0 -29
- package/src/components/base/popover/examples/popover.basic.example.vue +0 -13
- package/src/components/base/popover/examples/popover.loading.example.vue +0 -15
- package/src/components/base/popover/examples/popover.notitle.example.vue +0 -12
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GlPopover, GlButton } from '../../../../index';
|
|
3
|
-
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
1
|
+
import { GlPopover, GlButton } from '../../../index';
|
|
4
2
|
import { popoverPlacements } from '../../../utils/constants';
|
|
5
3
|
|
|
4
|
+
const defaultValue = (prop) => GlPopover.props[prop].default;
|
|
5
|
+
|
|
6
6
|
const components = { GlPopover, GlButton };
|
|
7
7
|
|
|
8
8
|
const contentString = `
|
|
@@ -11,84 +11,88 @@ const contentString = `
|
|
|
11
11
|
massa ac, porta condimentum libero. Ut id lacus tristique, egestas arcu non, molestie nisi.
|
|
12
12
|
`;
|
|
13
13
|
|
|
14
|
-
const
|
|
15
|
-
<div class="gl-display-flex gl-justify-content-center gl-
|
|
16
|
-
<gl-button id="
|
|
17
|
-
<gl-popover
|
|
18
|
-
|
|
14
|
+
const getTemplate = (id, slots = '') => `
|
|
15
|
+
<div style="height:400px;" class="gl-display-flex gl-justify-content-center gl-align-items-center">
|
|
16
|
+
<gl-button id="${id}">{{placement}}</gl-button>
|
|
17
|
+
<gl-popover
|
|
18
|
+
target="${id}"
|
|
19
|
+
:triggers="triggers"
|
|
19
20
|
:title="title"
|
|
20
21
|
:placement="placement"
|
|
22
|
+
:show-close-button="showCloseButton"
|
|
21
23
|
content="${contentString}"
|
|
22
|
-
data-testid="
|
|
23
|
-
show
|
|
24
|
-
|
|
25
|
-
</div>
|
|
26
|
-
`;
|
|
24
|
+
data-testid="${id}"
|
|
25
|
+
:show="$options.viewMode !== 'docs'">${slots}</gl-popover>
|
|
26
|
+
</div>`;
|
|
27
27
|
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
const generateProps = ({
|
|
29
|
+
placement = popoverPlacements.top,
|
|
30
|
+
title = 'Popover',
|
|
31
|
+
triggers = defaultValue('triggers'),
|
|
32
|
+
cssClasses = defaultValue('cssClasses'),
|
|
33
|
+
showCloseButton = defaultValue('showCloseButton'),
|
|
34
|
+
} = {}) => ({
|
|
35
|
+
placement,
|
|
36
|
+
title,
|
|
37
|
+
triggers,
|
|
38
|
+
cssClasses,
|
|
39
|
+
showCloseButton,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export const Default = (_args, { viewMode, argTypes }) => ({
|
|
43
|
+
viewMode,
|
|
44
|
+
components,
|
|
45
|
+
props: Object.keys(argTypes),
|
|
46
|
+
template: getTemplate('popover-with-props'),
|
|
47
|
+
});
|
|
48
|
+
Default.args = generateProps();
|
|
42
49
|
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
export const WithCloseButton = (_args, { viewMode, argTypes }) => ({
|
|
51
|
+
viewMode,
|
|
52
|
+
components,
|
|
53
|
+
props: Object.keys(argTypes),
|
|
54
|
+
template: getTemplate('popover-with-close-button'),
|
|
55
|
+
});
|
|
56
|
+
WithCloseButton.args = generateProps({
|
|
57
|
+
showCloseButton: true,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export const OnClick = (_args, { viewMode, argTypes }) => ({
|
|
61
|
+
viewMode,
|
|
62
|
+
components,
|
|
63
|
+
props: Object.keys(argTypes),
|
|
64
|
+
template: getTemplate(
|
|
65
|
+
'popover-button-click',
|
|
66
|
+
`
|
|
67
|
+
<template #title>
|
|
68
|
+
<span data-testid="popover-title">Popover title</span>
|
|
69
|
+
</template>
|
|
70
|
+
`
|
|
71
|
+
),
|
|
72
|
+
});
|
|
73
|
+
OnClick.args = generateProps({
|
|
74
|
+
triggers: 'click',
|
|
75
|
+
});
|
|
76
|
+
OnClick.parameters = {
|
|
77
|
+
storyshots: { disable: true },
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export default {
|
|
81
|
+
title: 'base/popover',
|
|
82
|
+
component: GlPopover,
|
|
83
|
+
parameters: {
|
|
84
|
+
knobs: { disable: true },
|
|
85
|
+
bootstrapComponent: 'b-popover',
|
|
86
|
+
},
|
|
87
|
+
argTypes: {
|
|
45
88
|
placement: {
|
|
46
|
-
|
|
47
|
-
|
|
89
|
+
options: Object.values(popoverPlacements),
|
|
90
|
+
control: {
|
|
91
|
+
type: 'select',
|
|
92
|
+
},
|
|
48
93
|
},
|
|
49
94
|
title: {
|
|
50
|
-
type:
|
|
51
|
-
default: text('title', title),
|
|
95
|
+
control: { type: 'text' },
|
|
52
96
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
default: text('hover focus', triggers),
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
documentedStoriesOf('base/popover', '')
|
|
61
|
-
.addDecorator(withKnobs)
|
|
62
|
-
.add('default', () => ({
|
|
63
|
-
components,
|
|
64
|
-
template,
|
|
65
|
-
props: generateProps(),
|
|
66
|
-
}))
|
|
67
|
-
.add('with close button', () => ({
|
|
68
|
-
components,
|
|
69
|
-
template: `
|
|
70
|
-
<div class="gl-display-flex gl-justify-content-center gl-p-6">
|
|
71
|
-
<gl-button id="pop-with-close-button">{{placement}}</gl-button>
|
|
72
|
-
<gl-popover
|
|
73
|
-
target="pop-with-close-button"
|
|
74
|
-
data-testid="popover-with-close-button"
|
|
75
|
-
triggers="hover focus"
|
|
76
|
-
:title="title"
|
|
77
|
-
:placement="placement"
|
|
78
|
-
content="${contentString}"
|
|
79
|
-
show
|
|
80
|
-
show-close-button
|
|
81
|
-
/>
|
|
82
|
-
</div>
|
|
83
|
-
`,
|
|
84
|
-
props: generateProps(),
|
|
85
|
-
}))
|
|
86
|
-
.add(
|
|
87
|
-
'on click',
|
|
88
|
-
() => ({
|
|
89
|
-
components,
|
|
90
|
-
template: scopedSlotTemplate,
|
|
91
|
-
props: generateProps(),
|
|
92
|
-
}),
|
|
93
|
-
{ storyshots: false }
|
|
94
|
-
);
|
|
97
|
+
},
|
|
98
|
+
};
|
|
@@ -18,6 +18,11 @@ export default {
|
|
|
18
18
|
required: false,
|
|
19
19
|
default: () => [],
|
|
20
20
|
},
|
|
21
|
+
/**
|
|
22
|
+
* Space-separated triggers for the popover.
|
|
23
|
+
*
|
|
24
|
+
* @values click, hover, focus, manual
|
|
25
|
+
*/
|
|
21
26
|
triggers: {
|
|
22
27
|
type: String,
|
|
23
28
|
required: false,
|
|
@@ -45,6 +50,9 @@ export default {
|
|
|
45
50
|
methods: {
|
|
46
51
|
close(e) {
|
|
47
52
|
this.$refs[popoverRefName].doClose();
|
|
53
|
+
/**
|
|
54
|
+
* Emitted when the close button is clicked (requires showCloseButton to be `true`).
|
|
55
|
+
*/
|
|
48
56
|
this.$emit('close-button-clicked', e);
|
|
49
57
|
},
|
|
50
58
|
},
|
|
@@ -52,6 +52,9 @@ export default {
|
|
|
52
52
|
additionalInfo:
|
|
53
53
|
'Container for tooltip. Valid values: DOM node, selector string or `false` for default',
|
|
54
54
|
},
|
|
55
|
+
searchButtonAttributes: {
|
|
56
|
+
additionalInfo: 'HTML attributes to add to the search button',
|
|
57
|
+
},
|
|
55
58
|
},
|
|
56
59
|
events: [
|
|
57
60
|
{
|
|
@@ -25,6 +25,7 @@ describe('search box by click component', () => {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const findClearIcon = () => wrapper.findComponent(ClearIcon);
|
|
28
|
+
const findSearchButton = () => wrapper.find('[data-testid="search-button"]');
|
|
28
29
|
|
|
29
30
|
it('emits input event when input changes', async () => {
|
|
30
31
|
createComponent({ value: 'somevalue' });
|
|
@@ -125,8 +126,8 @@ describe('search box by click component', () => {
|
|
|
125
126
|
});
|
|
126
127
|
|
|
127
128
|
it('displays disabled search button', () => {
|
|
128
|
-
expect(
|
|
129
|
-
expect(
|
|
129
|
+
expect(findSearchButton().exists()).toBe(true);
|
|
130
|
+
expect(findSearchButton().attributes('disabled')).toBe('true');
|
|
130
131
|
});
|
|
131
132
|
|
|
132
133
|
it('does not render clear icon even with value', () => {
|
|
@@ -145,9 +146,19 @@ describe('search box by click component', () => {
|
|
|
145
146
|
|
|
146
147
|
it('emits submit event when search button is pressed', async () => {
|
|
147
148
|
createComponent({ value: 'some-input' });
|
|
148
|
-
|
|
149
|
+
findSearchButton().vm.$emit('click');
|
|
149
150
|
|
|
150
151
|
await wrapper.vm.$nextTick();
|
|
151
152
|
expect(wrapper.emitted().submit[0]).toEqual(['some-input']);
|
|
152
153
|
});
|
|
154
|
+
|
|
155
|
+
it('adds `searchButtonAttributes` prop to search button', () => {
|
|
156
|
+
const searchButtonAttributes = { 'data-qa-selector': 'foo-bar' };
|
|
157
|
+
|
|
158
|
+
createComponent({ searchButtonAttributes });
|
|
159
|
+
|
|
160
|
+
expect(findSearchButton().attributes('data-qa-selector')).toBe(
|
|
161
|
+
searchButtonAttributes['data-qa-selector']
|
|
162
|
+
);
|
|
163
|
+
});
|
|
153
164
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs, boolean, text } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlSearchBoxByClick } from '
|
|
3
|
+
import { GlSearchBoxByClick } from '../../../index';
|
|
4
4
|
import readme from './search_box_by_click.md';
|
|
5
5
|
|
|
6
6
|
const components = {
|
|
@@ -84,6 +84,11 @@ export default {
|
|
|
84
84
|
validator: (value) =>
|
|
85
85
|
value === false || typeof value === 'string' || value instanceof HTMLElement,
|
|
86
86
|
},
|
|
87
|
+
searchButtonAttributes: {
|
|
88
|
+
type: Object,
|
|
89
|
+
required: false,
|
|
90
|
+
default: () => ({}),
|
|
91
|
+
},
|
|
87
92
|
},
|
|
88
93
|
data() {
|
|
89
94
|
return {
|
|
@@ -216,11 +221,13 @@ export default {
|
|
|
216
221
|
/>
|
|
217
222
|
<template #append class="gl-search-box-by-click-input-group-control">
|
|
218
223
|
<gl-button
|
|
224
|
+
v-bind="searchButtonAttributes"
|
|
219
225
|
ref="searchButton"
|
|
220
226
|
class="gl-search-box-by-click-search-button"
|
|
221
227
|
icon="search"
|
|
222
228
|
:disabled="disabled"
|
|
223
229
|
aria-label="Search"
|
|
230
|
+
data-testid="search-button"
|
|
224
231
|
@click="search(currentValue)"
|
|
225
232
|
/>
|
|
226
233
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs, boolean, text } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
|
-
import { GlSearchBoxByType } from '
|
|
3
|
+
import { GlSearchBoxByType } from '../../../index';
|
|
4
4
|
import readme from './search_box_by_type.md';
|
|
5
5
|
|
|
6
6
|
const components = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mount } from '@vue/test-utils';
|
|
2
2
|
import { nextTick } from 'vue';
|
|
3
|
-
import { GlButton } from '
|
|
3
|
+
import { GlButton } from '../../../../index';
|
|
4
4
|
import { tabsButtonDefaults } from '../../../../utils/constants';
|
|
5
5
|
import GlTab from '../tab/tab.vue';
|
|
6
6
|
import GlTabs from './tabs.vue';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { withKnobs, boolean } from '@storybook/addon-knobs';
|
|
2
2
|
import { range } from 'lodash';
|
|
3
3
|
import { documentedStoriesOf } from '../../../../../documentation/documented_stories';
|
|
4
|
-
import { GlTabs, GlTab, GlScrollableTabs } from '
|
|
4
|
+
import { GlTabs, GlTab, GlScrollableTabs } from '../../../../index';
|
|
5
5
|
import docs from './tabs.md';
|
|
6
6
|
|
|
7
7
|
const ScrollableTabsGenerator = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs, object, array, boolean } from '@storybook/addon-knobs';
|
|
2
2
|
import { times } from 'lodash';
|
|
3
|
-
import { GlAreaChart } from '
|
|
3
|
+
import { GlAreaChart } from '../../../charts';
|
|
4
4
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
5
5
|
import { mockAnnotationsSeries, mockAnnotationsConfigs } from '../../../utils/charts/mock_data';
|
|
6
6
|
import { toolbox } from '../../../utils/charts/story_config';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GlChart } from '
|
|
2
|
-
import { GlTabs, GlTab } from '
|
|
1
|
+
import { GlChart } from '../../../charts';
|
|
2
|
+
import { GlTabs, GlTab } from '../../../index';
|
|
3
3
|
import readme from './chart.md';
|
|
4
4
|
|
|
5
5
|
const Template = (args, { argTypes = {} }) => ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlHeatmap } from '
|
|
1
|
+
import { GlHeatmap } from '../../../charts';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
3
|
import { toolbox } from '../../../utils/charts/story_config';
|
|
4
4
|
import readme from '../area/area.md';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlChart, GlChartLegend } from '
|
|
1
|
+
import { GlChart, GlChartLegend } from '../../../charts';
|
|
2
2
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
3
3
|
import { LEGEND_LAYOUT_TABLE } from '../../../utils/charts/constants';
|
|
4
4
|
import { generateSeriesData } from '../../../utils/charts/story_config';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withKnobs, object, boolean, array } from '@storybook/addon-knobs';
|
|
2
|
-
import { GlLineChart } from '
|
|
2
|
+
import { GlLineChart } from '../../../charts';
|
|
3
3
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
4
4
|
import { mockAnnotationsSeries, mockAnnotationsConfigs } from '../../../utils/charts/mock_data';
|
|
5
5
|
import { toolbox } from '../../../utils/charts/story_config';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withKnobs, text } from '@storybook/addon-knobs';
|
|
2
|
-
import { GlChartSeriesLabel } from '
|
|
2
|
+
import { GlChartSeriesLabel } from '../../../charts';
|
|
3
3
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
4
4
|
import { colorPaletteDefault } from '../../../utils/charts/theme';
|
|
5
5
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import iconSpriteInfo from '@gitlab/svgs/dist/icons.json';
|
|
2
2
|
import { withKnobs, text, select, boolean, number } from '@storybook/addon-knobs';
|
|
3
|
-
import { GlSingleStat } from '
|
|
3
|
+
import { GlSingleStat } from '../../../charts';
|
|
4
4
|
import { documentedStoriesOf } from '../../../../documentation/documented_stories';
|
|
5
5
|
import { badgeVariantOptions } from '../../../utils/constants';
|
|
6
6
|
import readme from './single_stat.md';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { text } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../documentation/documented_stories';
|
|
3
|
-
import { GlHoverLoadDirective } from '
|
|
3
|
+
import { GlHoverLoadDirective } from '../../index';
|
|
4
4
|
import readme from './hover_load.md';
|
|
5
5
|
|
|
6
6
|
const directives = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withKnobs, select } from '@storybook/addon-knobs';
|
|
2
2
|
import { documentedStoriesOf } from '../../../documentation/documented_stories';
|
|
3
|
-
import { GlResizeObserverDirective } from '
|
|
3
|
+
import { GlResizeObserverDirective } from '../../index';
|
|
4
4
|
import readme from './resize_observer.md';
|
|
5
5
|
|
|
6
6
|
documentedStoriesOf('directives/resize-observer-directive', readme)
|
|
@@ -2,7 +2,7 @@ import { withKnobs, text } from '@storybook/addon-knobs';
|
|
|
2
2
|
import { sanitize } from 'dompurify';
|
|
3
3
|
import { escape } from 'lodash';
|
|
4
4
|
import { documentedStoriesOf } from '../../../documentation/documented_stories';
|
|
5
|
-
import { GlSafeHtmlDirective } from '
|
|
5
|
+
import { GlSafeHtmlDirective } from '../../index';
|
|
6
6
|
import readme from './safe_html.md';
|
|
7
7
|
|
|
8
8
|
documentedStoriesOf('directives/safe-html-directive', readme)
|