@gitlab/ui 80.7.2 → 80.8.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 +18 -0
- package/dist/components/base/button/button.js +1 -2
- package/dist/components/base/form/form_textarea/form_textarea.js +1 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +2 -2
- package/src/components/base/alert/alert.scss +4 -0
- package/src/components/base/avatar_labeled/avatar_labeled.scss +1 -1
- package/src/components/base/badge/badge.scss +4 -0
- package/src/components/base/button/button.scss +33 -0
- package/src/components/base/button/button.vue +1 -9
- package/src/components/base/form/form_checkbox/form_checkbox.scss +25 -1
- package/src/components/base/form/form_combobox/form_combobox.stories.js +1 -1
- package/src/components/base/form/form_input/form_input.scss +4 -0
- package/src/components/base/form/form_select/form_select.scss +5 -0
- package/src/components/base/form/form_textarea/form_textarea.vue +3 -3
- package/src/components/base/label/label.scss +8 -0
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.stories.js +1 -1
- package/src/components/base/new_dropdowns/listbox/listbox.md +1 -1
- package/src/components/base/new_dropdowns/listbox/listbox.stories.js +2 -2
- package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.scss +1 -1
- package/src/internal/color_contrast/color_contrast.vue +1 -1
- package/src/scss/mixins.scss +12 -0
- package/src/scss/storybook.scss +2 -2
- package/src/scss/variables.scss +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "80.
|
|
3
|
+
"version": "80.8.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"emoji-regex": "^10.0.0",
|
|
139
139
|
"eslint": "8.57.0",
|
|
140
140
|
"eslint-import-resolver-jest": "3.0.2",
|
|
141
|
-
"eslint-plugin-cypress": "3.
|
|
141
|
+
"eslint-plugin-cypress": "3.2.0",
|
|
142
142
|
"eslint-plugin-storybook": "0.8.0",
|
|
143
143
|
"glob": "10.3.3",
|
|
144
144
|
"identity-obj-proxy": "^3.0.0",
|
|
@@ -14,6 +14,10 @@ $gl-alert-padding-x: var(--gl-alert-padding-x, 0px);
|
|
|
14
14
|
padding-inline: calc(#{$gl-spacing-scale-9} + #{$gl-alert-padding-x});
|
|
15
15
|
@include gl-py-5;
|
|
16
16
|
|
|
17
|
+
@media (forced-colors: active) {
|
|
18
|
+
border: 1px solid;
|
|
19
|
+
}
|
|
20
|
+
|
|
17
21
|
&-not-dismissible {
|
|
18
22
|
padding-right: calc(#{$gl-spacing-scale-5} + #{$gl-alert-padding-x});
|
|
19
23
|
}
|
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
@include gl-font-base;
|
|
35
35
|
@include gl-rounded-base;
|
|
36
36
|
|
|
37
|
+
@media (forced-colors: active) {
|
|
38
|
+
border: 1px solid;
|
|
39
|
+
}
|
|
40
|
+
|
|
37
41
|
.gl-button-text {
|
|
38
42
|
@include gl-overflow-hidden;
|
|
39
43
|
@include gl-text-overflow-ellipsis;
|
|
@@ -314,6 +318,20 @@
|
|
|
314
318
|
}
|
|
315
319
|
}
|
|
316
320
|
|
|
321
|
+
&.btn-default-secondary,
|
|
322
|
+
&.btn-dashed-secondary,
|
|
323
|
+
&.btn-confirm-secondary,
|
|
324
|
+
&.btn-info-secondary,
|
|
325
|
+
&.btn-success-secondary,
|
|
326
|
+
&.btn-danger-secondary,
|
|
327
|
+
&.btn-reset-secondary,
|
|
328
|
+
&.btn-reset-tertiary {
|
|
329
|
+
@media (forced-colors: active) {
|
|
330
|
+
color: LinkText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
331
|
+
border: 1px solid LinkText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
317
335
|
&.btn-default,
|
|
318
336
|
&.btn-dashed,
|
|
319
337
|
&.btn-confirm,
|
|
@@ -324,6 +342,12 @@
|
|
|
324
342
|
@include gl-shadow-none;
|
|
325
343
|
mix-blend-mode: multiply;
|
|
326
344
|
|
|
345
|
+
@media (forced-colors: active) {
|
|
346
|
+
color: LinkText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
347
|
+
mix-blend-mode: initial;
|
|
348
|
+
border: 0;
|
|
349
|
+
}
|
|
350
|
+
|
|
327
351
|
&:hover {
|
|
328
352
|
@include gl-shadow-none;
|
|
329
353
|
}
|
|
@@ -336,6 +360,15 @@
|
|
|
336
360
|
}
|
|
337
361
|
}
|
|
338
362
|
|
|
363
|
+
&.btn-default-tertiary,
|
|
364
|
+
&.btn-confirm-tertiary,
|
|
365
|
+
&.btn-danger-tertiary {
|
|
366
|
+
@media (forced-colors: active) {
|
|
367
|
+
color: $black;
|
|
368
|
+
border: 0;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
339
372
|
&.btn-default-tertiary.selected {
|
|
340
373
|
box-shadow: inset 0 0 0 $gl-border-size-2 $gray-300;
|
|
341
374
|
}
|
|
@@ -87,16 +87,8 @@ export default {
|
|
|
87
87
|
},
|
|
88
88
|
buttonClasses() {
|
|
89
89
|
const classes = ['gl-button'];
|
|
90
|
-
const nonCategoryVariants = [
|
|
91
|
-
buttonVariantOptions.dashed,
|
|
92
|
-
buttonVariantOptions.link,
|
|
93
|
-
buttonVariantOptions.reset,
|
|
94
|
-
];
|
|
95
90
|
|
|
96
|
-
if (
|
|
97
|
-
!nonCategoryVariants.includes(this.variant) &&
|
|
98
|
-
this.category !== buttonCategoryOptions.primary
|
|
99
|
-
) {
|
|
91
|
+
if (this.category !== buttonCategoryOptions.primary) {
|
|
100
92
|
classes.push(`btn-${this.variant}-${this.category}`);
|
|
101
93
|
}
|
|
102
94
|
|
|
@@ -81,6 +81,11 @@
|
|
|
81
81
|
&::before {
|
|
82
82
|
@include gl-bg-blue-500;
|
|
83
83
|
@include gl-border-blue-500;
|
|
84
|
+
|
|
85
|
+
@media (forced-colors: active) {
|
|
86
|
+
background-color: LinkText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
87
|
+
border-color: LinKText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
88
|
+
}
|
|
84
89
|
}
|
|
85
90
|
}
|
|
86
91
|
|
|
@@ -115,6 +120,11 @@
|
|
|
115
120
|
&::before {
|
|
116
121
|
@include gl-bg-blue-700;
|
|
117
122
|
@include gl-border-blue-700;
|
|
123
|
+
|
|
124
|
+
@media (forced-colors: active) {
|
|
125
|
+
background-color: LinkText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
126
|
+
border-color: LinKText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
127
|
+
}
|
|
118
128
|
}
|
|
119
129
|
}
|
|
120
130
|
|
|
@@ -122,12 +132,22 @@
|
|
|
122
132
|
.custom-control-input:indeterminate ~ .custom-control-label::before {
|
|
123
133
|
@include gl-bg-blue-500;
|
|
124
134
|
@include gl-border-blue-500;
|
|
135
|
+
|
|
136
|
+
@media (forced-colors: active) {
|
|
137
|
+
background-color: LinkText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
138
|
+
border-color: LinKText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
139
|
+
}
|
|
125
140
|
}
|
|
126
141
|
|
|
127
142
|
.custom-control-input:not(:disabled):indeterminate ~ .custom-control-label:hover::before,
|
|
128
143
|
.custom-control-input:not(:disabled):focus:indeterminate ~ .custom-control-label::before {
|
|
129
144
|
@include gl-bg-blue-700;
|
|
130
145
|
@include gl-border-blue-700;
|
|
146
|
+
|
|
147
|
+
@media (forced-colors: active) {
|
|
148
|
+
background-color: LinkText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
149
|
+
border-color: LinKText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
150
|
+
}
|
|
131
151
|
}
|
|
132
152
|
}
|
|
133
153
|
|
|
@@ -138,6 +158,10 @@
|
|
|
138
158
|
@include gl-bg-gray-50;
|
|
139
159
|
@include gl-border-gray-100;
|
|
140
160
|
@include gl-pointer-events-auto;
|
|
161
|
+
|
|
162
|
+
@media (forced-colors: active) {
|
|
163
|
+
opacity: 0.5;
|
|
164
|
+
}
|
|
141
165
|
}
|
|
142
166
|
}
|
|
143
167
|
|
|
@@ -158,7 +182,7 @@
|
|
|
158
182
|
*/
|
|
159
183
|
@media screen and (forced-colors: active) {
|
|
160
184
|
forced-color-adjust: none;
|
|
161
|
-
/* system color reference for disabled text applied to
|
|
185
|
+
/* system color reference for disabled text applied to
|
|
162
186
|
background here.
|
|
163
187
|
*/
|
|
164
188
|
// stylelint-disable-next-line
|
|
@@ -57,7 +57,7 @@ export const WithObjectValue = (args, { argTypes }) => ({
|
|
|
57
57
|
>
|
|
58
58
|
<template #result="{ item }">
|
|
59
59
|
<div class="gl-display-flex">
|
|
60
|
-
<div class="gl-text-
|
|
60
|
+
<div class="gl-text-subtle gl-mr-4">{{ item.id }}</div>
|
|
61
61
|
<div>{{ item.title }}</div>
|
|
62
62
|
</div>
|
|
63
63
|
</template>
|
|
@@ -25,6 +25,11 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
|
|
|
25
25
|
@include gl-bg-no-repeat;
|
|
26
26
|
background-image: url($gl-icon-select-chevron-down);
|
|
27
27
|
|
|
28
|
+
@media (forced-colors: active) {
|
|
29
|
+
box-shadow: none;
|
|
30
|
+
border: 1px solid;
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
&:focus,
|
|
29
34
|
&:focus:active {
|
|
30
35
|
@include gl-focus($color: $gray-900, $important: true);
|
|
@@ -78,7 +78,7 @@ export default {
|
|
|
78
78
|
return this.remainingCharacterCount < 0;
|
|
79
79
|
},
|
|
80
80
|
characterCountTextClass() {
|
|
81
|
-
return this.isCharacterCountOverLimit ? 'gl-text-
|
|
81
|
+
return this.isCharacterCountOverLimit ? 'gl-text-danger' : 'gl-text-subtle';
|
|
82
82
|
},
|
|
83
83
|
showCharacterCount() {
|
|
84
84
|
return this.characterCount !== null;
|
|
@@ -138,7 +138,7 @@ export default {
|
|
|
138
138
|
@[keypressEvent].native="handleKeyPress"
|
|
139
139
|
/>
|
|
140
140
|
<small :class="['form-text', characterCountTextClass]" aria-hidden="true">
|
|
141
|
-
<!--
|
|
141
|
+
<!--
|
|
142
142
|
@slot Internationalized over character count text. Example: `<template #character-count-over-limit-text="{ count }">{{ n__('%d character over limit', '%d characters over limit', count) }}</template>`
|
|
143
143
|
@binding {number} count
|
|
144
144
|
-->
|
|
@@ -147,7 +147,7 @@ export default {
|
|
|
147
147
|
name="character-count-over-limit-text"
|
|
148
148
|
:count="Math.abs(remainingCharacterCount)"
|
|
149
149
|
></slot>
|
|
150
|
-
<!--
|
|
150
|
+
<!--
|
|
151
151
|
@slot Internationalized character count text. Example: `<template #character-count-text="{ count }">{{ n__('%d character remaining', '%d characters remaining', count) }}</template>`
|
|
152
152
|
@binding {number} count
|
|
153
153
|
-->
|
|
@@ -13,6 +13,10 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
13
13
|
@include gl-line-height-normal;
|
|
14
14
|
box-shadow: var(--label-inset-border) !important;
|
|
15
15
|
|
|
16
|
+
@media (forced-colors: active) {
|
|
17
|
+
border: 1px solid; // stylelint-disable-line declaration-property-value-disallowed-list
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
&:not(.gl-label-scoped) {
|
|
17
21
|
background-color: var(--label-background-color);
|
|
18
22
|
}
|
|
@@ -160,6 +164,10 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
160
164
|
|
|
161
165
|
.gl-label-text {
|
|
162
166
|
background-color: var(--label-background-color);
|
|
167
|
+
|
|
168
|
+
@media (forced-colors: active) {
|
|
169
|
+
border-right: 1px solid;
|
|
170
|
+
}
|
|
163
171
|
}
|
|
164
172
|
|
|
165
173
|
.gl-label-text-scoped {
|
|
@@ -201,7 +201,7 @@ export const CustomGroupsItemsAndToggle = makeGroupedExample({
|
|
|
201
201
|
<template #list-item>
|
|
202
202
|
<span class="gl-display-flex gl-flex-direction-column">
|
|
203
203
|
<span class="gl-font-weight-bold gl-white-space-nowrap">Orange Fox</span>
|
|
204
|
-
<span class="gl-text-
|
|
204
|
+
<span class="gl-text-subtle">@thefox</span>
|
|
205
205
|
</span>
|
|
206
206
|
</template>
|
|
207
207
|
</gl-disclosure-dropdown-item>
|
|
@@ -93,7 +93,7 @@ template. If you want to render a custom template for items, use the
|
|
|
93
93
|
<gl-avatar :size="32" class-="gl-mr-3"/>
|
|
94
94
|
<span class="gl-display-flex gl-flex-direction-column">
|
|
95
95
|
<span class="gl-font-weight-bold gl-white-space-nowrap">{{ item.text }}</span>
|
|
96
|
-
<span class="gl-text-
|
|
96
|
+
<span class="gl-text-subtle"> {{ item.secondaryText }}</span>
|
|
97
97
|
</span>
|
|
98
98
|
</span>
|
|
99
99
|
</template>
|
|
@@ -276,7 +276,7 @@ export const CustomListItem = (args, { argTypes }) => ({
|
|
|
276
276
|
<gl-avatar :size="32" :entity-name="item.value" class="gl-mr-3"/>
|
|
277
277
|
<span class="gl-display-flex gl-flex-direction-column">
|
|
278
278
|
<span class="gl-font-weight-bold gl-white-space-nowrap">{{ item.text }}</span>
|
|
279
|
-
<span class="gl-text-
|
|
279
|
+
<span class="gl-text-subtle"> {{ item.secondaryText }}</span>
|
|
280
280
|
</span>
|
|
281
281
|
</span>
|
|
282
282
|
</template>
|
|
@@ -325,7 +325,7 @@ export const CustomToggle = (args, { argTypes }) => ({
|
|
|
325
325
|
<gl-avatar :size="32" :entity-name="item.value" class="gl-mr-3"/>
|
|
326
326
|
<span class="gl-display-flex gl-flex-direction-column">
|
|
327
327
|
<span class="gl-font-weight-bold gl-white-space-nowrap">{{ item.text }}</span>
|
|
328
|
-
<span class="gl-text-
|
|
328
|
+
<span class="gl-text-subtle"> {{ item.secondaryText }}</span>
|
|
329
329
|
</span>
|
|
330
330
|
</span>
|
|
331
331
|
</template>
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
const failClasses = contrastScore
|
|
30
30
|
? 'gl-inset-border-1-red-300 gl-text-red-300'
|
|
31
31
|
: 'gl-inset-border-1-red-500 gl-text-red-500';
|
|
32
|
-
return [
|
|
32
|
+
return [isFail ? failClasses : textClass];
|
|
33
33
|
},
|
|
34
34
|
contrast() {
|
|
35
35
|
return getColorContrast(this.foreground, this.background);
|
package/src/scss/mixins.scss
CHANGED
|
@@ -59,22 +59,34 @@
|
|
|
59
59
|
inset 0 0 0 #{$outline-width + $outline-offset + 1px} $color,
|
|
60
60
|
$focus-ring-inset if-important($important);
|
|
61
61
|
outline: none if-important($important);
|
|
62
|
+
@media (forced-colors: active) {
|
|
63
|
+
outline: 2px solid LinkText if-important($important);
|
|
64
|
+
}
|
|
62
65
|
} @else if $outline == true {
|
|
63
66
|
outline: $focus-ring-outline if-important($important);
|
|
64
67
|
outline-offset: $outline-offset;
|
|
65
68
|
} @else {
|
|
66
69
|
box-shadow: inset 0 0 0 $outline-width $blue-400, $focus-ring-inset if-important($important);
|
|
67
70
|
outline: none if-important($important);
|
|
71
|
+
@media (forced-colors: active) {
|
|
72
|
+
outline: 2px solid LinkText if-important($important);
|
|
73
|
+
}
|
|
68
74
|
}
|
|
69
75
|
} @else if $color {
|
|
70
76
|
box-shadow: inset 0 0 0 $gl-border-size-1 $color, $focus-ring if-important($important);
|
|
71
77
|
outline: none if-important($important);
|
|
78
|
+
@media (forced-colors: active) {
|
|
79
|
+
outline: 2px solid LinkText if-important($important);
|
|
80
|
+
}
|
|
72
81
|
} @else if $outline == true {
|
|
73
82
|
outline: $focus-ring-outline if-important($important);
|
|
74
83
|
outline-offset: $outline-offset;
|
|
75
84
|
} @else {
|
|
76
85
|
box-shadow: $focus-ring if-important($important);
|
|
77
86
|
outline: none if-important($important);
|
|
87
|
+
@media (forced-colors: active) {
|
|
88
|
+
outline: 2px solid LinkText if-important($important);
|
|
89
|
+
}
|
|
78
90
|
}
|
|
79
91
|
}
|
|
80
92
|
|
package/src/scss/storybook.scss
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
@import 'tokens';
|
|
2
2
|
|
|
3
|
-
@tailwind utilities;
|
|
4
|
-
|
|
5
3
|
@import 'functions';
|
|
6
4
|
@import 'variables';
|
|
7
5
|
|
|
@@ -15,6 +13,8 @@
|
|
|
15
13
|
@import 'utility-mixins/index';
|
|
16
14
|
@import 'utilities';
|
|
17
15
|
|
|
16
|
+
@tailwind utilities;
|
|
17
|
+
|
|
18
18
|
@import 'fonts';
|
|
19
19
|
|
|
20
20
|
@import 'components';
|
package/src/scss/variables.scss
CHANGED