@gitlab/ui 89.0.1 → 89.1.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 +7 -0
- package/dist/components/base/form/form_select/form_select.js +1 -1
- package/dist/components/base/toggle/toggle.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +1 -1
- package/src/components/base/form/form_select/form_select.scss +55 -14
- package/src/components/base/form/form_select/form_select.vue +8 -6
- package/src/components/base/toggle/toggle.scss +4 -4
- package/src/components/base/toggle/toggle.vue +2 -2
package/package.json
CHANGED
|
@@ -11,46 +11,87 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
|
|
|
11
11
|
.gl-form-select {
|
|
12
12
|
@include gl-font-base;
|
|
13
13
|
@include gl-font-regular;
|
|
14
|
-
@include gl-text-gray-900;
|
|
15
14
|
@include gl-opacity-10;
|
|
16
15
|
@include gl-line-height-normal;
|
|
17
16
|
@include gl-py-3;
|
|
18
17
|
@include gl-pl-4;
|
|
19
|
-
padding-right: $gl-spacing-scale-2 + $gl-spacing-scale-6;
|
|
20
18
|
@include gl-h-auto;
|
|
21
|
-
@include gl-inset-border-1-gray-400;
|
|
22
|
-
@apply gl-border-none;
|
|
23
|
-
appearance: none;
|
|
24
19
|
@include gl-text-truncate;
|
|
25
20
|
@include gl-bg-no-repeat;
|
|
26
|
-
|
|
21
|
+
@apply gl-border-none;
|
|
22
|
+
appearance: none;
|
|
23
|
+
background-color: var(--gl-control-background-color-default);
|
|
24
|
+
background-image: none;
|
|
25
|
+
box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-default);
|
|
26
|
+
color: var(--gl-text-color-default);
|
|
27
|
+
padding-right: $gl-spacing-scale-2 + $gl-spacing-scale-6;
|
|
28
|
+
position: relative;
|
|
27
29
|
|
|
28
30
|
@media (forced-colors: active) {
|
|
29
31
|
box-shadow: none;
|
|
30
32
|
border: 1px solid;
|
|
31
33
|
}
|
|
32
34
|
|
|
35
|
+
&:hover {
|
|
36
|
+
box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-hover);
|
|
37
|
+
}
|
|
38
|
+
|
|
33
39
|
&:focus,
|
|
34
40
|
&:focus:active {
|
|
35
|
-
@include gl-focus($color:
|
|
41
|
+
@include gl-focus($color: var(--gl-control-border-color-focus), $important: true);
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
&:disabled {
|
|
39
|
-
@include gl-bg-gray-10;
|
|
40
|
-
@include gl-inset-border-1-gray-100;
|
|
41
|
-
@include gl-text-gray-500;
|
|
42
45
|
@include gl-cursor-not-allowed;
|
|
46
|
+
color: var(--gl-text-color-disabled);
|
|
47
|
+
background-color: var(--gl-control-background-color-disabled);
|
|
48
|
+
box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-disabled);
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
&.is-invalid:not(:disabled) {
|
|
46
|
-
|
|
52
|
+
box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-error);
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-error);
|
|
56
|
+
}
|
|
47
57
|
|
|
48
58
|
&:focus {
|
|
49
|
-
@include gl-focus($color:
|
|
59
|
+
@include gl-focus($color: var(--gl-control-border-color-error), $important: true);
|
|
50
60
|
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
51
63
|
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
// Chevron dropdown icon
|
|
65
|
+
// References wrapping div because select can't have pseudo elements reliably
|
|
66
|
+
.gl-form-select-wrapper {
|
|
67
|
+
position: relative;
|
|
68
|
+
|
|
69
|
+
&::after {
|
|
70
|
+
content: "";
|
|
71
|
+
background-color: var(--gl-icon-color-default);
|
|
72
|
+
mask-image: url('#{$gl-icon-select-chevron-down}');
|
|
73
|
+
mask-repeat: no-repeat;
|
|
74
|
+
mask-position: center center;
|
|
75
|
+
pointer-events: none;
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: 50%;
|
|
78
|
+
right: $gl-spacing-scale-4;
|
|
79
|
+
transform: translateY(-50%);
|
|
80
|
+
height: 5px;
|
|
81
|
+
width: 8px;
|
|
82
|
+
|
|
83
|
+
@media (forced-colors: active) {
|
|
84
|
+
background-color: CanvasText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:has(>.gl-form-select:disabled) {
|
|
89
|
+
&::after {
|
|
90
|
+
background-color: var(--gl-icon-color-disabled);
|
|
91
|
+
|
|
92
|
+
@media (forced-colors: active) {
|
|
93
|
+
background-color: GrayText; // stylelint-disable-line scale-unlimited/declaration-strict-value
|
|
94
|
+
}
|
|
54
95
|
}
|
|
55
96
|
}
|
|
56
97
|
}
|
|
@@ -47,10 +47,12 @@ export default {
|
|
|
47
47
|
};
|
|
48
48
|
</script>
|
|
49
49
|
<template>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
<div class="gl-form-select-wrapper" :class="cssClasses">
|
|
51
|
+
<b-form-select class="gl-form-select" v-bind="$attrs" v-on="$listeners">
|
|
52
|
+
<!-- eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots -->
|
|
53
|
+
<template v-for="slot in Object.keys($slots)" #[slot]>
|
|
54
|
+
<slot :name="slot"></slot>
|
|
55
|
+
</template>
|
|
56
|
+
</b-form-select>
|
|
57
|
+
</div>
|
|
56
58
|
</template>
|
|
@@ -126,12 +126,12 @@
|
|
|
126
126
|
top: $gl-spacing-scale-1;
|
|
127
127
|
@include gl-transition-medium;
|
|
128
128
|
@include gl-justify-content-center;
|
|
129
|
-
@include gl-p-
|
|
129
|
+
@include gl-p-2;
|
|
130
130
|
|
|
131
131
|
> svg {
|
|
132
|
-
@include gl-w-
|
|
133
|
-
@include gl-h-
|
|
134
|
-
@include gl-fill-gray-
|
|
132
|
+
@include gl-w-4;
|
|
133
|
+
@include gl-h-4;
|
|
134
|
+
@include gl-fill-gray-600;
|
|
135
135
|
@include gl-vertical-align-baseline;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
];
|
|
106
106
|
},
|
|
107
107
|
icon() {
|
|
108
|
-
return this.value ? '
|
|
108
|
+
return this.value ? 'check-xs' : 'close-xs';
|
|
109
109
|
},
|
|
110
110
|
helpId() {
|
|
111
111
|
return this.shouldRenderHelp ? `toggle-help-${this.uuid}` : undefined;
|
|
@@ -184,7 +184,7 @@ export default {
|
|
|
184
184
|
>
|
|
185
185
|
<gl-loading-icon v-if="isLoading" color="light" class="toggle-loading" />
|
|
186
186
|
<span v-else :class="{ 'toggle-icon': true, disabled: disabled }">
|
|
187
|
-
<gl-icon :name="icon" :size="
|
|
187
|
+
<gl-icon :name="icon" :size="12" />
|
|
188
188
|
</span>
|
|
189
189
|
</button>
|
|
190
190
|
<span v-if="shouldRenderHelp" :id="helpId" class="gl-help-label" data-testid="toggle-help">
|