@aircall/ds 0.17.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -14
- package/dist/globals.css +1 -1
- package/dist/index.d.ts +583 -26
- package/dist/index.js +911 -44
- package/dist/theme.css +2 -0
- package/package.json +6 -5
- package/skills/aircall-ds/adopt-attachment/SKILL.md +283 -0
- package/skills/aircall-ds/migrate-audio-player/SKILL.md +438 -0
- package/skills/aircall-ds/migrate-icons/SKILL.md +319 -90
- package/skills/aircall-ds/migrate-tractor/SKILL.md +1 -1
- package/skills/aircall-ds/migrate-tractor/data-table/SKILL.md +47 -1
- package/skills/aircall-ds/migrate-tractor/dropzone/SKILL.md +33 -0
- package/skills/aircall-ds/setup/SKILL.md +75 -31
|
@@ -56,112 +56,325 @@ wrapper; when it was wrapped in Tractor's `<Icon>`, also remove that wrapper (se
|
|
|
56
56
|
| `20` | `size-5` | 20px |
|
|
57
57
|
| `24` | `size-6` | 24px |
|
|
58
58
|
|
|
59
|
-
## 4. Icon name mapping (
|
|
59
|
+
## 4. Icon name mapping (complete)
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### Phone & Calls
|
|
64
|
-
|
|
65
|
-
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
|
|
66
|
-
| --- | --- | --- |
|
|
67
|
-
| `CallFilled`, `CallOutlined`, `CallCircleFilled` | `Phone` | lucide |
|
|
68
|
-
| `HangUpFilled` | `PhoneDecline` | custom |
|
|
69
|
-
| `HangUpOutlined` | `PhoneOff` | lucide |
|
|
70
|
-
| `MissedInboundFilled` | `PhoneMissed` | lucide |
|
|
71
|
-
| `TransferFilled`, `TransferredOutlined` | `Forward` | lucide |
|
|
72
|
-
| `VoicemailOutlined` | `Voicemail` | lucide |
|
|
73
|
-
| `VoicemailDrop` | `VoicemailDrop` | custom |
|
|
74
|
-
| `RingingFilled`, `CircledPhoneCallingFilled` | `PhoneCall` | lucide |
|
|
75
|
-
| `KeypadFilled`, `KeypadOutlined` | `Keypad` | custom |
|
|
76
|
-
| `ConferenceFilled`, `ConferenceOutlined` | `Conference` | custom |
|
|
77
|
-
|
|
78
|
-
### Actions
|
|
79
|
-
|
|
80
|
-
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
|
|
81
|
-
| --- | --- | --- |
|
|
82
|
-
| `CloseOutlined`, `CloseCircleFilled` | `X` | lucide |
|
|
83
|
-
| `CheckOutlined`, `TickOutlined` | `Check` | lucide |
|
|
84
|
-
| `SearchOutlined` | `Search` | lucide |
|
|
85
|
-
| `EditFilled`, `EditOutlined` | `Pencil` | lucide |
|
|
86
|
-
| `TrashFilled`, `TrashOutlined` | `Trash2` | lucide |
|
|
87
|
-
| `CopyFilled`, `CopyOutlined` | `Copy` | lucide |
|
|
88
|
-
| `FilterOutlined`, `FilterFilled` | `ListFilter` | lucide |
|
|
89
|
-
| `AddCircleFilled`, `PlusCircleFilled` | `Plus` | lucide |
|
|
61
|
+
Many old `*Filled` / `*Outlined` variants collapse into one new name — this is intentional consolidation. Rows marked ⚠️ need visual validation before the consumer migration is locked.
|
|
90
62
|
|
|
91
63
|
### Arrows & Navigation
|
|
92
64
|
|
|
93
|
-
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
|
|
94
|
-
| --- | --- | --- |
|
|
95
|
-
| `ChevronDownOutlined`, `ArrowDownFilled` | `ChevronDown` | lucide |
|
|
96
|
-
| `ChevronLeftOutlined` | `ChevronLeft` | lucide |
|
|
97
|
-
| `ChevronRightOutlined`, `ArrowRightFilled` | `ChevronRight` | lucide |
|
|
98
|
-
| `ChevronUpOutlined`, `ArrowUpFilled` | `ChevronUp` | lucide |
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
65
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
66
|
+
| --- | --- | --- | --- |
|
|
67
|
+
| `ChevronDownOutlined`, `ChevronDownSmallRoundedFilled`, `ArrowDownFilled`, `CircledDownFilled`, `CircledDownOutlined` | `ChevronDown` | lucide | ⚠️ validate usage |
|
|
68
|
+
| `ChevronLeftOutlined`, `CircledLeftFilled`, `CircledLeftOutlined` | `ChevronLeft` | lucide | ⚠️ validate usage |
|
|
69
|
+
| `ChevronRightOutlined`, `ArrowRightFilled`, `ArrowRightOutlined`, `CircledRightFilled`, `CircledRightOutlined`, `CircledRightArrowFilled` | `ChevronRight` | lucide | ⚠️ validate usage |
|
|
70
|
+
| `ChevronUpOutlined`, `ArrowUpFilled`, `ArrowUpOutlined`, `ChevronUpSmallRoundedFilled`, `CircledUpFilled`, `CircledUpOutlined` | `ChevronUp` | lucide | ⚠️ validate usage |
|
|
71
|
+
| `ArrowLeftLine`, `ArrowBackOutlined`, `ArrowLeftFilled`, `ArrowLeftOutlined` | `ArrowLeft` | lucide | |
|
|
72
|
+
| `ArrowDownOutlined` | `ArrowDown` | lucide | |
|
|
73
|
+
| `DiagonalDownOutlined` | `ArrowDownLeft` | lucide | |
|
|
74
|
+
| `CircledDiagonalDownOutlinedFilled` | `ArrowDownRight` | lucide | |
|
|
75
|
+
| `DiagonalUpOutlined`, `CircledDiagonalUpOutlinedFilled` | `ArrowUpRight` | lucide | |
|
|
76
|
+
| `CircledArrowRightOutlined` | `ArrowRight` | lucide | |
|
|
77
|
+
| `ArrowSendOutlined`, `OutboundOutlined` | `ArrowRight` | lucide | |
|
|
78
|
+
| `SendFilled`, `SendOutlined`, `PaperPlaneFilled` | `Send` | lucide | |
|
|
79
|
+
| `ExpandOutlined` | `Maximize2` | lucide | |
|
|
80
|
+
| `FullscreenOutlined` | `Fullscreen` | lucide | |
|
|
81
|
+
| `MaximizeOutlined` | `Expand` | lucide | |
|
|
82
|
+
| `CollapseOutlined` | `Minimize2` | lucide | |
|
|
83
|
+
| `MinimizeOutlined` | `Shrink` | lucide | |
|
|
84
|
+
| `ExternalOutlined` | `ExternalLink` | lucide | |
|
|
85
|
+
| `ImportOutlined` | `ArrowDownToLine` | lucide | |
|
|
86
|
+
| `UndoOutlined` | `Undo2` | lucide | |
|
|
87
|
+
| `RedoOutlined` | `Redo2` | lucide | |
|
|
88
|
+
| `RefreshOutlined` | `RefreshCw` | lucide | |
|
|
89
|
+
| `ForwardFilled`, `ForwardOutlined` | `Forward` | lucide | message/email forwarding arrow |
|
|
90
|
+
| `ArrowsContractOutlined` | `Shrink` | lucide | compress / contract to smaller area |
|
|
91
|
+
| `AutoScrollOutlined` | `Autoscroll` | custom | |
|
|
92
|
+
| `SkipNextFilled`, `SkipNextOutlined` | `SkipForward` | lucide | |
|
|
93
|
+
|
|
94
|
+
### Audio & Video controls
|
|
95
|
+
|
|
96
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
97
|
+
| --- | --- | --- | --- |
|
|
98
|
+
| `PlayFilled`, `PlayOutlined` | `Play` | lucide | |
|
|
99
|
+
| `PauseFilled`, `PauseOutlined`, `HoldFilled`, `HoldOutlined` | `Pause` | lucide | `Hold*` SVG is identical to Pause (two vertical bars) |
|
|
100
|
+
| `PlayPauseFilled`, `PlayPauseOutlined` | — | **No equivalent** — use `Play` / `Pause` contextually | ⚠️ validate usage |
|
|
101
|
+
| `ControlStopFilled`, `ControlStopOutlined` | `Stop` | custom | |
|
|
102
|
+
| `StopFilled`, `StopOutlined` | `XCircle` | lucide | Tractor `StopFilled` is a circled-X | ⚠️ validate usage |
|
|
103
|
+
| `ReplayFilled`, `ReplayOutlined` | `Replay` | custom | |
|
|
104
|
+
| `RecordingLiveOutlined` | `RecordFilled` | custom | |
|
|
105
|
+
| `RecordingPauseOutlined` | `RecordPauseFilled` | custom | |
|
|
106
|
+
| `RecordingResumeOutlined` | `RecordPlayFilled` | custom | |
|
|
107
|
+
| `FastForwardFilled`, `FastForwardOutlined` | `FastForward` | lucide | |
|
|
108
|
+
| `RewindFilled`, `RewindOutlined` | `Rewind` | lucide | |
|
|
109
|
+
| `SkipPreviousFilled`, `SkipPreviousOutlined` | `SkipBack` | lucide | |
|
|
110
|
+
| `Backward10Outlined` | `Backward10` | custom | |
|
|
111
|
+
| `Forward10Outlined` | `Forward10` | custom | |
|
|
112
|
+
| `ShareScreenFilled`, `ShareScreenOutlined` | `ScreenShare` | lucide | ⚠️ validate usage |
|
|
113
|
+
| `SoundHighFilled`, `SoundHighOutlined` | `Volume2` | lucide | |
|
|
114
|
+
| `SoundLowFilled`, `SoundLowOutlined` | `Volume1` | lucide | |
|
|
115
|
+
| `SoundOffFilled`, `SoundOffOutlined` | `VolumeX` | lucide | |
|
|
116
|
+
| `SoundWaveFilled` | `AudioLines` | lucide | |
|
|
117
|
+
| `SoundwaveOutlined` | `AudioWaveform` | lucide | |
|
|
118
|
+
| `MicOnFilled`, `MicOnOutlined` | `Mic` | lucide | |
|
|
119
|
+
| `MicOffFilled`, `MicOffOutlined` | `MicOff` | lucide | |
|
|
120
|
+
| `NoiseCancellationOutlined` | `NoiseCancellation` | custom | |
|
|
121
|
+
| `Speech` | `Speech` | lucide | |
|
|
122
|
+
| `SpeechOff` | `SpeechOff` | custom | |
|
|
123
|
+
| `RecordingOffOutlined` | `CircleOff` | lucide | recording-disabled indicator (circle with slash) |
|
|
124
|
+
| `Speed100XFilled`, `Speed125XFilled`, `Speed150XFilled`, `Speed200XFilled` | — | **No equivalent** — render as text or custom badge | ⚠️ validate usage |
|
|
125
|
+
| `HeadsetFilled`, `HeadsetOutlined` | `Headset` | lucide | |
|
|
126
|
+
| `MusicFilled`, `MusicOutlined` | `Music4` | lucide | |
|
|
127
|
+
| `VideoFilled`, `VideoOutlined` | `Video` | lucide | |
|
|
128
|
+
| `ListenOnOutlined` | `Ear` | lucide | ⚠️ validate usage |
|
|
129
|
+
| `ListenOffOutlined` | `EarOff` | lucide | ⚠️ validate usage |
|
|
130
|
+
| `PictureInPictureOutlined` | `PictureInPicture2` | lucide | |
|
|
101
131
|
|
|
102
|
-
###
|
|
132
|
+
### Phone & Calls
|
|
103
133
|
|
|
104
|
-
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
|
|
105
|
-
| --- | --- | --- |
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
134
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
135
|
+
| --- | --- | --- | --- |
|
|
136
|
+
| `CallFilled`, `CallOutlined`, `CallCircleFilled` | `Phone` | lucide | |
|
|
137
|
+
| `PhoneCallingFilled` | `PhoneCall` | lucide | |
|
|
138
|
+
| `ClickToContactFilled` | `PhoneMessageCircle` | custom | |
|
|
139
|
+
| `CallInboundFilled`, `InboundFilled`, `InboundOutlined` | `PhoneIncoming` | lucide | |
|
|
140
|
+
| `CallOutboundFilled`, `OutboundFilled`, `AnsweredOutboundFilled` | `PhoneOutgoing` | lucide | |
|
|
141
|
+
| `NumberExtensionFilled` | `PhoneForwarded` | lucide | SVG is a phone-with-arrow, not a "#" hash |
|
|
142
|
+
| `HangUpFilled` | `PhoneDecline` | custom | |
|
|
143
|
+
| `HangUpOutlined` | `PhoneOff` | lucide | |
|
|
144
|
+
| `MissedInboundFilled` | `PhoneMissed` | lucide | |
|
|
145
|
+
| `MissedOutboundFilled` | `PhoneOff` | lucide | |
|
|
146
|
+
| `RingingFilled`, `RingingOutlined`, `CircledPhoneCallingFilled`, `CircledPhoneCallingOutlined` | `PhoneCall` | lucide | |
|
|
147
|
+
| `TransferFilled`, `TransferredOutlined` | `Forward` | lucide | |
|
|
148
|
+
| `TransferOutlined`, `TransferredFilled`, `PhoneArrowRightFilled` | `PhoneForwarded` | lucide | |
|
|
149
|
+
| `CallbackFilled`, `CallbackOutlined` | `Callback` | custom | |
|
|
150
|
+
| `QueueTransferFilled` | `Assigned` | custom | |
|
|
151
|
+
| `PhoneStar` | `Star` | lucide | |
|
|
152
|
+
| `CallBoltFilled` | `PhoneFollowUp` | custom | |
|
|
153
|
+
| `FollowUpFilled` | `PhoneFollowUp` | custom | |
|
|
154
|
+
| `KeypadFilled`, `KeypadOutlined` | `Keypad` | custom | |
|
|
155
|
+
| `PowerDialerFilled` | `PowerDialer` | custom | |
|
|
156
|
+
| `ConferenceFilled`, `ConferenceOutlined` | `Conference` | custom | |
|
|
157
|
+
| `VoicemailOutlined`, `CircledVoicemailFilled` | `Voicemail` | lucide | |
|
|
158
|
+
| `VoicemailDrop`, `VoicemailDropOutlined`, `VoicemailSubmittedOutlined` | `VoicemailDrop` | custom | |
|
|
159
|
+
| `DialLowFilled`, `OverviewOutlined` | `Gauge` | lucide | |
|
|
160
|
+
| `DialLowOutlined` | `Gauge` | lucide | |
|
|
161
|
+
| `Network0Outlined` (from `@aircall/tractor-v1`) | `SignalZero` | lucide | |
|
|
162
|
+
| `Network1Outlined` (from `@aircall/tractor-v1`) | `SignalLow` | lucide | |
|
|
163
|
+
| `Network2Outlined` (from `@aircall/tractor-v1`) | `SignalMedium` | lucide | |
|
|
164
|
+
| `Network3Outlined` (from `@aircall/tractor-v1`) | `SignalHigh` | lucide | |
|
|
165
|
+
| `Network4Outlined` (from `@aircall/tractor-v1`) | `Signal` | lucide | |
|
|
113
166
|
|
|
114
|
-
###
|
|
167
|
+
### Messages & SMS
|
|
115
168
|
|
|
116
|
-
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
|
|
117
|
-
| --- | --- | --- |
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
169
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
170
|
+
| --- | --- | --- | --- |
|
|
171
|
+
| `MessageFilled`, `SmsMessageLineFilled`, `SmsInboundFilled`, `SmsInboundOutlined`, `SmsMessageLineLeftOutline`, `CircledMessageFilled`, `CircledMessageNewOutlined` | `MessageSquare` | lucide | |
|
|
172
|
+
| `MessageOutlined`, `SmsMessageLineOutline`, `SmsOutboundOutlined`, `SmsOutboundFilled` | `MessageSquareInverted` | custom | |
|
|
173
|
+
| `MessageCircleOutlined` | `MessageSquare` | lucide | |
|
|
174
|
+
| `ChatFilled`, `ChatOutlined`, `DoubleConversationFilled` | `MessagesSquare` | lucide | |
|
|
175
|
+
| `MessageDisabledOutlined` | `MessageSquareOff` | lucide | ⚠️ validate usage |
|
|
176
|
+
| `MessageReadOutlined`, `SmsMessageReadFilled` | `MessageSquareCheck` | custom | |
|
|
177
|
+
| `MessageUnreadOutlined`, `MessageUnreadFilled` | `MessageSquareDot` | lucide | ⚠️ validate usage |
|
|
178
|
+
| `SmsMessageDotOutline`, `MessageDotsOutlined`, `MessageDotsFilled` | `MessageSquareMore` | lucide | |
|
|
179
|
+
| `SmsMessageLineErrorOutline` | `MessageSquareX` | lucide | |
|
|
180
|
+
| `MmsMessageLineLeftFill` | `MessageSquareImage` | custom | |
|
|
181
|
+
| `AIMessageFilled` | — | **No equivalent** — AI message indicator | ⚠️ validate usage |
|
|
182
|
+
| `StartConversation` | `Plus` | lucide | SVG is literally a plus sign |
|
|
183
|
+
| `EmailFilled`, `MailOutlined` | `Mail` | lucide | |
|
|
184
|
+
| `GenerateEmailFilled` | `EmailSparkle` | custom | |
|
|
185
|
+
| `InboxFilled`, `InboxOutlined`, `InboxBoldOutlined` | `Inbox` | lucide | |
|
|
186
|
+
| `InboxArrowInOutlined` | `ArchiveRestore` | lucide | see pending design confirmation |
|
|
187
|
+
|
|
188
|
+
### Date & Time
|
|
189
|
+
|
|
190
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
191
|
+
| --- | --- | --- | --- |
|
|
192
|
+
| `CalendarFilled`, `CalendarOutlined` | `Calendar` | lucide | |
|
|
193
|
+
| `ClockFilled`, `ClockOutlined` | `Clock` | lucide | |
|
|
194
|
+
| `TimerFilled` | `Timer` | lucide | ⚠️ validate usage |
|
|
195
|
+
| `SandclockFilled` | `Hourglass` | lucide | |
|
|
196
|
+
| `HistoryFilled`, `HistoryOutlined` | `History` | lucide | |
|
|
197
|
+
| `TimelineFilled` | `ArrowDownToDot` | lucide | |
|
|
123
198
|
|
|
124
|
-
###
|
|
199
|
+
### Actions
|
|
125
200
|
|
|
126
|
-
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
|
|
127
|
-
| --- | --- | --- |
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
201
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
202
|
+
| --- | --- | --- | --- |
|
|
203
|
+
| `AddCircleFilled`, `PlusCircleFilled`, `PlusCircleOutlined` | `Plus` | lucide | |
|
|
204
|
+
| `PlusOutlined` | `Plus` | lucide | |
|
|
205
|
+
| `MinusOutlined` | `Minus` | lucide | |
|
|
206
|
+
| `IndeterminateFilled` | `Minus` | lucide | indeterminate checkbox state (same minus shape) |
|
|
207
|
+
| `CloseOutline`, `CloseOutlined` | `X` | lucide | |
|
|
208
|
+
| `CloseCircleFilled`, `CloseCircleOutlined` | `X` | lucide | |
|
|
209
|
+
| `CheckOutlined`, `TickOutlined` | `Check` | lucide | |
|
|
210
|
+
| `TickCircleFilled`, `TickCircleOutlined`, `CheckedCircleFilled`, `CheckedCircleOutlined`, `CheckedCircleOutlinedFilled` | `CircleCheck` | lucide | |
|
|
211
|
+
| `CheckedOutlined` | `CircleCheck` | lucide | |
|
|
212
|
+
| `DoubleCheckOutlined`, `DoubleTickCircleFilled` | `CheckCheck` | lucide | |
|
|
213
|
+
| `ActionItemsFilled`, `ActionItemOutlined` | `SquareCheckBig` | lucide | |
|
|
214
|
+
| `ToDoFilled`, `ToDoOutlined` | `ListTodo` | lucide | |
|
|
215
|
+
| `DragOutlined` | `GripVertical` | lucide | |
|
|
216
|
+
| `OpenHandOutlined` | `Hand` | lucide | ⚠️ validate usage |
|
|
217
|
+
| `MinusCircleFilled`, `MinusCircleOutlined` | `Minus` | lucide | |
|
|
218
|
+
| `ImageFilled` | `Image` | lucide | |
|
|
219
|
+
| `ShareFilled`, `ShareOutlined` | `Share2` | lucide | |
|
|
220
|
+
| `CopyFilled`, `CopyOutlined` | `Copy` | lucide | |
|
|
221
|
+
| `EditFilled`, `EditOutlined`, `DraftCircleFilled` | `Pencil` | lucide | |
|
|
222
|
+
| `TrashFilled`, `TrashOutlined` | `Trash2` | lucide | |
|
|
223
|
+
| `DownloadFilled` | `ArrowDownToLine` | lucide | |
|
|
224
|
+
| `ArchiveOutlined`, `ArchiveFilled`, `ArchivesFilled` | `Archive` | lucide | |
|
|
225
|
+
| `UnarchiveFilled`, `UnarchiveOutlined` | `ArchiveRestore` | lucide | |
|
|
226
|
+
| `LinkOutlined` | `Link` | lucide | |
|
|
227
|
+
| `ClipOutlined` | `Paperclip` | lucide | |
|
|
228
|
+
| `FilterOutlined`, `FilterFilled` | `ListFilter` | lucide | |
|
|
229
|
+
| `SortOutlined` | `ArrowUpDown` | lucide | |
|
|
230
|
+
| `SearchOutlined` | `Search` | lucide | |
|
|
231
|
+
| `ScanOutlined` | `ScanLine` | lucide | |
|
|
232
|
+
| `LockedFilled`, `LockedOutlined` | `LockKeyhole` | lucide | |
|
|
233
|
+
| `BlockedFilled`, `BlockedOutlined` | `CircleMinus` | lucide | |
|
|
234
|
+
| `LogoutOutlined` | `LogOut` | lucide | |
|
|
235
|
+
| `FixIconFilled` | `Wrench` | lucide | wrench/repair tool icon | ⚠️ validate usage |
|
|
236
|
+
| `AddPhotoFilled`, `AddPhotoOutlined` | `Camera` | lucide | |
|
|
237
|
+
| `EmojiFilled` | `Smile` | lucide | emoji picker trigger icon |
|
|
238
|
+
| `BookmarkFilled`, `BookmarkOutlined` | `Bookmark` | lucide | |
|
|
239
|
+
| `BookmarkAddFilled`, `BookmarkAddOutlined` | `BookmarkPlus` | lucide | ⚠️ validate usage |
|
|
240
|
+
| `BookmarkAddedFilled`, `BookmarkAddedOutlined` | `BookmarkCheck` | lucide | ⚠️ validate usage |
|
|
241
|
+
| `BookmarkDeleteFilled`, `BookmarkDeleteOutlined` | `BookmarkMinus` | lucide | ⚠️ validate usage |
|
|
242
|
+
| `KeypadDeleteFilled`, `KeypadDeleteOutlined` | `Delete` | lucide | backspace key on keypad |
|
|
243
|
+
| `BulletListFilled` | `ListTodo` | lucide | |
|
|
244
|
+
| `PaletteFilled` | `Palette` | lucide | |
|
|
133
245
|
|
|
134
|
-
###
|
|
246
|
+
### Users & Contacts
|
|
135
247
|
|
|
136
|
-
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
|
|
137
|
-
| --- | --- | --- |
|
|
138
|
-
| `
|
|
139
|
-
| `
|
|
140
|
-
| `
|
|
141
|
-
| `
|
|
248
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
249
|
+
| --- | --- | --- | --- |
|
|
250
|
+
| `UserFilled`, `UserOutlined` | `UserRound` | lucide | |
|
|
251
|
+
| `AddUserFilled`, `AddUserOutlined`, `UserAddFilled` | `UserRoundPlus` | lucide | |
|
|
252
|
+
| `UserArrowInFilled` | `Assigned` | custom | |
|
|
253
|
+
| `PeopleFilled`, `PeopleOutlined`, `CircledConferenceFilled` | `UsersRound` | lucide | |
|
|
254
|
+
| `BotFilled` | `Bot` | lucide | |
|
|
255
|
+
| `ContactsFilled`, `ContactsOutlined` | `ContactRound` | lucide | |
|
|
256
|
+
| `ContactOutlined` | `CircleUserRound` | lucide | |
|
|
257
|
+
| `ContactInfoFilled`, `ContactFilled` | `ContactRound` | lucide | |
|
|
258
|
+
| `AssignedFilled`, `AssignedOutlined` | `Assigned` | custom | |
|
|
259
|
+
| `CompanyFilled`, `CompanyOutlined` | `Building` | lucide | |
|
|
142
260
|
|
|
143
261
|
### System & Settings
|
|
144
262
|
|
|
145
|
-
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
|
|
146
|
-
| --- | --- | --- |
|
|
147
|
-
| `SettingsFilled`, `SettingsOutlined` | `Settings` | lucide |
|
|
148
|
-
| `
|
|
149
|
-
| `
|
|
150
|
-
| `
|
|
263
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
264
|
+
| --- | --- | --- | --- |
|
|
265
|
+
| `SettingsFilled`, `SettingsOutlined`, `Settings1Outlined` | `Settings` | lucide | |
|
|
266
|
+
| `PreferencesFilled`, `PreferencesOutlined` | `Settings` | lucide | |
|
|
267
|
+
| `MenuVerticalFilled`, `MenuVerticalOutlined` | `MoreVertical` | lucide | |
|
|
268
|
+
| `MenuHorizontalFilled`, `MenuHorizontalOutlined` | `MoreHorizontal` | lucide | |
|
|
269
|
+
| `LanguageOutlined` | `Languages` | lucide | |
|
|
270
|
+
| `ContextualRoutingOutlined` | `CodeXml` | lucide | |
|
|
271
|
+
| `NumbersFilled` | `Hash` | lucide | ⚠️ validate usage |
|
|
272
|
+
| `ListOutlined`, `ListFilled` | `List` | lucide | ⚠️ validate usage |
|
|
273
|
+
| `BugFilled`, `BugOutlined` | `Bug` | lucide | ⚠️ validate usage |
|
|
274
|
+
| `IntegrationsOutlined`, `Integrations1Outlined` | `Puzzle` | lucide | ⚠️ validate usage — see Pending design confirmation |
|
|
275
|
+
| `WebhookOutlined` | `Webhook` | lucide | |
|
|
276
|
+
| `StructureOutlined` | `Network` | lucide | |
|
|
277
|
+
| `EsimOutlined`, `EsimBoldOutlined` | `ESim` | custom | |
|
|
278
|
+
| `BluetoothOutlined` | `Bluetooth` | lucide | |
|
|
279
|
+
| `PlugFilled`, `PlugOutlined` | `Plug` | lucide | ⚠️ validate usage |
|
|
280
|
+
| `PowerOutlined` | `Power` | lucide | ⚠️ validate usage |
|
|
281
|
+
| `KeyboardShortcutsFilled` | `Keyboard` | lucide | |
|
|
282
|
+
| `Switch` | `ArrowLeftRight` | lucide | ⚠️ validate usage |
|
|
283
|
+
| `ViewModeLeftBar` | `PanelLeft` | lucide | |
|
|
284
|
+
| `ViewModeLeftMenu` | `PanelLeftOpen` | lucide | |
|
|
285
|
+
| `StackViewOutlined` | `PanelTop` | lucide | |
|
|
286
|
+
| `SpinnerOutlined` | `Loader2` | lucide | spinning loader |
|
|
151
287
|
|
|
152
|
-
###
|
|
288
|
+
### Feedback & Status
|
|
153
289
|
|
|
154
|
-
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
|
|
155
|
-
| --- | --- | --- |
|
|
156
|
-
| `
|
|
157
|
-
| `
|
|
158
|
-
| `
|
|
159
|
-
| `
|
|
290
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
291
|
+
| --- | --- | --- | --- |
|
|
292
|
+
| `InformationFilled`, `InformationOutlined` | `Info` | lucide | |
|
|
293
|
+
| `WarningFilled`, `WarningOutlined`, `WarningMarkOutlined` | `AlertTriangle` | lucide | |
|
|
294
|
+
| `WarningCircleFilled` | `AlertCircle` | lucide | |
|
|
295
|
+
| `QuestionFilled` | `HelpCircle` | lucide | |
|
|
296
|
+
| `SupportFilled`, `SupportOutlined`, `Support1Outlined` | `CircleHelp` | lucide | |
|
|
297
|
+
| `FeedbackFilled`, `FeedbackOutlined` | `Megaphone` | lucide | |
|
|
298
|
+
| `ThumbsUpOutlined` | `ThumbsUp` | lucide | |
|
|
299
|
+
| `ThumbsUpFilled` | `ThumbsUpFilled` | custom | |
|
|
300
|
+
| `ThumbsDownOutlined` | `ThumbsDown` | lucide | |
|
|
301
|
+
| `ThumbsDownFilled` | `ThumbsDownFilled` | custom | |
|
|
302
|
+
| `StarFilled` | `StarFilled` | custom | |
|
|
303
|
+
| `StarOutlined` | `Star` | lucide | |
|
|
304
|
+
| `NotificationBellStrokeFilled` | `BellOff` | lucide | |
|
|
305
|
+
| `BannerOutlined` | `Flag` | lucide | ⚠️ validate usage |
|
|
306
|
+
| `NotificationOnFilled`, `NotificationOnOutlined` | `Bell` | lucide | |
|
|
307
|
+
| `SentimentPositiveFilled`, `SentimentPositiveOutlined` | `Smile` | lucide | |
|
|
308
|
+
| `SentimentNeutralFilled`, `SentimentNeutralOutlined` | `Meh` | lucide | |
|
|
309
|
+
| `SentimentNegativeFilled`, `SentimentNegativeOutlined` | `Frown` | lucide | |
|
|
310
|
+
|
|
311
|
+
### Analytics & Activity
|
|
312
|
+
|
|
313
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
314
|
+
| --- | --- | --- | --- |
|
|
315
|
+
| `ActivityFilled`, `ActivityOutlined`, `BoltFilled` | `Zap` | lucide | |
|
|
316
|
+
| `ActivityFeedFilled` | `Activity` | lucide | ⚠️ validate usage |
|
|
317
|
+
| `MonitoringFilled`, `AnalyticsFilled`, `AnalyticsPlusOutlined`, `GraphFilled` | `BarChartBig` | lucide | |
|
|
318
|
+
| `MonitoringOutlined`, `LivefeedOutlined` | `LiveMonitoring` | custom | |
|
|
319
|
+
| `AnalyticsOutlined`, `StatsOutlined` | `BarChart3` | lucide | ⚠️ validate usage |
|
|
320
|
+
| `SparklesFilled`, `LivePromptFilled` | `AiAssist` | custom | |
|
|
321
|
+
| `MagicFilled` | `AiAssist` | custom | |
|
|
322
|
+
| `AiAssistProFilled` | `AiAssistPro` | custom | |
|
|
323
|
+
| `AIAgent`, `VirtualAgentFilled` | `AiAgents` | custom | |
|
|
324
|
+
|
|
325
|
+
### Context (Notes, Tags, Files)
|
|
326
|
+
|
|
327
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
328
|
+
| --- | --- | --- | --- |
|
|
329
|
+
| `NotesFilled`, `NotesOutlined` | `StickyNote` | lucide | |
|
|
330
|
+
| `TagsFilled`, `TagsOutlined` | `Tag` | lucide | |
|
|
331
|
+
| `TagsAndNotesFilled`, `TagsNotesFilled` | `TagsNotes` | custom | `TagsNotesFilled` is an identical SVG under a different name |
|
|
332
|
+
| `TemplateFilled` | `Template` | custom | |
|
|
333
|
+
| `TemplateAdd` | `TemplateAdd` | custom | |
|
|
334
|
+
| `PlaybookFilled`, `BantSummaryFilled` | `BookSparkle` | custom | |
|
|
335
|
+
| `CustomSummaryFilled` | `TranscriptSparkle` | custom | |
|
|
336
|
+
| `FileFilled` | `File` | lucide | |
|
|
337
|
+
| `DocumentationFilled` | `BookOpen` | lucide | ⚠️ validate usage |
|
|
338
|
+
| `InvoiceOutlined` | `Receipt` | lucide | ⚠️ validate usage |
|
|
339
|
+
| `PdfFilled` | `Pdf` | custom | |
|
|
340
|
+
| `FolderFilled` | `Folder` | lucide | |
|
|
341
|
+
| `FolderOpen`, `FolderOpenFilled` | `FolderOpen` | lucide | |
|
|
342
|
+
| `FolderCheckedOutlined` | `FolderCheck` | lucide | ⚠️ validate usage |
|
|
343
|
+
| `LocationPinFilled` | `MapPin` | lucide | |
|
|
344
|
+
|
|
345
|
+
### Visibility & Misc
|
|
346
|
+
|
|
347
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
348
|
+
| --- | --- | --- | --- |
|
|
349
|
+
| `VisibleOnFilled`, `VisibleOnOutlined` | `Eye` | lucide | |
|
|
350
|
+
| `VisibleOffFilled`, `VisibleOffOutlined` | `EyeOff` | lucide | |
|
|
351
|
+
| `CircleFilled` | `Circle` | lucide | ⚠️ validate usage |
|
|
352
|
+
| `MoonFilled`, `MoonOutlined` | `Moon` | lucide | |
|
|
353
|
+
| `ContrastFilled` | `Palette` | lucide | ⚠️ validate usage |
|
|
354
|
+
| `SunFilled` | `Sun` | lucide | |
|
|
355
|
+
| `CrownFilled`, `CrownOutlined` | `Crown` | lucide | ⚠️ validate usage |
|
|
356
|
+
| `GiftOutlined`, `PresentFilled`, `PresentOutlined` | `Gift` | lucide | ⚠️ validate usage |
|
|
357
|
+
| `BatterySafeFilled` | `BatteryCharging` | lucide | |
|
|
358
|
+
| `PowerDialerAddFilled` | `PowerDialerPlus` | custom | |
|
|
359
|
+
| `TranscriptionOkOutlined` | `Transcript` | custom | |
|
|
360
|
+
| `TranscriptionNokOutlined`, `TranscriptionErrorOutlined` | `TranscriptOff` | custom | |
|
|
361
|
+
| `TranscriptionReadOutlined` | `Transcript` | custom | |
|
|
362
|
+
| `Utensils` | `Utensils` | lucide | |
|
|
363
|
+
| `Mug` | `Coffee` | lucide | |
|
|
364
|
+
|
|
365
|
+
### Education & Onboarding
|
|
366
|
+
|
|
367
|
+
| Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source | Note |
|
|
368
|
+
| --- | --- | --- | --- |
|
|
369
|
+
| `SchoolFilled` | `GraduationCap` | lucide | |
|
|
370
|
+
| `OnboardingFilled` | — | **No equivalent** — use `Flag` or `Rocket` as placeholder; confirm with design | ⚠️ validate usage |
|
|
371
|
+
|
|
372
|
+
### Flags
|
|
373
|
+
|
|
374
|
+
Colored country flags ship as `Flag*` exports (`FlagFr`, `FlagUs`, …). A `FLAGS` map is exported for dynamic ISO-code lookup.
|
|
160
375
|
|
|
161
376
|
## 5. Icons with no equivalent
|
|
162
377
|
|
|
163
|
-
A small number of old icons have no direct mapping. Handle them as noted:
|
|
164
|
-
|
|
165
378
|
| Old icon | Action |
|
|
166
379
|
| --- | --- |
|
|
167
380
|
| `PlayPauseFilled`, `PlayPauseOutlined` | Use `Play` or `Pause` contextually — no combined equivalent |
|
|
@@ -169,6 +382,14 @@ A small number of old icons have no direct mapping. Handle them as noted:
|
|
|
169
382
|
| `AIMessageFilled` | No equivalent — treat as custom SVG until a replacement ships |
|
|
170
383
|
| `OnboardingFilled` | Use `Flag` or `Rocket` as a placeholder; confirm with design |
|
|
171
384
|
|
|
385
|
+
## 5a. Pending design confirmation
|
|
386
|
+
|
|
387
|
+
Pairs where the placeholder mapping doesn't convincingly match the old icon. Confirm with design before locking the consumer-side migration.
|
|
388
|
+
|
|
389
|
+
| Old | Placeholder | Reason |
|
|
390
|
+
| --- | --- | --- |
|
|
391
|
+
| `IntegrationsOutlined`, `Integrations1Outlined` | `Puzzle` (lucide) | Old is a flower/multi-petal hub, not a puzzle piece. |
|
|
392
|
+
|
|
172
393
|
## 6. Brand / platform icons (not in @aircall/react-icons)
|
|
173
394
|
|
|
174
395
|
Keep these as separate inline SVGs or local wrappers — they are not in `@aircall/react-icons`:
|
|
@@ -334,13 +555,21 @@ import { Phone } from '@aircall/react-icons';
|
|
|
334
555
|
|
|
335
556
|
Source: `@aircall/react-icons` re-exports lucide + Aircall icons as the canonical icon surface for Aircall apps.
|
|
336
557
|
|
|
337
|
-
## 9.
|
|
558
|
+
## 9. Gotchas
|
|
559
|
+
|
|
560
|
+
- **Filled-vs-outlined drift is expected.** Most lucide icons are stroke-outlined; only a small set in `react-icons/src/generated/custom` end in `Filled`. Looking "lighter" is not a bug.
|
|
561
|
+
- **Circle variants drop.** When lucide has no circled equivalent, the circle goes (`CallCircleFilled` → `Phone`).
|
|
562
|
+
- **Trust the visual, not the Tractor name.** Some Tractor names misdescribe their SVG: `StopFilled` is a circled-X, `ArrowDownFilled` is a chevron, `StartConversation` is just a plus. Look at the rendered shape before locking a mapping.
|
|
563
|
+
- **`@aircall/tractor-v1`** has its own icon family; same approach — map to lucide `Signal*` etc.
|
|
564
|
+
- **Missing row?** Look up the old name in `packages/icons/src/components/` for context, find the closest lucide/custom match, and add the row to the migration guide.
|
|
565
|
+
|
|
566
|
+
## 10. Migration checklist
|
|
338
567
|
|
|
339
568
|
- [ ] Swap `@aircall/icons` → `@aircall/react-icons` in `package.json`
|
|
340
569
|
- [ ] Remove `import { Icon } from '@aircall/tractor'` — no wrapper needed
|
|
341
570
|
- [ ] Rename icons per the tables above (many `*Filled`/`*Outlined` pairs merge into one name)
|
|
342
571
|
- [ ] Replace `color="…"` with `className="text-*"` using the color table
|
|
343
572
|
- [ ] Replace `size={N}` with `className="size-N"` (or omit when inside a DS `Button`)
|
|
344
|
-
- [ ] Run `pnpm tsc --noEmit` —
|
|
345
|
-
- [ ] Keep brand/platform icons (Aircall logo, OS, browser, WhatsApp) as separate assets
|
|
346
|
-
- [ ] For icons marked
|
|
573
|
+
- [ ] Run `pnpm tsc --noEmit` — unknown imports surface as missing exports
|
|
574
|
+
- [ ] Keep brand/platform icons (Aircall logo, OS, browser, WhatsApp) as separate assets — not in `@aircall/react-icons`
|
|
575
|
+
- [ ] For icons marked ⚠️ validate usage, confirm the new shape is visually correct in context before locking the migration
|
|
@@ -235,7 +235,7 @@ Then load the listed recipe skill (if `available`) for the detailed swap.
|
|
|
235
235
|
| --- | --- | --- | --- |
|
|
236
236
|
| `Accordion` (+ `AccordionSection`) | `Accordion` + `AccordionItem` + `AccordionTrigger` + `AccordionContent` | `@aircall/ds#aircall-ds/migrate-tractor/accordion` | available |
|
|
237
237
|
| `ActionMenu` | `DropdownMenu` (compound) | `@aircall/ds#aircall-ds/migrate-tractor/dropdown-menu` | available |
|
|
238
|
-
| `AudioPlayer` |
|
|
238
|
+
| `Audio` / `AudioPlayer` / `AudioManager` / `useAudio` | `Audio` + `AudioPlayerRow` + `AudioPlayerButton` + `AudioPlayerBar` + `AudioPlayerTime` + `AudioPlayerSpeed` + `AudioPlayerSkip` + `AudioPlayerManager` | `@aircall/ds#aircall-ds/migrate-audio-player` | available |
|
|
239
239
|
| `Avatar` (+ `QuickAvatar`) | `Avatar` + `AvatarImage` + `AvatarFallback` | `@aircall/ds#aircall-ds/migrate-tractor/avatar` | available |
|
|
240
240
|
| `Badge` | `AvatarBadge` (status dot on avatar); `Badge` (label/tag style) | `@aircall/ds#aircall-ds/migrate-tractor/badge` | available |
|
|
241
241
|
| `Banner` (+ `BannerHeading`/`BannerIcon`/`BannerSuffix`) | `Alert` (rounded card) / `Banner` (inline full-width) | `@aircall/ds#aircall-ds/migrate-tractor/alert` | available |
|
|
@@ -43,8 +43,9 @@ There is no sub-component API (no `<TableColumn>`) — everything is declared in
|
|
|
43
43
|
| `footer` | column-level `ColumnDef.footer` (auto-renders `<tfoot>`) |
|
|
44
44
|
| _(no equivalent)_ | `loadingState="sorting"` / `"filtering"` (overlay spinner) |
|
|
45
45
|
| _(no equivalent)_ | `loadingState="loadingMore"` (infinite scroll spinner row) |
|
|
46
|
-
| _(no equivalent)_ | `onFetchMore` + `hasMore` (IntersectionObserver sentinel) |
|
|
46
|
+
| _(no equivalent)_ | `onFetchMore` + `hasMore` (IntersectionObserver sentinel for infinite scroll) |
|
|
47
47
|
| _(no equivalent)_ | `fillHeight` (sticky header, internal scroll) |
|
|
48
|
+
| _(no equivalent)_ | `virtualizeRows` (explicit row virtualization — requires `fillHeight`) |
|
|
48
49
|
|
|
49
50
|
## 3. Verified DS exports (`packages/ds/src/index.ts`)
|
|
50
51
|
|
|
@@ -331,3 +332,48 @@ import { Empty, EmptyContent, EmptyTitle, EmptyDescription } from '@aircall/ds';
|
|
|
331
332
|
Tractor `noDataMessage` accepted a `ReactNode` but was declared as a simple prop. DS requires an `emptyState` prop; `noDataMessage` is silently ignored. For plain text, wrap it in a `<p>` with `text-sm text-muted-foreground`. For a full empty state with an icon and a call-to-action, use the `Empty` compound from `@aircall/ds`.
|
|
332
333
|
|
|
333
334
|
Source: `packages/ds/src/components/data-table.tsx`
|
|
335
|
+
|
|
336
|
+
## 8. Infinite scroll and row virtualization
|
|
337
|
+
|
|
338
|
+
`DataTable` supports infinite scroll via `onFetchMore` + `hasMore` (IntersectionObserver sentinel). Row virtualization is a **separate, explicit opt-in** via the `virtualizeRows` prop — the consumer decides when to enable it.
|
|
339
|
+
|
|
340
|
+
`virtualizeRows` **requires `fillHeight={true}`** — the container must scroll internally so the virtualizer can track `scrollTop`. Without `fillHeight` the page scrolls instead, `scrollTop` stays 0, and the virtual window never updates.
|
|
341
|
+
|
|
342
|
+
Use `virtualizeRows` on any table with 1 000+ rows: infinite-scroll tables that accumulate pages, or static datasets loaded all at once.
|
|
343
|
+
|
|
344
|
+
```tsx
|
|
345
|
+
// Infinite scroll with virtualization
|
|
346
|
+
function CallsTable() {
|
|
347
|
+
const [items, setItems] = React.useState<Call[]>(() => fetchPage(0));
|
|
348
|
+
const [isFetchingMore, setIsFetchingMore] = React.useState(false);
|
|
349
|
+
const hasMore = items.length < totalCount;
|
|
350
|
+
|
|
351
|
+
const onFetchMore = React.useCallback(() => {
|
|
352
|
+
if (isFetchingMore || !hasMore) return;
|
|
353
|
+
setIsFetchingMore(true);
|
|
354
|
+
fetchPage(items.length).then(page => {
|
|
355
|
+
setItems(prev => [...prev, ...page]);
|
|
356
|
+
setIsFetchingMore(false);
|
|
357
|
+
});
|
|
358
|
+
}, [isFetchingMore, hasMore, items.length]);
|
|
359
|
+
|
|
360
|
+
return (
|
|
361
|
+
<div className="flex h-dvh flex-col p-4">
|
|
362
|
+
<DataTable
|
|
363
|
+
columns={columns} // each column must have a size when virtualizing
|
|
364
|
+
data={items}
|
|
365
|
+
getRowId={row => row.id}
|
|
366
|
+
fillHeight
|
|
367
|
+
virtualizeRows
|
|
368
|
+
onFetchMore={onFetchMore}
|
|
369
|
+
hasMore={hasMore}
|
|
370
|
+
loadingState={isFetchingMore ? 'loadingMore' : 'idle'}
|
|
371
|
+
/>
|
|
372
|
+
</div>
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**Pagination does not need virtualization.** With pagination you replace `data` on each page change — the row count stays constant. Do not pass `onFetchMore`; use an external `<Pagination>` component instead.
|
|
378
|
+
|
|
379
|
+
Source: `packages/ds/src/components/data-table.tsx`
|
|
@@ -336,3 +336,36 @@ Source: `packages/ds/src/components/dropzone.tsx`
|
|
|
336
336
|
`<DropzoneContent error>` only toggles the destructive border — it does not render an error message. The accessible error text belongs in `<FieldError>` outside the dropzone, associated via `<Field data-invalid>`.
|
|
337
337
|
|
|
338
338
|
Source: `packages/ds/src/components/dropzone.tsx`
|
|
339
|
+
|
|
340
|
+
## 6. Testing (jsdom)
|
|
341
|
+
|
|
342
|
+
`<Dropzone>` renders a **real `<input type="file">`** and reacts to that input's
|
|
343
|
+
`change` event — so tests drive the input, not a synthetic `drop` on a wrapper.
|
|
344
|
+
This is the part most migrations get wrong: legacy wrappers were tested with
|
|
345
|
+
`fireEvent.drop(...)` reading `dataTransfer`/`event.target.files`, which the DS
|
|
346
|
+
Dropzone ignores. Migrate those assertions:
|
|
347
|
+
|
|
348
|
+
| Legacy test | DS test |
|
|
349
|
+
| --- | --- |
|
|
350
|
+
| `fireEvent.drop(el)` with a stubbed `files` | `userEvent.upload(input, file)` (an accepted file) |
|
|
351
|
+
| dropping an invalid file to hit the reject path | set `input.files` + `fireEvent.change(input)` to **bypass the `accept` filter** |
|
|
352
|
+
| `getByTestId('…-input')` on a wrapper's input | `document.querySelector('input[type="file"]')` (the DS input has no test id) |
|
|
353
|
+
|
|
354
|
+
```tsx
|
|
355
|
+
const input = document.querySelector('input[type="file"]') as HTMLInputElement;
|
|
356
|
+
|
|
357
|
+
// accepted → onFiles
|
|
358
|
+
await userEvent.upload(input, new File(['phone\n+3361'], 'leads.csv', { type: 'text/csv' }));
|
|
359
|
+
|
|
360
|
+
// rejected → onError (userEvent.upload enforces `accept`, so bypass it)
|
|
361
|
+
Object.defineProperty(input, 'files', { configurable: true, value: [badFile] });
|
|
362
|
+
fireEvent.change(input);
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
On change the component runs `validateFiles`, then fires `onFiles(accepted)` and/or
|
|
366
|
+
`onError(rejections)` (a mixed batch fires **both**). Assert on those callbacks —
|
|
367
|
+
not on internal DOM. There is no "no test-hookable input" limitation; a wrapper
|
|
368
|
+
that keeps `@dashboard/library` "because tests need `fireEvent.drop`" can be fully
|
|
369
|
+
migrated by moving its tests to the input.
|
|
370
|
+
|
|
371
|
+
Source: `packages/ds/src/components/dropzone.tsx`
|