@gitlab/ui 66.6.0 → 66.7.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "66.6.0",
3
+ "version": "66.7.1",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -88,7 +88,7 @@
88
88
  },
89
89
  "devDependencies": {
90
90
  "@arkweid/lefthook": "0.7.7",
91
- "@babel/core": "^7.22.15",
91
+ "@babel/core": "^7.22.17",
92
92
  "@babel/preset-env": "^7.22.15",
93
93
  "@babel/preset-react": "^7.22.15",
94
94
  "@gitlab/eslint-plugin": "19.0.0",
@@ -126,7 +126,7 @@
126
126
  "cypress-axe": "^1.4.0",
127
127
  "dompurify": "^3.0.0",
128
128
  "emoji-regex": "^10.0.0",
129
- "eslint": "8.48.0",
129
+ "eslint": "8.49.0",
130
130
  "eslint-import-resolver-jest": "3.0.2",
131
131
  "eslint-plugin-cypress": "2.14.0",
132
132
  "eslint-plugin-storybook": "0.6.13",
@@ -24,6 +24,7 @@ export const glSpacingScale48 = '24rem'
24
24
  export const glSpacingScale62 = '31rem'
25
25
  export const glSpacingScale75 = '37.5rem'
26
26
  export const glSpacingScale80 = '40rem'
27
+ export const glSpacingScale88 = '44rem'
27
28
  export const breakpointSm = '576px'
28
29
  export const breakpointMd = '768px'
29
30
  export const breakpointLg = '992px'
@@ -130,6 +130,11 @@
130
130
  "value": "80 * $grid-size",
131
131
  "compiledValue": "40rem"
132
132
  },
133
+ {
134
+ "name": "$gl-spacing-scale-88",
135
+ "value": "88 * $grid-size",
136
+ "compiledValue": "44rem"
137
+ },
133
138
  {
134
139
  "name": "$breakpoint-sm",
135
140
  "value": "576px",
@@ -16,14 +16,45 @@
16
16
  @include gl-mb-0;
17
17
  }
18
18
 
19
- &:active,
20
19
  &:hover,
21
- &:focus,
20
+ &:focus {
21
+ .gl-new-dropdown-item-content {
22
+ @include gl-bg-gray-50;
23
+ }
24
+ }
25
+
26
+ &:active,
22
27
  &:focus:active {
28
+ .gl-new-dropdown-item-content {
29
+ @include gl-bg-gray-100;
30
+ }
31
+ }
32
+
33
+ &[aria-selected="true"] {
23
34
  .gl-new-dropdown-item-content {
24
35
  @include gl-bg-gray-50;
25
- @include gl-text-decoration-none;
26
- @include gl-text-gray-900;
36
+ }
37
+
38
+ &:hover,
39
+ &:focus {
40
+ .gl-new-dropdown-item-content {
41
+ @include gl-bg-gray-100;
42
+ }
43
+
44
+ .gl-new-dropdown-item-check-icon {
45
+ @include gl-text-blue-600
46
+ }
47
+ }
48
+
49
+ &:active,
50
+ &:focus:active {
51
+ .gl-new-dropdown-item-content {
52
+ @include gl-bg-gray-200;
53
+ }
54
+
55
+ .gl-new-dropdown-item-check-icon {
56
+ @include gl-text-blue-700
57
+ }
27
58
  }
28
59
  }
29
60
 
@@ -52,6 +83,7 @@
52
83
  @include gl-py-0;
53
84
  @include gl-relative;
54
85
  @include gl-rounded-base;
86
+ @include gl-text-decoration-none;
55
87
  @include gl-text-gray-900;
56
88
  @include gl-text-left;
57
89
  @include gl-white-space-normal;
@@ -59,7 +91,7 @@
59
91
  .gl-new-dropdown-item-check-icon {
60
92
  @include gl-flex-shrink-0;
61
93
  @include gl-mr-3;
62
- @include gl-text-blue-400;
94
+ @include gl-text-blue-500;
63
95
  }
