Skip to content

Commit

Permalink
icons: Update and extend suite
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltaranto committed Feb 11, 2025
1 parent 5aed0d6 commit 60e3bbf
Show file tree
Hide file tree
Showing 34 changed files with 735 additions and 42 deletions.
26 changes: 26 additions & 0 deletions .changeset/curvy-crabs-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
'braid-design-system': minor
---

---
new:
- IconBulletList
- IconNumberedList
---

Add new icons to represent other list types.
Sits alongside `IconChecklist` which already exists.

```tsx
<IconBulletList />
<IconNumberedList />
```

As a result we are deprecated `IconList` in favour of the more specific list types. The `IconList` will be removed in a future major version.

### MIGRATION GUIDE

```diff
-<IconList />
+<IconBulletList />
```
12 changes: 12 additions & 0 deletions .changeset/new-hairs-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'braid-design-system': patch
---

---
updated:
- IconHeart
- IconLink
- IconLinkBroken
---

**IconHeart, IconLink, IconLinkBroken:** Update design
22 changes: 22 additions & 0 deletions .changeset/serious-sloths-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'braid-design-system': minor
---

---
new:
- IconBold
- IconItalic
- IconRedo
- IconTitle
- IconUndo
---

Add new icons to support rich text editors and formatting.

```tsx
<IconBold />
<IconItalic />
<IconTitle />
<IconRedo />
<IconUndo />
```
1 change: 1 addition & 0 deletions packages/braid-design-system/icons/bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/braid-design-system/icons/bulletList.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/braid-design-system/icons/heart-active.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/braid-design-system/icons/heart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/braid-design-system/icons/italic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 1 addition & 9 deletions packages/braid-design-system/icons/link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 1 addition & 14 deletions packages/braid-design-system/icons/linkBroken.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/braid-design-system/icons/numberedList.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/braid-design-system/icons/redo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/braid-design-system/icons/title.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/braid-design-system/icons/undo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import source from '@braid-design-system/source.macro';
import type { ComponentDocs } from 'site/types';

import { IconBold, Heading, Stack } from '../../';
import { iconDocumentation } from '../iconCommon.docs';

const docs: ComponentDocs = {
category: 'Icon',
Example: () =>
source(
<Stack space="none" align="center">
<Heading component="div" level="1">
<IconBold />
</Heading>
</Stack>,
),
alternatives: [],
additional: [...iconDocumentation],
};

export default docs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Box } from '../../Box/Box';
import { IconContainer, type IconContainerProps } from '../IconContainer';

import { IconBoldSvg } from './IconBoldSvg';

export type IconBoldProps = IconContainerProps;

export const IconBold = (props: IconBoldProps) => (
<IconContainer {...props}>
{(svgProps) => <Box component={IconBoldSvg} {...svgProps} />}
</IconContainer>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import source from '@braid-design-system/source.macro';
import type { ComponentDocs } from 'site/types';

import { IconBulletList, Heading, Stack } from '../../';
import { iconDocumentation } from '../iconCommon.docs';

const docs: ComponentDocs = {
category: 'Icon',
Example: () =>
source(
<Stack space="none" align="center">
<Heading component="div" level="1">
<IconBulletList />
</Heading>
</Stack>,
),
alternatives: [],
additional: [...iconDocumentation],
};

export default docs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Box } from '../../Box/Box';
import { IconContainer, type IconContainerProps } from '../IconContainer';

import { IconBulletListSvg } from './IconBulletListSvg';

export type IconBulletListProps = IconContainerProps;

export const IconBulletList = (props: IconBulletListProps) => (
<IconContainer {...props}>
{(svgProps) => <Box component={IconBulletListSvg} {...svgProps} />}
</IconContainer>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import source from '@braid-design-system/source.macro';
import type { ComponentDocs } from 'site/types';

import { IconItalic, Heading, Stack } from '../../';
import { iconDocumentation } from '../iconCommon.docs';

const docs: ComponentDocs = {
category: 'Icon',
Example: () =>
source(
<Stack space="none" align="center">
<Heading component="div" level="1">
<IconItalic />
</Heading>
</Stack>,
),
alternatives: [],
additional: [...iconDocumentation],
};

export default docs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Box } from '../../Box/Box';
import { IconContainer, type IconContainerProps } from '../IconContainer';

import { IconItalicSvg } from './IconItalicSvg';

export type IconItalicProps = IconContainerProps;

