@gitlab/ui 33.1.1 → 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.
Files changed (79) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/components/base/accordion/accordion.js +6 -2
  3. package/dist/components/base/accordion/accordion_item.js +2 -2
  4. package/dist/components/base/avatars_inline/avatars_inline.documentation.js +1 -1
  5. package/dist/components/base/avatars_inline/avatars_inline.js +5 -1
  6. package/dist/components/base/nav/nav.documentation.js +2 -7
  7. package/dist/components/base/tabs/tabs/tabs.documentation.js +1 -1
  8. package/dist/components/base/tabs/tabs/tabs.js +2 -12
  9. package/dist/components/utilities/truncate/truncate.documentation.js +2 -17
  10. package/dist/components/utilities/truncate/truncate.js +11 -0
  11. package/dist/index.css +1 -1
  12. package/dist/index.css.map +1 -1
  13. package/dist/utility_classes.css +1 -1
  14. package/dist/utility_classes.css.map +1 -1
  15. package/documentation/components_documentation.js +0 -2
  16. package/documentation/documented_stories.js +4 -0
  17. package/package.json +13 -13
  18. package/src/components/base/accordion/accordion.vue +5 -2
  19. package/src/components/base/accordion/accordion_item.spec.js +2 -2
  20. package/src/components/base/accordion/accordion_item.stories.js +2 -2
  21. package/src/components/base/accordion/accordion_item.vue +2 -2
  22. package/src/components/base/avatar/avatar.stories.js +8 -0
  23. package/src/components/base/avatar_labeled/avatar_labeled.stories.js +7 -0
  24. package/src/components/base/avatar_link/avatar_link.stories.js +7 -0
  25. package/src/components/base/avatars_inline/avatars_inline.md +5 -0
  26. package/src/components/base/avatars_inline/avatars_inline.spec.js +21 -1
  27. package/src/components/base/avatars_inline/avatars_inline.stories.js +23 -9
  28. package/src/components/base/avatars_inline/avatars_inline.vue +11 -1
  29. package/src/components/base/badge/badge.stories.js +114 -9
  30. package/src/components/base/broadcast_message/broadcast_message.stories.js +2 -2
  31. package/src/components/base/button/button.stories.js +11 -11
  32. package/src/components/base/dropdown/dropdown.stories.js +4 -2
  33. package/src/components/base/filtered_search/filtered_search.stories.js +11 -1
  34. package/src/components/base/filtered_search/filtered_search_suggestion.stories.js +2 -0
  35. package/src/components/base/filtered_search/filtered_search_suggestion_list.stories.js +2 -0
  36. package/src/components/base/filtered_search/filtered_search_token.stories.js +2 -0
  37. package/src/components/base/filtered_search/filtered_search_token_segment.stories.js +2 -0
  38. package/src/components/base/form/form_group/form_group.stories.js +6 -5
  39. package/src/components/base/form/form_radio_group/form_radio_group.stories.js +2 -1
  40. package/src/components/base/loading_icon/loading_icon.stories.js +1 -0
  41. package/src/components/base/modal/modal.scss +5 -2
  42. package/src/components/base/nav/nav.documentation.js +0 -4
  43. package/src/components/base/nav/nav.md +8 -5
  44. package/src/components/base/nav/nav.stories.js +52 -15
  45. package/src/components/base/pagination/pagination.stories.js +7 -0
  46. package/src/components/base/path/path.stories.js +2 -2
  47. package/src/components/base/popover/popover.stories.js +6 -0
  48. package/src/components/base/table/table.stories.js +6 -1
  49. package/src/components/base/tabs/tabs/scrollable_tabs.spec.js +0 -1
  50. package/src/components/base/tabs/tabs/tabs.md +2 -2
  51. package/src/components/base/tabs/tabs/tabs.scss +3 -115
  52. package/src/components/base/tabs/tabs/tabs.spec.js +7 -4
  53. package/src/components/base/tabs/tabs/tabs.stories.js +8 -12
  54. package/src/components/base/tabs/tabs/tabs.vue +2 -11
  55. package/src/components/base/toast/toast.stories.js +6 -4
  56. package/src/components/base/token/token.stories.js +2 -2
  57. package/src/components/base/tooltip/tooltip.stories.js +2 -1
  58. package/src/components/utilities/truncate/truncate.documentation.js +0 -14
  59. package/src/components/utilities/truncate/truncate.md +0 -4
  60. package/src/components/utilities/truncate/truncate.stories.js +37 -26
  61. package/src/components/utilities/truncate/truncate.vue +9 -0
  62. package/src/scss/utilities.scss +8 -0
  63. package/src/scss/utility-mixins/box-shadow.scss +4 -0
  64. package/dist/components/base/nav/examples/index.js +0 -13
  65. package/dist/components/base/nav/examples/nav.basic.example.js +0 -38
  66. package/dist/components/base/nav/nav_item.documentation.js +0 -13
  67. package/dist/components/base/nav/nav_item_dropdown.documentation.js +0 -14
  68. package/dist/components/utilities/truncate/examples/index.js +0 -13
  69. package/dist/components/utilities/truncate/examples/truncate.basic.example.js +0 -38
  70. package/src/components/base/nav/examples/index.js +0 -15
  71. package/src/components/base/nav/examples/nav.basic.example.vue +0 -8
  72. package/src/components/base/nav/nav_item.documentation.js +0 -6
  73. package/src/components/base/nav/nav_item.md +0 -7
  74. package/src/components/base/nav/nav_item.stories.js +0 -23
  75. package/src/components/base/nav/nav_item_dropdown.documentation.js +0 -7
  76. package/src/components/base/nav/nav_item_dropdown.md +0 -7
  77. package/src/components/base/nav/nav_item_dropdown.stories.js +0 -51
  78. package/src/components/utilities/truncate/examples/index.js +0 -15
  79. package/src/components/utilities/truncate/examples/truncate.basic.example.vue +0 -5
