@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "39.6.0",
3
+ "version": "39.7.1",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -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 modalBackdrop = '#000'
321
+ export const modalBackdropBg = '#000'
322
322
  export const modalBackdropOpacity = '0.64'
323
323
  export const bodyColor = '#303030'
324
324
  export const secondary = '#f0f0f0'
@@ -1673,7 +1673,7 @@
1673
1673
  "compiledValue": "1.25rem"
1674
1674
  },
1675
1675
  {
1676
- "name": "$modal-backdrop",
1676
+ "name": "$modal-backdrop-bg",
1677
1677
  "value": "#000",
1678
1678
  "compiledValue": "#000"
1679
1679
  },
@@ -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.scrollTop() + this.maxListHeight >= this.itemsListHeight()) {
142
+ if (Math.abs(this.itemsListHeight() - this.maxListHeight - this.scrollTop()) < THRESHOLD) {
142
143
  this.bottomReached();
143
- } else if (this.scrollTop() === 0) {
144
+ } else if (this.scrollTop() <= THRESHOLD) {
144
145
  this.topReached();
145
146
  }
146
147
  }),
@@ -37,7 +37,6 @@
37
37
 
38
38
  > .gl-tab-counter-badge {
39
39
  font-weight: inherit;
40
- color: inherit;
41
40
  @include gl-ml-2;
42
41
  }
43
42
  }
@@ -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 1
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 }) => ({
@@ -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