@gitlab/ui 32.19.0 → 32.20.2

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 (77) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/base/accordion/accordion_item.js +2 -2
  3. package/dist/components/base/alert/alert.js +3 -3
  4. package/dist/components/base/button/button.documentation.js +17 -1
  5. package/dist/components/base/button/button.js +10 -10
  6. package/dist/components/base/daterange_picker/daterange_picker.js +2 -2
  7. package/dist/components/base/dropdown/dropdown.js +8 -8
  8. package/dist/components/base/filtered_search/filtered_search.js +2 -2
  9. package/dist/components/base/path/path.js +1 -1
  10. package/dist/components/base/search_box_by_click/search_box_by_click.js +2 -2
  11. package/dist/components/base/sorting/sorting.js +2 -2
  12. package/dist/components/base/tabs/tabs/examples/tabs.basic.example.js +1 -1
  13. package/dist/components/base/tabs/tabs/examples/tabs.counterbadges.example.js +1 -1
  14. package/dist/components/base/tabs/tabs/examples/tabs.custom_title.example.js +1 -1
  15. package/dist/components/base/tabs/tabs/examples/tabs.disabled.example.js +1 -1
  16. package/dist/components/base/tabs/tabs/examples/tabs.justified.example.js +1 -1
  17. package/dist/components/base/tabs/tabs/examples/tabs.scrollable.example.js +2 -2
  18. package/dist/components/base/tabs/tabs/examples/tabs.styles_only.example.js +1 -1
  19. package/dist/components/base/tabs/tabs/scrollable_tabs.js +1 -1
  20. package/dist/components/base/tabs/tabs/tabs.documentation.js +1 -1
  21. package/dist/components/base/toggle/toggle.js +5 -1
  22. package/dist/components/charts/heatmap/heatmap.js +2 -2
  23. package/dist/components/charts/single_stat/single_stat.js +1 -1
  24. package/dist/components/charts/sparkline/sparkline.js +2 -2
  25. package/dist/components/mixins/button_mixin.js +2 -2
  26. package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +2 -2
  27. package/dist/directives/collapse_toggle.js +1 -2
  28. package/dist/directives/modal.js +1 -2
  29. package/dist/directives/resize_observer/resize_observer.js +2 -2
  30. package/dist/directives/tooltip.js +1 -2
  31. package/dist/index.css +1 -1
  32. package/dist/index.css.map +1 -1
  33. package/dist/index.js +4 -4
  34. package/dist/utils/constants.js +8 -8
  35. package/index.js +4 -4
  36. package/package.json +10 -10
  37. package/src/components/base/accordion/accordion_item.spec.js +1 -1
  38. package/src/components/base/accordion/accordion_item.vue +2 -2
  39. package/src/components/base/alert/alert.spec.js +3 -3
  40. package/src/components/base/alert/alert.vue +3 -3
  41. package/src/components/base/avatar/avatar.stories.js +1 -1
  42. package/src/components/base/avatar_labeled/avatar_labeled.stories.js +1 -1
  43. package/src/components/base/badge/badge.scss +1 -0
  44. package/src/components/base/button/button.documentation.js +18 -0
  45. package/src/components/base/button/button.stories.js +13 -13
  46. package/src/components/base/button/button.vue +15 -15
  47. package/src/components/base/daterange_picker/daterange_picker.vue +2 -2
  48. package/src/components/base/dropdown/dropdown.stories.js +5 -5
  49. package/src/components/base/dropdown/dropdown.vue +11 -11
  50. package/src/components/base/filtered_search/filtered_search.vue +2 -2
  51. package/src/components/base/path/path.vue +1 -1
  52. package/src/components/base/search_box_by_click/search_box_by_click.vue +2 -2
  53. package/src/components/base/sorting/sorting.vue +2 -2
  54. package/src/components/base/tabs/tabs/examples/tabs.basic.example.vue +2 -2
  55. package/src/components/base/tabs/tabs/examples/tabs.counterbadges.example.vue +9 -6
  56. package/src/components/base/tabs/tabs/examples/tabs.custom_title.example.vue +3 -3
  57. package/src/components/base/tabs/tabs/examples/tabs.disabled.example.vue +3 -3
  58. package/src/components/base/tabs/tabs/examples/tabs.justified.example.vue +2 -2
  59. package/src/components/base/tabs/tabs/examples/tabs.scrollable.example.vue +2 -2
  60. package/src/components/base/tabs/tabs/examples/tabs.styles_only.example.vue +4 -4
  61. package/src/components/base/tabs/tabs/scrollable_tabs.vue +1 -1
  62. package/src/components/base/tabs/tabs/tabs.md +8 -8
  63. package/src/components/base/tabs/tabs/tabs.stories.js +42 -40
  64. package/src/components/base/toggle/toggle.spec.js +1 -1
  65. package/src/components/base/toggle/toggle.vue +4 -1
  66. package/src/components/charts/heatmap/heatmap.vue +2 -2
  67. package/src/components/charts/single_stat/single_stat.vue +5 -1
  68. package/src/components/charts/sparkline/sparkline.spec.js +4 -2
  69. package/src/components/charts/sparkline/sparkline.vue +2 -2
  70. package/src/components/mixins/button_mixin.js +2 -2
  71. package/src/components/shared_components/clear_icon_button/clear_icon_button.vue +2 -2
  72. package/src/directives/collapse_toggle.js +1 -3
  73. package/src/directives/modal.js +1 -3
  74. package/src/directives/resize_observer/resize_observer.js +1 -3
  75. package/src/directives/resize_observer/resize_observer.spec.js +3 -3
  76. package/src/directives/tooltip.js +1 -3
  77. package/src/utils/constants.js +7 -7
