Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced 'iconoir-react' with '@tokens-studio/icons' where possible #532

Merged
merged 10 commits into from
Nov 27, 2024
1 change: 1 addition & 0 deletions packages/graph-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@rematch/core": "2.2.0",
"@stitches/react": "1.2.8",
"@tokens-studio/graph-engine": "*",
"@tokens-studio/icons": "^0.1.3",
"@tokens-studio/tokens": "^0.0.24",
"@tokens-studio/types": "^0.2.3",
"@tokens-studio/ui": "^0.6.9",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Popover from '@radix-ui/react-popover';
import { Xmark } from 'iconoir-react';
import { Xmark } from '@tokens-studio/icons';
SorsOps marked this conversation as resolved.
Show resolved Hide resolved
import { keyframes, styled } from '@/lib/stitches/index.js';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { Node } from '@tokens-studio/graph-engine';
import { NodeRequest } from '@/editor/actions/createNode.js';
import { Node as ReactFlowNode, useReactFlow } from 'reactflow';
import { Search } from 'iconoir-react';
import { Search } from '@tokens-studio/icons';
import { isActiveElementTextEditable } from '@/utils/isActiveElementTextEditable.js';
import { observer } from 'mobx-react-lite';
import { showNodesCmdPaletteSelector } from '@/redux/selectors/ui.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-editor/src/components/controls/array.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
TextInput,
} from '@tokens-studio/ui';
import { ColorPickerPopover } from '../colorPicker/index.js';
import { FloppyDisk, Minus, Plus } from 'iconoir-react';
import { FloppyDisk, Minus, Plus } from '@tokens-studio/icons';
import { IField } from './interface.js';
import { JSONTree } from 'react-json-tree';
import { delayedUpdateSelector } from '@/redux/selectors/index.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-editor/src/components/controls/color.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, IconButton, Stack, Text } from '@tokens-studio/ui';
import { ColorPickerPopover } from '../colorPicker/index.js';
import { FloppyDisk } from 'iconoir-react';
import { FloppyDisk } from '@tokens-studio/icons';
import { IField } from './interface.js';
import { Input, hexToColor, toColor, toHex } from '@tokens-studio/graph-engine';
import { delayedUpdateSelector } from '@/redux/selectors/index.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-editor/src/components/controls/numeric.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FloppyDisk } from 'iconoir-react';
import { FloppyDisk } from '@tokens-studio/icons';
import { IField } from './interface.js';
import { IconButton, Stack, TextInput } from '@tokens-studio/ui';
import { Input } from '@tokens-studio/graph-engine';
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-editor/src/components/controls/slider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FloppyDisk } from 'iconoir-react';
import { FloppyDisk } from '@tokens-studio/icons';
import { IField } from './interface.js';
import { IconButton, Stack, Text } from '@tokens-studio/ui';
import { Input } from '@tokens-studio/graph-engine';
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-editor/src/components/controls/string.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FloppyDisk } from 'iconoir-react';
import { FloppyDisk } from '@tokens-studio/icons';
import { IField } from './interface.js';
import { IconButton, Stack, Text, TextInput } from '@tokens-studio/ui';
import { Input } from '@tokens-studio/graph-engine';
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-editor/src/components/controls/text.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FloppyDisk } from 'iconoir-react';
import { FloppyDisk } from '@tokens-studio/icons';
import { IField } from './interface.js';
import { IconButton, Textarea as UITextarea } from '@tokens-studio/ui';
import { Input } from '@tokens-studio/graph-engine';
Expand Down
9 changes: 8 additions & 1 deletion packages/graph-editor/src/components/debugger/player.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { DebugInfo } from './data.js';
import { IconButton, Select, Stack, Text } from '@tokens-studio/ui';
import { Pause, Play, Trash, UndoAction, ZoomIn, ZoomOut } from 'iconoir-react';
import {
Pause,
Play,
Trash,
UndoAction,
ZoomIn,
ZoomOut,
} from '@tokens-studio/icons';
import { TimelineState } from '@xzdarcy/react-timeline-editor';
import React, { useEffect, useState } from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, Dialog, IconButton, Text, TextInput } from '@tokens-studio/ui';
import { Xmark } from 'iconoir-react';
import { Xmark } from '@tokens-studio/icons';
import { title as annotatedTitle } from '@/annotations/index.js';
import {
graphEditorSelector,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BaseNodeWrapper } from '../wrapper/base.js';
import { Box, IconButton, Textarea } from '@tokens-studio/ui';
import { EditPencil } from 'iconoir-react';
import { EditPencil } from '@tokens-studio/icons';
import { Node } from '@tokens-studio/graph-engine';
import { NodeProps, NodeResizer } from 'reactflow';
import { description, title } from '@/annotations/index.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-editor/src/components/menubar/defaults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Play,
Settings as SettingsIcon,
Upload,
} from 'iconoir-react';
} from '@tokens-studio/icons';
import { DebugPanel } from '../panels/debugger/index.js';
import { DropPanel } from '../panels/dropPanel/index.js';
import { GraphPanel } from '../panels/graph/index.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import {
AlignHorizontalCenters,
AlignVerticalCenters,
CompAlignBottom,
CompAlignBottomSolid,
CompAlignLeft,
CompAlignRight,
CompAlignTop,
CompAlignTopSolid,
} from 'iconoir-react';
} from '@tokens-studio/icons';
import {
AlignHorizontalCentersSolid,
AlignVerticalCentersSolid,
CompAlignBottomSolid,
CompAlignLeftSolid,
CompAlignRightSolid,
CompAlignTopSolid,
} from 'iconoir-react';
import { Box, IconButton, Stack, Text } from '@tokens-studio/ui';
import { Node } from 'reactflow';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Accordion, Box, Stack, Text, TextInput } from '@tokens-studio/ui';
import { DragItem } from './DragItem.js';
import { DropPanelStore } from './data.js';
import { IconoirProvider, NavArrowRight } from 'iconoir-react';
import { IconoirProvider } from 'iconoir-react';
Copy link
Member

