@gitlab/ui 74.1.0 → 74.2.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
+ # [74.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v74.1.0...v74.2.0) (2024-02-06)
2
+
3
+
4
+ ### Features
5
+
6
+ * **GlSorting:** add `block` prop ([8d76bea](https://gitlab.com/gitlab-org/gitlab-ui/commit/8d76bea901fd7944670fdc9925c0a80c17d7595d))
7
+
1
8
  # [74.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v74.0.0...v74.1.0) (2024-02-06)
2
9
 
3
10
 
@@ -84,6 +84,14 @@ var script = {
84
84
  type: String,
85
85
  required: false,
86
86
  default: ''
87
+ },
88
+ /**
89
+ * Render the dropdown toggle button as a block element
90
+ */
91
+ block: {
92
+ type: Boolean,
93
+ required: false,
94
+ default: false
87
95
  }
88
96
  },
89
97
  computed: {
@@ -131,7 +139,7 @@ var script = {
131
139
  const __vue_script__ = script;
132
140
 
133
141
  /* template */
134
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button-group',{staticClass:"gl-sorting"},[_c('gl-collapsible-listbox',{class:_vm.dropdownClass,attrs:{"toggle-text":_vm.text,"items":_vm.sortOptions,"selected":_vm.sortBy,"toggle-class":_vm.listboxToggleClass,"placement":"right"},on:{"select":_vm.onSortByChanged}}),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],class:['sorting-direction-button', _vm.sortDirectionToggleClass],attrs:{"title":_vm.sortDirectionText,"icon":_vm.localSortDirection,"aria-label":_vm.sortDirectionText},on:{"click":_vm.toggleSortDirection}})],1)};
142
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button-group',{staticClass:"gl-sorting"},[_c('gl-collapsible-listbox',{class:_vm.dropdownClass,attrs:{"toggle-text":_vm.text,"items":_vm.sortOptions,"selected":_vm.sortBy,"toggle-class":_vm.listboxToggleClass,"placement":"right","block":_vm.block},on:{"select":_vm.onSortByChanged}}),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],class:['sorting-direction-button', _vm.sortDirectionToggleClass],attrs:{"title":_vm.sortDirectionText,"icon":_vm.localSortDirection,"aria-label":_vm.sortDirectionText},on:{"click":_vm.toggleSortDirection}})],1)};
135
143
  var __vue_staticRenderFns__ = [];
136
144
 
137
145
  /* style */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 06 Feb 2024 06:40:22 GMT
3
+ * Generated on Tue, 06 Feb 2024 18:32:48 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 06 Feb 2024 06:40:22 GMT
3
+ * Generated on Tue, 06 Feb 2024 18:32:48 GMT
4
4
  */
5
5
 
6
6
  :root.gl-dark {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 06 Feb 2024 06:40:22 GMT
3
+ * Generated on Tue, 06 Feb 2024 18:32:48 GMT
4
4
  */
5
5
 
6
6
  export const DATA_VIZ_GREEN_50 = "#133a03";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 06 Feb 2024 06:40:22 GMT
3
+ * Generated on Tue, 06 Feb 2024 18:32:48 GMT
4
4
  */
5
5
 
6
6
  export const DATA_VIZ_GREEN_50 = "#ddfab7";
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 06 Feb 2024 06:40:22 GMT
3
+ // Generated on Tue, 06 Feb 2024 18:32:48 GMT
4
4
 
5
5
  $red-950: #fff4f3;
6
6
  $red-900: #fcf1ef;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 06 Feb 2024 06:40:22 GMT
3
+ // Generated on Tue, 06 Feb 2024 18:32:48 GMT
4
4
 
5
5
  $gl-line-height-52: 3.25rem;
6
6
  $gl-line-height-44: 2.75rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "74.1.0",
3
+ "version": "74.2.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -149,6 +149,14 @@ describe('sorting component', () => {
149
149
  );
150
150
  });
151
151
 
152
+ it('passes `block` prop to listbox', () => {
153
+ createComponent({
154
+ block: true,
155
+ });
156
+
157
+ expect(findListbox().props('block')).toBe(true);
158
+ });
159
+
152
160
  it('sets aria-label of sort direction button', async () => {
153
161
  createComponent({ sortOptions: [] });
154
162
 
@@ -85,6 +85,14 @@ export default {
85
85
  required: false,
86
86
  default: '',
87
87
  },
88
+ /**
89
+ * Render the dropdown toggle button as a block element
90
+ */
91
+ block: {
92
+ type: Boolean,
93
+ required: false,
94
+ default: false,
95
+ },
88
96
  },
89
97
  computed: {
90
98
  localSortDirection() {
@@ -145,6 +153,7 @@ export default {
145
153
  :toggle-class="listboxToggleClass"
146
154
  :class="dropdownClass"
147
155
  placement="right"
156
+ :block="block"
148
157
  @select="onSortByChanged"
149
158
  />
150
159
  <gl-button