@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 +7 -0
- package/dist/components/base/sorting/sorting.js +9 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/package.json +1 -1
- package/src/components/base/sorting/sorting.spec.js +8 -0
- package/src/components/base/sorting/sorting.vue +9 -0
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 */
|
package/dist/tokens/js/tokens.js
CHANGED
package/package.json
CHANGED
|
@@ -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
|