@gitlab/ui 32.26.0 → 32.27.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,10 @@
|
|
|
1
|
+
# [32.27.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.26.0...v32.27.0) (2021-10-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlBanner:** Add embedded prop to gl-banner ([e0669e3](https://gitlab.com/gitlab-org/gitlab-ui/commit/e0669e328fd396276c47bd246864af9108b2688d))
|
|
7
|
+
|
|
1
8
|
# [32.26.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.25.0...v32.26.0) (2021-10-27)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -56,6 +56,15 @@ var script = {
|
|
|
56
56
|
return bannerVariants.includes(value);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Removes the border for banners embedded in content.
|
|
63
|
+
*/
|
|
64
|
+
embedded: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
required: false,
|
|
67
|
+
default: null
|
|
59
68
|
}
|
|
60
69
|
},
|
|
61
70
|
computed: {
|
|
@@ -92,7 +101,7 @@ var script = {
|
|
|
92
101
|
const __vue_script__ = script;
|
|
93
102
|
|
|
94
103
|
/* template */
|
|
95
|
-
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 },attrs:{"body-class":"gl-display-flex gl-p-0!"}},[(_vm.svgPath)?_c('div',{staticClass:"gl-banner-illustration"},[_c('img',{attrs:{"src":_vm.svgPath,"alt":"","role":"presentation"}})]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-banner-content"},[_c('h1',{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":"","role":"presentation"}})]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-banner-content"},[_c('h1',{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)};
|
|
96
105
|
var __vue_staticRenderFns__ = [];
|
|
97
106
|
|
|
98
107
|
/* style */
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ const template = `
|
|
|
11
11
|
:button-link="buttonLink"
|
|
12
12
|
:svg-path="svgPath"
|
|
13
13
|
:variant="variant"
|
|
14
|
+
:embedded="embedded"
|
|
14
15
|
>
|
|
15
16
|
<p>GitLab Service Desk is a simple way to allow people to create issues in your GitLab instance without needing their own user account. It provides a unique email address for end users to create issues in a project, and replies can be sent either though the GitLab interface or by email. End users will only see the thread though email.</p>
|
|
16
17
|
</gl-banner>
|
|
@@ -22,12 +23,14 @@ const generateProps = ({
|
|
|
22
23
|
buttonLink = 'https://gitlab.com',
|
|
23
24
|
svgPath = serviceDeskCalloutSvg,
|
|
24
25
|
variant = GlBanner.props.variant.default,
|
|
26
|
+
embedded = false,
|
|
25
27
|
} = {}) => ({
|
|
26
28
|
title,
|
|
27
29
|
buttonText,
|
|
28
30
|
buttonLink,
|
|
29
31
|
svgPath,
|
|
30
32
|
variant,
|
|
33
|
+
embedded,
|
|
31
34
|
});
|
|
32
35
|
|
|
33
36
|
const Template = (args, { argTypes }) => ({
|
|
@@ -51,6 +54,11 @@ Introduction.args = generateProps({
|
|
|
51
54
|
variant: bannerVariants[1],
|
|
52
55
|
});
|
|
53
56
|
|
|
57
|
+
export const Embedded = Template.bind({});
|
|
58
|
+
Embedded.args = generateProps({
|
|
59
|
+
embedded: true,
|
|
60
|
+
});
|
|
61
|
+
|
|
54
62
|
export const WithActions = (args, { argTypes }) => ({
|
|
55
63
|
components: {
|
|
56
64
|
GlBanner,
|
|
@@ -51,6 +51,14 @@ export default {
|
|
|
51
51
|
return bannerVariants.includes(value);
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
|
+
/**
|
|
55
|
+
* Removes the border for banners embedded in content.
|
|
56
|
+
*/
|
|
57
|
+
embedded: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
required: false,
|
|
60
|
+
default: null,
|
|
61
|
+
},
|
|
54
62
|
},
|
|
55
63
|
computed: {
|
|
56
64
|
isIntroducing() {
|
|
@@ -83,7 +91,7 @@ export default {
|
|
|
83
91
|
<template>
|
|
84
92
|
<gl-card
|
|
85
93
|
class="gl-px-8 gl-py-6 gl-line-height-20"
|
|
86
|
-
:class="{ 'gl-banner-introduction': isIntroducing }"
|
|
94
|
+
:class="{ 'gl-banner-introduction': isIntroducing, 'gl-border-none!': embedded }"
|
|
87
95
|
body-class="gl-display-flex gl-p-0!"
|
|
88
96
|
>
|
|
89
97
|
<div v-if="svgPath" class="gl-banner-illustration">
|