@gitlab/ui 86.12.0 → 86.13.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 +14 -0
- package/bin/migrate_custom_utils_to_tw.bundled.mjs +96 -52
- package/dist/components/base/accordion/accordion_item.js +1 -1
- package/dist/components/base/avatar_labeled/avatar_labeled.js +1 -1
- package/dist/components/base/badge/badge.js +1 -1
- package/dist/components/base/banner/banner.js +2 -2
- package/dist/components/base/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/base/datepicker/datepicker.js +1 -1
- package/dist/components/base/daterange_picker/daterange_picker.js +2 -2
- package/dist/components/base/dropdown/dropdown.js +1 -1
- package/dist/components/base/dropdown/dropdown_item.js +2 -5
- package/dist/components/base/filtered_search/filtered_search.js +1 -1
- package/dist/components/base/filtered_search/filtered_search_term.js +1 -1
- package/dist/components/base/filtered_search/filtered_search_token.js +1 -1
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +1 -1
- package/dist/components/base/form/form_combobox/form_combobox.js +1 -1
- package/dist/components/base/keyset_pagination/keyset_pagination.js +1 -1
- package/dist/components/base/label/label.js +1 -1
- package/dist/components/base/loading_icon/loading_icon.js +1 -1
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +2 -2
- package/dist/components/base/new_dropdowns/base_dropdown/constants.js +1 -1
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +1 -1
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +2 -2
- package/dist/components/base/new_dropdowns/listbox/listbox.js +2 -2
- package/dist/components/base/new_dropdowns/listbox/listbox_group.js +1 -1
- package/dist/components/base/new_dropdowns/listbox/listbox_item.js +2 -2
- package/dist/components/base/pagination/pagination.js +2 -2
- package/dist/components/base/path/path.js +1 -1
- package/dist/components/base/popover/popover.js +1 -1
- package/dist/components/base/search_box_by_click/search_box_by_click.js +1 -1
- package/dist/components/base/table/table.js +1 -1
- package/dist/components/base/toggle/toggle.js +2 -2
- package/dist/components/base/token_selector/token_container.js +1 -1
- package/dist/components/base/token_selector/token_selector.js +4 -4
- package/dist/components/base/token_selector/token_selector_dropdown.js +1 -1
- package/dist/components/charts/area/area.js +1 -1
- package/dist/components/charts/bar/bar.js +1 -1
- package/dist/components/charts/column/column.js +1 -1
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +1 -1
- package/dist/components/charts/heatmap/heatmap.js +1 -1
- package/dist/components/charts/legend/legend.js +4 -4
- package/dist/components/charts/line/line.js +1 -1
- package/dist/components/charts/single_stat/single_stat.js +1 -1
- package/dist/components/charts/sparkline/sparkline.js +1 -1
- package/dist/components/charts/stacked_column/stacked_column.js +1 -1
- package/dist/components/experimental/duo/chat/components/duo_chat_conversation/duo_chat_conversation.js +1 -3
- package/dist/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.js +2 -2
- package/dist/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.js +5 -5
- package/dist/components/experimental/duo/chat/components/duo_chat_message_sources/duo_chat_message_sources.js +1 -1
- package/dist/components/experimental/duo/chat/components/duo_chat_predefined_prompts/duo_chat_predefined_prompts.js +1 -1
- package/dist/components/experimental/duo/chat/duo_chat.js +2 -2
- package/dist/components/experimental/duo/user_feedback/user_feedback.js +1 -1
- package/dist/components/experimental/experiment_badge/experiment_badge.js +3 -3
- package/dist/components/regions/empty_state/empty_state.js +5 -5
- package/dist/components/utilities/truncate/truncate.js +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/dist/tokens/tokens_story.js +1 -1
- package/dist/tokens/tokens_table.js +3 -3
- package/dist/utils/charts/constants.js +2 -2
- package/package.json +1 -1
- package/src/components/base/accordion/accordion_item.vue +2 -2
- package/src/components/base/avatar_labeled/avatar_labeled.vue +2 -4
- package/src/components/base/badge/badge.vue +2 -2
- package/src/components/base/banner/banner.vue +2 -2
- package/src/components/base/breadcrumb/breadcrumb.vue +1 -1
- package/src/components/base/datepicker/datepicker.vue +4 -4
- package/src/components/base/daterange_picker/daterange_picker.vue +5 -5
- package/src/components/base/dropdown/dropdown.vue +5 -9
- package/src/components/base/dropdown/dropdown_item.vue +2 -6
- package/src/components/base/filtered_search/filtered_search.vue +1 -1
- package/src/components/base/filtered_search/filtered_search_term.vue +1 -1
- package/src/components/base/filtered_search/filtered_search_token.vue +1 -1
- package/src/components/base/filtered_search/filtered_search_token_segment.vue +1 -1
- package/src/components/base/form/form_combobox/form_combobox.vue +4 -4
- package/src/components/base/icon/icon.md +1 -1
- package/src/components/base/keyset_pagination/keyset_pagination.vue +2 -2
- package/src/components/base/label/label.vue +1 -1
- package/src/components/base/loading_icon/loading_icon.vue +1 -1
- package/src/components/base/markdown/markdown_typescale_demo.html +1 -1
- package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +2 -2
- package/src/components/base/new_dropdowns/base_dropdown/constants.js +1 -1
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.md +1 -1
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.vue +2 -2
- package/src/components/base/new_dropdowns/disclosure/mock_data.js +2 -2
- package/src/components/base/new_dropdowns/listbox/listbox.md +3 -3
- package/src/components/base/new_dropdowns/listbox/listbox.vue +7 -7
- package/src/components/base/new_dropdowns/listbox/listbox_group.vue +1 -1
- package/src/components/base/new_dropdowns/listbox/listbox_item.vue +2 -2
- package/src/components/base/pagination/pagination.vue +2 -2
- package/src/components/base/path/path.vue +1 -1
- package/src/components/base/popover/popover.vue +2 -2
- package/src/components/base/search_box_by_click/search_box_by_click.vue +5 -5
- package/src/components/base/skeleton_loader/skeleton_loader.md +3 -3
- package/src/components/base/table/table.vue +3 -3
- package/src/components/base/toggle/toggle.vue +2 -2
- package/src/components/base/token_selector/token_container.vue +2 -2
- package/src/components/base/token_selector/token_selector.vue +5 -5
- package/src/components/base/token_selector/token_selector_dropdown.vue +2 -2
- package/src/components/charts/area/area.vue +1 -1
- package/src/components/charts/bar/bar.vue +1 -1
- package/src/components/charts/column/column.vue +1 -1
- package/src/components/charts/discrete_scatter/discrete_scatter.vue +1 -1
- package/src/components/charts/heatmap/heatmap.vue +1 -1
- package/src/components/charts/legend/legend.vue +5 -5
- package/src/components/charts/line/line.vue +1 -1
- package/src/components/charts/single_stat/single_stat.vue +7 -13
- package/src/components/charts/sparkline/sparkline.vue +7 -7
- package/src/components/charts/stacked_column/stacked_column.vue +1 -1
- package/src/components/experimental/duo/chat/components/duo_chat_conversation/duo_chat_conversation.vue +4 -7
- package/src/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.vue +4 -4
- package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.vue +6 -6
- package/src/components/experimental/duo/chat/components/duo_chat_message_sources/duo_chat_message_sources.vue +4 -4
- package/src/components/experimental/duo/chat/components/duo_chat_predefined_prompts/duo_chat_predefined_prompts.vue +1 -1
- package/src/components/experimental/duo/chat/duo_chat.vue +20 -22
- package/src/components/experimental/duo/user_feedback/user_feedback.vue +2 -2
- package/src/components/experimental/experiment_badge/experiment_badge.vue +4 -4
- package/src/components/regions/empty_state/empty_state.vue +9 -17
- package/src/components/utilities/truncate/truncate.vue +1 -3
- package/src/internal/color_contrast/color_contrast.vue +3 -3
- package/src/scss/storybook.scss +6 -3
- package/src/scss/tailwind.css +2 -0
- package/src/tokens/tokens_story.vue +5 -5
- package/src/tokens/tokens_table.vue +5 -5
- package/src/utils/charts/constants.js +2 -3
- package/tailwind.defaults.js +1 -0
package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.vue
CHANGED
|
@@ -192,13 +192,13 @@ export default {
|
|
|
192
192
|
</script>
|
|
193
193
|
<template>
|
|
194
194
|
<div
|
|
195
|
-
class="
|
|
195
|
+
class="duo-chat-message gl-mb-4 gl-rounded-lg gl-p-4 gl-leading-20 gl-break-anywhere"
|
|
196
196
|
:class="{
|
|
197
|
-
'gl-ml-auto gl-
|
|
198
|
-
'gl-rounded-
|
|
197
|
+
'gl-ml-auto gl-rounded-br-none gl-bg-blue-100 gl-text-blue-900': isUserMessage,
|
|
198
|
+
'gl-rounded-bl-none gl-border-1 gl-border-solid gl-border-gray-50 gl-text-gray-900':
|
|
199
199
|
isAssistantMessage,
|
|
200
200
|
'gl-bg-white': isAssistantMessage && !error,
|
|
201
|
-
'gl-bg-red-50
|
|
201
|
+
'!gl-border-none gl-bg-red-50': error,
|
|
202
202
|
}"
|
|
203
203
|
@insert-code-snippet="onInsertCodeSnippet"
|
|
204
204
|
>
|
|
@@ -207,7 +207,7 @@ export default {
|
|
|
207
207
|
:aria-label="$options.i18n.MESSAGE_ERROR"
|
|
208
208
|
name="status_warning_borderless"
|
|
209
209
|
:size="16"
|
|
210
|
-
class="
|
|
210
|
+
class="error-icon gl-border gl-mr-3 gl-flex-shrink-0 gl-rounded-full gl-border-red-500 gl-text-red-600"
|
|
211
211
|
data-testid="error"
|
|
212
212
|
/>
|
|
213
213
|
<div ref="content-wrapper" :class="{ 'has-error': error }">
|
|
@@ -218,7 +218,7 @@ export default {
|
|
|
218
218
|
<template v-if="isAssistantMessage">
|
|
219
219
|
<documentation-sources v-if="sources" :sources="sources" />
|
|
220
220
|
|
|
221
|
-
<div class="
|
|
221
|
+
<div class="duo-chat-message-feedback gl-mt-4 gl-flex gl-items-end">
|
|
222
222
|
<gl-loading-icon v-if="isChunkAndNotCancelled" class="gl-pt-4" variant="dots" inline />
|
|
223
223
|
<gl-duo-user-feedback
|
|
224
224
|
v-if="isNotChunkOrCancelled"
|
|
@@ -59,20 +59,20 @@ export default {
|
|
|
59
59
|
};
|
|
60
60
|
</script>
|
|
61
61
|
<template>
|
|
62
|
-
<div class="gl-
|
|
62
|
+
<div class="gl-mr-3 gl-mt-4 gl-text-gray-600" data-testid="duo-chat-message-sources">
|
|
63
63
|
<span v-if="sources.length">{{ sourceLabel }}:</span>
|
|
64
64
|
|
|
65
|
-
<ul class="gl-
|
|
65
|
+
<ul class="gl-m-0 gl-list-none gl-p-0">
|
|
66
66
|
<li
|
|
67
67
|
v-for="(source, index) in sources"
|
|
68
68
|
:key="index"
|
|
69
|
-
class="gl-
|
|
69
|
+
class="gl-flex gl-items-center gl-pt-3"
|
|
70
70
|
data-testid="source-list-item"
|
|
71
71
|
>
|
|
72
72
|
<gl-icon
|
|
73
73
|
v-if="source.source_type"
|
|
74
74
|
:name="getSourceIcon(source.source_type)"
|
|
75
|
-
class="gl-flex-shrink-0
|
|
75
|
+
class="gl-mr-2 gl-flex-shrink-0"
|
|
76
76
|
/>
|
|
77
77
|
<gl-link :href="source.source_url">{{ getSourceTitle(source) }}</gl-link>
|
|
78
78
|
</li>
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
<div class="gl-text-right">
|
|
30
30
|
<div v-for="(prompt, index) in prompts" :key="`question-${index}`" class="gl-mt-3">
|
|
31
31
|
<gl-button category="secondary" variant="confirm" @click="handleClick(prompt)"
|
|
32
|
-
><span class="gl-
|
|
32
|
+
><span class="gl-whitespace-normal">{{ prompt }}</span></gl-button
|
|
33
33
|
>
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
@@ -423,19 +423,17 @@ export default {
|
|
|
423
423
|
<aside
|
|
424
424
|
v-if="!isHidden"
|
|
425
425
|
id="chat-component"
|
|
426
|
-
class="markdown-code-block duo-chat-drawer
|
|
426
|
+
class="markdown-code-block duo-chat-drawer duo-chat gl-border-t gl-border-l gl-bottom-0 gl-max-h-full gl-shadow-none"
|
|
427
427
|
role="complementary"
|
|
428
428
|
data-testid="chat-component"
|
|
429
429
|
>
|
|
430
430
|
<header
|
|
431
431
|
v-if="showHeader"
|
|
432
432
|
data-testid="chat-header"
|
|
433
|
-
class="duo-chat-drawer-header duo-chat-drawer-header-sticky gl-z-
|
|
433
|
+
class="duo-chat-drawer-header duo-chat-drawer-header-sticky gl-z-200 gl-border-b-0 !gl-p-0"
|
|
434
434
|
>
|
|
435
|
-
<div
|
|
436
|
-
class="
|
|
437
|
-
>
|
|
438
|
-
<h3 class="gl-my-0 gl-font-size-h2">{{ title }}</h3>
|
|
435
|
+
<div class="drawer-title gl-flex gl-items-center gl-justify-start gl-p-5">
|
|
436
|
+
<h3 class="gl-my-0 gl-text-size-h2">{{ title }}</h3>
|
|
439
437
|
<gl-experiment-badge
|
|
440
438
|
v-if="badgeType"
|
|
441
439
|
:help-page-url="badgeHelpPageUrl"
|
|
@@ -458,7 +456,7 @@ export default {
|
|
|
458
456
|
:dismissible="false"
|
|
459
457
|
variant="tip"
|
|
460
458
|
:show-icon="false"
|
|
461
|
-
class="gl-
|
|
459
|
+
class="legal-warning gl-border-t gl-max-w-full gl-bg-gray-50 gl-p-4 gl-text-center gl-text-gray-700"
|
|
462
460
|
role="alert"
|
|
463
461
|
data-testid="chat-legal-warning"
|
|
464
462
|
>{{ $options.i18n.CHAT_LEGAL_GENERATED_BY_AI }}</gl-alert
|
|
@@ -475,7 +473,7 @@ export default {
|
|
|
475
473
|
key="error"
|
|
476
474
|
:dismissible="false"
|
|
477
475
|
variant="danger"
|
|
478
|
-
class="gl-pl-9
|
|
476
|
+
class="!gl-pl-9"
|
|
479
477
|
role="alert"
|
|
480
478
|
data-testid="chat-error"
|
|
481
479
|
>
|
|
@@ -487,7 +485,7 @@ export default {
|
|
|
487
485
|
<transition-group
|
|
488
486
|
tag="section"
|
|
489
487
|
name="message"
|
|
490
|
-
class="duo-chat-history gl-
|
|
488
|
+
class="duo-chat-history gl-flex gl-flex-col gl-justify-end gl-bg-gray-10"
|
|
491
489
|
:class="[
|
|
492
490
|
{
|
|
493
491
|
'gl-h-full': !hasMessages,
|
|
@@ -512,7 +510,7 @@ export default {
|
|
|
512
510
|
:svg-height="145"
|
|
513
511
|
:title="emptyStateTitle"
|
|
514
512
|
:description="emptyStateDescription"
|
|
515
|
-
class="gl-flex-grow gl-justify-
|
|
513
|
+
class="gl-flex-grow gl-justify-center"
|
|
516
514
|
/>
|
|
517
515
|
<gl-duo-chat-predefined-prompts
|
|
518
516
|
key="predefined-prompts"
|
|
@@ -527,20 +525,20 @@ export default {
|
|
|
527
525
|
<footer
|
|
528
526
|
v-if="isChatAvailable"
|
|
529
527
|
data-testid="chat-footer"
|
|
530
|
-
class="duo-chat-drawer-footer duo-chat-drawer-footer-sticky gl-
|
|
528
|
+
class="duo-chat-drawer-footer duo-chat-drawer-footer-sticky gl-border-t gl-bg-gray-10 gl-p-5"
|
|
531
529
|
:class="{ 'duo-chat-drawer-body-scrim-on-footer': !scrolledToBottom }"
|
|
532
530
|
>
|
|
533
531
|
<gl-form data-testid="chat-prompt-form" @submit.stop.prevent="sendChatPrompt">
|
|
534
532
|
<gl-form-input-group>
|
|
535
533
|
<div
|
|
536
|
-
class="duo-chat-input gl-
|
|
534
|
+
class="duo-chat-input gl-min-h-8 gl-max-w-full gl-grow gl-rounded-base gl-bg-white gl-align-top gl-shadow-inner-1-gray-400"
|
|
537
535
|
:data-value="prompt"
|
|
538
536
|
>
|
|
539
537
|
<gl-card
|
|
540
538
|
v-if="shouldShowSlashCommands"
|
|
541
539
|
ref="commands"
|
|
542
|
-
class="slash-commands gl-translate-y-
|
|
543
|
-
body-class="gl-p-2
|
|
540
|
+
class="slash-commands !gl-absolute gl-w-full -gl-translate-y-full gl-list-none gl-pl-0 gl-shadow-md"
|
|
541
|
+
body-class="!gl-p-2"
|
|
544
542
|
>
|
|
545
543
|
<gl-dropdown-item
|
|
546
544
|
v-for="(command, index) in filteredSlashCommands"
|
|
@@ -549,9 +547,9 @@ export default {
|
|
|
549
547
|
@mouseenter.native="activeCommandIndex = index"
|
|
550
548
|
@click="selectSlashCommand(index)"
|
|
551
549
|
>
|
|
552
|
-
<span class="gl-
|
|
553
|
-
<span class="gl-
|
|
554
|
-
<small class="gl-
|
|
550
|
+
<span class="gl-flex gl-justify-between">
|
|
551
|
+
<span class="gl-block">{{ command.name }}</span>
|
|
552
|
+
<small class="gl-pl-3 gl-text-right gl-italic gl-text-gray-500">{{
|
|
555
553
|
command.description
|
|
556
554
|
}}</small>
|
|
557
555
|
</span>
|
|
@@ -562,8 +560,8 @@ export default {
|
|
|
562
560
|
ref="prompt"
|
|
563
561
|
v-model="prompt"
|
|
564
562
|
data-testid="chat-prompt-input"
|
|
565
|
-
class="gl-h-full
|
|
566
|
-
:class="{ 'gl-
|
|
563
|
+
class="gl-absolute !gl-h-full gl-rounded-br-none gl-rounded-tr-none !gl-bg-transparent !gl-py-4 !gl-shadow-none"
|
|
564
|
+
:class="{ 'gl-truncate': !prompt }"
|
|
567
565
|
:placeholder="inputPlaceholder"
|
|
568
566
|
autofocus
|
|
569
567
|
@keydown.enter.exact.native.prevent
|
|
@@ -577,7 +575,7 @@ export default {
|
|
|
577
575
|
icon="paper-airplane"
|
|
578
576
|
category="primary"
|
|
579
577
|
variant="confirm"
|
|
580
|
-
class="
|
|
578
|
+
class="!gl-absolute gl-bottom-2 gl-right-2 !gl-rounded-base"
|
|
581
579
|
type="submit"
|
|
582
580
|
data-testid="chat-prompt-submit-button"
|
|
583
581
|
:aria-label="$options.i18n.CHAT_SUBMIT_LABEL"
|
|
@@ -587,7 +585,7 @@ export default {
|
|
|
587
585
|
icon="stop"
|
|
588
586
|
category="primary"
|
|
589
587
|
variant="default"
|
|
590
|
-
class="
|
|
588
|
+
class="!gl-absolute gl-bottom-2 gl-right-2 !gl-rounded-base"
|
|
591
589
|
data-testid="chat-prompt-cancel-button"
|
|
592
590
|
:aria-label="$options.i18n.CHAT_CANCEL_LABEL"
|
|
593
591
|
@click="cancelPrompt"
|
|
@@ -595,7 +593,7 @@ export default {
|
|
|
595
593
|
</template>
|
|
596
594
|
</gl-form-input-group>
|
|
597
595
|
<gl-form-text
|
|
598
|
-
class="gl-
|
|
596
|
+
class="gl-mt-3 gl-leading-20 gl-text-gray-400"
|
|
599
597
|
data-testid="chat-legal-disclaimer"
|
|
600
598
|
>{{ $options.i18n.CHAT_LEGAL_DISCLAIMER }}</gl-form-text
|
|
601
599
|
>
|
|
@@ -61,14 +61,14 @@ export default {
|
|
|
61
61
|
</script>
|
|
62
62
|
|
|
63
63
|
<template>
|
|
64
|
-
<div class="gl-
|
|
64
|
+
<div class="gl-w-full gl-pt-4">
|
|
65
65
|
<div>
|
|
66
66
|
<gl-button
|
|
67
67
|
v-if="!feedbackReceived"
|
|
68
68
|
variant="link"
|
|
69
69
|
target="_blank"
|
|
70
70
|
:href="feedbackLinkUrl"
|
|
71
|
-
button-text-classes="gl-
|
|
71
|
+
button-text-classes="!gl-whitespace-normal gl-text-left"
|
|
72
72
|
@click="shouldRenderModal && $refs.feedbackModal.show()"
|
|
73
73
|
>{{ feedbackLinkText }}</gl-button
|
|
74
74
|
>
|
|
@@ -80,19 +80,19 @@ export default {
|
|
|
80
80
|
</script>
|
|
81
81
|
|
|
82
82
|
<template>
|
|
83
|
-
<gl-badge :id="triggerId" class="gl-mx-4 gl-
|
|
83
|
+
<gl-badge :id="triggerId" class="gl-mx-4 hover:gl-cursor-pointer" variant="neutral">
|
|
84
84
|
<span>{{ activeType.BADGE }}</span>
|
|
85
85
|
<gl-popover
|
|
86
86
|
triggers="click"
|
|
87
87
|
show-close-button
|
|
88
88
|
:placement="popoverPlacement"
|
|
89
89
|
:target="triggerId"
|
|
90
|
-
:css-classes="['gl-z-
|
|
90
|
+
:css-classes="['!gl-z-9999']"
|
|
91
91
|
:title="activeType.POPOVER_TITLE"
|
|
92
92
|
>
|
|
93
93
|
<gl-sprintf :message="activeType.POPOVER_CONTENT">
|
|
94
94
|
<template #link="{ content }">
|
|
95
|
-
<gl-link v-if="helpPageUrl" :href="helpPageUrl" target="_blank" class="gl-
|
|
95
|
+
<gl-link v-if="helpPageUrl" :href="helpPageUrl" target="_blank" class="!gl-text-sm">
|
|
96
96
|
{{ content }}
|
|
97
97
|
</gl-link>
|
|
98
98
|
<span v-else>{{ content }}</span>
|
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
</ul>
|
|
106
106
|
</template>
|
|
107
107
|
<template #line-break="{ content }">
|
|
108
|
-
<span class="gl-
|
|
108
|
+
<span class="gl-mb-0 gl-mt-5 gl-block">{{ content }}</span>
|
|
109
109
|
</template>
|
|
110
110
|
</gl-sprintf>
|
|
111
111
|
</gl-popover>
|
|
@@ -107,10 +107,7 @@ export default {
|
|
|
107
107
|
return Boolean(this.secondaryButtonLink && this.secondaryButtonText);
|
|
108
108
|
},
|
|
109
109
|
contentClasses() {
|
|
110
|
-
return [
|
|
111
|
-
this.compact ? 'gl-flex-grow-1 gl-flex-basis-0 gl-px-4' : 'gl-m-auto gl-p-5',
|
|
112
|
-
this.contentClass,
|
|
113
|
-
];
|
|
110
|
+
return [this.compact ? 'gl-grow gl-basis-0 gl-px-4' : 'gl-m-auto gl-p-5', this.contentClass];
|
|
114
111
|
},
|
|
115
112
|
},
|
|
116
113
|
};
|
|
@@ -118,15 +115,13 @@ export default {
|
|
|
118
115
|
|
|
119
116
|
<template>
|
|
120
117
|
<section
|
|
121
|
-
class="gl-
|
|
118
|
+
class="gl-flex"
|
|
122
119
|
:class="{
|
|
123
|
-
'gl-empty-state gl-
|
|
124
|
-
'gl-flex-
|
|
120
|
+
'gl-empty-state gl-flex-col gl-text-center': !compact,
|
|
121
|
+
'gl-flex-row': compact,
|
|
125
122
|
}"
|
|
126
123
|
>
|
|
127
|
-
<div
|
|
128
|
-
:class="{ 'gl-display-none gl-sm-display-block gl-px-4': compact, 'gl-max-w-full': !compact }"
|
|
129
|
-
>
|
|
124
|
+
<div :class="{ 'gl-hidden gl-px-4 sm:gl-block': compact, 'gl-max-w-full': !compact }">
|
|
130
125
|
<img
|
|
131
126
|
v-if="svgPath"
|
|
132
127
|
:src="svgPath"
|
|
@@ -147,13 +142,13 @@ export default {
|
|
|
147
142
|
-->
|
|
148
143
|
<slot ref="title" name="title">
|
|
149
144
|
<h1
|
|
150
|
-
class="gl-
|
|
145
|
+
class="gl-mb-0 gl-mt-0 gl-text-size-h-display gl-leading-36"
|
|
151
146
|
:class="compact ? 'h5' : 'h4'"
|
|
152
147
|
>
|
|
153
148
|
{{ title }}
|
|
154
149
|
</h1>
|
|
155
150
|
</slot>
|
|
156
|
-
<p v-if="description || $scopedSlots.description" ref="description" class="gl-
|
|
151
|
+
<p v-if="description || $scopedSlots.description" ref="description" class="gl-mb-0 gl-mt-4">
|
|
157
152
|
<!--
|
|
158
153
|
@slot Use this slot to customize the empty state's description
|
|
159
154
|
area. Overrides the `description` prop.
|
|
@@ -162,10 +157,7 @@ export default {
|
|
|
162
157
|
{{ description }}
|
|
163
158
|
</slot>
|
|
164
159
|
</p>
|
|
165
|
-
<div
|
|
166
|
-
class="gl-display-flex gl-flex-wrap gl-mt-5"
|
|
167
|
-
:class="{ 'gl-justify-content-center': !compact }"
|
|
168
|
-
>
|
|
160
|
+
<div class="gl-mt-5 gl-flex gl-flex-wrap" :class="{ 'gl-justify-center': !compact }">
|
|
169
161
|
<!--
|
|
170
162
|
@slot Use this slot to customize the empty state's actions area,
|
|
171
163
|
where the buttons are. Overrides button-related props:
|
|
@@ -184,7 +176,7 @@ export default {
|
|
|
184
176
|
<gl-button
|
|
185
177
|
v-if="shouldRenderSecondaryButton"
|
|
186
178
|
class="gl-mb-3 gl-mr-3"
|
|
187
|
-
:class="{ 'gl-mx-2
|
|
179
|
+
:class="{ '!gl-mx-2': !compact }"
|
|
188
180
|
:href="secondaryButtonLink"
|
|
189
181
|
>{{ secondaryButtonText }}
|
|
190
182
|
</gl-button>
|
|
@@ -82,9 +82,7 @@ export default {
|
|
|
82
82
|
class="gl-truncate-component"
|
|
83
83
|
:title="text"
|
|
84
84
|
>
|
|
85
|
-
<span ref="text" class="gl-truncate-start gl-text-
|
|
86
|
-
>‎{{ text }}‎</span
|
|
87
|
-
>
|
|
85
|
+
<span ref="text" class="gl-truncate-start !gl-text-ellipsis">‎{{ text }}‎</span>
|
|
88
86
|
</span>
|
|
89
87
|
|
|
90
88
|
<span
|
|
@@ -27,8 +27,8 @@ export default {
|
|
|
27
27
|
const contrastScore = getColorContrast('#fff', this.background).score > 4.5;
|
|
28
28
|
const textClass = contrastScore ? 'gl-text-white' : 'gl-text-gray-950';
|
|
29
29
|
const failClasses = contrastScore
|
|
30
|
-
? 'gl-
|
|
31
|
-
: 'gl-
|
|
30
|
+
? 'gl-shadow-inner-1-red-300 gl-text-red-300'
|
|
31
|
+
: 'gl-shadow-inner-1-red-500 gl-text-red-500';
|
|
32
32
|
return [isFail ? failClasses : textClass];
|
|
33
33
|
},
|
|
34
34
|
contrast() {
|
|
@@ -40,7 +40,7 @@ export default {
|
|
|
40
40
|
|
|
41
41
|
<template>
|
|
42
42
|
<code
|
|
43
|
-
class="gl-w-10 gl-
|
|
43
|
+
class="gl-w-10 gl-rounded-base gl-p-2 gl-text-center gl-text-xs"
|
|
44
44
|
:class="classes"
|
|
45
45
|
:style="{ backgroundColor: background }"
|
|
46
46
|
>
|
package/src/scss/storybook.scss
CHANGED
|
@@ -11,9 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
@import 'mixins';
|
|
13
13
|
@import 'utility-mixins/index';
|
|
14
|
-
@import 'utilities';
|
|
15
|
-
|
|
16
|
-
@tailwind utilities;
|
|
17
14
|
|
|
18
15
|
@import 'fonts';
|
|
19
16
|
|
|
@@ -28,3 +25,9 @@
|
|
|
28
25
|
padding-top: $gl-spacing-scale-2 !important;
|
|
29
26
|
padding-bottom: 0 !important;
|
|
30
27
|
}
|
|
28
|
+
|
|
29
|
+
// This imports the tailwind.css file.
|
|
30
|
+
// Note that adding `.css` here would break the inline import.
|
|
31
|
+
// These utilities are imported last, because that's
|
|
32
|
+
// what we do in GitLab as well.
|
|
33
|
+
@import 'tailwind';
|
package/src/scss/tailwind.css
CHANGED
|
@@ -51,22 +51,22 @@ export default {
|
|
|
51
51
|
|
|
52
52
|
<template>
|
|
53
53
|
<div :class="containerClass">
|
|
54
|
-
<ul class="gl-
|
|
54
|
+
<ul class="gl-m-0 gl-list-none gl-p-0">
|
|
55
55
|
<li
|
|
56
56
|
v-for="token in tokens"
|
|
57
57
|
:key="token.name"
|
|
58
|
-
class="gl-
|
|
58
|
+
class="gl-flex gl-flex-wrap gl-items-center gl-justify-between gl-gap-3 gl-p-3"
|
|
59
59
|
:class="getClasses(token.value)"
|
|
60
60
|
:style="getStyle(token.value)"
|
|
61
61
|
>
|
|
62
|
-
<code v-gl-tooltip :title="token.comment" class="gl-
|
|
62
|
+
<code v-gl-tooltip :title="token.comment" class="gl-text-inherit">
|
|
63
63
|
{{ getTokenName(token) }}
|
|
64
64
|
</code>
|
|
65
|
-
<div class="gl-
|
|
65
|
+
<div class="gl-flex gl-items-center gl-gap-3">
|
|
66
66
|
<gl-badge v-if="token.deprecated" v-gl-tooltip :title="token.comment" variant="danger">
|
|
67
67
|
Deprecated
|
|
68
68
|
</gl-badge>
|
|
69
|
-
<code class="gl-
|
|
69
|
+
<code class="gl-text-inherit">{{ token.value }}</code>
|
|
70
70
|
<gl-color-contrast
|
|
71
71
|
v-if="isHex(token.value)"
|
|
72
72
|
:foreground="token.value"
|
|
@@ -120,7 +120,7 @@ export default {
|
|
|
120
120
|
|
|
121
121
|
<template>
|
|
122
122
|
<div>
|
|
123
|
-
<div class="gl-
|
|
123
|
+
<div class="gl-mb-5 gl-flex gl-items-center gl-gap-3">
|
|
124
124
|
<gl-form-input v-model="filter" placeholder="Type to search" />
|
|
125
125
|
<gl-collapsible-listbox
|
|
126
126
|
id="component-listbox"
|
|
@@ -139,7 +139,7 @@ export default {
|
|
|
139
139
|
stacked="sm"
|
|
140
140
|
>
|
|
141
141
|
<template #cell(description)="{ item: { name, deprecated, description } }">
|
|
142
|
-
<code class="gl-
|
|
142
|
+
<code class="gl-text-base gl-text-strong">
|
|
143
143
|
{{ name }}
|
|
144
144
|
</code>
|
|
145
145
|
<gl-badge v-if="deprecated" variant="danger">Deprecated</gl-badge>
|
|
@@ -148,13 +148,13 @@ export default {
|
|
|
148
148
|
</div>
|
|
149
149
|
</template>
|
|
150
150
|
<template #cell(value)="{ item: { type, value, valueLabel } }">
|
|
151
|
-
<div class="gl-
|
|
151
|
+
<div class="gl-flex gl-items-center gl-gap-3">
|
|
152
152
|
<div
|
|
153
153
|
v-if="isColor(type)"
|
|
154
|
-
class="gl-
|
|
154
|
+
class="gl-h-5 gl-w-5 gl-rounded-base"
|
|
155
155
|
:style="{ 'background-color': value }"
|
|
156
156
|
></div>
|
|
157
|
-
<code class="gl-
|
|
157
|
+
<code class="gl-text-base gl-text-strong">{{ valueLabel }}</code>
|
|
158
158
|
</div>
|
|
159
159
|
</template>
|
|
160
160
|
</gl-table>
|
|
@@ -57,6 +57,5 @@ export const CHART_TYPE_BAR = 'bar';
|
|
|
57
57
|
export const CHART_TYPE_LINE = 'line';
|
|
58
58
|
|
|
59
59
|
// Constants for height "auto"
|
|
60
|
-
export const HEIGHT_AUTO_CLASSES =
|
|
61
|
-
|
|
62
|
-
export const HEIGHT_AUTO_HORIZONTAL_LAYOUT_CLASSES = 'gl-display-flex gl-h-full';
|
|
60
|
+
export const HEIGHT_AUTO_CLASSES = 'gl-chart-h-auto gl-flex gl-flex-col gl-h-full';
|
|
61
|
+
export const HEIGHT_AUTO_HORIZONTAL_LAYOUT_CLASSES = 'gl-flex gl-h-full';
|
package/tailwind.defaults.js
CHANGED
|
@@ -401,6 +401,7 @@ module.exports = {
|
|
|
401
401
|
'inner-1-gray-100': 'inset 0 0 0 1px var(--gray-100, #dcdcde)',
|
|
402
402
|
'inner-1-gray-200': 'inset 0 0 0 1px var(--gray-200, #bfbfc3)',
|
|
403
403
|
'inner-1-gray-400': 'inset 0 0 0 1px var(--gray-400, #89888d)',
|
|
404
|
+
'inner-1-red-300': 'inset 0 0 0 1px var(--red-300, #f57f6c)',
|
|
404
405
|
'inner-1-red-400': 'inset 0 0 0 1px var(--red-400, #ec5941)',
|
|
405
406
|
'inner-1-red-500': 'inset 0 0 0 1px var(--red-500, #dd2b0e)',
|
|
406
407
|
'inner-2-blue-400': 'inset 0 0 0 2px var(--blue-400, #428fdc)',
|