Skip to content
Merged
5 changes: 5 additions & 0 deletions .changeset/shaggy-kids-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@knime/kds-components": patch
---
Comment thread
thresharx marked this conversation as resolved.

add KdsNavigation and move ListItemDivider to accessories as KdsDivider
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ import { expect, within } from "storybook/test";
import {
buildAllCombinationsStory,
buildDesignComparatorStory,
} from "../../../test-utils/storybook";
} from "../../test-utils/storybook";

import ListItemDivider from "./ListItemDivider.vue";
import KdsDivider from "./KdsDivider.vue";

const figmaBaseUrl =
"https://www.figma.com/design/AqT6Q5R4KyYqUb6n5uO2XE/%F0%9F%A7%A9-kds-Components";

const meta: Meta<typeof ListItemDivider> = {
title: "Containers/ListItem/Divider",
component: ListItemDivider,
const meta: Meta<typeof KdsDivider> = {
title: "Accessories/Divider",
component: KdsDivider,
tags: ["autodocs"],
parameters: {
docs: {
description: {
component:
"Internal helper that renders the faint divider used between grouped list items.",
"Internal helper that renders the faint divider used between grouped items.",
},
},
design: {
Expand All @@ -31,7 +31,7 @@ const meta: Meta<typeof ListItemDivider> = {

export default meta;

type Story = StoryObj<typeof ListItemDivider>;
type Story = StoryObj<typeof KdsDivider>;

export const Default: Story = {
play: async ({ canvasElement }) => {
Expand All @@ -44,7 +44,7 @@ export const Default: Story = {
// TextOverflow story does not apply here

export const DesignComparator: Story = buildDesignComparatorStory({
component: ListItemDivider,
component: KdsDivider,
wrapperStyle: { width: "316px" },
designsToCompare: {
Default: {
Expand All @@ -57,6 +57,6 @@ export const DesignComparator: Story = buildDesignComparatorStory({
});

export const AllCombinations: Story = buildAllCombinationsStory({
component: ListItemDivider,
component: KdsDivider,
combinationsProps: [{}],
});
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<template>
<hr class="kds-list-item-divider" />
<hr class="kds-divider" />
</template>

<style scoped>
.kds-list-item-divider {
flex-shrink: 0;
width: 100%;
padding: 0;
.kds-divider {
margin: 0 0 var(--kds-spacing-container-0-12x);
border: none;
border-bottom: var(--kds-border-base-subtle);
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/accessories/Divider/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as KdsDivider } from "./KdsDivider.vue";
2 changes: 2 additions & 0 deletions packages/components/src/accessories/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ export type * from "./InlineMessage";

export * from "./DonutChart";
export type * from "./DonutChart";

export * from "./Divider";
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script setup lang="ts">
import { computed, nextTick, ref, useId, useTemplateRef, watch } from "vue";

import { KdsDivider } from "../../accessories";
import KdsEmptyState from "../../layouts/EmptyState/KdsEmptyState.vue";
import { KdsListItem } from "../ListItem/KdsListItem";
import { kdsListItemVariant } from "../ListItem/KdsListItem/enums";
import ListItemDivider from "../ListItem/ListItemDivider/ListItemDivider.vue";
import ListItemSectionTitle from "../ListItem/ListItemSectionTitle/ListItemSectionTitle.vue";

import type {
Expand Down Expand Up @@ -332,8 +332,9 @@ defineExpose<KdsListContainerExpose>({
@mousedown="props.controlledExternally && $event.preventDefault()"
@click="!item.disabled && emit('itemClick', toOptionId(item.id))"
/>
<ListItemDivider
<KdsDivider
v-if="item.separator && index < prefixedValues.length - 1"
class="kds-list-item-divider"
role="presentation"
aria-hidden="true"
/>
Expand Down Expand Up @@ -386,4 +387,10 @@ defineExpose<KdsListContainerExpose>({
align-items: center;
justify-content: center;
}

.kds-list-item-divider {
flex-shrink: 0;
width: 100%;
padding: 0;
}
Comment thread
thresharx marked this conversation as resolved.
</style>

This file was deleted.

Loading
Loading