@gitlab/ui 64.11.1 → 64.13.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 +19 -0
- package/dist/components/base/keyset_pagination/keyset_pagination.js +6 -1
- package/dist/config.js +2 -0
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +18 -18
- 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/config.js +2 -0
- package/src/scss/utilities.scss +48 -0
- package/src/scss/utility-mixins/sizing.scss +24 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "64.
|
|
3
|
+
"version": "64.13.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"cy:edge": "cypress run --browser edge",
|
|
31
31
|
"cy:run": "cypress run --browser firefox",
|
|
32
32
|
"start": "yarn storybook",
|
|
33
|
-
"storybook": "yarn storybook-prep && storybook dev --ci --host localhost --port 9001 -c .storybook",
|
|
34
|
-
"storybook-vue3": "yarn storybook-prep && VUE_VERSION=3 storybook dev --ci --host localhost --port 9001 -c .storybook",
|
|
33
|
+
"storybook": "yarn storybook-prep && storybook dev --ci --host ${STORYBOOK_HOST:-localhost} --port 9001 -c .storybook",
|
|
34
|
+
"storybook-vue3": "yarn storybook-prep && VUE_VERSION=3 storybook dev --ci --host ${STORYBOOK_HOST:-localhost} --port 9001 -c .storybook",
|
|
35
35
|
"storybook-prep": "run-s generate-utilities build-scss-variables copy-fonts",
|
|
36
36
|
"storybook-static": "yarn storybook-prep && storybook build -c .storybook -o storybook",
|
|
37
37
|
"pretest:unit": "yarn build-scss-variables",
|
|
38
38
|
"test": "run-s test:unit test:visual",
|
|
39
|
-
"test:integration": "NODE_ENV=test start-server-and-test start http
|
|
39
|
+
"test:integration": "NODE_ENV=test start-server-and-test start http://${STORYBOOK_HOST:-localhost}:9001/iframe.html cy:run",
|
|
40
40
|
"test:unit": "NODE_ENV=test jest --testPathIgnorePatterns storyshots.spec.js",
|
|
41
41
|
"test:unit:watch": "yarn test:unit --watch",
|
|
42
42
|
"test:unit:debug": "NODE_ENV=test node --inspect node_modules/.bin/jest --testPathIgnorePatterns storyshot.spec.js --watch --runInBand",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"test:visual": "./bin/run-visual-tests.sh 'jest ./tests/storyshots.spec.js'",
|
|
47
47
|
"test:visual:minimal": "node ./bin/run_minimal_visual_tests.js",
|
|
48
48
|
"test:visual:update": "./bin/run-visual-tests.sh 'JEST_IMAGE_SNAPSHOT_TRACK_OBSOLETE=1 jest ./tests/storyshots.spec.js --updateSnapshot'",
|
|
49
|
-
"test:visual:internal": "NODE_ENV=test IS_VISUAL_TEST=true start-test http-get
|
|
49
|
+
"test:visual:internal": "NODE_ENV=test IS_VISUAL_TEST=true start-test http-get://${STORYBOOK_HOST:-localhost}:9001/iframe.html",
|
|
50
50
|
"prettier": "prettier --check '**/*.{js,vue}'",
|
|
51
51
|
"prettier:fix": "prettier --write '**/*.{js,vue}'",
|
|
52
52
|
"eslint": "eslint --max-warnings 0 --ext .js,.vue .",
|
|
@@ -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.21",
|
|
98
|
+
"@storybook/addon-docs": "7.0.21",
|
|
99
|
+
"@storybook/addon-essentials": "7.0.21",
|
|
100
|
+
"@storybook/addon-storyshots": "7.0.21",
|
|
101
|
+
"@storybook/addon-storyshots-puppeteer": "7.0.21",
|
|
102
|
+
"@storybook/addon-viewport": "7.0.21",
|
|
103
|
+
"@storybook/builder-webpack5": "7.0.21",
|
|
104
|
+
"@storybook/theming": "7.0.21",
|
|
105
|
+
"@storybook/vue": "7.0.21",
|
|
106
|
+
"@storybook/vue-webpack5": "7.0.21",
|
|
107
|
+
"@storybook/vue3": "7.0.21",
|
|
108
|
+
"@storybook/vue3-webpack5": "7.0.21",
|
|
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.21",
|
|
157
157
|
"storybook-dark-mode": "3.0.0",
|
|
158
158
|
"stylelint": "14.9.1",
|
|
159
159
|
"stylelint-config-prettier": "^9.0.5",
|
|
@@ -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/config.js
CHANGED
package/src/scss/utilities.scss
CHANGED
|
@@ -5164,6 +5164,54 @@
|
|
|
5164
5164
|
min-width: 0 !important;
|
|
5165
5165
|
}
|
|
5166
5166
|
|
|
5167
|
+
.gl-min-w-1 {
|
|
5168
|
+
min-width: $gl-spacing-scale-1;
|
|
5169
|
+
}
|
|
5170
|
+
|
|
5171
|
+
.gl-min-w-1\! {
|
|
5172
|
+
min-width: $gl-spacing-scale-1 !important;
|
|
5173
|
+
}
|
|
5174
|
+
|
|
5175
|
+
.gl-min-w-2 {
|
|
5176
|
+
min-width: $gl-spacing-scale-2;
|
|
5177
|
+
}
|
|
5178
|
+
|
|
5179
|
+
.gl-min-w-2\! {
|
|
5180
|
+
min-width: $gl-spacing-scale-2 !important;
|
|
5181
|
+
}
|
|
5182
|
+
|
|
5183
|
+
.gl-min-w-3 {
|
|
5184
|
+
min-width: $gl-spacing-scale-3;
|
|
5185
|
+
}
|
|
5186
|
+
|
|
5187
|
+
.gl-min-w-3\! {
|
|
5188
|
+
min-width: $gl-spacing-scale-3 !important;
|
|
5189
|
+
}
|
|
5190
|
+
|
|
5191
|
+
.gl-min-w-4 {
|
|
5192
|
+
min-width: $gl-spacing-scale-4;
|
|
5193
|
+
}
|
|
5194
|
+
|
|
5195
|
+
.gl-min-w-4\! {
|
|
5196
|
+
min-width: $gl-spacing-scale-4 !important;
|
|
5197
|
+
}
|
|
5198
|
+
|
|
5199
|
+
.gl-min-w-5 {
|
|
5200
|
+
min-width: $gl-spacing-scale-5;
|
|
5201
|
+
}
|
|
5202
|
+
|
|
5203
|
+
.gl-min-w-5\! {
|
|
5204
|
+
min-width: $gl-spacing-scale-5 !important;
|
|
5205
|
+
}
|
|
5206
|
+
|
|
5207
|
+
.gl-min-w-6 {
|
|
5208
|
+
min-width: $gl-spacing-scale-6;
|
|
5209
|
+
}
|
|
5210
|
+
|
|
5211
|
+
.gl-min-w-6\! {
|
|
5212
|
+
min-width: $gl-spacing-scale-6 !important;
|
|
5213
|
+
}
|
|
5214
|
+
|
|
5167
5215
|
.gl-min-w-7 {
|
|
5168
5216
|
min-width: $gl-spacing-scale-7;
|
|
5169
5217
|
}
|
|
@@ -344,6 +344,30 @@
|
|
|
344
344
|
min-width: 0;
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
+
@mixin gl-min-w-1 {
|
|
348
|
+
min-width: $gl-spacing-scale-1;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
@mixin gl-min-w-2 {
|
|
352
|
+
min-width: $gl-spacing-scale-2;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
@mixin gl-min-w-3 {
|
|
356
|
+
min-width: $gl-spacing-scale-3;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
@mixin gl-min-w-4 {
|
|
360
|
+
min-width: $gl-spacing-scale-4;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
@mixin gl-min-w-5 {
|
|
364
|
+
min-width: $gl-spacing-scale-5;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
@mixin gl-min-w-6 {
|
|
368
|
+
min-width: $gl-spacing-scale-6;
|
|
369
|
+
}
|
|
370
|
+
|
|
347
371
|
@mixin gl-min-w-7 {
|
|
348
372
|
min-width: $gl-spacing-scale-7;
|
|
349
373
|
}
|