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
2 changes: 1 addition & 1 deletion packages/components/src/Accordion/Accordion.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const meta: Meta<typeof Accordion> = {
parameters: {
layout: 'padded',
},
tags: ['autodocs'],
tags: ['autodocs', 'secondary'],
argTypes: {
initiallyExpanded: {
control: 'boolean',
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/Autosave/Autosave.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const meta: Meta<typeof Autosave> = {
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
tags: ['autodocs', 'in-frequent'],
Copy link

Copilot AI Jun 10, 2025

Choose a reason for hiding this comment

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

[nitpick] The tag 'in-frequent' appears to be unusually hyphenated. Consider using 'infrequent' unless the current spelling is intentional.

Suggested change
tags: ['autodocs', 'in-frequent'],
tags: ['autodocs', 'infrequent'],

Copilot uses AI. Check for mistakes.
argTypes: {
isDarkMode: {
control: 'boolean',
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const meta: Meta<typeof Button> = {
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
tags: ['autodocs', 'foundation', 'buttons'],
argTypes: {
size: {
control: 'select',
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/Expander/Expander.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const meta: Meta<typeof Expander> = {
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
tags: ['autodocs', 'buttons'],
argTypes: {
hasIcon: {
control: 'boolean',
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/Icon/Icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const meta: Meta<typeof Icon> = {
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
tags: ['autodocs', 'foundation'],
argTypes: {
name: {
control: 'text',
Expand Down
85 changes: 85 additions & 0 deletions stories/Colors.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import React, { useState } from 'react';

import type { Meta, StoryObj } from '@storybook/react';

import colors from '!!raw-loader!../packages/assets/src/scss/variables/_colors.scss';

const colorsList = colors
.split('\n')
.map((line: string) => {
const [name, hex] = line.split(/:\s*|\s+/).map((item) => item.trim());

if (!name || !hex.startsWith('#')) {
return undefined;
}

return {
name: name.replace('$color-', ''),
hex,
};
})
.filter((item) => item !== undefined);

// TODO: remove temporary styles when scss is available

const ColorsList = () => {
const [searchValue, setSearchValue] = useState('');
const iconsRows = colorsList
.filter(({ name }) => searchValue === '' || name.includes(searchValue))
.map(({ name, hex }) => {
return (
<tr className="ids-table__row" key={name}>
<td className="ids-table__cell" style={{ padding: '10px' }}>
{name}
</td>
<td className="ids-table__cell" style={{ padding: '10px' }}>
{hex}
</td>
<td className="ids-table__cell" style={{ padding: 0 }}>
<div
style={{
width: '40px',
height: '40px',
backgroundColor: hex,
}}
/>
</td>
</tr>
);
});

return (
<div style={{ display: 'flex', justifyContent: 'center' }}>
<div>
<input
className="ids-input ids-input--text"
onChange={(event) => {
setSearchValue(event.target.value);
}}
placeholder="Search colors..."
style={{ marginBottom: '10px' }}
type="text"
/>
<table border={1} className="ids-table">
<tbody className="ids-table__body">{iconsRows}</tbody>
</table>
</div>
</div>
);
};

const meta: Meta<typeof ColorsList> = {
component: ColorsList,
parameters: {
layout: 'padded',
},
tags: [],
};

export default meta;

type Story = StoryObj<typeof ColorsList>;

export const Default: Story = {
name: 'Default',
};
5 changes: 5 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ declare module '../packages/assets/src/img/all-icons.json' {
const icons: string[];
export default icons;
};

declare module '!!raw-loader!../packages/assets/src/scss/variables/_colors.scss' {
const value: string;
export default value;
};