Commit 4cd5f06b authored by Sarah Groff Hennigh-Palermo's avatar Sarah Groff Hennigh-Palermo

Merge branch 'leipert-icons-vue_shared' into 'master'

Utilize GitLab UI icon component: vue_shared

See merge request gitlab-org/gitlab!40261
parents ae7ba34e 5f5cfab0
<script> <script>
import { GlTooltipDirective } from '@gitlab/ui'; import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import getCommitIconMap from '~/ide/commit_icon'; import getCommitIconMap from '~/ide/commit_icon';
import { __ } from '~/locale'; import { __ } from '~/locale';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -81,7 +80,7 @@ export default { ...@@ -81,7 +80,7 @@ export default {
:class="{ 'ml-auto': isCentered }" :class="{ 'ml-auto': isCentered }"
class="file-changed-icon d-inline-block" class="file-changed-icon d-inline-block"
> >
<icon v-if="showIcon" :name="changedIcon" :size="size" :class="changedIconClass" /> <gl-icon v-if="showIcon" :name="changedIcon" :size="size" :class="changedIconClass" />
</span> </span>
</template> </template>
......
<script> <script>
import Icon from './icon.vue'; import { GlIcon } from '@gitlab/ui';
/** /**
* Renders CI icon based on API response shared between all places where it is used. * Renders CI icon based on API response shared between all places where it is used.
...@@ -28,7 +28,7 @@ const validSizes = [8, 12, 16, 18, 24, 32, 48, 72]; ...@@ -28,7 +28,7 @@ const validSizes = [8, 12, 16, 18, 24, 32, 48, 72];
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
status: { status: {
...@@ -66,5 +66,5 @@ export default { ...@@ -66,5 +66,5 @@ export default {
}; };
</script> </script>
<template> <template>
<span :class="cssClass"> <icon :name="icon" :size="size" :class="cssClasses" /> </span> <span :class="cssClass"> <gl-icon :name="icon" :size="size" :class="cssClasses" /> </span>
</template> </template>
<script> <script>
import { isString, isEmpty } from 'lodash'; import { isString, isEmpty } from 'lodash';
import { GlTooltipDirective, GlLink } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue'; import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue';
import UserAvatarLink from './user_avatar/user_avatar_link.vue'; import UserAvatarLink from './user_avatar/user_avatar_link.vue';
import Icon from './icon.vue';
export default { export default {
directives: { directives: {
...@@ -12,14 +11,14 @@ export default { ...@@ -12,14 +11,14 @@ export default {
}, },
components: { components: {
UserAvatarLink, UserAvatarLink,
Icon, GlIcon,
GlLink, GlLink,
TooltipOnTruncate, TooltipOnTruncate,
}, },
props: { props: {
/** /**
* Indicates the existence of a tag. * Indicates the existence of a tag.
* Used to render the correct icon, if true will render `fa-tag` icon, * Used to render the correct GlIcon, if true will render `tag` GlIcon,
* if false will render a svg sprite fork icon * if false will render a svg sprite fork icon
*/ */
tag: { tag: {
...@@ -141,9 +140,9 @@ export default { ...@@ -141,9 +140,9 @@ export default {
<div class="branch-commit cgray"> <div class="branch-commit cgray">
<template v-if="shouldShowRefInfo"> <template v-if="shouldShowRefInfo">
<div class="icon-container"> <div class="icon-container">
<icon v-if="tag" name="tag" /> <gl-icon v-if="tag" name="tag" />
<icon v-else-if="mergeRequestRef" name="git-merge" /> <gl-icon v-else-if="mergeRequestRef" name="git-merge" />
<icon v-else name="branch" /> <gl-icon v-else name="branch" />
</div> </div>
<gl-link <gl-link
...@@ -163,7 +162,7 @@ export default { ...@@ -163,7 +162,7 @@ export default {
>{{ commitRef.name }}</gl-link >{{ commitRef.name }}</gl-link
> >
</template> </template>
<icon name="commit" class="commit-icon js-commit-icon" /> <gl-icon name="commit" class="commit-icon js-commit-icon" />
<gl-link :href="commitUrl" class="commit-sha mr-0">{{ shortSha }}</gl-link> <gl-link :href="commitUrl" class="commit-sha mr-0">{{ shortSha }}</gl-link>
......
<script> <script>
import { GlLink } from '@gitlab/ui'; import { GlLink, GlIcon } from '@gitlab/ui';
import Icon from '../../icon.vue';
import { numberToHumanSize } from '../../../../lib/utils/number_utils'; import { numberToHumanSize } from '../../../../lib/utils/number_utils';
export default { export default {
components: { components: {
GlLink, GlLink,
Icon, GlIcon,
}, },
props: { props: {
path: { path: {
...@@ -52,7 +51,7 @@ export default { ...@@ -52,7 +51,7 @@ export default {
:download="fileName" :download="fileName"
target="_blank" target="_blank"
> >
<icon :size="16" name="download" class="float-left gl-mr-3" /> <gl-icon :size="16" name="download" class="float-left gl-mr-3" />
{{ __('Download') }} {{ __('Download') }}
</gl-link> </gl-link>
</div> </div>
......
<script> <script>
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import Icon from './icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
GlDeprecatedButton, GlDeprecatedButton,
}, },
props: { props: {
...@@ -73,7 +72,7 @@ export default { ...@@ -73,7 +72,7 @@ export default {
data-display="static" data-display="static"
data-toggle="dropdown" data-toggle="dropdown"
> >
<icon name="chevron-down" :aria-label="__('toggle dropdown')" /> <gl-icon name="chevron-down" :aria-label="__('toggle dropdown')" />
</button> </button>
<ul :class="dropdownClass" class="dropdown-menu dropdown-open-top"> <ul :class="dropdownClass" class="dropdown-menu dropdown-open-top">
<template v-for="(action, index) in actions"> <template v-for="(action, index) in actions">
......
<script> <script>
import fuzzaldrinPlus from 'fuzzaldrin-plus'; import fuzzaldrinPlus from 'fuzzaldrin-plus';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import FileIcon from '../file_icon.vue'; import FileIcon from '../file_icon.vue';
import ChangedFileIcon from '../changed_file_icon.vue'; import ChangedFileIcon from '../changed_file_icon.vue';
...@@ -8,7 +8,7 @@ const MAX_PATH_LENGTH = 60; ...@@ -8,7 +8,7 @@ const MAX_PATH_LENGTH = 60;
export default { export default {
components: { components: {
Icon, GlIcon,
ChangedFileIcon, ChangedFileIcon,
FileIcon, FileIcon,
}, },
...@@ -103,10 +103,10 @@ export default { ...@@ -103,10 +103,10 @@ export default {
<span v-if="file.changed || file.tempFile" v-once class="diff-changed-stats"> <span v-if="file.changed || file.tempFile" v-once class="diff-changed-stats">
<span v-if="showDiffStats"> <span v-if="showDiffStats">
<span class="cgreen bold"> <span class="cgreen bold">
<icon name="file-addition" class="align-text-top" /> {{ file.addedLines }} <gl-icon name="file-addition" class="align-text-top" /> {{ file.addedLines }}
</span> </span>
<span class="cred bold ml-1"> <span class="cred bold ml-1">
<icon name="file-deletion" class="align-text-top" /> {{ file.removedLines }} <gl-icon name="file-deletion" class="align-text-top" /> {{ file.removedLines }}
</span> </span>
</span> </span>
<changed-file-icon v-else :file="file" /> <changed-file-icon v-else :file="file" />
......
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
/** /**
* Renders a split dropdown with * Renders a split dropdown with
* an input that allows to search through the given * an input that allows to search through the given
...@@ -14,7 +13,7 @@ import Icon from '~/vue_shared/components/icon.vue'; ...@@ -14,7 +13,7 @@ import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
name: 'FilteredSearchDropdown', name: 'FilteredSearchDropdown',
components: { components: {
Icon, GlIcon,
GlDeprecatedButton, GlDeprecatedButton,
}, },
props: { props: {
...@@ -117,7 +116,7 @@ export default { ...@@ -117,7 +116,7 @@ export default {
aria-expanded="false" aria-expanded="false"
:aria-label="__('Expand dropdown')" :aria-label="__('Expand dropdown')"
> >
<icon name="angle-down" :size="12" /> <gl-icon name="angle-down" :size="12" />
</button> </button>
<div class="dropdown-menu dropdown-menu-right"> <div class="dropdown-menu dropdown-menu-right">
<div class="dropdown-input"> <div class="dropdown-input">
...@@ -128,7 +127,7 @@ export default { ...@@ -128,7 +127,7 @@ export default {
:placeholder="__('Filter')" :placeholder="__('Filter')"
class="js-filtered-dropdown-input dropdown-input-field" class="js-filtered-dropdown-input dropdown-input-field"
/> />
<icon class="dropdown-input-search" name="search" /> <gl-icon class="dropdown-input-search" name="search" />
</div> </div>
<div class="dropdown-content"> <div class="dropdown-content">
......
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import { inserted } from '~/feature_highlight/feature_highlight_helper'; import { inserted } from '~/feature_highlight/feature_highlight_helper';
import { mouseenter, debouncedMouseleave, togglePopover } from '~/shared/popover'; import { mouseenter, debouncedMouseleave, togglePopover } from '~/shared/popover';
...@@ -11,7 +11,7 @@ import { mouseenter, debouncedMouseleave, togglePopover } from '~/shared/popover ...@@ -11,7 +11,7 @@ import { mouseenter, debouncedMouseleave, togglePopover } from '~/shared/popover
export default { export default {
name: 'HelpPopover', name: 'HelpPopover',
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
options: { options: {
...@@ -44,6 +44,6 @@ export default { ...@@ -44,6 +44,6 @@ export default {
</script> </script>
<template> <template>
<button type="button" class="btn btn-blank btn-transparent btn-help" tabindex="0"> <button type="button" class="btn btn-blank btn-transparent btn-help" tabindex="0">
<icon name="question" /> <gl-icon name="question" />
</button> </button>
</template> </template>
<script> <script>
import { GlTooltip } from '@gitlab/ui'; import { GlTooltip, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
import { timeFor, parsePikadayDate, dateInWords } from '~/lib/utils/datetime_utility'; import { timeFor, parsePikadayDate, dateInWords } from '~/lib/utils/datetime_utility';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
GlTooltip, GlTooltip,
}, },
mixins: [timeagoMixin], mixins: [timeagoMixin],
...@@ -73,7 +72,7 @@ export default { ...@@ -73,7 +72,7 @@ export default {
</script> </script>
<template> <template>
<div ref="milestoneDetails" class="issue-milestone-details"> <div ref="milestoneDetails" class="issue-milestone-details">
<icon :size="16" class="gl-mr-2" name="clock" /> <gl-icon :size="16" class="gl-mr-2" name="clock" />
<span class="milestone-title d-inline-block">{{ milestone.title }}</span> <span class="milestone-title d-inline-block">{{ milestone.title }}</span>
<gl-tooltip :target="() => $refs.milestoneDetails" placement="bottom" class="js-item-milestone"> <gl-tooltip :target="() => $refs.milestoneDetails" placement="bottom" class="js-item-milestone">
<span class="bold">{{ __('Milestone') }}</span> <br /> <span class="bold">{{ __('Milestone') }}</span> <br />
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
import $ from 'jquery'; import $ from 'jquery';
import '~/behaviors/markdown/render_gfm'; import '~/behaviors/markdown/render_gfm';
import { unescape } from 'lodash'; import { unescape } from 'lodash';
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import { stripHtml } from '~/lib/utils/text_utility'; import { stripHtml } from '~/lib/utils/text_utility';
import { deprecatedCreateFlash as Flash } from '~/flash'; import { deprecatedCreateFlash as Flash } from '~/flash';
import GLForm from '~/gl_form'; import GLForm from '~/gl_form';
import MarkdownHeader from './header.vue'; import MarkdownHeader from './header.vue';
import MarkdownToolbar from './toolbar.vue'; import MarkdownToolbar from './toolbar.vue';
import Icon from '../icon.vue';
import GlMentions from '~/vue_shared/components/gl_mentions.vue'; import GlMentions from '~/vue_shared/components/gl_mentions.vue';
import Suggestions from '~/vue_shared/components/markdown/suggestions.vue'; import Suggestions from '~/vue_shared/components/markdown/suggestions.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
GlMentions, GlMentions,
MarkdownHeader, MarkdownHeader,
MarkdownToolbar, MarkdownToolbar,
Icon, GlIcon,
Suggestions, Suggestions,
}, },
mixins: [glFeatureFlagsMixin()], mixins: [glFeatureFlagsMixin()],
...@@ -254,7 +254,7 @@ export default { ...@@ -254,7 +254,7 @@ export default {
href="#" href="#"
:aria-label="__('Leave zen mode')" :aria-label="__('Leave zen mode')"
> >
<icon :size="16" name="minimize" /> <gl-icon :size="16" name="minimize" />
</a> </a>
<markdown-toolbar <markdown-toolbar
:markdown-docs-path="markdownDocsPath" :markdown-docs-path="markdownDocsPath"
......
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import { GlPopover, GlButton, GlTooltipDirective } from '@gitlab/ui'; import { GlPopover, GlButton, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { getSelectedFragment } from '~/lib/utils/common_utils'; import { getSelectedFragment } from '~/lib/utils/common_utils';
import { CopyAsGFM } from '../../../behaviors/markdown/copy_as_gfm'; import { CopyAsGFM } from '../../../behaviors/markdown/copy_as_gfm';
import ToolbarButton from './toolbar_button.vue'; import ToolbarButton from './toolbar_button.vue';
import Icon from '../icon.vue';
export default { export default {
components: { components: {
ToolbarButton, ToolbarButton,
Icon, GlIcon,
GlPopover, GlPopover,
GlButton, GlButton,
}, },
...@@ -221,7 +220,7 @@ export default { ...@@ -221,7 +220,7 @@ export default {
:title="__('Go full screen')" :title="__('Go full screen')"
type="button" type="button"
> >
<icon name="maximize" /> <gl-icon name="maximize" />
</button> </button>
</div> </div>
</li> </li>
......
<script> <script>
import { GlDeprecatedButton, GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui'; import { GlDeprecatedButton, GlLoadingIcon, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { __ } from '~/locale'; import { __ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
export default { export default {
components: { Icon, GlDeprecatedButton, GlLoadingIcon }, components: { GlIcon, GlDeprecatedButton, GlLoadingIcon },
directives: { 'gl-tooltip': GlTooltipDirective }, directives: { 'gl-tooltip': GlTooltipDirective },
mixins: [glFeatureFlagsMixin()], mixins: [glFeatureFlagsMixin()],
props: { props: {
...@@ -97,7 +96,7 @@ export default { ...@@ -97,7 +96,7 @@ export default {
<div class="qa-suggestion-diff-header js-suggestion-diff-header font-weight-bold"> <div class="qa-suggestion-diff-header js-suggestion-diff-header font-weight-bold">
{{ __('Suggested change') }} {{ __('Suggested change') }}
<a v-if="helpPagePath" :href="helpPagePath" :aria-label="__('Help')" class="js-help-btn"> <a v-if="helpPagePath" :href="helpPagePath" :aria-label="__('Help')" class="js-help-btn">
<icon name="question-o" css-classes="link-highlight" /> <gl-icon name="question-o" css-classes="link-highlight" />
</a> </a>
</div> </div>
<div v-if="isApplied" class="badge badge-success">{{ __('Applied') }}</div> <div v-if="isApplied" class="badge badge-success">{{ __('Applied') }}</div>
......
<script> <script>
import { GlTooltipDirective } from '@gitlab/ui'; import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import Icon from '../icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -67,6 +66,6 @@ export default { ...@@ -67,6 +66,6 @@ export default {
data-container="body" data-container="body"
@click="() => $emit('click')" @click="() => $emit('click')"
> >
<icon :name="icon" /> <gl-icon :name="icon" />
</button> </button>
</template> </template>
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import { GlDeprecatedButton, GlTooltipDirective } from '@gitlab/ui'; import { GlDeprecatedButton, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import Clipboard from 'clipboard'; import Clipboard from 'clipboard';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlDeprecatedButton, GlDeprecatedButton,
Icon, GlIcon,
}, },
directives: { directives: {
...@@ -121,7 +120,7 @@ export default { ...@@ -121,7 +120,7 @@ export default {
:title="title" :title="title"
> >
<slot> <slot>
<icon name="copy-to-clipboard" /> <gl-icon name="copy-to-clipboard" />
</slot> </slot>
</gl-deprecated-button> </gl-deprecated-button>
</template> </template>
<script> <script>
import { GlLink } from '@gitlab/ui'; import { GlLink, GlIcon } from '@gitlab/ui';
import { escape } from 'lodash'; import { escape } from 'lodash';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import icon from '../icon.vue';
function buildDocsLinkStart(path) { function buildDocsLinkStart(path) {
return `<a href="${escape(path)}" target="_blank" rel="noopener noreferrer">`; return `<a href="${escape(path)}" target="_blank" rel="noopener noreferrer">`;
...@@ -16,7 +15,7 @@ const NoteableTypeText = { ...@@ -16,7 +15,7 @@ const NoteableTypeText = {
export default { export default {
components: { components: {
icon, GlIcon,
GlLink, GlLink,
}, },
props: { props: {
...@@ -89,7 +88,7 @@ export default { ...@@ -89,7 +88,7 @@ export default {
</script> </script>
<template> <template>
<div class="issuable-note-warning"> <div class="issuable-note-warning">
<icon v-if="!isLockedAndConfidential" :name="warningIcon" :size="16" class="icon inline" /> <gl-icon v-if="!isLockedAndConfidential" :name="warningIcon" :size="16" class="icon inline" />
<span v-if="isLockedAndConfidential" ref="lockedAndConfidential"> <span v-if="isLockedAndConfidential" ref="lockedAndConfidential">
<span v-html="confidentialAndLockedDiscussionText"></span> <span v-html="confidentialAndLockedDiscussionText"></span>
......
...@@ -18,10 +18,9 @@ ...@@ -18,10 +18,9 @@
*/ */
import $ from 'jquery'; import $ from 'jquery';
import { mapGetters, mapActions, mapState } from 'vuex'; import { mapGetters, mapActions, mapState } from 'vuex';
import { GlDeprecatedButton, GlSkeletonLoading, GlTooltipDirective } from '@gitlab/ui'; import { GlDeprecatedButton, GlSkeletonLoading, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import descriptionVersionHistoryMixin from 'ee_else_ce/notes/mixins/description_version_history'; import descriptionVersionHistoryMixin from 'ee_else_ce/notes/mixins/description_version_history';
import noteHeader from '~/notes/components/note_header.vue'; import noteHeader from '~/notes/components/note_header.vue';
import Icon from '~/vue_shared/components/icon.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import TimelineEntryItem from './timeline_entry_item.vue'; import TimelineEntryItem from './timeline_entry_item.vue';
import { spriteIcon } from '../../../lib/utils/common_utils'; import { spriteIcon } from '../../../lib/utils/common_utils';
...@@ -32,7 +31,7 @@ const MAX_VISIBLE_COMMIT_LIST_COUNT = 3; ...@@ -32,7 +31,7 @@ const MAX_VISIBLE_COMMIT_LIST_COUNT = 3;
export default { export default {
name: 'SystemNote', name: 'SystemNote',
components: { components: {
Icon, GlIcon,
noteHeader, noteHeader,
TimelineEntryItem, TimelineEntryItem,
GlDeprecatedButton, GlDeprecatedButton,
...@@ -109,7 +108,7 @@ export default { ...@@ -109,7 +108,7 @@ export default {
&middot; &middot;
<button type="button" class="btn-blank btn-link" @click="toggleDescriptionVersion"> <button type="button" class="btn-blank btn-link" @click="toggleDescriptionVersion">
{{ __('Compare with previous version') }} {{ __('Compare with previous version') }}
<icon :name="descriptionVersionToggleIcon" :size="12" class="append-left-5" /> <gl-icon :name="descriptionVersionToggleIcon" :size="12" class="append-left-5" />
</button> </button>
</template> </template>
</note-header> </note-header>
...@@ -122,7 +121,7 @@ export default { ...@@ -122,7 +121,7 @@ export default {
></div> ></div>
<div v-if="hasMoreCommits" class="flex-list"> <div v-if="hasMoreCommits" class="flex-list">
<div class="system-note-commit-list-toggler flex-row" @click="expanded = !expanded"> <div class="system-note-commit-list-toggler flex-row" @click="expanded = !expanded">
<icon :name="toggleIcon" :size="8" class="gl-mr-2" /> <gl-icon :name="toggleIcon" :size="8" class="gl-mr-2" />
<span>{{ __('Toggle commit list') }}</span> <span>{{ __('Toggle commit list') }}</span>
</div> </div>
</div> </div>
...@@ -139,7 +138,7 @@ export default { ...@@ -139,7 +138,7 @@ export default {
class="btn-transparent delete-description-history" class="btn-transparent delete-description-history"
@click="deleteDescriptionVersion" @click="deleteDescriptionVersion"
> >
<icon name="remove" /> <gl-icon name="remove" />
</gl-deprecated-button> </gl-deprecated-button>
</div> </div>
</div> </div>
......
<script> <script>
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { isString } from 'lodash'; import { isString } from 'lodash';
import Icon from '~/vue_shared/components/icon.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
import highlight from '~/lib/utils/highlight'; import highlight from '~/lib/utils/highlight';
import { truncateNamespace } from '~/lib/utils/text_utility'; import { truncateNamespace } from '~/lib/utils/text_utility';
export default { export default {
name: 'ProjectListItem', name: 'ProjectListItem',
components: { Icon, ProjectAvatar, GlDeprecatedButton }, components: { GlIcon, ProjectAvatar, GlDeprecatedButton },
props: { props: {
project: { project: {
type: Object, type: Object,
...@@ -44,7 +43,7 @@ export default { ...@@ -44,7 +43,7 @@ export default {
class="d-flex align-items-center btn pt-1 pb-1 border-0 project-list-item" class="d-flex align-items-center btn pt-1 pb-1 border-0 project-list-item"
@click="onClick" @click="onClick"
> >
<icon <gl-icon
class="gl-ml-3 gl-mr-3 flex-shrink-0 position-top-0 js-selected-icon" class="gl-ml-3 gl-mr-3 flex-shrink-0 position-top-0 js-selected-icon"
:class="{ 'js-selected visible': selected, 'js-unselected invisible': !selected }" :class="{ 'js-selected visible': selected, 'js-unselected invisible': !selected }"
name="mobile-issue-close" name="mobile-issue-close"
......
<script> <script>
import { GlPopover, GlSkeletonLoading } from '@gitlab/ui'; import { GlPopover, GlSkeletonLoading, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import UserAvatarImage from '../user_avatar/user_avatar_image.vue'; import UserAvatarImage from '../user_avatar/user_avatar_image.vue';
import { glEmojiTag } from '../../../emoji'; import { glEmojiTag } from '../../../emoji';
...@@ -10,7 +9,7 @@ export default { ...@@ -10,7 +9,7 @@ export default {
name: 'UserPopover', name: 'UserPopover',
maxSkeletonLines: MAX_SKELETON_LINES, maxSkeletonLines: MAX_SKELETON_LINES,
components: { components: {
Icon, GlIcon,
GlPopover, GlPopover,
GlSkeletonLoading, GlSkeletonLoading,
UserAvatarImage, UserAvatarImage,
...@@ -74,16 +73,16 @@ export default { ...@@ -74,16 +73,16 @@ export default {
</div> </div>
<div class="gl-text-gray-500"> <div class="gl-text-gray-500">
<div v-if="user.bio" class="gl-display-flex gl-mb-2"> <div v-if="user.bio" class="gl-display-flex gl-mb-2">
<icon name="profile" class="gl-text-gray-400 gl-flex-shrink-0" /> <gl-icon name="profile" class="gl-text-gray-400 gl-flex-shrink-0" />
<span ref="bio" class="gl-ml-2" v-html="user.bioHtml"></span> <span ref="bio" class="gl-ml-2" v-html="user.bioHtml"></span>
</div> </div>
<div v-if="user.workInformation" class="gl-display-flex gl-mb-2"> <div v-if="user.workInformation" class="gl-display-flex gl-mb-2">
<icon name="work" class="gl-text-gray-400 gl-flex-shrink-0" /> <gl-icon name="work" class="gl-text-gray-400 gl-flex-shrink-0" />
<span ref="workInformation" class="gl-ml-2">{{ user.workInformation }}</span> <span ref="workInformation" class="gl-ml-2">{{ user.workInformation }}</span>
</div> </div>
</div> </div>
<div v-if="user.location" class="js-location gl-text-gray-500 gl-display-flex"> <div v-if="user.location" class="js-location gl-text-gray-500 gl-display-flex">
<icon name="location" class="gl-text-gray-400 flex-shrink-0" /> <gl-icon name="location" class="gl-text-gray-400 flex-shrink-0" />
<span class="gl-ml-2">{{ user.location }}</span> <span class="gl-ml-2">{{ user.location }}</span>
</div> </div>
<div v-if="statusHtml" class="js-user-status gl-mt-3"> <div v-if="statusHtml" class="js-user-status gl-mt-3">
......
<script> <script>
import { uniqueId } from 'lodash'; import { uniqueId } from 'lodash';
import { GlSkeletonLoader } from '@gitlab/ui'; import { GlSkeletonLoader, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import accordionEventBus from './accordion_event_bus'; import accordionEventBus from './accordion_event_bus';
...@@ -11,7 +9,7 @@ const accordionItemUniqueId = name => uniqueId(`gl-accordion-item-${name}-`); ...@@ -11,7 +9,7 @@ const accordionItemUniqueId = name => uniqueId(`gl-accordion-item-${name}-`);
export default { export default {
components: { components: {
GlSkeletonLoader, GlSkeletonLoader,
Icon, GlIcon,
}, },
props: { props: {
accordionId: { accordionId: {
...@@ -107,7 +105,7 @@ export default { ...@@ -107,7 +105,7 @@ export default {
class="d-flex align-items-center p-2" class="d-flex align-items-center p-2"
:class="{ 'list-group-item-action': !isDisabled }" :class="{ 'list-group-item-action': !isDisabled }"
> >
<icon <gl-icon
:size="16" :size="16"
class="mr-2 gl-text-gray-900" class="mr-2 gl-text-gray-900"
:name="isExpanded ? 'angle-down' : 'angle-right'" :name="isExpanded ? 'angle-down' : 'angle-right'"
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { sprintf, s__ } from '~/locale'; import { sprintf, s__ } from '~/locale';
import icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
export default { export default {
...@@ -8,7 +8,7 @@ export default { ...@@ -8,7 +8,7 @@ export default {
tooltip, tooltip,
}, },
components: { components: {
icon, GlIcon,
}, },
props: { props: {
triggeredBy: { triggeredBy: {
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
}" }"
class="linked-pipeline-mini-list inline-block" class="linked-pipeline-mini-list inline-block"
> >
<icon v-if="isDownstream" class="arrow-icon" name="long-arrow" /> <gl-icon v-if="isDownstream" class="arrow-icon" name="long-arrow" />
<a <a
v-for="pipeline in linkedPipelinesTrimmed" v-for="pipeline in linkedPipelinesTrimmed"
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
data-placement="top" data-placement="top"
data-container="body" data-container="body"
> >
<icon :name="getStatusIcon(pipeline.details.status.icon)" /> <gl-icon :name="getStatusIcon(pipeline.details.status.icon)" />
</a> </a>
<a <a
...@@ -114,6 +114,6 @@ export default { ...@@ -114,6 +114,6 @@ export default {
{{ counterLabel }} {{ counterLabel }}
</a> </a>
<icon v-if="isUpstream" class="arrow-icon" name="long-arrow" /> <gl-icon v-if="isUpstream" class="arrow-icon" name="long-arrow" />
</span> </span>
</template> </template>
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
selectedEpicTitle: { selectedEpicTitle: {
...@@ -34,6 +34,6 @@ export default { ...@@ -34,6 +34,6 @@ export default {
data-toggle="dropdown" data-toggle="dropdown"
> >
<span class="dropdown-toggle-text" :class="toggleTextClass">{{ buttonText }}</span> <span class="dropdown-toggle-text" :class="toggleTextClass">{{ buttonText }}</span>
<icon name="chevron-down" class="dropdown-menu-toggle-icon" /> <gl-icon name="chevron-down" class="dropdown-menu-toggle-icon" />
</button> </button>
</template> </template>
<script> <script>
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlDeprecatedButton, GlDeprecatedButton,
Icon, GlIcon,
}, },
}; };
</script> </script>
...@@ -19,7 +17,7 @@ export default { ...@@ -19,7 +17,7 @@ export default {
variant="link" variant="link"
class="dropdown-title-button dropdown-menu-close" class="dropdown-title-button dropdown-menu-close"
> >
<icon name="close" /> <gl-icon name="close" />
</gl-deprecated-button> </gl-deprecated-button>
</div> </div>
</template> </template>
<script> <script>
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import autofocusonshow from '~/vue_shared/directives/autofocusonshow'; import autofocusonshow from '~/vue_shared/directives/autofocusonshow';
export default { export default {
components: { components: {
GlDeprecatedButton, GlDeprecatedButton,
Icon, GlIcon,
}, },
directives: { directives: {
autofocusonshow, autofocusonshow,
...@@ -41,7 +39,7 @@ export default { ...@@ -41,7 +39,7 @@ export default {
type="search" type="search"
@keyup="handleKeyUp" @keyup="handleKeyUp"
/> />
<icon v-show="!query" name="search" /> <gl-icon v-show="!query" name="search" />
<gl-deprecated-button <gl-deprecated-button
variant="link" variant="link"
class="fa fa-times dropdown-input-clear js-dropdown-input-clear" class="fa fa-times dropdown-input-clear js-dropdown-input-clear"
......
<script> <script>
import { GlTooltipDirective } from '@gitlab/ui'; import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -24,7 +23,7 @@ export default { ...@@ -24,7 +23,7 @@ export default {
:title="epic.title" :title="epic.title"
class="sidebar-collapsed-icon" class="sidebar-collapsed-icon"
> >
<icon name="epic" /> <gl-icon name="epic" />
<span class="collapse-truncated-title mt-1">{{ epic.title }}</span> <span class="collapse-truncated-title mt-1">{{ epic.title }}</span>
</div> </div>
</template> </template>
<script> <script>
import { escape } from 'lodash'; import { escape } from 'lodash';
import { GlIcon } from '@gitlab/ui';
import { __, n__, sprintf } from '~/locale'; import { __, n__, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
count: { count: {
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
<template> <template>
<div class="dashboard-card-alert row"> <div class="dashboard-card-alert row">
<div class="col-12"> <div class="col-12">
<icon <gl-icon
:class="alertClasses" :class="alertClasses"
class="align-text-bottom js-dashboard-alerts-icon" class="align-text-bottom js-dashboard-alerts-icon"
name="warning" name="warning"
......
<script> <script>
import { GlLink, GlTooltip } from '@gitlab/ui'; import { GlLink, GlTooltip, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import CiBadgeLink from '~/vue_shared/components/ci_badge_link.vue'; import CiBadgeLink from '~/vue_shared/components/ci_badge_link.vue';
import CiIcon from '~/vue_shared/components/ci_icon.vue'; import CiIcon from '~/vue_shared/components/ci_icon.vue';
import Icon from '~/vue_shared/components/icon.vue';
import { STATUS_FAILED } from '../constants'; import { STATUS_FAILED } from '../constants';
export default { export default {
components: { components: {
CiBadgeLink, CiBadgeLink,
CiIcon, CiIcon,
Icon, GlIcon,
GlLink, GlLink,
GlTooltip, GlTooltip,
}, },
...@@ -112,7 +111,7 @@ export default { ...@@ -112,7 +111,7 @@ export default {
<div class="text-tertiary">{{ upstreamPipeline.project.full_name }}</div> <div class="text-tertiary">{{ upstreamPipeline.project.full_name }}</div>
</gl-tooltip> </gl-tooltip>
<icon name="arrow-right" class="dashboard-card-footer-arrow align-middle mx-1" /> <gl-icon name="arrow-right" class="dashboard-card-footer-arrow align-middle mx-1" />
</template> </template>
<ci-badge-link <ci-badge-link
...@@ -127,7 +126,7 @@ export default { ...@@ -127,7 +126,7 @@ export default {
</gl-tooltip> </gl-tooltip>
<template v-if="hasDownstreamPipelines"> <template v-if="hasDownstreamPipelines">
<icon name="arrow-right" class="dashboard-card-footer-arrow align-middle mx-1" /> <gl-icon name="arrow-right" class="dashboard-card-footer-arrow align-middle mx-1" />
<div <div
v-for="(pipeline, index) in shownDownstreamPipelines" v-for="(pipeline, index) in shownDownstreamPipelines"
......
<script> <script>
import { GlTooltip } from '@gitlab/ui'; import { GlTooltip, GlIcon } from '@gitlab/ui';
import timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlTooltip, GlTooltip,
Icon, GlIcon,
}, },
mixins: [timeagoMixin], mixins: [timeagoMixin],
...@@ -33,7 +32,7 @@ export default { ...@@ -33,7 +32,7 @@ export default {
</script> </script>
<template> <template>
<div class="text-secondary"> <div class="text-secondary">
<icon <gl-icon
name="clock" name="clock"
class="dashboard-card-icon align-text-bottom js-dashboard-project-clock-icon" class="dashboard-card-icon align-text-bottom js-dashboard-project-clock-icon"
/> />
......
<script> <script>
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { GlDeprecatedDropdown, GlDeprecatedDropdownItem, GlLoadingIcon } from '@gitlab/ui'; import { GlDeprecatedDropdown, GlDeprecatedDropdownItem, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { getIssueStatusFromLicenseStatus } from 'ee/vue_shared/license_compliance/store/utils'; import { getIssueStatusFromLicenseStatus } from 'ee/vue_shared/license_compliance/store/utils';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants'; import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import IssueStatusIcon from '~/reports/components/issue_status_icon.vue'; import IssueStatusIcon from '~/reports/components/issue_status_icon.vue';
import { LICENSE_APPROVAL_STATUS, LICENSE_APPROVAL_ACTION } from '../constants'; import { LICENSE_APPROVAL_STATUS, LICENSE_APPROVAL_ACTION } from '../constants';
...@@ -18,7 +17,7 @@ export default { ...@@ -18,7 +17,7 @@ export default {
GlDeprecatedDropdown, GlDeprecatedDropdown,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
GlLoadingIcon, GlLoadingIcon,
Icon, GlIcon,
IssueStatusIcon, IssueStatusIcon,
}, },
props: { props: {
...@@ -78,11 +77,11 @@ export default { ...@@ -78,11 +77,11 @@ export default {
right right
> >
<gl-deprecated-dropdown-item @click="allowLicense(license)"> <gl-deprecated-dropdown-item @click="allowLicense(license)">
<icon :class="approveIconClass" name="mobile-issue-close" /> <gl-icon :class="approveIconClass" name="mobile-issue-close" />
{{ $options[$options.LICENSE_APPROVAL_ACTION.ALLOW] }} {{ $options[$options.LICENSE_APPROVAL_ACTION.ALLOW] }}
</gl-deprecated-dropdown-item> </gl-deprecated-dropdown-item>
<gl-deprecated-dropdown-item @click="denyLicense(license)"> <gl-deprecated-dropdown-item @click="denyLicense(license)">
<icon :class="blacklistIconClass" name="mobile-issue-close" /> <gl-icon :class="blacklistIconClass" name="mobile-issue-close" />
{{ $options[$options.LICENSE_APPROVAL_ACTION.DENY] }} {{ $options[$options.LICENSE_APPROVAL_ACTION.DENY] }}
</gl-deprecated-dropdown-item> </gl-deprecated-dropdown-item>
</gl-deprecated-dropdown> </gl-deprecated-dropdown>
...@@ -94,7 +93,7 @@ export default { ...@@ -94,7 +93,7 @@ export default {
data-target="#modal-license-delete-confirmation" data-target="#modal-license-delete-confirmation"
@click="setLicenseInModal(license)" @click="setLicenseInModal(license)"
> >
<icon name="remove" /> <gl-icon name="remove" />
</button> </button>
</div> </div>
</div> </div>
......
<script> <script>
import { mapState, mapGetters, mapActions } from 'vuex'; import { mapState, mapGetters, mapActions } from 'vuex';
import { GlLink } from '@gitlab/ui'; import { GlLink, GlIcon } from '@gitlab/ui';
import reportsMixin from 'ee/vue_shared/security_reports/mixins/reports_mixin'; import reportsMixin from 'ee/vue_shared/security_reports/mixins/reports_mixin';
import SetLicenseApprovalModal from 'ee/vue_shared/license_compliance/components/set_approval_status_modal.vue'; import SetLicenseApprovalModal from 'ee/vue_shared/license_compliance/components/set_approval_status_modal.vue';
import { componentNames } from 'ee/reports/components/issue_body'; import { componentNames } from 'ee/reports/components/issue_body';
import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants'; import { LICENSE_MANAGEMENT } from 'ee/vue_shared/license_compliance/store/constants';
import ReportItem from '~/reports/components/report_item.vue'; import ReportItem from '~/reports/components/report_item.vue';
import SmartVirtualList from '~/vue_shared/components/smart_virtual_list.vue'; import SmartVirtualList from '~/vue_shared/components/smart_virtual_list.vue';
import Icon from '~/vue_shared/components/icon.vue';
import ReportSection from '~/reports/components/report_section.vue'; import ReportSection from '~/reports/components/report_section.vue';
import createStore from './store'; import createStore from './store';
...@@ -23,7 +22,7 @@ export default { ...@@ -23,7 +22,7 @@ export default {
ReportSection, ReportSection,
SetLicenseApprovalModal, SetLicenseApprovalModal,
SmartVirtualList, SmartVirtualList,
Icon, GlIcon,
}, },
mixins: [reportsMixin], mixins: [reportsMixin],
props: { props: {
...@@ -176,7 +175,7 @@ export default { ...@@ -176,7 +175,7 @@ export default {
class="js-security-approval-help-link" class="js-security-approval-help-link"
target="_blank" target="_blank"
> >
<icon :size="12" name="question" /> <gl-icon :size="12" name="question" />
</gl-link> </gl-link>
</div> </div>
</template> </template>
...@@ -195,7 +194,7 @@ export default { ...@@ -195,7 +194,7 @@ export default {
target="_blank" target="_blank"
class="btn btn-default btn-sm js-full-report" class="btn btn-default btn-sm js-full-report"
> >
{{ s__('ciReport|View full report') }} <icon :size="16" name="external-link" /> {{ s__('ciReport|View full report') }} <gl-icon :size="16" name="external-link" />
</a> </a>
</div> </div>
</report-section> </report-section>
......
<script> <script>
import { GlTooltipDirective, GlDeprecatedButton } from '@gitlab/ui'; import { GlTooltipDirective, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import NoteHeader from '~/notes/components/note_header.vue'; import NoteHeader from '~/notes/components/note_header.vue';
export default { export default {
name: 'EventItem', name: 'EventItem',
components: { components: {
Icon, GlIcon,
NoteHeader, NoteHeader,
GlDeprecatedButton, GlDeprecatedButton,
}, },
...@@ -65,7 +64,7 @@ export default { ...@@ -65,7 +64,7 @@ export default {
<template> <template>
<div :id="noteId" class="d-flex align-items-center"> <div :id="noteId" class="d-flex align-items-center">
<div class="circle-icon-container" :class="iconClass"> <div class="circle-icon-container" :class="iconClass">
<icon :size="16" :name="iconName" /> <gl-icon :size="16" :name="iconName" />
</div> </div>
<div class="ml-3 flex-grow-1" data-qa-selector="event_item_content"> <div class="ml-3 flex-grow-1" data-qa-selector="event_item_content">
<note-header <note-header
...@@ -93,7 +92,7 @@ export default { ...@@ -93,7 +92,7 @@ export default {
:title="button.title" :title="button.title"
@click="button.onClick" @click="button.onClick"
> >
<icon :name="button.iconName" class="link-highlight" /> <gl-icon :name="button.iconName" class="link-highlight" />
</gl-deprecated-button> </gl-deprecated-button>
</div> </div>
</div> </div>
......
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import { setUrlFragment } from '~/lib/utils/url_utility'; import { setUrlFragment } from '~/lib/utils/url_utility';
export default { export default {
name: 'SolutionCard', name: 'SolutionCard',
components: { Icon }, components: { GlIcon },
props: { props: {
solution: { solution: {
type: String, type: String,
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
class="col-auto d-flex align-items-center pl-0" class="col-auto d-flex align-items-center pl-0"
:class="{ 'col-md-2': !isStandaloneVulnerability }" :class="{ 'col-md-2': !isStandaloneVulnerability }"
> >
<div class="circle-icon-container pr-3" aria-hidden="true"><icon name="bulb" /></div> <div class="circle-icon-container pr-3" aria-hidden="true"><gl-icon name="bulb" /></div>
<strong class="text-right flex-grow-1">{{ s__('ciReport|Solution') }}:</strong> <strong class="text-right flex-grow-1">{{ s__('ciReport|Solution') }}:</strong>
</div> </div>
<span class="flex-shrink-1 pl-0" :class="{ 'col-md-10': !isStandaloneVulnerability }">{{ <span class="flex-shrink-1 pl-0" :class="{ 'col-md-10': !isStandaloneVulnerability }">{{
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
class="js-link-vulnerabilityFeedbackHelpPath" class="js-link-vulnerabilityFeedbackHelpPath"
> >
{{ s__('ciReport|Learn more about interacting with security reports') }} {{ s__('ciReport|Learn more about interacting with security reports') }}
<icon :size="16" name="external-link" class="align-text-top" /> <gl-icon :size="16" name="external-link" class="align-text-top" />
</a> </a>
</em> </em>
</div> </div>
......
<script> <script>
import { GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui'; import { GlDeprecatedDropdown, GlDeprecatedDropdownItem, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlDeprecatedDropdown, GlDeprecatedDropdown,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
Icon, GlIcon,
}, },
props: { props: {
buttons: { buttons: {
...@@ -54,7 +53,7 @@ export default { ...@@ -54,7 +53,7 @@ export default {
> >
<div class="media"> <div class="media">
<div> <div>
<icon v-if="selectedButton === button" class="gl-mr-2" name="mobile-issue-close" /> <gl-icon v-if="selectedButton === button" class="gl-mr-2" name="mobile-issue-close" />
</div> </div>
<div class="media-body" :class="{ 'prepend-left-20': selectedButton !== button }"> <div class="media-body" :class="{ 'prepend-left-20': selectedButton !== button }">
<strong>{{ button.name }}</strong> <strong>{{ button.name }}</strong>
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import DropdownButton from 'ee/vue_shared/components/sidebar/epics_select/dropdown_button.vue'; import DropdownButton from 'ee/vue_shared/components/sidebar/epics_select/dropdown_button.vue';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import { mockEpic1 } from '../mock_data'; import { mockEpic1 } from '../mock_data';
...@@ -69,7 +69,7 @@ describe('EpicsSelect', () => { ...@@ -69,7 +69,7 @@ describe('EpicsSelect', () => {
}); });
it('should render Icon component', () => { it('should render Icon component', () => {
const iconEl = wrapper.find(Icon); const iconEl = wrapper.find(GlIcon);
expect(iconEl.exists()).toBe(true); expect(iconEl.exists()).toBe(true);
expect(iconEl.attributes('name')).toBe('chevron-down'); expect(iconEl.attributes('name')).toBe('chevron-down');
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import DropdownHeader from 'ee/vue_shared/components/sidebar/epics_select/dropdown_header.vue'; import DropdownHeader from 'ee/vue_shared/components/sidebar/epics_select/dropdown_header.vue';
import Icon from '~/vue_shared/components/icon.vue';
describe('EpicsSelect', () => { describe('EpicsSelect', () => {
describe('DropdownHeader', () => { describe('DropdownHeader', () => {
...@@ -36,7 +35,7 @@ describe('EpicsSelect', () => { ...@@ -36,7 +35,7 @@ describe('EpicsSelect', () => {
}); });
it('should render close button icon', () => { it('should render close button icon', () => {
const iconEl = wrapper.find(GlDeprecatedButton).find(Icon); const iconEl = wrapper.find(GlDeprecatedButton).find(GlIcon);
expect(iconEl.exists()).toBe(true); expect(iconEl.exists()).toBe(true);
expect(iconEl.attributes('name')).toBe('close'); expect(iconEl.attributes('name')).toBe('close');
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import DropdownSearchInput from 'ee/vue_shared/components/sidebar/epics_select/dropdown_search_input.vue'; import DropdownSearchInput from 'ee/vue_shared/components/sidebar/epics_select/dropdown_search_input.vue';
import Icon from '~/vue_shared/components/icon.vue';
const createComponent = () => const createComponent = () =>
shallowMount(DropdownSearchInput, { shallowMount(DropdownSearchInput, {
...@@ -89,7 +88,7 @@ describe('EpicsSelect', () => { ...@@ -89,7 +88,7 @@ describe('EpicsSelect', () => {
}); });
return wrapper.vm.$nextTick().then(() => { return wrapper.vm.$nextTick().then(() => {
const iconEl = wrapper.find(Icon); const iconEl = wrapper.find(GlIcon);
expect(iconEl.exists()).toBe(true); expect(iconEl.exists()).toBe(true);
expect(iconEl.attributes('name')).toBe('search'); expect(iconEl.attributes('name')).toBe('search');
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import DropdownValueCollapsed from 'ee/vue_shared/components/sidebar/epics_select/dropdown_value_collapsed.vue'; import DropdownValueCollapsed from 'ee/vue_shared/components/sidebar/epics_select/dropdown_value_collapsed.vue';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import { mockEpic1 } from '../mock_data'; import { mockEpic1 } from '../mock_data';
...@@ -31,7 +31,7 @@ describe('EpicsSelect', () => { ...@@ -31,7 +31,7 @@ describe('EpicsSelect', () => {
}); });
it('should render Icon component', () => { it('should render Icon component', () => {
const iconEl = wrapper.find(Icon); const iconEl = wrapper.find(GlIcon);
expect(iconEl.exists()).toBe(true); expect(iconEl.exists()).toBe(true);
expect(iconEl.attributes('name')).toBe('epic'); expect(iconEl.attributes('name')).toBe('epic');
......
...@@ -65,7 +65,7 @@ exports[`License Report MR Widget report section should render correctly 1`] = ` ...@@ -65,7 +65,7 @@ exports[`License Report MR Widget report section should render correctly 1`] = `
> >
View full report View full report
<icon-stub <gl-icon-stub
name="external-link" name="external-link"
size="16" size="16"
/> />
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui'; import { GlDeprecatedDropdown, GlDeprecatedDropdownItem, GlIcon } from '@gitlab/ui';
import SplitButton from 'ee/vue_shared/security_reports/components/split_button.vue'; import SplitButton from 'ee/vue_shared/security_reports/components/split_button.vue';
import Icon from '~/vue_shared/components/icon.vue';
const buttons = [ const buttons = [
{ {
...@@ -81,7 +80,7 @@ describe('Split Button', () => { ...@@ -81,7 +80,7 @@ describe('Split Button', () => {
expect( expect(
findDropdownItems() findDropdownItems()
.at(0) .at(0)
.find(Icon) .find(GlIcon)
.exists(), .exists(),
).toBe(true); ).toBe(true);
}); });
......
...@@ -63,7 +63,7 @@ exports[`Snippet Description Edit component rendering matches the snapshot 1`] = ...@@ -63,7 +63,7 @@ exports[`Snippet Description Edit component rendering matches the snapshot 1`] =
class="zen-control zen-control-leave js-zen-leave gl-text-gray-500" class="zen-control zen-control-leave js-zen-leave gl-text-gray-500"
href="#" href="#"
> >
<icon-stub <gl-icon-stub
name="minimize" name="minimize"
size="16" size="16"
/> />
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue'; import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue';
import Icon from '~/vue_shared/components/icon.vue';
const changedFile = () => ({ changed: true }); const changedFile = () => ({ changed: true });
const stagedFile = () => ({ changed: true, staged: true }); const stagedFile = () => ({ changed: true, staged: true });
...@@ -25,7 +25,7 @@ describe('Changed file icon', () => { ...@@ -25,7 +25,7 @@ describe('Changed file icon', () => {
wrapper.destroy(); wrapper.destroy();
}); });
const findIcon = () => wrapper.find(Icon); const findIcon = () => wrapper.find(GlIcon);
const findIconName = () => findIcon().props('name'); const findIconName = () => findIcon().props('name');
const findIconClasses = () => findIcon().classes(); const findIconClasses = () => findIcon().classes();
const findTooltipText = () => wrapper.attributes('title'); const findTooltipText = () => wrapper.attributes('title');
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import CommitComponent from '~/vue_shared/components/commit.vue'; import CommitComponent from '~/vue_shared/components/commit.vue';
import Icon from '~/vue_shared/components/icon.vue';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
describe('Commit component', () => { describe('Commit component', () => {
...@@ -8,7 +8,7 @@ describe('Commit component', () => { ...@@ -8,7 +8,7 @@ describe('Commit component', () => {
let wrapper; let wrapper;
const findIcon = name => { const findIcon = name => {
const icons = wrapper.findAll(Icon).filter(c => c.attributes('name') === name); const icons = wrapper.findAll(GlIcon).filter(c => c.attributes('name') === name);
return icons.length ? icons.at(0) : icons; return icons.length ? icons.at(0) : icons;
}; };
...@@ -46,7 +46,7 @@ describe('Commit component', () => { ...@@ -46,7 +46,7 @@ describe('Commit component', () => {
expect( expect(
wrapper wrapper
.find('.icon-container') .find('.icon-container')
.find(Icon) .find(GlIcon)
.exists(), .exists(),
).toBe(true); ).toBe(true);
}); });
......
...@@ -2,8 +2,8 @@ import Vue from 'vue'; ...@@ -2,8 +2,8 @@ import Vue from 'vue';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { mockMilestone } from 'jest/boards/mock_data'; import { mockMilestone } from 'jest/boards/mock_data';
import { GlIcon } from '@gitlab/ui';
import IssueMilestone from '~/vue_shared/components/issue/issue_milestone.vue'; import IssueMilestone from '~/vue_shared/components/issue/issue_milestone.vue';
import Icon from '~/vue_shared/components/icon.vue';
const createComponent = (milestone = mockMilestone) => { const createComponent = (milestone = mockMilestone) => {
const Component = Vue.extend(IssueMilestone); const Component = Vue.extend(IssueMilestone);
...@@ -135,7 +135,7 @@ describe('IssueMilestoneComponent', () => { ...@@ -135,7 +135,7 @@ describe('IssueMilestoneComponent', () => {
}); });
it('renders milestone icon', () => { it('renders milestone icon', () => {
expect(wrapper.find(Icon).props('name')).toBe('clock'); expect(wrapper.find(GlIcon).props('name')).toBe('clock');
}); });
it('renders milestone title', () => { it('renders milestone title', () => {
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import NoteableWarning from '~/vue_shared/components/notes/noteable_warning.vue'; import NoteableWarning from '~/vue_shared/components/notes/noteable_warning.vue';
import Icon from '~/vue_shared/components/icon.vue';
describe('Issue Warning Component', () => { describe('Issue Warning Component', () => {
let wrapper; let wrapper;
const findIcon = (w = wrapper) => w.find(Icon); const findIcon = (w = wrapper) => w.find(GlIcon);
const findLockedBlock = (w = wrapper) => w.find({ ref: 'locked' }); const findLockedBlock = (w = wrapper) => w.find({ ref: 'locked' });
const findConfidentialBlock = (w = wrapper) => w.find({ ref: 'confidential' }); const findConfidentialBlock = (w = wrapper) => w.find({ ref: 'confidential' });
const findLockedAndConfidentialBlock = (w = wrapper) => w.find({ ref: 'lockedAndConfidential' }); const findLockedAndConfidentialBlock = (w = wrapper) => w.find({ ref: 'lockedAndConfidential' });
...@@ -69,7 +69,7 @@ describe('Issue Warning Component', () => { ...@@ -69,7 +69,7 @@ describe('Issue Warning Component', () => {
}); });
it('renders warning icon', () => { it('renders warning icon', () => {
expect(wrapper.find(Icon).exists()).toBe(true); expect(wrapper.find(GlIcon).exists()).toBe(true);
}); });
it('does not render information about locked noteable', () => { it('does not render information about locked noteable', () => {
...@@ -95,7 +95,7 @@ describe('Issue Warning Component', () => { ...@@ -95,7 +95,7 @@ describe('Issue Warning Component', () => {
}); });
it('does not render warning icon', () => { it('does not render warning icon', () => {
expect(wrapper.find(Icon).exists()).toBe(false); expect(wrapper.find(GlIcon).exists()).toBe(false);
}); });
it('does not render information about locked noteable', () => { it('does not render information about locked noteable', () => {
......
import { GlSkeletonLoading, GlSprintf } from '@gitlab/ui'; import { GlSkeletonLoading, GlSprintf, GlIcon } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import UserPopover from '~/vue_shared/components/user_popover/user_popover.vue'; import UserPopover from '~/vue_shared/components/user_popover/user_popover.vue';
import Icon from '~/vue_shared/components/icon.vue';
const DEFAULT_PROPS = { const DEFAULT_PROPS = {
user: { user: {
...@@ -74,7 +73,7 @@ describe('User Popover Component', () => { ...@@ -74,7 +73,7 @@ describe('User Popover Component', () => {
}); });
it('shows icon for location', () => { it('shows icon for location', () => {
const iconEl = wrapper.find(Icon); const iconEl = wrapper.find(GlIcon);
expect(iconEl.props('name')).toEqual('location'); expect(iconEl.props('name')).toEqual('location');
}); });
...@@ -139,9 +138,9 @@ describe('User Popover Component', () => { ...@@ -139,9 +138,9 @@ describe('User Popover Component', () => {
createWrapper({ user }); createWrapper({ user });
expect(wrapper.findAll(Icon).filter(icon => icon.props('name') === 'profile').length).toEqual( expect(
1, wrapper.findAll(GlIcon).filter(icon => icon.props('name') === 'profile').length,
); ).toEqual(1);
}); });
it('shows icon for work information', () => { it('shows icon for work information', () => {
...@@ -152,7 +151,9 @@ describe('User Popover Component', () => { ...@@ -152,7 +151,9 @@ describe('User Popover Component', () => {
createWrapper({ user }); createWrapper({ user });
expect(wrapper.findAll(Icon).filter(icon => icon.props('name') === 'work').length).toEqual(1); expect(wrapper.findAll(GlIcon).filter(icon => icon.props('name') === 'work').length).toEqual(
1,
);
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment