@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
@@ -38,10 +38,6 @@ export const props = makePropsConfigurable(
38
38
  ...formCustomProps,
39
39
  ariaLabel: makeProp(PROP_TYPE_STRING),
40
40
  ariaLabelledby: makeProp(PROP_TYPE_STRING),
41
- // Only applicable in standalone mode (non group)
42
- button: makeProp(PROP_TYPE_BOOLEAN, false),
43
- // Only applicable when rendered with button style
44
- buttonVariant: makeProp(PROP_TYPE_STRING),
45
41
  inline: makeProp(PROP_TYPE_BOOLEAN, false),
46
42
  value: makeProp(PROP_TYPE_ANY)
47
43
  }),
@@ -66,8 +62,7 @@ export const formRadioCheckMixin = extend({
66
62
  props,
67
63
  data() {
68
64
  return {
69
- localChecked: this.isGroup ? this.bvGroup[MODEL_PROP_NAME] : this[MODEL_PROP_NAME],
70
- hasFocus: false
65
+ localChecked: this.isGroup ? this.bvGroup[MODEL_PROP_NAME] : this[MODEL_PROP_NAME]
71
66
  }
72
67
  },
73
68
  computed: {
@@ -93,23 +88,9 @@ export const formRadioCheckMixin = extend({
93
88
  // Is this check/radio a child of check-group or radio-group?
94
89
  return !!this.bvGroup
95
90
  },
96
- isBtnMode() {
97
- // Support button style in single input mode
98
- return this.isGroup ? this.bvGroup.buttons : this.button
99
- },
100
- isPlain() {
101
- return this.isBtnMode ? false : this.isGroup ? this.bvGroup.plain : this.plain
102
- },
103
- isCustom() {
104
- return this.isBtnMode ? false : !this.isPlain
105
- },
106
91
  isSwitch() {
107
92
  // Custom switch styling (checkboxes only)
108
- return this.isBtnMode || this.isRadio || this.isPlain
109
- ? false
110
- : this.isGroup
111
- ? this.bvGroup.switches
112
- : this.switch
93
+ return this.isRadio ? false : this.isGroup ? this.bvGroup.switches : this.switch
113
94
  },
114
95
  isInline() {
115
96
  return this.isGroup ? this.bvGroup.inline : this.inline
@@ -137,33 +118,6 @@ export const formRadioCheckMixin = extend({
137
118
  computedState() {
138
119
  return this.isGroup ? this.bvGroup.computedState : isBoolean(this.state) ? this.state : null
139
120
  },
140
- computedButtonVariant() {
141
- // Local variant preferred over group variant
142
- const { buttonVariant } = this
143
- if (buttonVariant) {
144
- return buttonVariant
145
- }
146
- if (this.isGroup && this.bvGroup.buttonVariant) {
147
- return this.bvGroup.buttonVariant
148
- }
149
- return 'secondary'
150
- },
151
- buttonClasses() {
152
- const { computedSize } = this
153
- return [
154
- 'btn',
155
- `btn-${this.computedButtonVariant}`,
156
- {
157
- [`btn-${computedSize}`]: computedSize,
158
- // 'disabled' class makes "button" look disabled
159
- disabled: this.isDisabled,
160
- // 'active' class makes "button" look pressed
161
- active: this.isChecked,
162
- // Focus class makes button look focused
163
- focus: this.hasFocus
164
- }
165
- ]
166
- },
167
121
  computedAttrs() {
168
122
  const { isDisabled: disabled, isRequired: required } = this
169
123
 
@@ -218,17 +172,6 @@ export const formRadioCheckMixin = extend({
218
172
  }
219
173
  })
220
174
  },
221
- handleFocus(event) {
222
- // When in buttons mode, we need to add 'focus' class to label when input focused
223
- // As it is the hidden input which has actual focus
224
- if (event.target) {
225
- if (event.type === 'focus') {
226
- this.hasFocus = true
227
- } else if (event.type === 'blur') {
228
- this.hasFocus = false
229
- }
230
- }
231
- },
232
175
 
233
176
  // Convenience methods for focusing the input
234
177
  focus() {
@@ -236,6 +179,7 @@ export const formRadioCheckMixin = extend({
236
179
  attemptFocus(this.$refs.input)
237
180
  }
238
181
  },
182
+
239
183
  blur() {
240
184
  if (!this.isDisabled) {
241
185
  attemptBlur(this.$refs.input)
@@ -243,28 +187,11 @@ export const formRadioCheckMixin = extend({
243
187
  }
244
188
  },
245
189
  render(h) {
246
- const {
247
- isRadio,
248
- isBtnMode,
249
- isPlain,
250
- isCustom,
251
- isInline,
252
- isSwitch,
253
- computedSize,
254
- bvAttrs
255
- } = this
190
+ const { isRadio, isInline, isSwitch, computedSize, bvAttrs } = this
256
191
  const $content = this.normalizeSlot()
257
192
 
258
193
  const $input = h('input', {
259
- class: [
260
- {
261
- 'form-check-input': isPlain,
262
- 'custom-control-input': isCustom,
263
- // https://github.com/bootstrap-vue/bootstrap-vue/issues/2911
264
- 'position-static': isPlain && !$content
265
- },
266
- isBtnMode ? '' : this.stateClass
267
- ],
194
+ class: ['custom-control-input', this.stateClass],
268
195
  directives: [{ name: 'model', value: this.computedLocalChecked }],
269
196
  attrs: this.computedAttrs,
270
197
  domProps: {
@@ -272,56 +199,34 @@ export const formRadioCheckMixin = extend({
272
199
  checked: this.isChecked
273
200
  },
274
201
  on: {
275
- change: this.handleChange,
276
- ...(isBtnMode ? { focus: this.handleFocus, blur: this.handleFocus } : {})
202
+ change: this.handleChange
277
203
  },
278
204
  key: 'input',
279
205
  ref: 'input'
280
206
  })
281
207
 
282
- if (isBtnMode) {
283
- let $button = h('label', { class: this.buttonClasses }, [$input, $content])
284
- if (!this.isGroup) {
285
- // Standalone button mode, so wrap in 'btn-group-toggle'
286
- // and flag it as inline-block to mimic regular buttons
287
- $button = h('div', { class: ['btn-group-toggle', 'd-inline-block'] }, [$button])
288
- }
289
-
290
- return $button
291
- }
292
-
293
- // If no label content in plain mode we dont render the label
294
- // See: https://github.com/bootstrap-vue/bootstrap-vue/issues/2911
295
- let $label = h()
296
- if (!(isPlain && !$content)) {
297
- $label = h(
298
- 'label',
299
- {
300
- class: {
301
- 'form-check-label': isPlain,
302
- 'custom-control-label': isCustom
303
- },
304
- attrs: { for: this.safeId() }
305
- },
306
- $content
307
- )
308
- }
208
+ const $label = h(
209
+ 'label',
210
+ {
211
+ class: 'custom-control-label',
212
+ attrs: { for: this.safeId() }
213
+ },
214
+ $content
215
+ )
309
216
 
310
217
  return h(
311
218
  'div',
312
219
  {
313
220
  class: [
314
221
  {
315
- 'form-check': isPlain,
316
- 'form-check-inline': isPlain && isInline,
317
- 'custom-control': isCustom,
318
- 'custom-control-inline': isCustom && isInline,
319
- 'custom-checkbox': isCustom && !isRadio && !isSwitch,
222
+ 'custom-control-inline': isInline,
223
+ 'custom-checkbox': !isRadio && !isSwitch,
320
224
  'custom-switch': isSwitch,
321
- 'custom-radio': isCustom && isRadio,
225
+ 'custom-radio': isRadio,
322
226
  // Temporary until Bootstrap v4 supports sizing (most likely in V5)
323
- [`b-custom-control-${computedSize}`]: computedSize && !isBtnMode
227
+ [`b-custom-control-${computedSize}`]: computedSize
324
228
  },
229
+ 'custom-control',
325
230
  bvAttrs.class
326
231
  ],
327
232
  style: bvAttrs.style
@@ -1,6 +1,5 @@
1
1
  import { createLocalVue } from '@vue/test-utils'
2
2
  import { isVue3 } from '../../src/vue'
3
- import { BootstrapVue } from '../../src'
4
3
  import { ToastPlugin } from '../../src/components/toast'
5
4
  import { BVConfigPlugin } from '../../src/bv-config'
6
5
  import { setConfig, resetConfig } from './config-set'
@@ -73,23 +72,6 @@ describe('utils/config', () => {
73
72
  })
74
73
 
75
74
  if (!isVue3) {
76
- // We do not have complete localVue support, so resetting config does not work in proper way
77
- it('config via Vue.use(BootstrapVue) works', async () => {
78
- const localVue = createLocalVue()
79
- const config = {
80
- BButton: { variant: 'foobar' }
81
- }
82
-
83
- expect(getConfig()).toEqual({})
84
-
85
- localVue.use(BootstrapVue, config)
86
- expect(getConfig()).toEqual(config)
87
-
88
- // Reset the configuration
89
- resetConfig()
90
- expect(getConfig()).toEqual({})
91
- })
92
-
93
75
  it('config via Vue.use(ComponentPlugin) works', async () => {
94
76
  const localVue = createLocalVue()
95
77
  const config = {
@@ -49,29 +49,6 @@ export const installFactory = ({ components, directives, plugins } = {}) => {
49
49
  return install
50
50
  }
51
51
 
52
- /**
53
- * Plugin install factory function (no plugin config option).
54
- * @param {object} { components, directives }
55
- * @returns {function} plugin install function
56
- */
57
- export const installFactoryNoConfig = ({ components, directives, plugins } = {}) => {
58
- const install = Vue => {
59
- if (install.installed) {
60
- /* istanbul ignore next */
61
- return
62
- }
63
- install.installed = true
64
- checkMultipleVue(Vue)
65
- registerComponents(Vue, components)
66
- registerDirectives(Vue, directives)
67
- registerPlugins(Vue, plugins)
68
- }
69
-
70
- install.installed = false
71
-
72
- return install
73
- }
74
-
75
52
  /**
76
53
  * Plugin object factory function.
77
54
  * @param {object} { components, directives, plugins }
@@ -82,16 +59,6 @@ export const pluginFactory = (options = {}, extend = {}) => ({
82
59
  install: installFactory(options)
83
60
  })
84
61
 
85
- /**
86
- * Plugin object factory function (no config option).
87
- * @param {object} { components, directives, plugins }
88
- * @returns {object} plugin install object
89
- */
90
- export const pluginFactoryNoConfig = (options = {}, extend = {}) => ({
91
- ...extend,
92
- install: installFactoryNoConfig(options)
93
- })
94
-
95
62
  /**
96
63
  * Load a group of plugins.
97
64
  * @param {object} Vue
@@ -1,8 +0,0 @@
1
- import { vueUse } from './utils/plugins';
2
- import { BootstrapVue } from './index';
3
- export { BootstrapVue as default } from './index';
4
-
5
- // Main entry point for the browser build
6
-
7
- // Auto installation only occurs if window.Vue exists
8
- vueUse(BootstrapVue);
@@ -1,11 +0,0 @@
1
- import { pluginFactory } from '../utils/plugins';
2
- import { ToastPlugin } from './toast';
3
-
4
- // Main plugin to install all component group plugins
5
- const componentsPlugin = /*#__PURE__*/pluginFactory({
6
- plugins: {
7
- ToastPlugin
8
- }
9
- });
10
-
11
- export { componentsPlugin };
@@ -1,3 +0,0 @@
1
- const CLASS_NAME_SHOW = 'show';
2
-
3
- export { CLASS_NAME_SHOW };
@@ -1,9 +0,0 @@
1
- // Main entry point for the browser build
2
- import { vueUse } from './utils/plugins'
3
-
4
- import { BootstrapVue } from './index'
5
-
6
- // Auto installation only occurs if window.Vue exists
7
- vueUse(BootstrapVue)
8
-
9
- export default BootstrapVue
@@ -1,11 +0,0 @@
1
- import { pluginFactory } from '../utils/plugins'
2
-
3
- // Component group plugins
4
- import { ToastPlugin } from './toast'
5
-
6
- // Main plugin to install all component group plugins
7
- export const componentsPlugin = /*#__PURE__*/ pluginFactory({
8
- plugins: {
9
- ToastPlugin
10
- }
11
- })
@@ -1 +0,0 @@
1
- export const CLASS_NAME_SHOW = 'show'