)}
{isActive && (
-
+
)}
{isBusy ? (
@@ -349,7 +352,7 @@ export function AccountSwitcherTab() {
}
+ before={
}
onClick={handleAddAccount}
>
Add Account
@@ -358,7 +361,7 @@ export function AccountSwitcherTab() {
}
+ before={
}
onClick={handleOpenSettings}
>
Settings
diff --git a/src/app/pages/client/sidebar/CreateTab.tsx b/src/app/pages/client/sidebar/CreateTab.tsx
index 0d93621a9..695045340 100644
--- a/src/app/pages/client/sidebar/CreateTab.tsx
+++ b/src/app/pages/client/sidebar/CreateTab.tsx
@@ -1,5 +1,8 @@
import { MouseEventHandler, useState } from 'react';
-import { Box, config, Icon, Icons, Menu, PopOut, RectCords, Text } from 'folds';
+import { Box, config, Menu, PopOut, RectCords, Text } from 'folds';
+import { LinkIcon } from '@phosphor-icons/react/dist/csr/Link';
+import { PlusIcon } from '@phosphor-icons/react/dist/csr/Plus';
+import { UsersThreeIcon } from '@phosphor-icons/react/dist/csr/UsersThree';
import FocusTrap from 'focus-trap-react';
import { useNavigate } from 'react-router-dom';
import { SidebarAvatar, SidebarItem, SidebarItemTooltip } from '$components/sidebar';
@@ -16,6 +19,7 @@ import {
import { useCreateSelected } from '$hooks/router/useCreateSelected';
import { JoinAddressPrompt } from '$components/join-address-prompt';
import { RoomSearchParams } from '$pages/paths';
+import { PhosphorIcon } from '$components/PhosphorIcon';
export function CreateTab() {
const createSelected = useCreateSelected();
@@ -72,7 +76,7 @@ export function CreateTab() {
type="button"
onClick={handleCreateSpace}
>
-
}>
+
}>
Create Space
Build a space for your community.
@@ -89,7 +93,7 @@ export function CreateTab() {
type="button"
onClick={handleJoinWithAddress}
>
- }>
+ }>
Join with Address
Become a part of existing community.
@@ -108,7 +112,7 @@ export function CreateTab() {
outlined
onClick={handleMenu}
>
-
+
{joinAddress && (
(({ requestClose }
}
+ after={}
radii="300"
aria-disabled={!unread}
>
@@ -110,7 +113,7 @@ export function DirectTab() {
onClick={handleDirectClick}
onContextMenu={handleContextMenu}
>
-
+
)}
diff --git a/src/app/pages/client/sidebar/ExploreTab.tsx b/src/app/pages/client/sidebar/ExploreTab.tsx
index ee65975ed..8878e6abc 100644
--- a/src/app/pages/client/sidebar/ExploreTab.tsx
+++ b/src/app/pages/client/sidebar/ExploreTab.tsx
@@ -1,4 +1,4 @@
-import { Icon, Icons } from 'folds';
+import { CompassIcon } from '@phosphor-icons/react/dist/csr/Compass';
import { useNavigate } from 'react-router-dom';
import { useAtomValue } from 'jotai';
import { SidebarAvatar, SidebarItem, SidebarItemTooltip } from '$components/sidebar';
@@ -14,6 +14,7 @@ import { useMatrixClient } from '$hooks/useMatrixClient';
import { getMxIdServer } from '$utils/matrix';
import { ScreenSize, useScreenSizeContext } from '$hooks/useScreenSize';
import { useNavToActivePathAtom } from '$state/hooks/navToActivePath';
+import { PhosphorIcon } from '$components/PhosphorIcon';
export function ExploreTab() {
const mx = useMatrixClient();
@@ -54,7 +55,7 @@ export function ExploreTab() {
{(triggerRef) => (
-
+
)}
diff --git a/src/app/pages/client/sidebar/HomeTab.tsx b/src/app/pages/client/sidebar/HomeTab.tsx
index 7401e4233..67b671e37 100644
--- a/src/app/pages/client/sidebar/HomeTab.tsx
+++ b/src/app/pages/client/sidebar/HomeTab.tsx
@@ -1,6 +1,8 @@
import { MouseEventHandler, forwardRef, useState } from 'react';
import { useNavigate } from 'react-router-dom';
-import { Box, Icon, Icons, Menu, MenuItem, PopOut, RectCords, Text, config, toRem } from 'folds';
+import { Box, Menu, MenuItem, PopOut, RectCords, Text, config, toRem } from 'folds';
+import { ChecksIcon } from '@phosphor-icons/react/dist/csr/Checks';
+import { HouseIcon } from '@phosphor-icons/react/dist/csr/House';
import { useAtomValue } from 'jotai';
import FocusTrap from 'focus-trap-react';
import { useOrphanRooms } from '$state/hooks/roomList';
@@ -26,6 +28,7 @@ import { stopPropagation } from '$utils/keyboard';
import { useSetting } from '$state/hooks/settings';
import { settingsAtom } from '$state/settings';
import { useHomeRooms } from '$pages/client/home/useHomeRooms';
+import { PhosphorIcon } from '$components/PhosphorIcon';
type HomeMenuProps = {
requestClose: () => void;
@@ -48,7 +51,7 @@ const HomeMenu = forwardRef(({ requestClose }, re
}
+ after={}
radii="300"
aria-disabled={!unread}
>
@@ -104,7 +107,7 @@ export function HomeTab() {
onClick={handleHomeClick}
onContextMenu={handleContextMenu}
>
-
+
)}
diff --git a/src/app/pages/client/sidebar/InboxTab.tsx b/src/app/pages/client/sidebar/InboxTab.tsx
index 9488d1029..02aaea4db 100644
--- a/src/app/pages/client/sidebar/InboxTab.tsx
+++ b/src/app/pages/client/sidebar/InboxTab.tsx
@@ -1,5 +1,6 @@
import { useNavigate } from 'react-router-dom';
-import { Icon, Icons, toRem } from 'folds';
+import { toRem } from 'folds';
+import { TrayIcon } from '@phosphor-icons/react/dist/csr/Tray';
import { useAtomValue } from 'jotai';
import {
SidebarAvatar,
@@ -18,6 +19,7 @@ import { useInboxSelected } from '$hooks/router/useInbox';
import { UnreadBadge } from '$components/unread-badge';
import { ScreenSize, useScreenSizeContext } from '$hooks/useScreenSize';
import { useNavToActivePathAtom } from '$state/hooks/navToActivePath';
+import { PhosphorIcon } from '$components/PhosphorIcon';
export function InboxTab() {
const screenSize = useScreenSizeContext();
@@ -47,7 +49,7 @@ export function InboxTab() {
{(triggerRef) => (
-
+
)}
diff --git a/src/app/pages/client/sidebar/SearchTab.tsx b/src/app/pages/client/sidebar/SearchTab.tsx
index c3ef38c59..f86278712 100644
--- a/src/app/pages/client/sidebar/SearchTab.tsx
+++ b/src/app/pages/client/sidebar/SearchTab.tsx
@@ -1,7 +1,8 @@
-import { Icon, Icons } from 'folds';
+import { MagnifyingGlassIcon } from '@phosphor-icons/react/dist/csr/MagnifyingGlass';
import { useAtom } from 'jotai';
import { SidebarAvatar, SidebarItem, SidebarItemTooltip } from '$components/sidebar';
import { searchModalAtom } from '$state/searchModal';
+import { PhosphorIcon } from '$components/PhosphorIcon';
export function SearchTab() {
const [opened, setOpen] = useAtom(searchModalAtom);
@@ -13,7 +14,7 @@ export function SearchTab() {
{(triggerRef) => (
-
+
)}
diff --git a/src/app/pages/client/sidebar/SpaceTabs.tsx b/src/app/pages/client/sidebar/SpaceTabs.tsx
index c751f00cb..8b599c230 100644
--- a/src/app/pages/client/sidebar/SpaceTabs.tsx
+++ b/src/app/pages/client/sidebar/SpaceTabs.tsx
@@ -12,9 +12,7 @@ import {
import { useNavigate } from 'react-router-dom';
import {
Box,
- Icon,
IconButton,
- Icons,
Line,
Menu,
MenuItem,
@@ -24,6 +22,12 @@ import {
config,
toRem,
} from 'folds';
+import { CaretUpIcon } from '@phosphor-icons/react/dist/csr/CaretUp';
+import { ChecksIcon } from '@phosphor-icons/react/dist/csr/Checks';
+import { GearIcon } from '@phosphor-icons/react/dist/csr/Gear';
+import { LinkIcon } from '@phosphor-icons/react/dist/csr/Link';
+import { PushPinIcon } from '@phosphor-icons/react/dist/csr/PushPin';
+import { UserPlusIcon } from '@phosphor-icons/react/dist/csr/UserPlus';
import { useAtom, useAtomValue } from 'jotai';
import { Room } from '$types/matrix-sdk';
import {
@@ -93,6 +97,7 @@ import { useOpenSpaceSettings } from '$state/hooks/spaceSettings';
import { useRoomCreators } from '$hooks/useRoomCreators';
import { useRoomPermissions } from '$hooks/useRoomPermissions';
import { InviteUserPrompt } from '$components/invite-user-prompt';
+import { PhosphorIcon } from '$components/PhosphorIcon';
type SpaceMenuProps = {
room: Room;
@@ -161,7 +166,7 @@ const SpaceMenu = forwardRef(
}
+ after={}
radii="300"
disabled={!unread}
>
@@ -174,7 +179,7 @@ const SpaceMenu = forwardRef(
size="300"
radii="300"
onClick={handleUnpin}
- after={}
+ after={}
>
Unpin
@@ -189,7 +194,7 @@ const SpaceMenu = forwardRef(
variant="Primary"
fill="None"
size="300"
- after={}
+ after={}
radii="300"
aria-pressed={invitePrompt}
disabled={!canInvite}
@@ -201,7 +206,7 @@ const SpaceMenu = forwardRef(
}
+ after={}
radii="300"
>
@@ -211,7 +216,7 @@ const SpaceMenu = forwardRef(
}
+ after={}
radii="300"
>
@@ -533,7 +538,7 @@ function OpenedSpaceFolder({ folder, onClose, children }: Readonly
-
+
{children}
diff --git a/src/app/pages/client/sidebar/UnverifiedTab.tsx b/src/app/pages/client/sidebar/UnverifiedTab.tsx
index a6c446b44..e7d8b65d7 100644
--- a/src/app/pages/client/sidebar/UnverifiedTab.tsx
+++ b/src/app/pages/client/sidebar/UnverifiedTab.tsx
@@ -1,5 +1,6 @@
import { useState } from 'react';
-import { Badge, color, Icon, Icons, Text, toRem } from 'folds';
+import { Badge, color, Text, toRem } from 'folds';
+import { ShieldIcon } from '@phosphor-icons/react/dist/csr/Shield';
import {
SidebarAvatar,
SidebarItem,
@@ -16,6 +17,7 @@ import {
import { useCrossSigningActive } from '$hooks/useCrossSigning';
import { Modal500 } from '$components/Modal500';
import { Settings, SettingsPages } from '$features/settings';
+import { PhosphorIcon } from '$components/PhosphorIcon';
import * as css from './UnverifiedTab.css';
function UnverifiedIndicator() {
@@ -58,9 +60,9 @@ function UnverifiedIndicator() {
outlined
onClick={() => setSettings(true)}
>
-
)}
diff --git a/src/app/pages/client/space/Search.tsx b/src/app/pages/client/space/Search.tsx
index c2b4c15ce..c5caddaf3 100644
--- a/src/app/pages/client/space/Search.tsx
+++ b/src/app/pages/client/space/Search.tsx
@@ -1,5 +1,7 @@
import { useRef } from 'react';
-import { Box, Icon, Icons, Text, Scroll, IconButton } from 'folds';
+import { Box, Text, Scroll, IconButton } from 'folds';
+import { ArrowLeftIcon } from '@phosphor-icons/react/dist/csr/ArrowLeft';
+import { MagnifyingGlassIcon } from '@phosphor-icons/react/dist/csr/MagnifyingGlass';
import { useAtomValue } from 'jotai';
import { Page, PageContent, PageContentCenter, PageHeader } from '$components/page';
import { MessageSearch } from '$features/message-search';
@@ -11,6 +13,7 @@ import { roomToParentsAtom } from '$state/room/roomToParents';
import { useMatrixClient } from '$hooks/useMatrixClient';
import { ScreenSize, useScreenSizeContext } from '$hooks/useScreenSize';
import { BackRouteHandler } from '$components/BackRouteHandler';
+import { PhosphorIcon } from '$components/PhosphorIcon';
export function SpaceSearch() {
const mx = useMatrixClient();
@@ -35,14 +38,16 @@ export function SpaceSearch() {
{(onBack) => (
-
+
)}
)}
- {screenSize !== ScreenSize.Mobile && }
+ {screenSize !== ScreenSize.Mobile && (
+
+ )}
Message Search
diff --git a/src/app/pages/client/space/Space.tsx b/src/app/pages/client/space/Space.tsx
index 4eb7b117c..f91b8b7cb 100644
--- a/src/app/pages/client/space/Space.tsx
+++ b/src/app/pages/client/space/Space.tsx
@@ -13,9 +13,7 @@ import {
Avatar,
Box,
Button,
- Icon,
IconButton,
- Icons,
Line,
Menu,
MenuItem,
@@ -27,6 +25,16 @@ import {
config,
toRem,
} from 'folds';
+import { ArrowUUpLeftIcon } from '@phosphor-icons/react/dist/csr/ArrowUUpLeft';
+import { ChecksIcon } from '@phosphor-icons/react/dist/csr/Checks';
+import { DotsThreeVerticalIcon } from '@phosphor-icons/react/dist/csr/DotsThreeVertical';
+import { FlagIcon } from '@phosphor-icons/react/dist/csr/Flag';
+import { GearIcon } from '@phosphor-icons/react/dist/csr/Gear';
+import { LinkIcon } from '@phosphor-icons/react/dist/csr/Link';
+import { LockIcon } from '@phosphor-icons/react/dist/csr/Lock';
+import { MagnifyingGlassIcon } from '@phosphor-icons/react/dist/csr/MagnifyingGlass';
+import { TerminalIcon } from '@phosphor-icons/react/dist/csr/Terminal';
+import { UserPlusIcon } from '@phosphor-icons/react/dist/csr/UserPlus';
import { useVirtualizer, VirtualItem } from '@tanstack/react-virtual';
import FocusTrap from 'focus-trap-react';
import { useNavigate } from 'react-router-dom';
@@ -85,6 +93,7 @@ import { lastVisitedRoomIdAtom } from '$state/room/lastRoom';
import { SwipeableOverlayWrapper } from '$components/SwipeableOverlayWrapper';
import { useCallEmbed } from '$hooks/useCallEmbed';
import { createDebugLogger } from '$utils/debugLogger';
+import { PhosphorIcon } from '$components/PhosphorIcon';
const debugLog = createDebugLogger('Space');
@@ -157,7 +166,7 @@ const SpaceMenu = forwardRef(({ room, requestClo
}
+ after={}
radii="300"
disabled={!unread}
>
@@ -173,7 +182,7 @@ const SpaceMenu = forwardRef(({ room, requestClo
variant="Primary"
fill="None"
size="300"
- after={}
+ after={}
radii="300"
aria-pressed={invitePrompt}
disabled={!canInvite}
@@ -185,7 +194,7 @@ const SpaceMenu = forwardRef(({ room, requestClo
}
+ after={}
radii="300"
>
@@ -195,7 +204,7 @@ const SpaceMenu = forwardRef(({ room, requestClo
}
+ after={}
radii="300"
>
@@ -206,7 +215,7 @@ const SpaceMenu = forwardRef(({ room, requestClo
}
+ after={}
radii="300"
>
@@ -225,7 +234,7 @@ const SpaceMenu = forwardRef(({ room, requestClo
variant="Critical"
fill="None"
size="300"
- after={}
+ after={}
radii="300"
aria-pressed={promptLeave}
>
@@ -274,11 +283,11 @@ function SpaceHeader() {
{spaceName}
- {joinRules?.join_rule !== JoinRule.Public && }
+ {joinRules?.join_rule !== JoinRule.Public && }
-
+
@@ -729,7 +738,11 @@ export function Space() {
-
+
@@ -745,7 +758,11 @@ export function Space() {
-
+
diff --git a/src/app/plugins/react-custom-html-parser.tsx b/src/app/plugins/react-custom-html-parser.tsx
index 1a351572f..401a2920f 100644
--- a/src/app/plugins/react-custom-html-parser.tsx
+++ b/src/app/plugins/react-custom-html-parser.tsx
@@ -17,7 +17,10 @@ import {
} from 'html-react-parser';
import { MatrixClient } from '$types/matrix-sdk';
import classNames from 'classnames';
-import { Box, Chip, config, Header, Icon, IconButton, Icons, Scroll, Text, toRem } from 'folds';
+import { Box, Chip, config, Header, IconButton, Scroll, Text, toRem } from 'folds';
+import { CaretDownIcon } from '@phosphor-icons/react/dist/csr/CaretDown';
+import { CaretUpIcon } from '@phosphor-icons/react/dist/csr/CaretUp';
+import { CheckIcon } from '@phosphor-icons/react/dist/csr/Check';
import { IntermediateRepresentation, OptFn, Opts as LinkifyOpts } from 'linkifyjs';
import Linkify from 'linkify-react';
import { ErrorBoundary } from 'react-error-boundary';
@@ -37,6 +40,7 @@ import { onEnterOrSpace } from '$utils/keyboard';
import { copyToClipboard } from '$utils/dom';
import { useTimeoutToggle } from '$hooks/useTimeoutToggle';
import { ClientSideHoverFreeze } from '$components/ClientSideHoverFreeze';
+import { PhosphorIcon } from '$components/PhosphorIcon';
import {
parseMatrixToRoom,
parseMatrixToRoomEvent,
@@ -288,7 +292,7 @@ export function CodeBlock({
fill="None"
radii="Pill"
onClick={handleCopy}
- before={copied && }
+ before={copied && }
>
{copied ? 'Copied' : 'Copy'}
@@ -301,7 +305,7 @@ export function CodeBlock({
onClick={toggleExpand}
aria-label={expanded ? 'Collapse' : 'Expand'}
>
-
+
)}
diff --git a/src/app/utils/common.ts b/src/app/utils/common.ts
index fb1e0b16b..0e56d1219 100644
--- a/src/app/utils/common.ts
+++ b/src/app/utils/common.ts
@@ -1,4 +1,8 @@
-import { IconName, IconSrc } from 'folds';
+import { ComponentType } from 'react';
+import { PlayIcon } from '@phosphor-icons/react/dist/csr/Play';
+import { VideoCameraIcon } from '@phosphor-icons/react/dist/csr/VideoCamera';
+import { ImageIcon } from '@phosphor-icons/react/dist/csr/Image';
+import type { IconProps } from '@phosphor-icons/react';
export const bytesToSize = (bytes: number): string => {
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
@@ -31,18 +35,18 @@ export const secondsToMinutesAndSeconds = (seconds: number): string => {
return `${mm}:${ss < 10 ? '0' : ''}${ss}`;
};
-export const getFileTypeIcon = (icons: Record, fileType: string): IconSrc => {
+export const getFileTypeIcon = (fileType: string): ComponentType => {
const type = fileType.toLowerCase();
if (type.startsWith('audio')) {
- return icons.Play;
+ return PlayIcon;
}
if (type.startsWith('video')) {
- return icons.Vlc;
+ return VideoCameraIcon;
}
if (type.startsWith('image')) {
- return icons.Photo;
+ return ImageIcon;
}
- return icons.File;
+ return ImageIcon;
};
export const fulfilledPromiseSettledResult = (prs: PromiseSettledResult[]): T[] =>
diff --git a/src/app/utils/room.ts b/src/app/utils/room.ts
index 34fb527d8..7be3759a8 100644
--- a/src/app/utils/room.ts
+++ b/src/app/utils/room.ts
@@ -1,5 +1,3 @@
-import { IconName, IconSrc } from 'folds';
-
import {
EventTimeline,
EventTimelineSet,
@@ -31,6 +29,12 @@ import {
UnreadInfo,
} from '$types/matrix/room';
import * as Sentry from '@sentry/react';
+import type { IconProps } from '@phosphor-icons/react';
+import { HashIcon } from '@phosphor-icons/react/dist/csr/Hash';
+import { SpeakerHighIcon } from '@phosphor-icons/react/dist/csr/SpeakerHigh';
+import { StarFourIcon } from '@phosphor-icons/react/dist/csr/StarFour';
+import { LockSimpleIcon } from '@phosphor-icons/react/dist/csr/LockSimple';
+import { ComponentType } from 'react';
export const getStateEvent = (
room: Room,
@@ -418,44 +422,40 @@ export const getUnreadInfos = (mx: MatrixClient, options?: UnreadInfoOptions): U
return unreadInfos;
};
-export const getRoomIconSrc = (
- icons: Record,
- roomType?: string,
- joinRule?: JoinRule
-): IconSrc => {
+export const getRoomIcon = (roomType?: string, joinRule?: JoinRule): ComponentType => {
if (roomType === RoomType.Space) {
- if (joinRule === JoinRule.Public) return icons.SpaceGlobe;
+ if (joinRule === JoinRule.Public) return StarFourIcon;
if (
joinRule === JoinRule.Invite ||
joinRule === JoinRule.Knock ||
joinRule === JoinRule.Private
) {
- return icons.SpaceLock;
+ return LockSimpleIcon;
}
- return icons.Space;
+ return StarFourIcon;
}
if (roomType === RoomType.Call) {
- if (joinRule === JoinRule.Public) return icons.VolumeHighGlobe;
+ if (joinRule === JoinRule.Public) return SpeakerHighIcon;
if (
joinRule === JoinRule.Invite ||
joinRule === JoinRule.Knock ||
joinRule === JoinRule.Private
) {
- return icons.VolumeHighLock;
+ return LockSimpleIcon;
}
- return icons.VolumeHigh;
+ return SpeakerHighIcon;
}
- if (joinRule === JoinRule.Public) return icons.HashGlobe;
+ if (joinRule === JoinRule.Public) return HashIcon;
if (
joinRule === JoinRule.Invite ||
joinRule === JoinRule.Knock ||
joinRule === JoinRule.Private
) {
- return icons.HashLock;
+ return LockSimpleIcon;
}
- return icons.Hash;
+ return HashIcon;
};
export const getRoomAvatarUrl = (