@hilum/ui 3.4.0 → 3.5.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 +4 -0
- package/dist/{chunk-MAHPAP65.js → chunk-RI6QJR2L.js} +6 -3
- package/dist/chunk-RI6QJR2L.js.map +1 -0
- package/dist/index.d.ts +789 -115
- package/dist/index.js +10404 -1099
- package/dist/index.js.map +1 -1
- package/dist/tokens.css +17 -0
- package/dist/tokens.d.ts +3 -0
- package/dist/tokens.js +1 -1
- package/llms.txt +18 -4
- package/package.json +19 -1
- package/src/components/accordion.tsx +746 -58
- package/src/components/alert-dialog.tsx +11 -5
- package/src/components/ask-user-questions.tsx +1366 -0
- package/src/components/badge.tsx +105 -24
- package/src/components/button.tsx +207 -38
- package/src/components/card.tsx +3 -2
- package/src/components/chat-message.tsx +116 -0
- package/src/components/checkbox-group.tsx +403 -0
- package/src/components/checkbox.tsx +6 -3
- package/src/components/color-input.tsx +3 -1
- package/src/components/color-picker.tsx +1992 -80
- package/src/components/dialog.tsx +141 -81
- package/src/components/dropdown-menu.tsx +21 -13
- package/src/components/dropdown.tsx +245 -0
- package/src/components/file-thumbnail.tsx +156 -0
- package/src/components/hover-card.tsx +2 -0
- package/src/components/input-copy.tsx +307 -0
- package/src/components/input-group.tsx +303 -108
- package/src/components/input-message.tsx +883 -0
- package/src/components/input.tsx +6 -3
- package/src/components/menu-item.tsx +156 -0
- package/src/components/mobile-drawer.tsx +50 -0
- package/src/components/nav-item.tsx +43 -0
- package/src/components/nav-menu.tsx +47 -0
- package/src/components/popover.tsx +3 -1
- package/src/components/radio-group.tsx +381 -35
- package/src/components/scroll-area.tsx +9 -2
- package/src/components/select.tsx +708 -121
- package/src/components/sheet.tsx +15 -6
- package/src/components/slider.tsx +1583 -20
- package/src/components/status-badge.tsx +2 -0
- package/src/components/switch.tsx +245 -28
- package/src/components/table.tsx +191 -77
- package/src/components/tabs-subtle.tsx +411 -0
- package/src/components/tabs.tsx +459 -49
- package/src/components/textarea.tsx +7 -3
- package/src/components/thinking-indicator.tsx +106 -0
- package/src/components/thinking-steps.tsx +382 -0
- package/src/components/tooltip.tsx +158 -33
- package/src/hooks/use-merge-split.tsx +359 -0
- package/src/hooks/use-proximity-hover.ts +208 -0
- package/src/index.ts +14 -0
- package/src/lib/elevated.tsx +52 -0
- package/src/lib/font-weight.ts +18 -0
- package/src/lib/icon-context.tsx +98 -0
- package/src/lib/icon-map.tsx +669 -0
- package/src/lib/interaction.ts +102 -0
- package/src/lib/scroll-fade.tsx +241 -0
- package/src/lib/shape-context.tsx +121 -0
- package/src/lib/springs.ts +30 -0
- package/src/lib/surface-classes.ts +43 -0
- package/src/lib/surface-context.tsx +17 -0
- package/src/tokens/tokens.ts +3 -0
- package/dist/chunk-MAHPAP65.js.map +0 -1
|
@@ -0,0 +1,669 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { ComponentType } from "react";
|
|
4
|
+
|
|
5
|
+
// ── Lucide ──────────────────────────────────────────────────
|
|
6
|
+
import {
|
|
7
|
+
ChevronRight,
|
|
8
|
+
ChevronDown,
|
|
9
|
+
X,
|
|
10
|
+
Copy,
|
|
11
|
+
Menu,
|
|
12
|
+
Dot,
|
|
13
|
+
Monitor,
|
|
14
|
+
Sun,
|
|
15
|
+
Moon,
|
|
16
|
+
RectangleHorizontal,
|
|
17
|
+
Circle,
|
|
18
|
+
SquareLibrary,
|
|
19
|
+
Clock,
|
|
20
|
+
Star,
|
|
21
|
+
Settings,
|
|
22
|
+
Plus,
|
|
23
|
+
ArrowLeft,
|
|
24
|
+
ArrowRight,
|
|
25
|
+
ArrowUp,
|
|
26
|
+
Search,
|
|
27
|
+
Loader,
|
|
28
|
+
Users,
|
|
29
|
+
Lock,
|
|
30
|
+
Mail,
|
|
31
|
+
Bell,
|
|
32
|
+
Shield,
|
|
33
|
+
Palette,
|
|
34
|
+
Lightbulb,
|
|
35
|
+
Rocket,
|
|
36
|
+
Heart,
|
|
37
|
+
Paintbrush,
|
|
38
|
+
Brain,
|
|
39
|
+
Globe,
|
|
40
|
+
User,
|
|
41
|
+
ImageIcon,
|
|
42
|
+
Link,
|
|
43
|
+
Check,
|
|
44
|
+
RotateCcw,
|
|
45
|
+
Play,
|
|
46
|
+
Pause,
|
|
47
|
+
Pipette,
|
|
48
|
+
Home,
|
|
49
|
+
MessageCircle,
|
|
50
|
+
Inbox,
|
|
51
|
+
Pencil,
|
|
52
|
+
SkipForward,
|
|
53
|
+
CornerDownRight,
|
|
54
|
+
} from "lucide-react";
|
|
55
|
+
|
|
56
|
+
// ── Tabler ──────────────────────────────────────────────────
|
|
57
|
+
import {
|
|
58
|
+
IconChevronRight,
|
|
59
|
+
IconChevronDown,
|
|
60
|
+
IconColorPicker,
|
|
61
|
+
IconX,
|
|
62
|
+
IconCopy,
|
|
63
|
+
IconMenu2,
|
|
64
|
+
IconPoint,
|
|
65
|
+
IconDeviceDesktop,
|
|
66
|
+
IconSun,
|
|
67
|
+
IconMoon,
|
|
68
|
+
IconSquare,
|
|
69
|
+
IconCircle,
|
|
70
|
+
IconLibrary,
|
|
71
|
+
IconClock,
|
|
72
|
+
IconStar,
|
|
73
|
+
IconSettings,
|
|
74
|
+
IconPlus,
|
|
75
|
+
IconArrowLeft,
|
|
76
|
+
IconArrowRight,
|
|
77
|
+
IconArrowUp,
|
|
78
|
+
IconSearch,
|
|
79
|
+
IconLoader2,
|
|
80
|
+
IconUsers,
|
|
81
|
+
IconLock,
|
|
82
|
+
IconMail,
|
|
83
|
+
IconBell,
|
|
84
|
+
IconShield,
|
|
85
|
+
IconPalette,
|
|
86
|
+
IconBulb,
|
|
87
|
+
IconRocket,
|
|
88
|
+
IconHeart,
|
|
89
|
+
IconBrush,
|
|
90
|
+
IconBrain,
|
|
91
|
+
IconGlobe,
|
|
92
|
+
IconUser,
|
|
93
|
+
IconPhoto,
|
|
94
|
+
IconLink,
|
|
95
|
+
IconCheck,
|
|
96
|
+
IconRotate2,
|
|
97
|
+
IconPlayerPlay,
|
|
98
|
+
IconPlayerPause,
|
|
99
|
+
IconHome,
|
|
100
|
+
IconMessageCircle,
|
|
101
|
+
IconInbox,
|
|
102
|
+
IconPencil,
|
|
103
|
+
IconPlayerSkipForward,
|
|
104
|
+
IconCornerDownRight,
|
|
105
|
+
} from "@tabler/icons-react";
|
|
106
|
+
|
|
107
|
+
// ── Phosphor ────────────────────────────────────────────────
|
|
108
|
+
import {
|
|
109
|
+
CaretRight as PhCaretRight,
|
|
110
|
+
CaretDown as PhCaretDown,
|
|
111
|
+
Eyedropper as PhEyedropper,
|
|
112
|
+
X as PhX,
|
|
113
|
+
Copy as PhCopy,
|
|
114
|
+
List as PhList,
|
|
115
|
+
DotOutline as PhDotOutline,
|
|
116
|
+
Monitor as PhMonitor,
|
|
117
|
+
Sun as PhSun,
|
|
118
|
+
Moon as PhMoon,
|
|
119
|
+
Rectangle as PhRectangle,
|
|
120
|
+
Circle as PhCircle,
|
|
121
|
+
Books as PhBooks,
|
|
122
|
+
Clock as PhClock,
|
|
123
|
+
Star as PhStar,
|
|
124
|
+
Gear as PhGear,
|
|
125
|
+
Plus as PhPlus,
|
|
126
|
+
ArrowLeft as PhArrowLeft,
|
|
127
|
+
ArrowRight as PhArrowRight,
|
|
128
|
+
ArrowUp as PhArrowUp,
|
|
129
|
+
MagnifyingGlass as PhMagnifyingGlass,
|
|
130
|
+
Spinner as PhSpinner,
|
|
131
|
+
Users as PhUsers,
|
|
132
|
+
Lock as PhLock,
|
|
133
|
+
Envelope as PhEnvelope,
|
|
134
|
+
Bell as PhBell,
|
|
135
|
+
Shield as PhShield,
|
|
136
|
+
Palette as PhPalette,
|
|
137
|
+
Lightbulb as PhLightbulb,
|
|
138
|
+
Rocket as PhRocket,
|
|
139
|
+
Heart as PhHeart,
|
|
140
|
+
PaintBrush as PhPaintBrush,
|
|
141
|
+
Brain as PhBrain,
|
|
142
|
+
Globe as PhGlobe,
|
|
143
|
+
User as PhUser,
|
|
144
|
+
Image as PhImage,
|
|
145
|
+
Link as PhLink,
|
|
146
|
+
Check as PhCheck,
|
|
147
|
+
ArrowCounterClockwise as PhRotateCcw,
|
|
148
|
+
Play as PhPlay,
|
|
149
|
+
Pause as PhPause,
|
|
150
|
+
House as PhHouse,
|
|
151
|
+
ChatCircle as PhChatCircle,
|
|
152
|
+
Tray as PhTray,
|
|
153
|
+
Pencil as PhPencil,
|
|
154
|
+
SkipForward as PhSkipForward,
|
|
155
|
+
ArrowElbowDownRight as PhArrowElbowDownRight,
|
|
156
|
+
} from "@phosphor-icons/react";
|
|
157
|
+
|
|
158
|
+
// ── HugeIcons ───────────────────────────────────────────────
|
|
159
|
+
import { HugeiconsIcon } from "@hugeicons/react";
|
|
160
|
+
import HiChevronRight from "@hugeicons/core-free-icons/ArrowRight01Icon";
|
|
161
|
+
import HiChevronDown from "@hugeicons/core-free-icons/ArrowDown01Icon";
|
|
162
|
+
import HiDropper from "@hugeicons/core-free-icons/DropperIcon";
|
|
163
|
+
import HiX from "@hugeicons/core-free-icons/Cancel01Icon";
|
|
164
|
+
import HiCopy from "@hugeicons/core-free-icons/Copy01Icon";
|
|
165
|
+
import HiMenu from "@hugeicons/core-free-icons/Menu01Icon";
|
|
166
|
+
import HiDot from "@hugeicons/core-free-icons/CircleIcon";
|
|
167
|
+
import HiMonitor from "@hugeicons/core-free-icons/ComputerIcon";
|
|
168
|
+
import HiSun from "@hugeicons/core-free-icons/Sun01Icon";
|
|
169
|
+
import HiMoon from "@hugeicons/core-free-icons/Moon01Icon";
|
|
170
|
+
import HiRectangle from "@hugeicons/core-free-icons/DashboardCircleIcon";
|
|
171
|
+
import HiLibrary from "@hugeicons/core-free-icons/LibraryIcon";
|
|
172
|
+
import HiClock from "@hugeicons/core-free-icons/Clock01Icon";
|
|
173
|
+
import HiStar from "@hugeicons/core-free-icons/StarIcon";
|
|
174
|
+
import HiSettings from "@hugeicons/core-free-icons/Settings01Icon";
|
|
175
|
+
import HiPlus from "@hugeicons/core-free-icons/PlusSignIcon";
|
|
176
|
+
import HiArrowLeft from "@hugeicons/core-free-icons/ArrowLeft01Icon";
|
|
177
|
+
import HiArrowRight from "@hugeicons/core-free-icons/ArrowRight01Icon";
|
|
178
|
+
import HiArrowUp from "@hugeicons/core-free-icons/ArrowUp01Icon";
|
|
179
|
+
import HiSearch from "@hugeicons/core-free-icons/Search01Icon";
|
|
180
|
+
import HiLoader from "@hugeicons/core-free-icons/Loading01Icon";
|
|
181
|
+
import HiUsers from "@hugeicons/core-free-icons/UserGroupIcon";
|
|
182
|
+
import HiLock from "@hugeicons/core-free-icons/LockIcon";
|
|
183
|
+
import HiMail from "@hugeicons/core-free-icons/Mail01Icon";
|
|
184
|
+
import HiBell from "@hugeicons/core-free-icons/Notification01Icon";
|
|
185
|
+
import HiShield from "@hugeicons/core-free-icons/Shield01Icon";
|
|
186
|
+
import HiPalette from "@hugeicons/core-free-icons/PaintBrush01Icon";
|
|
187
|
+
import HiLightbulb from "@hugeicons/core-free-icons/BulbIcon";
|
|
188
|
+
import HiRocket from "@hugeicons/core-free-icons/Rocket01Icon";
|
|
189
|
+
import HiHeart from "@hugeicons/core-free-icons/FavouriteIcon";
|
|
190
|
+
import HiPaintbrush from "@hugeicons/core-free-icons/PaintBrush02Icon";
|
|
191
|
+
import HiBrain from "@hugeicons/core-free-icons/BrainIcon";
|
|
192
|
+
import HiGlobe from "@hugeicons/core-free-icons/GlobeIcon";
|
|
193
|
+
import HiUser from "@hugeicons/core-free-icons/UserIcon";
|
|
194
|
+
import HiImage from "@hugeicons/core-free-icons/Image01Icon";
|
|
195
|
+
import HiLink from "@hugeicons/core-free-icons/Link01Icon";
|
|
196
|
+
import HiCheck from "@hugeicons/core-free-icons/Tick02Icon";
|
|
197
|
+
import HiRotateCcw from "@hugeicons/core-free-icons/ArrowReloadHorizontalIcon";
|
|
198
|
+
import HiHome from "@hugeicons/core-free-icons/Home01Icon";
|
|
199
|
+
import HiMessage from "@hugeicons/core-free-icons/BubbleChatIcon";
|
|
200
|
+
import HiInbox from "@hugeicons/core-free-icons/InboxIcon";
|
|
201
|
+
import HiPencil from "@hugeicons/core-free-icons/PencilEdit01Icon";
|
|
202
|
+
import HiSkipForward from "@hugeicons/core-free-icons/NextIcon";
|
|
203
|
+
import HiCornerDownRight from "@hugeicons/core-free-icons/ArrowMoveDownRightIcon";
|
|
204
|
+
|
|
205
|
+
// ── Untitled UI ─────────────────────────────────────────────
|
|
206
|
+
// Aliased with a Uui prefix to avoid collisions with the Lucide imports above.
|
|
207
|
+
import {
|
|
208
|
+
ChevronRight as UuiChevronRight,
|
|
209
|
+
ChevronDown as UuiChevronDown,
|
|
210
|
+
Dropper as UuiDropper,
|
|
211
|
+
XClose as UuiX,
|
|
212
|
+
Copy01 as UuiCopy,
|
|
213
|
+
Menu01 as UuiMenu,
|
|
214
|
+
Monitor01 as UuiMonitor,
|
|
215
|
+
Sun as UuiSun,
|
|
216
|
+
Moon01 as UuiMoon,
|
|
217
|
+
Square as UuiSquare,
|
|
218
|
+
Circle as UuiCircle,
|
|
219
|
+
BookClosed as UuiBook,
|
|
220
|
+
Clock as UuiClock,
|
|
221
|
+
Star01 as UuiStar,
|
|
222
|
+
Settings01 as UuiSettings,
|
|
223
|
+
Plus as UuiPlus,
|
|
224
|
+
ArrowLeft as UuiArrowLeft,
|
|
225
|
+
ArrowRight as UuiArrowRight,
|
|
226
|
+
ArrowUp as UuiArrowUp,
|
|
227
|
+
SearchMd as UuiSearch,
|
|
228
|
+
Loading01 as UuiLoader,
|
|
229
|
+
Users01 as UuiUsers,
|
|
230
|
+
Lock01 as UuiLock,
|
|
231
|
+
Mail01 as UuiMail,
|
|
232
|
+
Bell01 as UuiBell,
|
|
233
|
+
Shield01 as UuiShield,
|
|
234
|
+
Palette as UuiPalette,
|
|
235
|
+
Lightbulb01 as UuiLightbulb,
|
|
236
|
+
Rocket01 as UuiRocket,
|
|
237
|
+
Heart as UuiHeart,
|
|
238
|
+
Brush01 as UuiBrush,
|
|
239
|
+
CpuChip01 as UuiCpuChip,
|
|
240
|
+
Globe01 as UuiGlobe,
|
|
241
|
+
User01 as UuiUser,
|
|
242
|
+
Image01 as UuiImage,
|
|
243
|
+
Link01 as UuiLink,
|
|
244
|
+
Check as UuiCheck,
|
|
245
|
+
RefreshCcw01 as UuiRotateCcw,
|
|
246
|
+
Home01 as UuiHome,
|
|
247
|
+
MessageCircle01 as UuiMessage,
|
|
248
|
+
Inbox01 as UuiInbox,
|
|
249
|
+
Pencil01 as UuiPencil,
|
|
250
|
+
SkipForward as UuiSkipForward,
|
|
251
|
+
CornerDownRight as UuiCornerDownRight,
|
|
252
|
+
} from "@untitledui/icons";
|
|
253
|
+
|
|
254
|
+
// ── Types ───────────────────────────────────────────────────
|
|
255
|
+
|
|
256
|
+
export interface IconComponentProps {
|
|
257
|
+
size?: number;
|
|
258
|
+
strokeWidth?: number;
|
|
259
|
+
className?: string;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export type IconComponent = ComponentType<IconComponentProps>;
|
|
263
|
+
|
|
264
|
+
export type IconLibrary = "lucide" | "tabler" | "phosphor" | "hugeicons" | "untitledui";
|
|
265
|
+
|
|
266
|
+
export type IconName =
|
|
267
|
+
| "chevron-right"
|
|
268
|
+
| "chevron-down"
|
|
269
|
+
| "x"
|
|
270
|
+
| "copy"
|
|
271
|
+
| "menu"
|
|
272
|
+
| "dot"
|
|
273
|
+
| "monitor"
|
|
274
|
+
| "sun"
|
|
275
|
+
| "moon"
|
|
276
|
+
| "rectangle-horizontal"
|
|
277
|
+
| "circle"
|
|
278
|
+
| "square-library"
|
|
279
|
+
| "clock"
|
|
280
|
+
| "star"
|
|
281
|
+
| "settings"
|
|
282
|
+
| "plus"
|
|
283
|
+
| "arrow-left"
|
|
284
|
+
| "arrow-right"
|
|
285
|
+
| "arrow-up"
|
|
286
|
+
| "search"
|
|
287
|
+
| "loader"
|
|
288
|
+
| "users"
|
|
289
|
+
| "lock"
|
|
290
|
+
| "mail"
|
|
291
|
+
| "bell"
|
|
292
|
+
| "shield"
|
|
293
|
+
| "palette"
|
|
294
|
+
| "lightbulb"
|
|
295
|
+
| "rocket"
|
|
296
|
+
| "heart"
|
|
297
|
+
| "paintbrush"
|
|
298
|
+
| "brain"
|
|
299
|
+
| "globe"
|
|
300
|
+
| "user"
|
|
301
|
+
| "image"
|
|
302
|
+
| "link"
|
|
303
|
+
| "check"
|
|
304
|
+
| "rotate-ccw"
|
|
305
|
+
| "play"
|
|
306
|
+
| "pause"
|
|
307
|
+
| "pipette"
|
|
308
|
+
| "home"
|
|
309
|
+
| "message-circle"
|
|
310
|
+
| "inbox"
|
|
311
|
+
| "pencil"
|
|
312
|
+
| "skip-forward"
|
|
313
|
+
| "corner-down-right";
|
|
314
|
+
|
|
315
|
+
export const iconLibraryOrder: IconLibrary[] = [
|
|
316
|
+
"lucide",
|
|
317
|
+
"tabler",
|
|
318
|
+
"phosphor",
|
|
319
|
+
"hugeicons",
|
|
320
|
+
"untitledui",
|
|
321
|
+
];
|
|
322
|
+
|
|
323
|
+
export const iconLibraryLabels: Record<IconLibrary, string> = {
|
|
324
|
+
lucide: "Lucide",
|
|
325
|
+
tabler: "Tabler",
|
|
326
|
+
phosphor: "Phosphor",
|
|
327
|
+
hugeicons: "HugeIcons",
|
|
328
|
+
untitledui: "Untitled UI",
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
// ── Adapter Factories ───────────────────────────────────────
|
|
332
|
+
|
|
333
|
+
// Tabler: `strokeWidth` → `stroke` prop
|
|
334
|
+
function tabler(
|
|
335
|
+
Icon: ComponentType<{ size?: number; stroke?: number; className?: string }>,
|
|
336
|
+
): IconComponent {
|
|
337
|
+
return function TablerAdapter({ size, strokeWidth, className }: IconComponentProps) {
|
|
338
|
+
const props: { size?: number; stroke?: number; className?: string } = {};
|
|
339
|
+
if (size !== undefined) props.size = size;
|
|
340
|
+
if (strokeWidth !== undefined) props.stroke = strokeWidth;
|
|
341
|
+
if (className !== undefined) props.className = className;
|
|
342
|
+
return <Icon {...props} />;
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// Phosphor: uses filled paths per weight variant, not CSS stroke.
|
|
347
|
+
// Map numeric strokeWidth → discrete weight prop.
|
|
348
|
+
type PhosphorWeight = "thin" | "light" | "regular" | "bold";
|
|
349
|
+
function phosphor(
|
|
350
|
+
Icon: ComponentType<{ size?: number; weight?: PhosphorWeight; className?: string }>,
|
|
351
|
+
): IconComponent {
|
|
352
|
+
return function PhosphorAdapter({ size, strokeWidth, className }: IconComponentProps) {
|
|
353
|
+
const weight: PhosphorWeight = strokeWidth != null && strokeWidth >= 1.75 ? "regular" : "light";
|
|
354
|
+
const props: { size?: number; weight?: PhosphorWeight; className?: string } = { weight };
|
|
355
|
+
if (size !== undefined) props.size = size;
|
|
356
|
+
if (className !== undefined) props.className = className;
|
|
357
|
+
return <Icon {...props} />;
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// HugeIcons: wraps icon definition in HugeiconsIcon renderer
|
|
362
|
+
function hugeicons(iconDef: unknown): IconComponent {
|
|
363
|
+
return function HugeIconsAdapter({ size, strokeWidth, className }: IconComponentProps) {
|
|
364
|
+
const props: { size?: number; strokeWidth?: number; className?: string } = {};
|
|
365
|
+
if (size !== undefined) props.size = size;
|
|
366
|
+
if (strokeWidth !== undefined) props.strokeWidth = strokeWidth;
|
|
367
|
+
if (className !== undefined) props.className = className;
|
|
368
|
+
return (
|
|
369
|
+
<HugeiconsIcon
|
|
370
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
371
|
+
icon={iconDef as any}
|
|
372
|
+
{...props}
|
|
373
|
+
/>
|
|
374
|
+
);
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// Untitled UI: standard 24px SVG components — `strokeWidth`/`className` pass
|
|
379
|
+
// through natively; only `size` needs mapping to `width`/`height`.
|
|
380
|
+
function untitledui(
|
|
381
|
+
Icon: ComponentType<{
|
|
382
|
+
width?: number;
|
|
383
|
+
height?: number;
|
|
384
|
+
strokeWidth?: number;
|
|
385
|
+
className?: string;
|
|
386
|
+
}>,
|
|
387
|
+
): IconComponent {
|
|
388
|
+
return function UntitledUiAdapter({ size, strokeWidth, className }: IconComponentProps) {
|
|
389
|
+
const props: {
|
|
390
|
+
width?: number;
|
|
391
|
+
height?: number;
|
|
392
|
+
strokeWidth?: number;
|
|
393
|
+
className?: string;
|
|
394
|
+
} = {};
|
|
395
|
+
if (size !== undefined) {
|
|
396
|
+
props.width = size;
|
|
397
|
+
props.height = size;
|
|
398
|
+
}
|
|
399
|
+
if (strokeWidth !== undefined) props.strokeWidth = strokeWidth;
|
|
400
|
+
if (className !== undefined) props.className = className;
|
|
401
|
+
return <Icon {...props} />;
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// ── Icon Maps ───────────────────────────────────────────────
|
|
406
|
+
|
|
407
|
+
const lucideMap: Record<IconName, IconComponent> = {
|
|
408
|
+
"chevron-right": ChevronRight,
|
|
409
|
+
"chevron-down": ChevronDown,
|
|
410
|
+
pipette: Pipette,
|
|
411
|
+
x: X,
|
|
412
|
+
copy: Copy,
|
|
413
|
+
menu: Menu,
|
|
414
|
+
dot: Dot,
|
|
415
|
+
monitor: Monitor,
|
|
416
|
+
sun: Sun,
|
|
417
|
+
moon: Moon,
|
|
418
|
+
"rectangle-horizontal": RectangleHorizontal,
|
|
419
|
+
circle: Circle,
|
|
420
|
+
"square-library": SquareLibrary,
|
|
421
|
+
clock: Clock,
|
|
422
|
+
star: Star,
|
|
423
|
+
settings: Settings,
|
|
424
|
+
plus: Plus,
|
|
425
|
+
"arrow-left": ArrowLeft,
|
|
426
|
+
"arrow-right": ArrowRight,
|
|
427
|
+
"arrow-up": ArrowUp,
|
|
428
|
+
search: Search,
|
|
429
|
+
loader: Loader,
|
|
430
|
+
users: Users,
|
|
431
|
+
lock: Lock,
|
|
432
|
+
mail: Mail,
|
|
433
|
+
bell: Bell,
|
|
434
|
+
shield: Shield,
|
|
435
|
+
palette: Palette,
|
|
436
|
+
lightbulb: Lightbulb,
|
|
437
|
+
rocket: Rocket,
|
|
438
|
+
heart: Heart,
|
|
439
|
+
paintbrush: Paintbrush,
|
|
440
|
+
brain: Brain,
|
|
441
|
+
globe: Globe,
|
|
442
|
+
user: User,
|
|
443
|
+
image: ImageIcon,
|
|
444
|
+
link: Link,
|
|
445
|
+
check: Check,
|
|
446
|
+
"rotate-ccw": RotateCcw,
|
|
447
|
+
play: Play,
|
|
448
|
+
pause: Pause,
|
|
449
|
+
home: Home,
|
|
450
|
+
"message-circle": MessageCircle,
|
|
451
|
+
inbox: Inbox,
|
|
452
|
+
pencil: Pencil,
|
|
453
|
+
"skip-forward": SkipForward,
|
|
454
|
+
"corner-down-right": CornerDownRight,
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
const tablerMap: Record<IconName, IconComponent> = {
|
|
458
|
+
"chevron-right": tabler(IconChevronRight),
|
|
459
|
+
"chevron-down": tabler(IconChevronDown),
|
|
460
|
+
pipette: tabler(IconColorPicker),
|
|
461
|
+
x: tabler(IconX),
|
|
462
|
+
copy: tabler(IconCopy),
|
|
463
|
+
menu: tabler(IconMenu2),
|
|
464
|
+
dot: tabler(IconPoint),
|
|
465
|
+
monitor: tabler(IconDeviceDesktop),
|
|
466
|
+
sun: tabler(IconSun),
|
|
467
|
+
moon: tabler(IconMoon),
|
|
468
|
+
"rectangle-horizontal": tabler(IconSquare),
|
|
469
|
+
circle: tabler(IconCircle),
|
|
470
|
+
"square-library": tabler(IconLibrary),
|
|
471
|
+
clock: tabler(IconClock),
|
|
472
|
+
star: tabler(IconStar),
|
|
473
|
+
settings: tabler(IconSettings),
|
|
474
|
+
plus: tabler(IconPlus),
|
|
475
|
+
"arrow-left": tabler(IconArrowLeft),
|
|
476
|
+
"arrow-right": tabler(IconArrowRight),
|
|
477
|
+
"arrow-up": tabler(IconArrowUp),
|
|
478
|
+
search: tabler(IconSearch),
|
|
479
|
+
loader: tabler(IconLoader2),
|
|
480
|
+
users: tabler(IconUsers),
|
|
481
|
+
lock: tabler(IconLock),
|
|
482
|
+
mail: tabler(IconMail),
|
|
483
|
+
bell: tabler(IconBell),
|
|
484
|
+
shield: tabler(IconShield),
|
|
485
|
+
palette: tabler(IconPalette),
|
|
486
|
+
lightbulb: tabler(IconBulb),
|
|
487
|
+
rocket: tabler(IconRocket),
|
|
488
|
+
heart: tabler(IconHeart),
|
|
489
|
+
paintbrush: tabler(IconBrush),
|
|
490
|
+
brain: tabler(IconBrain),
|
|
491
|
+
globe: tabler(IconGlobe),
|
|
492
|
+
user: tabler(IconUser),
|
|
493
|
+
image: tabler(IconPhoto),
|
|
494
|
+
link: tabler(IconLink),
|
|
495
|
+
check: tabler(IconCheck),
|
|
496
|
+
"rotate-ccw": tabler(IconRotate2),
|
|
497
|
+
play: tabler(IconPlayerPlay),
|
|
498
|
+
pause: tabler(IconPlayerPause),
|
|
499
|
+
home: tabler(IconHome),
|
|
500
|
+
"message-circle": tabler(IconMessageCircle),
|
|
501
|
+
inbox: tabler(IconInbox),
|
|
502
|
+
pencil: tabler(IconPencil),
|
|
503
|
+
"skip-forward": tabler(IconPlayerSkipForward),
|
|
504
|
+
"corner-down-right": tabler(IconCornerDownRight),
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
const phosphorMap: Record<IconName, IconComponent> = {
|
|
508
|
+
"chevron-right": phosphor(PhCaretRight),
|
|
509
|
+
"chevron-down": phosphor(PhCaretDown),
|
|
510
|
+
pipette: phosphor(PhEyedropper),
|
|
511
|
+
x: phosphor(PhX),
|
|
512
|
+
copy: phosphor(PhCopy),
|
|
513
|
+
menu: phosphor(PhList),
|
|
514
|
+
dot: phosphor(PhDotOutline),
|
|
515
|
+
monitor: phosphor(PhMonitor),
|
|
516
|
+
sun: phosphor(PhSun),
|
|
517
|
+
moon: phosphor(PhMoon),
|
|
518
|
+
"rectangle-horizontal": phosphor(PhRectangle),
|
|
519
|
+
circle: phosphor(PhCircle),
|
|
520
|
+
"square-library": phosphor(PhBooks),
|
|
521
|
+
clock: phosphor(PhClock),
|
|
522
|
+
star: phosphor(PhStar),
|
|
523
|
+
settings: phosphor(PhGear),
|
|
524
|
+
plus: phosphor(PhPlus),
|
|
525
|
+
"arrow-left": phosphor(PhArrowLeft),
|
|
526
|
+
"arrow-right": phosphor(PhArrowRight),
|
|
527
|
+
"arrow-up": phosphor(PhArrowUp),
|
|
528
|
+
search: phosphor(PhMagnifyingGlass),
|
|
529
|
+
loader: phosphor(PhSpinner),
|
|
530
|
+
users: phosphor(PhUsers),
|
|
531
|
+
lock: phosphor(PhLock),
|
|
532
|
+
mail: phosphor(PhEnvelope),
|
|
533
|
+
bell: phosphor(PhBell),
|
|
534
|
+
shield: phosphor(PhShield),
|
|
535
|
+
palette: phosphor(PhPalette),
|
|
536
|
+
lightbulb: phosphor(PhLightbulb),
|
|
537
|
+
rocket: phosphor(PhRocket),
|
|
538
|
+
heart: phosphor(PhHeart),
|
|
539
|
+
paintbrush: phosphor(PhPaintBrush),
|
|
540
|
+
brain: phosphor(PhBrain),
|
|
541
|
+
globe: phosphor(PhGlobe),
|
|
542
|
+
user: phosphor(PhUser),
|
|
543
|
+
image: phosphor(PhImage),
|
|
544
|
+
link: phosphor(PhLink),
|
|
545
|
+
check: phosphor(PhCheck),
|
|
546
|
+
"rotate-ccw": phosphor(PhRotateCcw),
|
|
547
|
+
play: phosphor(PhPlay),
|
|
548
|
+
pause: phosphor(PhPause),
|
|
549
|
+
home: phosphor(PhHouse),
|
|
550
|
+
"message-circle": phosphor(PhChatCircle),
|
|
551
|
+
inbox: phosphor(PhTray),
|
|
552
|
+
pencil: phosphor(PhPencil),
|
|
553
|
+
"skip-forward": phosphor(PhSkipForward),
|
|
554
|
+
"corner-down-right": phosphor(PhArrowElbowDownRight),
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
const hugeiconsMap: Record<IconName, IconComponent> = {
|
|
558
|
+
"chevron-right": hugeicons(HiChevronRight),
|
|
559
|
+
"chevron-down": hugeicons(HiChevronDown),
|
|
560
|
+
pipette: hugeicons(HiDropper),
|
|
561
|
+
x: hugeicons(HiX),
|
|
562
|
+
copy: hugeicons(HiCopy),
|
|
563
|
+
menu: hugeicons(HiMenu),
|
|
564
|
+
dot: hugeicons(HiDot),
|
|
565
|
+
monitor: hugeicons(HiMonitor),
|
|
566
|
+
sun: hugeicons(HiSun),
|
|
567
|
+
moon: hugeicons(HiMoon),
|
|
568
|
+
"rectangle-horizontal": hugeicons(HiRectangle),
|
|
569
|
+
circle: hugeicons(HiDot),
|
|
570
|
+
"square-library": hugeicons(HiLibrary),
|
|
571
|
+
clock: hugeicons(HiClock),
|
|
572
|
+
star: hugeicons(HiStar),
|
|
573
|
+
settings: hugeicons(HiSettings),
|
|
574
|
+
plus: hugeicons(HiPlus),
|
|
575
|
+
"arrow-left": hugeicons(HiArrowLeft),
|
|
576
|
+
"arrow-right": hugeicons(HiArrowRight),
|
|
577
|
+
"arrow-up": hugeicons(HiArrowUp),
|
|
578
|
+
search: hugeicons(HiSearch),
|
|
579
|
+
loader: hugeicons(HiLoader),
|
|
580
|
+
users: hugeicons(HiUsers),
|
|
581
|
+
lock: hugeicons(HiLock),
|
|
582
|
+
mail: hugeicons(HiMail),
|
|
583
|
+
bell: hugeicons(HiBell),
|
|
584
|
+
shield: hugeicons(HiShield),
|
|
585
|
+
palette: hugeicons(HiPalette),
|
|
586
|
+
lightbulb: hugeicons(HiLightbulb),
|
|
587
|
+
rocket: hugeicons(HiRocket),
|
|
588
|
+
heart: hugeicons(HiHeart),
|
|
589
|
+
paintbrush: hugeicons(HiPaintbrush),
|
|
590
|
+
brain: hugeicons(HiBrain),
|
|
591
|
+
globe: hugeicons(HiGlobe),
|
|
592
|
+
user: hugeicons(HiUser),
|
|
593
|
+
image: hugeicons(HiImage),
|
|
594
|
+
link: hugeicons(HiLink),
|
|
595
|
+
check: hugeicons(HiCheck),
|
|
596
|
+
"rotate-ccw": hugeicons(HiRotateCcw),
|
|
597
|
+
play: Play,
|
|
598
|
+
pause: Pause,
|
|
599
|
+
home: hugeicons(HiHome),
|
|
600
|
+
"message-circle": hugeicons(HiMessage),
|
|
601
|
+
inbox: hugeicons(HiInbox),
|
|
602
|
+
pencil: hugeicons(HiPencil),
|
|
603
|
+
"skip-forward": hugeicons(HiSkipForward),
|
|
604
|
+
"corner-down-right": hugeicons(HiCornerDownRight),
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
const untitleduiMap: Record<IconName, IconComponent> = {
|
|
608
|
+
"chevron-right": untitledui(UuiChevronRight),
|
|
609
|
+
"chevron-down": untitledui(UuiChevronDown),
|
|
610
|
+
pipette: untitledui(UuiDropper),
|
|
611
|
+
x: untitledui(UuiX),
|
|
612
|
+
copy: untitledui(UuiCopy),
|
|
613
|
+
menu: untitledui(UuiMenu),
|
|
614
|
+
// No bare dot in the set — reuse Circle (matches HugeIcons' dot handling).
|
|
615
|
+
dot: untitledui(UuiCircle),
|
|
616
|
+
monitor: untitledui(UuiMonitor),
|
|
617
|
+
sun: untitledui(UuiSun),
|
|
618
|
+
moon: untitledui(UuiMoon),
|
|
619
|
+
"rectangle-horizontal": untitledui(UuiSquare),
|
|
620
|
+
circle: untitledui(UuiCircle),
|
|
621
|
+
"square-library": untitledui(UuiBook),
|
|
622
|
+
clock: untitledui(UuiClock),
|
|
623
|
+
star: untitledui(UuiStar),
|
|
624
|
+
settings: untitledui(UuiSettings),
|
|
625
|
+
plus: untitledui(UuiPlus),
|
|
626
|
+
"arrow-left": untitledui(UuiArrowLeft),
|
|
627
|
+
"arrow-right": untitledui(UuiArrowRight),
|
|
628
|
+
"arrow-up": untitledui(UuiArrowUp),
|
|
629
|
+
search: untitledui(UuiSearch),
|
|
630
|
+
loader: untitledui(UuiLoader),
|
|
631
|
+
users: untitledui(UuiUsers),
|
|
632
|
+
lock: untitledui(UuiLock),
|
|
633
|
+
mail: untitledui(UuiMail),
|
|
634
|
+
bell: untitledui(UuiBell),
|
|
635
|
+
shield: untitledui(UuiShield),
|
|
636
|
+
palette: untitledui(UuiPalette),
|
|
637
|
+
lightbulb: untitledui(UuiLightbulb),
|
|
638
|
+
rocket: untitledui(UuiRocket),
|
|
639
|
+
heart: untitledui(UuiHeart),
|
|
640
|
+
paintbrush: untitledui(UuiBrush),
|
|
641
|
+
// No brain icon in the free set — CpuChip01 carries the "intelligence" metaphor.
|
|
642
|
+
brain: untitledui(UuiCpuChip),
|
|
643
|
+
globe: untitledui(UuiGlobe),
|
|
644
|
+
user: untitledui(UuiUser),
|
|
645
|
+
image: untitledui(UuiImage),
|
|
646
|
+
link: untitledui(UuiLink),
|
|
647
|
+
check: untitledui(UuiCheck),
|
|
648
|
+
"rotate-ccw": untitledui(UuiRotateCcw),
|
|
649
|
+
// Only enclosed Pause variants exist; fall back to Lucide for a bare pair
|
|
650
|
+
// (matches HugeIcons' play/pause handling).
|
|
651
|
+
play: Play,
|
|
652
|
+
pause: Pause,
|
|
653
|
+
home: untitledui(UuiHome),
|
|
654
|
+
"message-circle": untitledui(UuiMessage),
|
|
655
|
+
inbox: untitledui(UuiInbox),
|
|
656
|
+
pencil: untitledui(UuiPencil),
|
|
657
|
+
"skip-forward": untitledui(UuiSkipForward),
|
|
658
|
+
"corner-down-right": untitledui(UuiCornerDownRight),
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
// ── Unified Map ─────────────────────────────────────────────
|
|
662
|
+
|
|
663
|
+
export const iconMap: Record<IconLibrary, Record<IconName, IconComponent>> = {
|
|
664
|
+
lucide: lucideMap,
|
|
665
|
+
tabler: tablerMap,
|
|
666
|
+
phosphor: phosphorMap,
|
|
667
|
+
hugeicons: hugeiconsMap,
|
|
668
|
+
untitledui: untitleduiMap,
|
|
669
|
+
};
|