export const IconItalic = (props: IconItalicProps) => (
<IconContainer {...props}>
{(svgProps) => <Box component={IconItalicSvg} {...svgProps} />}
</IconContainer>
);
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import source from '@braid-design-system/source.macro';
import type { ComponentDocs } from 'site/types';

import { IconList, Heading, Stack } from '../../';
import { IconList, Heading, Stack, Text, TextLink } from '../../';
import { iconDocumentation } from '../iconCommon.docs';

const docs: ComponentDocs = {
category: 'Icon',
deprecationWarning: (
<Text>
This component has been deprecated and will be removed in a future
release.
<br />
Please switch to{' '}
<TextLink href="/components/IconBulletList">IconBulletList</TextLink>{' '}
instead.
</Text>
),
Example: () =>
source(
<Stack space="none" align="center">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
import dedent from 'dedent';

import { Box } from '../../Box/Box';
import { IconContainer, type IconContainerProps } from '../IconContainer';

import { IconListSvg } from './IconListSvg';

export type IconListProps = IconContainerProps;

export const IconList = (props: IconListProps) => (
<IconContainer {...props}>
{(svgProps) => <Box component={IconListSvg} {...svgProps} />}
</IconContainer>
);
/** @deprecated Use `IconBulletList` instead */
export const IconList = (props: IconListProps) => {
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.warn(
dedent`
The \`IconList\` component is deprecated. Please use \`IconBulletList\` instead.
%c-<IconList />
%c+<IconBulletList />
%c
`,
'color: red',
'color: green',
'color: inherit',
);
}

return (
<IconContainer {...props}>
{(svgProps) => <Box component={IconListSvg} {...svgProps} />}
</IconContainer>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import source from '@braid-design-system/source.macro';
import type { ComponentDocs } from 'site/types';

import { IconNumberedList, Heading, Stack } from '../../';
import { iconDocumentation } from '../iconCommon.docs';

const docs: ComponentDocs = {
category: 'Icon',
Example: () =>
source(
<Stack space="none" align="center">
<Heading component="div" level="1">
<IconNumberedList />
</Heading>
</Stack>,
),
alternatives: [],
additional: [...iconDocumentation],
};

export default docs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Box } from '../../Box/Box';
import { IconContainer, type IconContainerProps } from '../IconContainer';

import { IconNumberedListSvg } from './IconNumberedListSvg';

export type IconNumberedListProps = IconContainerProps;

export const IconNumberedList = (props: IconNumberedListProps) => (
<IconContainer {...props}>
{(svgProps) => <Box component={IconNumberedListSvg} {...svgProps} />}
</IconContainer>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import source from '@braid-design-system/source.macro';
import type { ComponentDocs } from 'site/types';

import { IconRedo, Heading, Stack } from '../../';
import { iconDocumentation } from '../iconCommon.docs';

const docs: ComponentDocs = {
category: 'Icon',
Example: () =>
source(
<Stack space="none" align="center">
<Heading component="div" level="1">
<IconRedo />
</Heading>
</Stack>,
),
alternatives: [],
additional: [...iconDocumentation],
};

export default docs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Box } from '../../Box/Box';
import { IconContainer, type IconContainerProps } from '../IconContainer';

import { IconRedoSvg } from './IconRedoSvg';

export type IconRedoProps = IconContainerProps;

export const IconRedo = (props: IconRedoProps) => (
<IconContainer {...props}>
{(svgProps) => <Box component={IconRedoSvg} {...svgProps} />}
</IconContainer>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import source from '@braid-design-system/source.macro';
import type { ComponentDocs } from 'site/types';

import { IconTitle, Heading, Stack } from '../../';
import { iconDocumentation } from '../iconCommon.docs';

const docs: ComponentDocs = {
category: 'Icon',
Example: () =>
source(
<Stack space="none" align="center">
<Heading component="div" level="1">
<IconTitle />
</Heading>
</Stack>,
),
alternatives: [],
additional: [...iconDocumentation],
};

export default docs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Box } from '../../Box/Box';
import { IconContainer, type IconContainerProps } from '../IconContainer';

import { IconTitleSvg } from './IconTitleSvg';

export type IconTitleProps = IconContainerProps;

export const IconTitle = (props: IconTitleProps) => (
<IconContainer {...props}>
{(svgProps) => <Box component={IconTitleSvg} {...svgProps} />}
</IconContainer>
);
Loading

0 comments on commit 60e3bbf

Please sign in to comment.