@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/CHANGELOG.md +19 -0
- package/dist/components/base/new_dropdowns/listbox/listbox_item.js +1 -1
- package/dist/components/regions/empty_state/empty_state.js +4 -4
- 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/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +3 -3
- package/scss_to_js/scss_variables.js +1 -0
- package/scss_to_js/scss_variables.json +5 -0
- package/src/components/base/new_dropdowns/dropdown_item.scss +37 -5
- package/src/components/base/new_dropdowns/listbox/listbox_item.vue +1 -1
- package/src/components/regions/empty_state/empty_state.spec.js +2 -2
- package/src/components/regions/empty_state/empty_state.stories.js +1 -1
- package/src/components/regions/empty_state/empty_state.vue +10 -7
- package/src/scss/utilities.scss +20 -0
- package/src/scss/utility-mixins/grid.scss +6 -0
- package/src/scss/utility-mixins/sizing.scss +4 -0
- package/src/scss/variables.scss +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "66.
|
|
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.
|
|
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.
|
|
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'
|
|
@@ -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
|
-
|
|
26
|
-
|
|
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-
|
|
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"
|
|
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:
|
|
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-
|
|
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 =
|
|
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:
|
|
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-
|
|
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"
|
|
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
|
|
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-
|
|
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
|
<!--
|
package/src/scss/utilities.scss
CHANGED
|
@@ -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);
|
package/src/scss/variables.scss
CHANGED