@gitlab/ui 39.6.0 → 39.7.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 +21 -0
- package/dist/components/base/infinite_scroll/infinite_scroll.js +3 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +1 -1
- package/scss_to_js/scss_variables.js +1 -1
- package/scss_to_js/scss_variables.json +1 -1
- package/src/components/base/infinite_scroll/infinite_scroll.spec.js +1 -1
- package/src/components/base/infinite_scroll/infinite_scroll.vue +3 -2
- package/src/components/base/tabs/tabs/tabs.scss +0 -1
- package/src/components/base/tabs/tabs/tabs.stories.js +8 -17
- package/src/scss/variables.scss +1 -1
package/package.json
CHANGED
|
@@ -318,7 +318,7 @@ export const glModalLargeWidth = '61.875rem'
|
|
|
318
318
|
export const modalHeaderBorderColor = '#bfbfbf'
|
|
319
319
|
export const modalFooterBorderColor = '#bfbfbf'
|
|
320
320
|
export const modalTitleLineHeight = '1.25rem'
|
|
321
|
-
export const
|
|
321
|
+
export const modalBackdropBg = '#000'
|
|
322
322
|
export const modalBackdropOpacity = '0.64'
|
|
323
323
|
export const bodyColor = '#303030'
|
|
324
324
|
export const secondary = '#f0f0f0'
|
|
@@ -73,7 +73,7 @@ describe('Infinite Scroll component', () => {
|
|
|
73
73
|
|
|
74
74
|
expect(wrapper.emitted('bottomReached')).toBeFalsy();
|
|
75
75
|
|
|
76
|
-
mockScrollTo({ top: INITIAL_HEIGHT });
|
|
76
|
+
mockScrollTo({ top: INITIAL_HEIGHT - 0.5 });
|
|
77
77
|
expect(wrapper.emitted('bottomReached')).toBeTruthy();
|
|
78
78
|
});
|
|
79
79
|
|
|
@@ -7,6 +7,7 @@ const throttleDuration = 1000;
|
|
|
7
7
|
* Values in pixels, should be a small amount.
|
|
8
8
|
*/
|
|
9
9
|
export const adjustScrollGap = 5;
|
|
10
|
+
const THRESHOLD = 1;
|
|
10
11
|
|
|
11
12
|
export default {
|
|
12
13
|
props: {
|
|
@@ -138,9 +139,9 @@ export default {
|
|
|
138
139
|
return this.$refs.infiniteContainer.scrollTop;
|
|
139
140
|
},
|
|
140
141
|
handleScroll: throttle(function handleScrollThrottled() {
|
|
141
|
-
if (this.
|
|
142
|
+
if (Math.abs(this.itemsListHeight() - this.maxListHeight - this.scrollTop()) < THRESHOLD) {
|
|
142
143
|
this.bottomReached();
|
|
143
|
-
} else if (this.scrollTop()
|
|
144
|
+
} else if (this.scrollTop() <= THRESHOLD) {
|
|
144
145
|
this.topReached();
|
|
145
146
|
}
|
|
146
147
|
}),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { range } from 'lodash';
|
|
2
2
|
import { GlTabs, GlTab, GlScrollableTabs, GlBadge } from '../../../../index';
|
|
3
|
+
import { badgeVariantOptions } from '../../../../utils/constants';
|
|
3
4
|
import readme from './tabs.md';
|
|
4
5
|
|
|
5
6
|
const components = {
|
|
@@ -152,28 +153,18 @@ export const WithCounterBadges = (_args, { argTypes }) => ({
|
|
|
152
153
|
props: Object.keys(argTypes),
|
|
153
154
|
components: { ...components, GlBadge },
|
|
154
155
|
template: wrap(`
|
|
155
|
-
<gl-tab
|
|
156
|
+
<gl-tab
|
|
157
|
+
v-for="variant in $options.badgeVariantOptions"
|
|
158
|
+
:key="variant"
|
|
159
|
+
>
|
|
156
160
|
<template #title>
|
|
157
161
|
<span>Tab</span>
|
|
158
|
-
<gl-badge size="sm" class="gl-tab-counter-badge">500</gl-badge>
|
|
162
|
+
<gl-badge size="sm" class="gl-tab-counter-badge" :variant="variant">500</gl-badge>
|
|
159
163
|
<span class="sr-only">items</span>
|
|
160
164
|
</template>
|
|
161
|
-
Tab panel
|
|
162
|
-
</gl-tab>
|
|
163
|
-
<gl-tab>
|
|
164
|
-
<template #title>
|
|
165
|
-
<span>Tab</span>
|
|
166
|
-
<gl-badge size="sm" class="gl-tab-counter-badge">250</gl-badge>
|
|
167
|
-
<span class="sr-only">items</span>
|
|
168
|
-
</template>
|
|
169
|
-
Tab panel 2
|
|
170
|
-
</gl-tab>
|
|
171
|
-
<gl-tab>
|
|
172
|
-
<template #title>
|
|
173
|
-
<span>Tab</span>
|
|
174
|
-
</template>
|
|
175
|
-
Tab panel 3
|
|
165
|
+
Tab panel {{ variant }}
|
|
176
166
|
</gl-tab>`),
|
|
167
|
+
badgeVariantOptions,
|
|
177
168
|
});
|
|
178
169
|
|
|
179
170
|
export const WithActions = (_args, { argTypes }) => ({
|
package/src/scss/variables.scss
CHANGED
|
@@ -461,7 +461,7 @@ $gl-modal-large-width: px-to-rem(990px);
|
|
|
461
461
|
$modal-header-border-color: $gray-200;
|
|
462
462
|
$modal-footer-border-color: $gray-200;
|
|
463
463
|
$modal-title-line-height: $gl-line-height-20;
|
|
464
|
-
$modal-backdrop: #000;
|
|
464
|
+
$modal-backdrop-bg: #000;
|
|
465
465
|
$modal-backdrop-opacity: 0.64;
|
|
466
466
|
|
|
467
467
|
// Bootstrap overrides
|