Choose a reason for hiding this comment

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

Check where this is used, we just need a wrapper around the icons used to make sure they are the correct size

import { NavArrowRight } from '@tokens-studio/icons';
import { NodeEntry } from './NodeEntry.js';
import { observer } from 'mobx-react-lite';
import { panelItemsSelector } from '@/redux/selectors/registry.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box, IconButton, Label, Stack, TextInput } from '@tokens-studio/ui';
import React, { useState } from 'react';

import { FloppyDisk } from 'iconoir-react';
import { FloppyDisk } from '@tokens-studio/icons';
import { JSONTree } from 'react-json-tree';
import { description, title } from '@/annotations/index.js';
import { observer } from 'mobx-react-lite';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, Heading, IconButton, Stack } from '@tokens-studio/ui';
import React, { useMemo } from 'react';

import { DynamicInputs } from './dynamicInputs.js';
import { InfoCircle } from 'iconoir-react';
import { InfoCircle } from '@tokens-studio/icons';
import { PortPanel } from '@/components/portPanel/index.js';
import { annotatedDynamicInputs } from '@tokens-studio/graph-engine';
import { currentNode } from '@/redux/selectors/graph.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-editor/src/components/panels/logs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, IconButton, Stack, Text, TextInput } from '@tokens-studio/ui';
import React, { useCallback, useEffect, useRef } from 'react';

