@gitlab/ui 64.8.0 → 64.10.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,18 @@
1
+ # [64.10.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v64.9.0...v64.10.0) (2023-06-14)
2
+
3
+
4
+ ### Features
5
+
6
+ * **DisclosureDropdown:** borderPosition property ([ea7822e](https://gitlab.com/gitlab-org/gitlab-ui/commit/ea7822e20992c6a0fc074f8ab3766b3145c09c00))
7
+ * **GlKeysetPagination:** add navigation landmark ([3ffd2f7](https://gitlab.com/gitlab-org/gitlab-ui/commit/3ffd2f79b3029504a6e1b831df23904ca8473d06))
8
+
9
+ # [64.9.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v64.8.0...v64.9.0) (2023-06-14)
10
+
11
+
12
+ ### Features
13
+
14
+ * **css:** Added gl-md-justify-content-end mixin ([4fa88fa](https://gitlab.com/gitlab-org/gitlab-ui/commit/4fa88fac40b2bc34eca9058a406b1d649bb67ba4))
15
+
1
16
  # [64.8.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v64.7.0...v64.8.0) (2023-06-13)
2
17
 
3
18
 
@@ -10,6 +10,7 @@ var script = {
10
10
  GlButton,
11
11
  GlIcon
12
12
  },
13
+ inheritAttrs: false,
13
14
  props: {
14
15
  // The following 4 properties match the default names of the
15
16
  // [PageInfo](https://docs.gitlab.com/ee/api/graphql/reference/index.html#pageinfo)
@@ -68,6 +69,15 @@ var script = {
68
69
  required: false,
69
70
  default: null
70
71
  },
72
+ /**
73
+ * The aria-label that needs to be set for the
74
+ * pagination landmark region.
75
+ */
76
+ navigationLabel: {
77
+ type: String,
78
+ required: false,
79
+ default: 'Pagination'
80
+ },
71
81
  /**
72
82
  * The text that will be rendered inside the "Next" button.
73
83
  * It\'s important to provide this parameter since the default text is not translatable.
@@ -101,7 +111,7 @@ var script = {
101
111
  const __vue_script__ = script;
102
112
 
103
113
  /* template */
104
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button-group',_vm._g(_vm._b({staticClass:"gl-keyset-pagination"},'gl-button-group',_vm.$attrs,false),_vm.$listeners),[_c('gl-button',{attrs:{"href":_vm.prevButtonLink,"disabled":_vm.disabled || !_vm.hasPreviousPage,"data-testid":"prevButton"},on:{"click":function($event){return _vm.$emit('prev', _vm.startCursor)}}},[_vm._t("previous-button-content",function(){return [_c('div',{staticClass:"gl-display-flex gl-align-center"},[_c('gl-icon',{attrs:{"name":"chevron-left"}}),_vm._v("\n "+_vm._s(_vm.prevText)+"\n ")],1)]})],2),_vm._v(" "),_c('gl-button',{attrs:{"href":_vm.nextButtonLink,"disabled":_vm.disabled || !_vm.hasNextPage,"data-testid":"nextButton"},on:{"click":function($event){return _vm.$emit('next', _vm.endCursor)}}},[_vm._t("next-button-content",function(){return [_c('div',{staticClass:"gl-display-flex gl-align-center"},[_vm._v("\n "+_vm._s(_vm.nextText)+"\n "),_c('gl-icon',{attrs:{"name":"chevron-right"}})],1)]})],2)],1)};
114
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"gl-pagination",attrs:{"aria-label":_vm.navigationLabel}},[_c('gl-button-group',_vm._g(_vm._b({staticClass:"gl-keyset-pagination"},'gl-button-group',_vm.$attrs,false),_vm.$listeners),[_c('gl-button',{attrs:{"href":_vm.prevButtonLink,"disabled":_vm.disabled || !_vm.hasPreviousPage,"data-testid":"prevButton"},on:{"click":function($event){return _vm.$emit('prev', _vm.startCursor)}}},[_vm._t("previous-button-content",function(){return [_c('div',{staticClass:"gl-display-flex gl-align-center"},[_c('gl-icon',{attrs:{"name":"chevron-left"}}),_vm._v("\n "+_vm._s(_vm.prevText)+"\n ")],1)]})],2),_vm._v(" "),_c('gl-button',{attrs:{"href":_vm.nextButtonLink,"disabled":_vm.disabled || !_vm.hasNextPage,"data-testid":"nextButton"},on:{"click":function($event){return _vm.$emit('next', _vm.endCursor)}}},[_vm._t("next-button-content",function(){return [_c('div',{staticClass:"gl-display-flex gl-align-center"},[_vm._v("\n "+_vm._s(_vm.nextText)+"\n "),_c('gl-icon',{attrs:{"name":"chevron-right"}})],1)]})],2)],1)],1)};
105
115
  var __vue_staticRenderFns__ = [];
106
116
 
107
117
  /* style */
@@ -1,4 +1,8 @@
1
1
  const DISCLOSURE_DROPDOWN_ITEM_NAME = 'GlDisclosureDropdownItem';
2
2
  const DISCLOSURE_DROPDOWN_GROUP_NAME = 'GlDisclosureDropdownGroup';
3
+ const DISCLOSURE_DROPDOWN_GROUP_BORDER_POSITIONS = {
4
+ top: 'top',
5
+ bottom: 'bottom'
6
+ };
3
7
 
4
- export { DISCLOSURE_DROPDOWN_GROUP_NAME, DISCLOSURE_DROPDOWN_ITEM_NAME };
8
+ export { DISCLOSURE_DROPDOWN_GROUP_BORDER_POSITIONS, DISCLOSURE_DROPDOWN_GROUP_NAME, DISCLOSURE_DROPDOWN_ITEM_NAME };
@@ -1,10 +1,13 @@
1
1
  import uniqueId from 'lodash/uniqueId';
2
2
  import GlDisclosureDropdownItem from './disclosure_dropdown_item';
3
3
  import { isGroup } from './utils';
4
- import { DISCLOSURE_DROPDOWN_GROUP_NAME } from './constants';
4
+ import { DISCLOSURE_DROPDOWN_GROUP_BORDER_POSITIONS, DISCLOSURE_DROPDOWN_GROUP_NAME } from './constants';
5
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
 
7
- const GROUP_TOP_BORDER_CLASSES = 'gl-border-t gl-pt-2 gl-mt-2';
7
+ const BORDER_CLASSES = {
8
+ [DISCLOSURE_DROPDOWN_GROUP_BORDER_POSITIONS.top]: 'gl-border-t gl-pt-2 gl-mt-2',
9
+ [DISCLOSURE_DROPDOWN_GROUP_BORDER_POSITIONS.bottom]: 'gl-border-b gl-pb-2 gl-mb-2'
10
+ };
8
11
  var script = {
9
12
  name: DISCLOSURE_DROPDOWN_GROUP_NAME,
10
13
  components: {
@@ -22,17 +25,29 @@ var script = {
22
25
  },
23
26
  /**
24
27
  * If 'true', will set top border for the group
25
- * to separate from other groups
28
+ * to separate from other groups. You can control
29
+ * the border position using the `borderPosition`
30
+ * property.
26
31
  */
27
32
  bordered: {
28
33
  type: Boolean,
29
34
  required: false,
30
35
  default: false
36
+ },
37
+ /**
38
+ * Controls the position of the group's border. Valid
39
+ * values are 'top' and 'bottom'.
40
+ */
41
+ borderPosition: {
42
+ type: String,
43
+ required: false,
44
+ default: DISCLOSURE_DROPDOWN_GROUP_BORDER_POSITIONS.top,
45
+ validator: value => Object.keys(DISCLOSURE_DROPDOWN_GROUP_BORDER_POSITIONS).includes(value)
31
46
  }
32
47
  },
33
48
  computed: {
34
49
  borderClass() {
35
- return this.bordered ? GROUP_TOP_BORDER_CLASSES : null;
50
+ return this.bordered ? BORDER_CLASSES[this.borderPosition] : null;
36
51
  },
37
52
  showHeader() {
38
53
  var _this$group;
@@ -92,4 +107,4 @@ var __vue_staticRenderFns__ = [];
92
107
  );
93
108
 
94
109
  export default __vue_component__;
95
- export { GROUP_TOP_BORDER_CLASSES };
110
+ export { BORDER_CLASSES };