Skip to content

Commit

Permalink
fix: replicated missing cv- classes from Vue2 repo
Browse files Browse the repository at this point in the history
  • Loading branch information
OlkaB committed Apr 5, 2024
1 parent dd069f4 commit ea305ad
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/components/CvBreadcrumb/CvBreadcrumb.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<nav :aria-label="ariaLabel">
<ol
class="cv-breadcrumb"
:class="[
`${carbonPrefix}--breadcrumb`,
{ [`${carbonPrefix}--breadcrumb--no-trailing-slash`]: noTrailingSlash },
Expand Down
1 change: 1 addition & 0 deletions src/components/CvBreadcrumb/CvBreadcrumbItem.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<li
class="cv-breadcrumb-item"
:class="[
`${carbonPrefix}--breadcrumb-item`,
{ [`${carbonPrefix}--breadcrumb-item--current`]: isCurrentPage },
Expand Down
1 change: 1 addition & 0 deletions src/components/CvButton/CvButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<button
class="cv-button"
:class="buttonClasses"
:disabled="disabled || skeleton"
@click="$emit('click', $event)"
Expand Down
1 change: 1 addition & 0 deletions src/components/CvButton/CvButtonSet.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div
class="cv-button-set"
:class="[
`${carbonPrefix}--btn-set`,
{ [`${carbonPrefix}--btn-set--stacked`]: stacked },
Expand Down
1 change: 1 addition & 0 deletions src/components/CvButton/CvIconButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<button
class="cv-button"
:class="[
buttonClasses,
`${carbonPrefix}--tooltip__trigger`,
Expand Down
11 changes: 8 additions & 3 deletions src/components/CvCodeSnippet/CvCodeSnippet.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<template>
<component :is="component" v-bind="subProps" @copy="handleCopy"
><slot
/></component>
<component
:is="component"
v-bind="subProps"
class="cv-code-snippet"
@copy="handleCopy"
>
<slot />
</component>
</template>

<script>
Expand Down
1 change: 1 addition & 0 deletions src/components/CvCodeSnippet/_CviCodeSnippetInline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default {
setup(props, { emit }) {
const codeId = useCvId();
const classes = computed(() => [
'cv-code-snippet-inline',
`${carbonPrefix}--snippet`,
`${carbonPrefix}--snippet--inline`,
{
Expand Down
1 change: 1 addition & 0 deletions src/components/CvCodeSnippet/_CviCodeSnippetMultiline.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div
class="cv-code-snippet-multiline"
:class="[
`${carbonPrefix}--snippet`,
`${carbonPrefix}--snippet--multi`,
Expand Down
1 change: 1 addition & 0 deletions src/components/CvCodeSnippet/_CviCodeSnippetOneline.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div
class="cv-code-snippet-oneline"
:class="[
`${carbonPrefix}--snippet`,
`${carbonPrefix}--snippet--single`,
Expand Down
1 change: 1 addition & 0 deletions src/components/CvComboBox/CvComboBox.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div
ref="root"
class="cv-combo-box"
:class="`${carbonPrefix}--list-box__wrapper`"
@focusout="onFocusOut"
>
Expand Down
1 change: 1 addition & 0 deletions src/components/CvList/CvList.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<component
:is="listType"
class="cv-list"
:class="{
[`${carbonPrefix}--list--nested`]: nested,
[`${carbonPrefix}--list--ordered`]: isActuallyOrdered,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CvList/CvListItem.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<li :class="`${carbonPrefix}--list__item`"><slot /></li>
<li class="cv-list-item" :class="`${carbonPrefix}--list__item`"><slot /></li>
</template>

<script>
Expand Down
1 change: 1 addition & 0 deletions src/components/CvNotification/CvInlineNotification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div
role="alert"
:kind="kind"
class="cv-inline-notification"
:class="[
`${carbonPrefix}--inline-notification`,
`${carbonPrefix}--inline-notification--${kind}`,
Expand Down
1 change: 1 addition & 0 deletions src/components/CvNotification/CvToastNotification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div
role="alert"
:kind="kind"
class="cv-notification"
:class="[
`${carbonPrefix}--toast-notification`,
`${carbonPrefix}--toast-notification--${kind}`,
Expand Down
2 changes: 1 addition & 1 deletion src/components/CvTag/CvTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default {
});
const tagClasses = computed(() => {
const classes = [`${carbonPrefix}--tag`];
const classes = [`cv-tag ${carbonPrefix}--tag`];
if (props.small) classes.push(`${carbonPrefix}--tag--sm`);
Expand Down

0 comments on commit ea305ad

Please sign in to comment.