import { JSONTree } from 'react-json-tree';
import { Trash } from 'iconoir-react';
import { Trash } from '@tokens-studio/icons';
import { logSelector } from '@/redux/selectors/graph.js';
import { useDispatch } from '@/hooks/index.js';
import { useSelector } from 'react-redux';
Expand Down
4 changes: 2 additions & 2 deletions packages/graph-editor/src/components/portPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import React, { useCallback, useMemo } from 'react';
import {
Download,
EyeClosed,
EyeSolid,
MoreVert,
Puzzle,
Undo,
Xmark,
} from 'iconoir-react';
} from '@tokens-studio/icons';
import { EyeSolid } from 'iconoir-react';
import { IField } from '@/components/controls/interface.js';
import { InlineTypeLabel } from '@/components/flow/index.js';
import { controls } from '@/redux/selectors/registry.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Download } from 'iconoir-react';
import { Download } from '@tokens-studio/icons';
import { IconButton, Tooltip } from '@tokens-studio/ui';
import { ImperativeEditorRef } from '@/editor/editorTypes.js';
import { mainGraphSelector } from '@/redux/selectors/graph.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IconButton, Tooltip } from '@tokens-studio/ui';
import { Settings } from 'iconoir-react';
import { Settings } from '@tokens-studio/icons';
import { useLayoutButton } from '../../../hooks/useLayoutButton.js';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IconButton, Tooltip } from '@tokens-studio/ui';
import { ImperativeEditorRef } from '@/editor/editorTypes.js';
import { Upload } from 'iconoir-react';
import { Upload } from '@tokens-studio/icons';
import { mainGraphSelector } from '@/redux/selectors/graph.js';
import { useSelector } from 'react-redux';
import React from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, DropdownMenu, Stack, Tooltip } from '@tokens-studio/ui';
import { NavArrowRight, Plus } from 'iconoir-react';
import { NavArrowRight, Plus } from '@tokens-studio/icons';
import { panelItemsSelector } from '@/redux/selectors/index.js';
import { useAction } from '@/editor/actions/provider.js';
import { useDispatch } from '@/hooks/index.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
CompAlignLeft,
CompAlignRight,
CompAlignTop,
} from 'iconoir-react';
} from '@tokens-studio/icons';
import { DropdownMenu, IconButton, Tooltip } from '@tokens-studio/ui';
import { Node } from 'reactflow';
import { graphEditorSelector } from '@/redux/selectors/index.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChatBubbleQuestion } from 'iconoir-react';
import { ChatBubbleQuestion } from '@tokens-studio/icons';
import { DropdownMenu, IconButton, Tooltip } from '@tokens-studio/ui';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DropdownMenu, IconButton, Tooltip } from '@tokens-studio/ui';
import { LayoutLeft } from 'iconoir-react';
import { LayoutLeft } from '@tokens-studio/icons';
import { dockerSelector } from '@/redux/selectors/index.js';
import { useLayoutButton } from '../../../hooks/useLayoutButton.js';
import { useSelector } from 'react-redux';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, DropdownMenu } from '@tokens-studio/ui';
import { NavArrowRight } from 'iconoir-react';
import { NavArrowRight } from '@tokens-studio/icons';
import { getViewports } from '@/components/hotKeys/index.js';
import { savedViewports } from '@/annotations/index.js';
import { useLocalGraph } from '@/hooks/index.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IconButton } from '@tokens-studio/ui';
import { Pause, Play, Square } from 'iconoir-react';
import { Pause, Play, Square } from '@tokens-studio/icons';
import { playStateSelector } from '@/redux/selectors/index.js';
import { useDispatch, useSelector } from 'react-redux';
import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-editor/src/editor/layoutController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { ErrorBoundaryContent } from '@/components/ErrorBoundaryContent.js';
import { FindDialog } from '@/components/dialogs/findDialog.js';
import { IconButton, Stack, Tooltip } from '@tokens-studio/ui';
import { MAIN_GRAPH_ID } from '@/constants.js';
import { Maximize, Reduce, Xmark } from 'iconoir-react';
import { Maximize, Reduce, Xmark } from '@tokens-studio/icons';
import { OutputSheet } from '@/components/panels/output/index.js';
import React, { MutableRefObject, useEffect, useMemo } from 'react';

Expand Down
4 changes: 2 additions & 2 deletions packages/graph-editor/src/registry/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {
EaseCurveControlPoints,
Hashtag,
InputOutput,
SelectPoint3d,
Text,
} from 'iconoir-react';
} from '@tokens-studio/icons';
import { SelectPoint3d } from 'iconoir-react';
import React from 'react';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-audio/src/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NODE } from '../schemas/index.js';
import { SoundHigh } from 'iconoir-react';
import { SoundHigh } from '@tokens-studio/icons';
import React from 'react';

export const icons = {
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-design-tokens/src/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CubeHole, DatabaseScript } from 'iconoir-react';
import { CubeHole, DatabaseScript } from '@tokens-studio/icons';
import { REFERENCE, TOKEN, TOKEN_SET } from '../schemas/index.js';
import React from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-fs/src/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EmptyPage } from 'iconoir-react';
import { EmptyPage } from '@tokens-studio/icons';
import { FILE } from '../schemas/index.js';
import React from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-image/src/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IMAGE } from '../schemas/index.js';
import { MediaImage } from 'iconoir-react';
import { MediaImage } from '@tokens-studio/icons';
import React from 'react';

