Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cozy-suns-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/ui': minor
---

Migrate to new icon set to create consistency across components.
9 changes: 6 additions & 3 deletions packages/ui/src/common/CreateOrganizationAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import { useUser } from '@clerk/shared/react/index';
import { Action } from '../elements/Actions';
import { Add } from '../icons';

type CreateOrganizationActionProps = Omit<React.ComponentProps<typeof Action>, 'icon'>;
type CreateOrganizationActionProps = Omit<React.ComponentProps<typeof Action>, 'icon'> & {
icon?: React.ComponentProps<typeof Action>['icon'];
};

export const CreateOrganizationAction = (props: CreateOrganizationActionProps) => {
const { icon = Add, ...rest } = props;
const { user } = useUser();

if (!user?.createOrganizationEnabled) {
Expand All @@ -14,8 +17,8 @@ export const CreateOrganizationAction = (props: CreateOrganizationActionProps) =

return (
<Action
{...props}
icon={Add}
{...rest}
icon={icon}
/>
);
};
6 changes: 3 additions & 3 deletions packages/ui/src/common/EmailLinkStatusCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Col, descriptors, Flex, Flow, Icon, localizationKeys, Spinner, Text } f
import { Card } from '../elements/Card';
import { useCardState } from '../elements/contexts';
import { Header } from '../elements/Header';
import { ExclamationTriangle, SwitchArrows, TickShield } from '../icons';
import { ArrowLeftRight, ExclamationTriangle, ShieldCheck } from '../icons';
import type { InternalTheme } from '../styledSystem';
import { animations } from '../styledSystem';

Expand All @@ -19,8 +19,8 @@ type EmailLinkStatusCardProps = React.PropsWithChildren<{
}>;

const StatusToIcon: Record<Exclude<EmailLinkUIStatus, 'loading'>, React.ComponentType> = {
verified: TickShield,
verified_switch_tab: SwitchArrows,
verified: ShieldCheck,
verified_switch_tab: ArrowLeftRight,
expired: ExclamationTriangle,
failed: ExclamationTriangle,
client_mismatch: ExclamationTriangle,
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/common/organizations/OrganizationPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { OrganizationPreview } from '@/ui/elements/OrganizationPreview';
import { PreviewButton } from '@/ui/elements/PreviewButton';

import { Box, Button, Col, descriptors, Flex, Spinner } from '../../customizables';
import { SwitchArrowRight } from '../../icons';
import { ArrowRight } from '../../icons';
import type { ThemableCssProp } from '../../styledSystem';
import { common } from '../../styledSystem';

Expand Down Expand Up @@ -132,7 +132,7 @@ export const OrganizationPreviewButton = (props: OrganizationPreviewButtonProps)
return (
<PreviewButton
sx={[sharedStyles]}
icon={SwitchArrowRight}
icon={ArrowRight}
{...props}
/>
);
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/src/components/APIKeys/CopyAPIKeyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Form } from '@/ui/elements/Form';
import { FormButtons } from '@/ui/elements/FormButtons';
import { FormContainer } from '@/ui/elements/FormContainer';
import { useClipboard } from '@/ui/hooks';
import { Check, ClipboardOutline } from '@/ui/icons';
import { Checkmark, Clipboard } from '@/ui/icons';
import { localizationKeys } from '@/ui/localization';
import { useFormControl } from '@/ui/utils/useFormControl';