@@ -1,4 +1,4 @@
1
- import { GlButton } from '../../../../index';
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
@@ -9,6 +9,8 @@ import {
9
9
  GlDropdownItem,
10
10
  GlDropdownText,
11
11
  GlDropdownForm,
12
+ GlButton,
13
+ GlSearchBoxByType,
12
14
  } from '../../../../index';
13
15
  import {
14
16
  buttonCategoryOptions,
@@ -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,13 @@
1
1
  import { withKnobs } from '@storybook/addon-knobs';
2
2
  import { documentedStoriesOf } from '../../../../documentation/documented_stories';
3
- import { GlFilteredSearch, GlFilteredSearchToken } from '../../../../index';
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 '../../../../../index';
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,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 '../../../../../index';
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 = [
@@ -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-pr-3;
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-bg-gray-10;
83
+ @include gl-pt-3;
84
+ @include gl-border-none;
82
85
 
83
86
  .btn {
84
87
  @include gl-m-0;
@@ -1,9 +1,5 @@
1
- import examples from './examples';
2
1
  import * as description from './nav.md';
3
2
 
4
3
  export default {
5
4
  description,
6
- examples,
7
- bootstrapComponent: 'b-nav',
8
- propsInfo: {},
9
5
  };
@@ -1,8 +1,11 @@
1
- # Nav
1
+ The navigation component is built with flexbox and provides a strong foundation for building all
2
+ types of navigation components.
2
3
 
3
- <!-- STORY -->
4
+ ## `GlNavItem`
4
5
 
5
- ## Usage
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
- The navigation component is built with flexbox and provides a strong foundation for building all
8
- types of navigation components.
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 { withKnobs } from '@storybook/addon-knobs';
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
- documentedStoriesOf('base/nav', readme)
12
- .addDecorator(withKnobs)
13
- .add('default', () => ({
14
- components,
15
- template: `
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>Another Link</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
+ };
@@ -2,6 +2,8 @@ import { alignOptions } from '../../../utils/constants';
2
2
  import readme from './pagination.md';
3
3
  import GlPagination from './pagination.vue';
4
4
 
5
+ const components = { GlPagination };
6
+
5
7
  const generateBaseProps = ({ prevText = 'Prev', nextText = 'Next', disabled = false } = {}) => ({
6
8
  prevText,
7
9
  nextText,
@@ -30,6 +32,7 @@ const defaults = {
30
32
  };
31
33
 
32
34
  export const Default = (args, { argTypes }) => ({
35
+ components,
33
36
  props: Object.keys(argTypes),
34
37
  ...defaults,
35
38
  template: `<gl-pagination
@@ -44,6 +47,7 @@ export const Default = (args, { argTypes }) => ({
44
47
  Default.args = generateFullProps();
45
48
 
46
49
  export const Compact = () => ({
50
+ components,
47
51
  ...defaults,
48
52
  props: generateFullProps(),
49
53
  data() {
@@ -77,6 +81,7 @@ export const Compact = () => ({
77
81
  });
78
82
 
79
83
  export const LinkBased = (args, { argTypes }) => ({
84
+ components,
80
85
  props: Object.keys(argTypes),
81
86
  ...defaults,
82
87
  methods: {
@@ -97,6 +102,7 @@ export const LinkBased = (args, { argTypes }) => ({
97
102
  LinkBased.args = generateFullProps();
98
103
 
99
104
  export const AlignCenter = (args, { argTypes }) => ({
105
+ components,
100
106
  props: Object.keys(argTypes),
101
107
  ...defaults,
102
108
  template: `<gl-pagination
@@ -112,6 +118,7 @@ export const AlignCenter = (args, { argTypes }) => ({
112
118
  AlignCenter.args = generateFullProps();
113
119
 
114
120
  export const AlignRight = (args, { argTypes }) => ({
121
+ components,
115
122
  props: Object.keys(argTypes),
116
123
  ...defaults,
117
124
  template: `<gl-pagination
@@ -1,4 +1,4 @@
1
- import { GlPath } from '../../../../index';
1
+ import { GlPath, GlPopover } from '../../../../index';
2
2
  import { glThemes } from '../../../utils/constants';
3
3
  import { mockPathItems } from './data';
4
4
  import readme from './path.md';
@@ -28,7 +28,7 @@ export const Default = (args, { argTypes }) => ({
28
28
  Default.args = generateProps();
29
29
 
30
30
  export const WithPopovers = (args, { argTypes }) => ({
31
- components: { GlPath },
31
+ components: { GlPath, GlPopover },
32
32
  props: Object.keys(argTypes),
33
33
  template: template(`
34
34
  <template #default="{ pathItem, pathId }">
@@ -1,7 +1,10 @@
1
1
  import { withKnobs, select, text } from '@storybook/addon-knobs';
2
+ import { GlPopover, GlButton } from '../../../../index';
2
3
  import { documentedStoriesOf } from '../../../../documentation/documented_stories';
3
4
  import { popoverPlacements } from '../../../utils/constants';
4
5
 
6
+ const components = { GlPopover, GlButton };
7
+
5
8
  const contentString = `
6
9
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent volutpat a nisi non
7
10
  pellentesque. Pellentesque efficitur vulputate rutrum. Fusce nisl magna, porttitor in
@@ -57,10 +60,12 @@ function generateProps({ placement = popoverPlacements.top, title = 'Popover', t
57
60
  documentedStoriesOf('base/popover', '')
58
61
  .addDecorator(withKnobs)
59
62
  .add('default', () => ({
63
+ components,
60
64
  template,
61
65
  props: generateProps(),
62
66
  }))
63
67
  .add('with close button', () => ({
68
+ components,
64
69
  template: `
65
70
  <div class="gl-display-flex gl-justify-content-center gl-p-6">
66
71
  <gl-button id="pop-with-close-button">{{placement}}</gl-button>
@@ -81,6 +86,7 @@ documentedStoriesOf('base/popover', '')
81
86
  .add(
82
87
  'on click',
83
88
  () => ({
89
+ components,
84
90
  template: scopedSlotTemplate,
85
91
  props: generateProps(),
86
92
  }),
@@ -1,6 +1,8 @@
1
- import { GlTable } from '../../../../index';
1
+ import { GlTable, GlFormInput } from '../../../../index';
2
2
  import readme from './table.md';
3
3
 
4
+ const components = { GlTable };
5
+
4
6
  const tableItems = [
5
7
  {
6
8
  column_one: 'test',
@@ -23,6 +25,7 @@ const generateProps = ({ fixed = false, footClone = false, stacked = false } = {
23
25
  });
24
26
 
25
27
  export const Default = (args, { argTypes }) => ({
28
+ components,
26
29
  props: Object.keys(argTypes),
27
30
  template: `
28
31
  <gl-table
@@ -55,6 +58,7 @@ export const Default = (args, { argTypes }) => ({
55
58
  Default.args = generateProps();
56
59
 
57
60
  export const Empty = (args, { argTypes }) => ({
61
+ components,
58
62
  props: Object.keys(argTypes),
59
63
  template: `
60
64
  <gl-table show-empty />
@@ -63,6 +67,7 @@ export const Empty = (args, { argTypes }) => ({
63
67
  Empty.parameters = { controls: { disable: true } };
64
68
 
65
69
  export const WithFilter = (args, { argTypes }) => ({
70
+ components: { ...components, GlFormInput },
66
71
  props: Object.keys(argTypes),
67
72
  template: `<div class="gl-line-height-normal">
68
73
  <gl-form-input v-model="filter" placeholder="Type to search" />
@@ -13,7 +13,6 @@ const TEST_ACTION = {
13
13
  text: 'Lorem ipsum',
14
14
  };
15
15
  const TEST_DEFAULT_PROPS = {
16
- theme: 'red',
17
16
  contentClass: 'gl-test-content-class',
18
17
  navClass: 'gl-test-nav-class',
19
18
  };
@@ -10,7 +10,7 @@ tab, when active, will reveal it’s own unique content.
10
10
  ## Using the component Vue
11
11
 
12
12
  ~~~js
13
- <gl-tabs theme="indigo">
13
+ <gl-tabs>
14
14
  <gl-tab title="Tab 1">
15
15
  Tab panel 1
16
16
  </gl-tab>
@@ -75,7 +75,7 @@ component. This is a separate Vue component because of some limitations:
75
75
  exceptions).
76
76
 
77
77
  ~~~html
78
- <gl-scrollable-tabs theme="indigo">
78
+ <gl-scrollable-tabs>
79
79
  <gl-tab v-for="tab in tabs" :key="tab.key" :title="tab.title"> {{ tab.content }} </gl-tab>
80
80
  </gl-scrollable-tabs>
81
81
  ~~~