Skip to content

Commit 3498124

Browse files
committed
feat: add icons
1 parent 0b75c16 commit 3498124

File tree

168 files changed

+2629
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+2629
-73
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
!.storybook
22
dist/**
33
storybook-static/**
4+
src/icons/**

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dist
22
node_modules
33
.yarn
4+
src/icons/**

.storybook/main.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const path = require('path');
2+
13
const { VanillaExtractPlugin } = require('@vanilla-extract/webpack-plugin');
24

35
module.exports = {
@@ -59,6 +61,11 @@ module.exports = {
5961
});
6062

6163
config.resolve.extensions.push('.svg');
64+
config.resolve.alias = {
65+
...config.resolve.alias,
66+
// '@icons/$': resolve.resolve(__dirname, '../src/icons/'),
67+
'@icons': path.resolve(__dirname, '../src/icons/'),
68+
};
6269

6370
return config;
6471
},

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"module": "dist/index.esm.js",
1717
"typings": "dist/index.d.ts",
1818
"scripts": {
19-
"build": "rollup -c rollup.config.js",
19+
"build": "yarn build:icons && rollup -c rollup.config.js",
20+
"build:icons": "svgr ./src/icons/raw --out-dir ./src/icons --typescript",
2021
"build-storybook": "NODE_OPTIONS=--openssl-legacy-provider; build-storybook",
2122
"cleanup": "yarn exec rm -rf dist node_modules",
2223
"format": "yarn prettier --write .",
@@ -31,7 +32,6 @@
3132
"watch": "yarn build --watch"
3233
},
3334
"dependencies": {
34-
"@lace/icons": "file:.yalc/@lace/icons",
3535
"@radix-ui/react-alert-dialog": "^1.0.4",
3636
"@radix-ui/react-avatar": "^1.0.2",
3737
"@radix-ui/react-checkbox": "^1.0.4",
@@ -62,6 +62,7 @@
6262
"recharts": "^2.6.2"
6363
},
6464
"devDependencies": {
65+
"@babel/cli": "^7.22.10",
6566
"@babel/core": "^7.21.0",
6667
"@rollup/plugin-commonjs": "20.0.0",
6768
"@rollup/plugin-image": "2.1.1",
@@ -77,6 +78,7 @@
7778
"@storybook/react": "^6.5.16",
7879
"@storybook/test-runner": "^0.10.0",
7980
"@storybook/testing-library": "^0.0.13",
81+
"@svgr/cli": "^8.1.0",
8082
"@svgr/rollup": "^6.1.2",
8183
"@svgr/webpack": "^6.5.1",
8284
"@types/react": "^18.3.3",

src/design-system/action-card/action-card.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as RefreshIcon } from '@lace/icons/dist/RefreshComponent';
3+
import RefreshIcon from '@icons/RefreshComponent';
44
import type { Meta } from '@storybook/react';
55

66
import { Box } from '../box';

src/design-system/asset-input/ticker-button.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as ChevronRight } from '@lace/icons/dist/ChevronRightComponent';
3+
import ChevronRight from '@icons/ChevronRightComponent';
44

55
import { Text } from '../text';
66

src/design-system/auto-suggest-box/auto-suggest-box-close-button.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as CloseIcon } from '@lace/icons/dist/CloseComponent';
3+
import CloseIcon from '@icons/CloseComponent';
44

55
import * as cx from './auto-suggest-box-button.css';
66

src/design-system/auto-suggest-box/auto-suggest-box-icon.component.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

3-
import { ReactComponent as CheckIcon } from '@lace/icons/dist/CheckFileUploadComponent';
4-
import { ReactComponent as LoadingIcon } from '@lace/icons/dist/LoadingComponent';
3+
import CheckIcon from '@icons/CheckFileUploadComponent';
4+
import LoadingIcon from '@icons/LoadingComponent';
55
import cn from 'classnames';
66

77
import { Box } from '../box';

src/design-system/auto-suggest-box/auto-suggest-box-open-button.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as BookIcon } from '@lace/icons/dist/BookComponent';
3+
import BookIcon from '@icons/BookComponent';
44

55
import * as cx from './auto-suggest-box-button.css';
66

src/design-system/bundle-input/bundle-input.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Fragment } from 'react';
22
import type { PropsWithChildren } from 'react';
33

4-
import { ReactComponent as PlusSmall } from '@lace/icons/dist/PlusSmallComponent';
4+
import PlusSmall from '@icons/PlusSmallComponent';
55

66
import { AssetInput } from '../asset-input';
77
import { Box } from '../box';

src/design-system/bundle-input/remove-button.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as CloseIcon } from '@lace/icons/dist/CloseComponent';
3+
import CloseIcon from '@icons/CloseComponent';
44
import classNames from 'classnames';
55

66
import * as cx from './remove-button.css';

src/design-system/buttons/buttons.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as QuestionMark } from '@lace/icons/dist/QuestionMarkComponent';
3+
import QuestionMark from '@icons/QuestionMarkComponent';
44
import type { Meta } from '@storybook/react';
55

66
import { Variants, Section, page, UIStateTable } from '../decorators';

src/design-system/checkbox/checkbox.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import type { ReactNode } from 'react';
33

4-
import { ReactComponent as CheckIcon } from '@lace/icons/dist/CheckBoxComponent';
4+
import CheckIcon from '@icons/CheckBoxComponent';
55
import * as RadixCheckbox from '@radix-ui/react-checkbox';
66
import cn from 'classnames';
77

src/design-system/control-buttons/control-buttons.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as PlusCircle } from '@lace/icons/dist/PlusCircleComponent';
3+
import PlusCircle from '@icons/PlusCircleComponent';
44
import type { Meta } from '@storybook/react';
55

66
import { page, Variants, Section, UIStateTable } from '../decorators';

src/design-system/dapp-transaction-summary/dapp-transaction-summary.component.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

3-
import { ReactComponent as CardanoLogoComponent } from '@lace/icons/dist/CardanoLogoComponent';
4-
import { ReactComponent as InfoIcon } from '@lace/icons/dist/InfoComponent';
3+
import CardanoLogoComponent from '@icons/CardanoLogoComponent';
4+
import InfoIcon from '@icons/InfoComponent';
55

66
import { Box } from '../box';
77
import { Flex } from '../flex';

src/design-system/dapp-transaction-summary/dapp-transaction-text-field.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ReactNode } from 'react';
22
import React from 'react';
33

4-
import { ReactComponent as InfoIcon } from '@lace/icons/dist/InfoComponent';
4+
import InfoIcon from '@icons/InfoComponent';
55

66
import { Box } from '../box';
77
import { Flex } from '../flex';

src/design-system/educational-card/educational-card.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as ShieldIcon } from '@lace/icons/dist/ShieldGradientComponent';
3+
import ShieldIcon from '@icons/ShieldGradientComponent';
44
import type { Meta } from '@storybook/react';
55

66
import { Box } from '../box';

src/design-system/file-upload/file-upload.component.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

3-
import { ReactComponent as CheckFileUploadIcon } from '@lace/icons/dist/CheckFileUploadComponent';
4-
import { ReactComponent as UploadIcon } from '@lace/icons/dist/UploadGradientComponent';
3+
import CheckFileUploadIcon from '@icons/CheckFileUploadComponent';
4+
import UploadIcon from '@icons/UploadGradientComponent';
55

66
import { Box } from '../box';
77
import { Divider } from '../divider';

src/design-system/icon-buttons/caret-button.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as CaretIcon } from '@lace/icons/dist/CaretComponent';
3+
import CaretIcon from '@icons/CaretComponent';
44
import cn from 'classnames';
55

66
import * as cx from './caret-button.css';

src/design-system/icon-buttons/icon-buttons.stories.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

3-
import { ReactComponent as PlainCircle } from '@lace/icons/dist/PlainCircleComponent';
4-
import { ReactComponent as PlusCircleIcon } from '@lace/icons/dist/PlusCircleComponent';
3+
import PlainCircle from '@icons/PlainCircleComponent';
4+
import PlusCircleIcon from '@icons/PlusCircleComponent';
55
import type { Meta } from '@storybook/react';
66

77
import { page, Variants, Section, UIStateTable } from '../decorators';

src/design-system/icon-buttons/secondary-button.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as LaceGradient } from '@lace/icons/dist/LaceGradientComponent';
3+
import LaceGradient from '@icons/LaceGradientComponent';
44
import classNames from 'classnames';
55

66
import { NavigationSkeletonButton } from './icon-skeleton-button.component';

src/design-system/info-bar/info-bar.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as InfoIcon } from '@lace/icons/dist/InfoComponent';
3+
import InfoIcon from '@icons/InfoComponent';
44

55
import { LocalThemeProvider, ThemeColorScheme } from '../../design-tokens';
66
import { page, Section, Variants } from '../decorators';

src/design-system/loader/loader.component.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { SVGProps } from 'react';
22
import React from 'react';
33

4-
import { ReactComponent as LoaderDarkIcon } from '@lace/icons/dist/LoaderDarkGradientComponent';
5-
import { ReactComponent as LoaderLightIcon } from '@lace/icons/dist/LoaderLightGradientComponent';
4+
import LoaderDarkIcon from '@icons/LoaderDarkGradientComponent';
5+
import LoaderLightIcon from '@icons/LoaderLightGradientComponent';
66
import cn from 'classnames';
77

88
import { ThemeColorScheme, sx, useTheme } from '../../design-tokens';

src/design-system/message/message.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as HappyEmoji } from '@lace/icons/dist/HappyEmojiComponent';
3+
import HappyEmoji from '@icons/HappyEmojiComponent';
44

55
import { Box } from '../box';
66
import { Flex } from '../flex';

src/design-system/navigation-buttons/back-button.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as ArrowLeftIcon } from '@lace/icons/dist/ArrowLeftComponent';
3+
import ArrowLeftIcon from '@icons/ArrowLeftComponent';
44

55
import * as cx from './back-button.css';
66
import { NavigationSkeletonButton } from './navigation-skeleton-button.component';

src/design-system/navigation-buttons/close-button.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as CloseIcon } from '@lace/icons/dist/CloseComponent';
3+
import CloseIcon from '@icons/CloseComponent';
44

55
import * as cx from './close-button.css';
66
import { NavigationSkeletonButton } from './navigation-skeleton-button.component';

src/design-system/password-box/password-box-button.component.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

3-
import { ReactComponent as CloseEye } from '@lace/icons/dist/EyeCloseComponent';
4-
import { ReactComponent as OpenEye } from '@lace/icons/dist/EyeOpenComponent';
3+
import CloseEye from '@icons/EyeCloseComponent';
4+
import OpenEye from '@icons/EyeOpenComponent';
55
import cn from 'classnames';
66

77
import * as cx from './password-box-button.css';

src/design-system/profile-dropdown/profile-dropdown-trigger.component.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { ComponentPropsWithoutRef } from 'react';
22
import React from 'react';
33

4-
import { ReactComponent as ChevronDown } from '@lace/icons/dist/ChevronDownComponent';
5-
import { ReactComponent as ChevronUp } from '@lace/icons/dist/ChevronUpComponent';
4+
import ChevronDown from '@icons/ChevronDownComponent';
5+
import ChevronUp from '@icons/ChevronUpComponent';
66
import classNames from 'classnames';
77

88
import { Box } from '../box';

src/design-system/profile-dropdown/profile-dropdown-wallet-icon.component.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { FC } from 'react';
22
import React from 'react';
33

4-
import { ReactComponent as ColdWallet } from '@lace/icons/dist/HardwareWalletComponent';
5-
import { ReactComponent as SharedWallet } from '@lace/icons/dist/UserGroupComponent';
6-
import { ReactComponent as HotWallet } from '@lace/icons/dist/WalletComponent';
4+
import ColdWallet from '@icons/HardwareWalletComponent';
5+
import SharedWallet from '@icons/UserGroupComponent';
6+
import HotWallet from '@icons/WalletComponent';
77

88
import { Flex } from '../flex';
99

src/design-system/profile-dropdown/profile-dropdown-wallet-option.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ComponentPropsWithoutRef } from 'react';
22
import React from 'react';
33

4-
import { ReactComponent as ChevronRight } from '@lace/icons/dist/ChevronRightThinComponent';
4+
import ChevronRight from '@icons/ChevronRightThinComponent';
55
import classNames from 'classnames';
66

77
import { Box } from '../box';

src/design-system/radio-button/radio-button.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ReactElement } from 'react';
22
import React, { useMemo, useState } from 'react';
33

4-
import { ReactComponent as DocumentDownload } from '@lace/icons/dist/DocumentDownload';
4+
import DocumentDownload from '@icons/DocumentDownload';
55
import type { Meta } from '@storybook/react';
66
import { v4 as uuid } from 'uuid';
77

src/design-system/search-box/search-box-clear-button.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { forwardRef } from 'react';
22
import type { MouseEvent, Ref } from 'react';
33

4-
import { ReactComponent as CloseIcon } from '@lace/icons/dist/CloseComponent';
4+
import CloseIcon from '@icons/CloseComponent';
55
import classNames from 'classnames';
66

77
import * as cx from './search-box-clear-button.css';

src/design-system/search-box/search-box-icon.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as Search } from '@lace/icons/dist/SearchComponent';
3+
import Search from '@icons/SearchComponent';
44

55
import { Flex } from '../flex';
66

src/design-system/select/select-item/select-item-indicator.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { forwardRef } from 'react';
22

3-
import { ReactComponent as CheckIcon } from '@lace/icons/dist/CheckComponent';
3+
import CheckIcon from '@icons/CheckComponent';
44
import * as Select from '@radix-ui/react-select';
55

66
import * as cx from './select-item-indicator.css';

src/design-system/select/select-root.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ReactNode } from 'react';
22
import React from 'react';
33

4-
import { ReactComponent as ChevronDownIcon } from '@lace/icons/dist/ChevronDownComponent';
4+
import ChevronDownIcon from '@icons/ChevronDownComponent';
55
import * as Select from '@radix-ui/react-select';
66

77
import { Item, ItemRoot } from './select-item';

src/design-system/summary-expander/summary-expander-trigger.component.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { PropsWithChildren } from 'react';
22
import React from 'react';
33

4-
import { ReactComponent as ChevronDown } from '@lace/icons/dist/ChevronDownComponent';
5-
import { ReactComponent as ChevronUp } from '@lace/icons/dist/ChevronUpComponent';
4+
import ChevronDown from '@icons/ChevronDownComponent';
5+
import ChevronUp from '@icons/ChevronUpComponent';
66

77
import { Flex } from '../flex';
88

src/design-system/toast-bar/toast-bar-root.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import type { ComponentProps, ReactNode } from 'react';
33

4-
import { ReactComponent as CloseIcon } from '@lace/icons/dist/CloseComponent';
4+
import CloseIcon from '@icons/CloseComponent';
55
import * as Toast from '@radix-ui/react-toast';
66
import classNames from 'classnames';
77

src/design-system/toast-bar/toast-bar.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as PlainCircle } from '@lace/icons/dist/PlainCircleComponent';
3+
import PlainCircle from '@icons/PlainCircleComponent';
44
import * as Toast from '@radix-ui/react-toast';
55
import { expect } from '@storybook/jest';
66
import type { ComponentStory, Meta } from '@storybook/react';

src/design-system/toggle-switch/toggle-switch.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as InfoIcon } from '@lace/icons/dist/InfoComponent';
3+
import InfoIcon from '@icons/InfoComponent';
44
import type { Meta } from '@storybook/react';
55

66
import { ThemeColorScheme, LocalThemeProvider } from '../../design-tokens';

src/design-system/transaction-summary/transaction-summary-amount.component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as InfoIcon } from '@lace/icons/dist/InfoComponent';
3+
import InfoIcon from '@icons/InfoComponent';
44

55
import { Box } from '../box';
66
import { Flex } from '../flex';

0 commit comments

Comments
 (0)