refactor: migrate Icon to component icons from @coss/ui/icons (#27458)

* feat: add @coss/ui/icons package and migrate static icon usages

Create a new icon system in @coss/ui/icons that wraps lucide-react icons
with controlled props (size and className only). Migrate 44 component
files from <Icon name="xxx" /> to <XxxIcon /> pattern.

This is Phase 1 of the icon migration, covering only static icon names.
Dynamic icon usages (e.g., name={variable}) are skipped for now.

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate more static icons to @coss/ui/icons (batch 2)

Migrated 18 files from <Icon name="xxx" /> to <XxxIcon /> pattern:
- Event meta, insights, shell, user table bulk actions
- Webhooks, blocklist, form-builder, form components

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate more static icons to @coss/ui/icons (batch 3)

Migrated 7 files:
- CancelBooking, AddGuestsDialog, ChargeCardDialog
- ReassignDialog, RescheduleDialog
- Categories, Slider

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate more static icons to @coss/ui/icons (batch 4)

Migrated 6 files:
- Organizations: AboutOrganizationForm, PaymentStatusView, profile
- Workflows: CallDetailsSheet, SkeletonLoaderList, TimeTimeUnitInput

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate more static icons to @coss/ui/icons (batch 5)

Migrated 4 files:
- TwoFactorModalHeader
- App setups: alby, make, btcpayserver

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static icons to @coss/ui/icons (batch 6)

- confirmDialog.tsx: clock icon
- ics-feedcalendar/Setup.tsx: trash, plus icons
- hitpay/Setup.tsx: info icon
- paypal/Setup.tsx: circle-alert icons

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static icons to @coss/ui/icons (batch 7)

- webhook-edit-view.tsx: external-link icon
- webhook-new-view.tsx: external-link icon
- UserDropdown.tsx: chevron-down, user, settings, moon, map, circle-help, download, blocks, log-out icons
- TopNav.tsx: settings icon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static icons to @coss/ui/icons (batch 8)

- EmailInviteForm.tsx: x icon
- InviteOptions.tsx: mail, upload, link icons
- SkeletonLoader.tsx: search, clock, user icons
- Embed.tsx: sun, arrow-left icons
- CalendarSwitch.tsx: arrow-left, rotate-cw icons

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static icons to @coss/ui/icons (batch 9)

- apps-view.tsx: search icon
- categories-view.tsx: arrow-left, arrow-right icons
- DatePicker.tsx: calendar icon
- EditLocationDialog.tsx: map-pin icon
- AppPage.tsx: circle-alert, book-open, external-link, mail, file, shield, flag icons

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static icons to @coss/ui/icons (batch 10)

- LicenseSelection.tsx: loader, check icons
- AppConnectionItem.tsx: circle-alert, arrow-right icons
- oauth-client-form/index.tsx: info icons (x2)
- auth/error/page.tsx: x icon
- troubleshoot/layout.tsx: loader icon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static icons to @coss/ui/icons (batch 11)

- UpgradeTipWrapper.tsx: users, refresh-ccw, user-plus icons
- PbacOptInModal.tsx: shield-check, lock, users, shield icons
- AdvancedPermissionGroup.tsx: chevron-right, info icons

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static icons to @coss/ui/icons (batch 12)

- AdminAppsList.tsx: pencil icon
- AvailableTimes.tsx: calendar-x-2 icon
- BookingDetailsSheet.tsx: external-link (x2), repeat icons
- BookingCalendarContainer.tsx: chevron-left, chevron-right icons

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static icons to @coss/ui/icons (batch 13)

- videos-single-view.tsx: chevron-right icon
- TroubleshooterSidebar.tsx: arrow-left icon
- RuleBuilder.tsx: filter icon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static icons to @coss/ui/icons (batch 14)

- FieldMappingBuilder.tsx: arrow-right, link icons
- IntegrationAttributeSyncCard.tsx: key icon
- onboarding-view.tsx: loader icon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static icons to @coss/ui/icons (batch 15)

- team-profile-view.tsx: copy icon
- DateRangeFilter.tsx: check icon
- ColumnVisibilityButton.tsx: check icon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static Icon to @coss/ui/icons (batch 16)

- EventWorkflowsTab.tsx: lock
- event-types-listing-view.tsx: search
- onboarding-migrate-members-browser-view.tsx: arrow-left, arrow-right, rotate-cw, lock, ellipsis-vertical, check, user-plus
- onboarding-migrate-teams-browser-view.tsx: arrow-left, arrow-right, rotate-cw, lock, ellipsis-vertical, check, arrow-right, users
- EventAvailabilityTab.tsx: globe, user
- onboarding-teams-browser-view.tsx: arrow-left, arrow-right, rotate-cw, lock, ellipsis-vertical, check, arrow-right, users
- FormBuilder.tsx: mail, phone, arrow-up, arrow-down
- AIEventController.tsx: info
- EventTeamAssignmentTab.tsx: x

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static Icon to @coss/ui/icons (batch 17)

- EventAdvancedTab.tsx: pencil, info
- HostLocations.tsx: triangle-alert, loader
- EventTypeLayout.tsx: loader
- Locations.tsx: x, corner-down-right, check
- EditWeightsForAllTeamMembers.tsx: upload, search, info, chevron-down
- WorkflowPage.tsx: pencil

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static Icon to @coss/ui/icons (batch 18)

- TestPhoneCallDialog.tsx: phone
- WorkflowListPage.tsx: link
- UsersTable.tsx: building, lock
- TeamList.tsx: building, paintbrush, chart-line, user-plus, users, pencil
- bookings-single-view.tsx: chevron-left, check, calendar, x, external-link

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate static Icon to @coss/ui/icons (batch 19)

- TeamsListing.tsx: users, refresh-ccw, user-plus, mail, video, eye-off, info
- ConnectionInfo.tsx: clipboard
- IntercomContactForm.tsx: message-circle, loader, send

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: migrate static Icon to @coss/ui/icons in teams components

- EventTypesList.tsx: check → CheckIcon
- MemberInvitationModal.tsx: user, users, building → UserIcon, UsersIcon, BuildingIcon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: migrate static Icon to @coss/ui/icons in workflow components

- ImportNumberDialog.tsx: info → InfoIcon
- VoiceSelector.tsx: user → UserIcon
- IncomingCallsTab.tsx: info, phone-incoming → InfoIcon, PhoneIncomingIcon
- PhoneNumberTab.tsx: loader, phone → LoaderIcon, PhoneIcon
- VoiceSelectionDialog.tsx: pause, play, user → PauseIcon, PlayIcon, UserIcon
- WebCallDialog.tsx: loader, phone, phone-off, triangle-alert, trash, message-circle → new icons (kept Icon import for dynamic mic icon)
- WorkflowDetailsPage.tsx: zap, arrow-right → ZapIcon, ArrowRightIcon
- AddActionDialog.tsx: info → InfoIcon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: migrate static Icon to @coss/ui/icons in WorkflowStepContainer

- info → InfoIcon (2 instances)
- phone → PhoneIcon (2 instances)
- circle-help → CircleHelpIcon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: migrate static Icon to @coss/ui/icons in data-table and org components

- attributes-list-view.tsx: tags → TagsIcon
- AddFilterButton.tsx: plus, eye-off → PlusIcon, EyeOffIcon
- BaseSelectFilterOptions.tsx: check → CheckIcon
- DataTable.tsx: arrow-up, arrow-down, check, chevrons-up-down, eye-off → new icons
- booking-dry-run-success-view.tsx: check → CheckIcon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: migrate static Icon to @coss/ui/icons in username and routing components

- UsernameTextfield.tsx: check → CheckIcon
- PremiumTextfield.tsx: check, external-link → CheckIcon, ExternalLinkIcon (kept Icon for star with fill prop)
- Header.tsx (routing-forms): pencil, menu, waypoints → PencilIcon, MenuIcon, WaypointsIcon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate Icon to component icons in routing-forms pages

Batch 25: Migrate static Icon usages to @coss/ui/icons components.

Files changed:
- Forms.tsx: file-text, shuffle, chart-bar, circle-check, mail, download → FileTextIcon, ShuffleIcon, ChartBarIcon, CircleCheckIcon, MailIcon, DownloadIcon
- FormEdit.tsx: chevron-down, menu → ChevronDownIcon, MenuIcon
- IncompleteBooking.tsx: globe → GlobeIcon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate Icon to component icons in UI package

Batch 26: Migrate static Icon usages to @coss/ui/icons components.

Files changed:
- ProgressToast.tsx: file-down, x → FileDownIcon, XIcon
- showToast.tsx: check, info, x → CheckIcon, InfoIcon, XIcon
- InfoBadge.tsx: info → InfoIcon
- MeetingTimeInTimezones.tsx: globe → GlobeIcon
- InputError.tsx: info → InfoIcon
- ConfirmationDialogContent.tsx: circle-alert, check → CircleAlertIcon, CheckIcon
- CalendarSwitch.tsx: arrow-left, rotate-cw → ArrowLeftIcon, RotateCwIcon
- ArrowButton.tsx: arrow-up, arrow-down → ArrowUpIcon, ArrowDownIcon
- FileUploader.tsx: upload → UploadIcon (kept Icon for dynamic)
- Checkbox.tsx: check → CheckIcon
- EditableHeading.tsx: pencil → PencilIcon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate Icon to component icons in UI and app-store packages

Batch 27: Migrate static Icon usages to @coss/ui/icons components.

Files changed:
- MultiEmail.tsx: x → XIcon (converted width to size)
- AppListCard.tsx: circle-alert → CircleAlertIcon
- SplitButton.tsx: chevron-down → ChevronDownIcon (kept Icon for dynamic)
- Calendar.tsx: chevron-left, chevron-right → ChevronLeftIcon, ChevronRightIcon
- AppDependencyComponent.tsx: check, circle-x, arrow-right → CheckIcon, CircleXIcon, ArrowRightIcon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate Icon to component icons in form input components

Batch 28: Migrate static Icon usages to @coss/ui/icons components.

Files changed:
- TextField.tsx: info → InfoIcon (kept Icon for x with onClick)
- Input.tsx: eye, eye-off, search → EyeIcon, EyeOffIcon, SearchIcon

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: use @coss/ui/src/icons in packages with legacy moduleResolution

Packages like packages/ui and packages/app-store use a legacy moduleResolution
setting that doesn't support subpath exports. This changes the import path from
@coss/ui/icons to @coss/ui/src/icons for these packages.

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate Icon to component icons in UI form and editor components

Migrates static Icon usages:
- MultiOptionInput: x (2x), arrow-up, arrow-down
- components (select): check
- AddVariablesDropdown: chevron-down (3x)
- ToolbarPlugin: chevron-down

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor: migrate Icon to component icons in settings and platform atoms

Migrates static Icon usages:
- SettingsLayoutAppDirClient: chevron-down (2x), chevron-right (2x), arrow-left
- platform/atoms dialog: x
- platform/atoms toast: x

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: resolve @coss/ui/icons module resolution for legacy moduleResolution

Add typesVersions to @coss/ui package.json to help TypeScript resolve
subpath exports even with legacy moduleResolution: "node" setting.

Change imports from @coss/ui/src/icons to @coss/ui/icons to avoid
double-src path issue when Next.js applies import maps.

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: localize 'Select field type' fallback label in FormEdit

Address Cubic AI review feedback (confidence 9/10) by using t() for
the hardcoded 'Select field type' string to ensure proper i18n support.

Co-Authored-By: unknown <>

* fix: add typesVersions wildcards for @coss/ui subpath imports

Add lib/*, components/*, and hooks/* to typesVersions to support
legacy moduleResolution with all package subpath patterns.

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: resolve missing Icon references in settings and workflows

- Add Icon import for dynamic icon usages in SettingsLayoutAppDirClient
- Replace static Icon usages with component icons (InfoIcon, PhoneIcon)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: resolve icon component type errors

- Add onClick prop support to IconProps
- Fix size prop type (use number instead of string)
- Rename local MailOpenIcon to MailOpenIconWrapper to avoid shadowing

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: add data-testid to icon components for test compatibility

- Add testId parameter to createIcon function
- Auto-generate data-testid for all icons (e.g., "check-icon", "search-icon")
- Remove outdated mock for @calcom/ui/components/icon in tests

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* Update package.json

* Update package.json

* fix: migrate Icon to CalendarDaysIcon in videos-single-view.tsx

Co-Authored-By: unknown <>

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-02-12 14:30:27 +01:00
1 parent 635c1febb0
commit bf348ee209
192 files changed
+1337 -1033

No files matched your search

@@ -20,7 +20,7 @@ import { CheckboxField } from "@calcom/ui/components/form";
import { Form } from "@calcom/ui/components/form";
import { Label } from "@calcom/ui/components/form";
import { Input } from "@calcom/ui/components/form";
import { Icon } from "@calcom/ui/components/icon";
import { InfoIcon } from "@coss/ui/icons";
import { Tooltip } from "@calcom/ui/components/tooltip";
interface IAddActionDialog {
@@ -230,7 +230,7 @@ export const AddActionDialog = (props: IAddActionDialog) => {
<Label>{t("sender_id")}</Label>
<Tooltip content={t("sender_id_info")}>
<span>
<Icon name="info" className="mb-2 ml-2 mr-1 mt-0.5 h-4 w-4 text-gray-500" />
<InfoIcon className="mb-2 ml-2 mr-1 mt-0.5 h-4 w-4 text-gray-500" />
</span>
</Tooltip>
</div>
@@ -4,7 +4,6 @@ import type { CallDetailsAction, CallDetailsState } from "@calcom/features/ee/wo
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Badge } from "@calcom/ui/components/badge";
import { Button } from "@calcom/ui/components/button";
import { Icon } from "@calcom/ui/components/icon";
import {
Sheet,
SheetContent,
@@ -13,6 +12,7 @@ import {
SheetFooter,
SheetClose,
} from "@calcom/ui/components/sheet";
import { UserIcon } from "@coss/ui/icons";
interface CallDetailsSheetProps {
state: CallDetailsState;
@@ -150,7 +150,7 @@ export function CallDetailsSheet({ state, dispatch }: CallDetailsSheetProps) {
return (
<div key={index} className="stack-y-1">
<div className="flex items-center gap-2">
<Icon name="user" className={isAgent ? "text-info" : "text-success"} />
<UserIcon className={isAgent ? "text-info" : "text-success"} />
<span className={`text-sm font-medium ${isAgent ? "text-info" : "text-success"}`}>
{isAgent ? t("agent") : t("user")}
</span>
@@ -1,5 +1,5 @@
import { Icon } from "@calcom/ui/components/icon";
import { SkeletonText } from "@calcom/ui/components/skeleton";
import { BellIcon, LinkIcon } from "@coss/ui/icons";
function SkeletonLoader() {
return (
@@ -21,9 +21,9 @@ function SkeletonItem() {
<div className="flex flex-col stack-y-2">
<SkeletonText className="h-4 w-16 sm:w-24" />
<div className="flex">
<Icon name="bell" className="mr-1.5 mt-0.5 inline h-4 w-4 text-gray-200" />
<BellIcon className="mr-1.5 mt-0.5 inline h-4 w-4 text-gray-200" />
<SkeletonText className="h-4 w-16 ltr:mr-2 rtl:ml-2 sm:w-28" />
<Icon name="link" className="mr-1.5 mt-0.5 inline h-4 w-4 text-gray-200" />
<LinkIcon className="mr-1.5 mt-0.5 inline h-4 w-4 text-gray-200" />
<SkeletonText className="h-4 w-28 sm:w-36" />
</div>
</div>
@@ -10,7 +10,7 @@ import { trpc } from "@calcom/trpc/react";
import { Button } from "@calcom/ui/components/button";
import { DialogContent, DialogFooter } from "@calcom/ui/components/dialog";
import { Label } from "@calcom/ui/components/form";
import { Icon } from "@calcom/ui/components/icon";
import { PhoneIcon } from "@coss/ui/icons";
import { showToast } from "@calcom/ui/components/toast";
interface TestPhoneCallDialogProps {
@@ -99,7 +99,7 @@ export function TestPhoneCallDialog({
onClick={handleTestCall}
loading={testCallMutation.isPending}
disabled={!testPhoneNumber}>
<Icon name="phone" className="mr-2 h-4 w-4" />
<PhoneIcon className="mr-2 h-4 w-4" />
{t("make_test_call")}
</Button>
</DialogFooter>
@@ -3,8 +3,8 @@ import { useFormContext } from "react-hook-form";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { TimeUnit } from "@calcom/prisma/enums";
import { Icon } from "@calcom/ui/components/icon";
import { TextField } from "@calcom/ui/components/form";
import { ChevronDownIcon, ChevronUpIcon } from "@coss/ui/icons";
import {
Dropdown,
DropdownItem,
@@ -38,7 +38,7 @@ const TimeUnitAddonSuffix = ({
<button className="flex items-center">
<div className="mr-1 w-3/5">{timeUnit ? timeUnitOptions[timeUnit] : "undefined"}</div>
<div className="w-1/4 pt-1">
{isDropdownOpen ? <Icon name="chevron-up" /> : <Icon name="chevron-down" />}
{isDropdownOpen ? <ChevronUpIcon /> : <ChevronDownIcon />}
</div>
</button>
</DropdownMenuTrigger>
@@ -10,7 +10,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button } from "@calcom/ui/components/button";
import { Dialog, DialogContent, DialogHeader } from "@calcom/ui/components/dialog";
import { Icon } from "@calcom/ui/components/icon";
import { PauseIcon, PlayIcon, UserIcon } from "@coss/ui/icons";
import { showToast } from "@calcom/ui/components/toast";
type Voice = {
@@ -89,14 +89,14 @@ function VoiceSelectionContent({
onClick={() => handlePlayVoice(row.original.preview_audio_url, row.original.voice_id)}
className="rounded-full">
{playingVoiceId === row.original.voice_id ? (
<Icon name="pause" className="text-default h-3 w-3" />
<PauseIcon className="text-default h-3 w-3" />
) : (
<Icon name="play" className="text-default h-3 w-3" />
<PlayIcon className="text-default h-3 w-3" />
)}
</Button>
<div className="flex items-center gap-2">
<div className="bg-subtle flex h-10 w-10 items-center justify-center rounded-full">
<Icon name="user" className="text-default h-5 w-5" />
<UserIcon className="text-default h-5 w-5" />
</div>
<span className="text-emphasis font-medium">{row.original.voice_name}</span>
</div>
@@ -12,6 +12,14 @@ import { Alert } from "@calcom/ui/components/alert";
import { Button } from "@calcom/ui/components/button";
import { DialogContent, DialogFooter } from "@calcom/ui/components/dialog";
import { Icon } from "@calcom/ui/components/icon";
import {
LoaderIcon,
MessageCircleIcon,
PhoneIcon,
PhoneOffIcon,
TrashIcon,
TriangleAlertIcon,
} from "@coss/ui/icons";
import { showToast } from "@calcom/ui/components/toast";
import { Tooltip } from "@calcom/ui/components/tooltip";
@@ -260,15 +268,15 @@ export function WebCallDialog({
const getStatusIcon = () => {
switch (callStatus) {
case "connecting":
return <Icon name="loader" className="h-4 w-4 animate-spin rounded-full" />;
return <LoaderIcon className="h-4 w-4 animate-spin rounded-full" />;
case "active":
return <Icon name="phone" className="text-success h-4 w-4" />;
return <PhoneIcon className="text-success h-4 w-4" />;
case "ended":
return <Icon name="phone-off" className="text-muted h-4 w-4" />;
return <PhoneOffIcon className="text-muted h-4 w-4" />;
case "error":
return <Icon name="triangle-alert" className="text-error h-4 w-4" />;
return <TriangleAlertIcon className="text-error h-4 w-4" />;
default:
return <Icon name="phone" className="text-subtle h-4 w-4" />;
return <PhoneIcon className="text-subtle h-4 w-4" />;
}
};
@@ -396,7 +404,7 @@ export function WebCallDialog({
variant="icon"
onClick={() => setTranscript([])}
disabled={callStatus === "active"}>
<Icon name="trash" className="h-4 w-4" />
<TrashIcon className="h-4 w-4" />
</Button>
)}
</div>
@@ -405,7 +413,7 @@ export function WebCallDialog({
{transcript.length === 0 ? (
<div className="flex h-40 items-center justify-center text-center">
<div>
<Icon name="message-circle" className="text-subtle mx-auto h-8 w-8" />
<MessageCircleIcon className="text-subtle mx-auto h-8 w-8" />
<p className="text-subtle mt-2 text-sm">
{callStatus === "idle"
? t("start_call_to_see_conversation")
@@ -441,7 +449,7 @@ export function WebCallDialog({
{error && callStatus === "error" && (
<div className="border-error bg-error/10 rounded-lg p-3">
<div className="flex items-center gap-2">
<Icon name="triangle-alert" className="text-error h-6 w-6" />
<TriangleAlertIcon className="text-error h-6 w-6" />
<span className="text-error text-sm">{error}</span>
</div>
</div>
@@ -465,7 +473,7 @@ export function WebCallDialog({
onClick={handleStartCall}
loading={createWebCallMutation.isPending || callStatus === "connecting"}
disabled={!hasCredits || createWebCallMutation.isPending || callStatus === "connecting"}>
<Icon name="phone" className="mr-2 h-4 w-4" />
<PhoneIcon className="mr-2 h-4 w-4" />
{callStatus === "connecting" ? t("connecting") : t("start_web_call")}
</Button>
</Tooltip>
@@ -475,7 +483,7 @@ export function WebCallDialog({
color="destructive"
onClick={handleEndCall}
disabled={callStatus !== "active"}>
<Icon name="phone-off" className="mr-2 h-4 w-4" />
<PhoneOffIcon className="mr-2 h-4 w-4" />
{t("end_call")}
</Button>
)}
@@ -1,29 +1,27 @@
import { useSearchParams } from "next/navigation";
import type { Dispatch, SetStateAction } from "react";
import { useState, useEffect } from "react";
import type { UseFormReturn } from "react-hook-form";
import { useAgentsData } from "@calcom/web/modules/ee/workflows/hooks/useAgentsData";
import {
isCalAIAction,
isSMSAction,
isFormTrigger,
isSMSAction,
} from "@calcom/features/ee/workflows/lib/actionHelperFunctions";
import { ALLOWED_FORM_WORKFLOW_ACTIONS } from "@calcom/features/ee/workflows/lib/constants";
import emailReminderTemplate from "@calcom/features/ee/workflows/lib/reminders/templates/emailReminderTemplate";
import type { FormValues } from "@calcom/features/ee/workflows/lib/types";
import type { WorkflowPermissions } from "@calcom/features/workflows/repositories/WorkflowPermissionsRepository";
import { SENDER_ID, SENDER_NAME, SCANNING_WORKFLOW_STEPS } from "@calcom/lib/constants";
import { SCANNING_WORKFLOW_STEPS, SENDER_ID, SENDER_NAME } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";
import { WorkflowActions } from "@calcom/prisma/enums";
import { WorkflowTemplates } from "@calcom/prisma/enums";
import { trpc, type RouterOutputs } from "@calcom/trpc/react";
import { WorkflowActions, WorkflowTemplates } from "@calcom/prisma/enums";
import { type RouterOutputs, trpc } from "@calcom/trpc/react";
import { Button } from "@calcom/ui/components/button";
import { FormCard, FormCardBody } from "@calcom/ui/components/card";
import type { MultiSelectCheckboxesOptionType as Option } from "@calcom/ui/components/form";
import { Icon } from "@calcom/ui/components/icon";
import { useHasPaidPlan, useHasActiveTeamPlan } from "@calcom/web/modules/billing/hooks/useHasPaidPlan";
import { useAgentsData } from "@calcom/web/modules/ee/workflows/hooks/useAgentsData";
import { ArrowRightIcon, ZapIcon } from "@coss/ui/icons";
import { useSearchParams } from "next/navigation";
import type { Dispatch, SetStateAction } from "react";
import { useEffect, useState } from "react";
import type { UseFormReturn } from "react-hook-form";
import { AddActionDialog } from "./AddActionDialog";
import WorkflowStepContainer from "./WorkflowStepContainer";
@@ -197,7 +195,7 @@ export default function WorkflowDetailsPage(props: Props) {
label={
<div className="flex items-center gap-2 pt-1 pb-2">
<div className="border-subtle text-subtle ml-1 rounded-lg border p-1">
<Icon name="zap" size="16" />
<ZapIcon size={16} />
</div>
<div className="text-sm font-medium leading-none">{t("trigger")}</div>
</div>
@@ -239,7 +237,7 @@ export default function WorkflowDetailsPage(props: Props) {
label={
<div className="flex items-center gap-2 pt-1 pb-2">
<div className="border-subtle text-subtle rounded-lg border p-1">
<Icon name="arrow-right" size="16" />
<ArrowRightIcon size={16} />
</div>
<div className="text-sm font-medium leading-none">{t("action")}</div>
</div>
@@ -16,7 +16,7 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from "@calcom/ui/components/dropdown";
import { Icon } from "@calcom/ui/components/icon";
import { LinkIcon } from "@coss/ui/icons";
import { Tooltip } from "@calcom/ui/components/tooltip";
import { useAutoAnimate } from "@formkit/auto-animate/react";
import Link from "next/link";
@@ -137,7 +137,7 @@ export default function WorkflowListPage({ workflows }: Props) {
{/*active on all badge */}
{workflow.isActiveOnAll ? (
<div>
<Icon name="link" className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
<LinkIcon className="mr-1.5 inline h-3 w-3" />
{workflow.isOrg ? t("active_on_all_teams") : t("active_on_all_event_types")}
</div>
) : workflow.activeOn && workflow.activeOn.length > 0 ? (
@@ -147,7 +147,7 @@ export default function WorkflowListPage({ workflows }: Props) {
.filter((wf) => (workflow.teamId ? wf.eventType.parentId === null : true))
.map((activeOn, key) => <p key={key}>{activeOn.eventType.title}</p>)}>
<div>
<Icon name="link" className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
<LinkIcon className="mr-1.5 inline h-3 w-3" />
{t("active_on_event_types", {
count: workflow.activeOn.filter((wf) =>
workflow.teamId ? wf.eventType.parentId === null : true
@@ -162,7 +162,7 @@ export default function WorkflowListPage({ workflows }: Props) {
<p key={key}>{activeOn.team.name}</p>
))}>
<div>
<Icon name="link" className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
<LinkIcon className="mr-1.5 inline h-3 w-3" />
{t("active_on_teams", {
count: workflow.activeOnTeams?.length,
})}
@@ -171,7 +171,7 @@ export default function WorkflowListPage({ workflows }: Props) {
) : (
// active on no teams or event types
<div>
<Icon name="link" className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
<LinkIcon className="mr-1.5 inline h-3 w-3" />
{workflow.isOrg ? t("no_active_teams") : t("no_active_event_types")}
</div>
)}
@@ -67,7 +67,7 @@ import { TextField } from "@calcom/ui/components/form";
import { Select } from "@calcom/ui/components/form";
import { MultiSelectCheckbox } from "@calcom/ui/components/form";
import type { MultiSelectCheckboxesOptionType as Option } from "@calcom/ui/components/form";
import { Icon } from "@calcom/ui/components/icon";
import { CircleHelpIcon, InfoIcon, PhoneIcon } from "@coss/ui/icons";
import { SkeletonText } from "@calcom/ui/components/skeleton";
import { showToast } from "@calcom/ui/components/toast";
import { useHasPaidPlan, useHasActiveTeamPlan } from "@calcom/web/modules/billing/hooks/useHasPaidPlan";
@@ -688,7 +688,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
)}
{!!timeSectionText && steps.some((s) => isSMSAction(s.action)) && (
<div className="mt-1 flex text-gray-500">
<Icon name="info" className="mr-1 mt-0.5 h-4 w-4" />
<InfoIcon className="mr-1 mt-0.5 h-4 w-4" />
<p className="text-sm">{t("testing_sms_workflow_info_message")}</p>
</div>
)}
@@ -835,7 +835,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
{...form.register(`steps.${step.stepNumber - 1}.sender`)}
/>
<div className="mt-1.5 flex items-center gap-1">
<Icon name="info" size="10" className="text-gray-500" />
<InfoIcon size={10} className="text-gray-500" />
<div className="text-subtle text-xs">{t("sender_id_info")}</div>
</div>
</div>
@@ -910,7 +910,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
<h3 className="text-emphasis text-base font-medium">{t("cal_ai_agent")}</h3>
{arePhoneNumbersActive.length > 0 ? (
<div className="flex items-center gap-2">
<Icon name="phone" className="text-emphasis h-4 w-4" />
<PhoneIcon className="text-emphasis h-4 w-4" />
<span className="text-emphasis text-sm">
{formatPhoneNumber(arePhoneNumbersActive[0].phoneNumber)}
</span>
@@ -1437,7 +1437,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
<div className="ml-1 mt-2">
<button type="button" onClick={() => setIsAdditionalInputsDialogOpen(true)}>
<div className="text-subtle ml-1 flex items-center gap-2">
<Icon name="circle-help" className="h-3 w-3" />
<CircleHelpIcon className="h-3 w-3" />
<p className="text-left text-xs">
{isFormTrigger(trigger)
? t("using_form_responses_as_variables")
@@ -1676,7 +1676,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
).length > 0 && (
<div className="bg-cal-muted rounded-lg p-3">
<div className="flex items-center gap-2">
<Icon name="phone" className="text-emphasis h-4 w-4" />
<PhoneIcon className="text-emphasis h-4 w-4" />
<span className="text-emphasis text-sm font-medium">
{formatPhoneNumber(
getActivePhoneNumbers(
@@ -1737,7 +1737,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
<>
<div className="bg-attention rounded-lg p-3">
<div className="flex items-start gap-2">
<Icon name="info" className="text-attention mt-0.5 h-4 w-4" />
<InfoIcon className="text-attention mt-0.5 h-4 w-4" />
<div className="stack-y-2">
<p className="text-attention text-sm font-medium">{t("this_action_will_also")}</p>
<ul className="text-attention stack-y-1 list-inside list-disc text-sm">
@@ -1752,7 +1752,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
{relevantPhoneNumbers.map((phone) => (
<div key={phone.phoneNumber} className="bg-cal-muted rounded-lg p-3">
<div className="flex items-center gap-2">
<Icon name="phone" className="text-emphasis h-4 w-4" />
<PhoneIcon className="text-emphasis h-4 w-4" />
<span className="text-emphasis text-sm font-medium">
{formatPhoneNumber(phone.phoneNumber)}
</span>
@@ -9,7 +9,7 @@ import { Button } from "@calcom/ui/components/button";
import { Dialog } from "@calcom/ui/components/dialog";
import { DialogContent, DialogHeader, DialogFooter as BaseDialogFooter } from "@calcom/ui/components/dialog";
import { Form, Label, Switch, TextField } from "@calcom/ui/components/form";
import { Icon } from "@calcom/ui/components/icon";
import { InfoIcon } from "@coss/ui/icons";
import { showToast } from "@calcom/ui/components/toast";
import { Tooltip } from "@calcom/ui/components/tooltip";
@@ -86,7 +86,7 @@ export function ImportNumberDialog({
<span className="flex items-center gap-1">
{t("phone_number")}
<Tooltip content={t("phone_number_info_tooltip")}>
<Icon name="info" className="text-muted h-4 w-4 cursor-pointer" />
<InfoIcon className="text-muted h-4 w-4 cursor-pointer" />
</Tooltip>
</span>
}
@@ -111,7 +111,7 @@ export function ImportNumberDialog({
<span className="flex items-center gap-1">
{t("termination_uri")}
<Tooltip content={t("termination_uri_info_tooltip")}>
<Icon name="info" className="text-muted h-4 w-4 cursor-pointer" />
<InfoIcon className="text-muted h-4 w-4 cursor-pointer" />
</Tooltip>
</span>
}
@@ -144,7 +144,7 @@ export function ImportNumberDialog({
<span className="flex items-center gap-1">
{t("sip_trunk_username")}
<Tooltip content={t("sip_trunk_username_info_tooltip")}>
<Icon name="info" className="text-muted h-4 w-4 cursor-pointer" />
<InfoIcon className="text-muted h-4 w-4 cursor-pointer" />
</Tooltip>
</span>
}
@@ -169,7 +169,7 @@ export function ImportNumberDialog({
<span className="flex items-center gap-1">
{t("sip_trunk_password")}
<Tooltip content={t("sip_trunk_password_info_tooltip")}>
<Icon name="info" className="text-muted h-4 w-4 cursor-pointer" />
<InfoIcon className="text-muted h-4 w-4 cursor-pointer" />
</Tooltip>
</span>
}
@@ -194,7 +194,7 @@ export function ImportNumberDialog({
<span className="flex items-center gap-1">
{t("nickname")}
<Tooltip content={t("nickname_info_tooltip")}>
<Icon name="info" className="text-muted h-4 w-4 cursor-pointer" />
<InfoIcon className="text-muted h-4 w-4 cursor-pointer" />
</Tooltip>
</span>
}
@@ -213,7 +213,7 @@ export function ImportNumberDialog({
{/* Having trouble importing section */}
<div className="rounded-lg border p-2">
<div className="flex items-start gap-3">
<Icon name="info" className="text-subtle mt-0.5 h-5 w-5 shrink-0" />
<InfoIcon className="text-subtle mt-0.5 h-5 w-5 shrink-0" />
<div className="flex-1">
<p className="text-emphasis text-sm font-medium">{t("having_trouble_importing")}</p>
<p className="text-subtle mt-1 text-sm leading-tight">
@@ -3,7 +3,7 @@
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button } from "@calcom/ui/components/button";
import { Label } from "@calcom/ui/components/form";
import { Icon } from "@calcom/ui/components/icon";
import { UserIcon } from "@coss/ui/icons";
interface VoiceSelectorProps {
selectedVoiceId?: string;
@@ -24,7 +24,7 @@ export function VoiceSelector({ selectedVoiceId, onVoiceDialogOpen, disabled = f
onClick={onVoiceDialogOpen}
disabled={disabled}
className="w-full justify-start">
<Icon name="user" className="mr-2 h-4 w-4" />
<UserIcon className="mr-2 h-4 w-4" />
{selectedVoiceId ? <span className="text-sm">{selectedVoiceId}</span> : t("select_voice")}
</Button>
</div>
@@ -11,7 +11,7 @@ import { trpc } from "@calcom/trpc/react";
import { Button } from "@calcom/ui/components/button";
import { Label, Select } from "@calcom/ui/components/form";
import type { MultiSelectCheckboxesOptionType as Option } from "@calcom/ui/components/form";
import { Icon } from "@calcom/ui/components/icon";
import { InfoIcon, PhoneIncomingIcon } from "@coss/ui/icons";
import { showToast } from "@calcom/ui/components/toast";
import { VoiceSelectionDialog } from "../../../VoiceSelectionDialog";
@@ -91,7 +91,7 @@ export function IncomingCallsTab({
<div className="border-subtle rounded-xl border p-8">
<div className="stack-y-6 flex flex-col items-center text-center">
<div className="bg-cal-muted flex h-16 w-16 items-center justify-center rounded-lg">
<Icon name="info" className="text-subtle h-8 w-8" />
<InfoIcon className="text-subtle h-8 w-8" />
</div>
<div className="stack-y-2">
<h3 className="text-emphasis text-lg font-semibold">{t("setup_incoming_agent")}</h3>
@@ -107,7 +107,7 @@ export function IncomingCallsTab({
<div className="border-subtle rounded-xl border p-8">
<div className="stack-y-6 flex flex-col items-center text-center">
<div className="bg-cal-muted flex h-16 w-16 items-center justify-center rounded-lg">
<Icon name="phone-incoming" className="text-subtle h-8 w-8" />
<PhoneIncomingIcon className="text-subtle h-8 w-8" />
</div>
<div className="stack-y-2">
<h3 className="text-emphasis text-lg font-semibold">{t("setup_inbound_agent")}</h3>
@@ -20,7 +20,7 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from "@calcom/ui/components/dropdown";
import { Icon } from "@calcom/ui/components/icon";
import { LoaderIcon, PhoneIcon } from "@coss/ui/icons";
import { showToast } from "@calcom/ui/components/toast";
import { WebCallDialog } from "@calcom/web/modules/ee/workflows/components/WebCallDialog";
@@ -131,7 +131,7 @@ export function PhoneNumberTab({
{updateAgentMutation.isPending && (
<div className="absolute inset-0 z-10 flex items-center justify-center rounded-lg bg-white/50">
<div className="flex items-center gap-2 text-sm text-gray-600">
<Icon name="loader" className="h-4 w-4 animate-spin" />
<LoaderIcon className="h-4 w-4 animate-spin" />
{t("updating")}...
</div>
</div>
@@ -279,7 +279,7 @@ export function PhoneNumberTab({
<div className="border-subtle rounded-xl border p-8">
<div className="stack-y-6 flex flex-col items-center text-center">
<div className="bg-cal-muted flex h-16 w-16 items-center justify-center rounded-lg">
<Icon name="phone" className="text-subtle h-8 w-8" />
<PhoneIcon className="text-subtle h-8 w-8" />
</div>
<div className="stack-y-2">
<h3 className="text-emphasis text-lg font-semibold">{t("no_phone_numbers")}</h3>