@gitlab/ui 101.16.0 → 102.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 (115) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/components/experimental/duo/chat/components/duo_chat_context/constants.js +9 -0
  3. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_details_modal/duo_chat_context_item_details_modal.js +11 -0
  4. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.js +8 -0
  5. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_category_items.js +8 -0
  6. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_item.js +8 -0
  7. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_items.js +8 -0
  8. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_items_loading.js +8 -0
  9. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_popover/duo_chat_context_item_popover.js +8 -0
  10. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections.js +8 -0
  11. package/dist/components/experimental/duo/chat/components/duo_chat_context/mock_context_data.js +8 -0
  12. package/dist/components/experimental/duo/chat/components/duo_chat_context/utils.js +8 -0
  13. package/dist/components/experimental/duo/chat/components/duo_chat_conversation/duo_chat_conversation.js +8 -0
  14. package/dist/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.js +8 -0
  15. package/dist/components/experimental/duo/chat/components/duo_chat_message/buttons_utils.js +8 -0
  16. package/dist/components/experimental/duo/chat/components/duo_chat_message/constants.js +9 -0
  17. package/dist/components/experimental/duo/chat/components/duo_chat_message/copy_code_element.js +8 -0
  18. package/dist/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.js +8 -0
  19. package/dist/components/experimental/duo/chat/components/duo_chat_message/utils.js +9 -0
  20. package/dist/components/experimental/duo/chat/components/duo_chat_message_sources/duo_chat_message_sources.js +8 -0
  21. package/dist/components/experimental/duo/chat/components/duo_chat_predefined_prompts/duo_chat_predefined_prompts.js +8 -0
  22. package/dist/components/experimental/duo/chat/constants.js +9 -0
  23. package/dist/components/experimental/duo/chat/duo_chat.js +8 -0
  24. package/dist/components/experimental/duo/chat/markdown_renderer.js +8 -1
  25. package/dist/components/experimental/duo/chat/mock_data.js +8 -0
  26. package/dist/components/experimental/duo/user_feedback/user_feedback.js +8 -0
  27. package/dist/components/experimental/duo/user_feedback/user_feedback_modal.js +1 -0
  28. package/dist/components/experimental/duo/workflow/components/duo_workflow_panel/duo_workflow_panel.js +8 -0
  29. package/dist/components/experimental/duo/workflow/components/duo_workflow_prompt/duo_workflow_prompt.js +8 -0
  30. package/dist/index.css +1 -1
  31. package/dist/index.css.map +1 -1
  32. package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -4
  33. package/dist/vendor/bootstrap-vue/src/components/collapse/collapse.js +1 -2
  34. package/dist/vendor/bootstrap-vue/src/components/nav/nav.js +6 -9
  35. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +6 -30
  36. package/dist/vendor/bootstrap-vue/src/constants/env.js +1 -10
  37. package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +1 -2
  38. package/dist/vendor/bootstrap-vue/src/index.js +1 -11
  39. package/dist/vendor/bootstrap-vue/src/mixins/form-radio-check-group.js +2 -16
  40. package/dist/vendor/bootstrap-vue/src/mixins/form-radio-check.js +14 -104
  41. package/dist/vendor/bootstrap-vue/src/utils/plugins.js +1 -41
  42. package/package.json +1 -1
  43. package/src/components/experimental/duo/chat/components/duo_chat_context/constants.js +9 -0
  44. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_details_modal/duo_chat_context_item_details_modal.vue +12 -0
  45. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.md +12 -3
  46. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.vue +9 -0
  47. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_category_items.vue +9 -0
  48. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_item.vue +9 -0
  49. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_items.vue +9 -0
  50. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_items_loading.vue +9 -0
  51. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_popover/duo_chat_context_item_popover.vue +9 -0
  52. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections.vue +9 -0
  53. package/src/components/experimental/duo/chat/components/duo_chat_context/mock_context_data.js +9 -0
  54. package/src/components/experimental/duo/chat/components/duo_chat_context/utils.js +9 -0
  55. package/src/components/experimental/duo/chat/components/duo_chat_conversation/duo_chat_conversation.md +9 -0
  56. package/src/components/experimental/duo/chat/components/duo_chat_conversation/duo_chat_conversation.vue +9 -0
  57. package/src/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.md +9 -0
  58. package/src/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.scss +9 -0
  59. package/src/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.vue +9 -0
  60. package/src/components/experimental/duo/chat/components/duo_chat_message/buttons_utils.js +9 -0
  61. package/src/components/experimental/duo/chat/components/duo_chat_message/constants.js +9 -0
  62. package/src/components/experimental/duo/chat/components/duo_chat_message/copy_code_element.js +9 -0
  63. package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.scss +9 -0
  64. package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.vue +9 -0
  65. package/src/components/experimental/duo/chat/components/duo_chat_message/insert_code_snippet_element.js +9 -0
  66. package/src/components/experimental/duo/chat/components/duo_chat_message/utils.js +9 -0
  67. package/src/components/experimental/duo/chat/components/duo_chat_message_sources/duo_chat_message_sources.md +9 -0
  68. package/src/components/experimental/duo/chat/components/duo_chat_message_sources/duo_chat_message_sources.vue +9 -0
  69. package/src/components/experimental/duo/chat/components/duo_chat_predefined_prompts/duo_chat_predefined_prompts.md +9 -0
  70. package/src/components/experimental/duo/chat/components/duo_chat_predefined_prompts/duo_chat_predefined_prompts.vue +9 -0
  71. package/src/components/experimental/duo/chat/constants.js +9 -0
  72. package/src/components/experimental/duo/chat/duo_chat.md +8 -0
  73. package/src/components/experimental/duo/chat/duo_chat.scss +9 -0
  74. package/src/components/experimental/duo/chat/duo_chat.vue +9 -0
  75. package/src/components/experimental/duo/chat/markdown_renderer.js +9 -0
  76. package/src/components/experimental/duo/chat/mock_data.js +9 -0
  77. package/src/components/experimental/duo/chat/variables.scss +9 -1
  78. package/src/components/experimental/duo/user_feedback/user_feedback.md +9 -0
  79. package/src/components/experimental/duo/user_feedback/user_feedback.vue +9 -0
  80. package/src/components/experimental/duo/user_feedback/user_feedback_modal.vue +6 -0
  81. package/src/components/experimental/duo/workflow/components/duo_workflow_panel/duo_workflow_panel.md +9 -0
  82. package/src/components/experimental/duo/workflow/components/duo_workflow_panel/duo_workflow_panel.vue +9 -0
  83. package/src/components/experimental/duo/workflow/components/duo_workflow_prompt/duo_workflow_prompt.md +9 -0
  84. package/src/components/experimental/duo/workflow/components/duo_workflow_prompt/duo_workflow_prompt.vue +9 -0
  85. package/src/vendor/bootstrap/scss/_reboot.scss +2 -5
  86. package/src/vendor/bootstrap-vue/src/components/button/MODIFICATIONS.md +16 -0
  87. package/src/vendor/bootstrap-vue/src/components/button/README.md +0 -39
  88. package/src/vendor/bootstrap-vue/src/components/button/button.js +0 -4
  89. package/src/vendor/bootstrap-vue/src/components/button/button.spec.js +0 -36
  90. package/src/vendor/bootstrap-vue/src/components/collapse/collapse.js +1 -1
  91. package/src/vendor/bootstrap-vue/src/components/form-checkbox/README.md +3 -174
  92. package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox-group.spec.js +0 -117
  93. package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox.spec.js +0 -409
  94. package/src/vendor/bootstrap-vue/src/components/form-radio/README.md +0 -129
  95. package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio-group.spec.js +0 -112
  96. package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio.spec.js +0 -365
  97. package/src/vendor/bootstrap-vue/src/components/nav/README.md +0 -20
  98. package/src/vendor/bootstrap-vue/src/components/nav/nav.js +7 -9
  99. package/src/vendor/bootstrap-vue/src/components/nav/nav.spec.js +0 -67
  100. package/src/vendor/bootstrap-vue/src/components/tabs/README.md +45 -187
  101. package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +6 -29
  102. package/src/vendor/bootstrap-vue/src/components/tabs/tabs.spec.js +0 -58
  103. package/src/vendor/bootstrap-vue/src/constants/env.js +0 -14
  104. package/src/vendor/bootstrap-vue/src/constants/key-codes.js +0 -1
  105. package/src/vendor/bootstrap-vue/src/index.js +0 -17
  106. package/src/vendor/bootstrap-vue/src/mixins/form-radio-check-group.js +3 -20
  107. package/src/vendor/bootstrap-vue/src/mixins/form-radio-check.js +19 -114
  108. package/src/vendor/bootstrap-vue/src/utils/config.spec.js +0 -18
  109. package/src/vendor/bootstrap-vue/src/utils/plugins.js +0 -33
  110. package/dist/vendor/bootstrap-vue/src/browser.js +0 -8
  111. package/dist/vendor/bootstrap-vue/src/components/index.js +0 -11
  112. package/dist/vendor/bootstrap-vue/src/constants/classes.js +0 -3
  113. package/src/vendor/bootstrap-vue/src/browser.js +0 -9
  114. package/src/vendor/bootstrap-vue/src/components/index.js +0 -11
  115. package/src/vendor/bootstrap-vue/src/constants/classes.js +0 -1
