@aircall/ds 0.14.0 → 0.16.1

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.
Files changed (34) hide show
  1. package/README.md +31 -0
  2. package/dist/globals.css +1 -1
  3. package/dist/index.d.ts +144 -27
  4. package/dist/index.js +203 -65
  5. package/package.json +12 -2
  6. package/skills/aircall-ds/migrate-icons/SKILL.md +346 -0
  7. package/skills/aircall-ds/migrate-tractor/SKILL.md +314 -0
  8. package/skills/aircall-ds/migrate-tractor/accordion/SKILL.md +276 -0
  9. package/skills/aircall-ds/migrate-tractor/alert/SKILL.md +225 -0
  10. package/skills/aircall-ds/migrate-tractor/avatar/SKILL.md +272 -0
  11. package/skills/aircall-ds/migrate-tractor/badge/SKILL.md +274 -0
  12. package/skills/aircall-ds/migrate-tractor/button/SKILL.md +277 -0
  13. package/skills/aircall-ds/migrate-tractor/card/SKILL.md +278 -0
  14. package/skills/aircall-ds/migrate-tractor/combobox/SKILL.md +346 -0
  15. package/skills/aircall-ds/migrate-tractor/data-table/SKILL.md +333 -0
  16. package/skills/aircall-ds/migrate-tractor/dialog/SKILL.md +206 -0
  17. package/skills/aircall-ds/migrate-tractor/divider/SKILL.md +226 -0
  18. package/skills/aircall-ds/migrate-tractor/dropdown-menu/SKILL.md +266 -0
  19. package/skills/aircall-ds/migrate-tractor/dropzone/SKILL.md +338 -0
  20. package/skills/aircall-ds/migrate-tractor/form-and-field/SKILL.md +325 -0
  21. package/skills/aircall-ds/migrate-tractor/gauge/SKILL.md +248 -0
  22. package/skills/aircall-ds/migrate-tractor/input/SKILL.md +261 -0
  23. package/skills/aircall-ds/migrate-tractor/item/SKILL.md +298 -0
  24. package/skills/aircall-ds/migrate-tractor/link/SKILL.md +263 -0
  25. package/skills/aircall-ds/migrate-tractor/popover/SKILL.md +214 -0
  26. package/skills/aircall-ds/migrate-tractor/select/SKILL.md +245 -0
  27. package/skills/aircall-ds/migrate-tractor/sheet-vs-drawer/SKILL.md +272 -0
  28. package/skills/aircall-ds/migrate-tractor/skeleton/SKILL.md +190 -0
  29. package/skills/aircall-ds/migrate-tractor/styling/SKILL.md +421 -0
  30. package/skills/aircall-ds/migrate-tractor/tabs/SKILL.md +250 -0
  31. package/skills/aircall-ds/migrate-tractor/toast/SKILL.md +322 -0
  32. package/skills/aircall-ds/migrate-tractor/tooltip/SKILL.md +204 -0
  33. package/skills/aircall-ds/migrate-tractor/tree/SKILL.md +346 -0
  34. package/skills/aircall-ds/setup/SKILL.md +347 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aircall/ds",
3
- "version": "0.14.0",
3
+ "version": "0.16.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "sideEffects": [
@@ -17,7 +17,8 @@
17
17
  "src/fonts",
18
18
  "README.md",
19
19
  "AGENTS.consumer.md",
20
- "package.json"
20
+ "package.json",
21
+ "skills"
21
22
  ],
