@mnee-ui/ui 0.0.1 → 0.0.2

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/dist/index.js ADDED
@@ -0,0 +1,1028 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __objRest = (source, exclude) => {
23
+ var target = {};
24
+ for (var prop in source)
25
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
+ target[prop] = source[prop];
27
+ if (source != null && __getOwnPropSymbols)
28
+ for (var prop of __getOwnPropSymbols(source)) {
29
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
+ target[prop] = source[prop];
31
+ }
32
+ return target;
33
+ };
34
+ var __export = (target, all) => {
35
+ for (var name in all)
36
+ __defProp(target, name, { get: all[name], enumerable: true });
37
+ };
38
+ var __copyProps = (to, from, except, desc) => {
39
+ if (from && typeof from === "object" || typeof from === "function") {
40
+ for (let key of __getOwnPropNames(from))
41
+ if (!__hasOwnProp.call(to, key) && key !== except)
42
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
43
+ }
44
+ return to;
45
+ };
46
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
47
+ // If the importer is in node compatibility mode or this is not an ESM
48
+ // file that has been converted to a CommonJS file using a Babel-
49
+ // compatible transform (i.e. "__esModule" has not been set), then set
50
+ // "default" to the CommonJS "module.exports" for node compatibility.
51
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
52
+ mod
53
+ ));
54
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
55
+
56
+ // components/ui/index.ts
57
+ var index_exports = {};
58
+ __export(index_exports, {
59
+ Alert: () => Alert,
60
+ Badge: () => Badge,
61
+ Banner: () => Banner,
62
+ Button: () => Button,
63
+ Card: () => Card,
64
+ CardContainer: () => CardContainer,
65
+ CodeBlock: () => CodeBlock,
66
+ Drawer: () => Drawer,
67
+ DrawerBody: () => DrawerBody,
68
+ DrawerFooter: () => DrawerFooter,
69
+ DrawerHeader: () => DrawerHeader,
70
+ Icon: () => Icon,
71
+ Input: () => Input,
72
+ Loader2: () => import_lucide_react3.Loader2,
73
+ MneeIcon: () => MneeIcon,
74
+ Modal: () => Modal,
75
+ ModalBody: () => ModalBody,
76
+ ModalFooter: () => ModalFooter,
77
+ ModalHeader: () => ModalHeader,
78
+ Pagination: () => Pagination,
79
+ Table: () => Table,
80
+ TableBody: () => TableBody,
81
+ TableCell: () => TableCell,
82
+ TableEmpty: () => TableEmpty,
83
+ TableHead: () => TableHead,
84
+ TableHeader: () => TableHeader,
85
+ TableLoading: () => TableLoading,
86
+ TableRow: () => TableRow,
87
+ Toast: () => Toast,
88
+ ToastProvider: () => ToastProvider,
89
+ useToast: () => useToast
90
+ });
91
+ module.exports = __toCommonJS(index_exports);
92
+
93
+ // components/ui/button.tsx
94
+ var import_lucide_react = require("lucide-react");
95
+
96
+ // lib/utils.ts
97
+ var import_clsx = require("clsx");
98
+ var import_tailwind_merge = require("tailwind-merge");
99
+ function cn(...inputs) {
100
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
101
+ }
102
+
103
+ // components/ui/button.tsx
104
+ var variantStyles = {
105
+ primary: "bg-brand text-white hover:bg-brand-dark active:bg-brand-dark shadow-sm",
106
+ secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-200",
107
+ destructive: "bg-error text-white hover:opacity-90 active:opacity-90 shadow-sm",
108
+ ghost: "bg-transparent text-gray-700 hover:bg-gray-100 active:bg-gray-100",
109
+ outline: "bg-white border border-gray-300 text-gray-700 hover:bg-gray-50 active:bg-gray-100 shadow-sm"
110
+ };
111
+ var sizeStyles = {
112
+ sm: "h-7 px-3 text-xs rounded-md gap-1.5",
113
+ md: "h-9 px-4 text-sm rounded-lg gap-2",
114
+ lg: "h-11 px-6 text-base rounded-lg gap-2.5"
115
+ };
116
+ function Button(_a) {
117
+ var _b = _a, {
118
+ variant = "primary",
119
+ size = "md",
120
+ loading = false,
121
+ disabled,
122
+ className,
123
+ children
124
+ } = _b, props = __objRest(_b, [
125
+ "variant",
126
+ "size",
127
+ "loading",
128
+ "disabled",
129
+ "className",
130
+ "children"
131
+ ]);
132
+ return /* @__PURE__ */ React.createElement(
133
+ "button",
134
+ __spreadValues({
135
+ className: cn(
136
+ "inline-flex items-center justify-center font-medium transition-colors",
137
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/50",
138
+ "disabled:pointer-events-none disabled:opacity-50",
139
+ variantStyles[variant],
140
+ sizeStyles[size],
141
+ className
142
+ ),
143
+ disabled: disabled || loading
144
+ }, props),
145
+ loading && /* @__PURE__ */ React.createElement(import_lucide_react.Loader2, { className: "animate-spin", size: size === "lg" ? 18 : 14 }),
146
+ children
147
+ );
148
+ }
149
+
150
+ // components/ui/badge.tsx
151
+ var variantStyles2 = {
152
+ success: "bg-success text-white",
153
+ warning: "bg-warning text-white",
154
+ error: "bg-red-600 text-white",
155
+ info: "bg-info text-white",
156
+ default: "bg-gray-600 text-white",
157
+ brand: "bg-brand text-white"
158
+ };
159
+ function Badge(_a) {
160
+ var _b = _a, {
161
+ variant = "default",
162
+ className,
163
+ children
164
+ } = _b, props = __objRest(_b, [
165
+ "variant",
166
+ "className",
167
+ "children"
168
+ ]);
169
+ return /* @__PURE__ */ React.createElement(
170
+ "span",
171
+ __spreadValues({
172
+ className: cn(
173
+ "inline-flex items-center justify-center px-2.5 py-0.5 rounded-lg",
174
+ "text-xs font-medium leading-4 whitespace-nowrap",
175
+ variantStyles2[variant],
176
+ className
177
+ )
178
+ }, props),
179
+ children
180
+ );
181
+ }
182
+
183
+ // components/ui/card.tsx
184
+ function CardContainer(_a) {
185
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
186
+ return /* @__PURE__ */ React.createElement(
187
+ "div",
188
+ __spreadValues({
189
+ className: cn("bg-white rounded-lg border border-[#E5E5E5] shadow-sm", className)
190
+ }, props),
191
+ children
192
+ );
193
+ }
194
+ function Card(props) {
195
+ if (props.variant === "balance") {
196
+ return /* @__PURE__ */ React.createElement(BalanceCard, __spreadValues({}, props));
197
+ }
198
+ return /* @__PURE__ */ React.createElement(ModuleCard, __spreadValues({}, props));
199
+ }
200
+ function CardShell({ className, children }) {
201
+ return /* @__PURE__ */ React.createElement("div", { className: cn("bg-white rounded-lg border border-[#E5E5E5] shadow-sm", className) }, children);
202
+ }
203
+ function Skeleton({ className }) {
204
+ return /* @__PURE__ */ React.createElement("div", { className: cn("animate-pulse rounded bg-gray-200", className) });
205
+ }
206
+ function BalanceCard({ title, description, amount, action, loading, className }) {
207
+ return /* @__PURE__ */ React.createElement(CardShell, { className }, /* @__PURE__ */ React.createElement("div", { className: "px-6 pt-6 pb-4" }, loading ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Skeleton, { className: "h-4 w-32" }), description !== void 0 && /* @__PURE__ */ React.createElement(Skeleton, { className: "mt-2 h-3 w-48" })) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h3", { className: "text-base font-semibold text-gray-900 leading-tight" }, title), description && /* @__PURE__ */ React.createElement("p", { className: "mt-1 text-sm text-gray-500 leading-normal" }, description))), /* @__PURE__ */ React.createElement("div", { className: "px-6 pb-4" }, loading ? /* @__PURE__ */ React.createElement(Skeleton, { className: "h-9 w-36" }) : /* @__PURE__ */ React.createElement("p", { className: "text-3xl font-bold text-gray-900" }, amount)), action && /* @__PURE__ */ React.createElement("div", { className: "flex items-center px-6 py-4 border-t border-[#E5E5E5] bg-gray-50 rounded-b-lg" }, action));
208
+ }
209
+ function ModuleCard({ title, description, status, statusLabel, onEdit, onView, loading, className }) {
210
+ return /* @__PURE__ */ React.createElement(CardShell, { className }, /* @__PURE__ */ React.createElement("div", { className: "px-6 pt-6 pb-4" }, loading ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React.createElement(Skeleton, { className: "h-4 w-36" }), /* @__PURE__ */ React.createElement(Skeleton, { className: "h-5 w-16 rounded-full" })), description !== void 0 && /* @__PURE__ */ React.createElement(Skeleton, { className: "mt-2 h-3 w-52" })) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React.createElement("h3", { className: "text-base font-semibold text-gray-900 leading-tight" }, title), status && statusLabel && /* @__PURE__ */ React.createElement(Badge, { variant: status }, statusLabel)), description && /* @__PURE__ */ React.createElement("p", { className: "mt-1 text-sm text-gray-500 leading-normal" }, description))), (onEdit || onView) && /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-end gap-2 px-6 py-4 border-t border-[#E5E5E5] bg-gray-50 rounded-b-lg" }, loading ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Skeleton, { className: "h-7 w-12" }), /* @__PURE__ */ React.createElement(Skeleton, { className: "h-7 w-12" })) : /* @__PURE__ */ React.createElement(React.Fragment, null, onEdit && /* @__PURE__ */ React.createElement(Button, { variant: "ghost", size: "sm", onClick: onEdit }, "Edit"), onView && /* @__PURE__ */ React.createElement(Button, { variant: "primary", size: "sm", onClick: onView }, "View"))));
211
+ }
212
+
213
+ // components/ui/input.tsx
214
+ var sizeStyles2 = {
215
+ sm: "rounded-md text-xs",
216
+ md: "rounded-lg text-sm",
217
+ lg: "rounded-lg text-base"
218
+ };
219
+ var inputPaddingStyles = {
220
+ sm: "py-1.5 px-2.5",
221
+ md: "py-2 px-3",
222
+ lg: "py-2.5 px-4"
223
+ };
224
+ var addonPaddingStyles = {
225
+ sm: "px-2",
226
+ md: "px-2.5",
227
+ lg: "px-3"
228
+ };
229
+ var iconSizeStyles = {
230
+ sm: "[&>svg]:size-3.5",
231
+ md: "[&>svg]:size-4",
232
+ lg: "[&>svg]:size-5"
233
+ };
234
+ function Input(_a) {
235
+ var _b = _a, {
236
+ label,
237
+ hint,
238
+ error,
239
+ size = "md",
240
+ className,
241
+ id,
242
+ disabled,
243
+ required,
244
+ prefix,
245
+ suffix,
246
+ leadingIcon,
247
+ trailingIcon
248
+ } = _b, props = __objRest(_b, [
249
+ "label",
250
+ "hint",
251
+ "error",
252
+ "size",
253
+ "className",
254
+ "id",
255
+ "disabled",
256
+ "required",
257
+ "prefix",
258
+ "suffix",
259
+ "leadingIcon",
260
+ "trailingIcon"
261
+ ]);
262
+ const inputId = id != null ? id : label ? label.toLowerCase().replace(/\s+/g, "-") : void 0;
263
+ const hasLeading = leadingIcon != null || prefix != null;
264
+ const hasTrailing = trailingIcon != null || suffix != null;
265
+ return /* @__PURE__ */ React.createElement("div", { className: cn("w-full flex flex-col gap-1", className) }, label && /* @__PURE__ */ React.createElement(
266
+ "label",
267
+ {
268
+ htmlFor: inputId,
269
+ className: "text-sm font-medium text-gray-900"
270
+ },
271
+ label,
272
+ required && /* @__PURE__ */ React.createElement("span", { "aria-hidden": "true", className: "text-error ml-0.5" }, "*")
273
+ ), /* @__PURE__ */ React.createElement(
274
+ "div",
275
+ {
276
+ className: cn(
277
+ "flex items-center w-full border bg-white transition-colors",
278
+ "focus-within:ring-2 focus-within:ring-brand/50",
279
+ "has-[input:disabled]:pointer-events-none has-[input:disabled]:opacity-50",
280
+ error ? "border-error focus-within:border-error focus-within:ring-error/30" : "border-gray-300 focus-within:border-brand",
281
+ sizeStyles2[size]
282
+ )
283
+ },
284
+ leadingIcon && /* @__PURE__ */ React.createElement("span", { className: cn("flex items-center pointer-events-none text-gray-400", addonPaddingStyles[size], iconSizeStyles[size]) }, leadingIcon),
285
+ prefix && /* @__PURE__ */ React.createElement("span", { className: cn("flex items-center pointer-events-none text-gray-400 select-none", addonPaddingStyles[size]) }, prefix),
286
+ /* @__PURE__ */ React.createElement(
287
+ "input",
288
+ __spreadValues({
289
+ id: inputId,
290
+ disabled,
291
+ required,
292
+ "aria-invalid": !!error,
293
+ "aria-describedby": error ? `${inputId}-error` : hint ? `${inputId}-hint` : void 0,
294
+ className: cn(
295
+ "flex-1 min-w-0 bg-transparent outline-none placeholder:text-gray-400",
296
+ inputPaddingStyles[size],
297
+ hasLeading && "pl-1.5",
298
+ hasTrailing && "pr-1.5"
299
+ )
300
+ }, props)
301
+ ),
302
+ suffix && /* @__PURE__ */ React.createElement("span", { className: cn("flex items-center pointer-events-none text-gray-400 select-none", addonPaddingStyles[size]) }, suffix),
303
+ trailingIcon && /* @__PURE__ */ React.createElement("span", { className: cn("flex items-center pointer-events-none text-gray-400", addonPaddingStyles[size], iconSizeStyles[size]) }, trailingIcon)
304
+ ), error ? /* @__PURE__ */ React.createElement("p", { id: `${inputId}-error`, className: "text-xs text-error" }, error) : hint ? /* @__PURE__ */ React.createElement("p", { id: `${inputId}-hint`, className: "text-xs text-muted" }, hint) : null);
305
+ }
306
+
307
+ // components/ui/toast.tsx
308
+ var import_react = require("react");
309
+ var import_lucide_react2 = require("lucide-react");
310
+ var ToastContext = (0, import_react.createContext)(null);
311
+ function useToast() {
312
+ const ctx = (0, import_react.useContext)(ToastContext);
313
+ if (!ctx) {
314
+ throw new Error("useToast must be used inside <ToastProvider>");
315
+ }
316
+ return ctx;
317
+ }
318
+ var toastStyles = {
319
+ success: {
320
+ bg: "bg-success-bg",
321
+ text: "text-success",
322
+ icon: /* @__PURE__ */ React.createElement(import_lucide_react2.CheckCircle, { size: 18, className: "text-success shrink-0" })
323
+ },
324
+ error: {
325
+ bg: "bg-error-bg",
326
+ text: "text-error",
327
+ icon: /* @__PURE__ */ React.createElement(import_lucide_react2.AlertTriangle, { size: 18, className: "text-error shrink-0" })
328
+ },
329
+ warning: {
330
+ bg: "bg-warning-bg",
331
+ text: "text-warning",
332
+ icon: /* @__PURE__ */ React.createElement(import_lucide_react2.AlertTriangle, { size: 18, className: "text-warning shrink-0" })
333
+ },
334
+ info: {
335
+ bg: "bg-info-bg",
336
+ text: "text-info",
337
+ icon: /* @__PURE__ */ React.createElement(import_lucide_react2.Info, { size: 18, className: "text-info shrink-0" })
338
+ },
339
+ default: {
340
+ bg: "bg-gray-100",
341
+ text: "text-gray-700",
342
+ icon: /* @__PURE__ */ React.createElement(import_lucide_react2.CheckCircle, { size: 18, className: "text-gray-500 shrink-0" })
343
+ }
344
+ };
345
+ function Toast({ message, type, onClose = () => {
346
+ }, className }) {
347
+ const { bg, text, icon } = toastStyles[type];
348
+ return /* @__PURE__ */ React.createElement(
349
+ "div",
350
+ {
351
+ role: "alert",
352
+ "aria-live": "polite",
353
+ className: cn(
354
+ "flex items-center gap-3 px-4 py-3 rounded-xl shadow-lg w-[380px]",
355
+ bg,
356
+ text,
357
+ className
358
+ )
359
+ },
360
+ icon,
361
+ /* @__PURE__ */ React.createElement("span", { className: "flex-1 text-sm font-medium" }, message),
362
+ /* @__PURE__ */ React.createElement(
363
+ "button",
364
+ {
365
+ onClick: onClose,
366
+ "aria-label": "Dismiss notification",
367
+ className: "opacity-60 hover:opacity-100 transition-opacity"
368
+ },
369
+ /* @__PURE__ */ React.createElement(import_lucide_react2.X, { size: 16 })
370
+ )
371
+ );
372
+ }
373
+ function ToastProvider({ children }) {
374
+ const [toast, setToast] = (0, import_react.useState)(null);
375
+ const [isExiting, setIsExiting] = (0, import_react.useState)(false);
376
+ const timerRef = (0, import_react.useRef)(null);
377
+ const dismiss = () => {
378
+ setIsExiting(true);
379
+ if (timerRef.current) clearTimeout(timerRef.current);
380
+ timerRef.current = setTimeout(() => {
381
+ setToast(null);
382
+ setIsExiting(false);
383
+ }, 300);
384
+ };
385
+ const showToast = (message, type = "default") => {
386
+ if (timerRef.current) clearTimeout(timerRef.current);
387
+ setIsExiting(false);
388
+ setToast({ message, type });
389
+ timerRef.current = setTimeout(dismiss, 4e3);
390
+ };
391
+ return /* @__PURE__ */ React.createElement(ToastContext.Provider, { value: { showToast } }, children, toast && /* @__PURE__ */ React.createElement(
392
+ "div",
393
+ {
394
+ className: "fixed top-6 right-6",
395
+ style: {
396
+ zIndex: 9999,
397
+ animation: isExiting ? "slideOutToast 0.3s ease-in forwards" : "slideInToast 0.3s ease-out"
398
+ }
399
+ },
400
+ /* @__PURE__ */ React.createElement(Toast, { message: toast.message, type: toast.type, onClose: dismiss })
401
+ ));
402
+ }
403
+
404
+ // components/ui/icons.tsx
405
+ var sizeMap = {
406
+ xs: 12,
407
+ sm: 14,
408
+ md: 16,
409
+ lg: 20,
410
+ xl: 24
411
+ };
412
+ function Icon(_a) {
413
+ var _b = _a, { icon: LucideComponent, size = "md", className } = _b, props = __objRest(_b, ["icon", "size", "className"]);
414
+ return /* @__PURE__ */ React.createElement(
415
+ LucideComponent,
416
+ __spreadValues({
417
+ size: sizeMap[size],
418
+ className: cn("shrink-0", className)
419
+ }, props)
420
+ );
421
+ }
422
+ function MneeIcon(props) {
423
+ return /* @__PURE__ */ React.createElement(
424
+ "svg",
425
+ __spreadValues({
426
+ xmlns: "http://www.w3.org/2000/svg",
427
+ width: "1em",
428
+ height: "1em",
429
+ fill: "none",
430
+ viewBox: "0 0 797 797"
431
+ }, props),
432
+ /* @__PURE__ */ React.createElement("g", { filter: "url(#MneeIcon_a)" }, /* @__PURE__ */ React.createElement(
433
+ "path",
434
+ {
435
+ fill: "url(#MneeIcon_b)",
436
+ d: "M148.438 398.438c0-138.072 111.928-250 250-250 138.071 0 250 111.928 250 250 0 138.071-111.929 250-250 250-138.072 0-250-111.929-250-250",
437
+ shapeRendering: "crispEdges"
438
+ }
439
+ ), /* @__PURE__ */ React.createElement(
440
+ "path",
441
+ {
442
+ fill: "#05121F",
443
+ d: "M148.438 398.438c0-138.072 111.928-250 250-250 138.071 0 250 111.928 250 250 0 138.071-111.929 250-250 250-138.072 0-250-111.929-250-250",
444
+ shapeRendering: "crispEdges"
445
+ }
446
+ ), /* @__PURE__ */ React.createElement(
447
+ "path",
448
+ {
449
+ fill: "url(#MneeIcon_c)",
450
+ d: "M164.062 398.438c0-129.442 104.934-234.376 234.376-234.376 129.441 0 234.374 104.934 234.374 234.376 0 129.441-104.933 234.374-234.374 234.374-129.442 0-234.376-104.933-234.376-234.374"
451
+ }
452
+ ), /* @__PURE__ */ React.createElement(
453
+ "path",
454
+ {
455
+ fill: "url(#MneeIcon_d)",
456
+ fillRule: "evenodd",
457
+ d: "m482.765 413.641-.381-88.048a17.06 17.06 0 0 0-5.028-12.031c-3.206-3.205-7.505-5.027-12.043-5.027-4.539 0-8.838 1.822-12.043 5.027s-5.029 7.5-5.029 12.038v145.674c0 13.255-5.267 25.861-14.637 35.227-9.371 9.369-21.982 14.634-35.237 14.634-13.257 0-25.87-5.265-35.238-14.634-9.371-9.366-14.638-21.972-14.638-35.227V325.6c0-4.538-1.823-8.834-5.028-12.038-3.206-3.205-7.505-5.027-12.043-5.027-4.539 0-8.838 1.822-12.043 5.027a17.06 17.06 0 0 0-5.026 12.031l-.383 88.048c-1.37 11.023-6.398 21.223-14.255 29.082-9.37 9.367-21.982 14.634-35.24 14.634-13.256 0-25.869-5.267-35.237-14.634-7.86-7.859-12.888-18.064-14.258-29.09l-.405-24.216-45.026-.008h-21.109l.168-3.435c3.049-62.067 28.993-120.38 72.935-164.313 47.048-47.036 110.287-73.223 176.823-73.223 66.538 0 129.774 26.187 176.822 73.223 30.786 30.78 53.107 69.091 64.523 111.106l1.121 4.13h-34.039l-.709-2.312c-10.404-33.867-29.041-64.69-54.092-89.735-40.88-40.868-95.814-63.618-153.627-63.618s-112.749 22.75-153.63 63.618c-30.057 30.051-50.697 68.188-59.218 109.832l-.397 1.94h62.284v50.872c0 4.536 1.823 8.836 5.028 12.04s7.505 5.028 12.043 5.028 8.838-1.824 12.043-5.028 5.029-7.501 5.029-12.04v-81.893c0-13.252 5.267-25.861 14.637-35.227 9.368-9.369 21.981-14.635 35.238-14.635 13.258 0 25.866 5.266 35.237 14.635 9.371 9.365 14.638 21.975 14.638 35.227v145.674c0 4.538 1.823 8.836 5.028 12.041s7.505 5.024 12.044 5.024c4.537 0 8.837-1.82 12.042-5.024 3.205-3.205 5.027-7.503 5.027-12.041V325.601c0-13.252 5.267-25.861 14.638-35.227 9.369-9.369 21.981-14.635 35.239-14.635s25.868 5.266 35.237 14.635c9.371 9.365 14.638 21.975 14.638 35.227v81.893c0 4.536 1.823 8.836 5.027 12.04s7.504 5.028 12.042 5.028 8.838-1.824 12.044-5.028c3.205-3.204 5.028-7.501 5.028-12.04v-50.872h62.279l-.004-.025h33.355l.435 2.765a252 252 0 0 1 3.044 39.074c0 66.52-26.198 129.742-73.245 176.778-47.049 47.036-110.286 73.224-176.822 73.224-66.538 0-129.776-26.188-176.824-73.224-43.53-43.519-69.423-101.186-72.845-162.651l-.193-3.457h32.838l.192 3.071c3.302 52.872 25.745 102.398 63.205 139.849 40.878 40.87 95.815 63.616 153.628 63.616s112.747-22.746 153.627-63.616c40.881-40.869 63.635-95.789 63.635-153.587q.001-3.73-.125-7.458l-.053-1.561h-33.291l-.408 24.213c-1.37 11.026-6.398 21.231-14.258 29.09-9.37 9.367-21.981 14.634-35.239 14.634-13.256 0-25.87-5.267-35.238-14.634-7.857-7.856-12.887-18.056-14.257-29.082",
458
+ clipRule: "evenodd"
459
+ }
460
+ )),
461
+ /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", { id: "MneeIcon_b", x1: 148.438, x2: 648.438, y1: 148.438, y2: 648.438, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ React.createElement("stop", { stopColor: "#FF6900" }), /* @__PURE__ */ React.createElement("stop", { offset: 0.5, stopColor: "#FE9A00" }), /* @__PURE__ */ React.createElement("stop", { offset: 1, stopColor: "#FDC700" })), /* @__PURE__ */ React.createElement("linearGradient", { id: "MneeIcon_c", x1: 450.422, x2: 558.798, y1: 592.492, y2: 90.982, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ React.createElement("stop", { stopColor: "#05121F" }), /* @__PURE__ */ React.createElement("stop", { offset: 1, stopColor: "#05121F" })), /* @__PURE__ */ React.createElement("linearGradient", { id: "MneeIcon_d", x1: 253.85, x2: 537.261, y1: 576.276, y2: 231.407, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ React.createElement("stop", { stopColor: "#E88C1F" }), /* @__PURE__ */ React.createElement("stop", { offset: 1, stopColor: "#FFDC46" })), /* @__PURE__ */ React.createElement("filter", { id: "MneeIcon_a", width: 796.875, height: 796.875, x: 0, y: 0, colorInterpolationFilters: "sRGB", filterUnits: "userSpaceOnUse" }, /* @__PURE__ */ React.createElement("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }), /* @__PURE__ */ React.createElement("feColorMatrix", { in: "SourceAlpha", result: "hardAlpha", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" }), /* @__PURE__ */ React.createElement("feMorphology", { in: "SourceAlpha", radius: 46.875, result: "effect1_dropShadow_3676_2343" }), /* @__PURE__ */ React.createElement("feOffset", null), /* @__PURE__ */ React.createElement("feGaussianBlur", { stdDeviation: 97.656 }), /* @__PURE__ */ React.createElement("feComposite", { in2: "hardAlpha", operator: "out" }), /* @__PURE__ */ React.createElement("feColorMatrix", { values: "0 0 0 0 1 0 0 0 0 0.410735 0 0 0 0 0 0 0 0 0.3 0" }), /* @__PURE__ */ React.createElement("feBlend", { in2: "BackgroundImageFix", result: "effect1_dropShadow_3676_2343" }), /* @__PURE__ */ React.createElement("feBlend", { in: "SourceGraphic", in2: "effect1_dropShadow_3676_2343", result: "shape" })))
462
+ );
463
+ }
464
+
465
+ // components/ui/banner.tsx
466
+ var variantStyles3 = {
467
+ gradient: {
468
+ wrapper: "border border-[var(--color-surface-border)]",
469
+ title: "text-gray-800",
470
+ desc: "text-gray-600"
471
+ },
472
+ info: {
473
+ wrapper: "bg-info-bg border border-info/20",
474
+ title: "text-info",
475
+ desc: "text-info/80"
476
+ },
477
+ success: {
478
+ wrapper: "bg-success-bg border border-success/20",
479
+ title: "text-success",
480
+ desc: "text-success/80"
481
+ },
482
+ warning: {
483
+ wrapper: "bg-warning-bg border border-warning/20",
484
+ title: "text-warning",
485
+ desc: "text-warning/80"
486
+ },
487
+ error: {
488
+ wrapper: "bg-error-bg border border-error/20",
489
+ title: "text-error",
490
+ desc: "text-error/80"
491
+ }
492
+ };
493
+ function Banner(_a) {
494
+ var _b = _a, {
495
+ title,
496
+ description,
497
+ variant = "gradient",
498
+ action,
499
+ className
500
+ } = _b, props = __objRest(_b, [
501
+ "title",
502
+ "description",
503
+ "variant",
504
+ "action",
505
+ "className"
506
+ ]);
507
+ const styles = variantStyles3[variant];
508
+ return /* @__PURE__ */ React.createElement(
509
+ "div",
510
+ __spreadValues({
511
+ className: cn(
512
+ "rounded-lg p-4 flex items-center justify-between gap-4 shadow-sm",
513
+ styles.wrapper,
514
+ className
515
+ ),
516
+ style: variant === "gradient" ? { background: "linear-gradient(90deg, #F0FDFA 0%, #FFF7ED 100%)" } : void 0
517
+ }, props),
518
+ /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React.createElement("p", { className: cn("font-semibold text-sm", styles.title) }, title), description && /* @__PURE__ */ React.createElement("p", { className: cn("text-sm", styles.desc) }, description)),
519
+ action && /* @__PURE__ */ React.createElement("div", { className: "shrink-0" }, action)
520
+ );
521
+ }
522
+
523
+ // components/ui/table.tsx
524
+ var import_lucide_react3 = require("lucide-react");
525
+ function Table(_a) {
526
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
527
+ return /* @__PURE__ */ React.createElement("div", { className: "w-full overflow-x-auto rounded-lg border border-gray-200 shadow-sm" }, /* @__PURE__ */ React.createElement("table", __spreadValues({ className: cn("w-full border-collapse text-sm", className) }, props), children));
528
+ }
529
+ function TableHead(_a) {
530
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
531
+ return /* @__PURE__ */ React.createElement("thead", __spreadValues({ className: cn("bg-gray-50 border-b border-gray-200", className) }, props), children);
532
+ }
533
+ function TableBody(_a) {
534
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
535
+ return /* @__PURE__ */ React.createElement("tbody", __spreadValues({ className: cn("divide-y divide-gray-100", className) }, props), children);
536
+ }
537
+ function TableRow(_a) {
538
+ var _b = _a, { className, children, onClick } = _b, props = __objRest(_b, ["className", "children", "onClick"]);
539
+ return /* @__PURE__ */ React.createElement(
540
+ "tr",
541
+ __spreadValues({
542
+ className: cn(
543
+ "transition-colors",
544
+ onClick ? "cursor-pointer hover:bg-gray-50" : "hover:bg-gray-50/50",
545
+ className
546
+ ),
547
+ onClick
548
+ }, props),
549
+ children
550
+ );
551
+ }
552
+ function TableHeader(_a) {
553
+ var _b = _a, {
554
+ className,
555
+ children,
556
+ sortable,
557
+ sortDirection,
558
+ onSort
559
+ } = _b, props = __objRest(_b, [
560
+ "className",
561
+ "children",
562
+ "sortable",
563
+ "sortDirection",
564
+ "onSort"
565
+ ]);
566
+ return /* @__PURE__ */ React.createElement(
567
+ "th",
568
+ __spreadValues({
569
+ className: cn(
570
+ "px-4 py-3 text-left text-xs font-semibold text-gray-600 whitespace-nowrap",
571
+ sortable && "select-none",
572
+ className
573
+ )
574
+ }, props),
575
+ sortable ? /* @__PURE__ */ React.createElement(
576
+ "button",
577
+ {
578
+ type: "button",
579
+ onClick: onSort,
580
+ className: "inline-flex items-center gap-1 hover:text-gray-900 transition-colors"
581
+ },
582
+ children,
583
+ /* @__PURE__ */ React.createElement("span", { className: "text-gray-400" }, sortDirection === "asc" ? "\u2191" : sortDirection === "desc" ? "\u2193" : "\u2195")
584
+ ) : children
585
+ );
586
+ }
587
+ function TableCell(_a) {
588
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
589
+ return /* @__PURE__ */ React.createElement("td", __spreadValues({ className: cn("px-4 py-3 text-sm text-gray-700", className) }, props), children);
590
+ }
591
+ function TableEmpty({
592
+ message = "No data",
593
+ description
594
+ }) {
595
+ return /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", { colSpan: 999 }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center gap-2 py-16 text-center" }, /* @__PURE__ */ React.createElement("p", { className: "text-sm font-medium text-gray-700" }, message), description && /* @__PURE__ */ React.createElement("p", { className: "text-xs text-gray-400 max-w-xs" }, description))));
596
+ }
597
+ function TableLoading({ cols = 4 }) {
598
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, Array.from({ length: 4 }).map((_, r) => /* @__PURE__ */ React.createElement(TableRow, { key: r }, Array.from({ length: cols }).map((_2, c) => /* @__PURE__ */ React.createElement(TableCell, { key: c }, /* @__PURE__ */ React.createElement("div", { className: "h-3.5 bg-gray-100 rounded animate-pulse", style: { width: `${60 + (r + c) % 3 * 15}%` } }))))));
599
+ }
600
+ function Pagination({ page, totalPages, totalItems, onPageChange, className }) {
601
+ return /* @__PURE__ */ React.createElement("div", { className: cn("flex items-center justify-between px-4 py-3 border-t border-gray-200 text-sm text-gray-600", className) }, /* @__PURE__ */ React.createElement("span", null, totalItems !== void 0 ? `Page ${page} of ${totalPages} (${totalItems} items)` : `Page ${page} of ${totalPages}`), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React.createElement(
602
+ "button",
603
+ {
604
+ type: "button",
605
+ onClick: () => onPageChange(page - 1),
606
+ disabled: page <= 1,
607
+ className: "flex items-center gap-1 px-2.5 py-1.5 rounded hover:bg-gray-100 disabled:opacity-40 disabled:pointer-events-none transition-colors"
608
+ },
609
+ /* @__PURE__ */ React.createElement(import_lucide_react3.ChevronLeft, { size: 14 }),
610
+ "Previous"
611
+ ), /* @__PURE__ */ React.createElement("span", { className: "px-3 py-1.5 border border-gray-200 rounded text-xs font-medium min-w-[2rem] text-center" }, page), /* @__PURE__ */ React.createElement(
612
+ "button",
613
+ {
614
+ type: "button",
615
+ onClick: () => onPageChange(page + 1),
616
+ disabled: page >= totalPages,
617
+ className: "flex items-center gap-1 px-2.5 py-1.5 rounded hover:bg-gray-100 disabled:opacity-40 disabled:pointer-events-none transition-colors"
618
+ },
619
+ "Next",
620
+ /* @__PURE__ */ React.createElement(import_lucide_react3.ChevronRight, { size: 14 })
621
+ )));
622
+ }
623
+
624
+ // components/ui/drawer.tsx
625
+ var import_react2 = require("react");
626
+ var import_lucide_react4 = require("lucide-react");
627
+ var widthStyles = {
628
+ sm: "w-80",
629
+ md: "w-[480px]",
630
+ lg: "w-[600px]",
631
+ xl: "w-[800px]"
632
+ };
633
+ var sideStyles = {
634
+ right: { position: "right-0", translate: "translate-x-full" },
635
+ left: { position: "left-0", translate: "-translate-x-full" }
636
+ };
637
+ function Drawer({
638
+ isOpen,
639
+ onClose,
640
+ title,
641
+ children,
642
+ footer,
643
+ width = "md",
644
+ side = "right",
645
+ className
646
+ }) {
647
+ const headingId = (0, import_react2.useId)();
648
+ const panelRef = (0, import_react2.useRef)(null);
649
+ const previousFocusRef = (0, import_react2.useRef)(null);
650
+ (0, import_react2.useEffect)(() => {
651
+ if (!isOpen) return;
652
+ const handler = (e) => {
653
+ if (e.key === "Escape") onClose();
654
+ };
655
+ document.addEventListener("keydown", handler);
656
+ return () => document.removeEventListener("keydown", handler);
657
+ }, [isOpen, onClose]);
658
+ (0, import_react2.useEffect)(() => {
659
+ var _a;
660
+ if (isOpen) {
661
+ previousFocusRef.current = document.activeElement;
662
+ requestAnimationFrame(() => {
663
+ var _a2;
664
+ return (_a2 = panelRef.current) == null ? void 0 : _a2.focus();
665
+ });
666
+ } else {
667
+ (_a = previousFocusRef.current) == null ? void 0 : _a.focus();
668
+ }
669
+ }, [isOpen]);
670
+ (0, import_react2.useEffect)(() => {
671
+ if (isOpen) {
672
+ const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
673
+ document.body.style.paddingRight = `${scrollbarWidth}px`;
674
+ document.body.style.overflow = "hidden";
675
+ } else {
676
+ document.body.style.overflow = "";
677
+ document.body.style.paddingRight = "";
678
+ }
679
+ return () => {
680
+ document.body.style.overflow = "";
681
+ document.body.style.paddingRight = "";
682
+ };
683
+ }, [isOpen]);
684
+ const { position, translate } = sideStyles[side];
685
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
686
+ "div",
687
+ {
688
+ "aria-hidden": "true",
689
+ onClick: onClose,
690
+ className: cn(
691
+ "fixed inset-0 z-40 bg-black/50 transition-opacity duration-300",
692
+ isOpen ? "opacity-100" : "opacity-0 pointer-events-none"
693
+ )
694
+ }
695
+ ), /* @__PURE__ */ React.createElement(
696
+ "div",
697
+ {
698
+ ref: panelRef,
699
+ role: "dialog",
700
+ "aria-modal": "true",
701
+ "aria-labelledby": title ? headingId : void 0,
702
+ tabIndex: -1,
703
+ className: cn(
704
+ "fixed top-0 z-50 h-full bg-white shadow-2xl flex flex-col outline-none",
705
+ "transition-transform duration-300 ease-in-out",
706
+ position,
707
+ widthStyles[width],
708
+ isOpen ? "translate-x-0" : translate,
709
+ className
710
+ )
711
+ },
712
+ /* @__PURE__ */ React.createElement(DrawerHeader, null, title && /* @__PURE__ */ React.createElement("h2", { id: headingId, className: "text-lg font-semibold text-gray-900 flex-1" }, title), /* @__PURE__ */ React.createElement(
713
+ "button",
714
+ {
715
+ onClick: onClose,
716
+ "aria-label": "Close drawer",
717
+ className: "text-gray-400 hover:text-gray-600 transition-colors ml-auto"
718
+ },
719
+ /* @__PURE__ */ React.createElement(import_lucide_react4.X, { size: 20 })
720
+ )),
721
+ /* @__PURE__ */ React.createElement(DrawerBody, null, children),
722
+ footer && /* @__PURE__ */ React.createElement(DrawerFooter, null, footer)
723
+ ));
724
+ }
725
+ function DrawerHeader(_a) {
726
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
727
+ return /* @__PURE__ */ React.createElement(
728
+ "div",
729
+ __spreadValues({
730
+ className: cn("flex items-center gap-3 px-6 py-4 border-b border-gray-200 shrink-0", className)
731
+ }, props),
732
+ children
733
+ );
734
+ }
735
+ function DrawerBody(_a) {
736
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
737
+ return /* @__PURE__ */ React.createElement(
738
+ "div",
739
+ __spreadValues({
740
+ className: cn("flex-1 overflow-y-auto px-6 py-5", className)
741
+ }, props),
742
+ children
743
+ );
744
+ }
745
+ function DrawerFooter(_a) {
746
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
747
+ return /* @__PURE__ */ React.createElement(
748
+ "div",
749
+ __spreadValues({
750
+ className: cn("shrink-0 px-6 py-4 border-t border-gray-200 bg-white", className)
751
+ }, props),
752
+ children
753
+ );
754
+ }
755
+
756
+ // components/ui/modal.tsx
757
+ var import_react3 = require("react");
758
+ var import_lucide_react5 = require("lucide-react");
759
+ var sizeStyles3 = {
760
+ sm: "w-[400px]",
761
+ md: "w-[520px]",
762
+ lg: "w-[640px]"
763
+ };
764
+ function Modal({ isOpen, onClose, title, children, footer, size = "sm", className }) {
765
+ (0, import_react3.useEffect)(() => {
766
+ if (!isOpen) return;
767
+ const handler = (e) => {
768
+ if (e.key === "Escape") onClose();
769
+ };
770
+ document.addEventListener("keydown", handler);
771
+ return () => document.removeEventListener("keydown", handler);
772
+ }, [isOpen, onClose]);
773
+ (0, import_react3.useEffect)(() => {
774
+ document.body.style.overflow = isOpen ? "hidden" : "";
775
+ return () => {
776
+ document.body.style.overflow = "";
777
+ };
778
+ }, [isOpen]);
779
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
780
+ "div",
781
+ {
782
+ "aria-hidden": "true",
783
+ onClick: onClose,
784
+ className: cn(
785
+ "fixed inset-0 z-40 bg-black/50 transition-opacity duration-200",
786
+ isOpen ? "opacity-100" : "opacity-0 pointer-events-none"
787
+ )
788
+ }
789
+ ), /* @__PURE__ */ React.createElement(
790
+ "div",
791
+ {
792
+ className: cn(
793
+ "fixed inset-0 z-50 flex items-center justify-center p-4",
794
+ "pointer-events-none"
795
+ )
796
+ },
797
+ /* @__PURE__ */ React.createElement(
798
+ "div",
799
+ {
800
+ role: "dialog",
801
+ "aria-modal": "true",
802
+ "aria-label": title,
803
+ onClick: (e) => e.stopPropagation(),
804
+ className: cn(
805
+ "bg-white rounded-lg shadow-2xl flex flex-col max-h-[90vh] pointer-events-auto",
806
+ "transition-all duration-200 ease-out",
807
+ sizeStyles3[size],
808
+ isOpen ? "opacity-100 scale-100" : "opacity-0 scale-95",
809
+ className
810
+ )
811
+ },
812
+ /* @__PURE__ */ React.createElement(ModalHeader, null, title && /* @__PURE__ */ React.createElement("h2", { className: "text-lg font-semibold text-gray-900 flex-1" }, title), /* @__PURE__ */ React.createElement(
813
+ "button",
814
+ {
815
+ onClick: onClose,
816
+ "aria-label": "Close modal",
817
+ className: "text-gray-400 hover:text-gray-600 transition-colors ml-auto"
818
+ },
819
+ /* @__PURE__ */ React.createElement(import_lucide_react5.X, { size: 20 })
820
+ )),
821
+ /* @__PURE__ */ React.createElement(ModalBody, null, children),
822
+ footer && /* @__PURE__ */ React.createElement(ModalFooter, null, footer)
823
+ )
824
+ ));
825
+ }
826
+ function ModalHeader(_a) {
827
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
828
+ return /* @__PURE__ */ React.createElement(
829
+ "div",
830
+ __spreadValues({
831
+ className: cn("flex items-center gap-3 px-6 py-4 border-b border-gray-200 shrink-0", className)
832
+ }, props),
833
+ children
834
+ );
835
+ }
836
+ function ModalBody(_a) {
837
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
838
+ return /* @__PURE__ */ React.createElement(
839
+ "div",
840
+ __spreadValues({
841
+ className: cn("flex-1 overflow-y-auto px-6 py-5", className)
842
+ }, props),
843
+ children
844
+ );
845
+ }
846
+ function ModalFooter(_a) {
847
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
848
+ return /* @__PURE__ */ React.createElement(
849
+ "div",
850
+ __spreadValues({
851
+ className: cn("shrink-0 px-6 py-4 border-t border-gray-200 bg-white rounded-b-lg", className)
852
+ }, props),
853
+ children
854
+ );
855
+ }
856
+
857
+ // components/ui/alert.tsx
858
+ var import_lucide_react6 = require("lucide-react");
859
+ var variantStyles4 = {
860
+ info: {
861
+ wrapper: "border-blue-800 bg-blue-50",
862
+ text: "text-blue-800"
863
+ },
864
+ warning: {
865
+ wrapper: "border-[#FFF085] bg-[#FEFCE8]",
866
+ text: "text-[#A65F00]"
867
+ },
868
+ tip: {
869
+ wrapper: "border-[#FFF085] bg-[#FEFCE8]",
870
+ text: "text-[#A65F00]"
871
+ },
872
+ error: {
873
+ wrapper: "border-error/40 bg-error-bg",
874
+ text: "text-error"
875
+ },
876
+ success: {
877
+ wrapper: "border-success/40 bg-success-bg",
878
+ text: "text-success"
879
+ }
880
+ };
881
+ var variantIcons = {
882
+ info: import_lucide_react6.Info,
883
+ warning: import_lucide_react6.AlertTriangle,
884
+ tip: import_lucide_react6.Lightbulb,
885
+ error: import_lucide_react6.AlertTriangle,
886
+ success: import_lucide_react6.CheckCircle
887
+ };
888
+ var variantLabels = {
889
+ info: "Note",
890
+ warning: "Warning",
891
+ tip: "Tip",
892
+ error: "Error",
893
+ success: "Success"
894
+ };
895
+ function Alert(_a) {
896
+ var _b = _a, {
897
+ variant = "info",
898
+ title,
899
+ children,
900
+ className
901
+ } = _b, props = __objRest(_b, [
902
+ "variant",
903
+ "title",
904
+ "children",
905
+ "className"
906
+ ]);
907
+ const styles = variantStyles4[variant];
908
+ const Icon2 = variantIcons[variant];
909
+ const label = title != null ? title : variantLabels[variant];
910
+ return /* @__PURE__ */ React.createElement(
911
+ "div",
912
+ __spreadValues({
913
+ className: cn(
914
+ "rounded-lg border px-4 py-2",
915
+ styles.wrapper,
916
+ className
917
+ )
918
+ }, props),
919
+ /* @__PURE__ */ React.createElement("div", { className: cn("flex items-center gap-2 font-medium text-[12px]", styles.text) }, /* @__PURE__ */ React.createElement(Icon2, { size: 15 }), /* @__PURE__ */ React.createElement("span", null, label)),
920
+ children && /* @__PURE__ */ React.createElement("div", { className: cn("pl-6 font-light text-[12px]", styles.text) }, children)
921
+ );
922
+ }
923
+
924
+ // components/ui/code-block.tsx
925
+ var import_react4 = require("react");
926
+ var import_lucide_react7 = require("lucide-react");
927
+ function CodeBlock({
928
+ code,
929
+ language = "bash",
930
+ title,
931
+ className
932
+ }) {
933
+ const [tokens, setTokens] = (0, import_react4.useState)(null);
934
+ const [bg, setBg] = (0, import_react4.useState)("#000000");
935
+ const [fg, setFg] = (0, import_react4.useState)("#d4d4d4");
936
+ const [copied, setCopied] = (0, import_react4.useState)(false);
937
+ const { showToast } = useToast();
938
+ (0, import_react4.useEffect)(() => {
939
+ const highlight = async () => {
940
+ try {
941
+ const { codeToTokens } = await import("shiki");
942
+ const result = await codeToTokens(code.trim(), {
943
+ lang: language,
944
+ theme: "dark-plus"
945
+ });
946
+ setTokens(result.tokens);
947
+ if (result.bg) setBg(result.bg);
948
+ if (result.fg) setFg(result.fg);
949
+ } catch (e) {
950
+ }
951
+ };
952
+ highlight();
953
+ }, [code, language]);
954
+ const handleCopy = () => {
955
+ navigator.clipboard.writeText(code);
956
+ setCopied(true);
957
+ showToast("Copied to clipboard!", "success");
958
+ setTimeout(() => setCopied(false), 1500);
959
+ };
960
+ const copyButton = /* @__PURE__ */ React.createElement(
961
+ "button",
962
+ {
963
+ onClick: handleCopy,
964
+ className: "flex items-center gap-1 bg-gray-700 hover:bg-gray-600 text-gray-200 px-2 py-1 rounded text-xs transition-colors"
965
+ },
966
+ /* @__PURE__ */ React.createElement(import_lucide_react7.Copy, { size: 13 }),
967
+ copied ? "Copied!" : "Copy"
968
+ );
969
+ return /* @__PURE__ */ React.createElement(
970
+ "div",
971
+ {
972
+ className: cn(
973
+ "relative border border-gray-700 rounded-lg overflow-hidden",
974
+ className
975
+ )
976
+ },
977
+ title ? /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between bg-[#161B22] px-4 py-2 text-sm text-gray-300 border-b border-gray-700" }, /* @__PURE__ */ React.createElement("span", { className: "truncate" }, title), copyButton) : /* @__PURE__ */ React.createElement("div", { className: "absolute top-2 right-2 z-10" }, copyButton),
978
+ tokens === null ? /* @__PURE__ */ React.createElement(
979
+ "pre",
980
+ {
981
+ className: "p-4 overflow-x-auto text-sm font-mono",
982
+ style: { background: bg, color: fg }
983
+ },
984
+ /* @__PURE__ */ React.createElement("code", null, code)
985
+ ) : /* @__PURE__ */ React.createElement(
986
+ "pre",
987
+ {
988
+ className: "p-4 overflow-x-auto text-sm font-mono !m-0 !rounded-none",
989
+ style: { background: bg, color: fg }
990
+ },
991
+ /* @__PURE__ */ React.createElement("code", null, tokens.map((line, i) => /* @__PURE__ */ React.createElement("span", { key: i, className: "block" }, line.map((token, j) => /* @__PURE__ */ React.createElement("span", { key: j, style: { color: token.color } }, token.content)))))
992
+ )
993
+ );
994
+ }
995
+ // Annotate the CommonJS export names for ESM import in node:
996
+ 0 && (module.exports = {
997
+ Alert,
998
+ Badge,
999
+ Banner,
1000
+ Button,
1001
+ Card,
1002
+ CardContainer,
1003
+ CodeBlock,
1004
+ Drawer,
1005
+ DrawerBody,
1006
+ DrawerFooter,
1007
+ DrawerHeader,
1008
+ Icon,
1009
+ Input,
1010
+ Loader2,
1011
+ MneeIcon,
1012
+ Modal,
1013
+ ModalBody,
1014
+ ModalFooter,
1015
+ ModalHeader,
1016
+ Pagination,
1017
+ Table,
1018
+ TableBody,
1019
+ TableCell,
1020
+ TableEmpty,
1021
+ TableHead,
1022
+ TableHeader,
1023
+ TableLoading,
1024
+ TableRow,
1025
+ Toast,
1026
+ ToastProvider,
1027
+ useToast
1028
+ });