@gitlab/ui 115.4.0 → 115.5.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.
@@ -100,7 +100,10 @@ var script = {
100
100
  const __vue_script__ = script;
101
101
 
102
102
  /* template */
103
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"gl-drawer"},on:{"after-enter":_vm.emitOpened}},[(_vm.open)?_c('aside',{staticClass:"gl-drawer",class:_vm.variantClass,style:(_vm.drawerStyles)},[_c('div',{staticClass:"gl-drawer-header",class:{ 'gl-drawer-header-sticky': _vm.headerSticky },style:(_vm.drawerHeaderStyles)},[_c('div',{staticClass:"gl-drawer-title"},[_vm._t("title"),_vm._v(" "),_c('gl-button',{staticClass:"gl-drawer-close-button",attrs:{"category":"tertiary","size":"small","icon":"close","aria-label":"Close drawer"},on:{"click":function($event){return _vm.$emit('close')}}})],2),_vm._v(" "),_vm._t("header")],2),_vm._v(" "),_c('div',{staticClass:"gl-drawer-body",class:{ 'gl-drawer-body-scrim': !_vm.shouldRenderFooter }},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderFooter)?_c('div',{staticClass:"gl-drawer-footer gl-drawer-footer-sticky",class:{ 'gl-drawer-body-scrim-on-footer': _vm.shouldRenderFooter },style:({ zIndex: _vm.zIndex })},[_vm._t("footer")],2):_vm._e()]):_vm._e()])};
103
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"gl-drawer"},on:{"after-enter":_vm.emitOpened}},[(_vm.open)?_c('aside',{staticClass:"gl-drawer",class:_vm.variantClass,style:(_vm.drawerStyles)},[_c('div',{staticClass:"gl-drawer-header",class:{ 'gl-drawer-header-sticky': _vm.headerSticky },style:(_vm.drawerHeaderStyles)},[_c('div',{staticClass:"gl-drawer-title"},[_vm._t("title"),_vm._v(" "),_c('gl-button',{staticClass:"gl-drawer-close-button",attrs:{"category":"tertiary","size":"small","icon":"close","aria-label":"Close drawer"},on:{"click":function($event){return _vm.$emit('close')}}})],2),_vm._v(" "),_vm._t("header")],2),_vm._v(" "),_c('div',{staticClass:"gl-drawer-body",class:{
104
+ 'gl-drawer-body-shrink': _vm.headerSticky,
105
+ 'gl-drawer-body-scrim': !_vm.shouldRenderFooter,
106
+ }},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderFooter)?_c('div',{staticClass:"gl-drawer-footer gl-drawer-footer-sticky gl-drawer-body-scrim-on-footer",style:({ zIndex: _vm.zIndex })},[_vm._t("footer")],2):_vm._e()]):_vm._e()])};
104
107
  var __vue_staticRenderFns__ = [];
105
108
 
106
109
  /* style */