22
23
  "exports": {
23
24
  ".": {
@@ -81,6 +82,7 @@
81
82
  "@storybook/react-vite": "10.3.3",
82
83
  "@tailwindcss/cli": "4.1.18",
83
84
  "@tailwindcss/postcss": "4.1.18",
85
+ "@tanstack/intent": "0.1.1",
84
86
  "@tanstack/react-table": "8.20.6",
85
87
  "@turbo/gen": "2.4.2",
86
88
  "@types/node": "24",
@@ -105,6 +107,14 @@
105
107
  "vitest": "4.0.17",
106
108
  "@aircall/hooks": "0.5.1"
107
109
  },
110
+ "keywords": [
111
+ "tanstack-intent"
112
+ ],
113
+ "repository": {
114
+ "type": "git",
115
+ "url": "git+https://gitlab.com/aircall/shared/hydra.git",
116
+ "directory": "packages/ds"
117
+ },
108
118
  "scripts": {
109
119
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
110
120
  "build:js": "tsdown --config ./tsdown.config.ts",
@@ -0,0 +1,346 @@
1
+ ---
2
+ name: aircall-ds/migrate-icons
3
+ description: >
4
+ Migrate icons from @aircall/icons to @aircall/react-icons — the old→new name map,
5
+ color/size → Tailwind, custom & brand icons. Works standalone (an icons-only swap)
6
+ or inside a Tractor migration (also drops Tractor's <Icon> wrapper). Load when a file
7
+ imports any named icon from @aircall/icons, or Icon from @aircall/tractor.
8
+ type: sub-skill
9
+ library: aircall-ds
10
+ library_version: "0.13.0"
11
+ requires:
12
+ - aircall-ds/setup
13
+ sources:
14
+ - "aircall/hydra:docs/migration-guides/tractor-to-ds/06-react-icons.md"
15
+ ---
16
+
17
+ Migrate icons from `@aircall/icons` to `@aircall/react-icons`. This is **independent of
18
+ the Tractor migration** — run it on its own for an icons-only swap, or as part of
19
+ `aircall-ds/migrate-tractor`. The name / color / size mappings below apply whether an
20
+ icon is rendered directly (`<SomeIcon />`) or through Tractor's `<Icon component={…} />`
21
+ wrapper; when it was wrapped in Tractor's `<Icon>`, also remove that wrapper (see §1 and §7).
22
+
23
+ > **Upgrade `@aircall/react-icons` to `>= 0.4.0` as part of this migration.** `@aircall/ds`
24
+ > itself imports flags (`CountryFlag` → `FlagUs`, …) from it; an older version (≤ 0.3.0)
25
+ > breaks the ds bundle at build time, not just your own icon imports. `pnpm add @aircall/react-icons@latest`.
26
+
27
+ ## 1. What changes
28
+
29
+ | Tractor part | @aircall/react-icons part |
30
+ | --- | --- |
31
+ | `import { Icon } from '@aircall/tractor'` | _(removed — no wrapper needed)_ |
32
+ | `import { SomeIcon } from '@aircall/icons'` | `import { NewName } from '@aircall/react-icons'` |
33
+ | `<Icon component={SomeIcon} size={N} color="primary.500" />` | `<NewName className="size-N text-primary" />` |
34
+ | `color="…"` (Tractor token) | `text-*` Tailwind class (see color table) |
35
+ | `size={N}` (number) | `size-N` Tailwind class (`size-4`=16px, `size-5`=20px, `size-6`=24px) |
36
+
37
+ `@aircall/react-icons` re-exports all lucide icons plus a set of Aircall custom icons. Never import from `lucide-react` directly.
38
+
39
+ ## 2. Color mapping
40
+
41
+ | Tractor `color` value | Tailwind class |
42
+ | --- | --- |
43
+ | `primary.500` | `text-primary` |
44
+ | `critical.500` | `text-destructive` |
45
+ | `success.500` | `text-success` |
46
+ | `warning.500` | `text-warning` |
47
+ | `informative.500` | `text-info` |
48
+ | `text.base` | `text-foreground` |
49
+ | `text.secondary` | `text-muted-foreground` |
50
+
51
+ ## 3. Size mapping
52
+
53
+ | Tractor `size` | Tailwind class | px |
54
+ | --- | --- | --- |
55
+ | `16` | `size-4` | 16px |
56
+ | `20` | `size-5` | 20px |
57
+ | `24` | `size-6` | 24px |
58
+
59
+ ## 4. Icon name mapping (selected)
60
+
61
+ This is a representative sample. For the full table consult the icon name tables in the migration guide.
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 |
90
+
91
+ ### Arrows & Navigation
92
+
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
+ | `SendFilled`, `SendOutlined` | `Send` | lucide |
100
+ | `RefreshOutlined` | `RefreshCw` | lucide |
101
+
102
+ ### Audio & Video
103
+
104
+ | Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
105
+ | --- | --- | --- |
106
+ | `PlayFilled`, `PlayOutlined` | `Play` | lucide |
107
+ | `PauseFilled`, `PauseOutlined`, `HoldFilled` | `Pause` | lucide |
108
+ | `MicOnFilled`, `MicOnOutlined` | `Mic` | lucide |
109
+ | `MicOffFilled`, `MicOffOutlined` | `MicOff` | lucide |
110
+ | `SoundHighFilled`, `SoundHighOutlined` | `Volume2` | lucide |
111
+ | `HeadsetFilled`, `HeadsetOutlined` | `Headset` | lucide |
112
+ | `ReplayFilled`, `ReplayOutlined` | `Replay` | custom |
113
+
114
+ ### Users & Contacts
115
+
116
+ | Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
117
+ | --- | --- | --- |
118
+ | `UserFilled`, `UserOutlined` | `UserRound` | lucide |
119
+ | `PeopleFilled`, `PeopleOutlined` | `UsersRound` | lucide |
120
+ | `ContactsFilled`, `ContactsOutlined` | `ContactRound` | lucide |
121
+ | `AssignedFilled`, `AssignedOutlined` | `Assigned` | custom |
122
+ | `CompanyFilled`, `CompanyOutlined` | `Building` | lucide |
123
+
124
+ ### Feedback & Status
125
+
126
+ | Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
127
+ | --- | --- | --- |
128
+ | `InformationFilled`, `InformationOutlined` | `Info` | lucide |
129
+ | `WarningFilled`, `WarningOutlined` | `AlertTriangle` | lucide |
130
+ | `NotificationOnFilled`, `NotificationOnOutlined` | `Bell` | lucide |
131
+ | `StarOutlined` | `Star` | lucide |
132
+ | `StarFilled` | `StarFilled` | custom |
133
+
134
+ ### Messages & SMS
135
+
136
+ | Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
137
+ | --- | --- | --- |
138
+ | `MessageFilled`, `SmsInboundFilled` | `MessageSquare` | lucide |
139
+ | `EmailFilled`, `MailOutlined` | `Mail` | lucide |
140
+ | `InboxFilled`, `InboxOutlined` | `Inbox` | lucide |
141
+ | `ChatFilled`, `ChatOutlined` | `MessagesSquare` | lucide |
142
+
143
+ ### System & Settings
144
+
145
+ | Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
146
+ | --- | --- | --- |
147
+ | `SettingsFilled`, `SettingsOutlined` | `Settings` | lucide |
148
+ | `MenuVerticalFilled`, `MenuVerticalOutlined` | `MoreVertical` | lucide |
149
+ | `MenuHorizontalFilled`, `MenuHorizontalOutlined` | `MoreHorizontal` | lucide |
150
+ | `SpinnerOutlined` | `Loader2` | lucide |
151
+
152
+ ### Analytics & AI
153
+
154
+ | Old (`@aircall/icons`) | New (`@aircall/react-icons`) | Source |
155
+ | --- | --- | --- |
156
+ | `SparklesFilled`, `LivePromptFilled`, `MagicFilled` | `AiAssist` | custom |
157
+ | `AIAgent`, `VirtualAgentFilled` | `AiAgents` | custom |
158
+ | `MonitoringFilled`, `AnalyticsFilled` | `BarChartBig` | lucide |
159
+ | `ActivityFilled`, `BoltFilled` | `Zap` | lucide |
160
+
161
+ ## 5. Icons with no equivalent
162
+
163
+ A small number of old icons have no direct mapping. Handle them as noted:
164
+
165
+ | Old icon | Action |
166
+ | --- | --- |
167
+ | `PlayPauseFilled`, `PlayPauseOutlined` | Use `Play` or `Pause` contextually — no combined equivalent |
168
+ | `Speed100XFilled`, `Speed125XFilled`, `Speed150XFilled`, `Speed200XFilled` | Render as text or a custom badge — no icon equivalent |
169
+ | `AIMessageFilled` | No equivalent — treat as custom SVG until a replacement ships |
170
+ | `OnboardingFilled` | Use `Flag` or `Rocket` as a placeholder; confirm with design |
171
+
172
+ ## 6. Brand / platform icons (not in @aircall/react-icons)
173
+
174
+ Keep these as separate inline SVGs or local wrappers — they are not in `@aircall/react-icons`:
175
+
176
+ - **Aircall brand**: `AircallIcon`, `AircallLogo`, `AircallLogoFull`, logo-mark variants
177
+ - **OS / platform**: `AppleFilled`, `AndroidFilled`, `WindowsFilled`, `MacFilled`
178
+ - **Browsers**: `ChromeFilled`, `EdgeFilled`, `FirefoxFilled`
179
+ - **Messaging**: `WhatsappFilled`, `WhatsappOutlined` — use the existing `WhatsAppIcon.tsx` in `packages/aw-ui`
180
+ - **Text badges**: `BetaOutlined` — keep as a custom SVG or badge component
181
+
182
+ ## 7. Before / After examples
183
+
184
+ ### 7a. Basic icon with color and size
185
+
186
+ **Before (Tractor + @aircall/icons):**
187
+ ```tsx
188
+ import { Icon } from '@aircall/tractor';
189
+ import { CallFilled } from '@aircall/icons';
190
+
191
+ <Icon component={CallFilled} size={24} color="primary.500" />
192
+ ```
193
+
194
+ **After (@aircall/react-icons + Tailwind):**
195
+ ```tsx
196
+ import { Phone } from '@aircall/react-icons';
197
+
198
+ <Phone className="size-6 text-primary" />
199
+ ```
200
+
201
+ ### 7b. Icon inside a button (critical color)
202
+
203
+ **Before (Tractor + @aircall/icons):**
204
+ ```tsx
205
+ import { Icon } from '@aircall/tractor';
206
+ import { TrashFilled } from '@aircall/icons';
207
+ import { Button } from '@aircall/tractor';
208
+
209
+ <Button variant="danger" size="small">
210
+ <Icon component={TrashFilled} size={16} color="critical.500" />
211
+ Delete
212
+ </Button>
213
+ ```
214
+
215
+ **After (@aircall/ds + @aircall/react-icons):**
216
+ ```tsx
217
+ import { Trash2 } from '@aircall/react-icons';
218
+ import { Button } from '@aircall/ds';
219
+
220
+ <Button variant="destructive" size="lg">
221
+ <Trash2 />
222
+ Delete
223
+ </Button>
224
+ ```
225
+
226
+ > When an icon sits inside a DS `Button`, omit the `size-*` class — the Button's `[&_svg]:size-4` rule sizes it automatically.
227
+
228
+ ### 7c. Icon with muted color (secondary text)
229
+
230
+ **Before (Tractor + @aircall/icons):**
231
+ ```tsx
232
+ import { Icon } from '@aircall/tractor';
233
+ import { ClockFilled } from '@aircall/icons';
234
+
235
+ <Icon component={ClockFilled} size={20} color="text.secondary" />
236
+ ```
237
+
238
+ **After (@aircall/react-icons + Tailwind):**
239
+ ```tsx
240
+ import { Clock } from '@aircall/react-icons';
241
+
242
+ <Clock className="size-5 text-muted-foreground" />
243
+ ```
244
+
245
+ ### 7d. Custom Aircall icon
246
+
247
+ **Before (Tractor + @aircall/icons):**
248
+ ```tsx
249
+ import { Icon } from '@aircall/tractor';
250
+ import { VoicemailDrop } from '@aircall/icons';
251
+
252
+ <Icon component={VoicemailDrop} size={24} />
253
+ ```
254
+
255
+ **After (@aircall/react-icons):**
256
+ ```tsx
257
+ import { VoicemailDrop } from '@aircall/react-icons';
258
+
259
+ <VoicemailDrop className="size-6" />
260
+ ```
261
+
262
+ > Aircall custom icons are also re-exported from `@aircall/react-icons`. The import source changes but the component name stays the same for custom icons that survived into the new package.
263
+
264
+ ## 8. Common mistakes
265
+
266
+ ### Mistake 1: Keeping the Tractor `<Icon>` wrapper
267
+
268
+ ```tsx
269
+ // WRONG — @aircall/ds has no Icon component; wrapper is unused
270
+ import { Icon } from '@aircall/tractor';
271
+ import { Phone } from '@aircall/react-icons';
272
+
273
+ <Icon component={Phone} size={24} color="primary.500" />
274
+
275
+ // CORRECT — use the icon component directly with Tailwind classes
276
+ import { Phone } from '@aircall/react-icons';
277
+
278
+ <Phone className="size-6 text-primary" />
279
+ ```
280
+
281
+ **Mechanism:** `@aircall/react-icons` exports standard SVG React components. The Tractor `Icon` wrapper was a thin adapter that forwarded `size` and `color` as `width`/`height`/`fill` attributes. Without it, those props are simply ignored — or worse, they pass unknown attributes to the SVG element.
282
+
283
+ Source: `@aircall/react-icons` re-exports lucide + Aircall icons as plain SVG components with no wrapper.
284
+
285
+ ---
286
+
287
+ ### Mistake 2: Using the old `@aircall/icons` name unchanged
288
+
289
+ ```tsx
290
+ // WRONG — old name does not exist in @aircall/react-icons; TS compile error
291
+ import { CallFilled } from '@aircall/react-icons';
292
+
293
+ // CORRECT — lucide consolidates filled/outlined variants; use the new name
294
+ import { Phone } from '@aircall/react-icons';
295
+ ```
296
+
297
+ **Mechanism:** `@aircall/react-icons` intentionally consolidates `*Filled`/`*Outlined` variants into a single icon name (e.g. `CallFilled` + `CallOutlined` → `Phone`). The visual distinction (filled vs stroke) is gone by design — lucide icons are all stroke-outlined. Importing the old name compiles to `undefined` and renders nothing.
298
+
299
+ Source: `@aircall/react-icons` re-exports lucide + Aircall icons; custom icons live in `packages/react-icons/src/generated/custom`.
300
+
301
+ ---
302
+
303
+ ### Mistake 3: Using a `color` or `size` number prop instead of Tailwind classes
304
+
305
+ ```tsx
306
+ // WRONG — color and size number are Tractor Icon props, not valid SVG props
307
+ import { Mic } from '@aircall/react-icons';
308
+
309
+ <Mic size={24} color="primary.500" />
310
+
311
+ // CORRECT — use Tailwind utility classes
312
+ import { Mic } from '@aircall/react-icons';
313
+
314
+ <Mic className="size-6 text-primary" />
315
+ ```
316
+
317
+ **Mechanism:** lucide-react icons accept a `size` prop and a `color` prop via the lucide component API — but `@aircall/react-icons` wraps them in a way that Tailwind classes are the intended styling mechanism. Using Tractor color tokens like `"primary.500"` as a CSS value produces an invalid color string that browsers ignore silently, and the icon renders in the inherited color instead of the intended one.
318
+
319
+ Source: `@aircall/react-icons` re-exports lucide + Aircall icons; Tailwind design tokens (`text-primary`, `text-destructive`, etc.) are the authoritative color system in `@aircall/ds`.
320
+
321
+ ---
322
+
323
+ ### Mistake 4: Importing icons directly from `lucide-react`
324
+
325
+ ```tsx
326
+ // WRONG — bypasses the Aircall icon layer; icon swaps or overrides won't apply
327
+ import { Phone } from 'lucide-react';
328
+
329
+ // CORRECT — always route through @aircall/react-icons
330
+ import { Phone } from '@aircall/react-icons';
331
+ ```
332
+
333
+ **Mechanism:** `@aircall/react-icons` is the single source of truth for all icons — it re-exports lucide icons and adds Aircall custom icons. Importing from `lucide-react` directly means any future override, version pin, or custom replacement in `@aircall/react-icons` won't be picked up. It also breaks tree-shaking assumptions and makes it harder to audit icon usage across the codebase.
334
+
335
+ Source: `@aircall/react-icons` re-exports lucide + Aircall icons as the canonical icon surface for Aircall apps.
336
+
337
+ ## 9. Migration checklist
338
+
339
+ - [ ] Swap `@aircall/icons` → `@aircall/react-icons` in `package.json`
340
+ - [ ] Remove `import { Icon } from '@aircall/tractor'` — no wrapper needed
341
+ - [ ] Rename icons per the tables above (many `*Filled`/`*Outlined` pairs merge into one name)
342
+ - [ ] Replace `color="…"` with `className="text-*"` using the color table
343
+ - [ ] Replace `size={N}` with `className="size-N"` (or omit when inside a DS `Button`)
344
+ - [ ] Run `pnpm tsc --noEmit` — missing exports surface as TS compile errors
345
+ - [ ] Keep brand/platform icons (Aircall logo, OS, browser, WhatsApp) as separate assets
346
+ - [ ] For icons marked "validate usage", confirm the new shape is visually correct in context