Skip to content

Commit

Permalink
refactor: split out icons
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Sep 22, 2023
1 parent 2581afc commit 88ec0b0
Show file tree
Hide file tree
Showing 199 changed files with 517 additions and 530 deletions.
3 changes: 1 addition & 2 deletions apps/explorer/components/Contract/ContractHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {
ArrowLeft16,
ArrowRight16,
Badge,
ContractTimeline,
LinkButton,
} from '@siafoundation/design-system'
import { ArrowLeft16, ArrowRight16 } from '@siafoundation/react-icons'
import {
SiaCentralContract,
getSiaCentralBlockLatest,
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/components/EntityHeading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
humanId,
Button,
Link,
Copy16,
EntityType,
} from '@siafoundation/design-system'
import { Copy16 } from '@siafoundation/react-icons'
import { upperFirst } from 'lodash'

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/components/Faucet/FaucetStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
Button,
Copy24,
copyToClipboard,
Label,
LoadingDots,
Expand All @@ -11,6 +10,7 @@ import {
ValueCopyable,
ValueSc,
} from '@siafoundation/design-system'
import { Copy24 } from '@siafoundation/react-icons'
import BigNumber from 'bignumber.js'
import { useEffect, useState } from 'react'
import { useFaucetStatus } from '../../hooks/useFaucetStatus'
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/components/Faucet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import {
Container,
FaucetIcon,
Heading,
Panel,
Tabs,
Expand All @@ -12,6 +11,7 @@ import {
Text,
webLinks,
} from '@siafoundation/design-system'
import { FaucetIcon } from '@siafoundation/react-icons'
import { useCallback, useEffect, useState } from 'react'
import { FaucetFundForm } from './FaucetFundForm'
import { FaucetStatus } from './FaucetStatus'
Expand Down
9 changes: 2 additions & 7 deletions apps/explorer/components/FaucetSkeleton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import {
Container,
Panel,
Text,
FaucetIcon,
Heading,
} from '@siafoundation/design-system'
import { Container, Panel, Text, Heading } from '@siafoundation/design-system'
import { FaucetIcon } from '@siafoundation/react-icons'
import { networkName } from '../../config'

export function FaucetSkeleton() {
Expand Down
6 changes: 4 additions & 2 deletions apps/explorer/components/Home/HostListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import {
EntityListItemLayoutProps,
Text,
Tooltip,
Link,
} from '@siafoundation/design-system'
import {
CloudDownload16,
CloudUpload16,
VmdkDisk16,
Link,
} from '@siafoundation/design-system'
} from '@siafoundation/react-icons'
import {
SiaCentralExchangeRates,
SiaCentralHost,
Expand Down
10 changes: 6 additions & 4 deletions apps/explorer/components/Host/HostInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import {
CheckmarkFilled16,
Fork16,
Separator,
Text,
Time16,
Tooltip,
ValueCopyable,
WarningFilled16,
countryCodeEmoji,
} from '@siafoundation/design-system'
import {
CheckmarkFilled16,
Fork16,
Time16,
WarningFilled16,
} from '@siafoundation/react-icons'
import { SiaCentralHost } from '@siafoundation/sia-central'
import { humanDate } from '@siafoundation/sia-js'
import { formatDistance } from 'date-fns'
Expand Down
5 changes: 2 additions & 3 deletions apps/explorer/components/Host/HostPricing.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
'use client'

import { Text, Tooltip } from '@siafoundation/design-system'
import {
CloudDownload16,
CloudUpload16,
Text,
Tooltip,
VmdkDisk16,
} from '@siafoundation/design-system'
} from '@siafoundation/react-icons'
import {
SiaCentralExchangeRates,
SiaCentralHost,
Expand Down
7 changes: 2 additions & 5 deletions apps/explorer/components/HostSkeleton/HostHeaderSkeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { Avatar, Separator, Skeleton, Text } from '@siafoundation/design-system'
import {
Avatar,
CloudDownload16,
CloudUpload16,
Separator,
Skeleton,
Text,
VmdkDisk16,
} from '@siafoundation/design-system'
} from '@siafoundation/react-icons'

export function HostHeaderSkeleton() {
return (
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/components/Layout/NavDropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import {
Link,
DropdownMenuGroup,
DropdownMenuLabel,
Menu24,
CurrencySelector,
ThemeRadio,
} from '@siafoundation/design-system'
import { Menu24 } from '@siafoundation/react-icons'

type Props = React.ComponentProps<typeof Button> & {
trigger?: React.ReactNode
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/components/Layout/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
ConfigFields,
ControlGroup,
FieldText,
Search16,
triggerToast,
} from '@siafoundation/design-system'
import { Search16 } from '@siafoundation/react-icons'
import React, { useCallback } from 'react'
import { useRouter } from 'next/navigation'
import { useForm } from 'react-hook-form'
Expand Down
3 changes: 2 additions & 1 deletion apps/explorer/components/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FaucetIcon, LinkButton, Tooltip } from '@siafoundation/design-system'
import { LinkButton, Tooltip } from '@siafoundation/design-system'
import { FaucetIcon } from '@siafoundation/react-icons'
import { routes } from '../../config/routes'
import { Search } from './Search'
import { isMainnet, network, networkName, appName } from '../../config'
Expand Down
3 changes: 2 additions & 1 deletion apps/hostd/components/CmdRoot/CmdEmpty.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Query16, Text } from '@siafoundation/design-system'
import { Text } from '@siafoundation/design-system'
import { Query16 } from '@siafoundation/react-icons'

export type CmdEmptyProps = { search: string; debouncedSearch: string }

Expand Down
2 changes: 1 addition & 1 deletion apps/hostd/components/Config/AnnounceButton.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {
Button,
Bullhorn16,
Paragraph,
triggerErrorToast,
triggerSuccessToast,
} from '@siafoundation/design-system'
import { Bullhorn16 } from '@siafoundation/react-icons'
import { useDialog } from '../../contexts/dialog'
import { useSettingsAnnounce, useTxPoolFee } from '@siafoundation/react-hostd'
import { humanSiacoin } from '@siafoundation/sia-js'
Expand Down
9 changes: 5 additions & 4 deletions apps/hostd/components/Config/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ import {
Button,
triggerSuccessToast,
triggerErrorToast,
ConfigurationPanel,
useOnInvalid,
} from '@siafoundation/design-system'
import {
Reset16,
Save16,
Warning16,
CheckmarkFilled16,
ConfigurationPanel,
useOnInvalid,
} from '@siafoundation/design-system'
} from '@siafoundation/react-icons'
import { useCallback, useEffect, useMemo, useState } from 'react'
import { HostdSidenav } from '../HostdSidenav'
import { routes } from '../../config/routes'
import { useDialog } from '../../contexts/dialog'
import { HostdAuthedLayout } from '../../components/HostdAuthedLayout'
import {} from '@siafoundation/design-system'
import {
HostSettings,
useSettings,
Expand Down
3 changes: 1 addition & 2 deletions apps/hostd/components/Contracts/ContractContextMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import {
DropdownMenu,
Button,
Draggable16,
DropdownMenuLabel,
DropdownMenuItem,
triggerErrorToast,
triggerSuccessToast,
Code,
Link,
DropdownMenuLeftSlot,
DataCheck16,
Tooltip,
Text,
} from '@siafoundation/design-system'
import { Draggable16, DataCheck16 } from '@siafoundation/react-icons'
import {
ContractStatus,
useContractsIntegrityCheck,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
Button,
ScrollArea,
ControlGroup,
Close16,
truncate,
} from '@siafoundation/design-system'
import { Close16 } from '@siafoundation/react-icons'
import { Command } from 'cmdk'
import { useCallback, useEffect, useRef, useState } from 'react'
import { useContracts } from '../../../contexts/contracts'
Expand Down
8 changes: 5 additions & 3 deletions apps/hostd/components/Contracts/ContractsViewDropdownMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import {
Button,
CaretDown16,
SettingsAdjust16,
Select,
PoolCombo,
Label,
Popover,
MenuItemRightSlot,
BaseMenuItem,
MenuSeparator,
Reset16,
MenuSectionLabelToggleAll,
Option,
} from '@siafoundation/design-system'
import {
CaretDown16,
SettingsAdjust16,
Reset16,
} from '@siafoundation/react-icons'
import { SortField, sortOptions } from '../../contexts/contracts/types'
import { useContracts } from '../../contexts/contracts'
import { groupBy } from 'lodash'
Expand Down
3 changes: 2 additions & 1 deletion apps/hostd/components/Contracts/StateError.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MisuseOutline32, Text } from '@siafoundation/design-system'
import { Text } from '@siafoundation/design-system'
import { MisuseOutline32 } from '@siafoundation/react-icons'

