@gitlab/ui 93.2.0 → 93.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bin/migrate_custom_utils_to_tw.bundled.mjs +8 -1
  3. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_popover/duo_chat_context_item_popover.js +1 -1
  4. package/dist/components/experimental/duo/chat/duo_chat.js +3 -5
  5. package/dist/index.css +2 -2
  6. package/dist/index.css.map +1 -1
  7. package/dist/tailwind.css +1 -1
  8. package/dist/tailwind.css.map +1 -1
  9. package/package.json +2 -2
  10. package/src/components/base/avatar/avatar.scss +12 -12
  11. package/src/components/base/avatar_link/avatar_link.scss +2 -2
  12. package/src/components/base/badge/badge.scss +2 -2
  13. package/src/components/base/button/button.scss +5 -5
  14. package/src/components/base/datepicker/datepicker.scss +5 -5
  15. package/src/components/base/daterange_picker/daterange_picker.scss +1 -1
  16. package/src/components/base/drawer/drawer.scss +8 -8
  17. package/src/components/base/dropdown/dropdown.scss +5 -5
  18. package/src/components/base/dropdown/dropdown_divider.scss +1 -1
  19. package/src/components/base/dropdown/dropdown_item.scss +1 -1
  20. package/src/components/base/filtered_search/filtered_search.scss +4 -4
  21. package/src/components/base/filtered_search/filtered_search_term.scss +2 -2
  22. package/src/components/base/filtered_search/filtered_search_token.scss +4 -4
  23. package/src/components/base/filtered_search/filtered_search_token_segment.scss +3 -3
  24. package/src/components/base/form/form_checkbox/form_checkbox.scss +1 -1
  25. package/src/components/base/form/form_input/form_input.scss +1 -1
  26. package/src/components/base/form/form_select/form_select.scss +1 -1
  27. package/src/components/base/markdown/markdown.scss +2 -2
  28. package/src/components/base/new_dropdowns/dropdown.scss +2 -2
  29. package/src/components/base/new_dropdowns/dropdown_item.scss +1 -1
  30. package/src/components/base/new_dropdowns/listbox/listbox.scss +2 -2
  31. package/src/components/base/path/path.scss +3 -3
  32. package/src/components/base/search_box_by_type/search_box_by_type.scss +6 -6
  33. package/src/components/base/table/table.scss +2 -2
  34. package/src/components/base/tabs/tabs/tabs.scss +3 -3
  35. package/src/components/base/toast/toast.scss +3 -3
  36. package/src/components/base/toggle/toggle.scss +3 -3
  37. package/src/components/base/tooltip/tooltip.scss +4 -4
  38. package/src/components/charts/legend/legend.scss +3 -3
  39. package/src/components/charts/tooltip/tooltip.scss +1 -1
  40. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_popover/duo_chat_context_item_popover.vue +9 -12
  41. package/src/components/experimental/duo/chat/duo_chat.scss +5 -5
  42. package/src/components/experimental/duo/chat/duo_chat.vue +3 -18
  43. package/translations.js +0 -1
