@gitlab/ui 38.1.0 → 38.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.
Files changed (94) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/components/base/dropdown/dropdown.documentation.js +1 -5
  3. package/dist/components/base/dropdown/dropdown_item.documentation.js +2 -3
  4. package/dist/components/base/filtered_search/filtered_search.js +13 -20
  5. package/dist/components/base/filtered_search/filtered_search_suggestion.js +1 -1
  6. package/dist/components/base/filtered_search/filtered_search_token.js +31 -23
  7. package/dist/components/base/filtered_search/filtered_search_utils.js +42 -9
  8. package/dist/components/base/form/form_checkbox_tree/form_checkbox_tree.documentation.js +2 -27
  9. package/dist/components/base/form/form_checkbox_tree/form_checkbox_tree.js +16 -1
  10. package/dist/index.css +1 -1
  11. package/dist/index.css.map +1 -1
  12. package/dist/utility_classes.css +1 -1
  13. package/dist/utility_classes.css.map +1 -1
  14. package/dist/utils/use_mock_intersection_observer.js +2 -2
  15. package/documentation/components_documentation.js +0 -4
  16. package/documentation/documented_stories.js +4 -1
  17. package/package.json +12 -12
  18. package/src/components/base/avatar_link/avatar_link.stories.js +2 -2
  19. package/src/components/base/dropdown/dropdown.documentation.js +0 -3
  20. package/src/components/base/dropdown/dropdown.md +7 -2
  21. package/src/components/base/dropdown/dropdown.stories.js +487 -439
  22. package/src/components/base/dropdown/dropdown_item.documentation.js +0 -1
  23. package/src/components/base/dropdown/dropdown_item.md +0 -6
  24. package/src/components/base/dropdown/dropdown_item.stories.js +107 -35
  25. package/src/components/base/filtered_search/filtered_search.spec.js +37 -12
  26. package/src/components/base/filtered_search/filtered_search.stories.js +15 -7
  27. package/src/components/base/filtered_search/filtered_search.vue +12 -14
  28. package/src/components/base/filtered_search/filtered_search_suggestion.vue +1 -0
  29. package/src/components/base/filtered_search/filtered_search_token.spec.js +31 -1
  30. package/src/components/base/filtered_search/filtered_search_token.stories.js +1 -0
  31. package/src/components/base/filtered_search/filtered_search_token.vue +30 -21
  32. package/src/components/base/filtered_search/filtered_search_utils.js +38 -5
  33. package/src/components/base/form/form.stories.js +2 -0
  34. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.documentation.js +0 -26
  35. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.md +0 -4
  36. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.stories.js +123 -92
  37. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.vue +13 -1
  38. package/src/components/base/form/form_radio_group/form_radio_group.stories.js +2 -1
  39. package/src/components/base/markdown/markdown.scss +21 -0
  40. package/src/components/base/markdown/markdown_typescale_demo.html +17 -6
  41. package/src/components/base/navbar/navbar.stories.js +2 -1
  42. package/src/components/base/skeleton_loader/skeleton_loader.stories.js +67 -21
  43. package/src/components/base/tabs/tabs/tabs.stories.js +2 -2
  44. package/src/scss/typescale/typescale.md +0 -2
  45. package/src/scss/typescale/typescale.stories.js +17 -4
  46. package/src/scss/utilities.scss +24 -0
  47. package/src/scss/utility-mixins/display.scss +12 -0
  48. package/src/utils/use_mock_intersection_observer.js +3 -3
  49. package/dist/components/base/dropdown/dropdown_divider.documentation.js +0 -8
  50. package/dist/components/base/dropdown/dropdown_form.documentation.js +0 -17
  51. package/dist/components/base/dropdown/dropdown_section_header.documentation.js +0 -8
  52. package/dist/components/base/dropdown/dropdown_text.documentation.js +0 -8
  53. package/dist/components/base/dropdown/examples/dropdown.default.example.js +0 -38
  54. package/dist/components/base/dropdown/examples/dropdown.links.example.js +0 -38
  55. package/dist/components/base/dropdown/examples/dropdown.with_avatar_and_secondary_text.example.js +0 -38
  56. package/dist/components/base/dropdown/examples/dropdown.with_checked_items.example.js +0 -38
  57. package/dist/components/base/dropdown/examples/dropdown.with_clear_all.example.js +0 -38
  58. package/dist/components/base/dropdown/examples/dropdown.with_divider.example.js +0 -38
  59. package/dist/components/base/dropdown/examples/dropdown.with_form.example.js +0 -38
  60. package/dist/components/base/dropdown/examples/dropdown.with_header.example.js +0 -38
  61. package/dist/components/base/dropdown/examples/dropdown.with_highlighted_items.example.js +0 -38
  62. package/dist/components/base/dropdown/examples/dropdown.with_icons.example.js +0 -38
  63. package/dist/components/base/dropdown/examples/dropdown.with_right_align.example.js +0 -38
  64. package/dist/components/base/dropdown/examples/dropdown.with_search.example.js +0 -67
  65. package/dist/components/base/dropdown/examples/dropdown.with_section_headers.example.js +0 -38
  66. package/dist/components/base/dropdown/examples/index.js +0 -85
  67. package/dist/components/base/form/form_checkbox_tree/examples/form_checkbox_tree.basic.example.js +0 -103
  68. package/dist/components/base/form/form_checkbox_tree/examples/index.js +0 -13
  69. package/src/components/base/dropdown/dropdown_divider.documentation.js +0 -6
  70. package/src/components/base/dropdown/dropdown_divider.md +0 -7
  71. package/src/components/base/dropdown/dropdown_divider.stories.js +0 -16
  72. package/src/components/base/dropdown/dropdown_form.documentation.js +0 -9
  73. package/src/components/base/dropdown/dropdown_form.md +0 -4
  74. package/src/components/base/dropdown/dropdown_form.stories.js +0 -17
  75. package/src/components/base/dropdown/dropdown_section_header.documentation.js +0 -6
  76. package/src/components/base/dropdown/dropdown_section_header.stories.js +0 -17
  77. package/src/components/base/dropdown/dropdown_text.documentation.js +0 -6
  78. package/src/components/base/dropdown/dropdown_text.stories.js +0 -16
  79. package/src/components/base/dropdown/examples/dropdown.default.example.vue +0 -7
  80. package/src/components/base/dropdown/examples/dropdown.links.example.vue +0 -7
  81. package/src/components/base/dropdown/examples/dropdown.with_avatar_and_secondary_text.example.vue +0 -7
  82. package/src/components/base/dropdown/examples/dropdown.with_checked_items.example.vue +0 -6
  83. package/src/components/base/dropdown/examples/dropdown.with_clear_all.example.vue +0 -7
  84. package/src/components/base/dropdown/examples/dropdown.with_divider.example.vue +0 -9
  85. package/src/components/base/dropdown/examples/dropdown.with_form.example.vue +0 -10
  86. package/src/components/base/dropdown/examples/dropdown.with_header.example.vue +0 -7
  87. package/src/components/base/dropdown/examples/dropdown.with_highlighted_items.example.vue +0 -9
  88. package/src/components/base/dropdown/examples/dropdown.with_icons.example.vue +0 -43
  89. package/src/components/base/dropdown/examples/dropdown.with_right_align.example.vue +0 -7
  90. package/src/components/base/dropdown/examples/dropdown.with_search.example.vue +0 -38
  91. package/src/components/base/dropdown/examples/dropdown.with_section_headers.example.vue +0 -10
  92. package/src/components/base/dropdown/examples/index.js +0 -99
  93. package/src/components/base/form/form_checkbox_tree/examples/form_checkbox_tree.basic.example.vue +0 -77
  94. package/src/components/base/form/form_checkbox_tree/examples/index.js +0 -15