64
96
 
65
97
  .gl-new-dropdown-item-icon {
@@ -59,7 +59,7 @@ export default {
59
59
  @click="toggleSelection"
60
60
  @keydown="onKeydown"
61
61
  >
62
- <span class="gl-new-dropdown-item-content" :class="{ 'gl-bg-gray-50!': isSelected }">
62
+ <span class="gl-new-dropdown-item-content">
63
63
  <gl-icon
64
64
  name="mobile-issue-close"
65
65
  data-testid="dropdown-item-checkbox"
@@ -8,7 +8,7 @@ describe('empty state component', () => {
8
8
  title: 'Empty State Title',
9
9
  description: 'Empty state description.',
10
10
  svgPath: 'https://www.example.com/test.jpg',
11
- svgHeight: 150,
11
+ svgHeight: 144,
12
12
  primaryButtonText: 'Primary Button',
13
13
  primaryButtonLink: 'http://example.com/primary',
14
14
  secondaryButtonText: 'Secondary Button',
@@ -249,7 +249,7 @@ describe('empty state component', () => {
249
249
  describe('with custom content class', () => {
250
250
  const findContentContainer = () => component.find('[data-testid="gl-empty-state-content"]');
251
251
  const customContentClass = 'gl-p-0';
252
- const expectedDefaultContentClasses = ['gl-max-w-full', 'gl-m-auto', customContentClass];
252
+ const expectedDefaultContentClasses = ['gl-max-w-88', 'gl-m-auto', customContentClass];
253
253
  const expectedCompactContentClasses = [
254
254
  'gl-flex-grow-1',
255
255
  'gl-flex-basis-0',
@@ -29,7 +29,7 @@ const Template = (args) => ({
29
29
  const generateProps = ({
30
30
  title = 'This state is empty',
31
31
  svgPath = securityDashboardEmptyStateSvg,
32
- svgHeight = 145,
32
+ svgHeight = 144,
33
33
  description = 'The title and message should be clear, concise, and explain why the user is seeing this screen.',
34
34
  primaryButtonText = 'Something actionable',
35
35
  secondaryButtonText = 'Something else',
@@ -29,7 +29,7 @@ export default {
29
29
  svgHeight: {
30
30
  type: Number,
31
31
  required: false,
32
- default: null,
32
+ default: 144,
33
33
  },
34
34
  /**
35
35
  * The desciption/body text of the empty state.
@@ -108,7 +108,7 @@ export default {
108
108
  },
109
109
  contentClasses() {
110
110
  return [
111
- this.compact ? 'gl-flex-grow-1 gl-flex-basis-0 gl-px-4' : 'gl-max-w-full gl-m-auto',
111
+ this.compact ? 'gl-flex-grow-1 gl-flex-basis-0 gl-px-4' : 'gl-max-w-88 gl-m-auto',
112
112
  this.contentClass,
113
113
  ];
114
114
  },
@@ -120,14 +120,14 @@ export default {
120
120
  <section
121
121
  class="gl-display-flex"
122
122
  :class="{
123
- 'empty-state gl-text-center gl-flex-direction-column': !compact,
123
+ 'gl-empty-state gl-text-center gl-flex-direction-column': !compact,
124
124
  'gl-flex-direction-row': compact,
125
125
  }"
126
126
  >
127
127
  <div
128
128
  :class="{ 'gl-display-none gl-sm-display-block gl-px-4': compact, 'gl-max-w-full': !compact }"
129
129
  >
130
- <div v-if="svgPath" :class="{ 'svg-content': !compact }" class="svg-250">
130
+ <div v-if="svgPath">
131
131
  <img
132
132
  :src="svgPath"
133
133
  alt=""
@@ -145,11 +145,14 @@ export default {
145
145
  Overrides the `title` prop.
146
146
  -->
147
147
  <slot ref="title" name="title">
148
- <h1 class="gl-font-size-h-display gl-line-height-36" :class="compact ? 'h5' : 'h4'">
148
+ <h1
149
+ class="gl-font-size-h-display gl-line-height-36 gl-mt-0 gl-mb-0"
150
+ :class="compact ? 'h5' : 'h4'"
151
+ >
149
152
  {{ title }}
150
153
  </h1>
151
154
  </slot>
152
- <p v-if="description || $scopedSlots.description" ref="description" class="gl-mt-3">
155
+ <p v-if="description || $scopedSlots.description" ref="description" class="gl-mt-4 gl-mb-0">
153
156
  <!--
154
157
  @slot Use this slot to customize the empty state's description
155
158
  area. Overrides the `description` prop.
@@ -159,7 +162,7 @@ export default {
159
162
  </slot>
160
163
  </p>
161
164
  <div
162
- class="gl-display-flex gl-flex-wrap"
165
+ class="gl-display-flex gl-flex-wrap gl-mt-5"
163
166
  :class="{ 'gl-justify-content-center': !compact }"
164
167
  >
165
168
  <!--
@@ -3962,6 +3962,18 @@
3962
3962
  grid-template-columns: 1fr 1fr 1fr 1fr !important;
3963
3963
  }
3964
3964
 
3965
+ .gl-md-grid-template-columns-4 {
3966
+ @include gl-media-breakpoint-up(md) {
3967
+ grid-template-columns: repeat(4, 1fr);
3968
+ }
3969
+ }
3970
+
3971
+ .gl-md-grid-template-columns-4\! {
3972
+ @include gl-media-breakpoint-up(md) {
3973
+ grid-template-columns: repeat(4, 1fr) !important;
3974
+ }
3975
+ }
3976
+
3965
3977
  .gl-lg-grid-template-columns-4 {
3966
3978
  @include gl-media-breakpoint-up(lg) {
3967
3979
  grid-template-columns: repeat(4, 1fr);
@@ -5432,6 +5444,14 @@
5432
5444
  max-width: $gl-spacing-scale-80 !important;
5433
5445
  }
5434
5446
 
5447
+ .gl-max-w-88 {
5448
+ max-width: $gl-spacing-scale-88;
5449
+ }
5450
+
5451
+ .gl-max-w-88\! {
5452
+ max-width: $gl-spacing-scale-88 !important;
5453
+ }
5454
+
5435
5455
  .gl-max-w-none {
5436
5456
  max-width: none;
5437
5457
  }
@@ -37,6 +37,12 @@
37
37
  grid-template-columns: 1fr 1fr 1fr 1fr;
38
38
  }
39
39
 
40
+ @mixin gl-md-grid-template-columns-4 {
41
+ @include gl-media-breakpoint-up(md) {
42
+ grid-template-columns: repeat(4, 1fr);
43
+ }
44
+ }
45
+
40
46
  @mixin gl-lg-grid-template-columns-4 {
41
47
  @include gl-media-breakpoint-up(lg) {
42
48
  grid-template-columns: repeat(4, 1fr);
@@ -452,6 +452,10 @@
452
452
  max-width: $gl-spacing-scale-80;
453
453
  }
454
454
 
455
+ @mixin gl-max-w-88 {
456
+ max-width: $gl-spacing-scale-88;
457
+ }
458
+
455
459
  @mixin gl-max-w-none {
456
460
  max-width: none;
457
461
  }
@@ -27,6 +27,7 @@ $gl-spacing-scale-48: 48 * $grid-size;
27
27
  $gl-spacing-scale-62: 62 * $grid-size;
28
28
  $gl-spacing-scale-75: 75 * $grid-size;
29
29
  $gl-spacing-scale-80: 80 * $grid-size;
30
+ $gl-spacing-scale-88: 88 * $grid-size;
30
31
 
31
32
  // Responsive breakpoints
32
33