@gitlab/ui 101.15.0 → 102.0.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 +39 -0
- package/dist/components/base/animated_icon/animated_loader_icon.js +45 -0
- package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_details_modal/duo_chat_context_item_details_modal.js +3 -0
- package/dist/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.js +5 -3
- package/dist/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -4
- package/dist/vendor/bootstrap-vue/src/components/nav/nav.js +6 -9
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +6 -30
- package/dist/vendor/bootstrap-vue/src/index.js +1 -11
- package/dist/vendor/bootstrap-vue/src/mixins/form-radio-check-group.js +2 -16
- package/dist/vendor/bootstrap-vue/src/mixins/form-radio-check.js +14 -104
- package/package.json +1 -2
- package/src/components/base/animated_icon/animated_icon.scss +21 -0
- package/src/components/base/animated_icon/animated_loader_icon.vue +44 -0
- package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_details_modal/duo_chat_context_item_details_modal.vue +3 -0
- package/src/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.scss +6 -33
- package/src/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.vue +4 -6
- package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.vue +3 -3
- package/src/vendor/bootstrap-vue/src/components/button/MODIFICATIONS.md +16 -0
- package/src/vendor/bootstrap-vue/src/components/button/README.md +0 -39
- package/src/vendor/bootstrap-vue/src/components/button/button.js +0 -4
- package/src/vendor/bootstrap-vue/src/components/button/button.spec.js +0 -36
- package/src/vendor/bootstrap-vue/src/components/form-checkbox/README.md +3 -174
- package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox-group.spec.js +0 -117
- package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox.spec.js +0 -409
- package/src/vendor/bootstrap-vue/src/components/form-radio/README.md +0 -129
- package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio-group.spec.js +0 -112
- package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio.spec.js +0 -365
- package/src/vendor/bootstrap-vue/src/components/nav/README.md +0 -20
- package/src/vendor/bootstrap-vue/src/components/nav/nav.js +7 -9
- package/src/vendor/bootstrap-vue/src/components/nav/nav.spec.js +0 -67
- package/src/vendor/bootstrap-vue/src/components/tabs/README.md +45 -187
- package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +6 -29
- package/src/vendor/bootstrap-vue/src/components/tabs/tabs.spec.js +0 -58
- package/src/vendor/bootstrap-vue/src/index.js +0 -17
- package/src/vendor/bootstrap-vue/src/mixins/form-radio-check-group.js +3 -20
- package/src/vendor/bootstrap-vue/src/mixins/form-radio-check.js +19 -114
- package/src/vendor/bootstrap-vue/src/utils/config.spec.js +0 -18
- package/dist/index.css +0 -7
- package/dist/index.css.map +0 -1
- package/dist/index.js +0 -114
- package/dist/vendor/bootstrap-vue/src/components/index.js +0 -11
- package/src/index.js +0 -129
- package/src/vendor/bootstrap-vue/src/components/index.js +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
# [102.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v101.16.0...v102.0.0) (2024-11-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **GlCheckbox:** always add a label, even for empty content ([4154c08](https://gitlab.com/gitlab-org/gitlab-ui/commit/4154c082e5935031f1f5670fc16ad3c87b736251))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **FormRadio,FormCheckbox:** Remove buttons style ([5ca17b0](https://gitlab.com/gitlab-org/gitlab-ui/commit/5ca17b0841d2d13c5a977cc674ef24a7273fa1d4))
|
|
12
|
+
* **GlButton:** Remove pill and squared properties ([7c61763](https://gitlab.com/gitlab-org/gitlab-ui/commit/7c617631e03f4e042caf95471d3d15a22856fac3))
|
|
13
|
+
* **GlFormRadio,GlFormCheckbox:** Remove plain style ([415542c](https://gitlab.com/gitlab-org/gitlab-ui/commit/415542c144bcd599428065c736db16233801526a))
|
|
14
|
+
* **GlNav,GlTabs:** Remove vertical and card designs ([8bd8b00](https://gitlab.com/gitlab-org/gitlab-ui/commit/8bd8b00821494e80aacffb5210b24c73fc9a608a))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* **GlNav,GlTabs:** BootstrapVue's Nav and Tabs components support a vertical, and card
|
|
20
|
+
styles. These styles are now removed in GitLab UI.
|
|
21
|
+
* **GlFormRadio,GlFormCheckbox:** The GlFormRadio and GlFormCheckbox do not support the property 'plain'
|
|
22
|
+
anymore. Prefer overriding the CSS styles in case native browser styles
|
|
23
|
+
should be used instead.
|
|
24
|
+
* **FormRadio,FormCheckbox:** BootstrapVue's Radio Buttons and Checkboxes support a button style mode
|
|
25
|
+
which was never documented within our system. We do not support adding
|
|
26
|
+
the property 'button' on GlFormRadio and GlFormCheckbox.
|
|
27
|
+
* **GlButton:** The GlButton does not support the properties 'pill' and 'squared'
|
|
28
|
+
anymore.
|
|
29
|
+
Prefer using the styles with the usual border radius. When absolutely
|
|
30
|
+
necessary, apply GitLab UI Util CSS classes to override the border
|
|
31
|
+
radius
|
|
32
|
+
|
|
33
|
+
# [101.16.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v101.15.0...v101.16.0) (2024-11-07)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* **GlDuoChat, GlAnimatedIcon:** Update loading icon ([23d0874](https://gitlab.com/gitlab-org/gitlab-ui/commit/23d08749510808b1ece754025714ad2a6dd9fd65))
|
|
39
|
+
|
|
1
40
|
# [101.15.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v101.14.0...v101.15.0) (2024-11-07)
|
|
2
41
|
|
|
3
42
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import GlBaseAnimatedIcon from './base_animated_icon';
|
|
2
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
3
|
+
|
|
4
|
+
var script = {
|
|
5
|
+
name: 'GlAnimatedLoaderIcon',
|
|
6
|
+
extends: GlBaseAnimatedIcon
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/* script */
|
|
10
|
+
const __vue_script__ = script;
|
|
11
|
+
|
|
12
|
+
/* template */
|
|
13
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',{class:_vm.iconStateClass,attrs:{"aria-label":_vm.ariaLabel,"width":"16","height":"16","viewBox":"0 0 16 16","fill":"none","xmlns":"http://www.w3.org/2000/svg"}},[_c('circle',{staticClass:"gl-animated-loader-shape gl-animated-loader-shape-1",attrs:{"cx":"8","cy":"8","r":"2","fill":"currentColor","stroke-width":"0"}}),_vm._v(" "),_c('circle',{staticClass:"gl-animated-loader-shape gl-animated-loader-shape-2",attrs:{"cx":"14","cy":"8","r":"2","fill":"currentColor","stroke-width":"0"}}),_vm._v(" "),_c('circle',{staticClass:"gl-animated-loader-shape gl-animated-loader-shape-3",attrs:{"cx":"2","cy":"8","r":"2","fill":"currentColor","stroke-width":"0"}})])};
|
|
14
|
+
var __vue_staticRenderFns__ = [];
|
|
15
|
+
|
|
16
|
+
/* style */
|
|
17
|
+
const __vue_inject_styles__ = undefined;
|
|
18
|
+
/* scoped */
|
|
19
|
+
const __vue_scope_id__ = undefined;
|
|
20
|
+
/* module identifier */
|
|
21
|
+
const __vue_module_identifier__ = undefined;
|
|
22
|
+
/* functional template */
|
|
23
|
+
const __vue_is_functional_template__ = false;
|
|
24
|
+
/* style inject */
|
|
25
|
+
|
|
26
|
+
/* style inject SSR */
|
|
27
|
+
|
|
28
|
+
/* style inject shadow dom */
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
const __vue_component__ = __vue_normalize__(
|
|
33
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
34
|
+
__vue_inject_styles__,
|
|
35
|
+
__vue_script__,
|
|
36
|
+
__vue_scope_id__,
|
|
37
|
+
__vue_is_functional_template__,
|
|
38
|
+
__vue_module_identifier__,
|
|
39
|
+
false,
|
|
40
|
+
undefined,
|
|
41
|
+
undefined,
|
|
42
|
+
undefined
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export default __vue_component__;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { translate } from '../../../../../../utils/i18n';
|
|
2
2
|
import GlSprintf from '../../../../../utilities/sprintf/sprintf';
|
|
3
|
+
import GlAnimatedLoaderIcon from '../../../../../base/animated_icon/animated_loader_icon';
|
|
3
4
|
import { LOADING_TRANSITION_DURATION } from '../../constants';
|
|
4
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
6
|
|
|
@@ -11,7 +12,8 @@ const i18n = {
|
|
|
11
12
|
var script = {
|
|
12
13
|
name: 'GlDuoChatLoader',
|
|
13
14
|
components: {
|
|
14
|
-
GlSprintf
|
|
15
|
+
GlSprintf,
|
|
16
|
+
GlAnimatedLoaderIcon
|
|
15
17
|
},
|
|
16
18
|
i18n,
|
|
17
19
|
props: {
|
|
@@ -65,8 +67,8 @@ var script = {
|
|
|
65
67
|
const __vue_script__ = script;
|
|
66
68
|
|
|
67
69
|
/* template */
|
|
68
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"duo-chat-loader gl-mt-5 gl-flex gl-items-center"},[
|
|
69
|
-
var __vue_staticRenderFns__ = [
|
|
70
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"duo-chat-loader gl-mt-5 gl-flex gl-items-center gl-gap-3"},[_c('gl-animated-loader-icon',{attrs:{"is-on":true}}),_vm._v(" "),_c('div',[_c('gl-sprintf',{attrs:{"message":_vm.$options.i18n.LOADER_LOADING_MESSAGE},scopedSlots:_vm._u([{key:"tool",fn:function(){return [_c('strong',{attrs:{"data-testid":"tool"}},[_vm._v(_vm._s(_vm.toolName))])]},proxy:true},{key:"transition",fn:function(){return [_c('transition-group',{ref:"transition",staticClass:"transition gl-relative gl-inline-block gl-align-bottom",attrs:{"name":"text"},on:{"after-leave":_vm.computeTransitionWidth}},_vm._l((_vm.$options.i18n.LOADER_LOADING_TRANSITIONS),function(message,index){return _c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.isCurrentTransition(index)),expression:"isCurrentTransition(index)"}],key:message,ref:_vm.isCurrentTransition(index) ? 'currentTransition' : '',refInFor:true,staticClass:"gl-absolute gl-bottom-0 gl-left-0 gl-whitespace-nowrap",attrs:{"data-testid":_vm.isCurrentTransition(index) ? 'current-transition' : ''}},[_vm._v(_vm._s(message))])}),0)]},proxy:true}])})],1)],1)};
|
|
71
|
+
var __vue_staticRenderFns__ = [];
|
|
70
72
|
|
|
71
73
|
/* style */
|
|
72
74
|
const __vue_inject_styles__ = undefined;
|
package/dist/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import throttle from 'lodash/throttle';
|
|
2
2
|
import GlIcon from '../../../../../base/icon/icon';
|
|
3
|
-
import
|
|
3
|
+
import GlAnimatedLoaderIcon from '../../../../../base/animated_icon/animated_loader_icon';
|
|
4
4
|
import { GlTooltipDirective } from '../../../../../../directives/tooltip';
|
|
5
5
|
import GlDuoChatContextItemSelections from '../duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections';
|
|
6
6
|
import GlDuoUserFeedback from '../../../user_feedback/user_feedback';
|
|
@@ -41,7 +41,7 @@ var script = {
|
|
|
41
41
|
GlFormGroup,
|
|
42
42
|
GlFormTextarea,
|
|
43
43
|
GlIcon,
|
|
44
|
-
|
|
44
|
+
GlAnimatedLoaderIcon
|
|
45
45
|
},
|
|
46
46
|
directives: {
|
|
47
47
|
SafeHtml: SafeHtmlDirective,
|
|
@@ -256,7 +256,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
256
256
|
_vm.isAssistantMessage,
|
|
257
257
|
'gl-bg-subtle': _vm.isAssistantMessage && !_vm.error,
|
|
258
258
|
'duo-chat-message-with-error gl-bg-red-50': _vm.error,
|
|
259
|
-
},on:{"insert-code-snippet":_vm.onInsertCodeSnippet}},[(_vm.error)?_c('gl-icon',{staticClass:"error-icon gl-border gl-mr-3 gl-shrink-0 gl-rounded-full gl-border-red-500 gl-text-red-600",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.displaySelectedContextItems && _vm.isAssistantMessage)?_c('gl-duo-chat-context-item-selections',{attrs:{"selections":_vm.selectedContextItems,"title":_vm.selectedContextItemsTitle,"default-collapsed":_vm.selectedContextItemsDefaultCollapsed,"variant":"assistant"},on:{"get-content":_vm.onGetContextItemContent}}):_vm._e(),_vm._v(" "),(_vm.error)?_c('div',{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfigExtension]",value:(_vm.renderedError),expression:"renderedError",arg:_vm.$options.safeHtmlConfigExtension}],ref:"error-message"}):_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:"duo-chat-message-feedback gl-mt-4 gl-flex gl-items-end"},[(_vm.isChunkAndNotCancelled)?_c('gl-
|
|
259
|
+
},on:{"insert-code-snippet":_vm.onInsertCodeSnippet}},[(_vm.error)?_c('gl-icon',{staticClass:"error-icon gl-border gl-mr-3 gl-shrink-0 gl-rounded-full gl-border-red-500 gl-text-red-600",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.displaySelectedContextItems && _vm.isAssistantMessage)?_c('gl-duo-chat-context-item-selections',{attrs:{"selections":_vm.selectedContextItems,"title":_vm.selectedContextItemsTitle,"default-collapsed":_vm.selectedContextItemsDefaultCollapsed,"variant":"assistant"},on:{"get-content":_vm.onGetContextItemContent}}):_vm._e(),_vm._v(" "),(_vm.error)?_c('div',{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfigExtension]",value:(_vm.renderedError),expression:"renderedError",arg:_vm.$options.safeHtmlConfigExtension}],ref:"error-message"}):_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:"duo-chat-message-feedback gl-mt-4 gl-flex gl-items-end"},[(_vm.isChunkAndNotCancelled)?_c('gl-animated-loader-icon',{attrs:{"is-on":true}}):_vm._e(),_vm._v(" "),(_vm.isNotChunkOrCancelled)?_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),_vm._v(" "),(_vm.displaySelectedContextItems && _vm.isUserMessage)?_c('gl-duo-chat-context-item-selections',{attrs:{"selections":_vm.selectedContextItems,"title":_vm.selectedContextItemsTitle,"default-collapsed":_vm.selectedContextItemsDefaultCollapsed,"variant":"user"},on:{"get-content":_vm.onGetContextItemContent}}):_vm._e()],1)],1)};
|
|
260
260
|
var __vue_staticRenderFns__ = [];
|
|
261
261
|
|
|
262
262
|
/* style */
|
|
@@ -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
|
}];
|
|
@@ -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':
|
|
54
|
-
'card-header-pills':
|
|
55
|
-
'
|
|
56
|
-
'nav-
|
|
57
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
}
|
|
@@ -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
|
|
72
|
+
export { BootstrapVue, NAME };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extend } from '../vue';
|
|
2
|
-
import { PROP_TYPE_BOOLEAN_STRING,
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
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
|
-
|
|
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
|
-
'
|
|
304
|
-
'
|
|
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':
|
|
219
|
+
'custom-radio': isRadio,
|
|
310
220
|
// Temporary until Bootstrap v4 supports sizing (most likely in V5)
|
|
311
|
-
[`b-custom-control-${computedSize}`]: computedSize
|
|
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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "102.0.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -115,7 +115,6 @@
|
|
|
115
115
|
"@jest/test-sequencer": "^29.7.0",
|
|
116
116
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
117
117
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
118
|
-
"@rollup/plugin-replace": "^2.3.2",
|
|
119
118
|
"@storybook/addon-a11y": "^7.6.20",
|
|
120
119
|
"@storybook/addon-docs": "^7.6.20",
|
|
121
120
|
"@storybook/addon-essentials": "^7.6.20",
|
|
@@ -103,6 +103,27 @@
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/* * * * * * * * * * * * * * * * *
|
|
106
|
+
* animated_loader_icon.vue
|
|
107
|
+
* * * * * * * * * * * * * * * * */
|
|
108
|
+
.gl-animated-icon-on .gl-animated-loader-shape {
|
|
109
|
+
animation: gl-animated-loader-on 1.8s $gl-easing-default infinite;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.gl-animated-icon-on .gl-animated-loader-shape-1 {
|
|
113
|
+
animation-delay: 0.15s;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.gl-animated-icon-on .gl-animated-loader-shape-2 {
|
|
117
|
+
animation-delay: 0.3s;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@keyframes gl-animated-loader-on {
|
|
121
|
+
30% { translate: 0 -30%; }
|
|
122
|
+
60% { translate: 0 2%; }
|
|
123
|
+
65% { translate: 0 0; }
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* * * * * * * * * * * * * * * * *
|
|
106
127
|
* animated_notifications_icon.vue
|
|
107
128
|
* * * * * * * * * * * * * * * * */
|
|
108
129
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import GlBaseAnimatedIcon from './base_animated_icon.vue';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: 'GlAnimatedLoaderIcon',
|
|
6
|
+
extends: GlBaseAnimatedIcon,
|
|
7
|
+
};
|
|
8
|
+
</script>
|
|
9
|
+
<template>
|
|
10
|
+
<svg
|
|
11
|
+
:class="iconStateClass"
|
|
12
|
+
:aria-label="ariaLabel"
|
|
13
|
+
width="16"
|
|
14
|
+
height="16"
|
|
15
|
+
viewBox="0 0 16 16"
|
|
16
|
+
fill="none"
|
|
17
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
18
|
+
>
|
|
19
|
+
<circle
|
|
20
|
+
class="gl-animated-loader-shape gl-animated-loader-shape-1"
|
|
21
|
+
cx="8"
|
|
22
|
+
cy="8"
|
|
23
|
+
r="2"
|
|
24
|
+
fill="currentColor"
|
|
25
|
+
stroke-width="0"
|
|
26
|
+
/>
|
|
27
|
+
<circle
|
|
28
|
+
class="gl-animated-loader-shape gl-animated-loader-shape-2"
|
|
29
|
+
cx="14"
|
|
30
|
+
cy="8"
|
|
31
|
+
r="2"
|
|
32
|
+
fill="currentColor"
|
|
33
|
+
stroke-width="0"
|
|
34
|
+
/>
|
|
35
|
+
<circle
|
|
36
|
+
class="gl-animated-loader-shape gl-animated-loader-shape-3"
|
|
37
|
+
cx="2"
|
|
38
|
+
cy="8"
|
|
39
|
+
r="2"
|
|
40
|
+
fill="currentColor"
|
|
41
|
+
stroke-width="0"
|
|
42
|
+
/>
|
|
43
|
+
</svg>
|
|
44
|
+
</template>
|