@gitlab/ui 61.0.0 → 61.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [61.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v61.0.0...v61.1.0) (2023-04-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * **Banner:** Use CloseButton ([f4ddd66](https://gitlab.com/gitlab-org/gitlab-ui/commit/f4ddd66771f46607ff657f2bf4bc268f666c51ec))
7
+ * **Banner:** Use CloseButton ([d173aed](https://gitlab.com/gitlab-org/gitlab-ui/commit/d173aed03b4400196aa9711e118b57047e707a14))
8
+
1
9
  # [61.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v60.2.0...v61.0.0) (2023-04-12)
2
10
 
3
11
 
@@ -1,4 +1,5 @@
1
1
  import { bannerVariants } from '../../../utils/constants';
2
+ import CloseButton from '../../shared_components/close_button/close_button';
2
3
  import GlButton from '../button/button';
3
4
  import GlCard from '../card/card';
4
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
@@ -6,6 +7,7 @@ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
7
  var script = {
7
8
  name: 'GlBanner',
8
9
  components: {
10
+ CloseButton,
9
11
  GlButton,
10
12
  GlCard
11
13
  },
@@ -51,6 +53,14 @@ var script = {
51
53
  return bannerVariants.includes(value);
52
54
  }
53
55
  },
56
+ /**
57
+ * Dismiss button's aria-label.
58
+ */
59
+ dismissLabel: {
60
+ type: String,
61
+ required: false,
62
+ default: 'Dismiss'
63
+ },
54
64
  /**
55
65
  * Removes the border for banners embedded in content.
56
66
  */
@@ -91,7 +101,7 @@ var script = {
91
101
  const __vue_script__ = script;
92
102
 
93
103
  /* template */
94
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-card',{staticClass:"gl-px-8 gl-py-6 gl-line-height-20",class:{ 'gl-banner-introduction': _vm.isIntroducing, 'gl-border-none!': _vm.embedded },attrs:{"body-class":"gl-display-flex gl-p-0!"}},[(_vm.svgPath)?_c('div',{staticClass:"gl-banner-illustration"},[_c('img',{attrs:{"src":_vm.svgPath,"alt":""}})]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-banner-content"},[_c('h2',{staticClass:"gl-banner-title"},[_vm._v(_vm._s(_vm.title))]),_vm._v(" "),_vm._t("default"),_vm._v(" "),_c('gl-button',{attrs:{"variant":"confirm","category":"primary","data-testid":"gl-banner-primary-button","href":_vm.buttonLink},on:{"click":_vm.primaryButtonClicked}},[_vm._v(_vm._s(_vm.buttonText))]),_vm._v(" "),_vm._t("actions")],2),_vm._v(" "),_c('gl-button',{staticClass:"gl-banner-close",attrs:{"variant":_vm.isIntroducing ? 'confirm' : 'default',"category":"tertiary","size":"small","icon":"close","aria-label":"Close banner"},on:{"click":_vm.handleClose}})],1)};
104
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-card',{staticClass:"gl-px-8 gl-py-6 gl-line-height-20",class:{ 'gl-banner-introduction': _vm.isIntroducing, 'gl-border-none!': _vm.embedded },attrs:{"body-class":"gl-display-flex gl-p-0!"}},[(_vm.svgPath)?_c('div',{staticClass:"gl-banner-illustration"},[_c('img',{attrs:{"src":_vm.svgPath,"alt":""}})]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-banner-content"},[_c('h2',{staticClass:"gl-banner-title"},[_vm._v(_vm._s(_vm.title))]),_vm._v(" "),_vm._t("default"),_vm._v(" "),_c('gl-button',{attrs:{"variant":"confirm","category":"primary","data-testid":"gl-banner-primary-button","href":_vm.buttonLink},on:{"click":_vm.primaryButtonClicked}},[_vm._v(_vm._s(_vm.buttonText))]),_vm._v(" "),_vm._t("actions")],2),_vm._v(" "),_c('close-button',{staticClass:"gl-banner-close",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.handleClose}})],1)};
95
105
  var __vue_staticRenderFns__ = [];
96
106
 
97
107
  /* style */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "61.0.0",
3
+ "version": "61.1.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -1,11 +1,13 @@
1
1
  <script>
2
2
  import { bannerVariants } from '../../../utils/constants';
3
+ import CloseButton from '../../shared_components/close_button/close_button.vue';
3
4
  import GlButton from '../button/button.vue';
4
5
  import GlCard from '../card/card.vue';
5
6
 
6
7
  export default {
7
8
  name: 'GlBanner',
8
9
  components: {
10
+ CloseButton,
9
11
  GlButton,
10
12
  GlCard,
11
13
  },
@@ -51,6 +53,14 @@ export default {
51
53
  return bannerVariants.includes(value);
52
54
  },
53
55
  },
56
+ /**
57
+ * Dismiss button's aria-label.
58
+ */
59
+ dismissLabel: {
60
+ type: String,
61
+ required: false,
62
+ default: 'Dismiss',
63
+ },
54
64
  /**
55
65
  * Removes the border for banners embedded in content.
56
66
  */
@@ -112,14 +122,6 @@ export default {
112
122
  <!-- @slot The banner actions to display -->
113
123
  <slot name="actions"></slot>
114
124
  </div>
115
- <gl-button
116
- :variant="isIntroducing ? 'confirm' : 'default'"
117
- category="tertiary"
118
- size="small"
119
- icon="close"
120
- aria-label="Close banner"
121
- class="gl-banner-close"
122
- @click="handleClose"
123
- />
125
+ <close-button class="gl-banner-close" :label="dismissLabel" @click="handleClose" />
124
126
  </gl-card>
125
127
  </template>