@gitlab/ui 93.3.0 → 94.0.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 +49 -0
- package/dist/components/base/table/table.js +22 -1
- package/dist/components/experimental/duo/chat/duo_chat.js +1 -2
- package/dist/index.css +2 -4
- 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/avatar/avatar.scss +12 -12
- package/src/components/base/avatar_link/avatar_link.scss +2 -2
- package/src/components/base/badge/badge.scss +2 -2
- package/src/components/base/button/button.scss +5 -5
- package/src/components/base/datepicker/datepicker.scss +5 -5
- package/src/components/base/daterange_picker/daterange_picker.scss +1 -1
- package/src/components/base/drawer/drawer.scss +8 -8
- package/src/components/base/dropdown/dropdown.scss +5 -5
- package/src/components/base/dropdown/dropdown_divider.scss +1 -1
- package/src/components/base/dropdown/dropdown_item.scss +1 -1
- package/src/components/base/filtered_search/filtered_search.scss +4 -4
- package/src/components/base/filtered_search/filtered_search_term.scss +2 -2
- package/src/components/base/filtered_search/filtered_search_token.scss +4 -4
- package/src/components/base/filtered_search/filtered_search_token_segment.scss +3 -3
- package/src/components/base/form/form_checkbox/form_checkbox.scss +1 -1
- package/src/components/base/form/form_input/form_input.scss +1 -1
- package/src/components/base/form/form_select/form_select.scss +1 -1
- package/src/components/base/markdown/markdown.scss +2 -2
- package/src/components/base/new_dropdowns/dropdown.scss +2 -2
- package/src/components/base/new_dropdowns/dropdown_item.scss +1 -1
- package/src/components/base/new_dropdowns/listbox/listbox.scss +2 -2
- package/src/components/base/path/path.scss +3 -3
- package/src/components/base/search_box_by_type/search_box_by_type.scss +6 -6
- package/src/components/base/table/table.md +17 -0
- package/src/components/base/table/table.scss +12 -10
- package/src/components/base/table/table.vue +18 -2
- package/src/components/base/tabs/tabs/tabs.scss +3 -3
- package/src/components/base/toast/toast.scss +3 -3
- package/src/components/base/toggle/toggle.scss +3 -3
- package/src/components/base/tooltip/tooltip.scss +4 -4
- package/src/components/charts/legend/legend.scss +3 -3
- package/src/components/charts/tooltip/tooltip.scss +1 -1
- package/src/components/experimental/duo/chat/duo_chat.scss +5 -5
- package/src/components/experimental/duo/chat/duo_chat.vue +1 -15
- package/translations.js +0 -1
|
@@ -14,6 +14,23 @@ like mentioned in the implementation example.
|
|
|
14
14
|
_Full documentation for the
|
|
15
15
|
`field` prop [here.](https://bootstrap-vue.org/docs/components/table#fields-column-definitions)_
|
|
16
16
|
|
|
17
|
+
## Header text alignment
|
|
18
|
+
|
|
19
|
+
To align a given `TH` element's text to the right, set the `thAlignRight` property to `true` in
|
|
20
|
+
the fields definition. This will ensure that proper styling is applied, including when the column
|
|
21
|
+
is sortable.
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
const fields = [
|
|
25
|
+
{
|
|
26
|
+
key: "column_one",
|
|
27
|
+
label: __("First column"),
|
|
28
|
+
sortable: true,
|
|
29
|
+
thAlignRight: true,
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
```
|
|
33
|
+
|
|
17
34
|
## Use `GlTableLite` when possible
|
|
18
35
|
|
|
19
36
|
If you don't need all the features of `GlTable`, like filtering, sorting, or
|
|
@@ -5,9 +5,8 @@ table.gl-table {
|
|
|
5
5
|
tr {
|
|
6
6
|
th,
|
|
7
7
|
td {
|
|
8
|
-
@apply gl-border-b-
|
|
8
|
+
@apply gl-border-b-1 gl-p-5 gl-border-b-solid;
|
|
9
9
|
border-color: var(--gl-border-color-default);
|
|
10
|
-
@apply gl-p-5;
|
|
11
10
|
@include gl-bg-transparent;
|
|
12
11
|
@apply gl-leading-normal;
|
|
13
12
|
@apply gl-text-base;
|
|
@@ -18,12 +17,15 @@ table.gl-table {
|
|
|
18
17
|
@apply gl-font-bold;
|
|
19
18
|
color: var(--gl-text-color-heading);
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
.gl-table-th-sort-icon-wrapper {
|
|
21
|
+
@apply gl-ml-2;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.gl-table-th-align-right > div {
|
|
25
|
+
@apply gl-flex-row-reverse;
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
@apply gl-ml-0;
|
|
26
|
-
@apply gl-mr-2;
|
|
27
|
+
.gl-table-th-sort-icon-wrapper {
|
|
28
|
+
@apply gl-ml-0 gl-mr-2;
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -70,8 +72,8 @@ table.gl-table {
|
|
|
70
72
|
tbody > tr {
|
|
71
73
|
&::after {
|
|
72
74
|
content: '';
|
|
73
|
-
@
|
|
74
|
-
@
|
|
75
|
+
@apply gl-h-6;
|
|
76
|
+
@apply gl-w-full;
|
|
75
77
|
@apply gl-block;
|
|
76
78
|
}
|
|
77
79
|
|
|
@@ -83,7 +85,7 @@ table.gl-table {
|
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
&:first-child {
|
|
86
|
-
@apply gl-border-t-
|
|
88
|
+
@apply gl-border-t-1 gl-border-t-solid;
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
&:not(:first-child) {
|
|
@@ -61,6 +61,22 @@ export default {
|
|
|
61
61
|
...Object.keys(this.$scopedSlots).filter((slotName) => slotName.startsWith('head(')),
|
|
62
62
|
];
|
|
63
63
|
},
|
|
64
|
+
computedFields() {
|
|
65
|
+
return this.fields?.map((field) => {
|
|
66
|
+
if (typeof field === 'string') {
|
|
67
|
+
return field;
|
|
68
|
+
}
|
|
69
|
+
const { thAlignRight, thClass = '', ...rest } = field;
|
|
70
|
+
const computedThClass = Array.isArray(thClass) ? thClass : thClass.split(' ');
|
|
71
|
+
if (thAlignRight) {
|
|
72
|
+
computedThClass.push('gl-table-th-align-right');
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
...rest,
|
|
76
|
+
thClass: computedThClass,
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
},
|
|
64
80
|
},
|
|
65
81
|
mounted() {
|
|
66
82
|
// logWarning will call isDev before logging any message
|
|
@@ -97,7 +113,7 @@ export default {
|
|
|
97
113
|
<template>
|
|
98
114
|
<b-table
|
|
99
115
|
:table-class="localTableClass"
|
|
100
|
-
:fields="
|
|
116
|
+
:fields="computedFields"
|
|
101
117
|
:sort-by.sync="localSortBy"
|
|
102
118
|
:sort-desc.sync="localSortDesc"
|
|
103
119
|
no-sort-reset
|
|
@@ -112,7 +128,7 @@ export default {
|
|
|
112
128
|
<slot :name="headSlotName" v-bind="scope"
|
|
113
129
|
><span>{{ scope.label }}</span></slot
|
|
114
130
|
><template v-if="isSortable(scope)">
|
|
115
|
-
<div class="gl-
|
|
131
|
+
<div class="gl-table-th-sort-icon-wrapper gl-flex gl-w-5 gl-justify-center">
|
|
116
132
|
<span
|
|
117
133
|
name="sort-icon"
|
|
118
134
|
data-testid="sort-icon"
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
.gl-actions-tabs-start {
|
|
106
|
-
@
|
|
106
|
+
@apply gl-w-full;
|
|
107
107
|
@apply gl-flex;
|
|
108
108
|
@apply gl-flex-col;
|
|
109
109
|
@apply gl-mt-3;
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.gl-tabs-fade {
|
|
137
|
-
@
|
|
137
|
+
@apply gl-w-8;
|
|
138
138
|
bottom: 0;
|
|
139
139
|
position: sticky;
|
|
140
140
|
@apply gl-p-2;
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
@apply gl-border;
|
|
155
155
|
@include gl-action-neutral-colors;
|
|
156
156
|
@apply gl-p-0;
|
|
157
|
-
@
|
|
157
|
+
@apply gl-h-full;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
.gl-scrollable-tabs-nav {
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
bottom: $gl-spacing-scale-6;
|
|
9
9
|
left: $gl-spacing-scale-6;
|
|
10
10
|
right: auto;
|
|
11
|
-
@
|
|
11
|
+
@apply gl-w-auto;
|
|
12
12
|
|
|
13
13
|
@include media-breakpoint-down(xs) {
|
|
14
|
-
@
|
|
14
|
+
@apply gl-w-full;
|
|
15
15
|
left: 0;
|
|
16
16
|
right: 0;
|
|
17
17
|
}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
@apply gl-p-3;
|
|
48
48
|
@apply gl-m-0;
|
|
49
49
|
@apply gl-ml-5;
|
|
50
|
-
@
|
|
50
|
+
@apply gl-normal-case;
|
|
51
51
|
@apply gl-text-base;
|
|
52
52
|
@apply gl-whitespace-nowrap;
|
|
53
53
|
@apply gl-font-bold;
|
|
@@ -116,7 +116,7 @@ $toggle-height: 2.5 * $grid-size;
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.toggle-loading {
|
|
119
|
-
@
|
|
119
|
+
@apply gl-h-5;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
.toggle-icon {
|
|
@@ -132,8 +132,8 @@ $toggle-height: 2.5 * $grid-size;
|
|
|
132
132
|
@apply gl-p-1;
|
|
133
133
|
|
|
134
134
|
> svg {
|
|
135
|
-
@
|
|
136
|
-
@
|
|
135
|
+
@apply gl-w-4;
|
|
136
|
+
@apply gl-h-4;
|
|
137
137
|
@include gl-fill-gray-600;
|
|
138
138
|
@include gl-vertical-align-baseline;
|
|
139
139
|
}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.arrow {
|
|
16
|
-
@
|
|
17
|
-
@
|
|
16
|
+
@apply gl-h-3;
|
|
17
|
+
@apply gl-w-2;
|
|
18
18
|
|
|
19
19
|
&::before {
|
|
20
20
|
@apply gl-border-4;
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
.gl-tooltip.bs-tooltip-top,
|
|
26
26
|
.gl-tooltip.bs-tooltip-bottom {
|
|
27
27
|
.arrow {
|
|
28
|
-
@
|
|
29
|
-
@
|
|
28
|
+
@apply gl-w-3;
|
|
29
|
+
@apply gl-h-2;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -21,9 +21,9 @@ $legend-body-h: $gl-spacing-scale-13 - $gl-spacing-scale-4;
|
|
|
21
21
|
bottom: 0;
|
|
22
22
|
content: '';
|
|
23
23
|
@apply gl-block;
|
|
24
|
-
@
|
|
24
|
+
@apply gl-h-4;
|
|
25
25
|
position: absolute;
|
|
26
|
-
@
|
|
26
|
+
@apply gl-w-full;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -62,7 +62,7 @@ $legend-body-h: $gl-spacing-scale-13 - $gl-spacing-scale-4;
|
|
|
62
62
|
@include gl-overflow-hidden;
|
|
63
63
|
@apply gl-text-ellipsis;
|
|
64
64
|
@include gl-text-right;
|
|
65
|
-
@
|
|
65
|
+
@apply gl-w-1/8;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.gl-legend-tabular-header-cell {
|
|
@@ -39,8 +39,8 @@ $duo-chat-scrim-gradient: linear-gradient(to bottom, rgba($gray-10, 0), $gray-10
|
|
|
39
39
|
right: 0;
|
|
40
40
|
@apply gl-transition-all;
|
|
41
41
|
position: fixed;
|
|
42
|
-
@
|
|
43
|
-
@
|
|
42
|
+
@apply gl-h-full;
|
|
43
|
+
@apply gl-w-full;
|
|
44
44
|
@include gl-overflow-y-auto;
|
|
45
45
|
@include gl-shadow-lg;
|
|
46
46
|
@apply gl-text-base;
|
|
@@ -54,9 +54,9 @@ $duo-chat-scrim-gradient: linear-gradient(to bottom, rgba($gray-10, 0), $gray-10
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.duo-chat-drawer-header-sticky {
|
|
57
|
-
@include gl-bg-white;
|
|
58
57
|
top: 0;
|
|
59
58
|
position: sticky;
|
|
59
|
+
@apply gl-border-b-solid gl-border-b-gray-100 gl-border-b-1;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.duo-chat-drawer-body {
|
|
@@ -87,8 +87,8 @@ $duo-chat-scrim-gradient: linear-gradient(to bottom, rgba($gray-10, 0), $gray-10
|
|
|
87
87
|
left: 0;
|
|
88
88
|
position: absolute;
|
|
89
89
|
@include gl-pointer-events-none;
|
|
90
|
-
@
|
|
91
|
-
@
|
|
90
|
+
@apply gl-w-full;
|
|
91
|
+
@apply gl-h-7;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -27,10 +27,6 @@ import {
|
|
|
27
27
|
export const i18n = {
|
|
28
28
|
CHAT_DEFAULT_TITLE: translate('GlDuoChat.chatDefaultTitle', 'GitLab Duo Chat'),
|
|
29
29
|
CHAT_CLOSE_LABEL: translate('GlDuoChat.chatCloseLabel', 'Close the Code Explanation'),
|
|
30
|
-
CHAT_LEGAL_GENERATED_BY_AI: translate(
|
|
31
|
-
'GlDuoChat.chatLegalGeneratedByAI',
|
|
32
|
-
'Responses generated by AI'
|
|
33
|
-
),
|
|
34
30
|
CHAT_EMPTY_STATE_TITLE: translate('GlDuoChat.chatEmptyStateTitle', 'Ask a question'),
|
|
35
31
|
CHAT_EMPTY_STATE_DESC: translate(
|
|
36
32
|
'GlDuoChat.chatEmptyStateDesc',
|
|
@@ -549,7 +545,7 @@ export default {
|
|
|
549
545
|
<header
|
|
550
546
|
v-if="showHeader"
|
|
551
547
|
data-testid="chat-header"
|
|
552
|
-
class="duo-chat-drawer-header duo-chat-drawer-header-sticky gl-z-200 gl-
|
|
548
|
+
class="duo-chat-drawer-header duo-chat-drawer-header-sticky gl-z-200 gl-bg-gray-10 !gl-p-0"
|
|
553
549
|
>
|
|
554
550
|
<div class="drawer-title gl-flex gl-items-center gl-justify-start gl-p-5">
|
|
555
551
|
<h3 class="gl-my-0 gl-text-size-h2">{{ title }}</h3>
|
|
@@ -571,16 +567,6 @@ export default {
|
|
|
571
567
|
/>
|
|
572
568
|
</div>
|
|
573
569
|
|
|
574
|
-
<gl-alert
|
|
575
|
-
:dismissible="false"
|
|
576
|
-
variant="tip"
|
|
577
|
-
:show-icon="false"
|
|
578
|
-
class="legal-warning gl-border-t gl-max-w-full gl-bg-gray-50 gl-p-4 gl-text-center gl-text-gray-700"
|
|
579
|
-
role="alert"
|
|
580
|
-
data-testid="chat-legal-warning"
|
|
581
|
-
>{{ $options.i18n.CHAT_LEGAL_GENERATED_BY_AI }}</gl-alert
|
|
582
|
-
>
|
|
583
|
-
|
|
584
570
|
<!--
|
|
585
571
|
@slot Subheader to be rendered right after the title. It is sticky and stays on top of the chat no matter the number of messages.
|
|
586
572
|
-->
|
package/translations.js
CHANGED
|
@@ -23,7 +23,6 @@ export default {
|
|
|
23
23
|
'GlDuoChat.chatEmptyStateTitle': 'Ask a question',
|
|
24
24
|
'GlDuoChat.chatLegalDisclaimer':
|
|
25
25
|
"May provide inappropriate responses not representative of GitLab's views. Do not input personal data.",
|
|
26
|
-
'GlDuoChat.chatLegalGeneratedByAI': 'Responses generated by AI',
|
|
27
26
|
'GlDuoChat.chatPromptPlaceholderDefault': 'GitLab Duo Chat',
|
|
28
27
|
'GlDuoChat.chatPromptPlaceholderWithCommands': 'Type "/" for slash commands',
|
|
29
28
|
'GlDuoChat.chatSubmitLabel': 'Send chat message.',
|