@gitlab/ui 43.2.0 → 43.3.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 +24 -0
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/package.json +5 -5
- package/src/components/base/accordion/accordion.stories.js +0 -1
- package/src/components/base/badge/badge.scss +42 -1
- package/src/components/base/daterange_picker/daterange_picker.stories.js +0 -1
- package/src/components/base/nav/nav.stories.js +1 -1
- package/src/scss/functions.scss +4 -1
- package/src/scss/mixins.spec.scss +2 -2
- package/src/scss/utilities.scss +8 -8
- package/src/scss/utility-mixins/background.scss +3 -3
- package/src/scss/utility-mixins/masks.scss +1 -1
- package/dist/utils/validation_utils.js +0 -14
- package/src/utils/validation_utils.js +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.3.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"vue-runtime-helpers": "^1.1.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@gitlab/svgs": "^1.116.0 || ^2.0.0",
|
|
68
|
+
"@gitlab/svgs": "^1.116.0 || ^2.0.0 || ^3.0.0",
|
|
69
69
|
"bootstrap": "4.5.3",
|
|
70
70
|
"emoji-regex": ">=10.0.0",
|
|
71
71
|
"pikaday": "^1.8.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@babel/preset-env": "^7.18.10",
|
|
84
84
|
"@gitlab/eslint-plugin": "15.0.0",
|
|
85
85
|
"@gitlab/stylelint-config": "4.1.0",
|
|
86
|
-
"@gitlab/svgs": "
|
|
86
|
+
"@gitlab/svgs": "3.0.0",
|
|
87
87
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
88
88
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
89
89
|
"@rollup/plugin-replace": "^2.3.2",
|
|
@@ -106,10 +106,10 @@
|
|
|
106
106
|
"bootstrap": "4.5.3",
|
|
107
107
|
"cypress": "^6.6.0",
|
|
108
108
|
"emoji-regex": "^10.0.0",
|
|
109
|
-
"eslint": "8.
|
|
109
|
+
"eslint": "8.21.0",
|
|
110
110
|
"eslint-import-resolver-jest": "3.0.2",
|
|
111
111
|
"eslint-plugin-cypress": "2.12.1",
|
|
112
|
-
"eslint-plugin-storybook": "0.6.
|
|
112
|
+
"eslint-plugin-storybook": "0.6.3",
|
|
113
113
|
"file-loader": "^4.2.0",
|
|
114
114
|
"glob": "^7.2.0",
|
|
115
115
|
"identity-obj-proxy": "^3.0.0",
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
@mixin gl-badge-variant(
|
|
2
2
|
$variant,
|
|
3
3
|
$color,
|
|
4
|
+
$icon-color,
|
|
4
5
|
$bg,
|
|
5
6
|
$hover-color,
|
|
7
|
+
$hover-icon-color,
|
|
6
8
|
$border-color,
|
|
7
9
|
$active-color,
|
|
10
|
+
$active-icon-color,
|
|
8
11
|
$active-bg
|
|
9
12
|
) {
|
|
10
13
|
.gl-badge.badge-#{$variant} {
|
|
11
14
|
background-color: $bg;
|
|
12
15
|
color: $color;
|
|
16
|
+
|
|
17
|
+
.gl-badge-icon {
|
|
18
|
+
color: $icon-color;
|
|
19
|
+
transition: inherit;
|
|
20
|
+
}
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
a.gl-badge.badge-#{$variant} {
|
|
@@ -19,18 +27,30 @@
|
|
|
19
27
|
background-color: $bg;
|
|
20
28
|
box-shadow: inset 0 0 0 $gl-border-size-1 $border-color;
|
|
21
29
|
@include gl-text-decoration-none;
|
|
30
|
+
|
|
31
|
+
.gl-badge-icon {
|
|
32
|
+
color: $hover-icon-color;
|
|
33
|
+
}
|
|
22
34
|
}
|
|
23
35
|
|
|
24
36
|
&:focus {
|
|
25
37
|
color: $hover-color;
|
|
26
38
|
// Needed to override bootstrap's badge variant background
|
|
27
39
|
background-color: $bg;
|
|
40
|
+
|
|
41
|
+
.gl-badge-icon {
|
|
42
|
+
color: $hover-icon-color;
|
|
43
|
+
}
|
|
28
44
|
}
|
|
29
45
|
|
|
30
46
|
&.active,
|
|
31
47
|
&:active {
|
|
32
48
|
color: $active-color;
|
|
33
49
|
background-color: $active-bg;
|
|
50
|
+
|
|
51
|
+
.gl-badge-icon {
|
|
52
|
+
color: $active-icon-color;
|
|
53
|
+
}
|
|
34
54
|
}
|
|
35
55
|
|
|
36
56
|
&:active,
|
|
@@ -78,70 +98,91 @@
|
|
|
78
98
|
@include gl-badge-variant(
|
|
79
99
|
$variant: muted,
|
|
80
100
|
$color: $gray-500,
|
|
101
|
+
$icon-color: $gray-400,
|
|
81
102
|
$bg: $gray-50,
|
|
82
103
|
$hover-color: $gray-600,
|
|
104
|
+
$hover-icon-color: $gray-500,
|
|
83
105
|
$border-color: $gray-200,
|
|
84
|
-
$active-color: $gray-
|
|
106
|
+
$active-color: $gray-700,
|
|
107
|
+
$active-icon-color: $gray-600,
|
|
85
108
|
$active-bg: $gray-100
|
|
86
109
|
);
|
|
87
110
|
|
|
88
111
|
@include gl-badge-variant(
|
|
89
112
|
$variant: neutral,
|
|
90
113
|
$color: $gray-700,
|
|
114
|
+
$icon-color: $gray-500,
|
|
91
115
|
$bg: $gray-100,
|
|
92
116
|
$hover-color: $gray-800,
|
|
117
|
+
$hover-icon-color: $gray-600,
|
|
93
118
|
$border-color: $gray-200,
|
|
94
119
|
$active-color: $gray-900,
|
|
120
|
+
$active-icon-color: $gray-700,
|
|
95
121
|
$active-bg: $gray-200
|
|
96
122
|
);
|
|
97
123
|
|
|
98
124
|
@include gl-badge-variant(
|
|
99
125
|
$variant: info,
|
|
100
126
|
$color: $blue-700,
|
|
127
|
+
$icon-color: $blue-500,
|
|
101
128
|
$bg: $blue-100,
|
|
102
129
|
$hover-color: $blue-800,
|
|
130
|
+
$hover-icon-color: $blue-600,
|
|
103
131
|
$border-color: $blue-200,
|
|
104
132
|
$active-color: $blue-900,
|
|
133
|
+
$active-icon-color: $blue-700,
|
|
105
134
|
$active-bg: $blue-200
|
|
106
135
|
);
|
|
107
136
|
|
|
108
137
|
@include gl-badge-variant(
|
|
109
138
|
$variant: success,
|
|
110
139
|
$color: $green-700,
|
|
140
|
+
$icon-color: $green-500,
|
|
111
141
|
$bg: $green-100,
|
|
112
142
|
$hover-color: $green-800,
|
|
143
|
+
$hover-icon-color: $green-600,
|
|
113
144
|
$border-color: $green-200,
|
|
114
145
|
$active-color: $green-900,
|
|
146
|
+
$active-icon-color: $green-700,
|
|
115
147
|
$active-bg: $green-200
|
|
116
148
|
);
|
|
117
149
|
|
|
118
150
|
@include gl-badge-variant(
|
|
119
151
|
$variant: warning,
|
|
120
152
|
$color: $orange-700,
|
|
153
|
+
$icon-color: $orange-500,
|
|
121
154
|
$bg: $orange-100,
|
|
122
155
|
$hover-color: $orange-800,
|
|
156
|
+
$hover-icon-color: $orange-600,
|
|
123
157
|
$border-color: $orange-200,
|
|
124
158
|
$active-color: $orange-900,
|
|
159
|
+
$active-icon-color: $orange-700,
|
|
125
160
|
$active-bg: $orange-200
|
|
126
161
|
);
|
|
127
162
|
|
|
128
163
|
@include gl-badge-variant(
|
|
129
164
|
$variant: danger,
|
|
130
165
|
$color: $red-700,
|
|
166
|
+
$icon-color: $red-500,
|
|
131
167
|
$bg: $red-100,
|
|
132
168
|
$hover-color: $red-800,
|
|
169
|
+
$hover-icon-color: $red-600,
|
|
133
170
|
$border-color: $red-200,
|
|
134
171
|
$active-color: $red-900,
|
|
172
|
+
$active-icon-color: $red-700,
|
|
135
173
|
$active-bg: $red-200
|
|
136
174
|
);
|
|
137
175
|
|
|
138
176
|
@include gl-badge-variant(
|
|
139
177
|
$variant: tier,
|
|
140
178
|
$color: $purple-700,
|
|
179
|
+
$icon-color: $purple-500,
|
|
141
180
|
$bg: $purple-100,
|
|
142
181
|
$hover-color: $purple-800,
|
|
182
|
+
$hover-icon-color: $purple-600,
|
|
143
183
|
$border-color: $purple-200,
|
|
144
184
|
$active-color: $purple-900,
|
|
185
|
+
$active-icon-color: $purple-700,
|
|
145
186
|
$active-bg: $purple-200
|
|
146
187
|
);
|
|
147
188
|
|
|
@@ -31,7 +31,7 @@ export const Default = (_args, { argTypes }) => ({
|
|
|
31
31
|
<gl-nav-item-dropdown text="Dropdown">
|
|
32
32
|
<template #button-content>
|
|
33
33
|
<gl-icon name="question" />
|
|
34
|
-
<gl-icon name="
|
|
34
|
+
<gl-icon name="chevron-down" />
|
|
35
35
|
</template>
|
|
36
36
|
<gl-dropdown-item>One</gl-dropdown-item>
|
|
37
37
|
<gl-dropdown-item>Two</gl-dropdown-item>
|
package/src/scss/functions.scss
CHANGED
|
@@ -57,5 +57,8 @@
|
|
|
57
57
|
$slope: ($max - $min) / ($max-width - $min-width);
|
|
58
58
|
$intersection: (-$min-width * $slope) + $min;
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
// Use calc() inside of clamp() function to work around SassC
|
|
61
|
+
// compilation failure.
|
|
62
|
+
// See https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2972
|
|
63
|
+
@return clamp(#{$min}, calc(#{$intersection} + #{$slope * 100vw}), #{$max});
|
|
61
64
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
@include expect {
|
|
12
12
|
// prettier-ignore
|
|
13
|
-
font-size: clamp(2rem, #{-0.66667rem} + #{5.55556vw}, 3.5rem);
|
|
13
|
+
font-size: clamp(2rem, calc(#{-0.66667rem} + #{5.55556vw}), 3.5rem);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
@include expect {
|
|
26
26
|
// prettier-ignore
|
|
27
|
-
line-height: clamp(2rem, #{-0.66667rem} + #{5.55556vw}, 3.5rem);
|
|
27
|
+
line-height: clamp(2rem, calc(#{-0.66667rem} + #{5.55556vw}), 3.5rem);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/scss/utilities.scss
CHANGED
|
@@ -859,27 +859,27 @@
|
|
|
859
859
|
}
|
|
860
860
|
|
|
861
861
|
.gl-bg-chevron-left {
|
|
862
|
-
background-image: url($gl-icon-chevron-left)
|
|
862
|
+
background-image: url('#{$gl-icon-chevron-left}')
|
|
863
863
|
}
|
|
864
864
|
|
|
865
865
|
.gl-bg-chevron-left\! {
|
|
866
|
-
background-image: url($gl-icon-chevron-left) !important
|
|
866
|
+
background-image: url('#{$gl-icon-chevron-left}') !important
|
|
867
867
|
}
|
|
868
868
|
|
|
869
869
|
.gl-bg-chevron-right {
|
|
870
|
-
background-image: url($gl-icon-chevron-right)
|
|
870
|
+
background-image: url('#{$gl-icon-chevron-right}')
|
|
871
871
|
}
|
|
872
872
|
|
|
873
873
|
.gl-bg-chevron-right\! {
|
|
874
|
-
background-image: url($gl-icon-chevron-right) !important
|
|
874
|
+
background-image: url('#{$gl-icon-chevron-right}') !important
|
|
875
875
|
}
|
|
876
876
|
|
|
877
877
|
.gl-bg-chevron-down {
|
|
878
|
-
background-image: url($gl-icon-chevron-down)
|
|
878
|
+
background-image: url('#{$gl-icon-chevron-down}')
|
|
879
879
|
}
|
|
880
880
|
|
|
881
881
|
.gl-bg-chevron-down\! {
|
|
882
|
-
background-image: url($gl-icon-chevron-down) !important
|
|
882
|
+
background-image: url('#{$gl-icon-chevron-down}') !important
|
|
883
883
|
}
|
|
884
884
|
|
|
885
885
|
.gl-backdrop-filter-blur-1 {
|
|
@@ -3643,13 +3643,13 @@
|
|
|
3643
3643
|
list-style-position: inside !important
|
|
3644
3644
|
}
|
|
3645
3645
|
.gl-mask-chevron-down {
|
|
3646
|
-
mask-image: url($gl-icon-chevron-down);
|
|
3646
|
+
mask-image: url('#{$gl-icon-chevron-down}');
|
|
3647
3647
|
mask-repeat: no-repeat;
|
|
3648
3648
|
mask-position: center;
|
|
3649
3649
|
mask-size: cover
|
|
3650
3650
|
}
|
|
3651
3651
|
.gl-mask-chevron-down\! {
|
|
3652
|
-
mask-image: url($gl-icon-chevron-down) !important;
|
|
3652
|
+
mask-image: url('#{$gl-icon-chevron-down}') !important;
|
|
3653
3653
|
mask-repeat: no-repeat !important;
|
|
3654
3654
|
mask-position: center !important;
|
|
3655
3655
|
mask-size: cover !important
|
|
@@ -387,15 +387,15 @@
|
|
|
387
387
|
* naming convention: gl-bg-{image-name}
|
|
388
388
|
*/
|
|
389
389
|
@mixin gl-bg-chevron-left {
|
|
390
|
-
background-image: url($gl-icon-chevron-left);
|
|
390
|
+
background-image: url('#{$gl-icon-chevron-left}');
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
@mixin gl-bg-chevron-right {
|
|
394
|
-
background-image: url($gl-icon-chevron-right);
|
|
394
|
+
background-image: url('#{$gl-icon-chevron-right}');
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
@mixin gl-bg-chevron-down {
|
|
398
|
-
background-image: url($gl-icon-chevron-down);
|
|
398
|
+
background-image: url('#{$gl-icon-chevron-down}');
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
/**
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Creates out of validation configurations from .documentation.js files and creates a readable string out of it
|
|
2
|
-
const getValidationInfoText = function () {
|
|
3
|
-
let validation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4
|
-
|
|
5
|
-
switch (validation.type) {
|
|
6
|
-
case 'range':
|
|
7
|
-
return `${validation.min}-${validation.max}`;
|
|
8
|
-
|
|
9
|
-
default:
|
|
10
|
-
return '';
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { getValidationInfoText };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Creates out of validation configurations from .documentation.js files and creates a readable string out of it
|
|
2
|
-
export const getValidationInfoText = (validation = {}) => {
|
|
3
|
-
switch (validation.type) {
|
|
4
|
-
case 'range':
|
|
5
|
-
return `${validation.min}-${validation.max}`;
|
|
6
|
-
default:
|
|
7
|
-
return '';
|
|
8
|
-
}
|
|
9
|
-
};
|