@gitlab/ui 40.2.0 → 40.3.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 +22 -0
- package/dist/components/base/alert/alert.js +1 -0
- package/dist/components/base/avatar/avatar.js +1 -0
- package/dist/components/base/badge/badge.js +1 -0
- package/dist/components/base/breadcrumb/breadcrumb.js +1 -0
- package/dist/components/base/button/button.js +1 -0
- package/dist/components/base/card/card.js +1 -0
- package/dist/components/base/carousel/carousel.js +1 -0
- package/dist/components/base/collapse/collapse.js +1 -0
- package/dist/components/base/drawer/drawer.js +1 -0
- package/dist/components/base/dropdown/dropdown.js +2 -0
- package/dist/components/base/form/form.js +1 -0
- package/dist/components/base/icon/icon.js +2 -0
- package/dist/components/base/label/label.js +1 -0
- package/dist/components/base/link/link.js +1 -0
- package/dist/components/base/markdown/markdown.js +1 -0
- package/dist/components/base/modal/modal.js +2 -0
- package/dist/components/base/pagination/pagination.js +2 -0
- package/dist/components/base/popover/popover.js +1 -0
- package/dist/components/base/table/table.js +2 -0
- package/dist/components/base/tabs/tabs/tabs.js +2 -0
- package/dist/components/base/token/token.js +1 -0
- package/dist/components/base/tooltip/tooltip.js +1 -0
- package/dist/components/charts/area/area.js +1 -15
- package/dist/components/charts/bar/bar.js +1 -0
- package/dist/components/charts/chart/chart.js +1 -0
- package/dist/components/charts/column/column.js +1 -0
- package/dist/components/charts/heatmap/heatmap.js +1 -0
- package/dist/components/charts/legend/legend.js +1 -0
- package/dist/components/charts/line/line.js +1 -17
- package/dist/components/charts/sparkline/sparkline.js +2 -0
- package/dist/components/charts/tooltip/tooltip.js +1 -0
- package/dist/components/utilities/intersperse/intersperse.js +2 -0
- package/dist/components/utilities/truncate/truncate.js +1 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/dist/utils/test_utils.js +3 -1
- package/package.json +4 -4
- package/src/components/base/alert/alert.vue +1 -0
- package/src/components/base/avatar/avatar.vue +1 -0
- package/src/components/base/badge/badge.vue +1 -0
- package/src/components/base/breadcrumb/breadcrumb.spec.js +1 -1
- package/src/components/base/breadcrumb/breadcrumb.vue +1 -0
- package/src/components/base/button/button.vue +1 -0
- package/src/components/base/card/card.vue +1 -0
- package/src/components/base/carousel/carousel.vue +1 -0
- package/src/components/base/collapse/collapse.vue +1 -0
- package/src/components/base/datepicker/datepicker.vue +1 -0
- package/src/components/base/drawer/drawer.vue +1 -0
- package/src/components/base/dropdown/dropdown.vue +1 -0
- package/src/components/base/form/form.vue +1 -0
- package/src/components/base/form/form_group/form_group.scss +4 -1
- package/src/components/base/form/form_group/form_group.stories.js +1 -1
- package/src/components/base/icon/icon.spec.js +1 -1
- package/src/components/base/icon/icon.vue +1 -0
- package/src/components/base/keyset_pagination/keyset_pagination.spec.js +1 -1
- package/src/components/base/label/label.vue +1 -0
- package/src/components/base/link/link.vue +1 -0
- package/src/components/base/markdown/markdown.scss +32 -0
- package/src/components/base/markdown/markdown.stories.js +6 -3
- package/src/components/base/markdown/markdown.vue +1 -0
- package/src/components/base/markdown/markdown_typescale_demo.html +46 -0
- package/src/components/base/modal/modal.spec.js +1 -1
- package/src/components/base/modal/modal.vue +1 -0
- package/src/components/base/new_dropdowns/listbox/listbox.vue +1 -0
- package/src/components/base/paginated_list/paginated_list.vue +1 -1
- package/src/components/base/pagination/pagination.spec.js +1 -1
- package/src/components/base/pagination/pagination.vue +1 -0
- package/src/components/base/path/path.vue +1 -0
- package/src/components/base/popover/popover.vue +1 -0
- package/src/components/base/search_box_by_click/search_box_by_click.spec.js +1 -1
- package/src/components/base/search_box_by_click/search_box_by_click.vue +2 -2
- package/src/components/base/search_box_by_type/search_box_by_type.spec.js +1 -1
- package/src/components/base/table/table.vue +1 -0
- package/src/components/base/tabs/tab/tab.vue +1 -0
- package/src/components/base/tabs/tabs/scrollable_tabs.spec.js +1 -1
- package/src/components/base/tabs/tabs/tabs.vue +1 -0
- package/src/components/base/toggle/toggle.vue +1 -0
- package/src/components/base/token/token.vue +1 -0
- package/src/components/base/token_selector/token_container.spec.js +1 -1
- package/src/components/base/tooltip/tooltip.vue +1 -0
- package/src/components/charts/area/area.spec.js +2 -3
- package/src/components/charts/area/area.vue +1 -0
- package/src/components/charts/bar/bar.spec.js +2 -2
- package/src/components/charts/bar/bar.vue +1 -0
- package/src/components/charts/chart/chart.spec.js +1 -1
- package/src/components/charts/chart/chart.vue +1 -0
- package/src/components/charts/column/column.vue +1 -0
- package/src/components/charts/column/column_chart.spec.js +2 -2
- package/src/components/charts/gauge/gauge.spec.js +1 -1
- package/src/components/charts/gauge/gauge.vue +1 -0
- package/src/components/charts/heatmap/heatmap.spec.js +2 -2
- package/src/components/charts/heatmap/heatmap.vue +1 -0
- package/src/components/charts/legend/legend.spec.js +1 -1
- package/src/components/charts/legend/legend.vue +1 -0
- package/src/components/charts/line/line.spec.js +2 -4
- package/src/components/charts/line/line.vue +1 -0
- package/src/components/charts/sparkline/sparkline.spec.js +2 -2
- package/src/components/charts/sparkline/sparkline.vue +1 -0
- package/src/components/charts/stacked_column/stacked_column.spec.js +3 -4
- package/src/components/charts/tooltip/tooltip.spec.js +1 -1
- package/src/components/charts/tooltip/tooltip.vue +1 -0
- package/src/components/regions/empty_state/empty_state.spec.js +1 -1
- package/src/components/utilities/animated_number/animated_number.spec.js +1 -1
- package/src/components/utilities/intersection_observer/intersection_observer.spec.js +1 -1
- package/src/components/utilities/intersperse/intersperse.vue +1 -0
- package/src/components/utilities/sprintf/sprintf.vue +1 -0
- package/src/components/utilities/truncate/truncate.spec.js +1 -1
- package/src/components/utilities/truncate/truncate.vue +1 -0
- package/src/directives/hover_load/hover_load.spec.js +3 -1
- package/src/directives/outside/outside.spec.js +4 -1
- package/src/directives/resize_observer/resize_observer.spec.js +1 -1
- package/src/scss/utilities.scss +18 -0
- package/src/scss/utility-mixins/box-shadow.scss +9 -0
- package/src/utils/test_utils.js +4 -1
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
|
+
import { LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '~/utils/charts/constants';
|
|
4
|
+
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
3
5
|
import Chart from '../chart/chart.vue';
|
|
4
6
|
import ChartLegend from '../legend/legend.vue';
|
|
5
7
|
import LineChart from './line.vue';
|
|
6
8
|
|
|
7
|
-
import { LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '~/utils/charts/constants';
|
|
8
|
-
|
|
9
|
-
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
10
|
-
|
|
11
9
|
let mockChartInstance;
|
|
12
10
|
|
|
13
11
|
jest.mock('echarts', () => ({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import Chart from '../chart/chart.vue';
|
|
3
|
-
import SparklineChart from './sparkline.vue';
|
|
4
2
|
import { waitForAnimationFrame } from '~/utils/test_utils';
|
|
5
3
|
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
4
|
+
import Chart from '../chart/chart.vue';
|
|
5
|
+
import SparklineChart from './sparkline.vue';
|
|
6
6
|
|
|
7
7
|
let mockChartInstance;
|
|
8
8
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
|
+
import TooltipDefaultFormat from '~/components/shared_components/charts/tooltip_default_format.vue';
|
|
4
|
+
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
5
|
+
import { LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '~/utils/charts/constants';
|
|
3
6
|
import {
|
|
4
7
|
mockDefaultStackedLineData,
|
|
5
8
|
mockDefaultStackedBarData,
|
|
@@ -9,10 +12,6 @@ import Chart from '../chart/chart.vue';
|
|
|
9
12
|
import ChartLegend from '../legend/legend.vue';
|
|
10
13
|
import * as themeUtils from '../../../utils/charts/theme';
|
|
11
14
|
import StackedColumnChart from './stacked_column.vue';
|
|
12
|
-
import TooltipDefaultFormat from '~/components/shared_components/charts/tooltip_default_format.vue';
|
|
13
|
-
|
|
14
|
-
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
15
|
-
import { LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '~/utils/charts/constants';
|
|
16
15
|
|
|
17
16
|
let mockChartInstance;
|
|
18
17
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
2
3
|
import GlPopover from '../../base/popover/popover.vue';
|
|
3
4
|
import { popoverPlacements } from '../../../utils/constants';
|
|
4
5
|
import ChartTooltip from './tooltip.vue';
|
|
5
|
-
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
6
6
|
|
|
7
7
|
let mockChartInstance;
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import GlAnimatedNumber from './animated_number.vue';
|
|
3
2
|
import { waitForAnimationFrame } from '~/utils/test_utils';
|
|
3
|
+
import GlAnimatedNumber from './animated_number.vue';
|
|
4
4
|
|
|
5
5
|
const duration = 2000;
|
|
6
6
|
const ACTION_ANIMATED = 'animated';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import GlIntersectionObserver from './intersection_observer.vue';
|
|
3
2
|
import useMockIntersectionObserver from '~/utils/use_mock_intersection_observer';
|
|
3
|
+
import GlIntersectionObserver from './intersection_observer.vue';
|
|
4
4
|
|
|
5
5
|
const TEST_SLOT = '<p>Hello world! Lorem ipsum.</p>';
|
|
6
6
|
const ENTRY_INTERSECTING = { ratio: 0.75, isIntersecting: true };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createMockDirective, getBinding } from '~helpers/vue_mock_directive';
|
|
2
3
|
import { POSITION } from './constants';
|
|
3
4
|
import Truncate from './truncate.vue';
|
|
4
|
-
import { createMockDirective, getBinding } from '~helpers/vue_mock_directive';
|
|
5
5
|
|
|
6
6
|
const removeSpecialChar = (text) => {
|
|
7
7
|
return text.replace(/‎|\u200E/gi, '');
|
|
@@ -36,7 +36,9 @@ describe('hover load directive', () => {
|
|
|
36
36
|
createComponent(mockHandleLoad);
|
|
37
37
|
|
|
38
38
|
findTarget().trigger('mouseover');
|
|
39
|
-
await new Promise((resolve) =>
|
|
39
|
+
await new Promise((resolve) => {
|
|
40
|
+
setTimeout(resolve, hoverDuration);
|
|
41
|
+
});
|
|
40
42
|
findTarget().trigger('mouseout');
|
|
41
43
|
|
|
42
44
|
if (hoverDuration < 100) {
|
|
@@ -12,7 +12,10 @@ describe('outside directive', () => {
|
|
|
12
12
|
// to guarantee it. So, we use 2ms, which seems to eliminate the flakiness.
|
|
13
13
|
// Jest's fake timers unfortunately do not seem to affect event timestamps,
|
|
14
14
|
// so can't be used here.
|
|
15
|
-
const delay = (ms = 2) =>
|
|
15
|
+
const delay = (ms = 2) =>
|
|
16
|
+
new Promise((resolve) => {
|
|
17
|
+
setTimeout(resolve, ms);
|
|
18
|
+
});
|
|
16
19
|
const find = (testid) => wrapper.find(`[data-testid="${testid}"]`);
|
|
17
20
|
|
|
18
21
|
const defaultTemplate = `
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { GlResizeObserverDirective } from './resize_observer';
|
|
3
2
|
import { useMockResizeObserver } from '~helpers/mock_dom_observer';
|
|
3
|
+
import { GlResizeObserverDirective } from './resize_observer';
|
|
4
4
|
|
|
5
5
|
describe('resize observer directive', () => {
|
|
6
6
|
const { trigger, observersCount, observesElement } = useMockResizeObserver();
|
package/src/scss/utilities.scss
CHANGED
|
@@ -1760,6 +1760,24 @@
|
|
|
1760
1760
|
inset 0 -#{$gl-border-size-1} 0 0 $gray-200 !important
|
|
1761
1761
|
}
|
|
1762
1762
|
|
|
1763
|
+
.gl-inset-border-y-1-gray-100 {
|
|
1764
|
+
box-shadow: inset 0 #{$gl-border-size-1} 0 0 $gray-100,
|
|
1765
|
+
inset 0 -#{$gl-border-size-1} 0 0 $gray-100
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
.gl-inset-border-y-1-gray-100\! {
|
|
1769
|
+
box-shadow: inset 0 #{$gl-border-size-1} 0 0 $gray-100,
|
|
1770
|
+
inset 0 -#{$gl-border-size-1} 0 0 $gray-100 !important
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
.gl-inset-border-b-1-gray-100 {
|
|
1774
|
+
box-shadow: inset 0 -#{$gl-border-size-1} 0 0 $gray-100
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
.gl-inset-border-b-1-gray-100\! {
|
|
1778
|
+
box-shadow: inset 0 -#{$gl-border-size-1} 0 0 $gray-100 !important
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1763
1781
|
.gl-inset-border-b-2-gray-100 {
|
|
1764
1782
|
box-shadow: inset 0 -#{$gl-border-size-2} 0 0 $gray-100
|
|
1765
1783
|
}
|
|
@@ -36,6 +36,15 @@
|
|
|
36
36
|
inset 0 -#{$gl-border-size-1} 0 0 $gray-200;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
@mixin gl-inset-border-y-1-gray-100 {
|
|
40
|
+
box-shadow: inset 0 #{$gl-border-size-1} 0 0 $gray-100,
|
|
41
|
+
inset 0 -#{$gl-border-size-1} 0 0 $gray-100;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@mixin gl-inset-border-b-1-gray-100 {
|
|
45
|
+
box-shadow: inset 0 -#{$gl-border-size-1} 0 0 $gray-100;
|
|
46
|
+
}
|
|
47
|
+
|
|
39
48
|
@mixin gl-inset-border-b-2-gray-100 {
|
|
40
49
|
box-shadow: inset 0 -#{$gl-border-size-2} 0 0 $gray-100;
|
|
41
50
|
}
|
package/src/utils/test_utils.js
CHANGED
|
@@ -8,7 +8,10 @@ export function setStoryTimeout(fn, timeout) {
|
|
|
8
8
|
|
|
9
9
|
// adopted this method from Bootstraps utils
|
|
10
10
|
// https://github.com/bootstrap-vue/bootstrap-vue/blob/2fd03f0b1d0cc41f9930078ba8b1c16b10e4ac2f/tests/utils.js#L6
|
|
11
|
-
export const waitForAnimationFrame = () =>
|
|
11
|
+
export const waitForAnimationFrame = () =>
|
|
12
|
+
new Promise((resolve) => {
|
|
13
|
+
requestAnimationFrame(resolve);
|
|
14
|
+
});
|
|
12
15
|
|
|
13
16
|
export const getResetAnimationsCSS = () => `
|
|
14
17
|
*, *::after, *::before {
|