@gitlab/ui 124.4.2 → 125.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/dist/components/base/alert/alert.js +1 -10
- 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/alert/alert.scss +0 -4
- package/src/components/base/alert/alert.vue +1 -10
- package/src/components/charts/single_stat/single_stat.vue +11 -6
- package/src/utils/constants.js +13 -0
|
@@ -28,14 +28,6 @@ var script = {
|
|
|
28
28
|
required: false,
|
|
29
29
|
default: true
|
|
30
30
|
},
|
|
31
|
-
/**
|
|
32
|
-
* Shows icon based on variant.
|
|
33
|
-
*/
|
|
34
|
-
showIcon: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
required: false,
|
|
37
|
-
default: true
|
|
38
|
-
},
|
|
39
31
|
/**
|
|
40
32
|
* The close button's label, it is used for the button's aria-label attribute.
|
|
41
33
|
*/
|
|
@@ -197,9 +189,8 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
197
189
|
'gl-alert',
|
|
198
190
|
{ 'gl-alert-sticky': _vm.sticky },
|
|
199
191
|
{ 'gl-alert-not-dismissible': !_vm.dismissible },
|
|
200
|
-
{ 'gl-alert-no-icon': !_vm.showIcon },
|
|
201
192
|
{ 'gl-alert-has-title': !!_vm.title },
|
|
202
|
-
_vm.variantClass ],attrs:{"role":_vm.role,"aria-live":_vm.politeness}},[
|
|
193
|
+
_vm.variantClass ],attrs:{"role":_vm.role,"aria-live":_vm.politeness}},[_c('div',{staticClass:"gl-alert-icon-container"},[_c('gl-icon',{staticClass:"gl-alert-icon",attrs:{"name":_vm.iconName}})],1),_vm._v(" "),_c('div',{staticClass:"gl-alert-content"},[(_vm.title)?_c('h2',{staticClass:"gl-alert-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-body"},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderActions)?_c('div',{staticClass:"gl-alert-actions"},[_vm._t("actions",function(){return _vm._l((_vm.actionButtons),function(actionButton,index){return _c('gl-button',_vm._g(_vm._b({key:index,staticClass:"gl-alert-action"},'gl-button',actionButton.attrs,false),actionButton.listeners),[_vm._v("\n "+_vm._s(actionButton.text)+"\n ")])})})],2):_vm._e()]),_vm._v(" "),(_vm.dismissible)?_c('close-button',{ref:"dismiss",staticClass:"gl-dismiss-btn",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}}):_vm._e()],1)};
|
|
203
194
|
var __vue_staticRenderFns__ = [];
|
|
204
195
|
|
|
205
196
|
/* style */
|
|
@@ -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 */
|