@gitlab/ui 32.24.0 → 32.27.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 +28 -0
- package/dist/components/base/accordion/accordion.documentation.js +8 -0
- package/dist/components/base/accordion/accordion_item.documentation.js +7 -0
- package/dist/components/base/banner/banner.js +10 -1
- package/dist/components/base/breadcrumb/breadcrumb.js +10 -2
- package/dist/components/base/daterange_picker/daterange_picker.documentation.js +8 -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/documentation/components_documentation.js +3 -0
- package/package.json +4 -4
- package/src/components/base/accordion/accordion.documentation.js +6 -0
- package/src/components/base/accordion/accordion_item.documentation.js +5 -0
- package/src/components/base/banner/banner.stories.js +8 -0
- package/src/components/base/banner/banner.vue +9 -1
- package/src/components/base/breadcrumb/breadcrumb.scss +18 -2
- package/src/components/base/breadcrumb/breadcrumb.stories.js +1 -4
- package/src/components/base/breadcrumb/breadcrumb.vue +22 -11
- package/src/components/base/daterange_picker/daterange_picker.documentation.js +6 -0
- package/src/components/base/dropdown/dropdown.scss +2 -0
- package/src/components/base/form/form_select/form_select.scss +1 -0
- package/src/components/base/label/label.scss +4 -0
- package/src/components/base/search_box_by_click/search_box_by_click.scss +1 -0
- package/src/components/base/segmented_control/segmented_control.scss +1 -0
- package/src/components/base/table/table.scss +1 -0
- package/src/components/base/toast/toast.scss +1 -0
- package/src/components/base/tooltip/tooltip.scss +1 -0
- package/src/scss/utilities.scss +8 -0
- package/src/scss/utility-mixins/position.scss +4 -0
|
@@ -73,6 +73,7 @@ export { default as GlLabelDocumentation } from '../src/components/base/label/la
|
|
|
73
73
|
export { default as GlDatepickerDocumentation } from '../src/components/base/datepicker/datepicker.documentation';
|
|
74
74
|
export { default as GlTokenDocumentation } from '../src/components/base/token/token.documentation';
|
|
75
75
|
export { default as GlToggleDocumentation } from '../src/components/base/toggle/toggle.documentation';
|
|
76
|
+
export { default as GlDaterangePickerDocumentation } from '../src/components/base/daterange_picker/daterange_picker.documentation';
|
|
76
77
|
export { default as GlSortingDocumentation } from '../src/components/base/sorting/sorting.documentation';
|
|
77
78
|
export { default as GlSortingItemDocumentation } from '../src/components/base/sorting/sorting_item.documentation';
|
|
78
79
|
export { default as GlInfiniteScrollDocumentation } from '../src/components/base/infinite_scroll/infinite_scroll.documentation';
|
|
@@ -92,6 +93,8 @@ export { default as GlFilteredSearchTokenSegmentDocumentation } from '../src/com
|
|
|
92
93
|
export { default as GlFilteredSearchDocumentation } from '../src/components/base/filtered_search/filtered_search.documentation';
|
|
93
94
|
export { default as GlBroadcastMessageDocumentation } from '../src/components/base/broadcast_message/broadcast_message.documentation';
|
|
94
95
|
export { default as GlCollapseDocumentation } from '../src/components/base/collapse/collapse.documentation';
|
|
96
|
+
export { default as GlAccordionDocumentation } from '../src/components/base/accordion/accordion.documentation';
|
|
97
|
+
export { default as GlAccordionItemDocumentation } from '../src/components/base/accordion/accordion_item.documentation';
|
|
95
98
|
export { default as GlCarouselDocumentation } from '../src/components/base/carousel/carousel.documentation';
|
|
96
99
|
export { default as GlSafeLinkDirectiveDocumentation } from '../src/directives/safe_link/safe_link.documentation';
|
|
97
100
|
export { default as GlSafeHtmlDirectiveDocumentation } from '../src/directives/safe_html/safe_html.documentation';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.27.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@babel/core": "^7.10.2",
|
|
84
84
|
"@babel/preset-env": "^7.10.2",
|
|
85
85
|
"@gitlab/eslint-plugin": "9.4.0",
|
|
86
|
-
"@gitlab/stylelint-config": "2.
|
|
86
|
+
"@gitlab/stylelint-config": "2.6.0",
|
|
87
87
|
"@gitlab/svgs": "1.218.0",
|
|
88
88
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
89
89
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
@@ -142,8 +142,8 @@
|
|
|
142
142
|
"sass-true": "^5.0.0",
|
|
143
143
|
"start-server-and-test": "^1.10.6",
|
|
144
144
|
"storybook-readme": "5.0.9",
|
|
145
|
-
"stylelint-config-prettier": "
|
|
146
|
-
"stylelint-prettier": "
|
|
145
|
+
"stylelint-config-prettier": "9.0.3",
|
|
146
|
+
"stylelint-prettier": "1.2.0",
|
|
147
147
|
"vue": "^2.6.11",
|
|
148
148
|
"vue-jest": "4.0.0-rc.0",
|
|
149
149
|
"vue-loader": "^15.8.3",
|
|
@@ -11,6 +11,7 @@ const template = `
|
|
|
11
11
|
:button-link="buttonLink"
|
|
12
12
|
:svg-path="svgPath"
|
|
13
13
|
:variant="variant"
|
|
14
|
+
:embedded="embedded"
|
|
14
15
|
>
|
|
15
16
|
<p>GitLab Service Desk is a simple way to allow people to create issues in your GitLab instance without needing their own user account. It provides a unique email address for end users to create issues in a project, and replies can be sent either though the GitLab interface or by email. End users will only see the thread though email.</p>
|
|
16
17
|
</gl-banner>
|
|
@@ -22,12 +23,14 @@ const generateProps = ({
|
|
|
22
23
|
buttonLink = 'https://gitlab.com',
|
|
23
24
|
svgPath = serviceDeskCalloutSvg,
|
|
24
25
|
variant = GlBanner.props.variant.default,
|
|
26
|
+
embedded = false,
|
|
25
27
|
} = {}) => ({
|
|
26
28
|
title,
|
|
27
29
|
buttonText,
|
|
28
30
|
buttonLink,
|
|
29
31
|
svgPath,
|
|
30
32
|
variant,
|
|
33
|
+
embedded,
|
|
31
34
|
});
|
|
32
35
|
|
|
33
36
|
const Template = (args, { argTypes }) => ({
|
|
@@ -51,6 +54,11 @@ Introduction.args = generateProps({
|
|
|
51
54
|
variant: bannerVariants[1],
|
|
52
55
|
});
|
|
53
56
|
|
|
57
|
+
export const Embedded = Template.bind({});
|
|
58
|
+
Embedded.args = generateProps({
|
|
59
|
+
embedded: true,
|
|
60
|
+
});
|
|
61
|
+
|
|
54
62
|
export const WithActions = (args, { argTypes }) => ({
|
|
55
63
|
components: {
|
|
56
64
|
GlBanner,
|
|
@@ -51,6 +51,14 @@ export default {
|
|
|
51
51
|
return bannerVariants.includes(value);
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
|
+
/**
|
|
55
|
+
* Removes the border for banners embedded in content.
|
|
56
|
+
*/
|
|
57
|
+
embedded: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
required: false,
|
|
60
|
+
default: null,
|
|
61
|
+
},
|
|
54
62
|
},
|
|
55
63
|
computed: {
|
|
56
64
|
isIntroducing() {
|
|
@@ -83,7 +91,7 @@ export default {
|
|
|
83
91
|
<template>
|
|
84
92
|
<gl-card
|
|
85
93
|
class="gl-px-8 gl-py-6 gl-line-height-20"
|
|
86
|
-
:class="{ 'gl-banner-introduction': isIntroducing }"
|
|
94
|
+
:class="{ 'gl-banner-introduction': isIntroducing, 'gl-border-none!': embedded }"
|
|
87
95
|
body-class="gl-display-flex gl-p-0!"
|
|
88
96
|
>
|
|
89
97
|
<div v-if="svgPath" class="gl-banner-illustration">
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
$breadcrumb-max-width: $grid-size * 16;
|
|
3
3
|
|
|
4
4
|
.gl-breadcrumbs {
|
|
5
|
+
@include gl-display-flex;
|
|
5
6
|
@include gl-border-0;
|
|
6
7
|
@include gl-inset-border-b-1-gray-200;
|
|
7
8
|
@include gl-py-5;
|
|
@@ -20,10 +21,12 @@ $breadcrumb-max-width: $grid-size * 16;
|
|
|
20
21
|
|
|
21
22
|
.gl-breadcrumb-separator {
|
|
22
23
|
@include gl-display-inline-flex;
|
|
24
|
+
@include gl-absolute;
|
|
25
|
+
right: 0;
|
|
23
26
|
|
|
24
27
|
> svg {
|
|
25
28
|
@include gl-my-auto;
|
|
26
|
-
@include gl-mx-
|
|
29
|
+
@include gl-mx-2;
|
|
27
30
|
@include gl-w-3;
|
|
28
31
|
@include gl-text-gray-500;
|
|
29
32
|
@include gl-fill-current-color;
|
|
@@ -31,7 +34,7 @@ $breadcrumb-max-width: $grid-size * 16;
|
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
.gl-breadcrumb-avatar-tile {
|
|
34
|
-
@include gl-mr-
|
|
37
|
+
@include gl-mr-3;
|
|
35
38
|
@include gl-border-1;
|
|
36
39
|
@include gl-border-solid;
|
|
37
40
|
@include gl-border-gray-200;
|
|
@@ -42,8 +45,21 @@ $breadcrumb-max-width: $grid-size * 16;
|
|
|
42
45
|
.gl-breadcrumb-item {
|
|
43
46
|
@include gl-font-sm;
|
|
44
47
|
@include gl-line-height-normal;
|
|
48
|
+
@include gl-relative;
|
|
49
|
+
@include gl-pr-6;
|
|
50
|
+
|
|
51
|
+
+ .gl-breadcrumb-item {
|
|
52
|
+
@include gl-pl-0;
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
content: '';
|
|
56
|
+
@include gl-display-none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
45
59
|
|
|
46
60
|
> a {
|
|
61
|
+
@include gl-display-flex;
|
|
62
|
+
@include gl-align-items-center;
|
|
47
63
|
@include gl-text-gray-500;
|
|
48
64
|
@include media-breakpoint-down(xs) {
|
|
49
65
|
@include str-truncated($breadcrumb-max-width);
|
|
@@ -6,10 +6,7 @@ const template = `
|
|
|
6
6
|
:items="items"
|
|
7
7
|
>
|
|
8
8
|
<template #avatar>
|
|
9
|
-
<img class="gl-breadcrumb-avatar-tile" src="https://assets.gitlab-static.net/uploads/-/system/group/avatar/9970/logo-extra-whitespace.png?width=
|
|
10
|
-
</template>
|
|
11
|
-
<template #separator>
|
|
12
|
-
<gl-icon name="angle-right" />
|
|
9
|
+
<img class="gl-breadcrumb-avatar-tile" src="https://assets.gitlab-static.net/uploads/-/system/group/avatar/9970/logo-extra-whitespace.png?width=16" width="16" height="16" />
|
|
13
10
|
</template>
|
|
14
11
|
</gl-breadcrumb>
|
|
15
12
|
`;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { BBreadcrumb, BBreadcrumbItem } from 'bootstrap-vue';
|
|
3
|
+
import GlIcon from '../icon/icon.vue';
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
components: {
|
|
6
7
|
BBreadcrumb,
|
|
7
8
|
BBreadcrumbItem,
|
|
9
|
+
GlIcon,
|
|
8
10
|
},
|
|
9
11
|
inheritAttrs: false,
|
|
10
12
|
props: {
|
|
@@ -23,13 +25,18 @@ export default {
|
|
|
23
25
|
},
|
|
24
26
|
},
|
|
25
27
|
},
|
|
28
|
+
methods: {
|
|
29
|
+
isLastItem(items, index) {
|
|
30
|
+
return index === items.length - 1;
|
|
31
|
+
},
|
|
32
|
+
},
|
|
26
33
|
};
|
|
27
34
|
</script>
|
|
28
35
|
<template>
|
|
29
36
|
<div class="gl-breadcrumbs">
|
|
37
|
+
<!-- @slot The avatar to display. -->
|
|
38
|
+
<slot name="avatar"></slot>
|
|
30
39
|
<b-breadcrumb class="gl-breadcrumb-list" v-bind="$attrs" v-on="$listeners">
|
|
31
|
-
<!-- @slot The avatar to display. -->
|
|
32
|
-
<slot name="avatar"></slot>
|
|
33
40
|
<template v-for="(item, index) in items">
|
|
34
41
|
<b-breadcrumb-item
|
|
35
42
|
:key="index"
|
|
@@ -37,16 +44,20 @@ export default {
|
|
|
37
44
|
:text="item.text"
|
|
38
45
|
:href="item.href"
|
|
39
46
|
:to="item.to"
|
|
40
|
-
/>
|
|
41
|
-
<span
|
|
42
|
-
v-if="index != items.length - 1"
|
|
43
|
-
:key="`index ${item.text}`"
|
|
44
|
-
class="gl-breadcrumb-separator"
|
|
45
|
-
data-testid="separator"
|
|
46
47
|
>
|
|
47
|
-
|
|
48
|
-
<
|
|
49
|
-
|
|
48
|
+
<span>{{ item.text }}</span>
|
|
49
|
+
<span
|
|
50
|
+
v-if="!isLastItem(items, index)"
|
|
51
|
+
:key="`${index} ${item.text}`"
|
|
52
|
+
class="gl-breadcrumb-separator"
|
|
53
|
+
data-testid="separator"
|
|
54
|
+
>
|
|
55
|
+
<!-- @slot The separator to display. -->
|
|
56
|
+
<slot name="separator">
|
|
57
|
+
<gl-icon name="chevron-right" />
|
|
58
|
+
</slot>
|
|
59
|
+
</span>
|
|
60
|
+
</b-breadcrumb-item>
|
|
50
61
|
</template>
|
|
51
62
|
</b-breadcrumb>
|
|
52
63
|
</div>
|
|
@@ -33,6 +33,7 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
33
33
|
&:hover {
|
|
34
34
|
@include gl-reset-color;
|
|
35
35
|
@include gl-shadow-none;
|
|
36
|
+
|
|
36
37
|
.gl-label-text-scoped {
|
|
37
38
|
@include gl-text-decoration-underline;
|
|
38
39
|
}
|
|
@@ -62,6 +63,7 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
62
63
|
@include gl-opacity-5;
|
|
63
64
|
@include gl-reset-bg;
|
|
64
65
|
@include gl-shadow-none;
|
|
66
|
+
|
|
65
67
|
.gl-icon {
|
|
66
68
|
@include gl-fill-current-color;
|
|
67
69
|
}
|
|
@@ -92,6 +94,7 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
92
94
|
&:focus,
|
|
93
95
|
&:hover {
|
|
94
96
|
@include gl-bg-black;
|
|
97
|
+
|
|
95
98
|
.gl-icon {
|
|
96
99
|
color: var(--label-background-color);
|
|
97
100
|
}
|
|
@@ -113,6 +116,7 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
113
116
|
&:focus,
|
|
114
117
|
&:hover {
|
|
115
118
|
@include gl-bg-white;
|
|
119
|
+
|
|
116
120
|
.gl-icon {
|
|
117
121
|
color: var(--label-background-color);
|
|
118
122
|
}
|
package/src/scss/utilities.scss
CHANGED