@gitlab/ui 66.5.0 → 66.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "66.5.0",
3
+ "version": "66.7.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -88,9 +88,9 @@
88
88
  },
89
89
  "devDependencies": {
90
90
  "@arkweid/lefthook": "0.7.7",
91
- "@babel/core": "^7.22.11",
92
- "@babel/preset-env": "^7.22.14",
93
- "@babel/preset-react": "^7.22.5",
91
+ "@babel/core": "^7.22.17",
92
+ "@babel/preset-env": "^7.22.15",
93
+ "@babel/preset-react": "^7.22.15",
94
94
  "@gitlab/eslint-plugin": "19.0.0",
95
95
  "@gitlab/fonts": "^1.2.0",
96
96
  "@gitlab/stylelint-config": "5.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",
@@ -53,7 +53,7 @@ export const Image = (args, { argTypes }) => ({
53
53
  <gl-avatar
54
54
  :size="size"
55
55
  :shape="shape"
56
- src="./img/gitlab-summit-south-africa.jpg"
56
+ src="./img/avatar_1.png"
57
57
  />
58
58
  `,
59
59
  });
@@ -66,7 +66,7 @@ export const ResponsiveImage = (args, { argTypes }) => ({
66
66
  <gl-avatar
67
67
  :size="size"
68
68
  :shape="shape"
69
- src="./img/gitlab-summit-south-africa.jpg"
69
+ src="./img/avatar_1.png"
70
70
  />
71
71
  `,
72
72
  });
@@ -97,7 +97,7 @@ export const WithTooltip = (args, { argTypes }) => ({
97
97
  :size="size"
98
98
  :shape="shape"
99
99
  :title="tooltipText"
100
- src="./img/gitlab-summit-south-africa.jpg"
100
+ src="./img/avatar_1.png"
101
101
  v-gl-tooltip="{ placement }"
102
102
  />
103
103
  `,
@@ -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
  <!--
@@ -1169,10 +1169,18 @@
1169
1169
  border-color: $gray-100;
1170
1170
  }
1171
1171
 
1172
+ .gl-hover-border-gray-100:hover {
1173
+ border-color: $gray-100;
1174
+ }
1175
+
1172
1176
  .gl-border-gray-100\! {
1173
1177
  border-color: $gray-100 !important;
1174
1178
  }
1175
1179
 
1180
+ .gl-hover-border-gray-100\!:hover {
1181
+ border-color: $gray-100 !important;
1182
+ }
1183
+
1176
1184
  .gl-border-gray-200 {
1177
1185
  border-color: $gray-200;
1178
1186
  }
@@ -3954,6 +3962,18 @@
3954
3962
  grid-template-columns: 1fr 1fr 1fr 1fr !important;
3955
3963
  }
3956
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
+
3957
3977
  .gl-lg-grid-template-columns-4 {
3958
3978
  @include gl-media-breakpoint-up(lg) {
3959
3979
  grid-template-columns: repeat(4, 1fr);
@@ -5424,6 +5444,14 @@
5424
5444
  max-width: $gl-spacing-scale-80 !important;
5425
5445
  }
5426
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
+
5427
5455
  .gl-max-w-none {
5428
5456
  max-width: none;
5429
5457
  }
@@ -127,7 +127,7 @@
127
127
  border-color: $gray-50;
128
128
  }
129
129
 
130
- @mixin gl-border-gray-100 {
130
+ @mixin gl-border-gray-100($hover: true) {
131
131
  border-color: $gray-100;
132
132
  }
133
133
 
@@ -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