@gitlab/ui 81.1.0 → 82.0.1

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,33 @@
1
+ ## [82.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v82.0.0...v82.0.1) (2024-06-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **GlPopover:** properly align the close button without title ([e4f314f](https://gitlab.com/gitlab-org/gitlab-ui/commit/e4f314f1113058b12f3af65921bc4145b0a47155))
7
+
8
+ # [82.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v81.1.0...v82.0.0) (2024-06-18)
9
+
10
+
11
+ ### chore
12
+
13
+ * update deprecated division syntax to use math.div ([153c5ba](https://gitlab.com/gitlab-org/gitlab-ui/commit/153c5baea95f5fec7aba89c7061e7cdb7dec8870))
14
+
15
+
16
+ ### Features
17
+
18
+ * **DuoChat:** Add check for loading icon in spec ([67fca11](https://gitlab.com/gitlab-org/gitlab-ui/commit/67fca116e7bb7f01a5cc37f0f715b0442673fdf3))
19
+ * **DuoChat:** Add story for message population ([b94cbe1](https://gitlab.com/gitlab-org/gitlab-ui/commit/b94cbe1eda0dca1e0a6874f6ba29fca501c98a67))
20
+ * **DuoChat:** Improve the message response while generating ([56a7852](https://gitlab.com/gitlab-org/gitlab-ui/commit/56a78520a760fd627720294bea9ceb58da4555be))
21
+ * **DuoChat:** Remove computed streaming logic ([bfab065](https://gitlab.com/gitlab-org/gitlab-ui/commit/bfab065842d5a9829938d300794f8974b2c32fc9))
22
+ * **DuoChat:** Update test for loading icon ([b986944](https://gitlab.com/gitlab-org/gitlab-ui/commit/b986944f08afe4a8ed11f277ec98bd187efb76de))
23
+
24
+
25
+ ### BREAKING CHANGES
26
+
27
+ * This makes GitLab UI's stylesheets incompatible with
28
+ `libsass` which does not support `math.div`. Consuming the stylesheets
29
+ now requires `dart-sass`.
30
+
1
31
  # [81.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v81.0.0...v81.1.0) (2024-06-17)
2
32
 
3
33
 
@@ -52,11 +52,14 @@ var script = {
52
52
  }
53
53
  },
54
54
  computed: {
55
+ hasTitle() {
56
+ return this.$scopedSlots.title || this.title;
57
+ },
55
58
  customClass() {
56
- return ['gl-popover', ...this.cssClasses].join(' ');
59
+ return ['gl-popover', this.hasTitle && 'has-title', this.showCloseButton && 'has-close-button', ...this.cssClasses].filter(Boolean).join(' ');
57
60
  },
58
61
  shouldShowTitle() {
59
- return this.$scopedSlots.title || this.title || this.showCloseButton;
62
+ return this.hasTitle || this.showCloseButton;
60
63
  }
61
64
  },
62
65
  methods: {
@@ -75,7 +78,7 @@ var script = {
75
78
  const __vue_script__ = script;
76
79
 
77
80
  /* template */
78
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-popover',_vm._g(_vm._b({ref:_vm.$options.popoverRefName,attrs:{"custom-class":_vm.customClass,"triggers":_vm.triggers,"title":_vm.title,"placement":_vm.placement,"boundary-padding":_vm.boundaryPadding},scopedSlots:_vm._u([(_vm.shouldShowTitle)?{key:"title",fn:function(){return [_vm._t("title",function(){return [_vm._v("\n "+_vm._s(_vm.title)+"\n ")]}),_vm._v(" "),(_vm.showCloseButton)?_c('div',{staticClass:"gl-mt-n2 gl-mr-n3 gl-ml-3 gl-h-0"},[_c('close-button',{attrs:{"data-testid":"close-button"},on:{"click":_vm.close}})],1):_vm._e()]},proxy:true}:null],null,true)},'b-popover',_vm.$attrs,false),_vm.$listeners),[_vm._v(" "),_vm._t("default")],2)};
81
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-popover',_vm._g(_vm._b({ref:_vm.$options.popoverRefName,attrs:{"custom-class":_vm.customClass,"triggers":_vm.triggers,"title":_vm.title,"placement":_vm.placement,"boundary-padding":_vm.boundaryPadding},scopedSlots:_vm._u([(_vm.shouldShowTitle)?{key:"title",fn:function(){return [_vm._t("title",function(){return [_vm._v("\n "+_vm._s(_vm.title)+"\n ")]}),_vm._v(" "),(_vm.showCloseButton)?_c('div',{staticClass:"gl-mt-n2 gl-mr-n3 gl-ml-3 gl-h-0"},[_c('close-button',{class:{ 'gl-float-right gl-mt-2': !_vm.hasTitle },attrs:{"data-testid":"close-button"},on:{"click":_vm.close}})],1):_vm._e()]},proxy:true}:null],null,true)},'b-popover',_vm.$attrs,false),_vm.$listeners),[_vm._v(" "),_vm._t("default")],2)};
79
82
  var __vue_staticRenderFns__ = [];
80
83
 
81
84
  /* style */
@@ -1,4 +1,5 @@
1
1
  import GlIcon from '../../../../../base/icon/icon';
2
+ import GlLoadingIcon from '../../../../../base/loading_icon/loading_icon';
2
3
  import { GlTooltipDirective } from '../../../../../../directives/tooltip';
3
4
  import GlDuoUserFeedback from '../../../user_feedback/user_feedback';
4
5
  import GlFormGroup from '../../../../../base/form/form_group/form_group';
@@ -33,7 +34,8 @@ var script = {
33
34
  GlDuoUserFeedback,
34
35
  GlFormGroup,
35
36
  GlFormTextarea,
36
- GlIcon
37
+ GlIcon,
38
+ GlLoadingIcon
37
39
  },
38
40
  directives: {
39
41
  SafeHtml: SafeHtmlDirective,
@@ -182,7 +184,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
182
184
  _vm.isAssistantMessage,
183
185
  'gl-bg-white': _vm.isAssistantMessage && !_vm.error,
184
186
  'gl-bg-red-50 gl-border-none!': _vm.error,
185
- }},[(_vm.error)?_c('gl-icon',{staticClass:"gl-text-red-600 gl-border gl-border-red-500 gl-rounded-full gl-mr-3 gl-flex-shrink-0 error-icon",attrs:{"aria-label":_vm.$options.i18n.MESSAGE_ERROR,"name":"status_warning_borderless","size":16,"data-testid":"error"}}):_vm._e(),_vm._v(" "),_c('div',{ref:"content-wrapper",class:{ 'has-error': _vm.error }},[(_vm.error)?_c('div',{ref:"error-message"},[_vm._v(_vm._s(_vm.error))]):_c('div',[_c('div',{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfigExtension]",value:(_vm.messageContent),expression:"messageContent",arg:_vm.$options.safeHtmlConfigExtension}],ref:"content"}),_vm._v(" "),(_vm.isAssistantMessage)?[(_vm.sources)?_c('documentation-sources',{attrs:{"sources":_vm.sources}}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-display-flex gl-align-items-flex-end gl-mt-4 duo-chat-message-feedback"},[_c('gl-duo-user-feedback',{attrs:{"feedback-received":_vm.hasFeedback,"modal-title":_vm.$options.i18n.MODAL.TITLE,"modal-alert":_vm.$options.i18n.MODAL.ALERT_TEXT},on:{"feedback":_vm.logEvent},scopedSlots:_vm._u([{key:"feedback-extra-fields",fn:function(){return [_c('gl-form-group',{attrs:{"label":_vm.$options.i18n.MODAL.DID_WHAT,"optional":""}},[_c('gl-form-textarea',{attrs:{"placeholder":_vm.$options.i18n.MODAL.INTERACTION},model:{value:(_vm.didWhat),callback:function ($$v) {_vm.didWhat=$$v;},expression:"didWhat"}})],1),_vm._v(" "),_c('gl-form-group',{attrs:{"label":_vm.$options.i18n.MODAL.IMPROVE_WHAT,"optional":""}},[_c('gl-form-textarea',{attrs:{"placeholder":_vm.$options.i18n.MODAL.BETTER_RESPONSE},model:{value:(_vm.improveWhat),callback:function ($$v) {_vm.improveWhat=$$v;},expression:"improveWhat"}})],1)]},proxy:true}],null,false,419229417)})],1)]:_vm._e()],2)])],1)};
187
+ }},[(_vm.error)?_c('gl-icon',{staticClass:"gl-text-red-600 gl-border gl-border-red-500 gl-rounded-full gl-mr-3 gl-flex-shrink-0 error-icon",attrs:{"aria-label":_vm.$options.i18n.MESSAGE_ERROR,"name":"status_warning_borderless","size":16,"data-testid":"error"}}):_vm._e(),_vm._v(" "),_c('div',{ref:"content-wrapper",class:{ 'has-error': _vm.error }},[(_vm.error)?_c('div',{ref:"error-message"},[_vm._v(_vm._s(_vm.error))]):_c('div',[_c('div',{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfigExtension]",value:(_vm.messageContent),expression:"messageContent",arg:_vm.$options.safeHtmlConfigExtension}],ref:"content"}),_vm._v(" "),(_vm.isAssistantMessage)?[(_vm.sources)?_c('documentation-sources',{attrs:{"sources":_vm.sources}}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-display-flex gl-align-items-flex-end gl-mt-4 duo-chat-message-feedback"},[(_vm.isChunk)?_c('gl-loading-icon',{staticClass:"gl-pt-4",attrs:{"variant":"dots","inline":""}}):_vm._e(),_vm._v(" "),(!_vm.isChunk)?_c('gl-duo-user-feedback',{attrs:{"feedback-received":_vm.hasFeedback,"modal-title":_vm.$options.i18n.MODAL.TITLE,"modal-alert":_vm.$options.i18n.MODAL.ALERT_TEXT},on:{"feedback":_vm.logEvent},scopedSlots:_vm._u([{key:"feedback-extra-fields",fn:function(){return [_c('gl-form-group',{attrs:{"label":_vm.$options.i18n.MODAL.DID_WHAT,"optional":""}},[_c('gl-form-textarea',{attrs:{"placeholder":_vm.$options.i18n.MODAL.INTERACTION},model:{value:(_vm.didWhat),callback:function ($$v) {_vm.didWhat=$$v;},expression:"didWhat"}})],1),_vm._v(" "),_c('gl-form-group',{attrs:{"label":_vm.$options.i18n.MODAL.IMPROVE_WHAT,"optional":""}},[_c('gl-form-textarea',{attrs:{"placeholder":_vm.$options.i18n.MODAL.BETTER_RESPONSE},model:{value:(_vm.improveWhat),callback:function ($$v) {_vm.improveWhat=$$v;},expression:"improveWhat"}})],1)]},proxy:true}],null,false,419229417)}):_vm._e()],1)]:_vm._e()],2)])],1)};
186
188
  var __vue_staticRenderFns__ = [];
187
189
 
188
190
  /* style */
package/dist/config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BVConfigPlugin } from 'bootstrap-vue/esm/index.js';
2
2
  import Vue from 'vue';
3
- import translationKeys from '../translations.json';
3
+ import translationKeys from '../translations';
4
4
  import { tooltipDelay } from './utils/constants';
5
5
 
6
6
  const bFormTextGlobalConfig = {