@gitlab/ui 94.8.0 → 94.9.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/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +6 -2
- package/dist/components/base/new_dropdowns/listbox/listbox.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/package.json +2 -2
- package/src/components/base/breadcrumb/breadcrumb.scss +6 -0
- package/src/components/base/breadcrumb/breadcrumb.vue +0 -1
- package/src/components/base/button/button.scss +224 -67
- package/src/components/base/dropdown/dropdown.scss +20 -4
- package/src/components/base/label/label.scss +5 -0
- package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +6 -2
- package/src/components/base/new_dropdowns/dropdown.scss +7 -2
- package/src/components/base/new_dropdowns/listbox/listbox.vue +4 -2
- package/src/components/base/search_box_by_click/search_box_by_click.scss +12 -3
- package/src/components/base/segmented_control/segmented_control.scss +120 -42
- package/src/scss/storybook.scss +4 -0
- package/src/scss/variables.scss +7 -0
|
@@ -109,11 +109,21 @@
|
|
|
109
109
|
margin-left: -1px;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
@if $feature-button-border {
|
|
113
|
+
&.gl-button {
|
|
114
|
+
@apply gl-px-0;
|
|
114
115
|
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
&.btn-sm {
|
|
117
|
+
@apply gl-px-0;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
} @else {
|
|
121
|
+
&.gl-button {
|
|
122
|
+
@apply gl-px-3;
|
|
123
|
+
|
|
124
|
+
&.btn-sm {
|
|
125
|
+
@apply gl-px-2;
|
|
126
|
+
}
|
|
117
127
|
}
|
|
118
128
|
}
|
|
119
129
|
}
|
|
@@ -170,6 +180,12 @@
|
|
|
170
180
|
}
|
|
171
181
|
|
|
172
182
|
.dropdown-icon-only {
|
|
183
|
+
@if $feature-button-border {
|
|
184
|
+
&.dropdown-toggle-no-caret {
|
|
185
|
+
padding: 0 !important;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
173
189
|
.dropdown-icon,
|
|
174
190
|
.gl-button-icon.gl-button-icon {
|
|
175
191
|
@apply gl-mr-0;
|
|
@@ -74,6 +74,11 @@ $label-padding-horizontal-half: 0.375 * $grid-size;
|
|
|
74
74
|
@apply gl-rounded-full;
|
|
75
75
|
@apply gl-shadow-none;
|
|
76
76
|
|
|
77
|
+
@if $feature-button-border {
|
|
78
|
+
min-height: auto !important;
|
|
79
|
+
min-width: auto !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
77
82
|
&:focus,
|
|
78
83
|
&:active {
|
|
79
84
|
@apply gl-focus;
|
|
@@ -174,6 +174,9 @@ export default {
|
|
|
174
174
|
isIconOnly() {
|
|
175
175
|
return Boolean(this.icon && this.hasNoVisibleToggleText);
|
|
176
176
|
},
|
|
177
|
+
isEllipsisButton() {
|
|
178
|
+
return this.isIconOnly && this.icon === 'ellipsis_h';
|
|
179
|
+
},
|
|
177
180
|
isCaretOnly() {
|
|
178
181
|
return !this.noCaret && !this.icon && this.hasNoVisibleToggleText;
|
|
179
182
|
},
|
|
@@ -190,9 +193,10 @@ export default {
|
|
|
190
193
|
this.toggleClass,
|
|
191
194
|
{
|
|
192
195
|
'gl-new-dropdown-toggle': true,
|
|
193
|
-
'
|
|
196
|
+
'button-ellipsis-horizontal': this.isEllipsisButton,
|
|
197
|
+
'gl-new-dropdown-icon-only btn-icon': this.isIconOnly && !this.isEllipsisButton,
|
|
194
198
|
'gl-new-dropdown-toggle-no-caret': this.noCaret,
|
|
195
|
-
'gl-new-dropdown-caret-only': this.isCaretOnly,
|
|
199
|
+
'gl-new-dropdown-caret-only btn-icon': this.isCaretOnly,
|
|
196
200
|
},
|
|
197
201
|
];
|
|
198
202
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
|
|
52
52
|
.gl-new-dropdown-toggle {
|
|
53
53
|
// optically align the caret
|
|
54
|
-
&.gl-button:not(.gl-new-dropdown-toggle-no-caret) {
|
|
54
|
+
&.gl-button:not(.gl-new-dropdown-toggle-no-caret, .btn-icon) {
|
|
55
55
|
@apply gl-pr-3;
|
|
56
56
|
|
|
57
57
|
&.btn-sm {
|
|
@@ -67,6 +67,10 @@
|
|
|
67
67
|
.gl-new-dropdown-toggle {
|
|
68
68
|
.gl-button-text {
|
|
69
69
|
@apply gl-inline-flex;
|
|
70
|
+
|
|
71
|
+
&:has(.gl-sr-only) {
|
|
72
|
+
width: auto;
|
|
73
|
+
}
|
|
70
74
|
}
|
|
71
75
|
}
|
|
72
76
|
|
|
@@ -85,7 +89,7 @@
|
|
|
85
89
|
}
|
|
86
90
|
}
|
|
87
91
|
|
|
88
|
-
.gl-button .gl-button-icon.gl-new-dropdown-chevron {
|
|
92
|
+
.gl-button:not(.gl-new-dropdown-caret-only) .gl-button-icon.gl-new-dropdown-chevron {
|
|
89
93
|
@apply gl-ml-2;
|
|
90
94
|
@apply gl-mr-0;
|
|
91
95
|
}
|
|
@@ -94,6 +98,7 @@
|
|
|
94
98
|
// optically align the caret
|
|
95
99
|
&.gl-button:not(.gl-new-dropdown-toggle-no-caret) {
|
|
96
100
|
@apply gl-pr-2;
|
|
101
|
+
@apply gl-pl-3;
|
|
97
102
|
|
|
98
103
|
&.btn-sm {
|
|
99
104
|
@apply gl-pr-0;
|
|
@@ -793,7 +793,8 @@ export default {
|
|
|
793
793
|
<gl-button
|
|
794
794
|
v-if="showResetButton"
|
|
795
795
|
category="tertiary"
|
|
796
|
-
class="!gl-m-0 !gl-w-auto gl-max-w-1/2 gl-shrink-0 gl-text-ellipsis !gl-px-2 !gl-
|
|
796
|
+
class="!gl-m-0 !gl-w-auto gl-max-w-1/2 gl-flex-shrink-0 gl-text-ellipsis !gl-px-2 !gl-text-sm focus:!gl-shadow-inner-2-blue-400"
|
|
797
|
+
size="small"
|
|
797
798
|
data-testid="listbox-reset-button"
|
|
798
799
|
@click="onResetButtonClicked"
|
|
799
800
|
>
|
|
@@ -802,7 +803,8 @@ export default {
|
|
|
802
803
|
<gl-button
|
|
803
804
|
v-if="showSelectAllButton"
|
|
804
805
|
category="tertiary"
|
|
805
|
-
class="!gl-m-0 !gl-w-auto gl-max-w-1/2 gl-shrink-0 gl-text-ellipsis !gl-px-2 !gl-
|
|
806
|
+
class="!gl-m-0 !gl-w-auto gl-max-w-1/2 gl-flex-shrink-0 gl-text-ellipsis !gl-px-2 !gl-text-sm focus:!gl-shadow-inner-2-blue-400"
|
|
807
|
+
size="small"
|
|
806
808
|
data-testid="listbox-select-all-button"
|
|
807
809
|
@click="onSelectAllButtonClicked"
|
|
808
810
|
>
|
|
@@ -4,14 +4,23 @@
|
|
|
4
4
|
.gl-search-box-by-click-history > .gl-button {
|
|
5
5
|
padding-left: $gl-spacing-scale-4 !important;
|
|
6
6
|
padding-right: $gl-spacing-scale-3 !important;
|
|
7
|
-
@apply gl-border-none;
|
|
8
7
|
border-top-right-radius: 0;
|
|
9
8
|
border-bottom-right-radius: 0;
|
|
10
|
-
|
|
9
|
+
|
|
10
|
+
@if $feature-button-border {
|
|
11
|
+
border-color: var(--gl-border-color-strong);
|
|
12
|
+
} @else {
|
|
13
|
+
@apply gl-border-none;
|
|
14
|
+
@include gl-inset-border-1-gray-400;
|
|
15
|
+
}
|
|
11
16
|
}
|
|
12
17
|
|
|
13
18
|
.gl-search-box-by-click-search-button.gl-button:not(:disabled) {
|
|
14
|
-
@
|
|
19
|
+
@if $feature-button-border {
|
|
20
|
+
border-color: var(--gl-border-color-strong);
|
|
21
|
+
} @else {
|
|
22
|
+
@include gl-inset-border-1-gray-400;
|
|
23
|
+
}
|
|
15
24
|
}
|
|
16
25
|
|
|
17
26
|
.gl-search-box-by-click-input {
|
|
@@ -27,67 +27,95 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
@if $feature-button-border {
|
|
31
|
+
.gl-segmented-control {
|
|
32
|
+
label:not(.disabled) {
|
|
33
|
+
@apply gl-cursor-pointer;
|
|
34
|
+
}
|
|
34
35
|
|
|
35
36
|
.btn-gl-segmented-button {
|
|
36
37
|
@apply gl-text-base;
|
|
37
38
|
@apply gl-leading-normal;
|
|
38
39
|
@apply gl-text-gray-900;
|
|
39
40
|
@include gl-fill-current-color;
|
|
40
|
-
@
|
|
41
|
-
|
|
41
|
+
@include gl-bg-gray-10;
|
|
42
|
+
border-color: $gray-200;
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
&:last-child {
|
|
48
|
-
@include gl-btn-gl-segmented-button-last;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&:hover {
|
|
52
|
-
@include gl-inset-border-2-gray-400;
|
|
53
|
-
@apply gl-bg-gray-50;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&.focus {
|
|
57
|
-
@apply gl-z-1;
|
|
58
|
-
@include gl-btn-gl-segmented-button-focus($gray-400);
|
|
59
|
-
@apply gl-bg-gray-50;
|
|
60
|
-
}
|
|
44
|
+
&:not(:first-child) {
|
|
45
|
+
border-left-color: transparent;
|
|
46
|
+
}
|
|
61
47
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
@apply gl-bg-white;
|
|
48
|
+
&:not(:last-child) {
|
|
49
|
+
border-right-color: transparent;
|
|
50
|
+
}
|
|
66
51
|
|
|
67
52
|
&:hover {
|
|
68
|
-
|
|
69
|
-
@
|
|
53
|
+
border-color: $gray-400;
|
|
54
|
+
@include gl-bg-gray-50;
|
|
70
55
|
}
|
|
71
56
|
|
|
72
|
-
&.focus
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
@
|
|
57
|
+
&.focus {
|
|
58
|
+
@include gl-z-index-1;
|
|
59
|
+
border-color: $gray-400;
|
|
60
|
+
@include gl-focus;
|
|
61
|
+
@include gl-bg-gray-50;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.active {
|
|
65
|
+
@include gl-z-index-2;
|
|
66
|
+
border-color: $gray-400;
|
|
67
|
+
@include gl-inset-border-1-gray-400;
|
|
68
|
+
@include gl-bg-white;
|
|
69
|
+
|
|
70
|
+
&:hover {
|
|
71
|
+
@include gl-inset-border-1-gray-400;
|
|
72
|
+
@include gl-bg-gray-50;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.focus,
|
|
76
|
+
&.focus:hover {
|
|
77
|
+
border-color: $gray-400;
|
|
78
|
+
@include gl-focus;
|
|
79
|
+
@include gl-bg-gray-50;
|
|
80
|
+
}
|
|
76
81
|
}
|
|
77
|
-
}
|
|
78
82
|
|
|
79
83
|
&:focus-within {
|
|
80
84
|
@apply gl-focus;
|
|
81
85
|
}
|
|
82
86
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
&.disabled,
|
|
88
|
+
&[disabled],
|
|
89
|
+
&.disabled:hover,
|
|
90
|
+
&[disabled]:hover {
|
|
91
|
+
@include gl-text-gray-400;
|
|
92
|
+
border-color: $gray-200;
|
|
93
|
+
@include gl-z-index-0;
|
|
94
|
+
@include gl-cursor-not-allowed;
|
|
95
|
+
|
|
96
|
+
&:first-child {
|
|
97
|
+
border-right-color: transparent;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:last-child {
|
|
101
|
+
border-left-color: transparent;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
} @else {
|
|
107
|
+
.gl-segmented-control {
|
|
108
|
+
label:not(.disabled) {
|
|
109
|
+
@include gl-cursor-pointer;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.btn-gl-segmented-button {
|
|
113
|
+
@include gl-font-base;
|
|
114
|
+
@include gl-line-height-normal;
|
|
115
|
+
@include gl-text-gray-900;
|
|
116
|
+
@include gl-fill-current-color;
|
|
117
|
+
@include gl-bg-gray-10;
|
|
88
118
|
@include gl-inset-border-y-1-gray-200;
|
|
89
|
-
@apply gl-z-0;
|
|
90
|
-
@apply gl-cursor-not-allowed;
|
|
91
119
|
|
|
92
120
|
&:first-child {
|
|
93
121
|
@include gl-btn-gl-segmented-button-first;
|
|
@@ -96,6 +124,56 @@
|
|
|
96
124
|
&:last-child {
|
|
97
125
|
@include gl-btn-gl-segmented-button-last;
|
|
98
126
|
}
|
|
127
|
+
|
|
128
|
+
&:hover {
|
|
129
|
+
@include gl-inset-border-2-gray-400;
|
|
130
|
+
@include gl-bg-gray-50;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&.focus {
|
|
134
|
+
@include gl-z-index-1;
|
|
135
|
+
@include gl-btn-gl-segmented-button-focus($gray-400);
|
|
136
|
+
@include gl-bg-gray-50;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&.active {
|
|
140
|
+
@include gl-z-index-2;
|
|
141
|
+
@include gl-inset-border-2-gray-300;
|
|
142
|
+
@include gl-bg-white;
|
|
143
|
+
|
|
144
|
+
&:hover {
|
|
145
|
+
@include gl-inset-border-2-gray-400;
|
|
146
|
+
@include gl-bg-gray-50;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.focus,
|
|
150
|
+
&.focus:hover {
|
|
151
|
+
@include gl-btn-gl-segmented-button-focus($gray-400);
|
|
152
|
+
@include gl-bg-gray-50;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:focus-within {
|
|
157
|
+
@include gl-focus;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&.disabled,
|
|
161
|
+
&[disabled],
|
|
162
|
+
&.disabled:hover,
|
|
163
|
+
&[disabled]:hover {
|
|
164
|
+
@apply gl-text-gray-400;
|
|
165
|
+
@include gl-inset-border-y-1-gray-200;
|
|
166
|
+
@apply gl-z-0;
|
|
167
|
+
@apply gl-cursor-not-allowed;
|
|
168
|
+
|
|
169
|
+
&:first-child {
|
|
170
|
+
@include gl-btn-gl-segmented-button-first;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&:last-child {
|
|
174
|
+
@include gl-btn-gl-segmented-button-last;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
99
177
|
}
|
|
100
178
|
}
|
|
101
179
|
}
|
package/src/scss/storybook.scss
CHANGED
package/src/scss/variables.scss
CHANGED
|
@@ -207,6 +207,10 @@ $gl-border-radius-6: $gl-spacing-scale-6;
|
|
|
207
207
|
$gl-border-radius-7: $gl-spacing-scale-7;
|
|
208
208
|
$gl-border-radius-full: 50%;
|
|
209
209
|
|
|
210
|
+
// component height
|
|
211
|
+
$gl-button-small-size: px-to-rem(24px);
|
|
212
|
+
$gl-button-medium-size: px-to-rem(32px);
|
|
213
|
+
|
|
210
214
|
// transition parameters
|
|
211
215
|
$gl-transition-duration-slow: 0.4s;
|
|
212
216
|
$gl-transition-duration-medium: 0.2s;
|
|
@@ -328,3 +332,6 @@ $popover-arrow-color: $popover-bg;
|
|
|
328
332
|
$popover-arrow-outer-color: $gray-100;
|
|
329
333
|
|
|
330
334
|
$tooltip-opacity: 1;
|
|
335
|
+
|
|
336
|
+
// Feature flag for GlButton border migration
|
|
337
|
+
$feature-button-border: false !default;
|