package/dist/index.js CHANGED
@@ -87,10 +87,10 @@ export { default as GlFriendlyWrap } from './components/utilities/friendly_wrap/
87
87
  export { default as GlIntersperse } from './components/utilities/intersperse/intersperse';
88
88
  export { default as GlSprintf } from './components/utilities/sprintf/sprintf';
89
89
  export { default as GlTruncate } from './components/utilities/truncate/truncate';
90
- export { default as GlModalDirective } from './directives/modal';
91
- export { default as GlTooltipDirective } from './directives/tooltip';
92
- export { default as GlResizeObserverDirective } from './directives/resize_observer/resize_observer';
93
- export { default as GlCollapseToggleDirective } from './directives/collapse_toggle';
90
+ export { GlModalDirective } from './directives/modal';
91
+ export { GlTooltipDirective } from './directives/tooltip';
92
+ export { GlResizeObserverDirective } from './directives/resize_observer/resize_observer';
93
+ export { GlCollapseToggleDirective } from './directives/collapse_toggle';
94
94
  export { SafeLinkDirective as GlSafeLinkDirective } from './directives/safe_link/safe_link';
95
95
  export { SafeHtmlDirective as GlSafeHtmlDirective } from './directives/safe_html/safe_html';
96
96
  export { OutsideDirective as GlOutsideDirective } from './directives/outside/outside';
@@ -69,12 +69,12 @@ const formStateOptions = {
69
69
  valid: true,
70
70
  invalid: false
71
71
  };