Expand Down Expand Up @@ -82,8 +82,8 @@ export const CopyAPIKeyModal = ({
value={apiKeySecret}
readOnly
sx={{ width: '100%' }}
copyIcon={ClipboardOutline}
copiedIcon={Check}
copyIcon={Clipboard}
copiedIcon={Checkmark}
/>
</Form.CommonInputWrapper>
</Form.ControlRow>
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/src/components/ConfigureSSO/elements/Step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
Text,
useLocalizations,
} from '@/customizables';
import { CaretLeft, CaretRight } from '@/icons';
import { ChevronLeft, ChevronRight } from '@/icons';
import { common, type PropsOfComponent } from '@/styledSystem';

import { ProfileCardFooter } from './ProfileCard';
Expand Down Expand Up @@ -133,7 +133,7 @@ const FooterPrevious = ({ onClick, isDisabled, isLoading, label = 'Previous' }:
onClick={handleClick}
>
<Icon
icon={CaretLeft}
icon={ChevronLeft}
size='sm'
sx={t => ({ marginInlineEnd: t.space.$1 })}
/>
Expand Down Expand Up @@ -163,7 +163,7 @@ const FooterContinue = ({ onClick, isDisabled, isLoading, label = 'Continue' }:
>
{labelText}
<Icon
icon={CaretRight}
icon={ChevronRight}
size='sm'
sx={t => ({ marginInlineStart: t.space.$1 })}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { Box, descriptors, Flex, Icon, SimpleButton, Text } from '@/customizables';
import { CaretRight, Check } from '@/icons';
import { ChevronRight, Checkmark } from '@/icons';

import type { StepperItemProps, StepperProps } from './types';

Expand All @@ -24,7 +24,7 @@ const Root = ({ children }: StepperProps): JSX.Element => {
{index < items.length - 1 && (
<Icon
elementDescriptor={descriptors.configureSSOStepperSeparator}
icon={CaretRight}
icon={ChevronRight}
size='md'
colorScheme='neutral'
/>
Expand Down Expand Up @@ -77,8 +77,9 @@ const Item = ({
>
{isCompleted && !isCurrent ? (
<Icon
icon={Check}
sx={theme => ({ width: theme.sizes.$2, height: theme.sizes.$2, color: theme.colors.$white })}
icon={Checkmark}
size='sm'
sx={theme => ({ color: theme.colors.$white })}
/>
) : (
<Text
Expand Down Expand Up @@ -127,7 +128,7 @@ const Skeleton = ({ totalSteps = 4 }: SkeletonProps): JSX.Element => (
{index < totalSteps - 1 && (
<Icon
elementDescriptor={descriptors.configureSSOStepperSeparator}
icon={CaretRight}
icon={ChevronRight}
size='md'
colorScheme='neutral'
sx={{ opacity: 0.16 }}
Expand Down
12 changes: 6 additions & 6 deletions packages/ui/src/components/ConfigureSSO/steps/ConfigureStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { useCardState } from '@/elements/contexts';
import { Field } from '@/elements/FieldControl';
import { Form } from '@/elements/Form';
import { SegmentedControl } from '@/elements/SegmentedControl';
import { Check, ClipboardOutline, Close, Upload } from '@/icons';
import { Checkmark, Clipboard, Close, ArrowUpTray } from '@/icons';
import type { FormControlState } from '@/ui/utils/useFormControl';
import { useFormControl } from '@/ui/utils/useFormControl';
import { handleError } from '@/utils/errorHandler';
Expand Down Expand Up @@ -201,8 +201,8 @@ export const CreateAppSubStep = (): JSX.Element => {
<ClipboardInput
value={acsUrl}
readOnly
copyIcon={ClipboardOutline}
copiedIcon={Check}
copyIcon={Clipboard}
copiedIcon={Checkmark}
/>
</Form.CommonInputWrapper>
</Form.ControlRow>
Expand All @@ -212,8 +212,8 @@ export const CreateAppSubStep = (): JSX.Element => {
<ClipboardInput
value={spEntityId}
readOnly
copyIcon={ClipboardOutline}
copiedIcon={Check}
copyIcon={Clipboard}
copiedIcon={Checkmark}
/>
</Form.CommonInputWrapper>
</Form.ControlRow>
Expand Down Expand Up @@ -896,7 +896,7 @@ const ManualEntryPanel = ({
onClick={() => certInputRef.current?.click()}
>
<Icon
icon={Upload}
icon={ArrowUpTray}
size='sm'
colorScheme='neutral'
sx={t => ({ marginInlineEnd: t.space.$1 })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { IconButton } from '@/elements/IconButton';
import { Pagination } from '@/elements/Pagination';
import { ProfileSection } from '@/elements/Section';
import { useClipboard } from '@/hooks';
import { Check, Copy, RotateLeftRight } from '@/icons';
import { Checkmark, Copy, RotateLeftRight } from '@/icons';
import { common, mqu } from '@/styledSystem';
import { handleError } from '@/utils/errorHandler';

Expand Down Expand Up @@ -122,7 +122,7 @@ export const TestConfigurationStep = (): JSX.Element => {
>
<Icon
icon={RotateLeftRight}
size='sm'
size='md'
colorScheme='neutral'
/>
<Text
Expand Down Expand Up @@ -625,7 +625,7 @@ const FullMessageBlock = ({ message }: { message: string }): JSX.Element => {
variant='ghost'
colorScheme='neutral'
size='xs'
icon={hasCopied ? Check : Copy}
icon={hasCopied ? Checkmark : Copy}
aria-label={copyLabel}
onClick={() => onCopy()}
/>
Expand Down Expand Up @@ -749,12 +749,12 @@ const CopyTestUrlButton = ({ onTestRunCreated }: CopyTestUrlButtonProps): JSX.El
{isCreatingTestRun ? (
<Spinner
elementDescriptor={descriptors.spinner}
size='xs'
size='sm'
/>
) : (
<Icon
icon={hasCopied ? Check : Copy}
size='sm'
icon={hasCopied ? Checkmark : Copy}
size='md'
colorScheme='neutral'
/>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Flex, Heading, Icon, Link, localizationKeys, Span, Text } from '@/customizables';
import { ArrowRightIcon } from '@/icons';
import { ArrowRight } from '@/icons';

import type { LocalizationKey } from '../../../localization';

Expand Down Expand Up @@ -132,7 +132,7 @@ export const TestRunHowToFixSection = ({ errorCode }: TestRunHowToFixSectionProp
)}
/>
<Icon
icon={ArrowRightIcon}
icon={ArrowRight}
size='sm'
/>
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useFormControl } from '@/ui/utils/useFormControl';

import { useWizard, Wizard } from '../../common';
import { Col, Icon } from '../../customizables';
import { Upload } from '../../icons';
import { ArrowUpTray } from '../../icons';
import type { LocalizationKey } from '../../localization';
import { localizationKeys } from '../../localization';
import { InviteMembersForm } from '../OrganizationProfile/InviteMembersForm';
Expand Down Expand Up @@ -157,7 +157,7 @@ export const CreateOrganizationForm = withCardStateProvider((props: CreateOrgani
icon={
<Icon
size='md'
icon={Upload}
icon={ArrowUpTray}
sx={t => ({
color: t.colors.$colorMutedForeground,
transitionDuration: t.transitionDuration.$controls,
Expand Down
5 changes: 2 additions & 3 deletions packages/ui/src/components/OAuthConsent/OrgSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useRef } from 'react';

import { Box, Icon, Image, Text } from '@/ui/customizables';
import { Select, SelectButton, SelectOptionList } from '@/ui/elements/Select';
import { Check } from '@/ui/icons';
import { Checkmark } from '@/ui/icons';
import { common } from '@/ui/styledSystem';

export type OrgOption = {
Expand Down Expand Up @@ -66,8 +66,7 @@ export function OrgSelect({ options, value, onChange }: OrgSelectProps) {
</Text>
{isSelected && (
<Icon
icon={Check}
size='sm'
icon={Checkmark}
sx={theme => ({ color: theme.colors.$primary500 })}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { SuccessPage } from '@/ui/elements/SuccessPage';
import { useWizard, Wizard } from '../../common';
import { descriptors, Flex, localizationKeys, Text } from '../../customizables';
import { useActionContext } from '../../elements/Action/ActionRoot';
import { Email } from '../../icons';
import { Envelope } from '../../icons';
import { InviteMembersForm } from './InviteMembersForm';
type InviteMembersScreenProps = {
onReset?: () => void;
Expand Down Expand Up @@ -57,7 +57,7 @@ export const InvitationsSentMessage = () => {
<IconCircle
boxElementDescriptor={descriptors.invitationsSentIconBox}
iconElementDescriptor={descriptors.invitationsSentIcon}
icon={Email}
icon={Envelope}
/>
<Text localizationKey={localizationKeys('organizationProfile.invitePage.successMessage')} />
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { NotificationCountBadge, withProtect } from '../../common';
import { useEnvironment, useOrganizationSwitcherContext } from '../../contexts';
import { descriptors, Flex, localizationKeys } from '../../customizables';
import { RootBox } from '../../elements/RootBox';
import { CogFilled } from '../../icons';
import { Cog } from '../../icons';
import type { PropsOfComponent, ThemableCssProp } from '../../styledSystem';
import { OrganizationActionList } from './OtherOrganizationActions';

Expand Down Expand Up @@ -101,7 +101,7 @@ export const OrganizationSwitcherPopover = React.forwardRef<HTMLDivElement, Orga
iconBoxElementId={descriptors.organizationSwitcherPopoverActionButtonIconBox.setId('manageOrganization')}
iconElementDescriptor={descriptors.organizationSwitcherPopoverActionButtonIcon}
iconElementId={descriptors.organizationSwitcherPopoverActionButtonIcon.setId('manageOrganization')}
icon={CogFilled}
icon={Cog}
label={localizationKeys('organizationSwitcher.action__manageOrganization')}
onClick={() => handleItemClick()}
trailing={<NotificationCountBadgeManageButton />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { UserInvitationSuggestionList } from './UserInvitationSuggestionList';
import type { UserMembershipListProps } from './UserMembershipList';
import { UserMembershipList } from './UserMembershipList';
import { CreateOrganizationAction } from '@/common/CreateOrganizationAction';
import { Add } from '@/icons';

export interface OrganizationActionListProps extends UserMembershipListProps {
onCreateOrganizationClick: React.MouseEventHandler;
Expand All @@ -21,6 +22,7 @@ const CreateOrganizationButton = ({
iconBoxElementId={descriptors.organizationSwitcherPopoverActionButtonIconBox.setId('createOrganization')}
iconElementDescriptor={descriptors.organizationSwitcherPopoverActionButtonIcon}
iconElementId={descriptors.organizationSwitcherPopoverActionButtonIcon.setId('createOrganization')}
icon={Add}
label={localizationKeys('organizationSwitcher.action__createOrganization')}
onClick={onCreateOrganizationClick}
sx={t => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { InfiniteListSpinner } from '../../common';
import { useAcceptedInvitations } from '../../contexts';
import { Box, Button, descriptors, Flex, localizationKeys, Text } from '../../customizables';
import { useInView } from '../../hooks';
import { SwitchArrowRight } from '../../icons';
import { ArrowRight } from '../../icons';
import type { PropsOfComponent } from '../../styledSystem';
import { common } from '../../styledSystem';
import { organizationListParams, populateCacheUpdateItem } from './utils';
Expand Down Expand Up @@ -178,7 +178,7 @@ const InvitationPreview = withCardStateProvider(
return (
<PreviewButton
elementDescriptor={descriptors.organizationSwitcherPreviewButton}
icon={SwitchArrowRight}
icon={ArrowRight}
onClick={acceptedOrganization ? () => onOrganizationClick(acceptedOrganization) : undefined}
role='menuitem'
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { InfiniteListSpinner } from '../../common';
import { useOrganizationSwitcherContext } from '../../contexts';
import { Box, descriptors, localizationKeys } from '../../customizables';
import { useInView } from '../../hooks';
import { SwitchArrowRight } from '../../icons';
import { ArrowRight } from '../../icons';
import { common } from '../../styledSystem';
import { organizationListParams } from './utils';

Expand Down Expand Up @@ -81,7 +81,7 @@ export const UserMembershipList = (props: UserMembershipListProps) => {
<PreviewButton
elementDescriptor={descriptors.organizationSwitcherPreviewButton}
elementId={descriptors.organizationSwitcherPreviewButton.setId('personal')}
icon={SwitchArrowRight}
icon={ArrowRight}
onClick={onPersonalWorkspaceClick}
role='menuitem'
>
Expand All @@ -97,7 +97,7 @@ export const UserMembershipList = (props: UserMembershipListProps) => {
key={organization.id}
elementDescriptor={descriptors.organizationSwitcherPreviewButton}
elementId={descriptors.organizationSwitcherPreviewButton.setId('organization')}
icon={SwitchArrowRight}
icon={ArrowRight}
onClick={() => onOrganizationClick(organization)}
role='menuitem'
sx={t => ({
Expand Down
Loading
Loading