@gitlab/ui 124.4.1 → 124.4.3
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/dist/components/base/collapse/collapse.js +6 -0
- package/dist/components/base/form/form_group/form_group.js +12 -0
- package/dist/components/base/form/form_select/form_select.js +7 -1
- package/dist/components/base/form/form_textarea/form_textarea.js +10 -1
- package/dist/components/base/pagination/pagination.js +3 -0
- package/dist/components/charts/single_stat/single_stat.js +4 -4
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/dist/utils/constants.js +14 -1
- package/package.json +4 -4
- package/src/components/base/breadcrumb/breadcrumb.scss +2 -1
- package/src/components/base/collapse/collapse.vue +6 -0
- package/src/components/base/form/form_group/form_group.vue +12 -0
- package/src/components/base/form/form_select/form_select.vue +7 -1
- package/src/components/base/form/form_textarea/form_textarea.vue +10 -1
- package/src/components/base/pagination/pagination.vue +3 -0
- package/src/components/charts/single_stat/single_stat.vue +11 -6
- package/src/utils/constants.js +13 -0
|
@@ -9,11 +9,17 @@ var script = {
|
|
|
9
9
|
event: 'input'
|
|
10
10
|
},
|
|
11
11
|
props: {
|
|
12
|
+
/**
|
|
13
|
+
* Controls the visibility state of the collapse.
|
|
14
|
+
*/
|
|
12
15
|
visible: {
|
|
13
16
|
type: Boolean,
|
|
14
17
|
default: false,
|
|
15
18
|
required: false
|
|
16
19
|
},
|
|
20
|
+
/**
|
|
21
|
+
* HTML tag to use for the collapse container element.
|
|
22
|
+
*/
|
|
17
23
|
tag: {
|
|
18
24
|
type: String,
|
|
19
25
|
required: false,
|
|
@@ -10,21 +10,33 @@ var script = {
|
|
|
10
10
|
},
|
|
11
11
|
inheritAttrs: false,
|
|
12
12
|
props: {
|
|
13
|
+
/**
|
|
14
|
+
* Additional CSS class(es) to apply to the label element.
|
|
15
|
+
*/
|
|
13
16
|
labelClass: {
|
|
14
17
|
type: [String, Array, Object],
|
|
15
18
|
required: false,
|
|
16
19
|
default: null
|
|
17
20
|
},
|
|
21
|
+
/**
|
|
22
|
+
* Descriptive text to display below the label.
|
|
23
|
+
*/
|
|
18
24
|
labelDescription: {
|
|
19
25
|
type: String,
|
|
20
26
|
required: false,
|
|
21
27
|
default: ''
|
|
22
28
|
},
|
|
29
|
+
/**
|
|
30
|
+
* When true, displays optional text next to the label.
|
|
31
|
+
*/
|
|
23
32
|
optional: {
|
|
24
33
|
type: Boolean,
|
|
25
34
|
required: false,
|
|
26
35
|
default: false
|
|
27
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* Text to display when the field is optional.
|
|
39
|
+
*/
|
|
28
40
|
optionalText: {
|
|
29
41
|
type: String,
|
|
30
42
|
required: false,
|
|
@@ -11,7 +11,7 @@ var script = {
|
|
|
11
11
|
inheritAttrs: false,
|
|
12
12
|
props: {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Width of the select element.
|
|
15
15
|
*/
|
|
16
16
|
width: {
|
|
17
17
|
type: [String, Object],
|
|
@@ -22,11 +22,17 @@ var script = {
|
|
|
22
22
|
return widths.every(width => Object.values(formInputWidths).includes(width));
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
+
/**
|
|
26
|
+
* Additional CSS class(es) to apply to the select element.
|
|
27
|
+
*/
|
|
25
28
|
selectClass: {
|
|
26
29
|
type: [String, Object, Array],
|
|
27
30
|
required: false,
|
|
28
31
|
default: ''
|
|
29
32
|
},
|
|
33
|
+
/**
|
|
34
|
+
* Number of visible options in the select dropdown. When greater than 1, displays as a scrollable list box.
|
|
35
|
+
*/
|
|
30
36
|
selectSize: {
|
|
31
37
|
type: Number,
|
|
32
38
|
required: false,
|
|
@@ -23,11 +23,17 @@ var script = {
|
|
|
23
23
|
required: false,
|
|
24
24
|
default: ''
|
|
25
25
|
},
|
|
26
|
+
/**
|
|
27
|
+
* When true, prevents the textarea from being resized by the user (hides the resize handle).
|
|
28
|
+
*/
|
|
26
29
|
noResize: {
|
|
27
30
|
type: Boolean,
|
|
28
31
|
required: false,
|
|
29
32
|
default: true
|
|
30
33
|
},
|
|
34
|
+
/**
|
|
35
|
+
* When true, emits a submit event when Ctrl+Enter or Cmd+Enter is pressed.
|
|
36
|
+
*/
|
|
31
37
|
submitOnEnter: {
|
|
32
38
|
type: Boolean,
|
|
33
39
|
required: false,
|
|
@@ -42,13 +48,16 @@ var script = {
|
|
|
42
48
|
default: null
|
|
43
49
|
},
|
|
44
50
|
/**
|
|
45
|
-
*
|
|
51
|
+
* Additional CSS class(es) to apply to the textarea element.
|
|
46
52
|
*/
|
|
47
53
|
textareaClasses: {
|
|
48
54
|
type: [String, Object, Array],
|
|
49
55
|
required: false,
|
|
50
56
|
default: null
|
|
51
57
|
},
|
|
58
|
+
/**
|
|
59
|
+
* Number of visible text rows in the textarea.
|
|
60
|
+
*/
|
|
52
61
|
rows: {
|
|
53
62
|
type: [Number, String],
|
|
54
63
|
required: false,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { badgeVariantOptions,
|
|
1
|
+
import { badgeVariantOptions, badgeVariantToIconVariantMap } from '../../../utils/constants';
|
|
2
2
|
import GlBadge from '../../base/badge/badge';
|
|
3
3
|
import GlIcon from '../../base/icon/icon';
|
|
4
4
|
import GlAnimatedNumber from '../../utilities/animated_number/animated_number';
|
|
@@ -89,8 +89,8 @@ var script = {
|
|
|
89
89
|
showTitleIcon() {
|
|
90
90
|
return Boolean(this.titleIcon);
|
|
91
91
|
},
|
|
92
|
-
|
|
93
|
-
return
|
|
92
|
+
iconVariant() {
|
|
93
|
+
return badgeVariantToIconVariantMap[this.variant];
|
|
94
94
|
},
|
|
95
95
|
canAnimate() {
|
|
96
96
|
return this.shouldAnimate && !Number.isNaN(Number(this.value));
|
|
@@ -117,7 +117,7 @@ var script = {
|
|
|
117
117
|
const __vue_script__ = script;
|
|
118
118
|
|
|
119
119
|
/* template */
|
|
120
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._g(_vm._b({staticClass:"gl-single-stat gl-flex gl-flex-col gl-p-2"},'div',_vm.$attrs,false),_vm.$listeners),[_c('div',{staticClass:"gl-mb-2 gl-flex gl-items-center gl-text-
|
|
120
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._g(_vm._b({staticClass:"gl-single-stat gl-flex gl-flex-col gl-p-2"},'div',_vm.$attrs,false),_vm.$listeners),[_c('div',{staticClass:"gl-mb-2 gl-flex gl-items-center gl-text-heading"},[(_vm.showTitleIcon)?_c('gl-icon',{class:['gl-mr-2', _vm.titleIconClass],attrs:{"name":_vm.titleIcon,"data-testid":"title-icon"}}):_vm._e(),_vm._v(" "),_c('span',{staticClass:"gl-text-base gl-font-normal",attrs:{"data-testid":"title-text"}},[_vm._v(_vm._s(_vm.title))])],1),_vm._v(" "),_c('div',{staticClass:"gl-single-stat-content gl-flex gl-items-baseline gl-font-bold gl-text-strong"},[_c('span',{staticClass:"gl-single-stat-number gl-leading-1",class:{ 'gl-mr-2': !_vm.unit },attrs:{"data-testid":"displayValue"}},[(_vm.canAnimate)?_c('gl-animated-number',{attrs:{"number":Number(_vm.value),"decimal-places":_vm.animationDecimalPlaces,"use-delimiters":_vm.useDelimiters},on:{"animating":function($event){return _vm.setHideUnits(true)},"animated":function($event){return _vm.setHideUnits(false)}}}):_c('span',{attrs:{"data-testid":"non-animated-value"}},[_vm._v(_vm._s(_vm.statValue))])],1),_vm._v(" "),(_vm.unit)?_c('span',{staticClass:"gl-mx-2 gl-text-sm gl-opacity-10 gl-transition-all",class:{ '!gl-opacity-0': _vm.hideUnits },attrs:{"data-testid":"unit"}},[_vm._v(_vm._s(_vm.unit))]):_vm._e(),_vm._v(" "),(_vm.showMetaIcon)?_c('gl-icon',{attrs:{"variant":_vm.iconVariant,"name":_vm.metaIcon,"data-testid":"meta-icon"}}):_vm._e(),_vm._v(" "),(_vm.showBadge)?_c('gl-badge',{attrs:{"variant":_vm.variant,"icon":_vm.metaIcon,"data-testid":"meta-badge"}},[_vm._v(_vm._s(_vm.metaText))]):_vm._e()],1)])};
|
|
121
121
|
var __vue_staticRenderFns__ = [];
|
|
122
122
|
|
|
123
123
|
/* style */
|