@gitlab/ui 66.26.0 → 66.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 +7 -0
- package/dist/components/base/alert/alert.js +2 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/package.json +2 -2
- package/src/components/base/alert/alert.scss +12 -10
- package/src/components/base/alert/alert.spec.js +16 -0
- package/src/components/base/alert/alert.vue +4 -6
package/dist/tokens/js/tokens.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "66.
|
|
3
|
+
"version": "66.27.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"eslint": "8.51.0",
|
|
130
130
|
"eslint-import-resolver-jest": "3.0.2",
|
|
131
131
|
"eslint-plugin-cypress": "2.15.1",
|
|
132
|
-
"eslint-plugin-storybook": "0.6.
|
|
132
|
+
"eslint-plugin-storybook": "0.6.15",
|
|
133
133
|
"glob": "10.3.3",
|
|
134
134
|
"identity-obj-proxy": "^3.0.0",
|
|
135
135
|
"inquirer-select-directory": "^1.2.0",
|
|
@@ -28,24 +28,26 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.gl-alert-title {
|
|
31
|
-
@include gl-
|
|
32
|
-
@include gl-font-weight-bold;
|
|
33
|
-
@include gl-line-height-normal;
|
|
34
|
-
@include gl-mt-0;
|
|
31
|
+
@include gl-heading-scale-500;
|
|
35
32
|
@include gl-mb-3;
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
.gl-alert-icon {
|
|
35
|
+
.gl-alert-icon-container {
|
|
39
36
|
@include gl-absolute;
|
|
40
37
|
@include gl-top-5;
|
|
41
38
|
@include gl-left-5;
|
|
42
|
-
@include gl-
|
|
43
|
-
@include gl-
|
|
44
|
-
|
|
39
|
+
@include gl-display-flex;
|
|
40
|
+
@include gl-align-items-center;
|
|
41
|
+
height: $gl-line-height-20;
|
|
42
|
+
|
|
43
|
+
.gl-alert-has-title & {
|
|
44
|
+
@include gl-heading-scale-500; // get dynamic font-size
|
|
45
|
+
height: $gl-line-height-heading * 1em; // give unit to unitless relative line-height (1.25)
|
|
46
|
+
}
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
.gl-alert-icon
|
|
48
|
-
@include gl-
|
|
49
|
+
.gl-alert-icon {
|
|
50
|
+
@include gl-fill-current-color;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
.gl-alert-body {
|
|
@@ -190,6 +190,22 @@ describe('Alert component', () => {
|
|
|
190
190
|
expect(wrapper.classes()).not.toContain(cssClass);
|
|
191
191
|
});
|
|
192
192
|
});
|
|
193
|
+
|
|
194
|
+
it('adds the `gl-alert-has-title` class if there is a title', () => {
|
|
195
|
+
createComponent({
|
|
196
|
+
propsData: {
|
|
197
|
+
title: 'title',
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
expect(wrapper.classes()).toContain('gl-alert-has-title');
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
it('does not add the `gl-alert-has-title` class if there is no title', () => {
|
|
205
|
+
createComponent();
|
|
206
|
+
|
|
207
|
+
expect(wrapper.classes()).not.toContain('gl-alert-has-title');
|
|
208
|
+
});
|
|
193
209
|
});
|
|
194
210
|
|
|
195
211
|
describe('role and aria-live', () => {
|
|
@@ -197,15 +197,13 @@ export default {
|
|
|
197
197
|
{ 'gl-alert-sticky': sticky },
|
|
198
198
|
{ 'gl-alert-not-dismissible': !dismissible },
|
|
199
199
|
{ 'gl-alert-no-icon': !showIcon },
|
|
200
|
+
{ 'gl-alert-has-title': !!title },
|
|
200
201
|
variantClass,
|
|
201
202
|
]"
|
|
202
203
|
>
|
|
203
|
-
<gl-icon
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
:class="{ 'gl-alert-icon': true, 'gl-alert-icon-no-title': !title }"
|
|
207
|
-
/>
|
|
208
|
-
|
|
204
|
+
<div v-if="showIcon" class="gl-alert-icon-container">
|
|
205
|
+
<gl-icon :name="iconName" class="gl-alert-icon" />
|
|
206
|
+
</div>
|
|
209
207
|
<div class="gl-alert-content" :role="role" :aria-live="ariaLive">
|
|
210
208
|
<h2 v-if="title" class="gl-alert-title">{{ title }}</h2>
|
|
211
209
|
|