@@ -70,8 +70,8 @@ table.gl-table {
70
70
  tbody > tr {
71
71
  &::after {
72
72
  content: '';
73
- @include gl-h-6;
74
- @include gl-w-full;
73
+ @apply gl-h-6;
74
+ @apply gl-w-full;
75
75
  @apply gl-block;
76
76
  }
77
77
 
@@ -103,7 +103,7 @@
103
103
  }
104
104
 
105
105
  .gl-actions-tabs-start {
106
- @include gl-w-full;
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
- @include gl-w-8;
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
- @include gl-h-full;
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
- @include gl-w-auto;
11
+ @apply gl-w-auto;
12
12
 
13
13
  @include media-breakpoint-down(xs) {
14
- @include gl-w-full;
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
- @include gl-text-transform-none;
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
- @include gl-h-5;
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
- @include gl-w-4;
136
- @include gl-h-4;
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
- @include gl-h-3;
17
- @include gl-w-2;
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
- @include gl-w-3;
29
- @include gl-h-2;
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
- @include gl-h-4;
24
+ @apply gl-h-4;
25
25
  position: absolute;
26
- @include gl-w-full;
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
- @include gl-w-eighth;
65
+ @apply gl-w-1/8;
66
66
  }
67
67
 
68
68
  .gl-legend-tabular-header-cell {
@@ -3,7 +3,7 @@
3
3
 
4
4
  > .popover {
5
5
  @include gl-min-w-0;
6
- @include gl-w-max-content;
6
+ @apply gl-w-max;
7
7
  max-width: $chart-tooltip-max-width;
8
8
  }
9
9
  }
@@ -124,22 +124,19 @@ export default {
124
124
  </div>
125
125
  </template>
126
126
  <div>
127
- <div v-if="filePath !== null" class="gl-flex gl-flex-wrap gl-items-center">
128
- <gl-icon name="document" :size="12" variant="subtle" class="gl-mr-1" />
129
- <span>{{ contextItem.metadata.project }}</span
127
+ <div v-if="filePath !== null">
128
+ <gl-icon name="document" :size="12" variant="subtle" class="gl-mr-1" /><span
129
+ class="gl-break-all"
130
+ >{{ contextItem.metadata.project }}</span
130
131
  ><span v-for="(pathPart, index) in filePathArray" :key="pathPart" class="gl-break-all"
131
132
  >{{ pathPart }}{{ index + 1 < filePathArray.length ? '/' : '' }}</span
132
133
  >
133
134
  </div>
134
-
135
- <div
136
- v-if="filePath === null"
137
- class="gl-flex gl-flex-wrap gl-items-center gl-leading-1 gl-text-subtle"
138
- >
139
- <gl-icon :name="iconName" :size="12" variant="subtle" class="gl-mr-1" />
140
-
141
- <span>{{ contextItem.metadata.project }}</span
142
- ><span v-if="id !== null">{{ formattedId }}</span>
135
+ <div v-else>
136
+ <gl-icon :name="iconName" :size="12" variant="subtle" class="gl-mr-1" /><span
137
+ class="gl-break-all"
138
+ >{{ contextItem.metadata.project }}</span
139
+ ><span v-if="id !== null" class="gl-break-all">{{ formattedId }}</span>
143
140
  </div>
144
141
  <gl-alert
145
142
  v-if="!isEnabled"
@@ -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
- @include gl-h-full;
43
- @include gl-w-full;
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
- @include gl-w-full;
91
- @include gl-h-7;
90
+ @apply gl-w-full;
91
+ @apply gl-h-7;
92
92
  }
93
93
  }
94
94
 
@@ -23,15 +23,10 @@ import {
23
23
  CHAT_INCLUDE_MESSAGE,
24
24
  MESSAGE_MODEL_ROLES,
25
25
  } from './constants';
26
- import { INCLUDE_SLASH_COMMAND } from './mock_data';
27
26
 
28
27
  export const i18n = {
29
28
  CHAT_DEFAULT_TITLE: translate('GlDuoChat.chatDefaultTitle', 'GitLab Duo Chat'),
30
29
  CHAT_CLOSE_LABEL: translate('GlDuoChat.chatCloseLabel', 'Close the Code Explanation'),
31
- CHAT_LEGAL_GENERATED_BY_AI: translate(
32
- 'GlDuoChat.chatLegalGeneratedByAI',
33
- 'Responses generated by AI'
34
- ),
35
30
  CHAT_EMPTY_STATE_TITLE: translate('GlDuoChat.chatEmptyStateTitle', 'Ask a question'),
36
31
  CHAT_EMPTY_STATE_DESC: translate(
37
32
  'GlDuoChat.chatEmptyStateDesc',
@@ -324,7 +319,7 @@ export default {
324
319
  return false;
325
320
  }
326
321
 
327
- return INCLUDE_SLASH_COMMAND.name.startsWith(this.caseInsensitivePrompt);
322
+ return CHAT_INCLUDE_MESSAGE.startsWith(this.caseInsensitivePrompt);
328
323
  },
329
324
  inputPlaceholder() {
330
325
  if (this.chatPromptPlaceholder) {
@@ -462,7 +457,7 @@ export default {
462
457
  this.contextItemMenuRef?.handleKeyUp(e);
463
458
  return;
464
459
  }
465
- if (this.caseInsensitivePrompt === INCLUDE_SLASH_COMMAND.name) {
460
+ if (this.caseInsensitivePrompt === CHAT_INCLUDE_MESSAGE) {
466
461
  this.contextItemsMenuIsOpen = true;
467
462
  return;
468
463
  }
@@ -550,7 +545,7 @@ export default {
550
545
  <header
551
546
  v-if="showHeader"
552
547
  data-testid="chat-header"
553
- class="duo-chat-drawer-header duo-chat-drawer-header-sticky gl-z-200 gl-border-b-0 !gl-p-0"
548
+ class="duo-chat-drawer-header duo-chat-drawer-header-sticky gl-z-200 gl-bg-gray-10 !gl-p-0"
554
549
  >
555
550
  <div class="drawer-title gl-flex gl-items-center gl-justify-start gl-p-5">
556
551
  <h3 class="gl-my-0 gl-text-size-h2">{{ title }}</h3>
@@ -572,16 +567,6 @@ export default {
572
567
  />
573
568
  </div>
574
569
 
575
- <gl-alert
576
- :dismissible="false"
577
- variant="tip"
578
- :show-icon="false"
579
- class="legal-warning gl-border-t gl-max-w-full gl-bg-gray-50 gl-p-4 gl-text-center gl-text-gray-700"
580
- role="alert"
581
- data-testid="chat-legal-warning"
582
- >{{ $options.i18n.CHAT_LEGAL_GENERATED_BY_AI }}</gl-alert
583
- >
584
-
585
570
  <!--
586
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.
587
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.',