@gitlab/ui 91.6.0 → 91.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 +15 -0
- package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.js +7 -2
- package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_category_items.js +69 -0
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/tokens/build/js/tokens.dark.js +4 -2
- package/dist/tokens/build/js/tokens.js +4 -2
- package/dist/tokens/css/tokens.css +3 -1
- package/dist/tokens/css/tokens.dark.css +3 -1
- package/dist/tokens/js/tokens.dark.js +3 -1
- package/dist/tokens/js/tokens.js +3 -1
- package/dist/tokens/json/tokens.dark.json +55 -3
- package/dist/tokens/json/tokens.json +55 -3
- package/dist/tokens/scss/_tokens.dark.scss +3 -1
- package/dist/tokens/scss/_tokens.scss +3 -1
- package/dist/tokens/scss/_tokens_custom_properties.scss +2 -0
- package/package.json +1 -1
- package/src/components/base/link/link.scss +2 -7
- package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.vue +13 -7
- package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_category_items.vue +45 -0
- package/src/tokens/build/css/tokens.css +3 -1
- package/src/tokens/build/css/tokens.dark.css +3 -1
- package/src/tokens/build/js/tokens.dark.js +3 -1
- package/src/tokens/build/js/tokens.js +3 -1
- package/src/tokens/build/json/tokens.dark.json +55 -3
- package/src/tokens/build/json/tokens.json +55 -3
- package/src/tokens/build/scss/_tokens.dark.scss +3 -1
- package/src/tokens/build/scss/_tokens.scss +3 -1
- package/src/tokens/build/scss/_tokens_custom_properties.scss +2 -0
- package/src/tokens/contextual/link.tokens.json +20 -0
- package/src/tokens/control.tokens.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# [91.8.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v91.7.0...v91.8.0) (2024-09-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlLink:** Add and update tokens ([df90a00](https://gitlab.com/gitlab-org/gitlab-ui/commit/df90a0020dabcb05357dc0a65f468ef77c5575cd))
|
|
7
|
+
|
|
8
|
+
# [91.7.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v91.6.0...v91.7.0) (2024-09-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add improved duo chat context menu category items ([05bdfa0](https://gitlab.com/gitlab-org/gitlab-ui/commit/05bdfa0698d8fc5117e995958044fa29dfef0b68))
|
|
14
|
+
* **DesignTokens:** Update read-only control background color ([f6afc9a](https://gitlab.com/gitlab-org/gitlab-ui/commit/f6afc9a3e9dd141684ffb09ab0fde0be23456353))
|
|
15
|
+
|
|
1
16
|
# [91.6.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v91.5.0...v91.6.0) (2024-09-04)
|
|
2
17
|
|
|
3
18
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { translate } from '../../../../../../../utils/i18n';
|
|
2
2
|
import GlCard from '../../../../../../base/card/card';
|
|
3
|
-
import GlDuoChatContextItemSelections from '../duo_chat_context_item_selections/duo_chat_context_item_selections';
|
|
4
3
|
import { contextItemsValidator, categoriesValidator } from '../utils';
|
|
4
|
+
import GlDuoChatContextItemSelections from '../duo_chat_context_item_selections/duo_chat_context_item_selections';
|
|
5
|
+
import GlDuoChatContextItemMenuCategoryItems from './duo_chat_context_item_menu_category_items';
|
|
5
6
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
7
|
|
|
7
8
|
var script = {
|
|
8
9
|
name: 'GlDuoChatContextItemMenu',
|
|
9
10
|
components: {
|
|
10
11
|
GlCard,
|
|
12
|
+
GlDuoChatContextItemMenuCategoryItems,
|
|
11
13
|
GlDuoChatContextItemSelections
|
|
12
14
|
},
|
|
13
15
|
props: {
|
|
@@ -60,6 +62,7 @@ var script = {
|
|
|
60
62
|
},
|
|
61
63
|
data() {
|
|
62
64
|
return {
|
|
65
|
+
activeIndex: 0,
|
|
63
66
|
selectedCategory: null
|
|
64
67
|
};
|
|
65
68
|
},
|
|
@@ -78,6 +81,7 @@ var script = {
|
|
|
78
81
|
methods: {
|
|
79
82
|
selectCategory(category) {
|
|
80
83
|
this.selectedCategory = category;
|
|
84
|
+
this.activeIndex = 0;
|
|
81
85
|
|
|
82
86
|
/**
|
|
83
87
|
* Emitted when a search should be performed.
|
|
@@ -116,6 +120,7 @@ var script = {
|
|
|
116
120
|
},
|
|
117
121
|
resetSelection() {
|
|
118
122
|
this.selectedCategory = null;
|
|
123
|
+
this.activeIndex = 0;
|
|
119
124
|
}
|
|
120
125
|
},
|
|
121
126
|
i18n: {
|
|
@@ -127,7 +132,7 @@ var script = {
|
|
|
127
132
|
const __vue_script__ = script;
|
|
128
133
|
|
|
129
134
|
/* template */
|
|
130
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.selections.length)?_c('gl-duo-chat-context-item-selections',{staticClass:"gl-mb-3",attrs:{"selections":_vm.selections,"removable":true,"title":_vm.$options.i18n.selectedContextItemsTitle,"default-collapsed":false},on:{"remove":_vm.removeItem}}):_vm._e(),_vm._v(" "),(_vm.open)?_c('gl-card',{staticClass:"slash-commands !gl-absolute gl-bottom-0 gl-w-full gl-pl-0 gl-shadow-md",attrs:{"body-class":"!gl-p-2","data-testid":"context-item-menu"}},[(_vm.showCategorySelection)?_c('
|
|
135
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.selections.length)?_c('gl-duo-chat-context-item-selections',{staticClass:"gl-mb-3",attrs:{"selections":_vm.selections,"removable":true,"title":_vm.$options.i18n.selectedContextItemsTitle,"default-collapsed":false},on:{"remove":_vm.removeItem}}):_vm._e(),_vm._v(" "),(_vm.open)?_c('gl-card',{staticClass:"slash-commands !gl-absolute gl-bottom-0 gl-w-full gl-pl-0 gl-shadow-md",attrs:{"body-class":"!gl-p-2","data-testid":"context-item-menu"}},[(_vm.showCategorySelection)?_c('gl-duo-chat-context-item-menu-category-items',{attrs:{"active-index":_vm.activeIndex,"categories":_vm.categories},on:{"select":_vm.selectCategory,"active-index-change":function($event){_vm.activeIndex = $event;}}}):_c('div',{attrs:{"data-testid":"context-menu-search-items"}},[(_vm.loading)?[_vm._v("Loading...")]:(_vm.error)?[_vm._v("Error: "+_vm._s(_vm.error))]:_c('ul',_vm._l((_vm.results),function(result){return _c('li',{key:result.id,on:{"click":function($event){return _vm.selectItem(result)}}},[_vm._v("\n "+_vm._s(result.metadata.name)+" "+_vm._s(result.isEnabled ? '' : '(disabled)')+"\n ")])}),0)],2)],1):_vm._e()],1)};
|
|
131
136
|
var __vue_staticRenderFns__ = [];
|
|
132
137
|
|
|
133
138
|
/* style */
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import GlDropdownItem from '../../../../../../base/dropdown/dropdown_item';
|
|
2
|
+
import GlIcon from '../../../../../../base/icon/icon';
|
|
3
|
+
import { categoriesValidator } from '../utils';
|
|
4
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
|
+
|
|
6
|
+
var script = {
|
|
7
|
+
name: 'GlDuoChatContextItemMenuCategoryItems',
|
|
8
|
+
components: {
|
|
9
|
+
GlIcon,
|
|
10
|
+
GlDropdownItem
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
categories: {
|
|
14
|
+
type: Array,
|
|
15
|
+
required: true,
|
|
16
|
+
validator: categoriesValidator
|
|
17
|
+
},
|
|
18
|
+
activeIndex: {
|
|
19
|
+
type: Number,
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
selectCategory(category) {
|
|
25
|
+
this.$emit('select', category);
|
|
26
|
+
},
|
|
27
|
+
setActiveIndex(index) {
|
|
28
|
+
this.$emit('active-index-change', index);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/* script */
|
|
34
|
+
const __vue_script__ = script;
|
|
35
|
+
|
|
36
|
+
/* template */
|
|
37
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',{staticClass:"gl-mb-0 gl-list-none gl-pl-0"},_vm._l((_vm.categories),function(category,index){return _c('gl-dropdown-item',{key:category.value,class:{ 'active-command': index === _vm.activeIndex },attrs:{"data-testid":"category-item"},on:{"click":function($event){return _vm.selectCategory(category)}}},[_c('div',{staticClass:"gl-flex gl-items-center",on:{"mouseenter":function($event){return _vm.setActiveIndex(index)}}},[_c('gl-icon',{staticClass:"gl-mr-2",attrs:{"name":category.icon}}),_vm._v("\n "+_vm._s(category.label)+"\n ")],1)])}),1)};
|
|
38
|
+
var __vue_staticRenderFns__ = [];
|
|
39
|
+
|
|
40
|
+
/* style */
|
|
41
|
+
const __vue_inject_styles__ = undefined;
|
|
42
|
+
/* scoped */
|
|
43
|
+
const __vue_scope_id__ = undefined;
|
|
44
|
+
/* module identifier */
|
|
45
|
+
const __vue_module_identifier__ = undefined;
|
|
46
|
+
/* functional template */
|
|
47
|
+
const __vue_is_functional_template__ = false;
|
|
48
|
+
/* style inject */
|
|
49
|
+
|
|
50
|
+
/* style inject SSR */
|
|
51
|
+
|
|
52
|
+
/* style inject shadow dom */
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
const __vue_component__ = __vue_normalize__(
|
|
57
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
58
|
+
__vue_inject_styles__,
|
|
59
|
+
__vue_script__,
|
|
60
|
+
__vue_scope_id__,
|
|
61
|
+
__vue_is_functional_template__,
|
|
62
|
+
__vue_module_identifier__,
|
|
63
|
+
false,
|
|
64
|
+
undefined,
|
|
65
|
+
undefined,
|
|
66
|
+
undefined
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
export default __vue_component__;
|