72
- const newButtonCategoryOptions = {
72
+ const buttonCategoryOptions = {
73
73
  primary: 'primary',
74
74
  secondary: 'secondary',
75
75
  tertiary: 'tertiary'
76
76
  };
77
- const newButtonVariantOptions = {
77
+ const buttonVariantOptions = {
78
78
  default: 'default',
79
79
  confirm: 'confirm',
80
80
  info: 'info (deprecated)',
@@ -93,9 +93,9 @@ const newButtonVariantOptions = {
93
93
  reset: 'gl-reset'
94
94
  };
95
95
  const badgeForButtonOptions = {
96
- [newButtonVariantOptions.default]: badgeVariantOptions.neutral,
97
- [newButtonVariantOptions.confirm]: badgeVariantOptions.info,
98
- [newButtonVariantOptions.danger]: badgeVariantOptions.danger
96
+ [buttonVariantOptions.default]: badgeVariantOptions.neutral,
97
+ [buttonVariantOptions.confirm]: badgeVariantOptions.info,
98
+ [buttonVariantOptions.danger]: badgeVariantOptions.danger
99
99
  };
100
100
  const newDropdownVariantOptions = {
101
101
  default: 'default',
@@ -106,11 +106,11 @@ const newDropdownVariantOptions = {
106
106
  danger: 'danger',
107
107
  link: 'link'
108
108
  };
109
- const newButtonSizeOptions = {
109
+ const buttonSizeOptions = {
110
110
  small: 'small',
111
111
  medium: 'medium'
112
112
  };
113
- const newButtonSizeOptionsMap = {
113
+ const buttonSizeOptionsMap = {
114
114
  small: 'sm',
115
115
  medium: 'md'
116
116
  }; // size options all have corresponding styles (e.g. .s12 defined in icon.scss)
@@ -251,4 +251,4 @@ const loadingIconSizes = {
251
251
  'xl (64x64)': 'xl'
252
252
  };
253
253
 
254
- export { COMMA, alertVariantIconMap, alertVariantOptions, alignOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, colorThemes, columnOptions, defaultDateFormat, drawerVariants, focusableTags, formInputSizes, formStateOptions, glThemes, iconSizeOptions, keyboard, labelColorOptions, labelSizeOptions, loadingIconSizes, maxZIndex, modalButtonDefaults, modalSizeOptions, newButtonCategoryOptions, newButtonSizeOptions, newButtonSizeOptionsMap, newButtonVariantOptions, newDropdownVariantOptions, popoverPlacements, resizeDebounceTime, sizeOptions, sizeOptionsWithNoDefault, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, variantOptions, variantOptionsWithNoDefault, viewModeOptions };
254
+ export { COMMA, alertVariantIconMap, alertVariantOptions, alignOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, buttonCategoryOptions, buttonSizeOptions, buttonSizeOptionsMap, buttonVariantOptions, colorThemes, columnOptions, defaultDateFormat, drawerVariants, focusableTags, formInputSizes, formStateOptions, glThemes, iconSizeOptions, keyboard, labelColorOptions, labelSizeOptions, loadingIconSizes, maxZIndex, modalButtonDefaults, modalSizeOptions, newDropdownVariantOptions, popoverPlacements, resizeDebounceTime, sizeOptions, sizeOptionsWithNoDefault, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, variantOptions, variantOptionsWithNoDefault, viewModeOptions };
package/index.js CHANGED
@@ -101,10 +101,10 @@ export { default as GlSprintf } from './src/components/utilities/sprintf/sprintf
101
101
  export { default as GlTruncate } from './src/components/utilities/truncate/truncate.vue';
102
102
 
103
103
  // Directives
104
- export { default as GlModalDirective } from './src/directives/modal';
105
- export { default as GlTooltipDirective } from './src/directives/tooltip';
106
- export { default as GlResizeObserverDirective } from './src/directives/resize_observer/resize_observer';
107
- export { default as GlCollapseToggleDirective } from './src/directives/collapse_toggle';
104
+ export { GlModalDirective } from './src/directives/modal';
105
+ export { GlTooltipDirective } from './src/directives/tooltip';
106
+ export { GlResizeObserverDirective } from './src/directives/resize_observer/resize_observer';
107
+ export { GlCollapseToggleDirective } from './src/directives/collapse_toggle';
108
108
  export { SafeLinkDirective as GlSafeLinkDirective } from './src/directives/safe_link/safe_link';
109
109
  export { SafeHtmlDirective as GlSafeHtmlDirective } from './src/directives/safe_html/safe_html';
110
110
  export { OutsideDirective as GlOutsideDirective } from './src/directives/outside/outside';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "32.19.0",
3
+ "version": "32.20.2",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -84,19 +84,19 @@
84
84
  "@babel/preset-env": "^7.10.2",
85
85
  "@gitlab/eslint-plugin": "9.4.0",
86
86
  "@gitlab/stylelint-config": "2.3.0",
87
- "@gitlab/svgs": "1.217.0",
87
+ "@gitlab/svgs": "1.218.0",
88
88
  "@rollup/plugin-commonjs": "^11.1.0",
89
89
  "@rollup/plugin-node-resolve": "^7.1.3",
90
90
  "@rollup/plugin-replace": "^2.3.2",
91
- "@storybook/addon-a11y": "6.3.10",
92
- "@storybook/addon-docs": "6.3.10",
93
- "@storybook/addon-essentials": "6.3.10",
91
+ "@storybook/addon-a11y": "6.3.12",
92
+ "@storybook/addon-docs": "6.3.12",
93
+ "@storybook/addon-essentials": "6.3.12",
94
94
  "@storybook/addon-knobs": "6.3.1",
95
- "@storybook/addon-storyshots": "6.3.10",
96
- "@storybook/addon-storyshots-puppeteer": "6.3.10",
97
- "@storybook/addon-viewport": "6.3.10",
98
- "@storybook/theming": "6.3.10",
99
- "@storybook/vue": "6.3.10",
95
+ "@storybook/addon-storyshots": "6.3.12",
96
+ "@storybook/addon-storyshots-puppeteer": "6.3.12",
97
+ "@storybook/addon-viewport": "6.3.12",
98
+ "@storybook/theming": "6.3.12",
99
+ "@storybook/vue": "6.3.12",
100
100
  "@vue/test-utils": "1.1.3",
101
101
  "autoprefixer": "^9.7.6",
102
102
  "babel-jest": "^26.6.3",
@@ -1,6 +1,6 @@
1
1
  import { mount } from '@vue/test-utils';
2
2
  import { BCollapse } from 'bootstrap-vue';
3
- import GlCollapseToggleDirective from '../../../directives/collapse_toggle';
3
+ import { GlCollapseToggleDirective } from '../../../directives/collapse_toggle';
4
4
  import { waitForAnimationFrame } from '../../../utils/test_utils';
5
5
  import GlButton from '../button/button.vue';
6
6
  import GlAccordionItem from './accordion_item.vue';
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  import { BCollapse } from 'bootstrap-vue';
3
3
  import { uniqueId } from 'lodash';
4
- import GlCollapseToggle from '../../../directives/collapse_toggle';
4
+ import { GlCollapseToggleDirective } from '../../../directives/collapse_toggle';
5
5
  import GlButton from '../button/button.vue';
6
6
 
7
7
  export default {
@@ -11,7 +11,7 @@ export default {
11
11
  GlButton,
12
12
  },
13
13
  directives: {
14
- GlCollapseToggle,
14
+ GlCollapseToggle: GlCollapseToggleDirective,
15
15
  },
16
16
  inject: ['accordionSetId', 'defaultHeaderLevel'],
17
17
  inheritAttrs: false,
@@ -1,5 +1,5 @@
1
1
  import { shallowMount } from '@vue/test-utils';
2
- import { newButtonCategoryOptions } from '../../../utils/constants';
2
+ import { buttonCategoryOptions } from '../../../utils/constants';
3
3
  import GlAlert from './alert.vue';
4
4
 
5
5
  const DummyComponent = {
@@ -89,7 +89,7 @@ describe('Alert component', () => {
89
89
 
90
90
  const props = button.props();
91
91
  expect('href' in props).toBe(false);
92
- expect(props.category).toEqual(newButtonCategoryOptions.primary);
92
+ expect(props.category).toEqual(buttonCategoryOptions.primary);
93
93
  });
94
94
 
95
95
  it('emits a primaryAction event when primary button is clicked', () => {
@@ -126,7 +126,7 @@ describe('Alert component', () => {
126
126
 
127
127
  const attrs = button.attributes();
128
128
  expect('href' in attrs).toBe(false);
129
- expect(attrs.category).toEqual(newButtonCategoryOptions.secondary);
129
+ expect(attrs.category).toEqual(buttonCategoryOptions.secondary);
130
130
  });
131
131
 
132
132
  it('emits a secondaryAction event when secondary button is clicked', () => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  alertVariantOptions,
4
4
  alertVariantIconMap,
5
- newButtonCategoryOptions,
5
+ buttonCategoryOptions,
6
6
  } from '../../../utils/constants';
7
7
  import CloseButton from '../../shared_components/close_button/close_button.vue';
8
8
  import GlButton from '../button/button.vue';
@@ -102,7 +102,7 @@ export default {
102
102
  attrs: {
103
103
  href: this.primaryButtonLink,
104
104
  variant: 'confirm',
105
- category: newButtonCategoryOptions.primary,
105
+ category: buttonCategoryOptions.primary,
106
106
  },
107
107
  listeners: {
108
108
  click: this.primaryButtonClicked,
@@ -113,7 +113,7 @@ export default {
113
113
  attrs: {
114
114
  href: this.secondaryButtonLink,
115
115
  variant: 'default',
116
- category: newButtonCategoryOptions.secondary,
116
+ category: buttonCategoryOptions.secondary,
117
117
  },
118
118
  listeners: {
119
119
  click: this.secondaryButtonClicked,
@@ -1,7 +1,7 @@
1
1
  import { select, text, number, withKnobs } from '@storybook/addon-knobs';
2
2
  import Vue from 'vue';
3
3
  import { documentedStoriesOf } from '../../../../documentation/documented_stories';
4
- import GlTooltipDirective from '../../../directives/tooltip';
4
+ import { GlTooltipDirective } from '../../../directives/tooltip';
5
5
  import { avatarSizeOptions, avatarShapeOptions, tooltipPlacements } from '../../../utils/constants';
6
6
  import readme from './avatar.md';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { text, withKnobs, select } from '@storybook/addon-knobs';
2
2
  import Vue from 'vue';
3
3
  import { documentedStoriesOf } from '../../../../documentation/documented_stories';
4
- import GlTooltipDirective from '../../../directives/tooltip';
4
+ import { GlTooltipDirective } from '../../../directives/tooltip';
5
5
  import { avatarSizeOptions, avatarShapeOptions, tooltipPlacements } from '../../../utils/constants';
6
6
  import readme from './avatar_labeled.md';
7
7
 
@@ -18,6 +18,7 @@
18
18
  // Needed to override bootstrap's badge variant background
19
19
  background-color: $bg;
20
20
  box-shadow: inset 0 0 0 $gl-border-size-1 $border-color;
21
+ @include gl-text-decoration-none;
21
22
  }
22
23
 
23
24
  &:focus {
@@ -3,4 +3,22 @@ import description from './button.md';
3
3
  export default {
4
4
  description,
5
5
  followsDesignSystem: true,
6
+ bootstrapComponent: 'b-button',
7
+ bootstrapPropsInfo: {
8
+ category: {
9
+ enum: 'buttonCategoryOptions',
10
+ },
11
+ variant: {
12
+ enum: 'buttonVariantOptions',
13
+ },
14
+ size: {
15
+ enum: 'buttonSizeOptions',
16
+ },
17
+ },
18
+ events: [
19
+ {
20
+ event: 'click',
21
+ description: 'Emitted when clicked on button',
22
+ },
23
+ ],
6
24
  };
@@ -1,9 +1,9 @@
1
1
  import { GlButton } from '../../../../index';
2
2
  import {
3
- newButtonCategoryOptions,
4
- newButtonVariantOptions,
5
- newButtonSizeOptions,
3
+ buttonCategoryOptions,
4
+ buttonVariantOptions,
6
5
  badgeForButtonOptions,
6
+ buttonSizeOptions,
7
7
  targetOptions,
8
8
  } from '../../../utils/constants';
9
9
  import readme from './button.md';
@@ -105,8 +105,8 @@ export const IconButton = (args, { argTypes }) => ({
105
105
  `,
106
106
  });
107
107
  IconButton.args = generateProps({
108
- category: newButtonCategoryOptions.primary,
109
- variant: newButtonVariantOptions.danger,
108
+ category: buttonCategoryOptions.primary,
109
+ variant: buttonVariantOptions.danger,
110
110
  });
111
111
 
112
112
  export const DropdownButton = (args, { argTypes }) => ({
@@ -186,7 +186,7 @@ export const DropdownIconOnlyButton = (args, { argTypes }) => ({
186
186
  `),
187
187
  });
188
188
  DropdownIconOnlyButton.args = generateProps({
189
- category: newButtonCategoryOptions.tertiary,
189
+ category: buttonCategoryOptions.tertiary,
190
190
  });
191
191
 
192
192
  export const DropdownSplitButton = (args, { argTypes }) => ({
@@ -356,10 +356,10 @@ LabelButton.parameters = { controls: { disable: true } };
356
356
  export const AllVariantsAndCategories = (args, { argTypes = {} }) => ({
357
357
  props: Object.keys(argTypes),
358
358
  components,
359
- variants: Object.keys(newButtonVariantOptions).filter(
360
- (variant) => !newButtonVariantOptions[variant].includes('deprecated')
359
+ variants: Object.keys(buttonVariantOptions).filter(
360
+ (variant) => !buttonVariantOptions[variant].includes('deprecated')
361
361
  ),
362
- categories: newButtonCategoryOptions,
362
+ categories: buttonCategoryOptions,
363
363
  style: {
364
364
  display: 'grid',
365
365
  gridTemplateColumns: 'repeat(3, 150px)',
@@ -453,7 +453,7 @@ export const Badges = (args, { argTypes = {} }) => ({
453
453
  props: Object.keys(argTypes),
454
454
  components,
455
455
  variants: Object.keys(badgeForButtonOptions),
456
- categories: newButtonCategoryOptions,
456
+ categories: buttonCategoryOptions,
457
457
  style: {
458
458
  display: 'grid',
459
459
  gridTemplateColumns: 'repeat(3, 200px)',
@@ -513,19 +513,19 @@ export default {
513
513
  category: {
514
514
  control: {
515
515
  type: 'select',
516
- options: newButtonCategoryOptions,
516
+ options: buttonCategoryOptions,
517
517
  },
518
518
  },
519
519
  variant: {
520
520
  control: {
521
521
  type: 'select',
522
- options: newButtonVariantOptions,
522
+ options: buttonVariantOptions,
523
523
  },
524
524
  },
525
525
  size: {
526
526
  control: {
527
527
  type: 'select',
528
- options: newButtonSizeOptions,
528
+ options: buttonSizeOptions,
529
529
  },
530
530
  },
531
531
  target: {
@@ -1,10 +1,10 @@
1
1
  <script>
2
2
  import { BButton } from 'bootstrap-vue';
3
3
  import {
4
- newButtonCategoryOptions,
5
- newButtonVariantOptions,
6
- newButtonSizeOptions,
7
- newButtonSizeOptionsMap,
4
+ buttonCategoryOptions,
5
+ buttonVariantOptions,
6
+ buttonSizeOptions,
7
+ buttonSizeOptionsMap,
8
8
  } from '../../../utils/constants';
9
9
  import { logWarning } from '../../../utils/utils';
10
10
  import { SafeLinkMixin } from '../../mixins/safe_link_mixin';
@@ -22,20 +22,20 @@ export default {
22
22
  category: {
23
23
  type: String,
24
24
  required: false,
25
- default: newButtonCategoryOptions.primary,
26
- validator: (value) => Object.keys(newButtonCategoryOptions).includes(value),
25
+ default: buttonCategoryOptions.primary,
26
+ validator: (value) => Object.keys(buttonCategoryOptions).includes(value),
27
27
  },
28
28
  variant: {
29
29
  type: String,
30
30
  required: false,
31
- default: newButtonVariantOptions.default,
32
- validator: (value) => Object.keys(newButtonVariantOptions).includes(value),
31
+ default: buttonVariantOptions.default,
32
+ validator: (value) => Object.keys(buttonVariantOptions).includes(value),
33
33
  },
34
34
  size: {
35
35
  type: String,
36
36
  required: false,
37
- default: newButtonSizeOptions.medium,
38
- validator: (value) => Object.keys(newButtonSizeOptions).includes(value),
37
+ default: buttonSizeOptions.medium,
38
+ validator: (value) => Object.keys(buttonSizeOptions).includes(value),
39
39
  },
40
40
  selected: {
41
41
  type: Boolean,
@@ -81,14 +81,14 @@ export default {
81
81
  buttonClasses() {
82
82
  const classes = ['gl-button'];
83
83
  const nonCategoryVariants = [
84
- newButtonVariantOptions.dashed,
85
- newButtonVariantOptions.link,
86
- newButtonVariantOptions.reset,
84
+ buttonVariantOptions.dashed,
85
+ buttonVariantOptions.link,
86
+ buttonVariantOptions.reset,
87
87
  ];
88
88
 
89
89
  if (
90
90
  !nonCategoryVariants.includes(this.variant) &&
91
- this.category !== newButtonCategoryOptions.primary
91
+ this.category !== buttonCategoryOptions.primary
92
92
  ) {
93
93
  classes.push(`btn-${this.variant}-${this.category}`);
94
94
  }
@@ -106,7 +106,7 @@ export default {
106
106
  return classes;
107
107
  },
108
108
  buttonSize() {
109
- return newButtonSizeOptionsMap[this.size];
109
+ return buttonSizeOptionsMap[this.size];
110
110
  },
111
111
  },
112
112
  mounted() {
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import GlTooltip from '../../../directives/tooltip';
2
+ import { GlTooltipDirective } from '../../../directives/tooltip';
3
3
  import { getDayDifference, getDateInPast, getDateInFuture } from '../../../utils/datetime_utility';
4
4
  import GlDatepicker from '../datepicker/datepicker.vue';
5
5
  import GlIcon from '../icon/icon.vue';
@@ -10,7 +10,7 @@ export default {
10
10
  GlIcon,
11
11
  },
12
12
  directives: {
13
- GlTooltip,
13
+ GlTooltip: GlTooltipDirective,
14
14
  },
15
15
  props: {
16
16
  fromLabel: {
@@ -11,9 +11,9 @@ import {
11
11
  GlDropdownForm,
12
12
  } from '../../../../index';
13
13
  import {
14
- newButtonCategoryOptions,
14
+ buttonCategoryOptions,
15
15
  newDropdownVariantOptions,
16
- newButtonSizeOptions,
16
+ buttonSizeOptions,
17
17
  } from '../../../utils/constants';
18
18
  import readme from './dropdown.md';
19
19
 
@@ -53,7 +53,7 @@ function generateProps({
53
53
  const props = {
54
54
  category: {
55
55
  type: String,
56
- default: select('category', newButtonCategoryOptions, category),
56
+ default: select('category', buttonCategoryOptions, category),
57
57
  },
58
58
  variant: {
59
59
  type: String,
@@ -61,7 +61,7 @@ function generateProps({
61
61
  },
62
62
  size: {
63
63
  type: String,
64
- default: select('size', newButtonSizeOptions, size),
64
+ default: select('size', buttonSizeOptions, size),
65
65
  },
66
66
  block: {
67
67
  type: Boolean,
@@ -196,7 +196,7 @@ documentedStoriesOf('base/dropdown', readme)
196
196
  .add('secondary', () => ({
197
197
  props: generateProps({
198
198
  text: 'Some dropdown',
199
- category: newButtonCategoryOptions.secondary,
199
+ category: buttonCategoryOptions.secondary,
200
200
  variant: newDropdownVariantOptions.confirm,
201
201
  }),
202
202
  components,
@@ -2,9 +2,9 @@
2
2
  import { BDropdown } from 'bootstrap-vue';
3
3
  import { isVisible, selectAll } from 'bootstrap-vue/src/utils/dom';
4
4
  import {
5
- newButtonCategoryOptions,
5
+ buttonCategoryOptions,
6
6
  newDropdownVariantOptions,
7
- newButtonSizeOptions,
7
+ buttonSizeOptions,
8
8
  } from '../../../utils/constants';
9
9
  import { ButtonMixin } from '../../mixins/button_mixin';
10
10
  import GlButton from '../button/button.vue';
@@ -100,8 +100,8 @@ export default {
100
100
  category: {
101
101
  type: String,
102
102
  required: false,
103
- default: newButtonCategoryOptions.primary,
104
- validator: (value) => Object.keys(newButtonCategoryOptions).includes(value),
103
+ default: buttonCategoryOptions.primary,
104
+ validator: (value) => Object.keys(buttonCategoryOptions).includes(value),
105
105
  },
106
106
  variant: {
107
107
  type: String,
@@ -112,8 +112,8 @@ export default {
112
112
  size: {
113
113
  type: String,
114
114
  required: false,
115
- default: newButtonSizeOptions.medium,
116
- validator: (value) => Object.keys(newButtonSizeOptions).includes(value),
115
+ default: buttonSizeOptions.medium,
116
+ validator: (value) => Object.keys(buttonSizeOptions).includes(value),
117
117
  },
118
118
  icon: {
119
119
  type: String,
@@ -163,10 +163,10 @@ export default {
163
163
  'gl-button': true,
164
164
  'gl-dropdown-toggle': true,
165
165
  [`btn-${this.variant}-secondary`]:
166
- this.category === newButtonCategoryOptions.secondary ||
167
- (this.category === newButtonCategoryOptions.tertiary && this.split),
166
+ this.category === buttonCategoryOptions.secondary ||
167
+ (this.category === buttonCategoryOptions.tertiary && this.split),
168
168
  [`btn-${this.variant}-tertiary`]:
169
- this.category === newButtonCategoryOptions.tertiary && !this.split,
169
+ this.category === buttonCategoryOptions.tertiary && !this.split,
170
170
  'dropdown-icon-only': this.isIconOnly,
171
171
  'dropdown-icon-text': this.isIconWithText,
172
172
  },
@@ -180,8 +180,8 @@ export default {
180
180
  'split-content-button': Boolean(this.text),
181
181
  'icon-split-content-button': Boolean(this.icon),
182
182
  [`btn-${this.variant}-secondary`]:
183
- this.category === newButtonCategoryOptions.secondary ||
184
- this.category === newButtonCategoryOptions.tertiary,
183
+ this.category === buttonCategoryOptions.secondary ||
184
+ this.category === buttonCategoryOptions.tertiary,
185
185
  },
186
186
  ];
187
187
  },
@@ -2,7 +2,7 @@
2
2
  import { cloneDeep } from 'lodash';
3
3
  import PortalVue from 'portal-vue';
4
4
  import Vue from 'vue';
5
- import GlTooltip from '../../../directives/tooltip';
5
+ import { GlTooltipDirective } from '../../../directives/tooltip';
6
6
  import GlIcon from '../icon/icon.vue';
7
7
  import GlSearchBoxByClick from '../search_box_by_click/search_box_by_click.vue';
8
8
  import GlFilteredSearchTerm from './filtered_search_term.vue';
@@ -34,7 +34,7 @@ export default {
34
34
  GlSearchBoxByClick,
35
35
  GlIcon,
36
36
  },
37
- directives: { GlTooltip },
37
+ directives: { GlTooltip: GlTooltipDirective },
38
38
  provide() {
39
39
  portalUuid += 1;
40
40
  this.portalName = `filters_portal_${portalUuid}`;
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  import iconSpriteInfo from '@gitlab/svgs/dist/icons.json';
3
3
  import { uniqueId, findLast } from 'lodash';
4
- import GlResizeObserverDirective from '../../../directives/resize_observer/resize_observer';
4
+ import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
5
5
  import { glThemes } from '../../../utils/constants';
6
6
  import GlIcon from '../icon/icon.vue';
7
7
 
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import GlTooltip from '../../../directives/tooltip';
2
+ import { GlTooltipDirective } from '../../../directives/tooltip';
3
3
  import GlClearIconButton from '../../shared_components/clear_icon_button/clear_icon_button.vue';
4
4
  import GlButton from '../button/button.vue';
5
5
  import GlDropdown from '../dropdown/dropdown.vue';
@@ -23,7 +23,7 @@ export default {
23
23
  GlFormInputGroup,
24
24
  },
25
25
  directives: {
26
- GlTooltip,
26
+ GlTooltip: GlTooltipDirective,
27
27
  },
28
28
  props: {
29
29
  value: {
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import GlTooltip from '../../../directives/tooltip';
2
+ import { GlTooltipDirective } from '../../../directives/tooltip';
3
3
  import GlButton from '../button/button.vue';
4
4
  import GlButtonGroup from '../button_group/button_group.vue';
5
5
  import GlDropdown from '../dropdown/dropdown.vue';
@@ -12,7 +12,7 @@ export default {
12
12
  GlDropdown,
13
13
  },
14
14
  directives: {
15
- GlTooltip,
15
+ GlTooltip: GlTooltipDirective,
16
16
  },
17
17
  props: {
18
18
  /**
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <gl-tabs>
3
- <gl-tab title="First">first content</gl-tab>
4
- <gl-tab title="Second">second content</gl-tab>
3
+ <gl-tab title="Tab 1">Tab panel 1</gl-tab>
4
+ <gl-tab title="Tab 2">Tab panel 2</gl-tab>
5
5
  </gl-tabs>
6
6
  </template>
@@ -2,24 +2,27 @@
2
2
  <gl-tabs>
3
3
  <gl-tab>
4
4
  <template #title>
5
- <span>1st</span>
5
+ <span>Tab</span>
6
6
  <gl-badge size="sm" class="gl-tab-counter-badge">500</gl-badge>
7
+ <span class="sr-only">items</span>
7
8
  </template>
8
- first content
9
+ Tab panel 1
9
10
  </gl-tab>
10
11
  <gl-tab>
11
12
  <template #title>
12
- <span>2nd</span>
13
+ <span>Tab</span>
13
14
  <gl-badge size="sm" class="gl-tab-counter-badge">250</gl-badge>
15
+ <span class="sr-only">items</span>
14
16
  </template>
15
- second content
17
+ Tab panel 2
16
18
  </gl-tab>
17
19
  <gl-tab>
18
20
  <template #title>
19
- <span>3rd</span>
21
+ <span>Tab</span>
20
22
  <gl-badge size="sm" class="gl-tab-counter-badge">250</gl-badge>
23
+ <span class="sr-only">items</span>
21
24
  </template>
22
- third content
25
+ Tab panel 3
23
26
  </gl-tab>
24
27
  </gl-tabs>
25
28
  </template>
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <gl-tabs>
3
- <gl-tab title="First">
3
+ <gl-tab title="Tab 1">
4
4
  <template #title><i>custom</i> <strong>Title</strong></template>
5
- first content
5
+ Tab panel 1
6
6
  </gl-tab>
7
- <gl-tab title="Second">second content</gl-tab>
7
+ <gl-tab title="Tab 2">Tab panel 2</gl-tab>
8
8
  </gl-tabs>
9
9
  </template>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <gl-tabs>
3
- <gl-tab title="First">first content</gl-tab>
4
- <gl-tab title="Second">second content</gl-tab>
5
- <gl-tab title="Disabled" disabled>disabled</gl-tab>
3
+ <gl-tab title="Tab 1">Tab panel 1</gl-tab>
4
+ <gl-tab title="Tab 2">Tab panel 2</gl-tab>
5
+ <gl-tab title="Tab 3" disabled>Disabled tab panel</gl-tab>
6
6
  </gl-tabs>
7
7
  </template>