export function StateError() {
return (
Expand Down
3 changes: 2 additions & 1 deletion apps/hostd/components/Contracts/StateNoneMatching.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Filter32, Text } from '@siafoundation/design-system'
import { Text } from '@siafoundation/design-system'
import { Filter32 } from '@siafoundation/react-icons'

export function StateNoneMatching() {
return (
Expand Down
3 changes: 2 additions & 1 deletion apps/hostd/components/Contracts/StateNoneYet.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FileContractIcon, Text } from '@siafoundation/design-system'
import { Text } from '@siafoundation/design-system'
import { FileContractIcon } from '@siafoundation/react-icons'

export function StateNoneYet() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
FolderAdd16,
Text,
TextField,
triggerErrorToast,
} from '@siafoundation/design-system'
import { FolderAdd16 } from '@siafoundation/react-icons'
import { useSystemDirectoryCreate } from '@siafoundation/react-hostd'
import { useHostOSPathSeparator } from '../../../hooks/useHostOSPathSeparator'
import { getChildDirectoryPath } from '../../../lib/system'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CommandItemSearch } from '../../CmdRoot/Item'
import { Page } from '../../CmdRoot/types'
import { FolderIcon, Text } from '@siafoundation/design-system'
import { Text } from '@siafoundation/design-system'
import { FolderIcon } from '@siafoundation/react-icons'
import { useHostOSPathSeparator } from '../../../hooks/useHostOSPathSeparator'
import { getParentDir } from '../../../lib/system'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Folder16, Text } from '@siafoundation/design-system'
import { Text } from '@siafoundation/design-system'
import { Folder16 } from '@siafoundation/react-icons'