@@ -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-dropdown',{attrs:{"text":"Some dropdown"}},[_c('gl-dropdown-item',{attrs:{"icon-color":"info","icon-name":"status_running","icon-right-name":"retry","icon-right-aria-label":"Retry"}},[_vm._v("\n Status running\n ")]),_vm._v(" "),_c('gl-dropdown-item',{attrs:{"icon-color":"success","icon-name":"status_success","icon-right-name":"cancel","icon-right-aria-label":"Cancel"}},[_vm._v("\n Status success\n ")]),_vm._v(" "),_c('gl-dropdown-item',{attrs:{"icon-color":"warning","icon-name":"status_warning","icon-right-name":"cancel","icon-right-aria-label":"Cancel"}},[_vm._v("\n Status warning\n ")]),_vm._v(" "),_c('gl-dropdown-item',{attrs:{"icon-color":"danger","icon-name":"status_failed","icon-right-name":"cancel","icon-right-aria-label":"Cancel"}},[_vm._v("\n Status failed\n ")]),_vm._v(" "),_c('gl-dropdown-item',{attrs:{"icon-name":"status_manual","icon-right-name":"cancel","icon-right-aria-label":"Cancel"}},[_vm._v("\n Status manual\n ")])],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,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-dropdown',{attrs:{"text":"Right-aligned dropdown","right":""}},[_c('gl-dropdown-item',[_vm._v("First item")]),_vm._v(" "),_c('gl-dropdown-item',[_vm._v("Second item")]),_vm._v(" "),_c('gl-dropdown-item',[_vm._v("Last item")])],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,67 +0,0 @@
1
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
-
3
- var script = {
4
- data() {
5
- return {
6
- searchTerm: '',
7
- tagNames: []
8
- };
9
- },
10
-
11
- computed: {
12
- filteredTagNames() {
13
- return this.tagNames.filter(tagName => tagName.includes(this.searchTerm.toLowerCase()));
14
- },
15
-
16
- filteredTagNamesLength() {
17
- return this.filteredTagNames.length === 0;
18
- }
19
-
20
- },
21
-
22
- mounted() {
23
- const tagNames = new Set();
24
- const elements = document.querySelectorAll('*');
25
- elements.forEach(element => tagNames.add(element.tagName.toLowerCase()));
26
- this.tagNames = Array.from(tagNames).sort();
27
- }
28
-
29
- };
30
-
31
- /* script */
32
- const __vue_script__ = script;
33
-
34
- /* template */
35
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-dropdown',{attrs:{"text":"Select HTML tag","header-text":"Header"},scopedSlots:_vm._u([{key:"header",fn:function(){return [_c('gl-search-box-by-type',{model:{value:(_vm.searchTerm),callback:function ($$v) {_vm.searchTerm=(typeof $$v === 'string'? $$v.trim(): $$v);},expression:"searchTerm"}})]},proxy:true}])},[_vm._v(" "),_vm._l((_vm.filteredTagNames),function(tagName){return _c('gl-dropdown-item',{key:tagName},[_vm._v("\n "+_vm._s(tagName)+"\n ")])}),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.filteredTagNamesLength),expression:"filteredTagNamesLength"}],staticClass:"text-secondary p-2"},[_vm._v("Nothing found…")])],2)};
36
- var __vue_staticRenderFns__ = [];
37
-
38
- /* style */
39
- const __vue_inject_styles__ = undefined;
40
- /* scoped */
41
- const __vue_scope_id__ = undefined;
42
- /* module identifier */
43
- const __vue_module_identifier__ = undefined;
44
- /* functional template */
45
- const __vue_is_functional_template__ = false;
46
- /* style inject */
47
-
48
- /* style inject SSR */
49
-
50
- /* style inject shadow dom */
51
-
52
-
53
-
54
- const __vue_component__ = __vue_normalize__(
55
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
56
- __vue_inject_styles__,
57
- __vue_script__,
58
- __vue_scope_id__,
59
- __vue_is_functional_template__,
60
- __vue_module_identifier__,
61
- false,
62
- undefined,
63
- undefined,
64
- undefined
65
- );
66
-
67
- export default __vue_component__;
@@ -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-dropdown',{attrs:{"text":"Some dropdown"}},[_c('gl-dropdown-section-header',[_vm._v("First group")]),_vm._v(" "),_c('gl-dropdown-item',[_vm._v("First item")]),_vm._v(" "),_c('gl-dropdown-item',[_vm._v("Second item")]),_vm._v(" "),_c('gl-dropdown-divider'),_vm._v(" "),_c('gl-dropdown-section-header',[_vm._v("Second group")]),_vm._v(" "),_c('gl-dropdown-item',[_vm._v("Last item")])],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,85 +0,0 @@
1
- import DropdownDefaultExample from './dropdown.default.example';
2
- import DropdownLinksExample from './dropdown.links.example';
3
- import DropdownWithAvatarAndSecondaryText from './dropdown.with_avatar_and_secondary_text.example';
4
- import DropdownWithCheckedItemsExample from './dropdown.with_checked_items.example';
5
- import DropdownClearAllExample from './dropdown.with_clear_all.example';
6
- import DropdownWithDividerExample from './dropdown.with_divider.example';
7
- import DropdownWithFormExample from './dropdown.with_form.example';
8
- import DropdownWithHeaderExample from './dropdown.with_header.example';
9
- import DropdownWithHighlightedItemsExample from './dropdown.with_highlighted_items.example';
10
- import DropdownWithIcons from './dropdown.with_icons.example';
11
- import DropdownWithRightAlignExample from './dropdown.with_right_align.example';
12
- import DropdownWithSearchExample from './dropdown.with_search.example';
13
- import DropdownWithSectionHeadersExample from './dropdown.with_section_headers.example';
14
-
15
- var index = [{
16
- name: 'Dropdown',
17
- items: [{
18
- id: 'new-dropdown-default',
19
- name: 'Default',
20
- description: 'Default Dropdown',
21
- component: DropdownDefaultExample
22
- }, {
23
- id: 'new-dropdown-links',
24
- name: 'With Links',
25
- description: 'Dropdown with links as items',
26
- component: DropdownLinksExample
27
- }, {
28
- id: 'new-dropdown-with-divider',
29
- name: 'With Divider',
30
- description: 'Dropdown with divider',
31
- component: DropdownWithDividerExample
32
- }, {
33
- id: 'new-dropdown-with-header',
34
- name: 'With Header',
35
- description: 'Dropdown with section header',
36
- component: DropdownWithHeaderExample
37
- }, {
38
- id: 'new-dropdown-with-highlighted-items',
39
- name: 'With Highlighted items',
40
- description: 'Dropdown with highlighted items',
41
- component: DropdownWithHighlightedItemsExample
42
- }, {
43
- id: 'new-dropdown-with-section-headers',
44
- name: 'With Section Headers',
45
- description: 'Dropdown with section headers',
46
- component: DropdownWithSectionHeadersExample
47
- }, {
48
- id: 'new-dropdown-with-right-align',
49
- name: 'With Right Alignment',
50
- description: 'Dropdown aligned to the right side',
51
- component: DropdownWithRightAlignExample
52
- }, {
53
- id: 'new-dropdown-with-search',
54
- name: 'With Search',
55
- description: 'Dropdown with search field',
56
- component: DropdownWithSearchExample
57
- }, {
58
- id: 'new-dropdown-with-checked-items',
59
- name: 'With Checked Items',
60
- description: 'Dropdown with checked items',
61
- component: DropdownWithCheckedItemsExample
62
- }, {
63
- id: 'new-dropdown-with-avatar-and-secondary-text',
64
- name: 'With Avatar and Secondary Text',
65
- description: 'Dropdown with avatar and secondary text',
66
- component: DropdownWithAvatarAndSecondaryText
67
- }, {
68
- id: 'new-dropdown-with-icons',
69
- name: 'With Icons',
70
- description: 'Dropdown with icons',
71
- component: DropdownWithIcons
72
- }, {
73
- id: 'new-dropdown-with-form',
74
- name: 'With Form',
75
- description: 'Dropdown with form',
76
- component: DropdownWithFormExample
77
- }, {
78
- id: 'new-dropdown-with-clear-all',
79
- name: 'With Clear all',
80
- description: 'Dropdown with clear all',
81
- component: DropdownClearAllExample
82
- }]
83
- }];
84
-
85
- export default index;
@@ -1,103 +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-form-checkbox-tree',{attrs:{"value":[1, 11, 12, 121, 122, 2113, 3],"options":[
7
- {
8
- value: 1,
9
- label: 'Felidae',
10
- children: [
11
- {
12
- value: 11,
13
- label: 'Lion',
14
- },
15
- {
16
- value: 12,
17
- label: 'Felinae',
18
- children: [
19
- {
20
- value: 121,
21
- label: 'Cheetah',
22
- },
23
- {
24
- value: 122,
25
- label: 'Ocelot',
26
- } ],
27
- } ],
28
- },
29
- {
30
- value: 2,
31
- label: 'Canidae',
32
- children: [
33
- {
34
- value: 21,
35
- label: 'Caninae',
36
- children: [
37
- {
38
- value: 211,
39
- label: 'Canis lupus',
40
- children: [
41
- {
42
- value: 2112,
43
- label: 'Wolf',
44
- },
45
- {
46
- value: 2113,
47
- label: 'Himalayan wolf',
48
- },
49
- {
50
- value: 2114,
51
- label: 'Dingo',
52
- } ],
53
- },
54
- {
55
- value: 212,
56
- label: 'Black-backed jackal',
57
- } ],
58
- },
59
- {
60
- value: 22,
61
- label: 'Fennec fox',
62
- } ],
63
- },
64
- {
65
- value: 3,
66
- label: 'Karabair',
67
- },
68
- {
69
- value: 4,
70
- label: 'Okapi',
71
- } ]}})};
72
- var __vue_staticRenderFns__ = [];
73
-
74
- /* style */
75
- const __vue_inject_styles__ = undefined;
76
- /* scoped */
77
- const __vue_scope_id__ = undefined;
78
- /* module identifier */
79
- const __vue_module_identifier__ = undefined;
80
- /* functional template */
81
- const __vue_is_functional_template__ = false;
82
- /* style inject */
83
-
84
- /* style inject SSR */
85
-
86
- /* style inject shadow dom */
87
-
88
-
89
-
90
- const __vue_component__ = __vue_normalize__(
91
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
92
- __vue_inject_styles__,
93
- {},
94
- __vue_scope_id__,
95
- __vue_is_functional_template__,
96
- __vue_module_identifier__,
97
- false,
98
- undefined,
99
- undefined,
100
- undefined
101
- );
102
-
103
- export default __vue_component__;
@@ -1,13 +0,0 @@
1
- import BasicExample from './form_checkbox_tree.basic.example';
2
-
3
- var index = [{
4
- name: 'Basic',
5
- items: [{
6
- id: 'form-checkbox-tree-basic',
7
- name: 'Basic',
8
- description: 'Basic Form Checkbox Tree',
9
- component: BasicExample
10
- }]
11
- }];
12
-
13
- export default index;
@@ -1,6 +0,0 @@
1
- import description from './dropdown_divider.md';
2
-
3
- export default {
4
- description,
5
- bootstrapComponent: 'b-dropdown',
6
- };
@@ -1,7 +0,0 @@
1
- # Dropdown Divider
2
-
3
- <!-- STORY -->
4
-
5
- ## Usage
6
-
7
- The dropdown divider component is meant to be used for visual dividers inside a dropdown component.
@@ -1,16 +0,0 @@
1
- import { withKnobs } from '@storybook/addon-knobs';
2
- import { documentedStoriesOf } from '../../../../documentation/documented_stories';
3
- import { GlDropdownDivider } from '../../../index';
4
- import readme from './dropdown_divider.md';
5
-
6
- const components = {
7
- GlDropdownDivider,
8
- };
9
-
10
- documentedStoriesOf('base/dropdown/dropdown-divider', readme)
11
- .addDecorator(withKnobs)
12
- .add('default', () => ({
13
- props: {},
14
- components,
15
- template: '<ul class="list-unstyled"><gl-dropdown-divider /></ul>',
16
- }));
@@ -1,9 +0,0 @@
1
- import * as description from './dropdown_form.md';
2
- import examples from './examples';
3
-
4
- export default {
5
- description,
6
- examples,
7
- bootstrapComponent: 'b-dropdown-form',
8
- propsInfo: {},
9
- };
@@ -1,4 +0,0 @@
1
- Unlike `b-dropdown-form`, we do _not_ add any additional padding with the `gl-dropdown-form` component.
2
- This is to prevent double padding with `gl-dropdown-item` and similar components, so in most cases
3
- shouldn't be needed. To add padding, either add a padding utility class to your form, or an inner
4
- element with some padding.
@@ -1,17 +0,0 @@
1
- import { withKnobs } from '@storybook/addon-knobs';
2
- import { documentedStoriesOf } from '../../../../documentation/documented_stories';
3
- import { GlDropdownForm, GlButton } from '../../../index';
4
- import readme from './dropdown_form.md';
5
-
6
- const components = {
7
- GlDropdownForm,
8
- GlButton,
9
- };
10
-
11
- documentedStoriesOf('base/dropdown/dropdown-form', readme)
12
- .addDecorator(withKnobs)
13
- .add('default', () => ({
14
- components,
15
- template:
16
- '<ul class="list-unstyled"><gl-dropdown-form><gl-button>One</gl-button></gl-dropdown-form></ul>',
17
- }));
@@ -1,6 +0,0 @@
1
- import description from './dropdown_section_header.md';
2
-
3
- export default {
4
- description,
5
- bootstrapComponent: 'b-dropdown',
6
- };
@@ -1,17 +0,0 @@
1
- import { withKnobs } from '@storybook/addon-knobs';
2
- import { documentedStoriesOf } from '../../../../documentation/documented_stories';
3
- import { GlDropdownSectionHeader } from '../../../index';
4
- import readme from './dropdown_section_header.md';
5
-
6
- const components = {
7
- GlDropdownSectionHeader,
8
- };
9
-
10
- documentedStoriesOf('base/dropdown/dropdown-section-header', readme)
11
- .addDecorator(withKnobs)
12
- .add('default', () => ({
13
- props: {},
14
- components,
15
- template:
16
- '<ul class="list-unstyled"><gl-dropdown-section-header>Some header</gl-dropdown-section-header></ul>',
17
- }));
@@ -1,6 +0,0 @@
1
- import description from './dropdown_text.md';
2
-
3
- export default {
4
- description,
5
- bootstrapComponent: 'b-dropdown',
6
- };
@@ -1,16 +0,0 @@
1
- import { withKnobs } from '@storybook/addon-knobs';
2
- import { documentedStoriesOf } from '../../../../documentation/documented_stories';
3
- import { GlDropdownText } from '../../../index';
4
- import readme from './dropdown_text.md';
5
-
6
- const components = {
7
- GlDropdownText,
8
- };
9
-
10
- documentedStoriesOf('base/dropdown/dropdown-text', readme)
11
- .addDecorator(withKnobs)
12
- .add('default', () => ({
13
- props: {},
14
- components,
15
- template: '<ul class="list-unstyled"><gl-dropdown-text>Some text</gl-dropdown-text></ul>',
16
- }));
@@ -1,7 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Some dropdown">
3
- <gl-dropdown-item>First item</gl-dropdown-item>
4
- <gl-dropdown-item>Second item</gl-dropdown-item>
5
- <gl-dropdown-item>Last item</gl-dropdown-item>
6
- </gl-dropdown>
7
- </template>
@@ -1,7 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Some dropdown">
3
- <gl-dropdown-item href="https://about.gitlab.com/">First link</gl-dropdown-item>
4
- <gl-dropdown-item href="https://about.gitlab.com/">Second link</gl-dropdown-item>
5
- <gl-dropdown-item href="https://about.gitlab.com/">Last link</gl-dropdown-item>
6
- </gl-dropdown>
7
- </template>
@@ -1,7 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Some dropdown">
3
- <gl-dropdown-item avatar-url="./img/avatar.png" secondary-text="@sytses">
4
- Sid Sijbrandij
5
- </gl-dropdown-item>
6
- </gl-dropdown>
7
- </template>
@@ -1,6 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Some dropdown">
3
- <gl-dropdown-item :is-check-item="true" :is-checked="true">Checked item</gl-dropdown-item>
4
- <gl-dropdown-item :is-check-item="true">Unchecked item</gl-dropdown-item>
5
- </gl-dropdown>
6
- </template>
@@ -1,7 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Some dropdown" :show-clear-all="true" :clear-all-text="'Clear all'">
3
- <gl-dropdown-item>First item</gl-dropdown-item>
4
- <gl-dropdown-item>Second item</gl-dropdown-item>
5
- <gl-dropdown-item>Last item</gl-dropdown-item>
6
- </gl-dropdown>
7
- </template>
@@ -1,9 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Some dropdown">
3
- <gl-dropdown-item>First item</gl-dropdown-item>
4
- <gl-dropdown-item>Second item</gl-dropdown-item>
5
- <gl-dropdown-divider />
6
- <gl-dropdown-item>Third item</gl-dropdown-item>
7
- <gl-dropdown-item>Fourth item</gl-dropdown-item>
8
- </gl-dropdown>
9
- </template>
@@ -1,10 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Some dropdown" header-text="Dropdown header">
3
- <gl-dropdown-form>
4
- <div class="gl-px-4">
5
- <gl-button>First item</gl-button>
6
- <gl-button>Second item</gl-button>
7
- </div>
8
- </gl-dropdown-form>
9
- </gl-dropdown>
10
- </template>
@@ -1,7 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Some dropdown" header-text="Dropdown header">
3
- <gl-dropdown-section-header>Section header title</gl-dropdown-section-header>
4
- <gl-dropdown-item>First item</gl-dropdown-item>
5
- <gl-dropdown-item>Second item</gl-dropdown-item>
6
- </gl-dropdown>
7
- </template>
@@ -1,9 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Some dropdown">
3
- <template #highlighted-items>
4
- <gl-dropdown-item>First item</gl-dropdown-item>
5
- <gl-dropdown-item>Second item</gl-dropdown-item>
6
- </template>
7
- <gl-dropdown-item>Last item</gl-dropdown-item>
8
- </gl-dropdown>
9
- </template>
@@ -1,43 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Some dropdown">
3
- <gl-dropdown-item
4
- icon-color="info"
5
- icon-name="status_running"
6
- icon-right-name="retry"
7
- icon-right-aria-label="Retry"
8
- >
9
- Status running
10
- </gl-dropdown-item>
11
- <gl-dropdown-item
12
- icon-color="success"
13
- icon-name="status_success"
14
- icon-right-name="cancel"
15
- icon-right-aria-label="Cancel"
16
- >
17
- Status success
18
- </gl-dropdown-item>
19
- <gl-dropdown-item
20
- icon-color="warning"
21
- icon-name="status_warning"
22
- icon-right-name="cancel"
23
- icon-right-aria-label="Cancel"
24
- >
25
- Status warning
26
- </gl-dropdown-item>
27
- <gl-dropdown-item
28
- icon-color="danger"
29
- icon-name="status_failed"
30
- icon-right-name="cancel"
31
- icon-right-aria-label="Cancel"
32
- >
33
- Status failed
34
- </gl-dropdown-item>
35
- <gl-dropdown-item
36
- icon-name="status_manual"
37
- icon-right-name="cancel"
38
- icon-right-aria-label="Cancel"
39
- >
40
- Status manual
41
- </gl-dropdown-item>
42
- </gl-dropdown>
43
- </template>
@@ -1,7 +0,0 @@
1
- <template>
2
- <gl-dropdown text="Right-aligned dropdown" right>
3
- <gl-dropdown-item>First item</gl-dropdown-item>
4
- <gl-dropdown-item>Second item</gl-dropdown-item>
5
- <gl-dropdown-item>Last item</gl-dropdown-item>
6
- </gl-dropdown>
7
- </template>