@gitlab/ui 78.16.0 → 78.18.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 +14 -0
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +11 -11
- 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 +1 -1
- package/src/components/base/label/label.scss +9 -10
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.spec.js +3 -3
- package/src/components/base/new_dropdowns/disclosure/mock_data.js +12 -12
package/dist/tokens/js/tokens.js
CHANGED
package/package.json
CHANGED
|
@@ -9,7 +9,8 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
9
9
|
@include gl-rounded-pill;
|
|
10
10
|
position: relative;
|
|
11
11
|
@include gl-max-w-full;
|
|
12
|
-
@include gl-font-
|
|
12
|
+
@include gl-font-sm;
|
|
13
|
+
@include gl-line-height-normal;
|
|
13
14
|
box-shadow: var(--label-inset-border) !important;
|
|
14
15
|
|
|
15
16
|
&:not(.gl-label-scoped) {
|
|
@@ -21,13 +22,12 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
.gl-label-link {
|
|
24
|
-
@include gl-line-height-normal;
|
|
25
25
|
@include gl-display-flex;
|
|
26
|
-
@include gl-font-sm;
|
|
27
26
|
@include gl-font-weight-normal;
|
|
28
27
|
@include gl-overflow-hidden;
|
|
29
28
|
@include gl-reset-color;
|
|
30
29
|
@include gl-max-w-full;
|
|
30
|
+
@include gl-text-decoration-none;
|
|
31
31
|
|
|
32
32
|
&:focus,
|
|
33
33
|
&:hover,
|
|
@@ -41,8 +41,7 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
41
41
|
.gl-label-text,
|
|
42
42
|
.gl-label-text-scoped {
|
|
43
43
|
@include gl-display-block;
|
|
44
|
-
padding
|
|
45
|
-
padding-inline: calc(#{$gl-spacing-scale-3} - 2px);
|
|
44
|
+
padding: $gl-spacing-scale-1 #{$gl-spacing-scale-3 - $gl-spacing-scale-1};
|
|
46
45
|
@include str-truncated($label-max-width);
|
|
47
46
|
}
|
|
48
47
|
|
|
@@ -51,8 +50,8 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
51
50
|
@include gl-display-flex;
|
|
52
51
|
width: px-to-rem(14px);
|
|
53
52
|
height: px-to-rem(14px);
|
|
54
|
-
margin-left:
|
|
55
|
-
margin-right:
|
|
53
|
+
margin-left: #{-$gl-spacing-scale-1 - ($gl-spacing-scale-1 / 2)};
|
|
54
|
+
margin-right: #{$gl-spacing-scale-2 - ($gl-spacing-scale-1 / 2)};
|
|
56
55
|
@include gl-p-0;
|
|
57
56
|
@include gl-rounded-full;
|
|
58
57
|
@include gl-shadow-none;
|
|
@@ -149,7 +148,7 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
149
148
|
}
|
|
150
149
|
|
|
151
150
|
#{$label-close-button} {
|
|
152
|
-
margin-left:
|
|
151
|
+
margin-left: #{-$gl-spacing-scale-2 - $gl-spacing-scale-1};
|
|
153
152
|
|
|
154
153
|
&:focus,
|
|
155
154
|
&:hover {
|
|
@@ -165,8 +164,8 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
165
164
|
|
|
166
165
|
.gl-label-text-scoped {
|
|
167
166
|
@include gl-text-gray-950;
|
|
168
|
-
padding-
|
|
169
|
-
padding-
|
|
167
|
+
padding-left: #{$gl-spacing-scale-3 - $gl-spacing-scale-2};
|
|
168
|
+
padding-right: $gl-spacing-scale-3;
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
|
|
@@ -51,7 +51,7 @@ describe('GlDisclosureDropdownItem', () => {
|
|
|
51
51
|
describe.each`
|
|
52
52
|
prop | mockItem
|
|
53
53
|
${'href'} | ${0}
|
|
54
|
-
${'to'} | ${
|
|
54
|
+
${'to'} | ${2}
|
|
55
55
|
`('when item has a `$prop`', ({ prop, mockItem }) => {
|
|
56
56
|
const item = mockItems[mockItem];
|
|
57
57
|
|
|
@@ -102,7 +102,7 @@ describe('GlDisclosureDropdownItem', () => {
|
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
describe('when item has an `action`', () => {
|
|
105
|
-
const item = mockItems[
|
|
105
|
+
const item = mockItems[3];
|
|
106
106
|
const action = jest.spyOn(item, 'action');
|
|
107
107
|
|
|
108
108
|
beforeEach(() => {
|
|
@@ -184,7 +184,7 @@ describe('GlDisclosureDropdownItem', () => {
|
|
|
184
184
|
beforeEach(() => {
|
|
185
185
|
buildWrapper({
|
|
186
186
|
item: {
|
|
187
|
-
...mockItems[
|
|
187
|
+
...mockItems[3],
|
|
188
188
|
extraAttrs,
|
|
189
189
|
},
|
|
190
190
|
});
|
|
@@ -8,18 +8,6 @@ export const mockItems = [
|
|
|
8
8
|
'data-method': 'put',
|
|
9
9
|
},
|
|
10
10
|
},
|
|
11
|
-
{
|
|
12
|
-
text: 'Close merge request',
|
|
13
|
-
action: () => {
|
|
14
|
-
// eslint-disable-next-line no-console
|
|
15
|
-
console.log('CLOSED');
|
|
16
|
-
},
|
|
17
|
-
extraAttrs: {
|
|
18
|
-
class: 'gl-text-red-500!',
|
|
19
|
-
rel: 'nofollow',
|
|
20
|
-
'data-method': 'put',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
11
|
{
|
|
24
12
|
text: 'Create new',
|
|
25
13
|
href: 'https://gitlab.com/gitlab-org/gitlab/-/merge_requests/new',
|
|
@@ -35,6 +23,18 @@ export const mockItems = [
|
|
|
35
23
|
'data-uuid': '1234',
|
|
36
24
|
},
|
|
37
25
|
},
|
|
26
|
+
{
|
|
27
|
+
text: 'Close merge request',
|
|
28
|
+
action: () => {
|
|
29
|
+
// eslint-disable-next-line no-console
|
|
30
|
+
console.log('CLOSED');
|
|
31
|
+
},
|
|
32
|
+
extraAttrs: {
|
|
33
|
+
class: 'gl-text-red-500!',
|
|
34
|
+
rel: 'nofollow',
|
|
35
|
+
'data-method': 'put',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
38
|
];
|
|
39
39
|
|
|
40
40
|
export const mockItemsCustomItem = [
|