export const icons = {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/app/dashboard/clientPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Search,
Upload,
Xmark
} from 'iconoir-react';
} from '@tokens-studio/icons';
import {
Box,
Button,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/app/marketplace/clientPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Stack,
Text
} from '@tokens-studio/ui';
import { Download, Heart } from 'iconoir-react';
import { Download, Heart } from '@tokens-studio/icons';
import { client } from '@/api/sdk/index.ts';
import { styled } from '@tokens-studio/graph-editor';
import { useErrorToast } from '@/hooks/useToast.tsx';
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/app/marketplace/graph/[id]/clientPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Tabs,
Text
} from '@tokens-studio/ui';
import { Download, Heart } from 'iconoir-react';
import { Download, Heart } from '@tokens-studio/icons';
import { ImageHolder, PreviewImage } from '../../clientPage.tsx';
import { client } from '@/api/sdk/index.ts';
import { useErrorToast } from '@/hooks/useToast.tsx';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { client } from '@/api/sdk/index.ts';
import { useParams, useRouter } from 'next/navigation.js';
import MDEditor from '@uiw/react-md-editor';
//Add rehype to prevent any client of injecting malicious code
import { Upload } from 'iconoir-react';
import { Upload } from '@tokens-studio/icons';
import { useState } from 'react';
import rehypeSanitize from 'rehype-sanitize';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/EmptyStateEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BatteryCharging, JournalPage, PagePlus } from 'iconoir-react';
import { BatteryCharging, JournalPage, PagePlus } from '@tokens-studio/icons';
import { Box, Button, EmptyState, Stack } from '@tokens-studio/ui';
import { useCallback } from 'react';
import { useDispatch } from '@tokens-studio/graph-editor';
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ExamplesPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box, Stack, Text } from '@tokens-studio/ui';
import { Command } from 'cmdk';
import { IExample } from '../types/IExample.tsx';
import { Search } from 'iconoir-react';
import { Search } from '@tokens-studio/icons';
import { examples } from '../data/examples/examples.tsx';
import React from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/editor/menu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Book } from 'iconoir-react';
import { Book } from '@tokens-studio/icons';
import {
MenuItem,
MenuItemElement,
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/editor/panelItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import {
DatabaseScript,
EaseCurveControlPoints,
EditPencil,
EyeSolid,
FillColor,
SigmaFunction,
SoundHigh,
Star,
Text,
TwoPointsCircle,
Type
} from 'iconoir-react';
} from '@tokens-studio/icons';
import { EyeSolid } from 'iconoir-react';
import {
PanelGroup,
PanelItem,
Expand Down
3 changes: 2 additions & 1 deletion packages/ui/src/components/editor/toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import {
} from '@tokens-studio/graph-editor';

import { AISummary } from './panels/aiSummary.tsx';
import { FloppyDisk, ShareAndroidSolid, Sparks, XrayView } from 'iconoir-react';
import { FloppyDisk, Sparks, XrayView } from '@tokens-studio/icons';
import { IconButton, Tooltip } from '@tokens-studio/ui';
import { Preview } from './panels/preview.tsx';
import { ShareAndroidSolid } from 'iconoir-react';
import { SharePopover } from '../share/index.tsx';
import { client } from '@/api/sdk/index.ts';
import { useErrorToast } from '@/hooks/useToast.tsx';
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/rail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Stack,
Tooltip
} from '@tokens-studio/ui';
import { GitMerge, Home, Settings, ShoppingBag } from 'iconoir-react';
import { GitMerge, Home, Settings, ShoppingBag } from '@tokens-studio/icons';
import { client } from '@/api/sdk/index.ts';
import Image from 'next/image.js';
import Link from 'next/link.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/share/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Popover from '@radix-ui/react-popover';
import { Box, IconButton, Label, Stack, TextInput } from '@tokens-studio/ui';
import { Copy, Xmark } from 'iconoir-react';
import { Copy, Xmark } from '@tokens-studio/icons';
import { styled } from '@tokens-studio/graph-editor';
import React from 'react';
import copy from 'copy-to-clipboard';
Expand Down
Loading