Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/olive-lions-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cube-dev/ui-kit": patch
---

Add new chart icons.
20 changes: 20 additions & 0 deletions src/icons/ChartBarGroupedIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const ChartBarGroupedIcon = wrapIcon(
'ChartBarGroupedIcon',
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
>
<path
stroke="#000"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M5 20h4m-4 0h1a1 1 0 0 0 1-1m-2 1a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v10m2 1H8a1 1 0 0 1-1-1m2 1a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v14m8 1h4m-4 0h1a1 1 0 0 0 1-1m-2 1a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v5m2 1h-1a1 1 0 0 1-1-1m2 1a1 1 0 0 0 1-1v-9a1 1 0 0 0-1-1h-1a1 1 0 0 0-1 1v9"
/>
</svg>,
);
20 changes: 20 additions & 0 deletions src/icons/ChartBarLineIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const ChartBarLineIcon = wrapIcon(
'ChartBarLineIcon',
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
>
<path
stroke="#000"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M9 19v-4a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1m5-1a1 1 0 0 1-1 1H4m5-1a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1m-6 0v-7a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v7M4 20h14m-3-1a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1zM3 10.108 9.134 2 15 5l6-2"
/>
</svg>,
);
20 changes: 20 additions & 0 deletions src/icons/ChartBarStackedIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const ChartBarStackedIcon = wrapIcon(
'ChartBarStackedIcon',
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
>
<path
stroke="#000"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M3 15h6m-6 0v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1m-6-4v-4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4m0 0v4m0 0v-7m0 7a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1m-6-7h6m-6 0V8a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4m0 0v7m0 0v-9m0 9a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-9m-6 0h6m-6 0V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v5M5 20h14"
/>
</svg>,
);
20 changes: 20 additions & 0 deletions src/icons/ChartBarStackedPercentageIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const ChartBarStackedPercentageIcon = wrapIcon(
'ChartBarStackedPercentageIcon',
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
>
<path
stroke="#000"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M3 15h6m-6 0v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1m-6-4V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1m0 10v4m0-4V5m0 14v-7m0 7a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1M9 5v7m0-7a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1m-6 7h6m0 0v7m0-7V5m0 14v-9m0 9a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-9m-6 0h6m-6 0V5m6 5V5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1M5 20h14M5 4h14"
/>
</svg>,
);
20 changes: 20 additions & 0 deletions src/icons/ChartBoxPlotIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const ChartBoxPlotIcon = wrapIcon(
'ChartBoxPlotIcon',
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
>
<path
stroke="#000"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M6 4v2m0 5v9m6-16v10m0 5v1m6-16v1m0 6v9M4 7a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm6 8a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zm6-9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1z"
/>
</svg>,
);
20 changes: 20 additions & 0 deletions src/icons/ChartBubbleIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const ChartBubbleIcon = wrapIcon(
'ChartBubbleIcon',
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
>
<path
stroke="#000"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M3 16a3 3 0 1 0 6 0 3 3 0 0 0-6 0m11 3a2 2 0 1 0 4 0 2 2 0 0 0-4 0M10 7.5a4.5 4.5 0 1 0 9 0 4.5 4.5 0 0 0-9 0"
/>
</svg>,
);
20 changes: 20 additions & 0 deletions src/icons/ChartDonut2Icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const ChartDonut2Icon = wrapIcon(
'ChartDonut2Icon',
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
>
<path
stroke="#000"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M12 3v5m0-5a9 9 0 0 1 9 9m-9-9a9 9 0 1 0 9 9m-9-4a4 4 0 0 1 4 4m-4-4a4 4 0 1 0 4 4m0 0h5"
/>
</svg>,
);
20 changes: 20 additions & 0 deletions src/icons/ChartPie2Icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const ChartPie2Icon = wrapIcon(
'ChartPie2Icon',
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
>
<path
stroke="#000"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M12 3v9h9m-9-9a9 9 0 0 1 9 9m-9-9a9 9 0 1 0 9 9"
/>
</svg>,
);
20 changes: 20 additions & 0 deletions src/icons/ChartScatterIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { wrapIcon } from './wrap-icon';

export const ChartScatterIcon = wrapIcon(
'ChartScatterIcon',
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
>
<path
stroke="#000"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
d="M3 3v18h18M8 15.015v.015m8 .985v.015m-8-9v.015m4 3.985v.015m7-.015v.015"
/>
</svg>,
);
9 changes: 5 additions & 4 deletions src/icons/Icons.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { StoryFn } from '@storybook/react';

import { Text } from '../components/content/Text';
import { Title } from '../components/content/Title';
import { Flow } from '../components/layout/Flow';
import { Grid } from '../components/layout/Grid';
Expand Down Expand Up @@ -41,12 +42,12 @@ const Template: StoryFn<CubeIconProps> = (name) => {
return (
<Space key={iconName} gap="1x">
<Icon size={18} />
<span>{iconName}</span>
<Text preset="t4">{iconName}</Text>
</Space>
);
})}
</Grid>
<Title>36px (double-sized)</Title>
<Title>24px (full-size)</Title>
<Grid columns="repeat(auto-fit, 200px)" flow="row" gap="16px">
{Object.keys(Icons).map((iconName) => {
if (
Expand All @@ -60,8 +61,8 @@ const Template: StoryFn<CubeIconProps> = (name) => {

return (
<Space key={iconName} gap="1x">
<Icon size={36} />
<span>{iconName}</span>
<Icon size={24} />
<Text preset="t4">{iconName}</Text>
</Space>
);
})}
Expand Down
9 changes: 9 additions & 0 deletions src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ export { CalendarEditIcon } from './CalendarEditIcon';
export { CalendarIcon } from './CalendarIcon';
export { CaretDownIcon } from './CaretDownIcon';
export { CaretUpIcon } from './CaretUpIcon';
export { ChartBarGroupedIcon } from './ChartBarGroupedIcon';
Copy link

Copilot AI Jun 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Manually adding each new icon export increases maintenance overhead; consider automating barrel file generation or using a script to keep the index in sync.

Copilot uses AI. Check for mistakes.
export { ChartBarLineIcon } from './ChartBarLineIcon';
export { ChartBarStackedIcon } from './ChartBarStackedIcon';
export { ChartBarStackedPercentageIcon } from './ChartBarStackedPercentageIcon';
export { ChartBoxPlotIcon } from './ChartBoxPlotIcon';
export { ChartBubbleIcon } from './ChartBubbleIcon';
export { ChartDonut2Icon } from './ChartDonut2Icon';
export { ChartPie2Icon } from './ChartPie2Icon';
export { ChartScatterIcon } from './ChartScatterIcon';
export { CheckCircleFilledIcon } from './CheckCircleFilledIcon';
export { CheckCircleIcon } from './CheckCircleIcon';
export { CheckIcon } from './CheckIcon';
Expand Down
Loading