Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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.
11 changes: 7 additions & 4 deletions packages/ui/src/common/CreateOrganizationAction.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { useUser } from '@clerk/shared/react/index';

import { Action } from '../elements/Actions';
import { Add } from '../icons';
import { Plus } 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 = Plus, ...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}
/>
);
};
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 @@ -10,7 +10,7 @@ import { Form } from '@/elements/Form';
import { FormButtonContainer } from '@/elements/FormButtons';
import { PreviewButton } from '@/elements/PreviewButton';
import { type VerificationCodeCardProps, VerificationCodeContent } from '@/elements/VerificationCodeCard';
import { Add } from '@/icons';
import { Plus } from '@/icons';
import { Button, Col, descriptors, Flex, Flow, localizationKeys, Text } from '@/ui/customizables';
import { Card } from '@/ui/elements/Card';
import { Header } from '@/ui/elements/Header';
Expand Down Expand Up @@ -321,7 +321,7 @@ const SmsCodeScreen = withCardStateProvider((props: SmsCodeScreenProps) => {
label={localizationKeys('taskSetupMfa.smsCode.addPhoneNumber')}
block
onClick={onAddPhoneClick}
icon={Add}
icon={Plus}
elementDescriptor={descriptors.taskSetupMfaPhoneSelectionAddPhoneAction}
sx={t => ({
borderTopWidth: t.borderWidths.$normal,
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/SignIn/SignInAccountSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { UserPreview } from '@/ui/elements/UserPreview';
import { withRedirectToAfterSignIn } from '../../common';
import { useEnvironment, useSignInContext, useSignOutContext } from '../../contexts';
import { Col, descriptors, Flow, localizationKeys } from '../../customizables';
import { Add, SwitchArrowRight } from '../../icons';
import { Plus, SwitchArrowRight } from '../../icons';
import { SignOutAllActions } from '../UserButton/SessionActions';
import { useMultisessionActions } from '../UserButton/useMultisessionActions';

Expand Down Expand Up @@ -73,7 +73,7 @@ const SignInAccountSwitcherInternal = () => {
iconBoxElementId={descriptors.accountSwitcherActionButtonIconBox.setId('addAccount')}
iconElementDescriptor={descriptors.accountSwitcherActionButtonIcon}
iconElementId={descriptors.accountSwitcherActionButtonIcon.setId('addAccount')}
icon={Add}
icon={Plus}
label={localizationKeys('signIn.accountSwitcher.action__addAccount')}
onClick={handleAddAccountClicked}
iconSx={t => ({
Expand Down
7 changes: 1 addition & 6 deletions packages/ui/src/elements/Card/CardContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ export const CardContent = React.forwardRef<HTMLDivElement, CardContentProps>((p
variant='ghost'
aria-label='Close modal'
onClick={toggle}
icon={
<Icon
icon={Close}
size='xs'
/>
}
icon={<Icon icon={Close} />}
sx={t => ({
color: t.colors.$colorMutedForeground,
zIndex: t.zIndices.$modal,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/elements/OrganizationPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const OrganizationPreview = (props: OrganizationPreviewProps) => {
<Flex
elementDescriptor={descriptors.organizationPreview}
elementId={descriptors.organizationPreview.setId(elementId)}
gap={3}
gap={4}
align='center'
as='span'
sx={[{ minWidth: '0' }, sx]}
Expand Down
1 change: 0 additions & 1 deletion packages/ui/src/elements/PhoneInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ const CountryCodeListItem = memo((props: CountryCodeListItemProps) => {
>
<Icon
icon={Check}
size='sm'
sx={{ visibility: isSelected ? 'visible' : 'hidden' }}
/>
<Text
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/icons/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/archive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/arrow-down-tray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/arrow-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/arrow-left-bottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/arrow-left-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/arrow-left-top.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion packages/ui/src/icons/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/arrow-right-bottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion packages/ui/src/icons/arrow-right-button.svg

This file was deleted.

3 changes: 3 additions & 0 deletions packages/ui/src/icons/arrow-right-top.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion packages/ui/src/icons/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/arrow-up-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/arrow-up-tray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/arrow-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion packages/ui/src/icons/arrows-up-down.svg

This file was deleted.

5 changes: 2 additions & 3 deletions packages/ui/src/icons/auth-app.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion packages/ui/src/icons/block.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/building.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions packages/ui/src/icons/caret-left.svg

This file was deleted.

3 changes: 0 additions & 3 deletions packages/ui/src/icons/caret-right.svg

This file was deleted.

1 change: 0 additions & 1 deletion packages/ui/src/icons/chat-alt.svg

This file was deleted.

1 change: 0 additions & 1 deletion packages/ui/src/icons/check-circle.svg

This file was deleted.

3 changes: 0 additions & 3 deletions packages/ui/src/icons/check.svg

This file was deleted.

3 changes: 3 additions & 0 deletions packages/ui/src/icons/checkmark-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ui/src/icons/checkmark.svg
4 changes: 3 additions & 1 deletion packages/ui/src/icons/chevron-down.svg
3 changes: 3 additions & 0 deletions packages/ui/src/icons/chevron-left.svg
3 changes: 3 additions & 0 deletions packages/ui/src/icons/chevron-right.svg
5 changes: 2 additions & 3 deletions packages/ui/src/icons/chevron-up-down.svg
3 changes: 3 additions & 0 deletions packages/ui/src/icons/chevron-up.svg
Loading
Loading