@gitlab/ui 50.0.1 → 50.1.1
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 +14 -0
- package/dist/components/base/broadcast_message/broadcast_message.js +25 -1
- package/dist/components/base/broadcast_message/constants.js +5 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/utils/svgs/svg_paths.js +4 -4
- package/package.json +1 -1
- package/scss_to_js/scss_variables.js +1 -0
- package/scss_to_js/scss_variables.json +5 -0
- package/src/components/base/broadcast_message/broadcast_message.scss +19 -3
- package/src/components/base/broadcast_message/broadcast_message.spec.js +17 -7
- package/src/components/base/broadcast_message/broadcast_message.stories.js +31 -26
- package/src/components/base/broadcast_message/broadcast_message.vue +26 -1
- package/src/components/base/broadcast_message/constants.js +3 -0
- package/src/scss/variables.scss +1 -0
- package/src/utils/svgs/svg_paths.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [50.1.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v50.1.0...v50.1.1) (2022-11-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **charts:** Update chart toolbar icons ([18dd203](https://gitlab.com/gitlab-org/gitlab-ui/commit/18dd2037af0591d9cb0c38f21008e5d67b5beaab))
|
|
7
|
+
|
|
8
|
+
# [50.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v50.0.1...v50.1.0) (2022-11-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **GlBroadcastMessage:** Add `type` and `dismissible` props ([98132e1](https://gitlab.com/gitlab-org/gitlab-ui/commit/98132e197d0b0f305b8a7e8ac2e40ca3549239c5))
|
|
14
|
+
|
|
1
15
|
## [50.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v50.0.0...v50.0.1) (2022-11-22)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { colorThemes } from '../../../utils/constants';
|
|
2
2
|
import CloseButton from '../../shared_components/close_button/close_button';
|
|
3
3
|
import GlIcon from '../icon/icon';
|
|
4
|
+
import { TYPE_BANNER, TYPE_LIST, TYPE_NOTIFICATION } from './constants';
|
|
4
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
6
|
|
|
6
7
|
var script = {
|
|
@@ -17,6 +18,14 @@ var script = {
|
|
|
17
18
|
required: false,
|
|
18
19
|
default: 'bullhorn'
|
|
19
20
|
},
|
|
21
|
+
/**
|
|
22
|
+
* Allow the broadcast message to be dismissed by a user.
|
|
23
|
+
*/
|
|
24
|
+
dismissible: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
required: false,
|
|
27
|
+
default: true
|
|
28
|
+
},
|
|
20
29
|
/**
|
|
21
30
|
* The dismiss button's label, it is visible in mobile viewports and used for the button's aria-label attribute.
|
|
22
31
|
*/
|
|
@@ -33,6 +42,21 @@ var script = {
|
|
|
33
42
|
required: false,
|
|
34
43
|
default: Object.keys(colorThemes)[0],
|
|
35
44
|
validator: value => Object.keys(colorThemes).includes(value)
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* The base layout to use. `notification` type broadcast messages are not compatible
|
|
48
|
+
with the `dismissible` or `theme` props.
|
|
49
|
+
*/
|
|
50
|
+
type: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: false,
|
|
53
|
+
default: TYPE_BANNER,
|
|
54
|
+
validator: value => TYPE_LIST.includes(value)
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
computed: {
|
|
58
|
+
showDismissButton() {
|
|
59
|
+
return this.dismissible || this.type === TYPE_NOTIFICATION;
|
|
36
60
|
}
|
|
37
61
|
},
|
|
38
62
|
methods: {
|
|
@@ -52,7 +76,7 @@ var script = {
|
|
|
52
76
|
const __vue_script__ = script;
|
|
53
77
|
|
|
54
78
|
/* template */
|
|
55
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-broadcast-message",class:_vm.theme,attrs:{"role":"alert"}},[_c('div',{staticClass:"gl-broadcast-message-content"},[_c('div',{staticClass:"gl-broadcast-message-icon gl-line-height-normal"},[_c('gl-icon',{attrs:{"name":_vm.iconName}})],1),_vm._v(" "),_c('div',{staticClass:"gl-broadcast-message-text gl-my-n1"},[_vm._t("default")],2)]),_vm._v(" "),_c('close-button',{ref:"dismiss",staticClass:"gl-close-btn-color-inherit gl-broadcast-message-dismiss",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}})],1)};
|
|
79
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-broadcast-message",class:(_vm.theme + " " + _vm.type),attrs:{"role":"alert"}},[_c('div',{staticClass:"gl-broadcast-message-content"},[_c('div',{staticClass:"gl-broadcast-message-icon gl-line-height-normal"},[_c('gl-icon',{attrs:{"name":_vm.iconName}})],1),_vm._v(" "),_c('div',{staticClass:"gl-broadcast-message-text gl-my-n1"},[_vm._t("default")],2)]),_vm._v(" "),(_vm.showDismissButton)?_c('close-button',{ref:"dismiss",staticClass:"gl-close-btn-color-inherit gl-broadcast-message-dismiss",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}}):_vm._e()],1)};
|
|
56
80
|
var __vue_staticRenderFns__ = [];
|
|
57
81
|
|
|
58
82
|
/* style */
|