@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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 10 Oct 2023 19:49:13 GMT
3
+ * Generated on Wed, 11 Oct 2023 16:10:59 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 10 Oct 2023 19:49:14 GMT
3
+ * Generated on Wed, 11 Oct 2023 16:10:59 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 10 Oct 2023 19:49:14 GMT
3
+ * Generated on Wed, 11 Oct 2023 16:10:59 GMT
4
4
  */
5
5
 
6
6
  export const BLACK = "#fff";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 10 Oct 2023 19:49:13 GMT
3
+ * Generated on Wed, 11 Oct 2023 16:10:59 GMT
4
4
  */
5
5
 
6
6
  export const BLACK = "#000";
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 10 Oct 2023 19:49:14 GMT
3
+ // Generated on Wed, 11 Oct 2023 16:10:59 GMT
4
4
 
5
5
  $red-950: #fff4f3;
6
6
  $red-900: #fcf1ef;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 10 Oct 2023 19:49:14 GMT
3
+ // Generated on Wed, 11 Oct 2023 16:10:59 GMT
4
4
 
5
5
  $gl-line-height-52: 3.25rem;
6
6
  $gl-line-height-44: 2.75rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "66.26.0",
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.14",
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-font-base;
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-w-5;
43
- @include gl-h-5;
44
- @include gl-fill-current-color;
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-no-title {
48
- @include gl-mt-1;
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
- v-if="showIcon"
205
- :name="iconName"
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