@gitlab/ui 43.9.1 → 43.10.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 +21 -0
- package/README.md +1 -1
- package/dist/directives/safe_html/safe_html.js +4 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/package.json +13 -14
- package/src/components/base/alert/alert.scss +0 -19
- package/src/components/base/markdown/markdown.scss +16 -0
- package/src/components/base/markdown/markdown_typescale_demo.html +88 -60
- package/src/components/regions/empty_state/empty_state.stories.js +4 -2
- package/src/directives/safe_html/safe_html.js +3 -1
- package/src/directives/safe_html/safe_html.stories.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.10.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@popperjs/core": "^2.11.2",
|
|
59
59
|
"bootstrap-vue": "2.20.1",
|
|
60
|
-
"dompurify": "^2.
|
|
60
|
+
"dompurify": "^2.4.0",
|
|
61
61
|
"echarts": "^5.3.2",
|
|
62
62
|
"iframe-resizer": "^4.3.2",
|
|
63
63
|
"lodash": "^4.17.20",
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@arkweid/lefthook": "0.7.7",
|
|
80
|
-
"@babel/core": "^7.18.
|
|
80
|
+
"@babel/core": "^7.18.13",
|
|
81
81
|
"@babel/preset-env": "^7.18.10",
|
|
82
|
-
"@gitlab/eslint-plugin": "
|
|
82
|
+
"@gitlab/eslint-plugin": "17.0.0",
|
|
83
83
|
"@gitlab/stylelint-config": "4.1.0",
|
|
84
|
-
"@gitlab/svgs": "3.
|
|
84
|
+
"@gitlab/svgs": "3.2.0",
|
|
85
85
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
86
86
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
87
87
|
"@rollup/plugin-replace": "^2.3.2",
|
|
@@ -94,15 +94,15 @@
|
|
|
94
94
|
"@storybook/theming": "6.5.10",
|
|
95
95
|
"@storybook/vue": "6.5.10",
|
|
96
96
|
"@vue/test-utils": "1.3.0",
|
|
97
|
-
"@vue/vue2-jest": "
|
|
97
|
+
"@vue/vue2-jest": "29.0.0",
|
|
98
98
|
"autoprefixer": "^9.7.6",
|
|
99
|
-
"babel-jest": "
|
|
99
|
+
"babel-jest": "29.0.1",
|
|
100
100
|
"babel-loader": "^8.0.5",
|
|
101
101
|
"babel-plugin-lodash": "^3.3.4",
|
|
102
102
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
103
103
|
"babel-preset-vue": "^2.0.2",
|
|
104
104
|
"bootstrap": "4.5.3",
|
|
105
|
-
"cypress": "^
|
|
105
|
+
"cypress": "^10.6.0",
|
|
106
106
|
"emoji-regex": "^10.0.0",
|
|
107
107
|
"eslint": "8.22.0",
|
|
108
108
|
"eslint-import-resolver-jest": "3.0.2",
|
|
@@ -112,10 +112,9 @@
|
|
|
112
112
|
"glob": "^7.2.0",
|
|
113
113
|
"identity-obj-proxy": "^3.0.0",
|
|
114
114
|
"inquirer-select-directory": "^1.2.0",
|
|
115
|
-
"jest": "^
|
|
116
|
-
"jest-circus": "
|
|
117
|
-
"jest-environment-jsdom": "
|
|
118
|
-
"jest-raw-loader": "^1.0.1",
|
|
115
|
+
"jest": "^29.0.1",
|
|
116
|
+
"jest-circus": "29.0.1",
|
|
117
|
+
"jest-environment-jsdom": "29.0.1",
|
|
119
118
|
"jest-serializer-vue": "^2.0.2",
|
|
120
119
|
"markdownlint-cli": "^0.29.0",
|
|
121
120
|
"mockdate": "^2.0.5",
|
|
@@ -143,9 +142,9 @@
|
|
|
143
142
|
"stylelint": "14.9.1",
|
|
144
143
|
"stylelint-config-prettier": "9.0.3",
|
|
145
144
|
"stylelint-prettier": "2.0.0",
|
|
146
|
-
"vue": "2.7.
|
|
145
|
+
"vue": "2.7.10",
|
|
147
146
|
"vue-loader": "^15.8.3",
|
|
148
|
-
"vue-template-compiler": "2.7.
|
|
147
|
+
"vue-template-compiler": "2.7.10"
|
|
149
148
|
},
|
|
150
149
|
"release": {
|
|
151
150
|
"branches": [
|
|
@@ -63,25 +63,6 @@
|
|
|
63
63
|
@include gl-line-height-normal;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
// Todo: deprecate the .gl-alert-dismiss styles after all instances from HAML and Ruby have been migrated
|
|
67
|
-
.gl-alert-dismiss {
|
|
68
|
-
@include gl-absolute;
|
|
69
|
-
@include gl-top-0;
|
|
70
|
-
@include gl-right-0;
|
|
71
|
-
@include gl-p-5;
|
|
72
|
-
@include gl-line-height-normal;
|
|
73
|
-
@include gl-bg-none;
|
|
74
|
-
@include gl-border-none;
|
|
75
|
-
@include gl-text-gray-500;
|
|
76
|
-
|
|
77
|
-
> svg {
|
|
78
|
-
@include gl-fill-current-color;
|
|
79
|
-
@include gl-w-5;
|
|
80
|
-
@include gl-h-5;
|
|
81
|
-
@include gl-vertical-align-middle;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
66
|
// This is the replacement for .gl-alert-dismiss
|
|
86
67
|
.gl-dismiss-btn {
|
|
87
68
|
@include gl-absolute;
|
|
@@ -155,6 +155,22 @@
|
|
|
155
155
|
@include gl-py-1;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
pre {
|
|
159
|
+
@include gl-py-3;
|
|
160
|
+
@include gl-px-4;
|
|
161
|
+
@include gl-rounded-base;
|
|
162
|
+
@include gl-inset-border-1-gray-100;
|
|
163
|
+
@include gl-my-7;
|
|
164
|
+
@include gl-overflow-auto;
|
|
165
|
+
|
|
166
|
+
code {
|
|
167
|
+
@include gl-bg-white;
|
|
168
|
+
@include gl-rounded-0;
|
|
169
|
+
@include gl-text-gray-900;
|
|
170
|
+
@include gl-p-0;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
158
174
|
.audio-container {
|
|
159
175
|
@include gl-display-inline-flex;
|
|
160
176
|
@include gl-flex-direction-column;
|
|
@@ -1,32 +1,46 @@
|
|
|
1
1
|
<h1>MD Doc h1 • GitLab uses "GitLab Flavored Markdown" (GFM)</h1>
|
|
2
|
-
<p>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<p>
|
|
3
|
+
MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
|
|
4
|
+
in a few significant ways to add some useful functionality. You can use GFM in the following
|
|
5
|
+
areas: comments, issues, merge requests, milestones, snippets and more.
|
|
6
|
+
</p>
|
|
7
|
+
<p class="sm">
|
|
8
|
+
MD Doc Small Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard
|
|
9
|
+
Markdown in a few significant ways to add some useful functionality. You can use GFM in the
|
|
10
|
+
following areas: comments, issues, merge requests, milestones, snippets and more.
|
|
11
|
+
</p>
|
|
8
12
|
<p class="monospace">UI Monospace</p>
|
|
9
13
|
<p class="monospace sm">UI Small Monospace</p>
|
|
10
14
|
<h2>MD Doc h2 • GitLab uses "GitLab Flavored Markdown" (GFM)</h2>
|
|
11
|
-
<p>
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
<p>
|
|
16
|
+
MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
|
|
17
|
+
in a few significant ways to add some useful functionality. You can use GFM in the following
|
|
18
|
+
areas: comments, issues, merge requests, milestones, snippets and more.
|
|
19
|
+
</p>
|
|
14
20
|
<h3>MD Doc h3 • GitLab uses "GitLab Flavored Markdown" (GFM)</h3>
|
|
15
|
-
<p>
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
<p>
|
|
22
|
+
MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
|
|
23
|
+
in a few significant ways to add some useful functionality. You can use GFM in the following
|
|
24
|
+
areas: comments, issues, merge requests, milestones, snippets and more.
|
|
25
|
+
</p>
|
|
18
26
|
<h4>MD Doc h4 • GitLab uses "GitLab Flavored Markdown" (GFM)</h4>
|
|
19
|
-
<p>
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
<p>
|
|
28
|
+
MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
|
|
29
|
+
in a few significant ways to add some useful functionality. You can use GFM in the following
|
|
30
|
+
areas: comments, issues, merge requests, milestones, snippets and more.
|
|
31
|
+
</p>
|
|
22
32
|
<h5>MD Doc h5 • GitLab uses "GitLab Flavored Markdown" (GFM)</h5>
|
|
23
|
-
<p>
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
<p>
|
|
34
|
+
MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
|
|
35
|
+
in a few significant ways to add some useful functionality. You can use GFM in the following
|
|
36
|
+
areas: comments, issues, merge requests, milestones, snippets and more.
|
|
37
|
+
</p>
|
|
26
38
|
<h6>MD Doc h6 • GitLab uses "GitLab Flavored Markdown" (GFM)</h6>
|
|
27
|
-
<p>
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
<p>
|
|
40
|
+
MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
|
|
41
|
+
in a few significant ways to add some useful functionality. You can use GFM in the following
|
|
42
|
+
areas: comments, issues, merge requests, milestones, snippets and more.
|
|
43
|
+
</p>
|
|
30
44
|
|
|
31
45
|
<table>
|
|
32
46
|
<thead>
|
|
@@ -38,46 +52,31 @@
|
|
|
38
52
|
</thead>
|
|
39
53
|
<tbody>
|
|
40
54
|
<tr>
|
|
55
|
+
<td>Test summary</td>
|
|
56
|
+
<td>Test summary contained 3 failed, 1 fixed test result out of 15 total tests</td>
|
|
41
57
|
<td>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<td>
|
|
45
|
-
Test summary contained 3 failed, 1 fixed test result out of 15 total tests
|
|
46
|
-
</td>
|
|
47
|
-
<td>
|
|
48
|
-
This is the only one that doesn't include the breakdown in the Level 1 subtext. Does it need to be updated?
|
|
58
|
+
This is the only one that doesn't include the breakdown in the Level 1 subtext. Does it need
|
|
59
|
+
to be updated?
|
|
49
60
|
</td>
|
|
50
61
|
</tr>
|
|
51
62
|
<tr>
|
|
52
|
-
<td>
|
|
53
|
-
|
|
54
|
-
</td>
|
|
55
|
-
<td>
|
|
56
|
-
Browser performance test metrics: 7 changes
|
|
57
|
-
</td>
|
|
58
|
-
<td>
|
|
59
|
-
Browser performance test metrics detected 7 changes
|
|
60
|
-
</td>
|
|
63
|
+
<td>Browser performance</td>
|
|
64
|
+
<td>Browser performance test metrics: 7 changes</td>
|
|
65
|
+
<td>Browser performance test metrics detected 7 changes</td>
|
|
61
66
|
</tr>
|
|
62
67
|
<tr>
|
|
63
|
-
<td>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<td>
|
|
67
|
-
Load performance test metrics detected 4 changes
|
|
68
|
-
</td>
|
|
69
|
-
<td>
|
|
70
|
-
✅
|
|
71
|
-
</td>
|
|
68
|
+
<td>Load performance</td>
|
|
69
|
+
<td>Load performance test metrics detected 4 changes</td>
|
|
70
|
+
<td>✅</td>
|
|
72
71
|
</tr>
|
|
73
72
|
</tbody>
|
|
74
73
|
</table>
|
|
75
74
|
|
|
76
75
|
<blockquote>
|
|
77
76
|
<p>
|
|
78
|
-
MD Doc Blockquote • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard
|
|
79
|
-
significant ways to add some useful functionality. You can use GFM in the
|
|
80
|
-
requests, milestones, snippets and more.
|
|
77
|
+
MD Doc Blockquote • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard
|
|
78
|
+
Markdown in a few significant ways to add some useful functionality. You can use GFM in the
|
|
79
|
+
following areas: comments, issues, merge requests, milestones, snippets and more.
|
|
81
80
|
</p>
|
|
82
81
|
</blockquote>
|
|
83
82
|
<blockquote>
|
|
@@ -102,26 +101,55 @@
|
|
|
102
101
|
</blockquote>
|
|
103
102
|
<blockquote>
|
|
104
103
|
<blockquote>
|
|
105
|
-
<p>
|
|
106
|
-
Nested blockquote
|
|
107
|
-
</p>
|
|
104
|
+
<p>Nested blockquote</p>
|
|
108
105
|
</blockquote>
|
|
109
106
|
</blockquote>
|
|
110
107
|
<p>
|
|
111
108
|
This is a paragraph with two types inline diff <span class="idiff addition">addition</span> and
|
|
112
109
|
<span class="idiff deletion">deletion</span>
|
|
113
110
|
</p>
|
|
114
|
-
<p>
|
|
115
|
-
This block implements the "GitLab Flavored Markdown" <code>Code span</code> styles.
|
|
116
|
-
</p>
|
|
111
|
+
<p>This block implements the "GitLab Flavored Markdown" <code>Code span</code> styles.</p>
|
|
117
112
|
|
|
118
113
|
<p>
|
|
119
114
|
This is an audio file
|
|
120
115
|
<span class="media-container audio-container">
|
|
121
|
-
<audio
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
data-
|
|
116
|
+
<audio
|
|
117
|
+
src="file.mp3"
|
|
118
|
+
controls="true"
|
|
119
|
+
data-setup="{}"
|
|
120
|
+
data-title="file.mp3"
|
|
121
|
+
data-canonical-src="file.mp3"
|
|
122
|
+
class="gfm"
|
|
123
|
+
></audio>
|
|
124
|
+
<a
|
|
125
|
+
href="file.mp3"
|
|
126
|
+
target="_blank"
|
|
127
|
+
rel="noopener noreferrer"
|
|
128
|
+
title="Download file.mp3"
|
|
129
|
+
data-canonical-src="file.mp3"
|
|
130
|
+
data-link="true"
|
|
131
|
+
class="gfm"
|
|
132
|
+
>file.mp3</a
|
|
133
|
+
>
|
|
126
134
|
</span>
|
|
127
135
|
</p>
|
|
136
|
+
<p>Code block</p>
|
|
137
|
+
<pre class="code"><code>pre {
|
|
138
|
+
@include gl-py-4;
|
|
139
|
+
@include gl-px-6;
|
|
140
|
+
|
|
141
|
+
code {
|
|
142
|
+
@include gl-bg-white;
|
|
143
|
+
@include gl-rounded-0;
|
|
144
|
+
@include gl-text-gray-900;
|
|
145
|
+
@include gl-px-0;
|
|
146
|
+
@include gl-py-0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
</code></pre>
|
|
150
|
+
<p>Code block with long lines scrolls horizontally</p>
|
|
151
|
+
<pre
|
|
152
|
+
class="code"
|
|
153
|
+
><code>MD Doc Small Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few
|
|
154
|
+
significant ways to add some useful functionality. You can use GFM in the following areas: comments, issues, merge requests, milestones, snippets and more.
|
|
155
|
+
</code></pre>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import securityDashboardEmptyStateSvg from '@gitlab/svgs/dist/illustrations/security-dashboard-empty-state.svg';
|
|
2
|
+
import issuesSvg from '@gitlab/svgs/dist/illustrations/issues.svg';
|
|
1
3
|
import { GlButton, GlEmptyState } from '../../../index';
|
|
2
4
|
import readme from './empty_state.md';
|
|
3
5
|
|
|
@@ -24,7 +26,7 @@ const Template = (args) => ({
|
|
|
24
26
|
|
|
25
27
|
const generateProps = ({
|
|
26
28
|
title = 'This state is empty',
|
|
27
|
-
svgPath =
|
|
29
|
+
svgPath = securityDashboardEmptyStateSvg,
|
|
28
30
|
svgHeight = 145,
|
|
29
31
|
description = 'The title and message should be clear, concise, and explain why the user is seeing this screen.',
|
|
30
32
|
primaryButtonText = 'Something actionable',
|
|
@@ -134,7 +136,7 @@ export const SlottedDescription = (args) => ({
|
|
|
134
136
|
});
|
|
135
137
|
SlottedDescription.args = generateProps({
|
|
136
138
|
title: 'Slotted description example',
|
|
137
|
-
svgPath:
|
|
139
|
+
svgPath: issuesSvg,
|
|
138
140
|
primaryButtonText: 'Learn more',
|
|
139
141
|
secondaryButtonText: null,
|
|
140
142
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import DOMPurify from 'dompurify';
|
|
2
2
|
import { forbiddenDataAttrs } from './constants';
|
|
3
3
|
|
|
4
|
+
const { sanitize } = DOMPurify;
|
|
5
|
+
|
|
4
6
|
// Mitigate against future dompurify mXSS bypasses by
|
|
5
7
|
// avoiding additional serialize/parse round trip.
|
|
6
8
|
// See https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/1782
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import DOMPurify from 'dompurify';
|
|
2
2
|
import { GlSafeHtmlDirective as GlSafeHtml } from '../../index';
|
|
3
3
|
import readme from './safe_html.md';
|
|
4
4
|
|
|
5
|
+
const { sanitize } = DOMPurify;
|
|
6
|
+
|
|
5
7
|
const generateProps = ({
|
|
6
8
|
unsafeHTML = '<a href="javascript:alert(document.domain)">Click me</a>',
|
|
7
9
|
} = {}) => ({
|