@@ -20,12 +20,10 @@ const props = makePropsConfigurable(sortKeys({
20
20
  ...linkProps,
21
21
  block: makeProp(PROP_TYPE_BOOLEAN, false),
22
22
  disabled: makeProp(PROP_TYPE_BOOLEAN, false),
23
- pill: makeProp(PROP_TYPE_BOOLEAN, false),
24
23
  // Tri-state: `true`, `false` or `null`
25
24
  // => On, off, not a toggle
26
25
  pressed: makeProp(PROP_TYPE_BOOLEAN, null),
27
26
  size: makeProp(PROP_TYPE_STRING),
28
- squared: makeProp(PROP_TYPE_BOOLEAN, false),
29
27
  tag: makeProp(PROP_TYPE_STRING, 'button'),
30
28
  type: makeProp(PROP_TYPE_STRING, 'button'),
31
29
  variant: makeProp(PROP_TYPE_STRING, 'secondary')
@@ -60,8 +58,6 @@ const isNonStandardTag = props => !isLink(props) && !isButton(props);
60
58
  const computeClass = props => [`btn-${props.variant || 'secondary'}`, {
61
59
  [`btn-${props.size}`]: props.size,
62
60
  'btn-block': props.block,
63
- 'rounded-pill': props.pill,
64
- 'rounded-0': props.squared && !props.pill,
65
61
  disabled: props.disabled,
66
62
  active: props.pressed
67
63
  }];
@@ -1,6 +1,5 @@
1
1
  import { extend } from '../../vue';
2
2
  import { NAME_COLLAPSE } from '../../constants/components';
3
- import { CLASS_NAME_SHOW } from '../../constants/classes';
4
3
  import { EVENT_NAME_SHOW, EVENT_NAME_SHOWN, EVENT_NAME_HIDE, EVENT_NAME_HIDDEN } from '../../constants/events';
5
4
  import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';
6
5
  import { SLOT_NAME_DEFAULT } from '../../constants/slots';
@@ -15,7 +14,7 @@ import { normalizeSlotMixin } from '../../mixins/normalize-slot';
15
14
  import { BVCollapse } from './helpers/bv-collapse';
16
15
 
17
16
  // --- Constants ---
18
-
17
+ const CLASS_NAME_SHOW = 'show';
19
18
  const ROOT_ACTION_EVENT_NAME_TOGGLE = getRootActionEventName(NAME_COLLAPSE, 'toggle');
20
19
  const ROOT_ACTION_EVENT_NAME_REQUEST_STATE = getRootActionEventName(NAME_COLLAPSE, 'request-state');
21
20
  const ROOT_EVENT_NAME_ACCORDION = getRootEventName(NAME_COLLAPSE, 'accordion');
@@ -21,8 +21,7 @@ const props = makePropsConfigurable({
21
21
  pills: makeProp(PROP_TYPE_BOOLEAN, false),
22
22
  small: makeProp(PROP_TYPE_BOOLEAN, false),
23
23
  tabs: makeProp(PROP_TYPE_BOOLEAN, false),
24
- tag: makeProp(PROP_TYPE_STRING, 'ul'),
25
- vertical: makeProp(PROP_TYPE_BOOLEAN, false)
24
+ tag: makeProp(PROP_TYPE_STRING, 'ul')
26
25
  }, NAME_NAV);
27
26
 
28
27
  // --- Main component ---
@@ -41,7 +40,6 @@ const BNav = /*#__PURE__*/extend({
41
40
  const {
42
41
  tabs,
43
42
  pills,
44
- vertical,
45
43
  align,
46
44
  cardHeader
47
45
  } = props;
@@ -50,12 +48,11 @@ const BNav = /*#__PURE__*/extend({
50
48
  class: {
51
49
  'nav-tabs': tabs,
52
50
  'nav-pills': pills && !tabs,
53
- 'card-header-tabs': !vertical && cardHeader && tabs,
54
- 'card-header-pills': !vertical && cardHeader && pills && !tabs,
55
- 'flex-column': vertical,
56
- 'nav-fill': !vertical && props.fill,
57
- 'nav-justified': !vertical && props.justified,
58
- [computeJustifyContent(align)]: !vertical && align,
51
+ 'card-header-tabs': cardHeader && tabs,
52
+ 'card-header-pills': cardHeader && pills && !tabs,
53
+ 'nav-fill': props.fill,
54
+ 'nav-justified': props.justified,
55
+ [computeJustifyContent(align)]: align,
59
56
  small: props.small
60
57
  }
61
58
  }), children);
@@ -175,7 +175,6 @@ const props = makePropsConfigurable(sortKeys({
175
175
  // Only applied to the currently active `<b-tab>`
176
176
  // This prop is sniffed by the `<b-tab>` child
177
177
  activeTabClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
178
- card: makeProp(PROP_TYPE_BOOLEAN, false),
179
178
  contentClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
180
179
  // Synonym for 'bottom'
181
180
  end: makeProp(PROP_TYPE_BOOLEAN, false),
@@ -215,13 +214,6 @@ const BTabs = /*#__PURE__*/extend({
215
214
  fade() {
216
215
  // This computed prop is sniffed by the tab child
217
216
  return !this.noFade;
218
- },
219
- localNavClass() {
220
- const classes = [];
221
- if (this.card && this.vertical) {
222
- classes.push('card-header', 'h-100', 'border-bottom-0', 'rounded-0');
223
- }
224
- return [...classes, this.navClass];
225
217
  }
226
218
  },
227
219
  watch: {
@@ -489,7 +481,6 @@ const BTabs = /*#__PURE__*/extend({
489
481
  render(h) {
490
482
  const {
491
483
  align,
492
- card,
493
484
  end,
494
485
  fill,
495
486
  firstTab,
@@ -501,8 +492,7 @@ const BTabs = /*#__PURE__*/extend({
501
492
  pills,
502
493
  previousTab,
503
494
  small,
504
- tabs: $tabs,
505
- vertical
495
+ tabs: $tabs
506
496
  } = this;
507
497
 
508
498
  // Currently active tab
@@ -553,7 +543,7 @@ const BTabs = /*#__PURE__*/extend({
553
543
  });
554
544
  });
555
545
  let $nav = h(BNav, {
556
- class: this.localNavClass,
546
+ class: this.navClass,
557
547
  attrs: {
558
548
  role: 'tablist',
559
549
  id: this.safeId('_BV_tab_controls_')
@@ -564,35 +554,25 @@ const BTabs = /*#__PURE__*/extend({
564
554
  align,
565
555
  tabs: !noNavStyle && !pills,
566
556
  pills: !noNavStyle && pills,
567
- vertical,
568
- small,
569
- cardHeader: card && !vertical
557
+ small
570
558
  },
571
559
  ref: 'nav'
572
560
  }, [this.normalizeSlot(SLOT_NAME_TABS_START) || h(), $buttons, this.normalizeSlot(SLOT_NAME_TABS_END) || h()]);
573
561
  $nav = h('div', {
574
- class: [{
575
- 'card-header': card && !vertical && !end,
576
- 'card-footer': card && !vertical && end,
577
- 'col-auto': vertical
578
- }, this.navWrapperClass],
562
+ class: this.navWrapperClass,
579
563
  key: 'bv-tabs-nav'
580
564
  }, [$nav]);
581
565
  const $children = this.normalizeSlot() || [];
582
566
  let $empty = h();
583
567
  if ($children.length === 0) {
584
568
  $empty = h('div', {
585
- class: ['tab-pane', 'active', {
586
- 'card-body': card
587
- }],
569
+ class: ['tab-pane', 'active'],
588
570
  key: 'bv-empty-tab'
589
571
  }, this.normalizeSlot(SLOT_NAME_EMPTY));
590
572
  }
591
573
  const $content = h('div', {
592
574
  staticClass: 'tab-content',
593
- class: [{
594
- col: vertical
595
- }, this.contentClass],
575
+ class: this.contentClass,
596
576
  attrs: {
597
577
  id: this.safeId('_BV_tab_container_')
598
578
  },
@@ -603,10 +583,6 @@ const BTabs = /*#__PURE__*/extend({
603
583
  // Render final output
604
584
  return h(this.tag, {
605
585
  staticClass: 'tabs',
606
- class: {
607
- row: vertical,
608
- 'no-gutters': vertical && card
609
- },
610
586
  attrs: {
611
587
  id: this.safeId()
612
588
  }
@@ -9,7 +9,6 @@ const DOCUMENT = HAS_DOCUMENT_SUPPORT ? document : {};
9
9
  const NAVIGATOR = HAS_NAVIGATOR_SUPPORT ? navigator : {};
10
10
  const USER_AGENT = (NAVIGATOR.userAgent || '').toLowerCase();
11
11
  const IS_JSDOM = USER_AGENT.indexOf('jsdom') > 0;
12
- const IS_IE = /msie|trident/.test(USER_AGENT);
13
12
 
14
13
  // Determine if the browser supports the option passive for events
15
14
  const HAS_PASSIVE_EVENT_SUPPORT = (() => {
@@ -33,13 +32,5 @@ const HAS_PASSIVE_EVENT_SUPPORT = (() => {
33
32
  }
34
33
  return passiveEventSupported;
35
34
  })();
36
- const HAS_POINTER_EVENT_SUPPORT = IS_BROWSER && Boolean(WINDOW.PointerEvent || WINDOW.MSPointerEvent);
37
35
 
38
- /* istanbul ignore next: JSDOM only checks for 'IntersectionObserver' */
39
- const HAS_INTERACTION_OBSERVER_SUPPORT = IS_BROWSER && 'IntersectionObserver' in WINDOW && 'IntersectionObserverEntry' in WINDOW &&
40
- // Edge 15 and UC Browser lack support for `isIntersecting`
41
- // but we an use `intersectionRatio > 0` instead
42
- // 'isIntersecting' in window.IntersectionObserverEntry.prototype &&
43
- 'intersectionRatio' in WINDOW.IntersectionObserverEntry.prototype;
44
-
45
- export { DOCUMENT, HAS_DOCUMENT_SUPPORT, HAS_INTERACTION_OBSERVER_SUPPORT, HAS_MUTATION_OBSERVER_SUPPORT, HAS_NAVIGATOR_SUPPORT, HAS_PASSIVE_EVENT_SUPPORT, HAS_POINTER_EVENT_SUPPORT, HAS_WINDOW_SUPPORT, IS_BROWSER, IS_IE, IS_JSDOM, NAVIGATOR, USER_AGENT, WINDOW };
36
+ export { DOCUMENT, HAS_DOCUMENT_SUPPORT, HAS_MUTATION_OBSERVER_SUPPORT, HAS_NAVIGATOR_SUPPORT, HAS_PASSIVE_EVENT_SUPPORT, HAS_WINDOW_SUPPORT, IS_BROWSER, IS_JSDOM, NAVIGATOR, USER_AGENT, WINDOW };
@@ -4,9 +4,8 @@ const CODE_ENTER = 13;
4
4
  const CODE_ESC = 27;
5
5
  const CODE_HOME = 36;
6
6
  const CODE_LEFT = 37;
7
- const CODE_PAGEUP = 33;
8
7
  const CODE_RIGHT = 39;
9
8
  const CODE_SPACE = 32;
10
9
  const CODE_UP = 38;
11
10
 
12
- export { CODE_DOWN, CODE_END, CODE_ENTER, CODE_ESC, CODE_HOME, CODE_LEFT, CODE_PAGEUP, CODE_RIGHT, CODE_SPACE, CODE_UP };
11
+ export { CODE_DOWN, CODE_END, CODE_ENTER, CODE_ESC, CODE_HOME, CODE_LEFT, CODE_RIGHT, CODE_SPACE, CODE_UP };
@@ -1,5 +1,3 @@
1
- import { installFactory } from './utils/plugins';
2
- import { componentsPlugin } from './components';
3
1
  export { BVConfigPlugin as BVConfig, BVConfigPlugin } from './bv-config';
4
2
  export { BVToastPlugin } from './components/toast/helpers/bv-toast';
5
3
  export { BBreadcrumb } from './components/breadcrumb/breadcrumb';
@@ -65,18 +63,10 @@ export { VBVisible } from './directives/visible/visible';
65
63
 
66
64
  const NAME = 'BootstrapVue';
67
65
 
68
- // --- BootstrapVue installer ---
69
- const install = /*#__PURE__*/installFactory({
70
- plugins: {
71
- componentsPlugin
72
- }
73
- });
74
-
75
66
  // --- BootstrapVue plugin ---
76
67
  const BootstrapVue = {
77
- install,
78
68
  NAME
79
69
  };
80
70
 
81
71
  export default BootstrapVue;
82
- export { BootstrapVue, NAME, install };
72
+ export { BootstrapVue, NAME };
@@ -1,5 +1,5 @@
1
1
  import { extend } from '../vue';
2
- import { PROP_TYPE_BOOLEAN_STRING, PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../constants/props';
2
+ import { PROP_TYPE_BOOLEAN_STRING, PROP_TYPE_BOOLEAN } from '../constants/props';
3
3
  import { SLOT_NAME_FIRST } from '../constants/slots';
4
4
  import { htmlOrText } from '../utils/html';
5
5
  import { looseEqual } from '../utils/loose-equal';
@@ -38,10 +38,6 @@ const props = makePropsConfigurable(sortKeys({
38
38
  ...props$5,
39
39
  ...props$6,
40
40
  ariaInvalid: makeProp(PROP_TYPE_BOOLEAN_STRING, false),
41
- // Only applicable when rendered with button style
42
- buttonVariant: makeProp(PROP_TYPE_STRING),
43
- // Render as button style
44
- buttons: makeProp(PROP_TYPE_BOOLEAN, false),
45
41
  stacked: makeProp(PROP_TYPE_BOOLEAN, false),
46
42
  validated: makeProp(PROP_TYPE_BOOLEAN, false)
47
43
  }), 'formRadioCheckGroups');
@@ -69,21 +65,11 @@ const formRadioCheckGroupMixin = extend({
69
65
  },
70
66
  groupClasses() {
71
67
  const {
72
- inline,
73
- size,
74
68
  validated
75
69
  } = this;
76
- let classes = {
70
+ return {
77
71
  'was-validated': validated
78
72
  };
79
- if (this.buttons) {
80
- classes = [classes, 'btn-group-toggle', {
81
- 'btn-group': inline,
82
- 'btn-group-vertical': !inline,
83
- [`btn-group-${size}`]: size
84
- }];
85
- }
86
- return classes;
87
73
  }
88
74
  },
89
75
  watch: {
@@ -37,10 +37,6 @@ const props = makePropsConfigurable(sortKeys({
37
37
  ...props$5,
38
38
  ariaLabel: makeProp(PROP_TYPE_STRING),
39
39
  ariaLabelledby: makeProp(PROP_TYPE_STRING),
40
- // Only applicable in standalone mode (non group)
41
- button: makeProp(PROP_TYPE_BOOLEAN, false),
42
- // Only applicable when rendered with button style
43
- buttonVariant: makeProp(PROP_TYPE_STRING),
44
40
  inline: makeProp(PROP_TYPE_BOOLEAN, false),
45
41
  value: makeProp(PROP_TYPE_ANY)
46
42
  }), 'formRadioCheckControls');
@@ -54,8 +50,7 @@ const formRadioCheckMixin = extend({
54
50
  props,
55
51
  data() {
56
52
  return {
57
- localChecked: this.isGroup ? this.bvGroup[MODEL_PROP_NAME] : this[MODEL_PROP_NAME],
58
- hasFocus: false
53
+ localChecked: this.isGroup ? this.bvGroup[MODEL_PROP_NAME] : this[MODEL_PROP_NAME]
59
54
  };
60
55
  },
61
56
  computed: {
@@ -81,19 +76,9 @@ const formRadioCheckMixin = extend({
81
76
  // Is this check/radio a child of check-group or radio-group?
82
77
  return !!this.bvGroup;
83
78
  },
84
- isBtnMode() {
85
- // Support button style in single input mode
86
- return this.isGroup ? this.bvGroup.buttons : this.button;
87
- },
88
- isPlain() {
89
- return this.isBtnMode ? false : this.isGroup ? this.bvGroup.plain : this.plain;
90
- },
91
- isCustom() {
92
- return this.isBtnMode ? false : !this.isPlain;
93
- },
94
79
  isSwitch() {
95
80
  // Custom switch styling (checkboxes only)
96
- return this.isBtnMode || this.isRadio || this.isPlain ? false : this.isGroup ? this.bvGroup.switches : this.switch;
81
+ return this.isRadio ? false : this.isGroup ? this.bvGroup.switches : this.switch;
97
82
  },
98
83
  isInline() {
99
84
  return this.isGroup ? this.bvGroup.inline : this.inline;
@@ -121,33 +106,6 @@ const formRadioCheckMixin = extend({
121
106
  computedState() {
122
107
  return this.isGroup ? this.bvGroup.computedState : isBoolean(this.state) ? this.state : null;
123
108
  },
124
- computedButtonVariant() {
125
- // Local variant preferred over group variant
126
- const {
127
- buttonVariant
128
- } = this;
129
- if (buttonVariant) {
130
- return buttonVariant;
131
- }
132
- if (this.isGroup && this.bvGroup.buttonVariant) {
133
- return this.bvGroup.buttonVariant;
134
- }
135
- return 'secondary';
136
- },
137
- buttonClasses() {
138
- const {
139
- computedSize
140
- } = this;
141
- return ['btn', `btn-${this.computedButtonVariant}`, {
142
- [`btn-${computedSize}`]: computedSize,
143
- // 'disabled' class makes "button" look disabled
144
- disabled: this.isDisabled,
145
- // 'active' class makes "button" look pressed
146
- active: this.isChecked,
147
- // Focus class makes button look focused
148
- focus: this.hasFocus
149
- }];
150
- },
151
109
  computedAttrs() {
152
110
  const {
153
111
  isDisabled: disabled,
@@ -209,17 +167,6 @@ const formRadioCheckMixin = extend({
209
167
  }
210
168
  });
211
169
  },
212
- handleFocus(event) {
213
- // When in buttons mode, we need to add 'focus' class to label when input focused
214
- // As it is the hidden input which has actual focus
215
- if (event.target) {
216
- if (event.type === 'focus') {
217
- this.hasFocus = true;
218
- } else if (event.type === 'blur') {
219
- this.hasFocus = false;
220
- }
221
- }
222
- },
223
170
  // Convenience methods for focusing the input
224
171
  focus() {
225
172
  if (!this.isDisabled) {
@@ -235,9 +182,6 @@ const formRadioCheckMixin = extend({
235
182
  render(h) {
236
183
  const {
237
184
  isRadio,
238
- isBtnMode,
239
- isPlain,
240
- isCustom,
241
185
  isInline,
242
186
  isSwitch,
243
187
  computedSize,
@@ -245,12 +189,7 @@ const formRadioCheckMixin = extend({
245
189
  } = this;
246
190
  const $content = this.normalizeSlot();
247
191
  const $input = h('input', {
248
- class: [{
249
- 'form-check-input': isPlain,
250
- 'custom-control-input': isCustom,
251
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/2911
252
- 'position-static': isPlain && !$content
253
- }, isBtnMode ? '' : this.stateClass],
192
+ class: ['custom-control-input', this.stateClass],
254
193
  directives: [{
255
194
  name: 'model',
256
195
  value: this.computedLocalChecked
@@ -261,55 +200,26 @@ const formRadioCheckMixin = extend({
261
200
  checked: this.isChecked
262
201
  },
263
202
  on: {
264
- change: this.handleChange,
265
- ...(isBtnMode ? {
266
- focus: this.handleFocus,
267
- blur: this.handleFocus
268
- } : {})
203
+ change: this.handleChange
269
204
  },
270
205
  key: 'input',
271
206
  ref: 'input'
272
207
  });
273
- if (isBtnMode) {
274
- let $button = h('label', {
275
- class: this.buttonClasses
276
- }, [$input, $content]);
277
- if (!this.isGroup) {
278
- // Standalone button mode, so wrap in 'btn-group-toggle'
279
- // and flag it as inline-block to mimic regular buttons
280
- $button = h('div', {
281
- class: ['btn-group-toggle', 'd-inline-block']
282
- }, [$button]);
208
+ const $label = h('label', {
209
+ class: 'custom-control-label',
210
+ attrs: {
211
+ for: this.safeId()
283
212
  }
284
- return $button;
285
- }
286
-
287
- // If no label content in plain mode we dont render the label
288
- // See: https://github.com/bootstrap-vue/bootstrap-vue/issues/2911
289
- let $label = h();
290
- if (!(isPlain && !$content)) {
291
- $label = h('label', {
292
- class: {
293
- 'form-check-label': isPlain,
294
- 'custom-control-label': isCustom
295
- },
296
- attrs: {
297
- for: this.safeId()
298
- }
299
- }, $content);
300
- }
213
+ }, $content);
301
214
  return h('div', {
302
215
  class: [{
303
- 'form-check': isPlain,
304
- 'form-check-inline': isPlain && isInline,
305
- 'custom-control': isCustom,
306
- 'custom-control-inline': isCustom && isInline,
307
- 'custom-checkbox': isCustom && !isRadio && !isSwitch,
216
+ 'custom-control-inline': isInline,
217
+ 'custom-checkbox': !isRadio && !isSwitch,
308
218
  'custom-switch': isSwitch,
309
- 'custom-radio': isCustom && isRadio,
219
+ 'custom-radio': isRadio,
310
220
  // Temporary until Bootstrap v4 supports sizing (most likely in V5)
311
- [`b-custom-control-${computedSize}`]: computedSize && !isBtnMode
312
- }, bvAttrs.class],
221
+ [`b-custom-control-${computedSize}`]: computedSize
222
+ }, 'custom-control', bvAttrs.class],
313
223
  style: bvAttrs.style
314
224
  }, [$input, $label]);
315
225
  }
@@ -47,32 +47,6 @@ const installFactory = function () {
47
47
  return install;
48
48
  };
49
49
 
50
- /**
51
- * Plugin install factory function (no plugin config option).
52
- * @param {object} { components, directives }
53
- * @returns {function} plugin install function
54
- */
55
- const installFactoryNoConfig = function () {
56
- let {
57
- components,
58
- directives,
59
- plugins
60
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
61
- const install = Vue => {
62
- if (install.installed) {
63
- /* istanbul ignore next */
64
- return;
65
- }
66
- install.installed = true;
67
- checkMultipleVue(Vue);
68
- registerComponents(Vue, components);
69
- registerDirectives(Vue, directives);
70
- registerPlugins(Vue, plugins);
71
- };
72
- install.installed = false;
73
- return install;
74
- };
75
-
76
50
  /**
77
51
  * Plugin object factory function.
78
52
  * @param {object} { components, directives, plugins }
@@ -87,20 +61,6 @@ const pluginFactory = function () {
87
61
  };
88
62
  };
89
63
 
90
- /**
91
- * Plugin object factory function (no config option).
92
- * @param {object} { components, directives, plugins }
93
- * @returns {object} plugin install object
94
- */
95
- const pluginFactoryNoConfig = function () {
96
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
97
- let extend = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
98
- return {
99
- ...extend,
100
- install: installFactoryNoConfig(options)
101
- };
102
- };
103
-
104
64
  /**
105
65
  * Load a group of plugins.
106
66
  * @param {object} Vue
@@ -180,4 +140,4 @@ const vueUse = VuePlugin => {
180
140
  }
181
141
  };
182
142
 
183
- export { checkMultipleVue, installFactory, installFactoryNoConfig, pluginFactory, pluginFactoryNoConfig, registerComponent, registerComponents, registerDirective, registerDirectives, registerPlugins, vueUse };
143
+ export { checkMultipleVue, installFactory, pluginFactory, registerComponent, registerComponents, registerDirective, registerDirectives, registerPlugins, vueUse };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "101.16.0",
3
+ "version": "102.1.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -1,3 +1,12 @@
1
+ /**
2
+ * This component has been migrated to the Duo-UI library (https://gitlab.com/gitlab-org/duo-ui).
3
+ *
4
+ * Please use the corresponding component in Duo-UI going forward.
5
+ * All future development and maintenance for Duo components should take place in Duo-UI.
6
+ *
7
+ * For more details, see the migration epic: https://gitlab.com/groups/gitlab-org/-/epics/15344 or reach out to the Duo-Chat team in #g_duo_chat.
8
+ */
9
+
1
10
  export const CONTEXT_ITEM_CATEGORY_ISSUE = 'issue';
2
11
  export const CONTEXT_ITEM_CATEGORY_MERGE_REQUEST = 'merge_request';
3
12
  export const CONTEXT_ITEM_CATEGORY_FILE = 'file';
@@ -1,4 +1,13 @@
1
1
  <script>
2
+ /**
3
+ * This component has been migrated to the Duo-UI library (https://gitlab.com/gitlab-org/duo-ui).
4
+ *
5
+ * Please use the corresponding component in Duo-UI going forward.
6
+ * All future development and maintenance for Duo components should take place in Duo-UI.
7
+ *
8
+ * For more details, see the migration epic: https://gitlab.com/groups/gitlab-org/-/epics/15344 or reach out to the Duo-Chat team in #g_duo_chat.
9
+ */
10
+
2
11
  import { nextTick } from 'vue';
3
12
  import { contextItemValidator } from '../utils';
4
13
  import GlModal from '../../../../../../base/modal/modal.vue';
@@ -106,6 +115,9 @@ export default {
106
115
  if (this.contextItem.category !== CONTEXT_ITEM_CATEGORY_DEPENDENCY) {
107
116
  return null;
108
117
  }
118
+ if (!this.contextItem.content) {
119
+ return null;
120
+ }
109
121
 
110
122
  try {
111
123
  return JSON.parse(this.contextItem.content);
@@ -1,3 +1,12 @@
1
+ <!--
2
+ This component has been migrated to the Duo-UI library (https://gitlab.com/gitlab-org/duo-ui).
3
+
4
+ Please use the corresponding component in Duo-UI going forward.
5
+ All future development and maintenance for Duo components should take place in Duo-UI.
6
+
7
+ For more details, see the migration epic: https://gitlab.com/groups/gitlab-org/-/epics/15344 or reach out to the Duo-Chat team in #g_duo_chat.
8
+ -->
9
+
1
10
  Allows selecting and removing context items for the conversation.
2
11
 
3
12
  **Note:**
@@ -12,15 +21,15 @@ The component expects items with specific display properties:
12
21
  export type AIContextItem = {
13
22
  id: string;
14
23
  category: 'file' | 'snippet' | 'issue' | 'merge_request' | 'dependency';
15
-
24
+
16
25
  content?: string; // some categories allow loading/displaying content in the details-modal
17
-
26
+
18
27
  metadata: {
19
28
  icon: string; // should be a valid gitlab-ui icon name
20
29
  title: string;
21
30
  secondaryText: string;
22
31
  subTypeLabel: string;
23
-
32
+
24
33
  // Additional properties some categories have to help differentiate results
25
34
  project?: string;
26
35
  repositoryName?: string;
@@ -1,4 +1,13 @@
1
1
  <script>
2
+ /**
3
+ * This component has been migrated to the Duo-UI library (https://gitlab.com/gitlab-org/duo-ui).
4
+ *
5
+ * Please use the corresponding component in Duo-UI going forward.
6
+ * All future development and maintenance for Duo components should take place in Duo-UI.
7
+ *
8
+ * For more details, see the migration epic: https://gitlab.com/groups/gitlab-org/-/epics/15344 or reach out to the Duo-Chat team in #g_duo_chat.
9
+ */
10
+
2
11
  import debounce from 'lodash/debounce';
3
12
  import { translate } from '../../../../../../../utils/i18n';
4
13
  import GlCard from '../../../../../../base/card/card.vue';
@@ -1,4 +1,13 @@
1
1
  <script>
2
+ /**
3
+ * This component has been migrated to the Duo-UI library (https://gitlab.com/gitlab-org/duo-ui).
4
+ *
5
+ * Please use the corresponding component in Duo-UI going forward.
6
+ * All future development and maintenance for Duo components should take place in Duo-UI.
7
+ *
8
+ * For more details, see the migration epic: https://gitlab.com/groups/gitlab-org/-/epics/15344 or reach out to the Duo-Chat team in #g_duo_chat.
9
+ */
10
+
2
11
  import GlDropdownItem from '../../../../../../base/dropdown/dropdown_item.vue';
3
12
  import GlIcon from '../../../../../../base/icon/icon.vue';
4
13
  import { categoriesValidator } from '../utils';
@@ -1,4 +1,13 @@
1
1
  <script>
2
+ /**
3
+ * This component has been migrated to the Duo-UI library (https://gitlab.com/gitlab-org/duo-ui).
4
+ *
5
+ * Please use the corresponding component in Duo-UI going forward.
6
+ * All future development and maintenance for Duo components should take place in Duo-UI.
7
+ *
8
+ * For more details, see the migration epic: https://gitlab.com/groups/gitlab-org/-/epics/15344 or reach out to the Duo-Chat team in #g_duo_chat.
9
+ */
10
+
2
11
  import GlDuoChatContextItemPopover from '../duo_chat_context_item_popover/duo_chat_context_item_popover.vue';
3
12
  import GlTruncate from '../../../../../../utilities/truncate/truncate.vue';
4
13
  import GlIcon from '../../../../../../base/icon/icon.vue';
@@ -1,4 +1,13 @@
1
1
  <script>
2
+ /**
3
+ * This component has been migrated to the Duo-UI library (https://gitlab.com/gitlab-org/duo-ui).
4
+ *
5
+ * Please use the corresponding component in Duo-UI going forward.
6
+ * All future development and maintenance for Duo components should take place in Duo-UI.
7
+ *
8
+ * For more details, see the migration epic: https://gitlab.com/groups/gitlab-org/-/epics/15344 or reach out to the Duo-Chat team in #g_duo_chat.
9
+ */
10
+
2
11
  import GlDropdownItem from '../../../../../../base/dropdown/dropdown_item.vue';
3
12
  import GlFormInput from '../../../../../../base/form/form_input/form_input.vue';
4
13
  import GlAlert from '../../../../../../base/alert/alert.vue';