@@ -20,14 +20,8 @@ var script = {
20
20
  * @typedef {Object} Dashboard
21
21
  * @property {string} title - The dashboard title to render. Expected if no #title or #header slot is provided.
22
22
  * @property {string} description - Optional: The dashboard description to render.
23
- * @property {Array<Object>} panels - Optional: The dashboard panels. The entire object is passed to the #panel slot.
24
- * @property {string} panels[].id - Each panel must have a unique ID.
25
- * @property {string} panels[].title - The panel title to render.
26
- * @property {Object} panels[].gridAttributes - Layout settings for the panel.
27
- * @property {number} panels[].gridAttributes.width - Width of the panel in grid units.
28
- * @property {number} panels[].gridAttributes.height - Height of the panel in grid units.
29
- * @property {number} panels[].gridAttributes.xPos - X position of the panel in the grid, expressed in grid units, starts from 0.
30
- * @property {number} panels[].gridAttributes.yPos - Y position of the panel in the grid, expressed in grid units, starts from 0.
23
+ * @property {DashboardGrid} panels - Optional: The grid configuration.
24
+ * @see GridLayout.vue
31
25
  *
32
26
  * @type {Dashboard}
33
27
  */
@@ -65,7 +59,7 @@ var script = {
65
59
  const __vue_script__ = script;
66
60
 
67
61
  /* template */
68
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('section',{staticClass:"gl-my-4 gl-flex gl-items-center"},[_vm._t("header",function(){return [_c('div',{staticClass:"gl-flex gl-w-full gl-flex-col"},[_c('div',{staticClass:"gl-flex gl-items-center"},[_vm._t("title",function(){return [_c('h2',{staticClass:"gl-my-0",attrs:{"data-testid":"title"}},[_vm._v(_vm._s(_vm.config.title))])]})],2),_vm._v(" "),(_vm.dashboardHasDescription)?_c('div',{staticClass:"gl-mt-3 gl-flex"},[_vm._t("description",function(){return [_c('p',{staticClass:"gl-mb-0",attrs:{"data-testid":"description"}},[_vm._v("\n "+_vm._s(_vm.config.description)+"\n ")])]})],2):_vm._e()])]}),_vm._v(" "),(_vm.$scopedSlots.actions)?_c('div',{attrs:{"data-testid":"actions-container"}},[_vm._t("actions")],2):_vm._e()],2),_vm._v(" "),_c('div',{staticClass:"gl-flex"},[_c('div',{staticClass:"gl-flex gl-grow gl-flex-col"},[_vm._t("alert"),_vm._v(" "),(_vm.$scopedSlots.filters)?_c('section',{staticClass:"gl-flex gl-flex-row gl-flex-wrap gl-gap-5 gl-pb-3 gl-pt-4",attrs:{"data-testid":"filters-container"}},[_vm._t("filters")],2):_vm._e(),_vm._v(" "),(_vm.dashboardHasPanels)?_c('grid-layout',{staticClass:"-gl-mx-3",attrs:{"value":_vm.config,"is-static":_vm.isStaticGrid},on:{"input":_vm.emitChanges},scopedSlots:_vm._u([{key:"panel",fn:function(ref){
62
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('section',{staticClass:"gl-my-4 gl-flex gl-items-center"},[_vm._t("header",function(){return [_c('div',{staticClass:"gl-flex gl-w-full gl-flex-col"},[_c('div',{staticClass:"gl-flex gl-items-center"},[_vm._t("title",function(){return [_c('h2',{staticClass:"gl-my-0",attrs:{"data-testid":"title"}},[_vm._v(_vm._s(_vm.config.title))])]})],2),_vm._v(" "),(_vm.dashboardHasDescription)?_c('div',{staticClass:"gl-mt-3 gl-flex"},[_vm._t("description",function(){return [_c('p',{staticClass:"gl-mb-0",attrs:{"data-testid":"description"}},[_vm._v("\n "+_vm._s(_vm.config.description)+"\n ")])]})],2):_vm._e()])]}),_vm._v(" "),(_vm.$scopedSlots.actions)?_c('div',{attrs:{"data-testid":"actions-container"}},[_vm._t("actions")],2):_vm._e()],2),_vm._v(" "),_c('div',{staticClass:"gl-flex"},[_c('div',{staticClass:"gl-flex gl-grow gl-flex-col"},[_vm._t("alert"),_vm._v(" "),(_vm.$scopedSlots.filters)?_c('section',{staticClass:"gl-flex gl-flex-row gl-flex-wrap gl-gap-5 gl-pb-3 gl-pt-4",attrs:{"data-testid":"filters-container"}},[_vm._t("filters")],2):_vm._e(),_vm._v(" "),(_vm.dashboardHasPanels)?_c('grid-layout',{staticClass:"-gl-mx-3",attrs:{"value":_vm.config,"is-static-grid":_vm.isStaticGrid},on:{"input":_vm.emitChanges},scopedSlots:_vm._u([{key:"panel",fn:function(ref){
69
63
  var panel = ref.panel;
70
64
  return [_vm._t("panel",null,null,{ panel: panel })]}}],null,true)}):_vm._t("empty-state")],2)]),_vm._v(" "),_vm._t("footer")],2)};
71
65
  var __vue_staticRenderFns__ = [];
@@ -7,11 +7,29 @@ const CURSOR_GRABBING_CLASS = '!gl-cursor-grabbing';
7
7
  var script = {
8
8
  name: 'GlGridLayout',
9
9
  props: {
10
+ /**
11
+ * The grid configuration object.
12
+ *
13
+ * @typedef {Object} DashboardGrid
14
+ * @property {Array<Object>} panels - The dashboard panels. If empty, it will render an empty grid
15
+ * @property {string} panels[].id - Each panel must have a unique ID.
16
+ * @property {string} panels[].title - The panel title to render.
17
+ * @property {Object} panels[].gridAttributes - Layout settings for the panel.
18
+ * @property {number} panels[].gridAttributes.width - Width of the panel in grid units.
19
+ * @property {number} panels[].gridAttributes.height - Height of the panel in grid units.
20
+ * @property {number} panels[].gridAttributes.xPos - X position of the panel in the grid, expressed in grid units, starts from 0.
21
+ * @property {number} panels[].gridAttributes.yPos - Y position of the panel in the grid, expressed in grid units, starts from 0.
22
+ *
23
+ * @type {DashboardGrid}
24
+ */
10
25
  value: {
11
26
  type: Object,
12
27
  required: true
13
28
  },
14
- isStatic: {
29
+ /**
30
+ * Set to `false` to enable user-driven modification of the grid layout.
31
+ */
32
+ isStaticGrid: {
15
33
  type: Boolean,
16
34
  required: false,
17
35
  default: true
@@ -38,7 +56,7 @@ var script = {
38
56
  }
39
57
  },
40
58
  watch: {
41
- isStatic(value) {
59
+ isStaticGrid(value) {
42
60
  var _this$grid;
43
61
  (_this$grid = this.grid) === null || _this$grid === void 0 ? void 0 : _this$grid.setStatic(value);
44
62
  },
@@ -144,7 +162,7 @@ var script = {
144
162
  animate: true,
145
163
  float: true,
146
164
  // Toggles user-customization of grid layout
147
- staticGrid: this.isStatic
165
+ staticGrid: this.isStaticGrid
148
166
  }, this.$refs.grid).load(this.gridConfig);
149
167
 
150
168
  // Sync Vue components array with gridstack items
@@ -251,7 +269,7 @@ var script = {
251
269
  const __vue_script__ = script;
252
270
 
253
271
  /* template */
254
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"grid",staticClass:"grid-stack",attrs:{"data-testid":"gridstack-grid"}},_vm._l((_vm.gridPanels),function(panel){return _c('div',{key:panel.id,ref:"panelWrappers",refInFor:true,staticClass:"gl-h-full",class:{ 'gl-cursor-grab': !_vm.isStatic },attrs:{"id":panel.id,"data-testid":"gridstack-panel"}},[_vm._t("panel",null,null,{ panel: panel.props })],2)}),0)};
272
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"grid",staticClass:"grid-stack",attrs:{"data-testid":"gridstack-grid"}},_vm._l((_vm.gridPanels),function(panel){return _c('div',{key:panel.id,ref:"panelWrappers",refInFor:true,staticClass:"gl-h-full",class:{ 'gl-cursor-grab': !_vm.isStaticGrid },attrs:{"id":panel.id,"data-testid":"gridstack-panel"}},[_vm._t("panel",null,null,{ panel: panel.props })],2)}),0)};
255
273
  var __vue_staticRenderFns__ = [];
256
274
 
257
275
  /* style */