@pactor-app/ui 0.1.0 → 1.1.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.
@@ -0,0 +1,257 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-RQHJBTEU.js";
4
+
5
+ // src/components/components/Icon/index.tsx
6
+ import {
7
+ ArrowDown,
8
+ ArrowLeft,
9
+ ArrowRight,
10
+ ArrowUp,
11
+ Bell,
12
+ Bookmark,
13
+ Brain,
14
+ Briefcase,
15
+ Building2,
16
+ Calendar,
17
+ Camera,
18
+ ChartColumn,
19
+ Check,
20
+ ChevronDown,
21
+ ChevronLeft,
22
+ ChevronRight,
23
+ ChevronsUpDown,
24
+ ChevronUp,
25
+ CircleAlert,
26
+ CircleCheck,
27
+ CircleQuestionMark,
28
+ CircleX,
29
+ Clock,
30
+ Cloud,
31
+ Code,
32
+ Copy,
33
+ CreditCard,
34
+ Database,
35
+ Download,
36
+ Ellipsis,
37
+ EllipsisVertical,
38
+ ExternalLink,
39
+ Eye,
40
+ File,
41
+ FileText,
42
+ Flag,
43
+ Folder,
44
+ Funnel,
45
+ Globe,
46
+ Heart,
47
+ History,
48
+ House,
49
+ Image,
50
+ Info,
51
+ Key,
52
+ Languages,
53
+ LayoutGrid,
54
+ Link,
55
+ List,
56
+ ListFilter,
57
+ LoaderCircle,
58
+ Lock,
59
+ LockOpen,
60
+ LogIn,
61
+ LogOut,
62
+ Mail,
63
+ MapPin,
64
+ Menu,
65
+ MessageCircle,
66
+ MessageSquare,
67
+ Minus,
68
+ Moon,
69
+ Package,
70
+ PanelLeft,
71
+ PanelRightOpen,
72
+ Paperclip,
73
+ Pencil,
74
+ Phone,
75
+ Plus,
76
+ Quote,
77
+ RefreshCcw,
78
+ RotateCcw,
79
+ Save,
80
+ Search,
81
+ Send,
82
+ Settings,
83
+ Share2,
84
+ Shield,
85
+ ShoppingCart,
86
+ Square,
87
+ SquarePen,
88
+ Star,
89
+ Sun,
90
+ Table,
91
+ Tag,
92
+ Terminal,
93
+ ThumbsDown,
94
+ ThumbsUp,
95
+ Trash2,
96
+ TriangleAlert,
97
+ Upload,
98
+ User,
99
+ Users,
100
+ X,
101
+ Zap
102
+ } from "lucide-react";
103
+ import { jsx } from "react/jsx-runtime";
104
+ var ICONS = {
105
+ "arrow-left": ArrowLeft,
106
+ "arrow-right": ArrowRight,
107
+ "arrow-up": ArrowUp,
108
+ "arrow-down": ArrowDown,
109
+ "chevron-left": ChevronLeft,
110
+ "chevron-right": ChevronRight,
111
+ "chevron-up": ChevronUp,
112
+ "chevron-down": ChevronDown,
113
+ check: Check,
114
+ x: X,
115
+ plus: Plus,
116
+ minus: Minus,
117
+ search: Search,
118
+ settings: Settings,
119
+ user: User,
120
+ users: Users,
121
+ home: House,
122
+ menu: Menu,
123
+ bell: Bell,
124
+ calendar: Calendar,
125
+ clock: Clock,
126
+ download: Download,
127
+ upload: Upload,
128
+ pencil: Pencil,
129
+ edit: SquarePen,
130
+ trash: Trash2,
131
+ eye: Eye,
132
+ info: Info,
133
+ warning: TriangleAlert,
134
+ error: CircleAlert,
135
+ "check-circle": CircleCheck,
136
+ "x-circle": CircleX,
137
+ "help-circle": CircleQuestionMark,
138
+ loading: LoaderCircle,
139
+ spinner: LoaderCircle,
140
+ star: Star,
141
+ heart: Heart,
142
+ bookmark: Bookmark,
143
+ share: Share2,
144
+ copy: Copy,
145
+ "external-link": ExternalLink,
146
+ link: Link,
147
+ mail: Mail,
148
+ phone: Phone,
149
+ lock: Lock,
150
+ unlock: LockOpen,
151
+ "log-in": LogIn,
152
+ "log-out": LogOut,
153
+ sun: Sun,
154
+ moon: Moon,
155
+ globe: Globe,
156
+ filter: Funnel,
157
+ "list-filter": ListFilter,
158
+ "more-horizontal": Ellipsis,
159
+ "more-vertical": EllipsisVertical,
160
+ refresh: RefreshCcw,
161
+ save: Save,
162
+ file: File,
163
+ folder: Folder,
164
+ image: Image,
165
+ camera: Camera,
166
+ chart: ChartColumn,
167
+ table: Table,
168
+ list: List,
169
+ grid: LayoutGrid,
170
+ tag: Tag,
171
+ "shopping-cart": ShoppingCart,
172
+ "credit-card": CreditCard,
173
+ package: Package,
174
+ "map-pin": MapPin,
175
+ building: Building2,
176
+ briefcase: Briefcase,
177
+ send: Send,
178
+ message: MessageCircle,
179
+ "message-square": MessageSquare,
180
+ paperclip: Paperclip,
181
+ "thumbs-up": ThumbsUp,
182
+ "thumbs-down": ThumbsDown,
183
+ zap: Zap,
184
+ flag: Flag,
185
+ key: Key,
186
+ shield: Shield,
187
+ terminal: Terminal,
188
+ code: Code,
189
+ database: Database,
190
+ cloud: Cloud,
191
+ languages: Languages,
192
+ // @pactor-app/chat 收敛(spec: chat-icon-convergence):chat 既有图标与
193
+ // 契约图标名(menu.icon / messageActions[].icon 的既有取值)直通
194
+ "chevrons-up-down": ChevronsUpDown,
195
+ "file-text": FileText,
196
+ "panel-left": PanelLeft,
197
+ "panel-right-open": PanelRightOpen,
198
+ square: Square,
199
+ history: History,
200
+ "rotate-ccw": RotateCcw,
201
+ quote: Quote,
202
+ chat: MessageSquare,
203
+ brain: Brain
204
+ };
205
+ function normalizeIconName(name) {
206
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
207
+ }
208
+ var sizePx = {
209
+ sm: 16,
210
+ default: 20,
211
+ lg: 24
212
+ };
213
+ function Icon({
214
+ name,
215
+ size = "default",
216
+ color,
217
+ strokeWidth,
218
+ className,
219
+ style
220
+ }) {
221
+ const key = name ? normalizeIconName(name) : "";
222
+ const Lucide = ICONS[key];
223
+ const px = typeof size === "number" ? size : sizePx[size];
224
+ if (!Lucide) {
225
+ return /* @__PURE__ */ jsx(
226
+ CircleQuestionMark,
227
+ {
228
+ "data-slot": "icon",
229
+ "data-unknown": name,
230
+ size: px,
231
+ color,
232
+ strokeWidth,
233
+ className: cn("shrink-0 text-muted-foreground", className),
234
+ style,
235
+ "aria-hidden": "true"
236
+ }
237
+ );
238
+ }
239
+ return /* @__PURE__ */ jsx(
240
+ Lucide,
241
+ {
242
+ "data-slot": "icon",
243
+ size: px,
244
+ color,
245
+ strokeWidth,
246
+ className: cn("shrink-0", className),
247
+ style,
248
+ "aria-hidden": "true"
249
+ }
250
+ );
251
+ }
252
+
253
+ export {
254
+ ICONS,
255
+ normalizeIconName,
256
+ Icon
257
+ };