@gitlab/ui 40.7.1 → 41.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# [41.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v40.7.1...v41.0.0) (2022-05-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlModal:** Remove deprecated slots modal-ok and modal-cancel ([7e116ec](https://gitlab.com/gitlab-org/gitlab-ui/commit/7e116ec5295d21a2afefc157c57312a733459bbd))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **GlModal:** This removes the modal-ok and modal-cancel slots from
|
|
12
|
+
the modal component. These slots have been deprecated and are now no
|
|
13
|
+
longer supported.
|
|
14
|
+
|
|
15
|
+
Use the props `action-primary`, `action-secondary` and `action-cancel`
|
|
16
|
+
instead.
|
|
17
|
+
|
|
1
18
|
## [40.7.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v40.7.0...v40.7.1) (2022-05-31)
|
|
2
19
|
|
|
3
20
|
|
|
@@ -82,20 +82,6 @@ var script = {
|
|
|
82
82
|
default: ''
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
computed: {
|
|
86
|
-
shouldRenderModalOk() {
|
|
87
|
-
return Boolean(this.$slots['modal-ok']);
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
shouldRenderModalCancel() {
|
|
91
|
-
return Boolean(this.$slots['modal-cancel']);
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
shouldRenderModalFooter() {
|
|
95
|
-
return Boolean(this.actionCancel || this.actionSecondary || this.actionPrimary || this.$slots['modal-footer']);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
},
|
|
99
85
|
|
|
100
86
|
mounted() {
|
|
101
87
|
if (!this.ariaLabel && !this.title) {
|
|
@@ -179,7 +165,7 @@ var script = {
|
|
|
179
165
|
const __vue_script__ = script;
|
|
180
166
|
|
|
181
167
|
/* template */
|
|
182
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',_vm._g(_vm._b({ref:"modal",attrs:{"id":_vm.modalId,"title-tag":_vm.titleTag,"size":_vm.size,"visible":_vm.visible,"aria-label":_vm.ariaLabel || _vm.title,"lazy":"","modal-class":['gl-modal', _vm.modalClass]},on:{"shown":_vm.setFocus,"ok":_vm.primary,"cancel":_vm.canceled,"change":function($event){return _vm.$emit('change', $event)}},scopedSlots:_vm._u([{key:"default",fn:function(){return [_vm._t("default")]},proxy:true},{key:"modal-header",fn:function(){return [_vm._t("modal-header",[_c('h4',{staticClass:"modal-title"},[_vm._t("modal-title",[_vm._v(_vm._s(_vm.title))])],2)]),_vm._v(" "),_c('close-button',{ref:"close-button",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.close}})]},proxy:true},
|
|
168
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',_vm._g(_vm._b({ref:"modal",attrs:{"id":_vm.modalId,"title-tag":_vm.titleTag,"size":_vm.size,"visible":_vm.visible,"aria-label":_vm.ariaLabel || _vm.title,"lazy":"","modal-class":['gl-modal', _vm.modalClass]},on:{"shown":_vm.setFocus,"ok":_vm.primary,"cancel":_vm.canceled,"change":function($event){return _vm.$emit('change', $event)}},scopedSlots:_vm._u([{key:"default",fn:function(){return [_vm._t("default")]},proxy:true},{key:"modal-header",fn:function(){return [_vm._t("modal-header",[_c('h4',{staticClass:"modal-title"},[_vm._t("modal-title",[_vm._v(_vm._s(_vm.title))])],2)]),_vm._v(" "),_c('close-button',{ref:"close-button",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.close}})]},proxy:true},{key:"modal-footer",fn:function(){return [_vm._t("modal-footer",[(_vm.actionCancel)?_c('gl-button',_vm._b({staticClass:"js-modal-action-cancel",on:{"click":_vm.cancel}},'gl-button',_vm.buttonBinding(_vm.actionCancel, 'actionCancel'),false),[_vm._v("\n "+_vm._s(_vm.actionCancel.text)+"\n ")]):_vm._e(),_vm._v(" "),(_vm.actionSecondary)?_c('gl-button',_vm._b({staticClass:"js-modal-action-secondary",on:{"click":_vm.secondary}},'gl-button',_vm.buttonBinding(_vm.actionSecondary, 'actionSecondary'),false),[_vm._v("\n "+_vm._s(_vm.actionSecondary.text)+"\n ")]):_vm._e(),_vm._v(" "),(_vm.actionPrimary)?_c('gl-button',_vm._b({staticClass:"js-modal-action-primary",on:{"click":_vm.ok}},'gl-button',_vm.buttonBinding(_vm.actionPrimary, 'actionPrimary'),false),[_vm._v("\n "+_vm._s(_vm.actionPrimary.text)+"\n ")]):_vm._e()])]},proxy:true}],null,true)},'b-modal',_vm.$attrs,false),_vm.$listeners))};
|
|
183
169
|
var __vue_staticRenderFns__ = [];
|
|
184
170
|
|
|
185
171
|
/* style */
|
package/package.json
CHANGED
|
@@ -7,11 +7,7 @@ should serve a single purpose dedicated to completing the user’s task.
|
|
|
7
7
|
You can use the `v-model` directive to control the modal’s visibility. The `v-model`
|
|
8
8
|
directive interfaces with the `visible` property and the `@change` event.
|
|
9
9
|
|
|
10
|
-
##
|
|
11
|
-
|
|
12
|
-
We are deprecating the `modal-ok` and `modal-cancel` slots. We are also changing the way the
|
|
13
|
-
`modal-footer` slot content is populated. This is in order to align this component with the design
|
|
14
|
-
system.
|
|
10
|
+
## Modal footer
|
|
15
11
|
|
|
16
12
|
The `modal-footer` slot should only be populated via props: `action-primary`, `action-secondary` and
|
|
17
13
|
`action-cancel`. These props allow you to handle how a primary, secondary and cancel button will
|
|
@@ -86,22 +86,6 @@ export default {
|
|
|
86
86
|
default: '',
|
|
87
87
|
},
|
|
88
88
|
},
|
|
89
|
-
computed: {
|
|
90
|
-
shouldRenderModalOk() {
|
|
91
|
-
return Boolean(this.$slots['modal-ok']);
|
|
92
|
-
},
|
|
93
|
-
shouldRenderModalCancel() {
|
|
94
|
-
return Boolean(this.$slots['modal-cancel']);
|
|
95
|
-
},
|
|
96
|
-
shouldRenderModalFooter() {
|
|
97
|
-
return Boolean(
|
|
98
|
-
this.actionCancel ||
|
|
99
|
-
this.actionSecondary ||
|
|
100
|
-
this.actionPrimary ||
|
|
101
|
-
this.$slots['modal-footer']
|
|
102
|
-
);
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
89
|
mounted() {
|
|
106
90
|
if (!this.ariaLabel && !this.title) {
|
|
107
91
|
logWarning(
|
|
@@ -168,7 +152,7 @@ export default {
|
|
|
168
152
|
</script>
|
|
169
153
|
|
|
170
154
|
<template>
|
|
171
|
-
<!--
|
|
155
|
+
<!--
|
|
172
156
|
Emitted when the modal visibility changes
|
|
173
157
|
@event change
|
|
174
158
|
-->
|
|
@@ -202,14 +186,8 @@ export default {
|
|
|
202
186
|
<!-- @slot Content of Modal header close button. If modal-header slot is used, this slot will not be shown. -->
|
|
203
187
|
<close-button ref="close-button" :label="dismissLabel" @click="close" />
|
|
204
188
|
</template>
|
|
205
|
-
<template v-if="shouldRenderModalOk" #modal-ok>
|
|
206
|
-
<slot name="modal-ok"></slot>
|
|
207
|
-
</template>
|
|
208
|
-
<template v-if="shouldRenderModalCancel" #modal-cancel>
|
|
209
|
-
<slot name="modal-cancel"></slot>
|
|
210
|
-
</template>
|
|
211
189
|
<!-- @slot Populated via props: modal-action-primary, modal-action-cancel and modal-action-secondary. -->
|
|
212
|
-
<template
|
|
190
|
+
<template #modal-footer>
|
|
213
191
|
<slot name="modal-footer">
|
|
214
192
|
<!--
|
|
215
193
|
Emitted when clicked on modal-action-cancel
|