@gitlab/ui 64.12.0 → 64.13.1
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 +14 -0
- package/dist/components/base/keyset_pagination/keyset_pagination.js +6 -1
- package/package.json +14 -14
- package/scss_to_js/scss_variables.js +0 -4
- package/scss_to_js/scss_variables.json +0 -20
- package/src/components/base/keyset_pagination/keyset_pagination.spec.js +10 -6
- package/src/components/base/keyset_pagination/keyset_pagination.vue +6 -1
- package/src/scss/variables.scss +6 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [64.13.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v64.13.0...v64.13.1) (2023-06-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **css:** Allow overriding gray-a variables ([04cc50e](https://gitlab.com/gitlab-org/gitlab-ui/commit/04cc50e4cb742f42029ea2ad7882d05991afc74d))
|
|
7
|
+
|
|
8
|
+
# [64.13.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v64.12.0...v64.13.0) (2023-06-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **GlKeysetPagination:** hides component when hasPreviousPage & hasNextPage is falsy ([93dbdfc](https://gitlab.com/gitlab-org/gitlab-ui/commit/93dbdfc3f94cfdd407e17316c3c329d1180786a0))
|
|
14
|
+
|
|
1
15
|
# [64.12.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v64.11.1...v64.12.0) (2023-06-19)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -104,6 +104,11 @@ var script = {
|
|
|
104
104
|
required: false,
|
|
105
105
|
default: false
|
|
106
106
|
}
|
|
107
|
+
},
|
|
108
|
+
computed: {
|
|
109
|
+
isVisible() {
|
|
110
|
+
return this.hasPreviousPage || this.hasNextPage;
|
|
111
|
+
}
|
|
107
112
|
}
|
|
108
113
|
};
|
|
109
114
|
|
|
@@ -111,7 +116,7 @@ var script = {
|
|
|
111
116
|
const __vue_script__ = script;
|
|
112
117
|
|
|
113
118
|
/* template */
|
|
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)};
|
|
119
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isVisible)?_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):_vm._e()};
|
|
115
120
|
var __vue_staticRenderFns__ = [];
|
|
116
121
|
|
|
117
122
|
/* style */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "64.
|
|
3
|
+
"version": "64.13.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -94,18 +94,18 @@
|
|
|
94
94
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
95
95
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
96
96
|
"@rollup/plugin-replace": "^2.3.2",
|
|
97
|
-
"@storybook/addon-a11y": "7.0.
|
|
98
|
-
"@storybook/addon-docs": "7.0.
|
|
99
|
-
"@storybook/addon-essentials": "7.0.
|
|
100
|
-
"@storybook/addon-storyshots": "7.0.
|
|
101
|
-
"@storybook/addon-storyshots-puppeteer": "7.0.
|
|
102
|
-
"@storybook/addon-viewport": "7.0.
|
|
103
|
-
"@storybook/builder-webpack5": "7.0.
|
|
104
|
-
"@storybook/theming": "7.0.
|
|
105
|
-
"@storybook/vue": "7.0.
|
|
106
|
-
"@storybook/vue-webpack5": "7.0.
|
|
107
|
-
"@storybook/vue3": "7.0.
|
|
108
|
-
"@storybook/vue3-webpack5": "7.0.
|
|
97
|
+
"@storybook/addon-a11y": "7.0.22",
|
|
98
|
+
"@storybook/addon-docs": "7.0.22",
|
|
99
|
+
"@storybook/addon-essentials": "7.0.22",
|
|
100
|
+
"@storybook/addon-storyshots": "7.0.22",
|
|
101
|
+
"@storybook/addon-storyshots-puppeteer": "7.0.22",
|
|
102
|
+
"@storybook/addon-viewport": "7.0.22",
|
|
103
|
+
"@storybook/builder-webpack5": "7.0.22",
|
|
104
|
+
"@storybook/theming": "7.0.22",
|
|
105
|
+
"@storybook/vue": "7.0.22",
|
|
106
|
+
"@storybook/vue-webpack5": "7.0.22",
|
|
107
|
+
"@storybook/vue3": "7.0.22",
|
|
108
|
+
"@storybook/vue3-webpack5": "7.0.22",
|
|
109
109
|
"@vue/compat": "^3.2.40",
|
|
110
110
|
"@vue/compiler-sfc": "^3.2.40",
|
|
111
111
|
"@vue/test-utils": "1.3.0",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"sass-loader": "^10.2.0",
|
|
154
154
|
"sass-true": "^6.1.0",
|
|
155
155
|
"start-server-and-test": "^1.10.6",
|
|
156
|
-
"storybook": "7.0.
|
|
156
|
+
"storybook": "7.0.22",
|
|
157
157
|
"storybook-dark-mode": "3.0.0",
|
|
158
158
|
"stylelint": "14.9.1",
|
|
159
159
|
"stylelint-config-prettier": "^9.0.5",
|
|
@@ -238,10 +238,6 @@ export const dataVizOrange700 = '#92430a'
|
|
|
238
238
|
export const dataVizOrange800 = '#6f3500'
|
|
239
239
|
export const dataVizOrange900 = '#5e2f05'
|
|
240
240
|
export const dataVizOrange950 = '#4b2707'
|
|
241
|
-
export const darkenNormalFactor = '7%'
|
|
242
|
-
export const darkenDarkFactor = '10%'
|
|
243
|
-
export const darkenBorderFactor = '5%'
|
|
244
|
-
export const darkenBorderDashedFactor = '25%'
|
|
245
241
|
export const tGrayA02 = 'rgba(31, 30, 36, 0.02)'
|
|
246
242
|
export const tGrayA04 = 'rgba(31, 30, 36, 0.04)'
|
|
247
243
|
export const tGrayA06 = 'rgba(31, 30, 36, 0.06)'
|
|
@@ -1227,26 +1227,6 @@
|
|
|
1227
1227
|
"value": "#4b2707",
|
|
1228
1228
|
"compiledValue": "#4b2707"
|
|
1229
1229
|
},
|
|
1230
|
-
{
|
|
1231
|
-
"name": "$darken-normal-factor",
|
|
1232
|
-
"value": "7%",
|
|
1233
|
-
"compiledValue": "7%"
|
|
1234
|
-
},
|
|
1235
|
-
{
|
|
1236
|
-
"name": "$darken-dark-factor",
|
|
1237
|
-
"value": "10%",
|
|
1238
|
-
"compiledValue": "10%"
|
|
1239
|
-
},
|
|
1240
|
-
{
|
|
1241
|
-
"name": "$darken-border-factor",
|
|
1242
|
-
"value": "5%",
|
|
1243
|
-
"compiledValue": "5%"
|
|
1244
|
-
},
|
|
1245
|
-
{
|
|
1246
|
-
"name": "$darken-border-dashed-factor",
|
|
1247
|
-
"value": "25%",
|
|
1248
|
-
"compiledValue": "25%"
|
|
1249
|
-
},
|
|
1250
1230
|
{
|
|
1251
1231
|
"name": "$t-gray-a-02",
|
|
1252
1232
|
"value": "rgba($gray-950, 0.02)",
|
|
@@ -12,7 +12,11 @@ describe('GlKeysetPagination', () => {
|
|
|
12
12
|
|
|
13
13
|
const createComponent = (props = {}, scopedSlots = {}) => {
|
|
14
14
|
wrapper = mount(GlKeysetPagination, {
|
|
15
|
-
propsData:
|
|
15
|
+
propsData: {
|
|
16
|
+
hasPreviousPage: true,
|
|
17
|
+
hasNextPage: true,
|
|
18
|
+
...props,
|
|
19
|
+
},
|
|
16
20
|
scopedSlots,
|
|
17
21
|
});
|
|
18
22
|
};
|
|
@@ -56,14 +60,14 @@ describe('GlKeysetPagination', () => {
|
|
|
56
60
|
});
|
|
57
61
|
});
|
|
58
62
|
|
|
59
|
-
describe('
|
|
63
|
+
describe('when both hasNextPage & hasPreviousPage is false', () => {
|
|
60
64
|
beforeEach(() => {
|
|
61
|
-
createComponent();
|
|
65
|
+
createComponent({ hasNextPage: false, hasPreviousPage: false });
|
|
62
66
|
});
|
|
63
67
|
|
|
64
|
-
it('
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
it('does not render pagination', () => {
|
|
69
|
+
expect(findPrevButton().exists()).toBe(false);
|
|
70
|
+
expect(findNextButton().exists()).toBe(false);
|
|
67
71
|
});
|
|
68
72
|
});
|
|
69
73
|
|
|
@@ -105,11 +105,16 @@ export default {
|
|
|
105
105
|
default: false,
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
|
+
computed: {
|
|
109
|
+
isVisible() {
|
|
110
|
+
return this.hasPreviousPage || this.hasNextPage;
|
|
111
|
+
},
|
|
112
|
+
},
|
|
108
113
|
};
|
|
109
114
|
</script>
|
|
110
115
|
|
|
111
116
|
<template>
|
|
112
|
-
<nav class="gl-pagination" :aria-label="navigationLabel">
|
|
117
|
+
<nav v-if="isVisible" class="gl-pagination" :aria-label="navigationLabel">
|
|
113
118
|
<gl-button-group class="gl-keyset-pagination" v-bind="$attrs" v-on="$listeners">
|
|
114
119
|
<gl-button
|
|
115
120
|
:href="prevButtonLink"
|
package/src/scss/variables.scss
CHANGED
|
@@ -303,17 +303,12 @@ $data-viz-orange-800: #6f3500;
|
|
|
303
303
|
$data-viz-orange-900: #5e2f05;
|
|
304
304
|
$data-viz-orange-950: #4b2707;
|
|
305
305
|
|
|
306
|
-
$
|
|
307
|
-
$
|
|
308
|
-
$
|
|
309
|
-
$
|
|
310
|
-
|
|
311
|
-
$t-gray-a-
|
|
312
|
-
$t-gray-a-04: rgba($gray-950, 0.04);
|
|
313
|
-
$t-gray-a-06: rgba($gray-950, 0.06);
|
|
314
|
-
$t-gray-a-08: rgba($gray-950, 0.08);
|
|
315
|
-
$t-gray-a-16: rgba($gray-950, 0.16);
|
|
316
|
-
$t-gray-a-24: rgba($gray-950, 0.24);
|
|
306
|
+
$t-gray-a-02: rgba($gray-950, 0.02) !default;
|
|
307
|
+
$t-gray-a-04: rgba($gray-950, 0.04) !default;
|
|
308
|
+
$t-gray-a-06: rgba($gray-950, 0.06) !default;
|
|
309
|
+
$t-gray-a-08: rgba($gray-950, 0.08) !default;
|
|
310
|
+
$t-gray-a-16: rgba($gray-950, 0.16) !default;
|
|
311
|
+
$t-gray-a-24: rgba($gray-950, 0.24) !default;
|
|
317
312
|
|
|
318
313
|
// Text
|
|
319
314
|
$gl-text-color: $gray-900 !default;
|