@gitlab/ui 43.2.1 → 43.4.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/dist/utility_classes.css +1 -1
- package/dist/utility_classes.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 +26 -0
- package/src/scss/utility-mixins/overflow.scss +4 -0
- package/src/scss/utility-mixins/text.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.4.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
|
@@ -3778,6 +3778,14 @@
|
|
|
3778
3778
|
overflow-wrap: anywhere !important
|
|
3779
3779
|
}
|
|
3780
3780
|
|
|
3781
|
+
.gl-overflow-x-scroll {
|
|
3782
|
+
overflow-x: scroll
|
|
3783
|
+
}
|
|
3784
|
+
|
|
3785
|
+
.gl-overflow-x-scroll\! {
|
|
3786
|
+
overflow-x: scroll !important
|
|
3787
|
+
}
|
|
3788
|
+
|
|
3781
3789
|
.gl-overflow-scroll {
|
|
3782
3790
|
overflow: scroll
|
|
3783
3791
|
}
|
|
@@ -7478,9 +7486,27 @@
|
|
|
7478
7486
|
.gl-text-decoration-underline {
|
|
7479
7487
|
text-decoration: underline;
|
|
7480
7488
|
}
|
|
7489
|
+
.gl-active-text-decoration-underline:active {
|
|
7490
|
+
text-decoration: underline;
|
|
7491
|
+
}
|
|
7492
|
+
.gl-focus-text-decoration-underline:focus {
|
|
7493
|
+
text-decoration: underline;
|
|
7494
|
+
}
|
|
7495
|
+
.gl-hover-text-decoration-underline:hover {
|
|
7496
|
+
text-decoration: underline;
|
|
7497
|
+
}
|
|
7481
7498
|
.gl-text-decoration-underline\! {
|
|
7482
7499
|
text-decoration: underline !important;
|
|
7483
7500
|
}
|
|
7501
|
+
.gl-active-text-decoration-underline\!:active {
|
|
7502
|
+
text-decoration: underline !important;
|
|
7503
|
+
}
|
|
7504
|
+
.gl-focus-text-decoration-underline\!:focus {
|
|
7505
|
+
text-decoration: underline !important;
|
|
7506
|
+
}
|
|
7507
|
+
.gl-hover-text-decoration-underline\!:hover {
|
|
7508
|
+
text-decoration: underline !important;
|
|
7509
|
+
}
|
|
7484
7510
|
.gl-reset-text-decoration-color {
|
|
7485
7511
|
text-decoration-color: inherit;
|
|
7486
7512
|
}
|
|
@@ -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
|
-
};
|