@gitlab/ui 119.2.0 → 120.1.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.
@@ -6,7 +6,6 @@ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
  //
7
7
 
8
8
  const variantClass = {
9
- [badgeVariantOptions.muted]: 'badge-muted',
10
9
  [badgeVariantOptions.neutral]: 'badge-neutral',
11
10
  [badgeVariantOptions.info]: 'badge-info',
12
11
  [badgeVariantOptions.success]: 'badge-success',
@@ -26,7 +25,7 @@ var script = {
26
25
  */
27
26
  variant: {
28
27
  type: String,
29
- default: badgeVariantOptions.muted,
28
+ default: badgeVariantOptions.neutral,
30
29
  validator(value) {
31
30
  return badgeVariantOptions[value] !== undefined;
32
31
  },
@@ -45,7 +45,7 @@ var script = {
45
45
  const __vue_script__ = script;
46
46
 
47
47
  /* template */
48
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',_vm._g({key:_vm.spriteHref,attrs:{"data-testid":(_vm.name + "-illustration"),"aria-label":"","role":"presentation","width":_vm.illustrationSize,"height":_vm.illustrationSize}},_vm.$listeners),[_c('use',{attrs:{"href":_vm.spriteHref}})])};
48
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',_vm._g({key:_vm.spriteHref,attrs:{"data-testid":(_vm.name + "-illustration"),"role":"presentation","width":_vm.illustrationSize,"height":_vm.illustrationSize}},_vm.$listeners),[_c('use',{attrs:{"href":_vm.spriteHref}})])};
49
49
  var __vue_staticRenderFns__ = [];
50
50
 
51
51
  /* style */
@@ -37,7 +37,7 @@ var script = {
37
37
  variant: {
38
38
  type: String,
39
39
  required: false,
40
- default: badgeVariantOptions.muted,
40
+ default: badgeVariantOptions.neutral,
41
41
  validator: variant => Object.values(badgeVariantOptions).includes(variant)
42
42
  },
43
43
  titleIcon: {
@@ -1,10 +1,12 @@
1
1
  import GlButton from '../../base/button/button';
2
+ import GlIllustration from '../../base/illustration/illustration';
2
3
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
4
 
4
5
  var script = {
5
6
  name: 'GlEmptyState',
6
7
  components: {
7
- GlButton
8
+ GlButton,
9
+ GlIllustration
8
10
  },
9
11
  props: {
10
12
  /**
@@ -28,6 +30,14 @@ var script = {
28
30
  return value > 0 && value <= 6;
29
31
  }
30
32
  },
33
+ /**
34
+ * The illustration's name.
35
+ */
36
+ illustrationName: {
37
+ type: String,
38
+ required: false,
39
+ default: null
40
+ },
31
41
  /**
32
42
  * The illustration's URL.
33
43
  */
@@ -115,7 +125,7 @@ var script = {
115
125
  return this.shouldPreventImageReflow ? this.svgHeight : null;
116
126
  },
117
127
  shouldPreventImageReflow() {
118
- return Boolean(this.svgHeight);
128
+ return Boolean(this.svgHeight) && !this.illustrationName;
119
129
  },
120
130
  shouldRenderPrimaryButton() {
121
131
  return Boolean(this.primaryButtonLink && this.primaryButtonText);
@@ -136,7 +146,7 @@ const __vue_script__ = script;
136
146
  var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"gl-flex",class:{
137
147
  'gl-empty-state gl-flex-col gl-text-center': !_vm.compact,
138
148
  'gl-flex-row': _vm.compact,
139
- }},[_c('div',{class:{ 'gl-hidden gl-px-4 @sm:gl-block': _vm.compact, 'gl-max-w-full': !_vm.compact }},[(_vm.svgPath)?_c('img',{staticClass:"gl-max-w-full",class:{ 'gl-dark-invert-keep-hue': _vm.invertInDarkMode },attrs:{"src":_vm.svgPath,"alt":"","height":_vm.height}}):_vm._e()]),_vm._v(" "),_c('div',{staticClass:"gl-empty-state-content gl-mx-auto gl-my-0",class:_vm.contentClasses,attrs:{"data-testid":"gl-empty-state-content"}},[_vm._t("title",function(){return [_c(_vm.headerComponent,{tag:"component",staticClass:"gl-mb-0 gl-mt-0 gl-text-size-h-display gl-leading-36",class:_vm.compact ? 'h5' : 'h4'},[_vm._v("\n "+_vm._s(_vm.title)+"\n ")])]}),_vm._v(" "),(_vm.description || _vm.$scopedSlots.description)?_c('p',{ref:"description",staticClass:"gl-mb-0 gl-mt-4 gl-text-subtle"},[_vm._t("description",function(){return [_vm._v("\n "+_vm._s(_vm.description)+"\n ")]})],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-mt-5 gl-flex gl-flex-wrap",class:{ 'gl-justify-center': !_vm.compact }},[_vm._t("actions",function(){return [(_vm.shouldRenderPrimaryButton)?_c('gl-button',{staticClass:"gl-mb-3",class:_vm.compact ? 'gl-mr-3' : 'gl-mx-2',attrs:{"variant":"confirm","href":_vm.primaryButtonLink}},[_vm._v(_vm._s(_vm.primaryButtonText))]):_vm._e(),_vm._v(" "),(_vm.shouldRenderSecondaryButton)?_c('gl-button',{staticClass:"gl-mb-3 gl-mr-3",class:{ '!gl-mx-2': !_vm.compact },attrs:{"href":_vm.secondaryButtonLink}},[_vm._v(_vm._s(_vm.secondaryButtonText)+"\n ")]):_vm._e()]})],2)],2)])};
149
+ }},[_c('div',{class:{ 'gl-hidden gl-px-4 @sm:gl-block': _vm.compact, 'gl-max-w-full': !_vm.compact }},[(_vm.illustrationName)?_c('gl-illustration',{attrs:{"name":_vm.illustrationName}}):(_vm.svgPath)?_c('img',{staticClass:"gl-max-w-full",class:{ 'gl-dark-invert-keep-hue': _vm.invertInDarkMode },attrs:{"src":_vm.svgPath,"alt":"","height":_vm.height}}):_vm._e()],1),_vm._v(" "),_c('div',{staticClass:"gl-empty-state-content gl-mx-auto gl-my-0",class:_vm.contentClasses,attrs:{"data-testid":"gl-empty-state-content"}},[_vm._t("title",function(){return [_c(_vm.headerComponent,{tag:"component",staticClass:"gl-mb-0 gl-mt-0 gl-text-size-h-display gl-leading-36",class:_vm.compact ? 'h5' : 'h4'},[_vm._v("\n "+_vm._s(_vm.title)+"\n ")])]}),_vm._v(" "),(_vm.description || _vm.$scopedSlots.description)?_c('p',{ref:"description",staticClass:"gl-mb-0 gl-mt-4 gl-text-subtle"},[_vm._t("description",function(){return [_vm._v("\n "+_vm._s(_vm.description)+"\n ")]})],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-mt-5 gl-flex gl-flex-wrap",class:{ 'gl-justify-center': !_vm.compact }},[_vm._t("actions",function(){return [(_vm.shouldRenderPrimaryButton)?_c('gl-button',{staticClass:"gl-mb-3",class:_vm.compact ? 'gl-mr-3' : 'gl-mx-2',attrs:{"variant":"confirm","href":_vm.primaryButtonLink}},[_vm._v(_vm._s(_vm.primaryButtonText))]):_vm._e(),_vm._v(" "),(_vm.shouldRenderSecondaryButton)?_c('gl-button',{staticClass:"gl-mb-3 gl-mr-3",class:{ '!gl-mx-2': !_vm.compact },attrs:{"href":_vm.secondaryButtonLink}},[_vm._v(_vm._s(_vm.secondaryButtonText)+"\n ")]):_vm._e()]})],2)],2)])};
140
150
  var __vue_staticRenderFns__ = [];
141
151
 
142
152
  /* style */