@gitlab/ui 71.7.0 → 71.8.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.
- package/CHANGELOG.md +14 -0
- package/dist/components/base/banner/banner.js +0 -9
- package/dist/components/experimental/duo/chat/duo_chat.js +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/package.json +2 -2
- package/src/components/base/banner/banner.stories.js +0 -8
- package/src/components/base/banner/banner.vue +0 -9
- package/src/components/experimental/duo/chat/duo_chat.vue +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [71.8.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v71.7.1...v71.8.0) (2023-12-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlBanner:** remove embedded property ([b024100](https://gitlab.com/gitlab-org/gitlab-ui/commit/b02410025fbb4efa7704081e0c0c2a9bd01e3216))
|
|
7
|
+
|
|
8
|
+
## [71.7.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v71.7.0...v71.7.1) (2023-12-08)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **GlDuoChat:** better align slash commands ([e171560](https://gitlab.com/gitlab-org/gitlab-ui/commit/e171560b638e39b3315c32514442ffb5786d2a6c))
|
|
14
|
+
|
|
1
15
|
# [71.7.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v71.6.1...v71.7.0) (2023-12-07)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -68,14 +68,6 @@ var script = {
|
|
|
68
68
|
type: String,
|
|
69
69
|
required: false,
|
|
70
70
|
default: 'Dismiss'
|
|
71
|
-
},
|
|
72
|
-
/**
|
|
73
|
-
* Removes the border for banners embedded in content.
|
|
74
|
-
*/
|
|
75
|
-
embedded: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
required: false,
|
|
78
|
-
default: null
|
|
79
71
|
}
|
|
80
72
|
},
|
|
81
73
|
computed: {
|
|
@@ -111,7 +103,6 @@ const __vue_script__ = script;
|
|
|
111
103
|
/* template */
|
|
112
104
|
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-card',{staticClass:"gl-pl-6 gl-pr-8 gl-py-6",class:{
|
|
113
105
|
'gl-banner-introduction': _vm.isIntroducing,
|
|
114
|
-
'gl-border-none!': _vm.embedded,
|
|
115
106
|
'gl-bg-gray-10!': !_vm.isIntroducing,
|
|
116
107
|
},attrs:{"body-class":"gl-display-flex gl-p-0!"}},[(_vm.svgPath)?_c('div',{staticClass:"gl-banner-illustration"},[_c('img',{attrs:{"src":_vm.svgPath,"alt":""}})]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-banner-content"},[_c('h2',{staticClass:"gl-banner-title"},[_vm._v(_vm._s(_vm.title))]),_vm._v(" "),_vm._t("default"),_vm._v(" "),_c('gl-button',_vm._b({attrs:{"variant":"confirm","category":"primary","data-testid":"gl-banner-primary-button","href":_vm.buttonLink},on:{"click":_vm.primaryButtonClicked}},'gl-button',_vm.buttonAttributes,false),[_vm._v(_vm._s(_vm.buttonText))]),_vm._v(" "),_vm._t("actions")],2),_vm._v(" "),_c('close-button',{staticClass:"gl-banner-close",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.handleClose}})],1)};
|
|
117
108
|
var __vue_staticRenderFns__ = [];
|
|
@@ -317,7 +317,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
317
317
|
{
|
|
318
318
|
'gl-h-full': !_vm.hasMessages,
|
|
319
319
|
'gl-h-auto': _vm.hasMessages,
|
|
320
|
-
} ],attrs:{"tag":"div","name":"message"}},[_vm._l((_vm.conversations),function(conversation,index){return _c('gl-duo-chat-conversation',{key:("conversation-" + index),attrs:{"messages":conversation,"show-delimiter":index > 0},on:{"track-feedback":_vm.onTrackFeedback}})}),_vm._v(" "),(!_vm.hasMessages && !_vm.isLoading)?[_c('div',{key:"empty-state",staticClass:"gl-display-flex gl-flex-grow-1 gl-mr-auto gl-ml-auto"},[_c('gl-empty-state',{staticClass:"gl-align-self-center",attrs:{"svg-path":_vm.$options.emptySvg,"svg-height":145,"title":_vm.$options.i18n.CHAT_EMPTY_STATE_TITLE,"description":_vm.$options.i18n.CHAT_EMPTY_STATE_DESC}})],1),_vm._v(" "),_c('gl-duo-chat-predefined-prompts',{key:"predefined-prompts",attrs:{"prompts":_vm.predefinedPrompts},on:{"click":_vm.sendPredefinedPrompt}})]:_vm._e()],2),_vm._v(" "),_c('transition',{attrs:{"name":"loader"}},[(_vm.isLoading)?_c('gl-duo-chat-loader',{staticClass:"gl-px-0!",attrs:{"tool-name":_vm.toolName}}):_vm._e()],1)],1)],2),_vm._v(" "),(_vm.isChatAvailable)?_c('footer',{staticClass:"gl-drawer-footer gl-drawer-footer-sticky gl-p-5 gl-border-t gl-bg-gray-10",class:{ 'gl-drawer-body-scrim-on-footer': !_vm.scrolledToBottom },attrs:{"data-testid":"chat-footer"}},[_c('gl-form',{attrs:{"data-testid":"chat-prompt-form"},on:{"submit":function($event){$event.stopPropagation();$event.preventDefault();return _vm.sendChatPrompt.apply(null, arguments)}}},[_c('gl-form-input-group',{scopedSlots:_vm._u([{key:"append",fn:function(){return [_c('gl-button',{staticClass:"gl-absolute! gl-bottom-2 gl-right-2 gl-rounded-base!",attrs:{"icon":"paper-airplane","category":"primary","variant":"confirm","type":"submit","aria-label":_vm.$options.i18n.CHAT_SUBMIT_LABEL,"disabled":_vm.isLoading}})]},proxy:true}],null,false,2232229068)},[_c('div',{staticClass:"duo-chat-input gl-flex-grow-1 gl-vertical-align-top gl-max-w-full gl-min-h-8 gl-inset-border-1-gray-400 gl-rounded-base gl-bg-white",attrs:{"data-value":_vm.prompt}},[(_vm.shouldShowSlashCommands)?_c('gl-card',{ref:"commands",staticClass:"slash-commands gl-absolute! gl-translate-y-n100 gl-list-style-none gl-pl-0 gl-w-full gl-shadow-md",attrs:{"body-class":"gl-p-2!"}},_vm._l((_vm.filteredSlashCommands),function(command,index){return _c('gl-dropdown-item',{key:command.name,class:{ 'active-command': index === _vm.activeCommandIndex },on:{"click":function($event){return _vm.selectSlashCommand(index)}},nativeOn:{"mouseenter":function($event){_vm.activeCommandIndex = index;}}},[_c('span',{staticClass:"gl-display-flex gl-justify-content-space-between"},[_c('span',{staticClass:"gl-display-block"},[_vm._v(_vm._s(command.name))]),_vm._v(" "),_c('small',{staticClass:"gl-text-gray-500 gl-font-style-italic"},[_vm._v(_vm._s(command.description))])])])}),1):_vm._e(),_vm._v(" "),_c('gl-form-textarea',{ref:"prompt",staticClass:"gl-absolute gl-h-full! gl-py-4! gl-bg-transparent! gl-rounded-top-right-none gl-rounded-bottom-right-none gl-shadow-none!",class:{ 'gl-text-truncate': !_vm.prompt },attrs:{"data-testid":"chat-prompt-input","placeholder":_vm.$options.i18n.CHAT_PROMPT_PLACEHOLDER,"disabled":_vm.isLoading,"autofocus":""},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey||$event.metaKey){ return null; }$event.preventDefault();},"keyup":function($event){return _vm.onInputKeyup.apply(null, arguments)}},model:{value:(_vm.prompt),callback:function ($$v) {_vm.prompt=$$v;},expression:"prompt"}})],1)]),_vm._v(" "),_c('gl-form-text',{staticClass:"gl-text-gray-400 gl-line-height-20 gl-mt-3",attrs:{"data-testid":"chat-legal-disclaimer"}},[_vm._v(_vm._s(_vm.$options.i18n.CHAT_LEGAL_DISCLAIMER))])],1)],1):_vm._e()]):_vm._e()};
|
|
320
|
+
} ],attrs:{"tag":"div","name":"message"}},[_vm._l((_vm.conversations),function(conversation,index){return _c('gl-duo-chat-conversation',{key:("conversation-" + index),attrs:{"messages":conversation,"show-delimiter":index > 0},on:{"track-feedback":_vm.onTrackFeedback}})}),_vm._v(" "),(!_vm.hasMessages && !_vm.isLoading)?[_c('div',{key:"empty-state",staticClass:"gl-display-flex gl-flex-grow-1 gl-mr-auto gl-ml-auto"},[_c('gl-empty-state',{staticClass:"gl-align-self-center",attrs:{"svg-path":_vm.$options.emptySvg,"svg-height":145,"title":_vm.$options.i18n.CHAT_EMPTY_STATE_TITLE,"description":_vm.$options.i18n.CHAT_EMPTY_STATE_DESC}})],1),_vm._v(" "),_c('gl-duo-chat-predefined-prompts',{key:"predefined-prompts",attrs:{"prompts":_vm.predefinedPrompts},on:{"click":_vm.sendPredefinedPrompt}})]:_vm._e()],2),_vm._v(" "),_c('transition',{attrs:{"name":"loader"}},[(_vm.isLoading)?_c('gl-duo-chat-loader',{staticClass:"gl-px-0!",attrs:{"tool-name":_vm.toolName}}):_vm._e()],1)],1)],2),_vm._v(" "),(_vm.isChatAvailable)?_c('footer',{staticClass:"gl-drawer-footer gl-drawer-footer-sticky gl-p-5 gl-border-t gl-bg-gray-10",class:{ 'gl-drawer-body-scrim-on-footer': !_vm.scrolledToBottom },attrs:{"data-testid":"chat-footer"}},[_c('gl-form',{attrs:{"data-testid":"chat-prompt-form"},on:{"submit":function($event){$event.stopPropagation();$event.preventDefault();return _vm.sendChatPrompt.apply(null, arguments)}}},[_c('gl-form-input-group',{scopedSlots:_vm._u([{key:"append",fn:function(){return [_c('gl-button',{staticClass:"gl-absolute! gl-bottom-2 gl-right-2 gl-rounded-base!",attrs:{"icon":"paper-airplane","category":"primary","variant":"confirm","type":"submit","aria-label":_vm.$options.i18n.CHAT_SUBMIT_LABEL,"disabled":_vm.isLoading}})]},proxy:true}],null,false,2232229068)},[_c('div',{staticClass:"duo-chat-input gl-flex-grow-1 gl-vertical-align-top gl-max-w-full gl-min-h-8 gl-inset-border-1-gray-400 gl-rounded-base gl-bg-white",attrs:{"data-value":_vm.prompt}},[(_vm.shouldShowSlashCommands)?_c('gl-card',{ref:"commands",staticClass:"slash-commands gl-absolute! gl-translate-y-n100 gl-list-style-none gl-pl-0 gl-w-full gl-shadow-md",attrs:{"body-class":"gl-p-2!"}},_vm._l((_vm.filteredSlashCommands),function(command,index){return _c('gl-dropdown-item',{key:command.name,class:{ 'active-command': index === _vm.activeCommandIndex },on:{"click":function($event){return _vm.selectSlashCommand(index)}},nativeOn:{"mouseenter":function($event){_vm.activeCommandIndex = index;}}},[_c('span',{staticClass:"gl-display-flex gl-justify-content-space-between"},[_c('span',{staticClass:"gl-display-block"},[_vm._v(_vm._s(command.name))]),_vm._v(" "),_c('small',{staticClass:"gl-text-gray-500 gl-font-style-italic gl-text-right gl-pl-3"},[_vm._v(_vm._s(command.description))])])])}),1):_vm._e(),_vm._v(" "),_c('gl-form-textarea',{ref:"prompt",staticClass:"gl-absolute gl-h-full! gl-py-4! gl-bg-transparent! gl-rounded-top-right-none gl-rounded-bottom-right-none gl-shadow-none!",class:{ 'gl-text-truncate': !_vm.prompt },attrs:{"data-testid":"chat-prompt-input","placeholder":_vm.$options.i18n.CHAT_PROMPT_PLACEHOLDER,"disabled":_vm.isLoading,"autofocus":""},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey||$event.metaKey){ return null; }$event.preventDefault();},"keyup":function($event){return _vm.onInputKeyup.apply(null, arguments)}},model:{value:(_vm.prompt),callback:function ($$v) {_vm.prompt=$$v;},expression:"prompt"}})],1)]),_vm._v(" "),_c('gl-form-text',{staticClass:"gl-text-gray-400 gl-line-height-20 gl-mt-3",attrs:{"data-testid":"chat-legal-disclaimer"}},[_vm._v(_vm._s(_vm.$options.i18n.CHAT_LEGAL_DISCLAIMER))])],1)],1):_vm._e()]):_vm._e()};
|
|
321
321
|
var __vue_staticRenderFns__ = [];
|
|
322
322
|
|
|
323
323
|
/* style */
|
package/dist/tokens/js/tokens.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "71.
|
|
3
|
+
"version": "71.8.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@gitlab/eslint-plugin": "19.2.0",
|
|
95
95
|
"@gitlab/fonts": "^1.3.0",
|
|
96
96
|
"@gitlab/stylelint-config": "5.0.1",
|
|
97
|
-
"@gitlab/svgs": "3.
|
|
97
|
+
"@gitlab/svgs": "3.72.0",
|
|
98
98
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
99
99
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
100
100
|
"@rollup/plugin-replace": "^2.3.2",
|
|
@@ -13,7 +13,6 @@ const template = `
|
|
|
13
13
|
:button-link="buttonLink"
|
|
14
14
|
:svg-path="svgPath"
|
|
15
15
|
:variant="variant"
|
|
16
|
-
:embedded="embedded"
|
|
17
16
|
>
|
|
18
17
|
<p>GitLab Service Desk is a simple way to allow people to create issues in your GitLab instance without needing their own user account. It provides a unique email address for end users to create issues in a project, and replies can be sent either though the GitLab interface or by email. End users will only see the thread though email.</p>
|
|
19
18
|
</gl-banner>
|
|
@@ -26,7 +25,6 @@ const generateProps = ({
|
|
|
26
25
|
buttonLink = 'https://gitlab.com',
|
|
27
26
|
svgPath = serviceDeskCalloutSvg,
|
|
28
27
|
variant = GlBanner.props.variant.default,
|
|
29
|
-
embedded = false,
|
|
30
28
|
} = {}) => ({
|
|
31
29
|
title,
|
|
32
30
|
buttonAttributes,
|
|
@@ -34,7 +32,6 @@ const generateProps = ({
|
|
|
34
32
|
buttonLink,
|
|
35
33
|
svgPath,
|
|
36
34
|
variant,
|
|
37
|
-
embedded,
|
|
38
35
|
});
|
|
39
36
|
|
|
40
37
|
const Template = (args, { argTypes }) => ({
|
|
@@ -58,11 +55,6 @@ Introduction.args = generateProps({
|
|
|
58
55
|
variant: bannerVariants[1],
|
|
59
56
|
});
|
|
60
57
|
|
|
61
|
-
export const Embedded = Template.bind({});
|
|
62
|
-
Embedded.args = generateProps({
|
|
63
|
-
embedded: true,
|
|
64
|
-
});
|
|
65
|
-
|
|
66
58
|
export const WithActions = (args, { argTypes }) => ({
|
|
67
59
|
components: {
|
|
68
60
|
GlBanner,
|
|
@@ -69,14 +69,6 @@ export default {
|
|
|
69
69
|
required: false,
|
|
70
70
|
default: 'Dismiss',
|
|
71
71
|
},
|
|
72
|
-
/**
|
|
73
|
-
* Removes the border for banners embedded in content.
|
|
74
|
-
*/
|
|
75
|
-
embedded: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
required: false,
|
|
78
|
-
default: null,
|
|
79
|
-
},
|
|
80
72
|
},
|
|
81
73
|
computed: {
|
|
82
74
|
isIntroducing() {
|
|
@@ -111,7 +103,6 @@ export default {
|
|
|
111
103
|
class="gl-pl-6 gl-pr-8 gl-py-6"
|
|
112
104
|
:class="{
|
|
113
105
|
'gl-banner-introduction': isIntroducing,
|
|
114
|
-
'gl-border-none!': embedded,
|
|
115
106
|
'gl-bg-gray-10!': !isIntroducing,
|
|
116
107
|
}"
|
|
117
108
|
body-class="gl-display-flex gl-p-0!"
|
|
@@ -458,7 +458,7 @@ export default {
|
|
|
458
458
|
>
|
|
459
459
|
<span class="gl-display-flex gl-justify-content-space-between">
|
|
460
460
|
<span class="gl-display-block">{{ command.name }}</span>
|
|
461
|
-
<small class="gl-text-gray-500 gl-font-style-italic">{{
|
|
461
|
+
<small class="gl-text-gray-500 gl-font-style-italic gl-text-right gl-pl-3">{{
|
|
462
462
|
command.description
|
|
463
463
|
}}</small>
|
|
464
464
|
</span>
|