export function DirectorySelectEmpty({ search }: { search: string }) {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Folder16, Text } from '@siafoundation/design-system'
import { Text } from '@siafoundation/design-system'
import { Folder16 } from '@siafoundation/react-icons'

export function DirectorySelectError() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CommandGroup, CommandItemSearch } from '../../CmdRoot/Item'
import { Page } from '../../CmdRoot/types'
import { FolderIcon, Text } from '@siafoundation/design-system'
import { Text } from '@siafoundation/design-system'
import { FolderIcon } from '@siafoundation/react-icons'
import { DirectorySelectEmpty } from './DirectorySelectEmpty'
import { SystemDirResponse } from '@siafoundation/react-hostd'
import { useHostOSPathSeparator } from '../../../hooks/useHostOSPathSeparator'
Expand Down
3 changes: 1 addition & 2 deletions apps/hostd/components/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import {
Button,
ControlGroup,
Text,
CalendarHeatMap16,
Tooltip,
Select,
Ruler16,
Option,
} from '@siafoundation/design-system'
import { CalendarHeatMap16, Ruler16 } from '@siafoundation/react-icons'
import { useMetrics } from '../../contexts/metrics'
import { HomeRevenue } from './HomeRevenue'
import { HomeStorage } from './HomeStorage'
Expand Down
5 changes: 2 additions & 3 deletions apps/hostd/components/HostdSidenav.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { SidenavItem, Text } from '@siafoundation/design-system'
import {
SidenavItem,
FileContractIcon,
BarsProgressIcon,
HouseIcon,
HardDriveIcon,
BellIcon,
Text,
} from '@siafoundation/design-system'
} from '@siafoundation/react-icons'
import { useAlerts } from '@siafoundation/react-hostd'
import { cx } from 'class-variance-authority'
import { routes } from '../config/routes'
Expand Down
3 changes: 2 additions & 1 deletion apps/hostd/components/Volumes/StateNoneYet.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { HardDriveIcon, Text } from '@siafoundation/design-system'
import { Text } from '@siafoundation/design-system'
import { HardDriveIcon } from '@siafoundation/react-icons'

export function StateNoneYet() {
return (
Expand Down
14 changes: 8 additions & 6 deletions apps/hostd/components/Volumes/VolumeContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ import {
DropdownMenu,
DropdownMenuItem,
Button,
Draggable16,
Ruler16,
Delete16,
DropdownMenuLeftSlot,
DropdownMenuLabel,
Locked16,
Edit16,
triggerErrorToast,
triggerSuccessToast,
Text,
truncate,
Close16,
} from '@siafoundation/design-system'
import {
Draggable16,
Ruler16,
Delete16,
Locked16,
Edit16,
Close16,
} from '@siafoundation/react-icons'
import {
VolumeStatus,
useVolume,
Expand Down
Loading

0 comments on commit 88ec0b0

Please sign in to comment.