@onesaz/ui 0.3.6 → 0.3.7
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.d.ts +28 -1
- package/dist/index.js +858 -667
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1776,18 +1776,24 @@ var DialogOverlay = React20.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1776
1776
|
}
|
|
1777
1777
|
));
|
|
1778
1778
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1779
|
-
var DialogContent = React20.forwardRef(({ className, children, hideCloseButton = false, ...props }, ref) => /* @__PURE__ */ jsxs7(DialogPortal, { children: [
|
|
1779
|
+
var DialogContent = React20.forwardRef(({ className, children, hideCloseButton = false, size = "lg", ...props }, ref) => /* @__PURE__ */ jsxs7(DialogPortal, { children: [
|
|
1780
1780
|
/* @__PURE__ */ jsx20(DialogOverlay, {}),
|
|
1781
1781
|
/* @__PURE__ */ jsxs7(
|
|
1782
1782
|
DialogPrimitive.Content,
|
|
1783
1783
|
{
|
|
1784
1784
|
ref,
|
|
1785
1785
|
className: cn(
|
|
1786
|
-
"fixed left-1/2 top-1/2 z-50 grid w-full
|
|
1786
|
+
"fixed left-1/2 top-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 p-6 shadow-lg",
|
|
1787
1787
|
"bg-popover border border-border text-popover-foreground",
|
|
1788
1788
|
"rounded-lg",
|
|
1789
1789
|
"data-[state=open]:animate-zoom-in data-[state=closed]:animate-zoom-out",
|
|
1790
1790
|
"duration-200",
|
|
1791
|
+
size === "sm" && "max-w-sm",
|
|
1792
|
+
size === "md" && "max-w-md",
|
|
1793
|
+
size === "lg" && "max-w-lg",
|
|
1794
|
+
size === "xl" && "max-w-xl",
|
|
1795
|
+
size === "2xl" && "max-w-2xl",
|
|
1796
|
+
size === "full" && "max-w-full",
|
|
1791
1797
|
className
|
|
1792
1798
|
),
|
|
1793
1799
|
...props,
|
|
@@ -2209,15 +2215,188 @@ var AlertDescription = React23.forwardRef(
|
|
|
2209
2215
|
);
|
|
2210
2216
|
AlertDescription.displayName = "AlertDescription";
|
|
2211
2217
|
|
|
2212
|
-
// src/components/
|
|
2218
|
+
// src/components/tabs.tsx
|
|
2213
2219
|
import * as React24 from "react";
|
|
2220
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2221
|
+
import { jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2222
|
+
var Tabs = TabsPrimitive.Root;
|
|
2223
|
+
var TabsList = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
2224
|
+
TabsPrimitive.List,
|
|
2225
|
+
{
|
|
2226
|
+
ref,
|
|
2227
|
+
className: cn(
|
|
2228
|
+
"inline-flex h-10 items-center justify-center rounded-md p-1",
|
|
2229
|
+
"bg-muted text-muted-foreground",
|
|
2230
|
+
className
|
|
2231
|
+
),
|
|
2232
|
+
...props
|
|
2233
|
+
}
|
|
2234
|
+
));
|
|
2235
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
2236
|
+
var TabsTrigger = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
2237
|
+
TabsPrimitive.Trigger,
|
|
2238
|
+
{
|
|
2239
|
+
ref,
|
|
2240
|
+
className: cn(
|
|
2241
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all",
|
|
2242
|
+
"ring-offset-background",
|
|
2243
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2244
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
2245
|
+
"data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
2246
|
+
className
|
|
2247
|
+
),
|
|
2248
|
+
...props
|
|
2249
|
+
}
|
|
2250
|
+
));
|
|
2251
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
2252
|
+
var TabsContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
2253
|
+
TabsPrimitive.Content,
|
|
2254
|
+
{
|
|
2255
|
+
ref,
|
|
2256
|
+
className: cn(
|
|
2257
|
+
"mt-2",
|
|
2258
|
+
"ring-offset-background",
|
|
2259
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2260
|
+
className
|
|
2261
|
+
),
|
|
2262
|
+
...props
|
|
2263
|
+
}
|
|
2264
|
+
));
|
|
2265
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
2266
|
+
var UnderlineTabsList = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
2267
|
+
TabsPrimitive.List,
|
|
2268
|
+
{
|
|
2269
|
+
ref,
|
|
2270
|
+
className: cn(
|
|
2271
|
+
"inline-flex items-center gap-0 border-b border-border",
|
|
2272
|
+
className
|
|
2273
|
+
),
|
|
2274
|
+
...props
|
|
2275
|
+
}
|
|
2276
|
+
));
|
|
2277
|
+
UnderlineTabsList.displayName = "UnderlineTabsList";
|
|
2278
|
+
var UnderlineTabsTrigger = React24.forwardRef(({ className, children, count, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
2279
|
+
TabsPrimitive.Trigger,
|
|
2280
|
+
{
|
|
2281
|
+
ref,
|
|
2282
|
+
className: cn(
|
|
2283
|
+
"inline-flex items-center gap-2 whitespace-nowrap px-4 py-2 text-sm font-medium transition-colors",
|
|
2284
|
+
"border-b-2 border-transparent -mb-px",
|
|
2285
|
+
"text-muted-foreground",
|
|
2286
|
+
"hover:text-foreground hover:border-border",
|
|
2287
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2288
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
2289
|
+
"data-[state=active]:text-foreground data-[state=active]:border-accent",
|
|
2290
|
+
className
|
|
2291
|
+
),
|
|
2292
|
+
...props,
|
|
2293
|
+
children: [
|
|
2294
|
+
children,
|
|
2295
|
+
count !== void 0 && /* @__PURE__ */ jsx24(
|
|
2296
|
+
"span",
|
|
2297
|
+
{
|
|
2298
|
+
className: cn(
|
|
2299
|
+
"inline-flex items-center justify-center rounded-full px-2 py-0.5 text-xs font-medium min-w-[1.25rem]",
|
|
2300
|
+
"bg-muted text-muted-foreground"
|
|
2301
|
+
),
|
|
2302
|
+
children: count
|
|
2303
|
+
}
|
|
2304
|
+
)
|
|
2305
|
+
]
|
|
2306
|
+
}
|
|
2307
|
+
));
|
|
2308
|
+
UnderlineTabsTrigger.displayName = "UnderlineTabsTrigger";
|
|
2309
|
+
var UnderlineTabsContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
2310
|
+
TabsPrimitive.Content,
|
|
2311
|
+
{
|
|
2312
|
+
ref,
|
|
2313
|
+
className: cn(
|
|
2314
|
+
"pt-4",
|
|
2315
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2316
|
+
className
|
|
2317
|
+
),
|
|
2318
|
+
...props
|
|
2319
|
+
}
|
|
2320
|
+
));
|
|
2321
|
+
UnderlineTabsContent.displayName = "UnderlineTabsContent";
|
|
2322
|
+
var VerticalTabs = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
2323
|
+
TabsPrimitive.Root,
|
|
2324
|
+
{
|
|
2325
|
+
ref,
|
|
2326
|
+
orientation: "vertical",
|
|
2327
|
+
className: cn("flex gap-8", className),
|
|
2328
|
+
...props
|
|
2329
|
+
}
|
|
2330
|
+
));
|
|
2331
|
+
VerticalTabs.displayName = "VerticalTabs";
|
|
2332
|
+
var VerticalTabsList = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
2333
|
+
TabsPrimitive.List,
|
|
2334
|
+
{
|
|
2335
|
+
ref,
|
|
2336
|
+
className: cn("flex flex-col gap-0.5 w-[220px] shrink-0", className),
|
|
2337
|
+
...props
|
|
2338
|
+
}
|
|
2339
|
+
));
|
|
2340
|
+
VerticalTabsList.displayName = "VerticalTabsList";
|
|
2341
|
+
var VerticalTabsTrigger = React24.forwardRef(({ className, children, icon, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
2342
|
+
TabsPrimitive.Trigger,
|
|
2343
|
+
{
|
|
2344
|
+
ref,
|
|
2345
|
+
className: cn(
|
|
2346
|
+
"flex items-center gap-3 rounded-md px-3 py-1.5 text-sm transition-colors text-left w-full",
|
|
2347
|
+
"text-muted-foreground",
|
|
2348
|
+
"border-l-2 border-transparent -ml-px",
|
|
2349
|
+
"hover:bg-muted hover:text-foreground",
|
|
2350
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2351
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
2352
|
+
"data-[state=active]:text-foreground data-[state=active]:font-medium data-[state=active]:bg-muted data-[state=active]:border-l-2 data-[state=active]:border-accent",
|
|
2353
|
+
className
|
|
2354
|
+
),
|
|
2355
|
+
...props,
|
|
2356
|
+
children: [
|
|
2357
|
+
icon && /* @__PURE__ */ jsx24("span", { className: "size-4 shrink-0 [&>svg]:size-4", children: icon }),
|
|
2358
|
+
children
|
|
2359
|
+
]
|
|
2360
|
+
}
|
|
2361
|
+
));
|
|
2362
|
+
VerticalTabsTrigger.displayName = "VerticalTabsTrigger";
|
|
2363
|
+
var VerticalTabsContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
2364
|
+
TabsPrimitive.Content,
|
|
2365
|
+
{
|
|
2366
|
+
ref,
|
|
2367
|
+
className: cn(
|
|
2368
|
+
"flex-1 min-w-0",
|
|
2369
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2370
|
+
className
|
|
2371
|
+
),
|
|
2372
|
+
...props
|
|
2373
|
+
}
|
|
2374
|
+
));
|
|
2375
|
+
VerticalTabsContent.displayName = "VerticalTabsContent";
|
|
2376
|
+
var VerticalTabsGroupLabel = React24.forwardRef(
|
|
2377
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
2378
|
+
"div",
|
|
2379
|
+
{
|
|
2380
|
+
ref,
|
|
2381
|
+
className: cn(
|
|
2382
|
+
"px-3 pt-4 pb-1 text-xs font-semibold text-muted-foreground first:pt-0",
|
|
2383
|
+
className
|
|
2384
|
+
),
|
|
2385
|
+
...props
|
|
2386
|
+
}
|
|
2387
|
+
)
|
|
2388
|
+
);
|
|
2389
|
+
VerticalTabsGroupLabel.displayName = "VerticalTabsGroupLabel";
|
|
2390
|
+
|
|
2391
|
+
// src/components/tooltip.tsx
|
|
2392
|
+
import * as React25 from "react";
|
|
2214
2393
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2215
|
-
import { Fragment as Fragment2, jsx as
|
|
2394
|
+
import { Fragment as Fragment2, jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2216
2395
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
2217
2396
|
var TooltipRoot = TooltipPrimitive.Root;
|
|
2218
2397
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
2219
2398
|
var TooltipPortal = TooltipPrimitive.Portal;
|
|
2220
|
-
var TooltipArrow =
|
|
2399
|
+
var TooltipArrow = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
2221
2400
|
TooltipPrimitive.Arrow,
|
|
2222
2401
|
{
|
|
2223
2402
|
ref,
|
|
@@ -2226,7 +2405,7 @@ var TooltipArrow = React24.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2226
2405
|
}
|
|
2227
2406
|
));
|
|
2228
2407
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
|
2229
|
-
var TooltipContent =
|
|
2408
|
+
var TooltipContent = React25.forwardRef(({ className, sideOffset = 4, showArrow = false, children, ...props }, ref) => /* @__PURE__ */ jsxs11(
|
|
2230
2409
|
TooltipPrimitive.Content,
|
|
2231
2410
|
{
|
|
2232
2411
|
ref,
|
|
@@ -2244,12 +2423,12 @@ var TooltipContent = React24.forwardRef(({ className, sideOffset = 4, showArrow
|
|
|
2244
2423
|
...props,
|
|
2245
2424
|
children: [
|
|
2246
2425
|
children,
|
|
2247
|
-
showArrow && /* @__PURE__ */
|
|
2426
|
+
showArrow && /* @__PURE__ */ jsx25(TooltipArrow, {})
|
|
2248
2427
|
]
|
|
2249
2428
|
}
|
|
2250
2429
|
));
|
|
2251
2430
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
2252
|
-
var Tooltip =
|
|
2431
|
+
var Tooltip = React25.forwardRef(
|
|
2253
2432
|
({
|
|
2254
2433
|
content,
|
|
2255
2434
|
children,
|
|
@@ -2263,17 +2442,17 @@ var Tooltip = React24.forwardRef(
|
|
|
2263
2442
|
className
|
|
2264
2443
|
}, ref) => {
|
|
2265
2444
|
if (disabled) {
|
|
2266
|
-
return /* @__PURE__ */
|
|
2445
|
+
return /* @__PURE__ */ jsx25(Fragment2, { children });
|
|
2267
2446
|
}
|
|
2268
|
-
return /* @__PURE__ */
|
|
2447
|
+
return /* @__PURE__ */ jsx25(TooltipProvider, { children: /* @__PURE__ */ jsxs11(
|
|
2269
2448
|
TooltipRoot,
|
|
2270
2449
|
{
|
|
2271
2450
|
delayDuration,
|
|
2272
2451
|
open,
|
|
2273
2452
|
onOpenChange,
|
|
2274
2453
|
children: [
|
|
2275
|
-
/* @__PURE__ */
|
|
2276
|
-
/* @__PURE__ */
|
|
2454
|
+
/* @__PURE__ */ jsx25(TooltipTrigger, { ref, asChild: true, children }),
|
|
2455
|
+
/* @__PURE__ */ jsx25(TooltipPortal, { children: /* @__PURE__ */ jsx25(
|
|
2277
2456
|
TooltipContent,
|
|
2278
2457
|
{
|
|
2279
2458
|
side,
|
|
@@ -2291,8 +2470,8 @@ var Tooltip = React24.forwardRef(
|
|
|
2291
2470
|
Tooltip.displayName = "Tooltip";
|
|
2292
2471
|
|
|
2293
2472
|
// src/components/progress.tsx
|
|
2294
|
-
import * as
|
|
2295
|
-
import { jsx as
|
|
2473
|
+
import * as React26 from "react";
|
|
2474
|
+
import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2296
2475
|
var linearSizeClasses = {
|
|
2297
2476
|
sm: "h-1",
|
|
2298
2477
|
md: "h-2",
|
|
@@ -2305,7 +2484,7 @@ var variantClasses2 = {
|
|
|
2305
2484
|
error: "bg-red-500",
|
|
2306
2485
|
info: "bg-blue-500"
|
|
2307
2486
|
};
|
|
2308
|
-
var LinearProgress =
|
|
2487
|
+
var LinearProgress = React26.forwardRef(
|
|
2309
2488
|
({
|
|
2310
2489
|
value,
|
|
2311
2490
|
variant = "default",
|
|
@@ -2317,8 +2496,8 @@ var LinearProgress = React25.forwardRef(
|
|
|
2317
2496
|
...props
|
|
2318
2497
|
}, ref) => {
|
|
2319
2498
|
const isIndeterminate = value === void 0;
|
|
2320
|
-
return /* @__PURE__ */
|
|
2321
|
-
/* @__PURE__ */
|
|
2499
|
+
return /* @__PURE__ */ jsxs12("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
2500
|
+
/* @__PURE__ */ jsx26(
|
|
2322
2501
|
"div",
|
|
2323
2502
|
{
|
|
2324
2503
|
className: cn(
|
|
@@ -2329,7 +2508,7 @@ var LinearProgress = React25.forwardRef(
|
|
|
2329
2508
|
"aria-valuenow": isIndeterminate ? void 0 : value,
|
|
2330
2509
|
"aria-valuemin": 0,
|
|
2331
2510
|
"aria-valuemax": 100,
|
|
2332
|
-
children: /* @__PURE__ */
|
|
2511
|
+
children: /* @__PURE__ */ jsx26(
|
|
2333
2512
|
"div",
|
|
2334
2513
|
{
|
|
2335
2514
|
className: cn(
|
|
@@ -2343,7 +2522,7 @@ var LinearProgress = React25.forwardRef(
|
|
|
2343
2522
|
)
|
|
2344
2523
|
}
|
|
2345
2524
|
),
|
|
2346
|
-
showValue && !isIndeterminate && /* @__PURE__ */
|
|
2525
|
+
showValue && !isIndeterminate && /* @__PURE__ */ jsx26("span", { className: "mt-1 text-sm text-muted-foreground", children: formatValue(value) })
|
|
2347
2526
|
] });
|
|
2348
2527
|
}
|
|
2349
2528
|
);
|
|
@@ -2361,7 +2540,7 @@ var strokeColors = {
|
|
|
2361
2540
|
error: "stroke-red-500",
|
|
2362
2541
|
info: "stroke-blue-500"
|
|
2363
2542
|
};
|
|
2364
|
-
var CircularProgress =
|
|
2543
|
+
var CircularProgress = React26.forwardRef(
|
|
2365
2544
|
({
|
|
2366
2545
|
value,
|
|
2367
2546
|
variant = "default",
|
|
@@ -2378,7 +2557,7 @@ var CircularProgress = React25.forwardRef(
|
|
|
2378
2557
|
const radius = (sizeValue - thickness) / 2;
|
|
2379
2558
|
const circumference = 2 * Math.PI * radius;
|
|
2380
2559
|
const strokeDashoffset = isIndeterminate ? 0 : circumference - Math.min(100, Math.max(0, value)) / 100 * circumference;
|
|
2381
|
-
return /* @__PURE__ */
|
|
2560
|
+
return /* @__PURE__ */ jsxs12(
|
|
2382
2561
|
"div",
|
|
2383
2562
|
{
|
|
2384
2563
|
ref,
|
|
@@ -2390,7 +2569,7 @@ var CircularProgress = React25.forwardRef(
|
|
|
2390
2569
|
"aria-valuemax": 100,
|
|
2391
2570
|
...props,
|
|
2392
2571
|
children: [
|
|
2393
|
-
/* @__PURE__ */
|
|
2572
|
+
/* @__PURE__ */ jsxs12(
|
|
2394
2573
|
"svg",
|
|
2395
2574
|
{
|
|
2396
2575
|
className: cn(isIndeterminate && "animate-spin"),
|
|
@@ -2398,7 +2577,7 @@ var CircularProgress = React25.forwardRef(
|
|
|
2398
2577
|
height: sizeValue,
|
|
2399
2578
|
viewBox: `0 0 ${sizeValue} ${sizeValue}`,
|
|
2400
2579
|
children: [
|
|
2401
|
-
/* @__PURE__ */
|
|
2580
|
+
/* @__PURE__ */ jsx26(
|
|
2402
2581
|
"circle",
|
|
2403
2582
|
{
|
|
2404
2583
|
className: "stroke-muted",
|
|
@@ -2409,7 +2588,7 @@ var CircularProgress = React25.forwardRef(
|
|
|
2409
2588
|
r: radius
|
|
2410
2589
|
}
|
|
2411
2590
|
),
|
|
2412
|
-
/* @__PURE__ */
|
|
2591
|
+
/* @__PURE__ */ jsx26(
|
|
2413
2592
|
"circle",
|
|
2414
2593
|
{
|
|
2415
2594
|
className: cn(
|
|
@@ -2430,7 +2609,7 @@ var CircularProgress = React25.forwardRef(
|
|
|
2430
2609
|
]
|
|
2431
2610
|
}
|
|
2432
2611
|
),
|
|
2433
|
-
(showValue || children) && !isIndeterminate && /* @__PURE__ */
|
|
2612
|
+
(showValue || children) && !isIndeterminate && /* @__PURE__ */ jsx26("div", { className: "absolute inset-0 flex items-center justify-center", children: children || /* @__PURE__ */ jsx26(
|
|
2434
2613
|
"span",
|
|
2435
2614
|
{
|
|
2436
2615
|
className: "text-foreground font-medium",
|
|
@@ -2444,13 +2623,13 @@ var CircularProgress = React25.forwardRef(
|
|
|
2444
2623
|
}
|
|
2445
2624
|
);
|
|
2446
2625
|
CircularProgress.displayName = "CircularProgress";
|
|
2447
|
-
var Progress =
|
|
2626
|
+
var Progress = React26.forwardRef((props, ref) => /* @__PURE__ */ jsx26(LinearProgress, { ref, ...props }));
|
|
2448
2627
|
Progress.displayName = "Progress";
|
|
2449
2628
|
|
|
2450
2629
|
// src/components/table.tsx
|
|
2451
|
-
import * as
|
|
2452
|
-
import { jsx as
|
|
2453
|
-
var Table =
|
|
2630
|
+
import * as React27 from "react";
|
|
2631
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2632
|
+
var Table = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx27(
|
|
2454
2633
|
"table",
|
|
2455
2634
|
{
|
|
2456
2635
|
ref,
|
|
@@ -2459,9 +2638,9 @@ var Table = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
2459
2638
|
}
|
|
2460
2639
|
) }));
|
|
2461
2640
|
Table.displayName = "Table";
|
|
2462
|
-
var TableHeader =
|
|
2641
|
+
var TableHeader = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2463
2642
|
TableHeader.displayName = "TableHeader";
|
|
2464
|
-
var TableBody =
|
|
2643
|
+
var TableBody = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
2465
2644
|
"tbody",
|
|
2466
2645
|
{
|
|
2467
2646
|
ref,
|
|
@@ -2470,7 +2649,7 @@ var TableBody = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2470
2649
|
}
|
|
2471
2650
|
));
|
|
2472
2651
|
TableBody.displayName = "TableBody";
|
|
2473
|
-
var TableFooter =
|
|
2652
|
+
var TableFooter = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
2474
2653
|
"tfoot",
|
|
2475
2654
|
{
|
|
2476
2655
|
ref,
|
|
@@ -2482,7 +2661,7 @@ var TableFooter = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2482
2661
|
}
|
|
2483
2662
|
));
|
|
2484
2663
|
TableFooter.displayName = "TableFooter";
|
|
2485
|
-
var TableRow =
|
|
2664
|
+
var TableRow = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
2486
2665
|
"tr",
|
|
2487
2666
|
{
|
|
2488
2667
|
ref,
|
|
@@ -2496,7 +2675,7 @@ var TableRow = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2496
2675
|
}
|
|
2497
2676
|
));
|
|
2498
2677
|
TableRow.displayName = "TableRow";
|
|
2499
|
-
var TableHead =
|
|
2678
|
+
var TableHead = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
2500
2679
|
"th",
|
|
2501
2680
|
{
|
|
2502
2681
|
ref,
|
|
@@ -2509,7 +2688,7 @@ var TableHead = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2509
2688
|
}
|
|
2510
2689
|
));
|
|
2511
2690
|
TableHead.displayName = "TableHead";
|
|
2512
|
-
var TableCell =
|
|
2691
|
+
var TableCell = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
2513
2692
|
"td",
|
|
2514
2693
|
{
|
|
2515
2694
|
ref,
|
|
@@ -2521,7 +2700,7 @@ var TableCell = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2521
2700
|
}
|
|
2522
2701
|
));
|
|
2523
2702
|
TableCell.displayName = "TableCell";
|
|
2524
|
-
var TableCaption =
|
|
2703
|
+
var TableCaption = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
2525
2704
|
"caption",
|
|
2526
2705
|
{
|
|
2527
2706
|
ref,
|
|
@@ -2541,8 +2720,8 @@ var TableNamespace = Object.assign(Table, {
|
|
|
2541
2720
|
});
|
|
2542
2721
|
|
|
2543
2722
|
// src/components/avatar.tsx
|
|
2544
|
-
import * as
|
|
2545
|
-
import { jsx as
|
|
2723
|
+
import * as React28 from "react";
|
|
2724
|
+
import { jsx as jsx28, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2546
2725
|
var sizeClasses3 = {
|
|
2547
2726
|
xs: "h-6 w-6 text-xs",
|
|
2548
2727
|
sm: "h-8 w-8 text-sm",
|
|
@@ -2551,7 +2730,7 @@ var sizeClasses3 = {
|
|
|
2551
2730
|
xl: "h-16 w-16 text-xl",
|
|
2552
2731
|
"2xl": "h-20 w-20 text-2xl"
|
|
2553
2732
|
};
|
|
2554
|
-
var Avatar =
|
|
2733
|
+
var Avatar = React28.forwardRef(
|
|
2555
2734
|
({
|
|
2556
2735
|
src,
|
|
2557
2736
|
alt,
|
|
@@ -2563,8 +2742,8 @@ var Avatar = React27.forwardRef(
|
|
|
2563
2742
|
className,
|
|
2564
2743
|
...props
|
|
2565
2744
|
}, ref) => {
|
|
2566
|
-
const [imageError, setImageError] =
|
|
2567
|
-
|
|
2745
|
+
const [imageError, setImageError] = React28.useState(false);
|
|
2746
|
+
React28.useEffect(() => {
|
|
2568
2747
|
setImageError(false);
|
|
2569
2748
|
}, [src]);
|
|
2570
2749
|
const showFallback = !src || imageError;
|
|
@@ -2575,7 +2754,7 @@ var Avatar = React27.forwardRef(
|
|
|
2575
2754
|
}
|
|
2576
2755
|
return text.slice(0, 2).toUpperCase();
|
|
2577
2756
|
};
|
|
2578
|
-
return /* @__PURE__ */
|
|
2757
|
+
return /* @__PURE__ */ jsx28(
|
|
2579
2758
|
"div",
|
|
2580
2759
|
{
|
|
2581
2760
|
ref,
|
|
@@ -2587,7 +2766,7 @@ var Avatar = React27.forwardRef(
|
|
|
2587
2766
|
className
|
|
2588
2767
|
),
|
|
2589
2768
|
...props,
|
|
2590
|
-
children: !showFallback ? /* @__PURE__ */
|
|
2769
|
+
children: !showFallback ? /* @__PURE__ */ jsx28(
|
|
2591
2770
|
"img",
|
|
2592
2771
|
{
|
|
2593
2772
|
src,
|
|
@@ -2595,9 +2774,9 @@ var Avatar = React27.forwardRef(
|
|
|
2595
2774
|
onError: () => setImageError(true),
|
|
2596
2775
|
className: "h-full w-full object-cover"
|
|
2597
2776
|
}
|
|
2598
|
-
) : fallbackElement ? fallbackElement : fallback ? /* @__PURE__ */
|
|
2777
|
+
) : fallbackElement ? fallbackElement : fallback ? /* @__PURE__ */ jsx28("span", { className: "font-medium", children: getInitials(fallback) }) : (
|
|
2599
2778
|
// Default user icon
|
|
2600
|
-
/* @__PURE__ */
|
|
2779
|
+
/* @__PURE__ */ jsxs13(
|
|
2601
2780
|
"svg",
|
|
2602
2781
|
{
|
|
2603
2782
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2609,8 +2788,8 @@ var Avatar = React27.forwardRef(
|
|
|
2609
2788
|
strokeLinejoin: "round",
|
|
2610
2789
|
className: "h-1/2 w-1/2",
|
|
2611
2790
|
children: [
|
|
2612
|
-
/* @__PURE__ */
|
|
2613
|
-
/* @__PURE__ */
|
|
2791
|
+
/* @__PURE__ */ jsx28("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
|
|
2792
|
+
/* @__PURE__ */ jsx28("circle", { cx: "12", cy: "7", r: "4" })
|
|
2614
2793
|
]
|
|
2615
2794
|
}
|
|
2616
2795
|
)
|
|
@@ -2620,12 +2799,12 @@ var Avatar = React27.forwardRef(
|
|
|
2620
2799
|
}
|
|
2621
2800
|
);
|
|
2622
2801
|
Avatar.displayName = "Avatar";
|
|
2623
|
-
var AvatarGroup =
|
|
2802
|
+
var AvatarGroup = React28.forwardRef(
|
|
2624
2803
|
({ max, size = "md", children, className, ...props }, ref) => {
|
|
2625
|
-
const childArray =
|
|
2804
|
+
const childArray = React28.Children.toArray(children);
|
|
2626
2805
|
const visibleChildren = max ? childArray.slice(0, max) : childArray;
|
|
2627
2806
|
const remainingCount = max ? childArray.length - max : 0;
|
|
2628
|
-
return /* @__PURE__ */
|
|
2807
|
+
return /* @__PURE__ */ jsxs13(
|
|
2629
2808
|
"div",
|
|
2630
2809
|
{
|
|
2631
2810
|
ref,
|
|
@@ -2633,8 +2812,8 @@ var AvatarGroup = React27.forwardRef(
|
|
|
2633
2812
|
...props,
|
|
2634
2813
|
children: [
|
|
2635
2814
|
visibleChildren.map((child, index) => {
|
|
2636
|
-
if (
|
|
2637
|
-
return
|
|
2815
|
+
if (React28.isValidElement(child)) {
|
|
2816
|
+
return React28.cloneElement(child, {
|
|
2638
2817
|
key: index,
|
|
2639
2818
|
size: child.props.size || size,
|
|
2640
2819
|
bordered: true,
|
|
@@ -2643,7 +2822,7 @@ var AvatarGroup = React27.forwardRef(
|
|
|
2643
2822
|
}
|
|
2644
2823
|
return child;
|
|
2645
2824
|
}),
|
|
2646
|
-
remainingCount > 0 && /* @__PURE__ */
|
|
2825
|
+
remainingCount > 0 && /* @__PURE__ */ jsx28(
|
|
2647
2826
|
Avatar,
|
|
2648
2827
|
{
|
|
2649
2828
|
size,
|
|
@@ -2660,9 +2839,9 @@ var AvatarGroup = React27.forwardRef(
|
|
|
2660
2839
|
AvatarGroup.displayName = "AvatarGroup";
|
|
2661
2840
|
|
|
2662
2841
|
// src/components/skeleton.tsx
|
|
2663
|
-
import * as
|
|
2664
|
-
import { jsx as
|
|
2665
|
-
var Skeleton =
|
|
2842
|
+
import * as React29 from "react";
|
|
2843
|
+
import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2844
|
+
var Skeleton = React29.forwardRef(
|
|
2666
2845
|
({
|
|
2667
2846
|
variant = "text",
|
|
2668
2847
|
width,
|
|
@@ -2684,7 +2863,7 @@ var Skeleton = React28.forwardRef(
|
|
|
2684
2863
|
none: ""
|
|
2685
2864
|
};
|
|
2686
2865
|
const defaultHeight = variant === "text" ? "1em" : void 0;
|
|
2687
|
-
return /* @__PURE__ */
|
|
2866
|
+
return /* @__PURE__ */ jsx29(
|
|
2688
2867
|
"div",
|
|
2689
2868
|
{
|
|
2690
2869
|
ref,
|
|
@@ -2705,7 +2884,7 @@ var Skeleton = React28.forwardRef(
|
|
|
2705
2884
|
}
|
|
2706
2885
|
);
|
|
2707
2886
|
Skeleton.displayName = "Skeleton";
|
|
2708
|
-
var SkeletonText =
|
|
2887
|
+
var SkeletonText = React29.forwardRef(
|
|
2709
2888
|
({
|
|
2710
2889
|
lines = 3,
|
|
2711
2890
|
lastLineWidth = 60,
|
|
@@ -2719,7 +2898,7 @@ var SkeletonText = React28.forwardRef(
|
|
|
2719
2898
|
md: "space-y-2",
|
|
2720
2899
|
lg: "space-y-3"
|
|
2721
2900
|
};
|
|
2722
|
-
return /* @__PURE__ */
|
|
2901
|
+
return /* @__PURE__ */ jsx29("div", { ref, className: cn(gapClasses2[gap], className), ...props, children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ jsx29(
|
|
2723
2902
|
Skeleton,
|
|
2724
2903
|
{
|
|
2725
2904
|
variant: "text",
|
|
@@ -2740,10 +2919,10 @@ var sizeMap = {
|
|
|
2740
2919
|
lg: 48,
|
|
2741
2920
|
xl: 64
|
|
2742
2921
|
};
|
|
2743
|
-
var SkeletonAvatar =
|
|
2922
|
+
var SkeletonAvatar = React29.forwardRef(
|
|
2744
2923
|
({ size = "md", animation = "pulse", className, ...props }, ref) => {
|
|
2745
2924
|
const sizeValue = sizeMap[size];
|
|
2746
|
-
return /* @__PURE__ */
|
|
2925
|
+
return /* @__PURE__ */ jsx29(
|
|
2747
2926
|
Skeleton,
|
|
2748
2927
|
{
|
|
2749
2928
|
ref,
|
|
@@ -2758,7 +2937,7 @@ var SkeletonAvatar = React28.forwardRef(
|
|
|
2758
2937
|
}
|
|
2759
2938
|
);
|
|
2760
2939
|
SkeletonAvatar.displayName = "SkeletonAvatar";
|
|
2761
|
-
var SkeletonCard =
|
|
2940
|
+
var SkeletonCard = React29.forwardRef(
|
|
2762
2941
|
({
|
|
2763
2942
|
hasImage = true,
|
|
2764
2943
|
imageHeight = 200,
|
|
@@ -2767,14 +2946,14 @@ var SkeletonCard = React28.forwardRef(
|
|
|
2767
2946
|
className,
|
|
2768
2947
|
...props
|
|
2769
2948
|
}, ref) => {
|
|
2770
|
-
return /* @__PURE__ */
|
|
2949
|
+
return /* @__PURE__ */ jsxs14(
|
|
2771
2950
|
"div",
|
|
2772
2951
|
{
|
|
2773
2952
|
ref,
|
|
2774
2953
|
className: cn("rounded-lg border border-border p-4 space-y-4", className),
|
|
2775
2954
|
...props,
|
|
2776
2955
|
children: [
|
|
2777
|
-
hasImage && /* @__PURE__ */
|
|
2956
|
+
hasImage && /* @__PURE__ */ jsx29(
|
|
2778
2957
|
Skeleton,
|
|
2779
2958
|
{
|
|
2780
2959
|
variant: "rounded",
|
|
@@ -2782,9 +2961,9 @@ var SkeletonCard = React28.forwardRef(
|
|
|
2782
2961
|
animation
|
|
2783
2962
|
}
|
|
2784
2963
|
),
|
|
2785
|
-
/* @__PURE__ */
|
|
2786
|
-
/* @__PURE__ */
|
|
2787
|
-
/* @__PURE__ */
|
|
2964
|
+
/* @__PURE__ */ jsxs14("div", { className: "space-y-2", children: [
|
|
2965
|
+
/* @__PURE__ */ jsx29(Skeleton, { variant: "text", width: "60%", animation }),
|
|
2966
|
+
/* @__PURE__ */ jsx29(SkeletonText, { lines, animation })
|
|
2788
2967
|
] })
|
|
2789
2968
|
]
|
|
2790
2969
|
}
|
|
@@ -2792,15 +2971,15 @@ var SkeletonCard = React28.forwardRef(
|
|
|
2792
2971
|
}
|
|
2793
2972
|
);
|
|
2794
2973
|
SkeletonCard.displayName = "SkeletonCard";
|
|
2795
|
-
var SkeletonTableRow =
|
|
2974
|
+
var SkeletonTableRow = React29.forwardRef(
|
|
2796
2975
|
({ columns = 4, animation = "pulse", className, ...props }, ref) => {
|
|
2797
|
-
return /* @__PURE__ */
|
|
2976
|
+
return /* @__PURE__ */ jsx29(
|
|
2798
2977
|
"div",
|
|
2799
2978
|
{
|
|
2800
2979
|
ref,
|
|
2801
2980
|
className: cn("flex items-center gap-4 py-3", className),
|
|
2802
2981
|
...props,
|
|
2803
|
-
children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */
|
|
2982
|
+
children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ jsx29(
|
|
2804
2983
|
Skeleton,
|
|
2805
2984
|
{
|
|
2806
2985
|
variant: "text",
|
|
@@ -2816,10 +2995,10 @@ var SkeletonTableRow = React28.forwardRef(
|
|
|
2816
2995
|
SkeletonTableRow.displayName = "SkeletonTableRow";
|
|
2817
2996
|
|
|
2818
2997
|
// src/components/pagination.tsx
|
|
2819
|
-
import * as
|
|
2820
|
-
import { jsx as
|
|
2821
|
-
var Pagination =
|
|
2822
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2998
|
+
import * as React30 from "react";
|
|
2999
|
+
import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3000
|
+
var Pagination = React30.forwardRef(
|
|
3001
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
2823
3002
|
"nav",
|
|
2824
3003
|
{
|
|
2825
3004
|
ref,
|
|
@@ -2831,7 +3010,7 @@ var Pagination = React29.forwardRef(
|
|
|
2831
3010
|
)
|
|
2832
3011
|
);
|
|
2833
3012
|
Pagination.displayName = "Pagination";
|
|
2834
|
-
var PaginationContent =
|
|
3013
|
+
var PaginationContent = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
2835
3014
|
"ul",
|
|
2836
3015
|
{
|
|
2837
3016
|
ref,
|
|
@@ -2840,10 +3019,10 @@ var PaginationContent = React29.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2840
3019
|
}
|
|
2841
3020
|
));
|
|
2842
3021
|
PaginationContent.displayName = "PaginationContent";
|
|
2843
|
-
var PaginationItem =
|
|
3022
|
+
var PaginationItem = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30("li", { ref, className: cn("", className), ...props }));
|
|
2844
3023
|
PaginationItem.displayName = "PaginationItem";
|
|
2845
|
-
var PaginationLink =
|
|
2846
|
-
({ className, isActive, ...props }, ref) => /* @__PURE__ */
|
|
3024
|
+
var PaginationLink = React30.forwardRef(
|
|
3025
|
+
({ className, isActive, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
2847
3026
|
Button,
|
|
2848
3027
|
{
|
|
2849
3028
|
ref,
|
|
@@ -2855,7 +3034,7 @@ var PaginationLink = React29.forwardRef(
|
|
|
2855
3034
|
)
|
|
2856
3035
|
);
|
|
2857
3036
|
PaginationLink.displayName = "PaginationLink";
|
|
2858
|
-
var PaginationPrevious =
|
|
3037
|
+
var PaginationPrevious = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs15(
|
|
2859
3038
|
Button,
|
|
2860
3039
|
{
|
|
2861
3040
|
ref,
|
|
@@ -2864,7 +3043,7 @@ var PaginationPrevious = React29.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2864
3043
|
className: cn("gap-1 pl-2.5", className),
|
|
2865
3044
|
...props,
|
|
2866
3045
|
children: [
|
|
2867
|
-
/* @__PURE__ */
|
|
3046
|
+
/* @__PURE__ */ jsx30(
|
|
2868
3047
|
"svg",
|
|
2869
3048
|
{
|
|
2870
3049
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2877,15 +3056,15 @@ var PaginationPrevious = React29.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2877
3056
|
strokeLinecap: "round",
|
|
2878
3057
|
strokeLinejoin: "round",
|
|
2879
3058
|
className: "h-4 w-4",
|
|
2880
|
-
children: /* @__PURE__ */
|
|
3059
|
+
children: /* @__PURE__ */ jsx30("path", { d: "m15 18-6-6 6-6" })
|
|
2881
3060
|
}
|
|
2882
3061
|
),
|
|
2883
|
-
/* @__PURE__ */
|
|
3062
|
+
/* @__PURE__ */ jsx30("span", { children: "Previous" })
|
|
2884
3063
|
]
|
|
2885
3064
|
}
|
|
2886
3065
|
));
|
|
2887
3066
|
PaginationPrevious.displayName = "PaginationPrevious";
|
|
2888
|
-
var PaginationNext =
|
|
3067
|
+
var PaginationNext = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs15(
|
|
2889
3068
|
Button,
|
|
2890
3069
|
{
|
|
2891
3070
|
ref,
|
|
@@ -2894,8 +3073,8 @@ var PaginationNext = React29.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2894
3073
|
className: cn("gap-1 pr-2.5", className),
|
|
2895
3074
|
...props,
|
|
2896
3075
|
children: [
|
|
2897
|
-
/* @__PURE__ */
|
|
2898
|
-
/* @__PURE__ */
|
|
3076
|
+
/* @__PURE__ */ jsx30("span", { children: "Next" }),
|
|
3077
|
+
/* @__PURE__ */ jsx30(
|
|
2899
3078
|
"svg",
|
|
2900
3079
|
{
|
|
2901
3080
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2908,14 +3087,14 @@ var PaginationNext = React29.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2908
3087
|
strokeLinecap: "round",
|
|
2909
3088
|
strokeLinejoin: "round",
|
|
2910
3089
|
className: "h-4 w-4",
|
|
2911
|
-
children: /* @__PURE__ */
|
|
3090
|
+
children: /* @__PURE__ */ jsx30("path", { d: "m9 18 6-6-6-6" })
|
|
2912
3091
|
}
|
|
2913
3092
|
)
|
|
2914
3093
|
]
|
|
2915
3094
|
}
|
|
2916
3095
|
));
|
|
2917
3096
|
PaginationNext.displayName = "PaginationNext";
|
|
2918
|
-
var PaginationEllipsis =
|
|
3097
|
+
var PaginationEllipsis = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs15(
|
|
2919
3098
|
"span",
|
|
2920
3099
|
{
|
|
2921
3100
|
ref,
|
|
@@ -2923,7 +3102,7 @@ var PaginationEllipsis = React29.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2923
3102
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
2924
3103
|
...props,
|
|
2925
3104
|
children: [
|
|
2926
|
-
/* @__PURE__ */
|
|
3105
|
+
/* @__PURE__ */ jsxs15(
|
|
2927
3106
|
"svg",
|
|
2928
3107
|
{
|
|
2929
3108
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2937,13 +3116,13 @@ var PaginationEllipsis = React29.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2937
3116
|
strokeLinejoin: "round",
|
|
2938
3117
|
className: "h-4 w-4",
|
|
2939
3118
|
children: [
|
|
2940
|
-
/* @__PURE__ */
|
|
2941
|
-
/* @__PURE__ */
|
|
2942
|
-
/* @__PURE__ */
|
|
3119
|
+
/* @__PURE__ */ jsx30("circle", { cx: "12", cy: "12", r: "1" }),
|
|
3120
|
+
/* @__PURE__ */ jsx30("circle", { cx: "19", cy: "12", r: "1" }),
|
|
3121
|
+
/* @__PURE__ */ jsx30("circle", { cx: "5", cy: "12", r: "1" })
|
|
2943
3122
|
]
|
|
2944
3123
|
}
|
|
2945
3124
|
),
|
|
2946
|
-
/* @__PURE__ */
|
|
3125
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "More pages" })
|
|
2947
3126
|
]
|
|
2948
3127
|
}
|
|
2949
3128
|
));
|
|
@@ -2958,12 +3137,12 @@ var PaginationNamespace = Object.assign(Pagination, {
|
|
|
2958
3137
|
});
|
|
2959
3138
|
|
|
2960
3139
|
// src/components/combobox/index.tsx
|
|
2961
|
-
import * as
|
|
2962
|
-
import { Fragment as Fragment3, jsx as
|
|
3140
|
+
import * as React31 from "react";
|
|
3141
|
+
import { Fragment as Fragment3, jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2963
3142
|
function isMultipleProps(props) {
|
|
2964
3143
|
return props.multiple === true;
|
|
2965
3144
|
}
|
|
2966
|
-
var Combobox =
|
|
3145
|
+
var Combobox = React31.forwardRef(
|
|
2967
3146
|
(props, ref) => {
|
|
2968
3147
|
const {
|
|
2969
3148
|
options,
|
|
@@ -2977,7 +3156,7 @@ var Combobox = React30.forwardRef(
|
|
|
2977
3156
|
} = props;
|
|
2978
3157
|
const labelKey = props.labelKey ?? "label";
|
|
2979
3158
|
const valueKey = props.valueKey ?? "value";
|
|
2980
|
-
const getOptionLabel =
|
|
3159
|
+
const getOptionLabel = React31.useCallback(
|
|
2981
3160
|
(option) => {
|
|
2982
3161
|
if (typeof option === "string") return option;
|
|
2983
3162
|
const record = option;
|
|
@@ -2986,7 +3165,7 @@ var Combobox = React30.forwardRef(
|
|
|
2986
3165
|
},
|
|
2987
3166
|
[labelKey]
|
|
2988
3167
|
);
|
|
2989
|
-
const getOptionValue =
|
|
3168
|
+
const getOptionValue = React31.useCallback(
|
|
2990
3169
|
(option) => {
|
|
2991
3170
|
if (typeof option === "string") return option;
|
|
2992
3171
|
const record = option;
|
|
@@ -2998,7 +3177,7 @@ var Combobox = React30.forwardRef(
|
|
|
2998
3177
|
},
|
|
2999
3178
|
[valueKey, getOptionLabel]
|
|
3000
3179
|
);
|
|
3001
|
-
const normalizedOptions =
|
|
3180
|
+
const normalizedOptions = React31.useMemo(
|
|
3002
3181
|
() => (options ?? []).map((option) => ({
|
|
3003
3182
|
raw: option,
|
|
3004
3183
|
label: getOptionLabel(option),
|
|
@@ -3007,31 +3186,31 @@ var Combobox = React30.forwardRef(
|
|
|
3007
3186
|
})),
|
|
3008
3187
|
[options, getOptionLabel, getOptionValue]
|
|
3009
3188
|
);
|
|
3010
|
-
const [open, setOpen] =
|
|
3011
|
-
const [internalSearch, setInternalSearch] =
|
|
3012
|
-
const containerRef =
|
|
3013
|
-
const searchInputRef =
|
|
3189
|
+
const [open, setOpen] = React31.useState(false);
|
|
3190
|
+
const [internalSearch, setInternalSearch] = React31.useState("");
|
|
3191
|
+
const containerRef = React31.useRef(null);
|
|
3192
|
+
const searchInputRef = React31.useRef(null);
|
|
3014
3193
|
const isMultiple = isMultipleProps(props);
|
|
3015
3194
|
const selectAll = isMultiple ? props.selectAll ?? false : false;
|
|
3016
3195
|
const selectAllLabel = isMultiple ? props.selectAllLabel ?? "Select all" : "Select all";
|
|
3017
|
-
const [internalSingleValue, setInternalSingleValue] =
|
|
3018
|
-
const [internalMultiValue, setInternalMultiValue] =
|
|
3196
|
+
const [internalSingleValue, setInternalSingleValue] = React31.useState(!isMultiple ? props.defaultValue ?? null : null);
|
|
3197
|
+
const [internalMultiValue, setInternalMultiValue] = React31.useState(isMultiple ? props.defaultValue ?? [] : []);
|
|
3019
3198
|
const singleValue = !isMultiple ? props.value !== void 0 ? props.value : internalSingleValue : null;
|
|
3020
3199
|
const multiValue = isMultiple ? props.value !== void 0 ? props.value : internalMultiValue : [];
|
|
3021
3200
|
const search = props.inputValue !== void 0 ? props.inputValue : internalSearch;
|
|
3022
|
-
const filteredOptions =
|
|
3201
|
+
const filteredOptions = React31.useMemo(() => {
|
|
3023
3202
|
if (!search) return normalizedOptions;
|
|
3024
3203
|
return normalizedOptions.filter(
|
|
3025
3204
|
(option) => option.label.toLowerCase().includes(search.toLowerCase())
|
|
3026
3205
|
);
|
|
3027
3206
|
}, [normalizedOptions, search]);
|
|
3028
3207
|
const selectedOptions = isMultiple ? multiValue : [];
|
|
3029
|
-
const selectedValueKeys =
|
|
3208
|
+
const selectedValueKeys = React31.useMemo(
|
|
3030
3209
|
() => new Set(selectedOptions.map((option) => getOptionValue(option))),
|
|
3031
3210
|
[selectedOptions, getOptionValue]
|
|
3032
3211
|
);
|
|
3033
3212
|
const singleValueKey = singleValue ? getOptionValue(singleValue) : null;
|
|
3034
|
-
const selectableOptions =
|
|
3213
|
+
const selectableOptions = React31.useMemo(
|
|
3035
3214
|
() => normalizedOptions.filter((option) => !option.disabled),
|
|
3036
3215
|
[normalizedOptions]
|
|
3037
3216
|
);
|
|
@@ -3099,7 +3278,7 @@ var Combobox = React30.forwardRef(
|
|
|
3099
3278
|
}
|
|
3100
3279
|
}
|
|
3101
3280
|
};
|
|
3102
|
-
|
|
3281
|
+
React31.useEffect(() => {
|
|
3103
3282
|
const handleClickOutside = (event) => {
|
|
3104
3283
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
3105
3284
|
setOpen(false);
|
|
@@ -3108,12 +3287,12 @@ var Combobox = React30.forwardRef(
|
|
|
3108
3287
|
document.addEventListener("mousedown", handleClickOutside);
|
|
3109
3288
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3110
3289
|
}, []);
|
|
3111
|
-
|
|
3290
|
+
React31.useEffect(() => {
|
|
3112
3291
|
if (open) {
|
|
3113
3292
|
searchInputRef.current?.focus();
|
|
3114
3293
|
}
|
|
3115
3294
|
}, [open]);
|
|
3116
|
-
|
|
3295
|
+
React31.useImperativeHandle(
|
|
3117
3296
|
ref,
|
|
3118
3297
|
() => searchInputRef.current,
|
|
3119
3298
|
[]
|
|
@@ -3124,8 +3303,8 @@ var Combobox = React30.forwardRef(
|
|
|
3124
3303
|
const maxDisplayItems = isMultiple ? props.maxDisplayItems ?? 3 : 0;
|
|
3125
3304
|
const displayedOptions = selectedOptions.slice(0, maxDisplayItems);
|
|
3126
3305
|
const remainingCount = selectedOptions.length - maxDisplayItems;
|
|
3127
|
-
return /* @__PURE__ */
|
|
3128
|
-
/* @__PURE__ */
|
|
3306
|
+
return /* @__PURE__ */ jsxs16("div", { ref: containerRef, className: "relative", children: [
|
|
3307
|
+
/* @__PURE__ */ jsxs16(
|
|
3129
3308
|
"button",
|
|
3130
3309
|
{
|
|
3131
3310
|
type: "button",
|
|
@@ -3142,20 +3321,20 @@ var Combobox = React30.forwardRef(
|
|
|
3142
3321
|
className
|
|
3143
3322
|
),
|
|
3144
3323
|
children: [
|
|
3145
|
-
isMultiple ? /* @__PURE__ */
|
|
3146
|
-
displayedOptions.map((option) => /* @__PURE__ */
|
|
3324
|
+
isMultiple ? /* @__PURE__ */ jsx31("div", { className: "flex flex-1 flex-wrap items-center gap-1", children: selectedOptions.length === 0 ? /* @__PURE__ */ jsx31("span", { className: "text-muted-foreground", children: placeholder }) : /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
3325
|
+
displayedOptions.map((option) => /* @__PURE__ */ jsxs16(
|
|
3147
3326
|
"span",
|
|
3148
3327
|
{
|
|
3149
3328
|
className: "inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs font-medium",
|
|
3150
3329
|
children: [
|
|
3151
3330
|
getOptionLabel(option),
|
|
3152
|
-
/* @__PURE__ */
|
|
3331
|
+
/* @__PURE__ */ jsx31(
|
|
3153
3332
|
"button",
|
|
3154
3333
|
{
|
|
3155
3334
|
type: "button",
|
|
3156
3335
|
onClick: (e) => handleRemoveItem(getOptionValue(option), e),
|
|
3157
3336
|
className: "ml-1 rounded-full hover:bg-background/50",
|
|
3158
|
-
children: /* @__PURE__ */
|
|
3337
|
+
children: /* @__PURE__ */ jsx31(
|
|
3159
3338
|
"svg",
|
|
3160
3339
|
{
|
|
3161
3340
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3167,7 +3346,7 @@ var Combobox = React30.forwardRef(
|
|
|
3167
3346
|
strokeWidth: "2",
|
|
3168
3347
|
strokeLinecap: "round",
|
|
3169
3348
|
strokeLinejoin: "round",
|
|
3170
|
-
children: /* @__PURE__ */
|
|
3349
|
+
children: /* @__PURE__ */ jsx31("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
3171
3350
|
}
|
|
3172
3351
|
)
|
|
3173
3352
|
}
|
|
@@ -3176,20 +3355,20 @@ var Combobox = React30.forwardRef(
|
|
|
3176
3355
|
},
|
|
3177
3356
|
getOptionValue(option)
|
|
3178
3357
|
)),
|
|
3179
|
-
remainingCount > 0 && /* @__PURE__ */
|
|
3358
|
+
remainingCount > 0 && /* @__PURE__ */ jsxs16("span", { className: "text-xs text-muted-foreground", children: [
|
|
3180
3359
|
"+",
|
|
3181
3360
|
remainingCount,
|
|
3182
3361
|
" more"
|
|
3183
3362
|
] })
|
|
3184
|
-
] }) }) : /* @__PURE__ */
|
|
3185
|
-
/* @__PURE__ */
|
|
3186
|
-
isMultiple && selectedOptions.length > 0 && /* @__PURE__ */
|
|
3363
|
+
] }) }) : /* @__PURE__ */ jsx31("span", { className: cn(!singleValue && "text-muted-foreground"), children: singleValue ? getOptionLabel(singleValue) : placeholder }),
|
|
3364
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1", children: [
|
|
3365
|
+
isMultiple && selectedOptions.length > 0 && /* @__PURE__ */ jsx31(
|
|
3187
3366
|
"button",
|
|
3188
3367
|
{
|
|
3189
3368
|
type: "button",
|
|
3190
3369
|
onClick: handleClearAll,
|
|
3191
3370
|
className: "rounded p-0.5 hover:bg-muted",
|
|
3192
|
-
children: /* @__PURE__ */
|
|
3371
|
+
children: /* @__PURE__ */ jsx31(
|
|
3193
3372
|
"svg",
|
|
3194
3373
|
{
|
|
3195
3374
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3202,19 +3381,19 @@ var Combobox = React30.forwardRef(
|
|
|
3202
3381
|
strokeLinecap: "round",
|
|
3203
3382
|
strokeLinejoin: "round",
|
|
3204
3383
|
className: "opacity-50 hover:opacity-100",
|
|
3205
|
-
children: /* @__PURE__ */
|
|
3384
|
+
children: /* @__PURE__ */ jsx31("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
3206
3385
|
}
|
|
3207
3386
|
)
|
|
3208
3387
|
}
|
|
3209
3388
|
),
|
|
3210
|
-
!isMultiple && clearable && singleValue && /* @__PURE__ */
|
|
3389
|
+
!isMultiple && clearable && singleValue && /* @__PURE__ */ jsx31(
|
|
3211
3390
|
"button",
|
|
3212
3391
|
{
|
|
3213
3392
|
type: "button",
|
|
3214
3393
|
onClick: handleClearSingle,
|
|
3215
3394
|
className: "rounded p-0.5 hover:bg-muted",
|
|
3216
3395
|
"aria-label": "Clear selection",
|
|
3217
|
-
children: /* @__PURE__ */
|
|
3396
|
+
children: /* @__PURE__ */ jsx31(
|
|
3218
3397
|
"svg",
|
|
3219
3398
|
{
|
|
3220
3399
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3227,12 +3406,12 @@ var Combobox = React30.forwardRef(
|
|
|
3227
3406
|
strokeLinecap: "round",
|
|
3228
3407
|
strokeLinejoin: "round",
|
|
3229
3408
|
className: "opacity-50 hover:opacity-100",
|
|
3230
|
-
children: /* @__PURE__ */
|
|
3409
|
+
children: /* @__PURE__ */ jsx31("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
3231
3410
|
}
|
|
3232
3411
|
)
|
|
3233
3412
|
}
|
|
3234
3413
|
),
|
|
3235
|
-
/* @__PURE__ */
|
|
3414
|
+
/* @__PURE__ */ jsx31(
|
|
3236
3415
|
"svg",
|
|
3237
3416
|
{
|
|
3238
3417
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3248,16 +3427,16 @@ var Combobox = React30.forwardRef(
|
|
|
3248
3427
|
"h-4 w-4 shrink-0 opacity-50 transition-transform",
|
|
3249
3428
|
open && "rotate-180"
|
|
3250
3429
|
),
|
|
3251
|
-
children: /* @__PURE__ */
|
|
3430
|
+
children: /* @__PURE__ */ jsx31("path", { d: "m6 9 6 6 6-6" })
|
|
3252
3431
|
}
|
|
3253
3432
|
)
|
|
3254
3433
|
] })
|
|
3255
3434
|
]
|
|
3256
3435
|
}
|
|
3257
3436
|
),
|
|
3258
|
-
open && /* @__PURE__ */
|
|
3259
|
-
/* @__PURE__ */
|
|
3260
|
-
/* @__PURE__ */
|
|
3437
|
+
open && /* @__PURE__ */ jsxs16("div", { className: "absolute z-50 mt-1 w-full overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md", children: [
|
|
3438
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center border-b border-border px-3", children: [
|
|
3439
|
+
/* @__PURE__ */ jsxs16(
|
|
3261
3440
|
"svg",
|
|
3262
3441
|
{
|
|
3263
3442
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3271,12 +3450,12 @@ var Combobox = React30.forwardRef(
|
|
|
3271
3450
|
strokeLinejoin: "round",
|
|
3272
3451
|
className: "mr-2 h-4 w-4 shrink-0 opacity-50",
|
|
3273
3452
|
children: [
|
|
3274
|
-
/* @__PURE__ */
|
|
3275
|
-
/* @__PURE__ */
|
|
3453
|
+
/* @__PURE__ */ jsx31("circle", { cx: "11", cy: "11", r: "8" }),
|
|
3454
|
+
/* @__PURE__ */ jsx31("path", { d: "m21 21-4.3-4.3" })
|
|
3276
3455
|
]
|
|
3277
3456
|
}
|
|
3278
3457
|
),
|
|
3279
|
-
/* @__PURE__ */
|
|
3458
|
+
/* @__PURE__ */ jsx31(
|
|
3280
3459
|
"input",
|
|
3281
3460
|
{
|
|
3282
3461
|
ref: setSearchRef,
|
|
@@ -3295,8 +3474,8 @@ var Combobox = React30.forwardRef(
|
|
|
3295
3474
|
}
|
|
3296
3475
|
)
|
|
3297
3476
|
] }),
|
|
3298
|
-
/* @__PURE__ */
|
|
3299
|
-
isMultiple && selectAll && /* @__PURE__ */
|
|
3477
|
+
/* @__PURE__ */ jsx31("div", { className: "max-h-[300px] overflow-y-auto p-1", children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx31("div", { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }) : /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
3478
|
+
isMultiple && selectAll && /* @__PURE__ */ jsxs16(
|
|
3300
3479
|
"button",
|
|
3301
3480
|
{
|
|
3302
3481
|
type: "button",
|
|
@@ -3308,14 +3487,14 @@ var Combobox = React30.forwardRef(
|
|
|
3308
3487
|
allSelected && "bg-muted"
|
|
3309
3488
|
),
|
|
3310
3489
|
children: [
|
|
3311
|
-
/* @__PURE__ */
|
|
3490
|
+
/* @__PURE__ */ jsx31("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx31(
|
|
3312
3491
|
"div",
|
|
3313
3492
|
{
|
|
3314
3493
|
className: cn(
|
|
3315
3494
|
"flex h-4 w-4 items-center justify-center rounded border border-input",
|
|
3316
3495
|
allSelected && "bg-accent border-accent"
|
|
3317
3496
|
),
|
|
3318
|
-
children: allSelected && /* @__PURE__ */
|
|
3497
|
+
children: allSelected && /* @__PURE__ */ jsx31(
|
|
3319
3498
|
"svg",
|
|
3320
3499
|
{
|
|
3321
3500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3328,7 +3507,7 @@ var Combobox = React30.forwardRef(
|
|
|
3328
3507
|
strokeLinecap: "round",
|
|
3329
3508
|
strokeLinejoin: "round",
|
|
3330
3509
|
className: "h-3 w-3",
|
|
3331
|
-
children: /* @__PURE__ */
|
|
3510
|
+
children: /* @__PURE__ */ jsx31("polyline", { points: "20 6 9 17 4 12" })
|
|
3332
3511
|
}
|
|
3333
3512
|
)
|
|
3334
3513
|
}
|
|
@@ -3339,7 +3518,7 @@ var Combobox = React30.forwardRef(
|
|
|
3339
3518
|
),
|
|
3340
3519
|
filteredOptions.map((option) => {
|
|
3341
3520
|
const isSelected = isMultiple ? selectedValueKeys.has(option.value) : option.value === singleValueKey;
|
|
3342
|
-
return /* @__PURE__ */
|
|
3521
|
+
return /* @__PURE__ */ jsxs16(
|
|
3343
3522
|
"button",
|
|
3344
3523
|
{
|
|
3345
3524
|
type: "button",
|
|
@@ -3353,16 +3532,16 @@ var Combobox = React30.forwardRef(
|
|
|
3353
3532
|
isSelected && "bg-muted"
|
|
3354
3533
|
),
|
|
3355
3534
|
children: [
|
|
3356
|
-
/* @__PURE__ */
|
|
3535
|
+
/* @__PURE__ */ jsx31("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: isMultiple ? (
|
|
3357
3536
|
// Checkbox for multi-select
|
|
3358
|
-
/* @__PURE__ */
|
|
3537
|
+
/* @__PURE__ */ jsx31(
|
|
3359
3538
|
"div",
|
|
3360
3539
|
{
|
|
3361
3540
|
className: cn(
|
|
3362
3541
|
"flex h-4 w-4 items-center justify-center rounded border border-input",
|
|
3363
3542
|
isSelected && "bg-accent border-accent"
|
|
3364
3543
|
),
|
|
3365
|
-
children: isSelected && /* @__PURE__ */
|
|
3544
|
+
children: isSelected && /* @__PURE__ */ jsx31(
|
|
3366
3545
|
"svg",
|
|
3367
3546
|
{
|
|
3368
3547
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3375,14 +3554,14 @@ var Combobox = React30.forwardRef(
|
|
|
3375
3554
|
strokeLinecap: "round",
|
|
3376
3555
|
strokeLinejoin: "round",
|
|
3377
3556
|
className: "h-3 w-3",
|
|
3378
|
-
children: /* @__PURE__ */
|
|
3557
|
+
children: /* @__PURE__ */ jsx31("polyline", { points: "20 6 9 17 4 12" })
|
|
3379
3558
|
}
|
|
3380
3559
|
)
|
|
3381
3560
|
}
|
|
3382
3561
|
)
|
|
3383
3562
|
) : (
|
|
3384
3563
|
// Checkmark for single-select
|
|
3385
|
-
isSelected && /* @__PURE__ */
|
|
3564
|
+
isSelected && /* @__PURE__ */ jsx31(
|
|
3386
3565
|
"svg",
|
|
3387
3566
|
{
|
|
3388
3567
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3395,7 +3574,7 @@ var Combobox = React30.forwardRef(
|
|
|
3395
3574
|
strokeLinecap: "round",
|
|
3396
3575
|
strokeLinejoin: "round",
|
|
3397
3576
|
className: "h-4 w-4",
|
|
3398
|
-
children: /* @__PURE__ */
|
|
3577
|
+
children: /* @__PURE__ */ jsx31("polyline", { points: "20 6 9 17 4 12" })
|
|
3399
3578
|
}
|
|
3400
3579
|
)
|
|
3401
3580
|
) }),
|
|
@@ -3413,7 +3592,7 @@ var Combobox = React30.forwardRef(
|
|
|
3413
3592
|
Combobox.displayName = "Combobox";
|
|
3414
3593
|
|
|
3415
3594
|
// src/components/data-grid/index.tsx
|
|
3416
|
-
import * as
|
|
3595
|
+
import * as React32 from "react";
|
|
3417
3596
|
import {
|
|
3418
3597
|
useReactTable,
|
|
3419
3598
|
getCoreRowModel,
|
|
@@ -3423,13 +3602,13 @@ import {
|
|
|
3423
3602
|
flexRender
|
|
3424
3603
|
} from "@tanstack/react-table";
|
|
3425
3604
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
3426
|
-
import { jsx as
|
|
3605
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3427
3606
|
function convertColumns(columns, checkboxSelection) {
|
|
3428
3607
|
const tanstackColumns = [];
|
|
3429
3608
|
if (checkboxSelection) {
|
|
3430
3609
|
tanstackColumns.push({
|
|
3431
3610
|
id: "__select__",
|
|
3432
|
-
header: ({ table }) => /* @__PURE__ */
|
|
3611
|
+
header: ({ table }) => /* @__PURE__ */ jsx32("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx32(
|
|
3433
3612
|
Checkbox,
|
|
3434
3613
|
{
|
|
3435
3614
|
checked: table.getIsAllPageRowsSelected(),
|
|
@@ -3437,7 +3616,7 @@ function convertColumns(columns, checkboxSelection) {
|
|
|
3437
3616
|
"aria-label": "Select all"
|
|
3438
3617
|
}
|
|
3439
3618
|
) }),
|
|
3440
|
-
cell: ({ row }) => /* @__PURE__ */
|
|
3619
|
+
cell: ({ row }) => /* @__PURE__ */ jsx32("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx32(
|
|
3441
3620
|
Checkbox,
|
|
3442
3621
|
{
|
|
3443
3622
|
checked: row.getIsSelected(),
|
|
@@ -3559,7 +3738,7 @@ function calculateInitialColumnWidths(columns, containerWidth, checkboxSelection
|
|
|
3559
3738
|
return widthMap;
|
|
3560
3739
|
}
|
|
3561
3740
|
function useColumnWidths(columns, containerWidth, checkboxSelection, columnSizing) {
|
|
3562
|
-
return
|
|
3741
|
+
return React32.useMemo(
|
|
3563
3742
|
() => calculateInitialColumnWidths(columns, containerWidth, checkboxSelection, columnSizing),
|
|
3564
3743
|
[columns, containerWidth, checkboxSelection, columnSizing]
|
|
3565
3744
|
);
|
|
@@ -3568,7 +3747,7 @@ var ColumnResizeHandle = ({
|
|
|
3568
3747
|
header,
|
|
3569
3748
|
isResizing
|
|
3570
3749
|
}) => {
|
|
3571
|
-
return /* @__PURE__ */
|
|
3750
|
+
return /* @__PURE__ */ jsx32(
|
|
3572
3751
|
"div",
|
|
3573
3752
|
{
|
|
3574
3753
|
className: cn(
|
|
@@ -3587,16 +3766,16 @@ var ColumnResizeHandle = ({
|
|
|
3587
3766
|
};
|
|
3588
3767
|
var SortIcon = ({ direction }) => {
|
|
3589
3768
|
if (!direction) {
|
|
3590
|
-
return /* @__PURE__ */
|
|
3769
|
+
return /* @__PURE__ */ jsx32("svg", { className: "ml-1 h-4 w-4 text-muted-foreground/50", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx32("path", { d: "M7 15l5 5 5-5M7 9l5-5 5 5" }) });
|
|
3591
3770
|
}
|
|
3592
|
-
return /* @__PURE__ */
|
|
3771
|
+
return /* @__PURE__ */ jsx32("svg", { className: "ml-1 h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: direction === "asc" ? /* @__PURE__ */ jsx32("path", { d: "M7 14l5-5 5 5" }) : /* @__PURE__ */ jsx32("path", { d: "M7 10l5 5 5-5" }) });
|
|
3593
3772
|
};
|
|
3594
3773
|
var ColumnVisibilityDropdown = ({
|
|
3595
3774
|
table
|
|
3596
3775
|
}) => {
|
|
3597
|
-
const [open, setOpen] =
|
|
3598
|
-
const dropdownRef =
|
|
3599
|
-
|
|
3776
|
+
const [open, setOpen] = React32.useState(false);
|
|
3777
|
+
const dropdownRef = React32.useRef(null);
|
|
3778
|
+
React32.useEffect(() => {
|
|
3600
3779
|
const handleClickOutside = (event) => {
|
|
3601
3780
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
3602
3781
|
setOpen(false);
|
|
@@ -3606,8 +3785,8 @@ var ColumnVisibilityDropdown = ({
|
|
|
3606
3785
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3607
3786
|
}, []);
|
|
3608
3787
|
const allColumns = table.getAllLeafColumns().filter((col) => col.id !== "__select__");
|
|
3609
|
-
return /* @__PURE__ */
|
|
3610
|
-
/* @__PURE__ */
|
|
3788
|
+
return /* @__PURE__ */ jsxs17("div", { className: "relative", ref: dropdownRef, children: [
|
|
3789
|
+
/* @__PURE__ */ jsxs17(
|
|
3611
3790
|
Button,
|
|
3612
3791
|
{
|
|
3613
3792
|
variant: "outline",
|
|
@@ -3615,40 +3794,40 @@ var ColumnVisibilityDropdown = ({
|
|
|
3615
3794
|
onClick: () => setOpen(!open),
|
|
3616
3795
|
className: "h-9 gap-2",
|
|
3617
3796
|
children: [
|
|
3618
|
-
/* @__PURE__ */
|
|
3619
|
-
/* @__PURE__ */
|
|
3620
|
-
/* @__PURE__ */
|
|
3621
|
-
/* @__PURE__ */
|
|
3797
|
+
/* @__PURE__ */ jsxs17("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
3798
|
+
/* @__PURE__ */ jsx32("path", { d: "M12 3v18M3 12h18" }),
|
|
3799
|
+
/* @__PURE__ */ jsx32("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
3800
|
+
/* @__PURE__ */ jsx32("path", { d: "M3 9h18M3 15h18M9 3v18M15 3v18" })
|
|
3622
3801
|
] }),
|
|
3623
3802
|
"Columns"
|
|
3624
3803
|
]
|
|
3625
3804
|
}
|
|
3626
3805
|
),
|
|
3627
|
-
open && /* @__PURE__ */
|
|
3628
|
-
/* @__PURE__ */
|
|
3629
|
-
/* @__PURE__ */
|
|
3806
|
+
open && /* @__PURE__ */ jsxs17("div", { className: "absolute right-0 top-full mt-1 z-50 min-w-[180px] rounded-md border border-border bg-popover p-2 shadow-md", children: [
|
|
3807
|
+
/* @__PURE__ */ jsx32("div", { className: "text-sm font-medium text-foreground mb-2 px-2", children: "Show/Hide Columns" }),
|
|
3808
|
+
/* @__PURE__ */ jsx32("div", { className: "max-h-[300px] overflow-auto", children: allColumns.map((column) => {
|
|
3630
3809
|
const meta = column.columnDef.meta;
|
|
3631
3810
|
const headerName = meta?.headerName || column.id;
|
|
3632
|
-
return /* @__PURE__ */
|
|
3811
|
+
return /* @__PURE__ */ jsxs17(
|
|
3633
3812
|
"label",
|
|
3634
3813
|
{
|
|
3635
3814
|
className: "flex items-center gap-2 px-2 py-1.5 hover:bg-muted rounded cursor-pointer",
|
|
3636
3815
|
children: [
|
|
3637
|
-
/* @__PURE__ */
|
|
3816
|
+
/* @__PURE__ */ jsx32(
|
|
3638
3817
|
Checkbox,
|
|
3639
3818
|
{
|
|
3640
3819
|
checked: column.getIsVisible(),
|
|
3641
3820
|
onChange: (e) => column.toggleVisibility(e.target.checked)
|
|
3642
3821
|
}
|
|
3643
3822
|
),
|
|
3644
|
-
/* @__PURE__ */
|
|
3823
|
+
/* @__PURE__ */ jsx32("span", { className: "text-sm", children: headerName })
|
|
3645
3824
|
]
|
|
3646
3825
|
},
|
|
3647
3826
|
column.id
|
|
3648
3827
|
);
|
|
3649
3828
|
}) }),
|
|
3650
|
-
/* @__PURE__ */
|
|
3651
|
-
/* @__PURE__ */
|
|
3829
|
+
/* @__PURE__ */ jsxs17("div", { className: "border-t border-border mt-2 pt-2 flex gap-2 px-2", children: [
|
|
3830
|
+
/* @__PURE__ */ jsx32(
|
|
3652
3831
|
Button,
|
|
3653
3832
|
{
|
|
3654
3833
|
variant: "ghost",
|
|
@@ -3658,7 +3837,7 @@ var ColumnVisibilityDropdown = ({
|
|
|
3658
3837
|
children: "Show All"
|
|
3659
3838
|
}
|
|
3660
3839
|
),
|
|
3661
|
-
/* @__PURE__ */
|
|
3840
|
+
/* @__PURE__ */ jsx32(
|
|
3662
3841
|
Button,
|
|
3663
3842
|
{
|
|
3664
3843
|
variant: "ghost",
|
|
@@ -3708,28 +3887,28 @@ var DataGridPagination = ({
|
|
|
3708
3887
|
};
|
|
3709
3888
|
const startRow = currentPage * pageSize + 1;
|
|
3710
3889
|
const endRow = Math.min((currentPage + 1) * pageSize, totalRows);
|
|
3711
|
-
return /* @__PURE__ */
|
|
3712
|
-
/* @__PURE__ */
|
|
3713
|
-
/* @__PURE__ */
|
|
3714
|
-
/* @__PURE__ */
|
|
3890
|
+
return /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-end gap-4 px-4 py-3 border-t border-border bg-background", children: [
|
|
3891
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
3892
|
+
/* @__PURE__ */ jsx32("span", { children: "Rows per page:" }),
|
|
3893
|
+
/* @__PURE__ */ jsx32(
|
|
3715
3894
|
"select",
|
|
3716
3895
|
{
|
|
3717
3896
|
value: pageSize,
|
|
3718
3897
|
onChange: (e) => table.setPageSize(Number(e.target.value)),
|
|
3719
3898
|
className: "h-8 rounded-md border border-border bg-background px-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
|
|
3720
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */
|
|
3899
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx32("option", { value: size, children: size }, size))
|
|
3721
3900
|
}
|
|
3722
3901
|
)
|
|
3723
3902
|
] }),
|
|
3724
|
-
/* @__PURE__ */
|
|
3903
|
+
/* @__PURE__ */ jsxs17("span", { className: "text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
3725
3904
|
startRow,
|
|
3726
3905
|
"-",
|
|
3727
3906
|
endRow,
|
|
3728
3907
|
" of ",
|
|
3729
3908
|
totalRows
|
|
3730
3909
|
] }),
|
|
3731
|
-
/* @__PURE__ */
|
|
3732
|
-
/* @__PURE__ */
|
|
3910
|
+
/* @__PURE__ */ jsx32(PaginationNamespace, { className: "mx-0 w-auto", children: /* @__PURE__ */ jsxs17(PaginationContent, { children: [
|
|
3911
|
+
/* @__PURE__ */ jsx32(PaginationItem, { children: /* @__PURE__ */ jsx32(
|
|
3733
3912
|
Button,
|
|
3734
3913
|
{
|
|
3735
3914
|
variant: "outline",
|
|
@@ -3737,10 +3916,10 @@ var DataGridPagination = ({
|
|
|
3737
3916
|
className: "h-8 w-8",
|
|
3738
3917
|
onClick: () => table.setPageIndex(0),
|
|
3739
3918
|
disabled: !table.getCanPreviousPage(),
|
|
3740
|
-
children: /* @__PURE__ */
|
|
3919
|
+
children: /* @__PURE__ */ jsx32("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx32("path", { d: "M11 17l-5-5 5-5M18 17l-5-5 5-5" }) })
|
|
3741
3920
|
}
|
|
3742
3921
|
) }),
|
|
3743
|
-
/* @__PURE__ */
|
|
3922
|
+
/* @__PURE__ */ jsx32(PaginationItem, { children: /* @__PURE__ */ jsx32(
|
|
3744
3923
|
Button,
|
|
3745
3924
|
{
|
|
3746
3925
|
variant: "outline",
|
|
@@ -3748,11 +3927,11 @@ var DataGridPagination = ({
|
|
|
3748
3927
|
className: "h-8 w-8",
|
|
3749
3928
|
onClick: () => table.previousPage(),
|
|
3750
3929
|
disabled: !table.getCanPreviousPage(),
|
|
3751
|
-
children: /* @__PURE__ */
|
|
3930
|
+
children: /* @__PURE__ */ jsx32("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx32("path", { d: "M15 18l-6-6 6-6" }) })
|
|
3752
3931
|
}
|
|
3753
3932
|
) }),
|
|
3754
3933
|
getPageNumbers().map(
|
|
3755
|
-
(page, idx) => page === "ellipsis" ? /* @__PURE__ */
|
|
3934
|
+
(page, idx) => page === "ellipsis" ? /* @__PURE__ */ jsx32(PaginationItem, { children: /* @__PURE__ */ jsx32(PaginationEllipsis, {}) }, `ellipsis-${idx}`) : /* @__PURE__ */ jsx32(PaginationItem, { children: /* @__PURE__ */ jsx32(
|
|
3756
3935
|
PaginationLink,
|
|
3757
3936
|
{
|
|
3758
3937
|
isActive: page === currentPage,
|
|
@@ -3761,7 +3940,7 @@ var DataGridPagination = ({
|
|
|
3761
3940
|
}
|
|
3762
3941
|
) }, page)
|
|
3763
3942
|
),
|
|
3764
|
-
/* @__PURE__ */
|
|
3943
|
+
/* @__PURE__ */ jsx32(PaginationItem, { children: /* @__PURE__ */ jsx32(
|
|
3765
3944
|
Button,
|
|
3766
3945
|
{
|
|
3767
3946
|
variant: "outline",
|
|
@@ -3769,10 +3948,10 @@ var DataGridPagination = ({
|
|
|
3769
3948
|
className: "h-8 w-8",
|
|
3770
3949
|
onClick: () => table.nextPage(),
|
|
3771
3950
|
disabled: !table.getCanNextPage(),
|
|
3772
|
-
children: /* @__PURE__ */
|
|
3951
|
+
children: /* @__PURE__ */ jsx32("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx32("path", { d: "M9 18l6-6-6-6" }) })
|
|
3773
3952
|
}
|
|
3774
3953
|
) }),
|
|
3775
|
-
/* @__PURE__ */
|
|
3954
|
+
/* @__PURE__ */ jsx32(PaginationItem, { children: /* @__PURE__ */ jsx32(
|
|
3776
3955
|
Button,
|
|
3777
3956
|
{
|
|
3778
3957
|
variant: "outline",
|
|
@@ -3780,7 +3959,7 @@ var DataGridPagination = ({
|
|
|
3780
3959
|
className: "h-8 w-8",
|
|
3781
3960
|
onClick: () => table.setPageIndex(pageCount - 1),
|
|
3782
3961
|
disabled: !table.getCanNextPage(),
|
|
3783
|
-
children: /* @__PURE__ */
|
|
3962
|
+
children: /* @__PURE__ */ jsx32("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx32("path", { d: "M13 17l5-5-5-5M6 17l5-5-5-5" }) })
|
|
3784
3963
|
}
|
|
3785
3964
|
) })
|
|
3786
3965
|
] }) })
|
|
@@ -3792,9 +3971,9 @@ var ExportDropdown = ({
|
|
|
3792
3971
|
columns,
|
|
3793
3972
|
fileName = "data-export"
|
|
3794
3973
|
}) => {
|
|
3795
|
-
const [open, setOpen] =
|
|
3796
|
-
const dropdownRef =
|
|
3797
|
-
|
|
3974
|
+
const [open, setOpen] = React32.useState(false);
|
|
3975
|
+
const dropdownRef = React32.useRef(null);
|
|
3976
|
+
React32.useEffect(() => {
|
|
3798
3977
|
const handleClickOutside = (event) => {
|
|
3799
3978
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
3800
3979
|
setOpen(false);
|
|
@@ -3851,8 +4030,8 @@ var ExportDropdown = ({
|
|
|
3851
4030
|
}
|
|
3852
4031
|
setOpen(false);
|
|
3853
4032
|
};
|
|
3854
|
-
return /* @__PURE__ */
|
|
3855
|
-
/* @__PURE__ */
|
|
4033
|
+
return /* @__PURE__ */ jsxs17("div", { className: "relative", ref: dropdownRef, children: [
|
|
4034
|
+
/* @__PURE__ */ jsxs17(
|
|
3856
4035
|
Button,
|
|
3857
4036
|
{
|
|
3858
4037
|
variant: "outline",
|
|
@@ -3860,53 +4039,53 @@ var ExportDropdown = ({
|
|
|
3860
4039
|
onClick: () => setOpen(!open),
|
|
3861
4040
|
className: "h-9 gap-2",
|
|
3862
4041
|
children: [
|
|
3863
|
-
/* @__PURE__ */
|
|
3864
|
-
/* @__PURE__ */
|
|
3865
|
-
/* @__PURE__ */
|
|
3866
|
-
/* @__PURE__ */
|
|
4042
|
+
/* @__PURE__ */ jsxs17("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4043
|
+
/* @__PURE__ */ jsx32("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
4044
|
+
/* @__PURE__ */ jsx32("polyline", { points: "7 10 12 15 17 10" }),
|
|
4045
|
+
/* @__PURE__ */ jsx32("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
|
|
3867
4046
|
] }),
|
|
3868
4047
|
"Export"
|
|
3869
4048
|
]
|
|
3870
4049
|
}
|
|
3871
4050
|
),
|
|
3872
|
-
open && /* @__PURE__ */
|
|
3873
|
-
/* @__PURE__ */
|
|
4051
|
+
open && /* @__PURE__ */ jsxs17("div", { className: "absolute right-0 top-full mt-1 z-50 min-w-[140px] rounded-md border border-border bg-popover p-1 shadow-md", children: [
|
|
4052
|
+
/* @__PURE__ */ jsxs17(
|
|
3874
4053
|
"button",
|
|
3875
4054
|
{
|
|
3876
4055
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
3877
4056
|
onClick: exportToCSV,
|
|
3878
4057
|
children: [
|
|
3879
|
-
/* @__PURE__ */
|
|
3880
|
-
/* @__PURE__ */
|
|
3881
|
-
/* @__PURE__ */
|
|
4058
|
+
/* @__PURE__ */ jsxs17("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4059
|
+
/* @__PURE__ */ jsx32("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
4060
|
+
/* @__PURE__ */ jsx32("polyline", { points: "14 2 14 8 20 8" })
|
|
3882
4061
|
] }),
|
|
3883
4062
|
"Export CSV"
|
|
3884
4063
|
]
|
|
3885
4064
|
}
|
|
3886
4065
|
),
|
|
3887
|
-
/* @__PURE__ */
|
|
4066
|
+
/* @__PURE__ */ jsxs17(
|
|
3888
4067
|
"button",
|
|
3889
4068
|
{
|
|
3890
4069
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
3891
4070
|
onClick: exportToJSON,
|
|
3892
4071
|
children: [
|
|
3893
|
-
/* @__PURE__ */
|
|
3894
|
-
/* @__PURE__ */
|
|
3895
|
-
/* @__PURE__ */
|
|
4072
|
+
/* @__PURE__ */ jsxs17("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4073
|
+
/* @__PURE__ */ jsx32("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
4074
|
+
/* @__PURE__ */ jsx32("polyline", { points: "14 2 14 8 20 8" })
|
|
3896
4075
|
] }),
|
|
3897
4076
|
"Export JSON"
|
|
3898
4077
|
]
|
|
3899
4078
|
}
|
|
3900
4079
|
),
|
|
3901
|
-
onExport && /* @__PURE__ */
|
|
4080
|
+
onExport && /* @__PURE__ */ jsxs17(
|
|
3902
4081
|
"button",
|
|
3903
4082
|
{
|
|
3904
4083
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
3905
4084
|
onClick: handleCustomExport,
|
|
3906
4085
|
children: [
|
|
3907
|
-
/* @__PURE__ */
|
|
3908
|
-
/* @__PURE__ */
|
|
3909
|
-
/* @__PURE__ */
|
|
4086
|
+
/* @__PURE__ */ jsxs17("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4087
|
+
/* @__PURE__ */ jsx32("circle", { cx: "12", cy: "12", r: "3" }),
|
|
4088
|
+
/* @__PURE__ */ jsx32("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
3910
4089
|
] }),
|
|
3911
4090
|
"Custom Export"
|
|
3912
4091
|
]
|
|
@@ -3918,9 +4097,9 @@ var ExportDropdown = ({
|
|
|
3918
4097
|
var MoreOptionsDropdown = ({
|
|
3919
4098
|
options
|
|
3920
4099
|
}) => {
|
|
3921
|
-
const [open, setOpen] =
|
|
3922
|
-
const dropdownRef =
|
|
3923
|
-
|
|
4100
|
+
const [open, setOpen] = React32.useState(false);
|
|
4101
|
+
const dropdownRef = React32.useRef(null);
|
|
4102
|
+
React32.useEffect(() => {
|
|
3924
4103
|
const handleClickOutside = (event) => {
|
|
3925
4104
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
3926
4105
|
setOpen(false);
|
|
@@ -3930,22 +4109,22 @@ var MoreOptionsDropdown = ({
|
|
|
3930
4109
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3931
4110
|
}, []);
|
|
3932
4111
|
if (options.length === 0) return null;
|
|
3933
|
-
return /* @__PURE__ */
|
|
3934
|
-
/* @__PURE__ */
|
|
4112
|
+
return /* @__PURE__ */ jsxs17("div", { className: "relative", ref: dropdownRef, children: [
|
|
4113
|
+
/* @__PURE__ */ jsx32(
|
|
3935
4114
|
Button,
|
|
3936
4115
|
{
|
|
3937
4116
|
variant: "outline",
|
|
3938
4117
|
size: "icon",
|
|
3939
4118
|
onClick: () => setOpen(!open),
|
|
3940
4119
|
className: "h-9 w-9",
|
|
3941
|
-
children: /* @__PURE__ */
|
|
3942
|
-
/* @__PURE__ */
|
|
3943
|
-
/* @__PURE__ */
|
|
3944
|
-
/* @__PURE__ */
|
|
4120
|
+
children: /* @__PURE__ */ jsxs17("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4121
|
+
/* @__PURE__ */ jsx32("circle", { cx: "12", cy: "12", r: "1" }),
|
|
4122
|
+
/* @__PURE__ */ jsx32("circle", { cx: "12", cy: "5", r: "1" }),
|
|
4123
|
+
/* @__PURE__ */ jsx32("circle", { cx: "12", cy: "19", r: "1" })
|
|
3945
4124
|
] })
|
|
3946
4125
|
}
|
|
3947
4126
|
),
|
|
3948
|
-
open && /* @__PURE__ */
|
|
4127
|
+
open && /* @__PURE__ */ jsx32("div", { className: "absolute right-0 top-full mt-1 z-50 min-w-[160px] rounded-md border border-border bg-popover p-1 shadow-md", children: options.map((option, index) => /* @__PURE__ */ jsxs17(
|
|
3949
4128
|
"button",
|
|
3950
4129
|
{
|
|
3951
4130
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
@@ -3977,10 +4156,10 @@ var DataGridToolbar = ({
|
|
|
3977
4156
|
customButtons,
|
|
3978
4157
|
moreOptions = []
|
|
3979
4158
|
}) => {
|
|
3980
|
-
return /* @__PURE__ */
|
|
3981
|
-
title && /* @__PURE__ */
|
|
3982
|
-
/* @__PURE__ */
|
|
3983
|
-
showQuickFilter && /* @__PURE__ */
|
|
4159
|
+
return /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between px-4 py-3 border-b border-border bg-background", children: [
|
|
4160
|
+
title && /* @__PURE__ */ jsx32("h3", { className: "text-lg font-semibold text-foreground", children: title }),
|
|
4161
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
4162
|
+
showQuickFilter && /* @__PURE__ */ jsx32(
|
|
3984
4163
|
Input,
|
|
3985
4164
|
{
|
|
3986
4165
|
placeholder: "Search...",
|
|
@@ -3989,8 +4168,8 @@ var DataGridToolbar = ({
|
|
|
3989
4168
|
className: "h-9 w-64"
|
|
3990
4169
|
}
|
|
3991
4170
|
),
|
|
3992
|
-
showColumnSelector && /* @__PURE__ */
|
|
3993
|
-
showExport && /* @__PURE__ */
|
|
4171
|
+
showColumnSelector && /* @__PURE__ */ jsx32(ColumnVisibilityDropdown, { table }),
|
|
4172
|
+
showExport && /* @__PURE__ */ jsx32(
|
|
3994
4173
|
ExportDropdown,
|
|
3995
4174
|
{
|
|
3996
4175
|
onExport,
|
|
@@ -4000,7 +4179,7 @@ var DataGridToolbar = ({
|
|
|
4000
4179
|
}
|
|
4001
4180
|
),
|
|
4002
4181
|
customButtons,
|
|
4003
|
-
moreOptions.length > 0 && /* @__PURE__ */
|
|
4182
|
+
moreOptions.length > 0 && /* @__PURE__ */ jsx32(MoreOptionsDropdown, { options: moreOptions })
|
|
4004
4183
|
] })
|
|
4005
4184
|
] });
|
|
4006
4185
|
};
|
|
@@ -4017,7 +4196,7 @@ var RowRenderer = ({
|
|
|
4017
4196
|
columnWidths
|
|
4018
4197
|
}) => {
|
|
4019
4198
|
const customClassName = getRowClassName?.({ row: row.original, rowIndex });
|
|
4020
|
-
return /* @__PURE__ */
|
|
4199
|
+
return /* @__PURE__ */ jsx32(
|
|
4021
4200
|
"tr",
|
|
4022
4201
|
{
|
|
4023
4202
|
className: cn(
|
|
@@ -4039,7 +4218,7 @@ var RowRenderer = ({
|
|
|
4039
4218
|
const cellClassName = meta?.cellClassName;
|
|
4040
4219
|
const colWidth = columnWidths.get(cell.column.id);
|
|
4041
4220
|
const width = colWidth?.width || cell.column.getSize();
|
|
4042
|
-
return /* @__PURE__ */
|
|
4221
|
+
return /* @__PURE__ */ jsx32(
|
|
4043
4222
|
"td",
|
|
4044
4223
|
{
|
|
4045
4224
|
className: cn(
|
|
@@ -4054,7 +4233,7 @@ var RowRenderer = ({
|
|
|
4054
4233
|
maxWidth: colWidth?.maxWidth || width,
|
|
4055
4234
|
minWidth: colWidth?.minWidth || cell.column.columnDef.minSize
|
|
4056
4235
|
},
|
|
4057
|
-
children: /* @__PURE__ */
|
|
4236
|
+
children: /* @__PURE__ */ jsx32(
|
|
4058
4237
|
"div",
|
|
4059
4238
|
{
|
|
4060
4239
|
className: cn(
|
|
@@ -4097,7 +4276,7 @@ var VirtualizedTableBody = ({
|
|
|
4097
4276
|
});
|
|
4098
4277
|
const virtualRows = virtualizer.getVirtualItems();
|
|
4099
4278
|
if (rows.length === 0) {
|
|
4100
|
-
return /* @__PURE__ */
|
|
4279
|
+
return /* @__PURE__ */ jsx32("tbody", { children: /* @__PURE__ */ jsx32("tr", { children: /* @__PURE__ */ jsx32(
|
|
4101
4280
|
"td",
|
|
4102
4281
|
{
|
|
4103
4282
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4108,8 +4287,8 @@ var VirtualizedTableBody = ({
|
|
|
4108
4287
|
}
|
|
4109
4288
|
const paddingTop = virtualRows.length > 0 ? virtualRows[0].start : 0;
|
|
4110
4289
|
const paddingBottom = virtualRows.length > 0 ? virtualizer.getTotalSize() - virtualRows[virtualRows.length - 1].end : 0;
|
|
4111
|
-
return /* @__PURE__ */
|
|
4112
|
-
paddingTop > 0 && /* @__PURE__ */
|
|
4290
|
+
return /* @__PURE__ */ jsxs17("tbody", { children: [
|
|
4291
|
+
paddingTop > 0 && /* @__PURE__ */ jsx32("tr", { children: /* @__PURE__ */ jsx32(
|
|
4113
4292
|
"td",
|
|
4114
4293
|
{
|
|
4115
4294
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4118,7 +4297,7 @@ var VirtualizedTableBody = ({
|
|
|
4118
4297
|
) }),
|
|
4119
4298
|
virtualRows.map((virtualRow) => {
|
|
4120
4299
|
const row = rows[virtualRow.index];
|
|
4121
|
-
return /* @__PURE__ */
|
|
4300
|
+
return /* @__PURE__ */ jsx32(
|
|
4122
4301
|
RowRenderer,
|
|
4123
4302
|
{
|
|
4124
4303
|
row,
|
|
@@ -4134,7 +4313,7 @@ var VirtualizedTableBody = ({
|
|
|
4134
4313
|
row.id
|
|
4135
4314
|
);
|
|
4136
4315
|
}),
|
|
4137
|
-
paddingBottom > 0 && /* @__PURE__ */
|
|
4316
|
+
paddingBottom > 0 && /* @__PURE__ */ jsx32("tr", { children: /* @__PURE__ */ jsx32(
|
|
4138
4317
|
"td",
|
|
4139
4318
|
{
|
|
4140
4319
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4155,7 +4334,7 @@ var StandardTableBody = ({
|
|
|
4155
4334
|
}) => {
|
|
4156
4335
|
const rows = table.getRowModel().rows;
|
|
4157
4336
|
if (rows.length === 0) {
|
|
4158
|
-
return /* @__PURE__ */
|
|
4337
|
+
return /* @__PURE__ */ jsx32("tbody", { children: /* @__PURE__ */ jsx32("tr", { children: /* @__PURE__ */ jsx32(
|
|
4159
4338
|
"td",
|
|
4160
4339
|
{
|
|
4161
4340
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4164,7 +4343,7 @@ var StandardTableBody = ({
|
|
|
4164
4343
|
}
|
|
4165
4344
|
) }) });
|
|
4166
4345
|
}
|
|
4167
|
-
return /* @__PURE__ */
|
|
4346
|
+
return /* @__PURE__ */ jsx32("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsx32(
|
|
4168
4347
|
RowRenderer,
|
|
4169
4348
|
{
|
|
4170
4349
|
row,
|
|
@@ -4222,22 +4401,22 @@ function DataGrid({
|
|
|
4222
4401
|
resizableColumns = false,
|
|
4223
4402
|
onColumnResize
|
|
4224
4403
|
}) {
|
|
4225
|
-
const tableContainerRef =
|
|
4226
|
-
const [sorting, setSorting] =
|
|
4227
|
-
const [globalFilter, setGlobalFilter] =
|
|
4228
|
-
const [rowSelection, setRowSelection] =
|
|
4404
|
+
const tableContainerRef = React32.useRef(null);
|
|
4405
|
+
const [sorting, setSorting] = React32.useState([]);
|
|
4406
|
+
const [globalFilter, setGlobalFilter] = React32.useState("");
|
|
4407
|
+
const [rowSelection, setRowSelection] = React32.useState(
|
|
4229
4408
|
rowSelectionModel || {}
|
|
4230
4409
|
);
|
|
4231
|
-
const [pagination, setPagination] =
|
|
4410
|
+
const [pagination, setPagination] = React32.useState({
|
|
4232
4411
|
pageIndex: paginationModel?.page || 0,
|
|
4233
4412
|
pageSize: paginationModel?.pageSize || 10
|
|
4234
4413
|
});
|
|
4235
|
-
const [columnVisibility, setColumnVisibility] =
|
|
4414
|
+
const [columnVisibility, setColumnVisibility] = React32.useState(
|
|
4236
4415
|
columnVisibilityModel || {}
|
|
4237
4416
|
);
|
|
4238
|
-
const [containerWidth, setContainerWidth] =
|
|
4239
|
-
const [columnSizing, setColumnSizing] =
|
|
4240
|
-
|
|
4417
|
+
const [containerWidth, setContainerWidth] = React32.useState(0);
|
|
4418
|
+
const [columnSizing, setColumnSizing] = React32.useState({});
|
|
4419
|
+
React32.useEffect(() => {
|
|
4241
4420
|
const container = tableContainerRef.current;
|
|
4242
4421
|
if (!container) return;
|
|
4243
4422
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -4250,11 +4429,11 @@ function DataGrid({
|
|
|
4250
4429
|
return () => resizeObserver.disconnect();
|
|
4251
4430
|
}, []);
|
|
4252
4431
|
const columnWidths = useColumnWidths(columns, containerWidth, checkboxSelection, columnSizing);
|
|
4253
|
-
const tanstackColumns =
|
|
4432
|
+
const tanstackColumns = React32.useMemo(
|
|
4254
4433
|
() => convertColumns(columns, checkboxSelection),
|
|
4255
4434
|
[columns, checkboxSelection]
|
|
4256
4435
|
);
|
|
4257
|
-
|
|
4436
|
+
React32.useEffect(() => {
|
|
4258
4437
|
if (paginationModel) {
|
|
4259
4438
|
setPagination({
|
|
4260
4439
|
pageIndex: paginationModel.page,
|
|
@@ -4262,12 +4441,12 @@ function DataGrid({
|
|
|
4262
4441
|
});
|
|
4263
4442
|
}
|
|
4264
4443
|
}, [paginationModel?.page, paginationModel?.pageSize]);
|
|
4265
|
-
|
|
4444
|
+
React32.useEffect(() => {
|
|
4266
4445
|
if (rowSelectionModel) {
|
|
4267
4446
|
setRowSelection(rowSelectionModel);
|
|
4268
4447
|
}
|
|
4269
4448
|
}, [rowSelectionModel]);
|
|
4270
|
-
|
|
4449
|
+
React32.useEffect(() => {
|
|
4271
4450
|
if (columnVisibilityModel) {
|
|
4272
4451
|
setColumnVisibility(columnVisibilityModel);
|
|
4273
4452
|
}
|
|
@@ -4340,7 +4519,7 @@ function DataGrid({
|
|
|
4340
4519
|
if (minHeight) containerStyle.minHeight = minHeight;
|
|
4341
4520
|
if (maxHeight) containerStyle.maxHeight = maxHeight;
|
|
4342
4521
|
}
|
|
4343
|
-
return /* @__PURE__ */
|
|
4522
|
+
return /* @__PURE__ */ jsxs17(
|
|
4344
4523
|
"div",
|
|
4345
4524
|
{
|
|
4346
4525
|
className: cn(
|
|
@@ -4349,7 +4528,7 @@ function DataGrid({
|
|
|
4349
4528
|
),
|
|
4350
4529
|
style: containerStyle,
|
|
4351
4530
|
children: [
|
|
4352
|
-
toolBar && /* @__PURE__ */
|
|
4531
|
+
toolBar && /* @__PURE__ */ jsx32(
|
|
4353
4532
|
DataGridToolbar,
|
|
4354
4533
|
{
|
|
4355
4534
|
title,
|
|
@@ -4367,17 +4546,17 @@ function DataGrid({
|
|
|
4367
4546
|
moreOptions
|
|
4368
4547
|
}
|
|
4369
4548
|
),
|
|
4370
|
-
/* @__PURE__ */
|
|
4549
|
+
/* @__PURE__ */ jsxs17(
|
|
4371
4550
|
"div",
|
|
4372
4551
|
{
|
|
4373
4552
|
ref: tableContainerRef,
|
|
4374
4553
|
className: "relative flex-1 overflow-auto",
|
|
4375
4554
|
children: [
|
|
4376
|
-
loading && /* @__PURE__ */
|
|
4377
|
-
/* @__PURE__ */
|
|
4378
|
-
/* @__PURE__ */
|
|
4555
|
+
loading && /* @__PURE__ */ jsx32("div", { className: "absolute inset-0 bg-background/80 flex items-center justify-center z-10", children: /* @__PURE__ */ jsx32(Spinner, { size: "lg" }) }),
|
|
4556
|
+
/* @__PURE__ */ jsxs17("table", { className: "w-full border-collapse table-fixed", children: [
|
|
4557
|
+
/* @__PURE__ */ jsx32("colgroup", { children: table.getVisibleLeafColumns().map((column) => {
|
|
4379
4558
|
const colWidth = columnWidths.get(column.id);
|
|
4380
|
-
return /* @__PURE__ */
|
|
4559
|
+
return /* @__PURE__ */ jsx32(
|
|
4381
4560
|
"col",
|
|
4382
4561
|
{
|
|
4383
4562
|
style: {
|
|
@@ -4389,12 +4568,12 @@ function DataGrid({
|
|
|
4389
4568
|
column.id
|
|
4390
4569
|
);
|
|
4391
4570
|
}) }),
|
|
4392
|
-
/* @__PURE__ */
|
|
4571
|
+
/* @__PURE__ */ jsx32("thead", { className: "sticky top-0 z-[1]", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx32("tr", { className: "bg-muted", children: headerGroup.headers.map((header) => {
|
|
4393
4572
|
const meta = header.column.columnDef.meta;
|
|
4394
4573
|
const align = meta?.headerAlign || meta?.align || "left";
|
|
4395
4574
|
const colWidth = columnWidths.get(header.column.id);
|
|
4396
4575
|
const effectiveWidth = colWidth?.width || header.getSize();
|
|
4397
|
-
return /* @__PURE__ */
|
|
4576
|
+
return /* @__PURE__ */ jsxs17(
|
|
4398
4577
|
"th",
|
|
4399
4578
|
{
|
|
4400
4579
|
className: cn(
|
|
@@ -4413,15 +4592,15 @@ function DataGrid({
|
|
|
4413
4592
|
},
|
|
4414
4593
|
onClick: header.column.getToggleSortingHandler(),
|
|
4415
4594
|
children: [
|
|
4416
|
-
/* @__PURE__ */
|
|
4595
|
+
/* @__PURE__ */ jsxs17("div", { className: cn(
|
|
4417
4596
|
"flex items-center gap-1 truncate",
|
|
4418
4597
|
align === "center" && "justify-center",
|
|
4419
4598
|
align === "right" && "justify-end"
|
|
4420
4599
|
), children: [
|
|
4421
4600
|
header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()),
|
|
4422
|
-
header.column.getCanSort() && /* @__PURE__ */
|
|
4601
|
+
header.column.getCanSort() && /* @__PURE__ */ jsx32(SortIcon, { direction: header.column.getIsSorted() })
|
|
4423
4602
|
] }),
|
|
4424
|
-
resizableColumns && header.column.id !== "__select__" && /* @__PURE__ */
|
|
4603
|
+
resizableColumns && header.column.id !== "__select__" && /* @__PURE__ */ jsx32(
|
|
4425
4604
|
ColumnResizeHandle,
|
|
4426
4605
|
{
|
|
4427
4606
|
header,
|
|
@@ -4433,7 +4612,7 @@ function DataGrid({
|
|
|
4433
4612
|
header.id
|
|
4434
4613
|
);
|
|
4435
4614
|
}) }, headerGroup.id)) }),
|
|
4436
|
-
virtualized ? /* @__PURE__ */
|
|
4615
|
+
virtualized ? /* @__PURE__ */ jsx32(
|
|
4437
4616
|
VirtualizedTableBody,
|
|
4438
4617
|
{
|
|
4439
4618
|
table,
|
|
@@ -4447,7 +4626,7 @@ function DataGrid({
|
|
|
4447
4626
|
globalWrapText: wrapText,
|
|
4448
4627
|
columnWidths
|
|
4449
4628
|
}
|
|
4450
|
-
) : /* @__PURE__ */
|
|
4629
|
+
) : /* @__PURE__ */ jsx32(
|
|
4451
4630
|
StandardTableBody,
|
|
4452
4631
|
{
|
|
4453
4632
|
table,
|
|
@@ -4464,7 +4643,7 @@ function DataGrid({
|
|
|
4464
4643
|
]
|
|
4465
4644
|
}
|
|
4466
4645
|
),
|
|
4467
|
-
!virtualized && !hideFooter && !hideFooterPagination && /* @__PURE__ */
|
|
4646
|
+
!virtualized && !hideFooter && !hideFooterPagination && /* @__PURE__ */ jsx32(
|
|
4468
4647
|
DataGridPagination,
|
|
4469
4648
|
{
|
|
4470
4649
|
table,
|
|
@@ -4473,7 +4652,7 @@ function DataGrid({
|
|
|
4473
4652
|
paginationMode
|
|
4474
4653
|
}
|
|
4475
4654
|
),
|
|
4476
|
-
virtualized && !hideFooter && /* @__PURE__ */
|
|
4655
|
+
virtualized && !hideFooter && /* @__PURE__ */ jsx32("div", { className: "flex items-center justify-end gap-4 px-4 py-3 border-t border-border bg-background", children: /* @__PURE__ */ jsxs17("span", { className: "text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
4477
4656
|
table.getFilteredRowModel().rows.length,
|
|
4478
4657
|
" total rows (virtualized)"
|
|
4479
4658
|
] }) })
|
|
@@ -4484,10 +4663,10 @@ function DataGrid({
|
|
|
4484
4663
|
DataGrid.displayName = "DataGrid";
|
|
4485
4664
|
|
|
4486
4665
|
// src/components/list.tsx
|
|
4487
|
-
import * as
|
|
4488
|
-
import { jsx as
|
|
4489
|
-
var
|
|
4490
|
-
({ dividers = false, dense = false, clickable = false, className, ...props }, ref) => /* @__PURE__ */
|
|
4666
|
+
import * as React33 from "react";
|
|
4667
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4668
|
+
var List2 = React33.forwardRef(
|
|
4669
|
+
({ dividers = false, dense = false, clickable = false, className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
4491
4670
|
"ul",
|
|
4492
4671
|
{
|
|
4493
4672
|
ref,
|
|
@@ -4500,8 +4679,8 @@ var List = React32.forwardRef(
|
|
|
4500
4679
|
}
|
|
4501
4680
|
)
|
|
4502
4681
|
);
|
|
4503
|
-
|
|
4504
|
-
var ListItem =
|
|
4682
|
+
List2.displayName = "List";
|
|
4683
|
+
var ListItem = React33.forwardRef(
|
|
4505
4684
|
({
|
|
4506
4685
|
selected = false,
|
|
4507
4686
|
disabled = false,
|
|
@@ -4512,7 +4691,7 @@ var ListItem = React32.forwardRef(
|
|
|
4512
4691
|
className,
|
|
4513
4692
|
children,
|
|
4514
4693
|
...props
|
|
4515
|
-
}, ref) => /* @__PURE__ */
|
|
4694
|
+
}, ref) => /* @__PURE__ */ jsxs18(
|
|
4516
4695
|
"li",
|
|
4517
4696
|
{
|
|
4518
4697
|
ref,
|
|
@@ -4537,18 +4716,18 @@ var ListItem = React32.forwardRef(
|
|
|
4537
4716
|
),
|
|
4538
4717
|
...props,
|
|
4539
4718
|
children: [
|
|
4540
|
-
leading && /* @__PURE__ */
|
|
4541
|
-
/* @__PURE__ */
|
|
4542
|
-
trailing && /* @__PURE__ */
|
|
4543
|
-
secondaryAction && /* @__PURE__ */
|
|
4719
|
+
leading && /* @__PURE__ */ jsx33("div", { className: "shrink-0", children: leading }),
|
|
4720
|
+
/* @__PURE__ */ jsx33("div", { className: "flex-1 min-w-0", children }),
|
|
4721
|
+
trailing && /* @__PURE__ */ jsx33("div", { className: "shrink-0", children: trailing }),
|
|
4722
|
+
secondaryAction && /* @__PURE__ */ jsx33("div", { className: "shrink-0 ml-2", children: secondaryAction })
|
|
4544
4723
|
]
|
|
4545
4724
|
}
|
|
4546
4725
|
)
|
|
4547
4726
|
);
|
|
4548
4727
|
ListItem.displayName = "ListItem";
|
|
4549
|
-
var ListItemText =
|
|
4550
|
-
({ primary, secondary, noWrap = false, className, children, ...props }, ref) => /* @__PURE__ */
|
|
4551
|
-
primary && /* @__PURE__ */
|
|
4728
|
+
var ListItemText = React33.forwardRef(
|
|
4729
|
+
({ primary, secondary, noWrap = false, className, children, ...props }, ref) => /* @__PURE__ */ jsxs18("div", { ref, className: cn("min-w-0", className), ...props, children: [
|
|
4730
|
+
primary && /* @__PURE__ */ jsx33(
|
|
4552
4731
|
"div",
|
|
4553
4732
|
{
|
|
4554
4733
|
className: cn(
|
|
@@ -4558,7 +4737,7 @@ var ListItemText = React32.forwardRef(
|
|
|
4558
4737
|
children: primary
|
|
4559
4738
|
}
|
|
4560
4739
|
),
|
|
4561
|
-
secondary && /* @__PURE__ */
|
|
4740
|
+
secondary && /* @__PURE__ */ jsx33(
|
|
4562
4741
|
"div",
|
|
4563
4742
|
{
|
|
4564
4743
|
className: cn(
|
|
@@ -4572,8 +4751,8 @@ var ListItemText = React32.forwardRef(
|
|
|
4572
4751
|
] })
|
|
4573
4752
|
);
|
|
4574
4753
|
ListItemText.displayName = "ListItemText";
|
|
4575
|
-
var ListItemIcon =
|
|
4576
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4754
|
+
var ListItemIcon = React33.forwardRef(
|
|
4755
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
4577
4756
|
"div",
|
|
4578
4757
|
{
|
|
4579
4758
|
ref,
|
|
@@ -4583,12 +4762,12 @@ var ListItemIcon = React32.forwardRef(
|
|
|
4583
4762
|
)
|
|
4584
4763
|
);
|
|
4585
4764
|
ListItemIcon.displayName = "ListItemIcon";
|
|
4586
|
-
var ListItemAvatar =
|
|
4587
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4765
|
+
var ListItemAvatar = React33.forwardRef(
|
|
4766
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx33("div", { ref, className: cn("shrink-0", className), ...props })
|
|
4588
4767
|
);
|
|
4589
4768
|
ListItemAvatar.displayName = "ListItemAvatar";
|
|
4590
|
-
var ListSubheader =
|
|
4591
|
-
({ sticky = false, className, ...props }, ref) => /* @__PURE__ */
|
|
4769
|
+
var ListSubheader = React33.forwardRef(
|
|
4770
|
+
({ sticky = false, className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
4592
4771
|
"li",
|
|
4593
4772
|
{
|
|
4594
4773
|
ref,
|
|
@@ -4603,8 +4782,8 @@ var ListSubheader = React32.forwardRef(
|
|
|
4603
4782
|
)
|
|
4604
4783
|
);
|
|
4605
4784
|
ListSubheader.displayName = "ListSubheader";
|
|
4606
|
-
var ListDivider =
|
|
4607
|
-
({ inset = false, className, ...props }, ref) => /* @__PURE__ */
|
|
4785
|
+
var ListDivider = React33.forwardRef(
|
|
4786
|
+
({ inset = false, className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
4608
4787
|
"li",
|
|
4609
4788
|
{
|
|
4610
4789
|
ref,
|
|
@@ -4621,9 +4800,9 @@ var ListDivider = React32.forwardRef(
|
|
|
4621
4800
|
ListDivider.displayName = "ListDivider";
|
|
4622
4801
|
|
|
4623
4802
|
// src/components/breadcrumbs.tsx
|
|
4624
|
-
import * as
|
|
4625
|
-
import { jsx as
|
|
4626
|
-
var Breadcrumbs =
|
|
4803
|
+
import * as React34 from "react";
|
|
4804
|
+
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4805
|
+
var Breadcrumbs = React34.forwardRef(
|
|
4627
4806
|
({
|
|
4628
4807
|
separator,
|
|
4629
4808
|
maxItems,
|
|
@@ -4633,9 +4812,9 @@ var Breadcrumbs = React33.forwardRef(
|
|
|
4633
4812
|
children,
|
|
4634
4813
|
...props
|
|
4635
4814
|
}, ref) => {
|
|
4636
|
-
const childArray =
|
|
4815
|
+
const childArray = React34.Children.toArray(children);
|
|
4637
4816
|
const totalItems = childArray.length;
|
|
4638
|
-
const separatorElement = separator ?? /* @__PURE__ */
|
|
4817
|
+
const separatorElement = separator ?? /* @__PURE__ */ jsx34(
|
|
4639
4818
|
"svg",
|
|
4640
4819
|
{
|
|
4641
4820
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4648,7 +4827,7 @@ var Breadcrumbs = React33.forwardRef(
|
|
|
4648
4827
|
strokeLinecap: "round",
|
|
4649
4828
|
strokeLinejoin: "round",
|
|
4650
4829
|
className: "text-muted-foreground",
|
|
4651
|
-
children: /* @__PURE__ */
|
|
4830
|
+
children: /* @__PURE__ */ jsx34("path", { d: "m9 18 6-6-6-6" })
|
|
4652
4831
|
}
|
|
4653
4832
|
);
|
|
4654
4833
|
const shouldCollapse = maxItems && totalItems > maxItems;
|
|
@@ -4658,20 +4837,20 @@ var Breadcrumbs = React33.forwardRef(
|
|
|
4658
4837
|
const endItems = childArray.slice(-itemsAfterCollapse);
|
|
4659
4838
|
displayedItems = [
|
|
4660
4839
|
...startItems,
|
|
4661
|
-
/* @__PURE__ */
|
|
4840
|
+
/* @__PURE__ */ jsx34(BreadcrumbEllipsis, {}, "ellipsis"),
|
|
4662
4841
|
...endItems
|
|
4663
4842
|
];
|
|
4664
4843
|
} else {
|
|
4665
4844
|
displayedItems = childArray;
|
|
4666
4845
|
}
|
|
4667
|
-
return /* @__PURE__ */
|
|
4668
|
-
index > 0 && /* @__PURE__ */
|
|
4846
|
+
return /* @__PURE__ */ jsx34("nav", { ref, "aria-label": "Breadcrumb", className, ...props, children: /* @__PURE__ */ jsx34("ol", { className: "flex items-center gap-1.5 flex-wrap", children: displayedItems.map((child, index) => /* @__PURE__ */ jsxs19("li", { className: "flex items-center gap-1.5", children: [
|
|
4847
|
+
index > 0 && /* @__PURE__ */ jsx34("span", { className: "flex items-center", "aria-hidden": "true", children: separatorElement }),
|
|
4669
4848
|
child
|
|
4670
4849
|
] }, index)) }) });
|
|
4671
4850
|
}
|
|
4672
4851
|
);
|
|
4673
4852
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
4674
|
-
var BreadcrumbItem =
|
|
4853
|
+
var BreadcrumbItem = React34.forwardRef(
|
|
4675
4854
|
({ current = false, href, onClick, className, children, ...props }, ref) => {
|
|
4676
4855
|
const baseClasses = cn(
|
|
4677
4856
|
"text-sm transition-colors",
|
|
@@ -4680,7 +4859,7 @@ var BreadcrumbItem = React33.forwardRef(
|
|
|
4680
4859
|
className
|
|
4681
4860
|
);
|
|
4682
4861
|
if (current) {
|
|
4683
|
-
return /* @__PURE__ */
|
|
4862
|
+
return /* @__PURE__ */ jsx34(
|
|
4684
4863
|
"span",
|
|
4685
4864
|
{
|
|
4686
4865
|
ref,
|
|
@@ -4692,7 +4871,7 @@ var BreadcrumbItem = React33.forwardRef(
|
|
|
4692
4871
|
);
|
|
4693
4872
|
}
|
|
4694
4873
|
if (href) {
|
|
4695
|
-
return /* @__PURE__ */
|
|
4874
|
+
return /* @__PURE__ */ jsx34(
|
|
4696
4875
|
"a",
|
|
4697
4876
|
{
|
|
4698
4877
|
href,
|
|
@@ -4702,7 +4881,7 @@ var BreadcrumbItem = React33.forwardRef(
|
|
|
4702
4881
|
}
|
|
4703
4882
|
);
|
|
4704
4883
|
}
|
|
4705
|
-
return /* @__PURE__ */
|
|
4884
|
+
return /* @__PURE__ */ jsx34(
|
|
4706
4885
|
"span",
|
|
4707
4886
|
{
|
|
4708
4887
|
ref,
|
|
@@ -4723,8 +4902,8 @@ var BreadcrumbItem = React33.forwardRef(
|
|
|
4723
4902
|
}
|
|
4724
4903
|
);
|
|
4725
4904
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
4726
|
-
var BreadcrumbLink =
|
|
4727
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4905
|
+
var BreadcrumbLink = React34.forwardRef(
|
|
4906
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
4728
4907
|
"a",
|
|
4729
4908
|
{
|
|
4730
4909
|
ref,
|
|
@@ -4737,8 +4916,8 @@ var BreadcrumbLink = React33.forwardRef(
|
|
|
4737
4916
|
)
|
|
4738
4917
|
);
|
|
4739
4918
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
4740
|
-
var BreadcrumbSeparator =
|
|
4741
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
4919
|
+
var BreadcrumbSeparator = React34.forwardRef(
|
|
4920
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
4742
4921
|
"span",
|
|
4743
4922
|
{
|
|
4744
4923
|
ref,
|
|
@@ -4746,7 +4925,7 @@ var BreadcrumbSeparator = React33.forwardRef(
|
|
|
4746
4925
|
"aria-hidden": "true",
|
|
4747
4926
|
className: cn("text-muted-foreground", className),
|
|
4748
4927
|
...props,
|
|
4749
|
-
children: children ?? /* @__PURE__ */
|
|
4928
|
+
children: children ?? /* @__PURE__ */ jsx34(
|
|
4750
4929
|
"svg",
|
|
4751
4930
|
{
|
|
4752
4931
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4758,15 +4937,15 @@ var BreadcrumbSeparator = React33.forwardRef(
|
|
|
4758
4937
|
strokeWidth: "2",
|
|
4759
4938
|
strokeLinecap: "round",
|
|
4760
4939
|
strokeLinejoin: "round",
|
|
4761
|
-
children: /* @__PURE__ */
|
|
4940
|
+
children: /* @__PURE__ */ jsx34("path", { d: "m9 18 6-6-6-6" })
|
|
4762
4941
|
}
|
|
4763
4942
|
)
|
|
4764
4943
|
}
|
|
4765
4944
|
)
|
|
4766
4945
|
);
|
|
4767
4946
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
4768
|
-
var BreadcrumbEllipsis =
|
|
4769
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4947
|
+
var BreadcrumbEllipsis = React34.forwardRef(
|
|
4948
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
4770
4949
|
"span",
|
|
4771
4950
|
{
|
|
4772
4951
|
ref,
|
|
@@ -4774,7 +4953,7 @@ var BreadcrumbEllipsis = React33.forwardRef(
|
|
|
4774
4953
|
"aria-hidden": "true",
|
|
4775
4954
|
className: cn("text-sm text-muted-foreground", className),
|
|
4776
4955
|
...props,
|
|
4777
|
-
children: /* @__PURE__ */
|
|
4956
|
+
children: /* @__PURE__ */ jsxs19(
|
|
4778
4957
|
"svg",
|
|
4779
4958
|
{
|
|
4780
4959
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4787,9 +4966,9 @@ var BreadcrumbEllipsis = React33.forwardRef(
|
|
|
4787
4966
|
strokeLinecap: "round",
|
|
4788
4967
|
strokeLinejoin: "round",
|
|
4789
4968
|
children: [
|
|
4790
|
-
/* @__PURE__ */
|
|
4791
|
-
/* @__PURE__ */
|
|
4792
|
-
/* @__PURE__ */
|
|
4969
|
+
/* @__PURE__ */ jsx34("circle", { cx: "12", cy: "12", r: "1" }),
|
|
4970
|
+
/* @__PURE__ */ jsx34("circle", { cx: "19", cy: "12", r: "1" }),
|
|
4971
|
+
/* @__PURE__ */ jsx34("circle", { cx: "5", cy: "12", r: "1" })
|
|
4793
4972
|
]
|
|
4794
4973
|
}
|
|
4795
4974
|
)
|
|
@@ -4797,8 +4976,8 @@ var BreadcrumbEllipsis = React33.forwardRef(
|
|
|
4797
4976
|
)
|
|
4798
4977
|
);
|
|
4799
4978
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
4800
|
-
var BreadcrumbPage =
|
|
4801
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4979
|
+
var BreadcrumbPage = React34.forwardRef(
|
|
4980
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
4802
4981
|
"span",
|
|
4803
4982
|
{
|
|
4804
4983
|
ref,
|
|
@@ -4811,16 +4990,16 @@ var BreadcrumbPage = React33.forwardRef(
|
|
|
4811
4990
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
4812
4991
|
|
|
4813
4992
|
// src/components/dropdown-menu.tsx
|
|
4814
|
-
import * as
|
|
4993
|
+
import * as React35 from "react";
|
|
4815
4994
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4816
|
-
import { jsx as
|
|
4995
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4817
4996
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
4818
4997
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
4819
4998
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
4820
4999
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
4821
5000
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
4822
5001
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
4823
|
-
var DropdownMenuSubTrigger =
|
|
5002
|
+
var DropdownMenuSubTrigger = React35.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs20(
|
|
4824
5003
|
DropdownMenuPrimitive.SubTrigger,
|
|
4825
5004
|
{
|
|
4826
5005
|
ref,
|
|
@@ -4834,7 +5013,7 @@ var DropdownMenuSubTrigger = React34.forwardRef(({ className, inset, children, .
|
|
|
4834
5013
|
...props,
|
|
4835
5014
|
children: [
|
|
4836
5015
|
children,
|
|
4837
|
-
/* @__PURE__ */
|
|
5016
|
+
/* @__PURE__ */ jsx35(
|
|
4838
5017
|
"svg",
|
|
4839
5018
|
{
|
|
4840
5019
|
className: "ml-auto h-4 w-4",
|
|
@@ -4845,14 +5024,14 @@ var DropdownMenuSubTrigger = React34.forwardRef(({ className, inset, children, .
|
|
|
4845
5024
|
strokeWidth: "2",
|
|
4846
5025
|
strokeLinecap: "round",
|
|
4847
5026
|
strokeLinejoin: "round",
|
|
4848
|
-
children: /* @__PURE__ */
|
|
5027
|
+
children: /* @__PURE__ */ jsx35("path", { d: "m9 18 6-6-6-6" })
|
|
4849
5028
|
}
|
|
4850
5029
|
)
|
|
4851
5030
|
]
|
|
4852
5031
|
}
|
|
4853
5032
|
));
|
|
4854
5033
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
4855
|
-
var DropdownMenuSubContent =
|
|
5034
|
+
var DropdownMenuSubContent = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4856
5035
|
DropdownMenuPrimitive.SubContent,
|
|
4857
5036
|
{
|
|
4858
5037
|
ref,
|
|
@@ -4869,7 +5048,7 @@ var DropdownMenuSubContent = React34.forwardRef(({ className, ...props }, ref) =
|
|
|
4869
5048
|
}
|
|
4870
5049
|
));
|
|
4871
5050
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
4872
|
-
var DropdownMenuContent =
|
|
5051
|
+
var DropdownMenuContent = React35.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx35(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx35(
|
|
4873
5052
|
DropdownMenuPrimitive.Content,
|
|
4874
5053
|
{
|
|
4875
5054
|
ref,
|
|
@@ -4887,7 +5066,7 @@ var DropdownMenuContent = React34.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
4887
5066
|
}
|
|
4888
5067
|
) }));
|
|
4889
5068
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
4890
|
-
var DropdownMenuItem =
|
|
5069
|
+
var DropdownMenuItem = React35.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4891
5070
|
DropdownMenuPrimitive.Item,
|
|
4892
5071
|
{
|
|
4893
5072
|
ref,
|
|
@@ -4903,7 +5082,7 @@ var DropdownMenuItem = React34.forwardRef(({ className, inset, ...props }, ref)
|
|
|
4903
5082
|
}
|
|
4904
5083
|
));
|
|
4905
5084
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
4906
|
-
var DropdownMenuCheckboxItem =
|
|
5085
|
+
var DropdownMenuCheckboxItem = React35.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs20(
|
|
4907
5086
|
DropdownMenuPrimitive.CheckboxItem,
|
|
4908
5087
|
{
|
|
4909
5088
|
ref,
|
|
@@ -4916,7 +5095,7 @@ var DropdownMenuCheckboxItem = React34.forwardRef(({ className, children, checke
|
|
|
4916
5095
|
checked,
|
|
4917
5096
|
...props,
|
|
4918
5097
|
children: [
|
|
4919
|
-
/* @__PURE__ */
|
|
5098
|
+
/* @__PURE__ */ jsx35("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx35(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx35(
|
|
4920
5099
|
"svg",
|
|
4921
5100
|
{
|
|
4922
5101
|
className: "h-4 w-4",
|
|
@@ -4927,7 +5106,7 @@ var DropdownMenuCheckboxItem = React34.forwardRef(({ className, children, checke
|
|
|
4927
5106
|
strokeWidth: "2",
|
|
4928
5107
|
strokeLinecap: "round",
|
|
4929
5108
|
strokeLinejoin: "round",
|
|
4930
|
-
children: /* @__PURE__ */
|
|
5109
|
+
children: /* @__PURE__ */ jsx35("path", { d: "M20 6 9 17l-5-5" })
|
|
4931
5110
|
}
|
|
4932
5111
|
) }) }),
|
|
4933
5112
|
children
|
|
@@ -4935,7 +5114,7 @@ var DropdownMenuCheckboxItem = React34.forwardRef(({ className, children, checke
|
|
|
4935
5114
|
}
|
|
4936
5115
|
));
|
|
4937
5116
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
4938
|
-
var DropdownMenuRadioItem =
|
|
5117
|
+
var DropdownMenuRadioItem = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs20(
|
|
4939
5118
|
DropdownMenuPrimitive.RadioItem,
|
|
4940
5119
|
{
|
|
4941
5120
|
ref,
|
|
@@ -4947,13 +5126,13 @@ var DropdownMenuRadioItem = React34.forwardRef(({ className, children, ...props
|
|
|
4947
5126
|
),
|
|
4948
5127
|
...props,
|
|
4949
5128
|
children: [
|
|
4950
|
-
/* @__PURE__ */
|
|
5129
|
+
/* @__PURE__ */ jsx35("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx35(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx35(
|
|
4951
5130
|
"svg",
|
|
4952
5131
|
{
|
|
4953
5132
|
className: "h-2 w-2 fill-current",
|
|
4954
5133
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4955
5134
|
viewBox: "0 0 24 24",
|
|
4956
|
-
children: /* @__PURE__ */
|
|
5135
|
+
children: /* @__PURE__ */ jsx35("circle", { cx: "12", cy: "12", r: "10" })
|
|
4957
5136
|
}
|
|
4958
5137
|
) }) }),
|
|
4959
5138
|
children
|
|
@@ -4961,7 +5140,7 @@ var DropdownMenuRadioItem = React34.forwardRef(({ className, children, ...props
|
|
|
4961
5140
|
}
|
|
4962
5141
|
));
|
|
4963
5142
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
4964
|
-
var DropdownMenuLabel =
|
|
5143
|
+
var DropdownMenuLabel = React35.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4965
5144
|
DropdownMenuPrimitive.Label,
|
|
4966
5145
|
{
|
|
4967
5146
|
ref,
|
|
@@ -4974,7 +5153,7 @@ var DropdownMenuLabel = React34.forwardRef(({ className, inset, ...props }, ref)
|
|
|
4974
5153
|
}
|
|
4975
5154
|
));
|
|
4976
5155
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
4977
|
-
var DropdownMenuSeparator =
|
|
5156
|
+
var DropdownMenuSeparator = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4978
5157
|
DropdownMenuPrimitive.Separator,
|
|
4979
5158
|
{
|
|
4980
5159
|
ref,
|
|
@@ -4987,7 +5166,7 @@ var DropdownMenuShortcut = ({
|
|
|
4987
5166
|
className,
|
|
4988
5167
|
...props
|
|
4989
5168
|
}) => {
|
|
4990
|
-
return /* @__PURE__ */
|
|
5169
|
+
return /* @__PURE__ */ jsx35(
|
|
4991
5170
|
"span",
|
|
4992
5171
|
{
|
|
4993
5172
|
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
@@ -4998,14 +5177,14 @@ var DropdownMenuShortcut = ({
|
|
|
4998
5177
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
4999
5178
|
|
|
5000
5179
|
// src/components/drawer.tsx
|
|
5001
|
-
import * as
|
|
5180
|
+
import * as React36 from "react";
|
|
5002
5181
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
5003
|
-
import { jsx as
|
|
5182
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5004
5183
|
var Drawer = DialogPrimitive2.Root;
|
|
5005
5184
|
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
5006
5185
|
var DrawerClose = DialogPrimitive2.Close;
|
|
5007
5186
|
var DrawerPortal = DialogPrimitive2.Portal;
|
|
5008
|
-
var DrawerOverlay =
|
|
5187
|
+
var DrawerOverlay = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5009
5188
|
DialogPrimitive2.Overlay,
|
|
5010
5189
|
{
|
|
5011
5190
|
ref,
|
|
@@ -5025,9 +5204,9 @@ var slideVariants = {
|
|
|
5025
5204
|
top: "inset-x-0 top-0 w-full data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
5026
5205
|
bottom: "inset-x-0 bottom-0 w-full data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom"
|
|
5027
5206
|
};
|
|
5028
|
-
var DrawerContent =
|
|
5029
|
-
/* @__PURE__ */
|
|
5030
|
-
/* @__PURE__ */
|
|
5207
|
+
var DrawerContent = React36.forwardRef(({ side = "right", showClose = true, className, children, ...props }, ref) => /* @__PURE__ */ jsxs21(DrawerPortal, { children: [
|
|
5208
|
+
/* @__PURE__ */ jsx36(DrawerOverlay, {}),
|
|
5209
|
+
/* @__PURE__ */ jsxs21(
|
|
5031
5210
|
DialogPrimitive2.Content,
|
|
5032
5211
|
{
|
|
5033
5212
|
ref,
|
|
@@ -5041,7 +5220,7 @@ var DrawerContent = React35.forwardRef(({ side = "right", showClose = true, clas
|
|
|
5041
5220
|
...props,
|
|
5042
5221
|
children: [
|
|
5043
5222
|
children,
|
|
5044
|
-
showClose && /* @__PURE__ */
|
|
5223
|
+
showClose && /* @__PURE__ */ jsxs21(
|
|
5045
5224
|
DrawerClose,
|
|
5046
5225
|
{
|
|
5047
5226
|
className: cn(
|
|
@@ -5051,7 +5230,7 @@ var DrawerContent = React35.forwardRef(({ side = "right", showClose = true, clas
|
|
|
5051
5230
|
"disabled:pointer-events-none"
|
|
5052
5231
|
),
|
|
5053
5232
|
children: [
|
|
5054
|
-
/* @__PURE__ */
|
|
5233
|
+
/* @__PURE__ */ jsx36(
|
|
5055
5234
|
"svg",
|
|
5056
5235
|
{
|
|
5057
5236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5064,10 +5243,10 @@ var DrawerContent = React35.forwardRef(({ side = "right", showClose = true, clas
|
|
|
5064
5243
|
strokeLinecap: "round",
|
|
5065
5244
|
strokeLinejoin: "round",
|
|
5066
5245
|
className: "h-4 w-4",
|
|
5067
|
-
children: /* @__PURE__ */
|
|
5246
|
+
children: /* @__PURE__ */ jsx36("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
5068
5247
|
}
|
|
5069
5248
|
),
|
|
5070
|
-
/* @__PURE__ */
|
|
5249
|
+
/* @__PURE__ */ jsx36("span", { className: "sr-only", children: "Close" })
|
|
5071
5250
|
]
|
|
5072
5251
|
}
|
|
5073
5252
|
)
|
|
@@ -5076,8 +5255,8 @@ var DrawerContent = React35.forwardRef(({ side = "right", showClose = true, clas
|
|
|
5076
5255
|
)
|
|
5077
5256
|
] }));
|
|
5078
5257
|
DrawerContent.displayName = "DrawerContent";
|
|
5079
|
-
var DrawerHeader =
|
|
5080
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
5258
|
+
var DrawerHeader = React36.forwardRef(
|
|
5259
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5081
5260
|
"div",
|
|
5082
5261
|
{
|
|
5083
5262
|
ref,
|
|
@@ -5087,7 +5266,7 @@ var DrawerHeader = React35.forwardRef(
|
|
|
5087
5266
|
)
|
|
5088
5267
|
);
|
|
5089
5268
|
DrawerHeader.displayName = "DrawerHeader";
|
|
5090
|
-
var DrawerTitle =
|
|
5269
|
+
var DrawerTitle = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5091
5270
|
DialogPrimitive2.Title,
|
|
5092
5271
|
{
|
|
5093
5272
|
ref,
|
|
@@ -5096,7 +5275,7 @@ var DrawerTitle = React35.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5096
5275
|
}
|
|
5097
5276
|
));
|
|
5098
5277
|
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
5099
|
-
var DrawerDescription =
|
|
5278
|
+
var DrawerDescription = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5100
5279
|
DialogPrimitive2.Description,
|
|
5101
5280
|
{
|
|
5102
5281
|
ref,
|
|
@@ -5105,8 +5284,8 @@ var DrawerDescription = React35.forwardRef(({ className, ...props }, ref) => /*
|
|
|
5105
5284
|
}
|
|
5106
5285
|
));
|
|
5107
5286
|
DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
5108
|
-
var DrawerBody =
|
|
5109
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
5287
|
+
var DrawerBody = React36.forwardRef(
|
|
5288
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5110
5289
|
"div",
|
|
5111
5290
|
{
|
|
5112
5291
|
ref,
|
|
@@ -5116,8 +5295,8 @@ var DrawerBody = React35.forwardRef(
|
|
|
5116
5295
|
)
|
|
5117
5296
|
);
|
|
5118
5297
|
DrawerBody.displayName = "DrawerBody";
|
|
5119
|
-
var DrawerFooter =
|
|
5120
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
5298
|
+
var DrawerFooter = React36.forwardRef(
|
|
5299
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5121
5300
|
"div",
|
|
5122
5301
|
{
|
|
5123
5302
|
ref,
|
|
@@ -5143,16 +5322,16 @@ var SheetBody = DrawerBody;
|
|
|
5143
5322
|
var SheetFooter = DrawerFooter;
|
|
5144
5323
|
|
|
5145
5324
|
// src/components/topbar.tsx
|
|
5146
|
-
import * as
|
|
5147
|
-
import { Fragment as Fragment4, jsx as
|
|
5325
|
+
import * as React37 from "react";
|
|
5326
|
+
import { Fragment as Fragment4, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5148
5327
|
var sizeClasses4 = {
|
|
5149
5328
|
sm: "h-12",
|
|
5150
5329
|
md: "h-14",
|
|
5151
5330
|
lg: "h-16"
|
|
5152
5331
|
};
|
|
5153
|
-
var TopBar =
|
|
5332
|
+
var TopBar = React37.forwardRef(
|
|
5154
5333
|
({ className, bordered = true, sticky = false, size = "md", children, ...props }, ref) => {
|
|
5155
|
-
return /* @__PURE__ */
|
|
5334
|
+
return /* @__PURE__ */ jsx37(
|
|
5156
5335
|
"header",
|
|
5157
5336
|
{
|
|
5158
5337
|
ref,
|
|
@@ -5170,23 +5349,23 @@ var TopBar = React36.forwardRef(
|
|
|
5170
5349
|
}
|
|
5171
5350
|
);
|
|
5172
5351
|
TopBar.displayName = "TopBar";
|
|
5173
|
-
var TopBarBrand =
|
|
5352
|
+
var TopBarBrand = React37.forwardRef(
|
|
5174
5353
|
({ className, logo, name, href, children, ...props }, ref) => {
|
|
5175
|
-
const content = /* @__PURE__ */
|
|
5176
|
-
logo && /* @__PURE__ */
|
|
5177
|
-
name && /* @__PURE__ */
|
|
5354
|
+
const content = /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
5355
|
+
logo && /* @__PURE__ */ jsx37("span", { className: "shrink-0", children: logo }),
|
|
5356
|
+
name && /* @__PURE__ */ jsx37("span", { className: "font-semibold text-lg", children: name }),
|
|
5178
5357
|
children
|
|
5179
5358
|
] });
|
|
5180
5359
|
if (href) {
|
|
5181
|
-
return /* @__PURE__ */
|
|
5360
|
+
return /* @__PURE__ */ jsx37("div", { ref, className: cn("flex items-center gap-2", className), ...props, children: /* @__PURE__ */ jsx37("a", { href, className: "flex items-center gap-2 hover:opacity-80 transition-opacity", children: content }) });
|
|
5182
5361
|
}
|
|
5183
|
-
return /* @__PURE__ */
|
|
5362
|
+
return /* @__PURE__ */ jsx37("div", { ref, className: cn("flex items-center gap-2", className), ...props, children: content });
|
|
5184
5363
|
}
|
|
5185
5364
|
);
|
|
5186
5365
|
TopBarBrand.displayName = "TopBarBrand";
|
|
5187
|
-
var TopBarNav =
|
|
5366
|
+
var TopBarNav = React37.forwardRef(
|
|
5188
5367
|
({ className, children, ...props }, ref) => {
|
|
5189
|
-
return /* @__PURE__ */
|
|
5368
|
+
return /* @__PURE__ */ jsx37(
|
|
5190
5369
|
"nav",
|
|
5191
5370
|
{
|
|
5192
5371
|
ref,
|
|
@@ -5198,9 +5377,9 @@ var TopBarNav = React36.forwardRef(
|
|
|
5198
5377
|
}
|
|
5199
5378
|
);
|
|
5200
5379
|
TopBarNav.displayName = "TopBarNav";
|
|
5201
|
-
var TopBarNavItem =
|
|
5380
|
+
var TopBarNavItem = React37.forwardRef(
|
|
5202
5381
|
({ className, active, children, ...props }, ref) => {
|
|
5203
|
-
return /* @__PURE__ */
|
|
5382
|
+
return /* @__PURE__ */ jsx37(
|
|
5204
5383
|
"a",
|
|
5205
5384
|
{
|
|
5206
5385
|
ref,
|
|
@@ -5216,9 +5395,9 @@ var TopBarNavItem = React36.forwardRef(
|
|
|
5216
5395
|
}
|
|
5217
5396
|
);
|
|
5218
5397
|
TopBarNavItem.displayName = "TopBarNavItem";
|
|
5219
|
-
var TopBarSection =
|
|
5398
|
+
var TopBarSection = React37.forwardRef(
|
|
5220
5399
|
({ className, align = "left", children, ...props }, ref) => {
|
|
5221
|
-
return /* @__PURE__ */
|
|
5400
|
+
return /* @__PURE__ */ jsx37(
|
|
5222
5401
|
"div",
|
|
5223
5402
|
{
|
|
5224
5403
|
ref,
|
|
@@ -5238,9 +5417,9 @@ var TopBarSection = React36.forwardRef(
|
|
|
5238
5417
|
}
|
|
5239
5418
|
);
|
|
5240
5419
|
TopBarSection.displayName = "TopBarSection";
|
|
5241
|
-
var TopBarDivider =
|
|
5420
|
+
var TopBarDivider = React37.forwardRef(
|
|
5242
5421
|
({ className, ...props }, ref) => {
|
|
5243
|
-
return /* @__PURE__ */
|
|
5422
|
+
return /* @__PURE__ */ jsx37(
|
|
5244
5423
|
"div",
|
|
5245
5424
|
{
|
|
5246
5425
|
ref,
|
|
@@ -5253,17 +5432,17 @@ var TopBarDivider = React36.forwardRef(
|
|
|
5253
5432
|
TopBarDivider.displayName = "TopBarDivider";
|
|
5254
5433
|
|
|
5255
5434
|
// src/components/sidebar.tsx
|
|
5256
|
-
import * as
|
|
5257
|
-
import { Fragment as Fragment5, jsx as
|
|
5258
|
-
var SidebarContext =
|
|
5435
|
+
import * as React38 from "react";
|
|
5436
|
+
import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5437
|
+
var SidebarContext = React38.createContext(void 0);
|
|
5259
5438
|
var useSidebar = () => {
|
|
5260
|
-
const context =
|
|
5439
|
+
const context = React38.useContext(SidebarContext);
|
|
5261
5440
|
if (!context) {
|
|
5262
5441
|
throw new Error("useSidebar must be used within a Sidebar");
|
|
5263
5442
|
}
|
|
5264
5443
|
return context;
|
|
5265
5444
|
};
|
|
5266
|
-
var Sidebar =
|
|
5445
|
+
var Sidebar = React38.forwardRef(
|
|
5267
5446
|
({
|
|
5268
5447
|
className,
|
|
5269
5448
|
collapsed: controlledCollapsed,
|
|
@@ -5275,10 +5454,10 @@ var Sidebar = React37.forwardRef(
|
|
|
5275
5454
|
children,
|
|
5276
5455
|
...props
|
|
5277
5456
|
}, ref) => {
|
|
5278
|
-
const [uncontrolledCollapsed, setUncontrolledCollapsed] =
|
|
5457
|
+
const [uncontrolledCollapsed, setUncontrolledCollapsed] = React38.useState(defaultCollapsed);
|
|
5279
5458
|
const isControlled = controlledCollapsed !== void 0;
|
|
5280
5459
|
const collapsed = isControlled ? controlledCollapsed : uncontrolledCollapsed;
|
|
5281
|
-
const setCollapsed =
|
|
5460
|
+
const setCollapsed = React38.useCallback(
|
|
5282
5461
|
(value) => {
|
|
5283
5462
|
if (!isControlled) {
|
|
5284
5463
|
setUncontrolledCollapsed(value);
|
|
@@ -5287,7 +5466,7 @@ var Sidebar = React37.forwardRef(
|
|
|
5287
5466
|
},
|
|
5288
5467
|
[isControlled, onCollapsedChange]
|
|
5289
5468
|
);
|
|
5290
|
-
return /* @__PURE__ */
|
|
5469
|
+
return /* @__PURE__ */ jsx38(SidebarContext.Provider, { value: { collapsed, setCollapsed }, children: /* @__PURE__ */ jsx38(
|
|
5291
5470
|
"aside",
|
|
5292
5471
|
{
|
|
5293
5472
|
ref,
|
|
@@ -5307,9 +5486,9 @@ var Sidebar = React37.forwardRef(
|
|
|
5307
5486
|
}
|
|
5308
5487
|
);
|
|
5309
5488
|
Sidebar.displayName = "Sidebar";
|
|
5310
|
-
var SidebarHeader =
|
|
5489
|
+
var SidebarHeader = React38.forwardRef(
|
|
5311
5490
|
({ className, children, ...props }, ref) => {
|
|
5312
|
-
return /* @__PURE__ */
|
|
5491
|
+
return /* @__PURE__ */ jsx38(
|
|
5313
5492
|
"div",
|
|
5314
5493
|
{
|
|
5315
5494
|
ref,
|
|
@@ -5321,9 +5500,9 @@ var SidebarHeader = React37.forwardRef(
|
|
|
5321
5500
|
}
|
|
5322
5501
|
);
|
|
5323
5502
|
SidebarHeader.displayName = "SidebarHeader";
|
|
5324
|
-
var SidebarContent =
|
|
5503
|
+
var SidebarContent = React38.forwardRef(
|
|
5325
5504
|
({ className, children, ...props }, ref) => {
|
|
5326
|
-
return /* @__PURE__ */
|
|
5505
|
+
return /* @__PURE__ */ jsx38(
|
|
5327
5506
|
"div",
|
|
5328
5507
|
{
|
|
5329
5508
|
ref,
|
|
@@ -5335,9 +5514,9 @@ var SidebarContent = React37.forwardRef(
|
|
|
5335
5514
|
}
|
|
5336
5515
|
);
|
|
5337
5516
|
SidebarContent.displayName = "SidebarContent";
|
|
5338
|
-
var SidebarFooter =
|
|
5517
|
+
var SidebarFooter = React38.forwardRef(
|
|
5339
5518
|
({ className, children, ...props }, ref) => {
|
|
5340
|
-
return /* @__PURE__ */
|
|
5519
|
+
return /* @__PURE__ */ jsx38(
|
|
5341
5520
|
"div",
|
|
5342
5521
|
{
|
|
5343
5522
|
ref,
|
|
@@ -5349,25 +5528,25 @@ var SidebarFooter = React37.forwardRef(
|
|
|
5349
5528
|
}
|
|
5350
5529
|
);
|
|
5351
5530
|
SidebarFooter.displayName = "SidebarFooter";
|
|
5352
|
-
var SidebarGroup =
|
|
5531
|
+
var SidebarGroup = React38.forwardRef(
|
|
5353
5532
|
({ className, label, children, ...props }, ref) => {
|
|
5354
5533
|
const { collapsed } = useSidebar();
|
|
5355
|
-
return /* @__PURE__ */
|
|
5356
|
-
label && !collapsed && /* @__PURE__ */
|
|
5357
|
-
label && collapsed && /* @__PURE__ */
|
|
5358
|
-
/* @__PURE__ */
|
|
5534
|
+
return /* @__PURE__ */ jsxs23("div", { ref, className: cn("px-2 py-2", className), ...props, children: [
|
|
5535
|
+
label && !collapsed && /* @__PURE__ */ jsx38("div", { className: "px-2 py-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
|
|
5536
|
+
label && collapsed && /* @__PURE__ */ jsx38("div", { className: "flex justify-center py-1.5", children: /* @__PURE__ */ jsx38("div", { className: "h-px w-4 bg-border" }) }),
|
|
5537
|
+
/* @__PURE__ */ jsx38("div", { className: "space-y-1", children })
|
|
5359
5538
|
] });
|
|
5360
5539
|
}
|
|
5361
5540
|
);
|
|
5362
5541
|
SidebarGroup.displayName = "SidebarGroup";
|
|
5363
|
-
var SidebarItem =
|
|
5542
|
+
var SidebarItem = React38.forwardRef(
|
|
5364
5543
|
({ className, icon, active, disabled, badge, onClick, href, children, ...props }, ref) => {
|
|
5365
5544
|
const { collapsed } = useSidebar();
|
|
5366
|
-
const content = /* @__PURE__ */
|
|
5367
|
-
icon && /* @__PURE__ */
|
|
5368
|
-
!collapsed && /* @__PURE__ */
|
|
5369
|
-
/* @__PURE__ */
|
|
5370
|
-
badge && /* @__PURE__ */
|
|
5545
|
+
const content = /* @__PURE__ */ jsxs23(Fragment5, { children: [
|
|
5546
|
+
icon && /* @__PURE__ */ jsx38("span", { className: cn("shrink-0", collapsed ? "mx-auto" : ""), children: icon }),
|
|
5547
|
+
!collapsed && /* @__PURE__ */ jsxs23(Fragment5, { children: [
|
|
5548
|
+
/* @__PURE__ */ jsx38("span", { className: "flex-1 truncate", children }),
|
|
5549
|
+
badge && /* @__PURE__ */ jsx38("span", { className: "shrink-0", children: badge })
|
|
5371
5550
|
] })
|
|
5372
5551
|
] });
|
|
5373
5552
|
const itemClasses = cn(
|
|
@@ -5378,9 +5557,9 @@ var SidebarItem = React37.forwardRef(
|
|
|
5378
5557
|
className
|
|
5379
5558
|
);
|
|
5380
5559
|
if (href) {
|
|
5381
|
-
return /* @__PURE__ */
|
|
5560
|
+
return /* @__PURE__ */ jsx38("div", { ref, ...props, children: /* @__PURE__ */ jsx38("a", { href, className: itemClasses, children: content }) });
|
|
5382
5561
|
}
|
|
5383
|
-
return /* @__PURE__ */
|
|
5562
|
+
return /* @__PURE__ */ jsx38(
|
|
5384
5563
|
"div",
|
|
5385
5564
|
{
|
|
5386
5565
|
ref,
|
|
@@ -5395,20 +5574,20 @@ var SidebarItem = React37.forwardRef(
|
|
|
5395
5574
|
}
|
|
5396
5575
|
);
|
|
5397
5576
|
SidebarItem.displayName = "SidebarItem";
|
|
5398
|
-
var SidebarSubMenu =
|
|
5577
|
+
var SidebarSubMenu = React38.forwardRef(
|
|
5399
5578
|
({ className, icon, label, defaultOpen = false, children, ...props }, ref) => {
|
|
5400
|
-
const [open, setOpen] =
|
|
5579
|
+
const [open, setOpen] = React38.useState(defaultOpen);
|
|
5401
5580
|
const { collapsed } = useSidebar();
|
|
5402
|
-
|
|
5581
|
+
React38.useEffect(() => {
|
|
5403
5582
|
if (collapsed) {
|
|
5404
5583
|
setOpen(false);
|
|
5405
5584
|
}
|
|
5406
5585
|
}, [collapsed]);
|
|
5407
5586
|
if (collapsed) {
|
|
5408
|
-
return /* @__PURE__ */
|
|
5587
|
+
return /* @__PURE__ */ jsx38(SidebarItem, { icon, className, children: label });
|
|
5409
5588
|
}
|
|
5410
|
-
return /* @__PURE__ */
|
|
5411
|
-
/* @__PURE__ */
|
|
5589
|
+
return /* @__PURE__ */ jsxs23("div", { ref, className, ...props, children: [
|
|
5590
|
+
/* @__PURE__ */ jsxs23(
|
|
5412
5591
|
"div",
|
|
5413
5592
|
{
|
|
5414
5593
|
className: cn(
|
|
@@ -5419,9 +5598,9 @@ var SidebarSubMenu = React37.forwardRef(
|
|
|
5419
5598
|
role: "button",
|
|
5420
5599
|
tabIndex: 0,
|
|
5421
5600
|
children: [
|
|
5422
|
-
icon && /* @__PURE__ */
|
|
5423
|
-
/* @__PURE__ */
|
|
5424
|
-
/* @__PURE__ */
|
|
5601
|
+
icon && /* @__PURE__ */ jsx38("span", { className: "shrink-0", children: icon }),
|
|
5602
|
+
/* @__PURE__ */ jsx38("span", { className: "flex-1 truncate", children: label }),
|
|
5603
|
+
/* @__PURE__ */ jsx38(
|
|
5425
5604
|
"svg",
|
|
5426
5605
|
{
|
|
5427
5606
|
className: cn("h-4 w-4 shrink-0 transition-transform", open && "rotate-90"),
|
|
@@ -5432,21 +5611,21 @@ var SidebarSubMenu = React37.forwardRef(
|
|
|
5432
5611
|
strokeWidth: "2",
|
|
5433
5612
|
strokeLinecap: "round",
|
|
5434
5613
|
strokeLinejoin: "round",
|
|
5435
|
-
children: /* @__PURE__ */
|
|
5614
|
+
children: /* @__PURE__ */ jsx38("path", { d: "m9 18 6-6-6-6" })
|
|
5436
5615
|
}
|
|
5437
5616
|
)
|
|
5438
5617
|
]
|
|
5439
5618
|
}
|
|
5440
5619
|
),
|
|
5441
|
-
open && /* @__PURE__ */
|
|
5620
|
+
open && /* @__PURE__ */ jsx38("div", { className: "ml-4 pl-3 border-l border-border space-y-1 mt-1", children })
|
|
5442
5621
|
] });
|
|
5443
5622
|
}
|
|
5444
5623
|
);
|
|
5445
5624
|
SidebarSubMenu.displayName = "SidebarSubMenu";
|
|
5446
|
-
var SidebarToggle =
|
|
5625
|
+
var SidebarToggle = React38.forwardRef(
|
|
5447
5626
|
({ className, children, ...props }, ref) => {
|
|
5448
5627
|
const { collapsed, setCollapsed } = useSidebar();
|
|
5449
|
-
return /* @__PURE__ */
|
|
5628
|
+
return /* @__PURE__ */ jsx38(
|
|
5450
5629
|
"button",
|
|
5451
5630
|
{
|
|
5452
5631
|
ref,
|
|
@@ -5460,7 +5639,7 @@ var SidebarToggle = React37.forwardRef(
|
|
|
5460
5639
|
),
|
|
5461
5640
|
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
5462
5641
|
...props,
|
|
5463
|
-
children: children || /* @__PURE__ */
|
|
5642
|
+
children: children || /* @__PURE__ */ jsxs23(
|
|
5464
5643
|
"svg",
|
|
5465
5644
|
{
|
|
5466
5645
|
className: cn("h-5 w-5 transition-transform", collapsed && "rotate-180"),
|
|
@@ -5472,9 +5651,9 @@ var SidebarToggle = React37.forwardRef(
|
|
|
5472
5651
|
strokeLinecap: "round",
|
|
5473
5652
|
strokeLinejoin: "round",
|
|
5474
5653
|
children: [
|
|
5475
|
-
/* @__PURE__ */
|
|
5476
|
-
/* @__PURE__ */
|
|
5477
|
-
/* @__PURE__ */
|
|
5654
|
+
/* @__PURE__ */ jsx38("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
5655
|
+
/* @__PURE__ */ jsx38("path", { d: "M9 3v18" }),
|
|
5656
|
+
/* @__PURE__ */ jsx38("path", { d: "m14 9 3 3-3 3" })
|
|
5478
5657
|
]
|
|
5479
5658
|
}
|
|
5480
5659
|
)
|
|
@@ -5485,17 +5664,17 @@ var SidebarToggle = React37.forwardRef(
|
|
|
5485
5664
|
SidebarToggle.displayName = "SidebarToggle";
|
|
5486
5665
|
|
|
5487
5666
|
// src/components/sidebar-rail.tsx
|
|
5488
|
-
import * as
|
|
5489
|
-
import { Fragment as Fragment6, jsx as
|
|
5490
|
-
var SidebarRailContext =
|
|
5667
|
+
import * as React39 from "react";
|
|
5668
|
+
import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5669
|
+
var SidebarRailContext = React39.createContext(void 0);
|
|
5491
5670
|
var useSidebarRail = () => {
|
|
5492
|
-
const context =
|
|
5671
|
+
const context = React39.useContext(SidebarRailContext);
|
|
5493
5672
|
if (!context) {
|
|
5494
5673
|
throw new Error("useSidebarRail must be used within a SidebarRail");
|
|
5495
5674
|
}
|
|
5496
5675
|
return context;
|
|
5497
5676
|
};
|
|
5498
|
-
var SidebarRail =
|
|
5677
|
+
var SidebarRail = React39.forwardRef(
|
|
5499
5678
|
({
|
|
5500
5679
|
className,
|
|
5501
5680
|
defaultActiveRail = null,
|
|
@@ -5513,14 +5692,14 @@ var SidebarRail = React38.forwardRef(
|
|
|
5513
5692
|
children,
|
|
5514
5693
|
...props
|
|
5515
5694
|
}, ref) => {
|
|
5516
|
-
const [uncontrolledActiveRail, setUncontrolledActiveRail] =
|
|
5517
|
-
const [expanded, setExpanded] =
|
|
5518
|
-
const [uncontrolledRailExpanded, setUncontrolledRailExpanded] =
|
|
5695
|
+
const [uncontrolledActiveRail, setUncontrolledActiveRail] = React39.useState(defaultActiveRail);
|
|
5696
|
+
const [expanded, setExpanded] = React39.useState(!!defaultActiveRail);
|
|
5697
|
+
const [uncontrolledRailExpanded, setUncontrolledRailExpanded] = React39.useState(defaultRailExpanded);
|
|
5519
5698
|
const isControlled = controlledActiveRail !== void 0;
|
|
5520
5699
|
const activeRail = isControlled ? controlledActiveRail : uncontrolledActiveRail;
|
|
5521
5700
|
const isRailControlled = controlledRailExpanded !== void 0;
|
|
5522
5701
|
const railExpanded = isRailControlled ? controlledRailExpanded : uncontrolledRailExpanded;
|
|
5523
|
-
const setActiveRail =
|
|
5702
|
+
const setActiveRail = React39.useCallback(
|
|
5524
5703
|
(rail) => {
|
|
5525
5704
|
if (!isControlled) {
|
|
5526
5705
|
setUncontrolledActiveRail(rail);
|
|
@@ -5530,7 +5709,7 @@ var SidebarRail = React38.forwardRef(
|
|
|
5530
5709
|
},
|
|
5531
5710
|
[isControlled, onActiveRailChange]
|
|
5532
5711
|
);
|
|
5533
|
-
const setRailExpanded =
|
|
5712
|
+
const setRailExpanded = React39.useCallback(
|
|
5534
5713
|
(value) => {
|
|
5535
5714
|
if (!isRailControlled) {
|
|
5536
5715
|
setUncontrolledRailExpanded(value);
|
|
@@ -5539,7 +5718,7 @@ var SidebarRail = React38.forwardRef(
|
|
|
5539
5718
|
},
|
|
5540
5719
|
[isRailControlled, onRailExpandedChange]
|
|
5541
5720
|
);
|
|
5542
|
-
return /* @__PURE__ */
|
|
5721
|
+
return /* @__PURE__ */ jsx39(
|
|
5543
5722
|
SidebarRailContext.Provider,
|
|
5544
5723
|
{
|
|
5545
5724
|
value: {
|
|
@@ -5553,7 +5732,7 @@ var SidebarRail = React38.forwardRef(
|
|
|
5553
5732
|
overlayRail: overlayRail && expandableRail,
|
|
5554
5733
|
expandableRail
|
|
5555
5734
|
},
|
|
5556
|
-
children: /* @__PURE__ */
|
|
5735
|
+
children: /* @__PURE__ */ jsx39(
|
|
5557
5736
|
"div",
|
|
5558
5737
|
{
|
|
5559
5738
|
ref,
|
|
@@ -5576,11 +5755,11 @@ var SidebarRail = React38.forwardRef(
|
|
|
5576
5755
|
}
|
|
5577
5756
|
);
|
|
5578
5757
|
SidebarRail.displayName = "SidebarRail";
|
|
5579
|
-
var IconRail =
|
|
5758
|
+
var IconRail = React39.forwardRef(
|
|
5580
5759
|
({ className, children, ...props }, ref) => {
|
|
5581
5760
|
const { railExpanded, overlayRail, expandableRail } = useSidebarRail();
|
|
5582
5761
|
const isExpanded = expandableRail && railExpanded;
|
|
5583
|
-
return /* @__PURE__ */
|
|
5762
|
+
return /* @__PURE__ */ jsx39(
|
|
5584
5763
|
"div",
|
|
5585
5764
|
{
|
|
5586
5765
|
ref,
|
|
@@ -5589,7 +5768,7 @@ var IconRail = React38.forwardRef(
|
|
|
5589
5768
|
isExpanded && !overlayRail ? "w-[var(--rail-expanded-width)]" : "w-[var(--rail-width)]"
|
|
5590
5769
|
),
|
|
5591
5770
|
...props,
|
|
5592
|
-
children: /* @__PURE__ */
|
|
5771
|
+
children: /* @__PURE__ */ jsx39(
|
|
5593
5772
|
"div",
|
|
5594
5773
|
{
|
|
5595
5774
|
className: cn(
|
|
@@ -5606,9 +5785,9 @@ var IconRail = React38.forwardRef(
|
|
|
5606
5785
|
}
|
|
5607
5786
|
);
|
|
5608
5787
|
IconRail.displayName = "IconRail";
|
|
5609
|
-
var IconRailHeader =
|
|
5788
|
+
var IconRailHeader = React39.forwardRef(
|
|
5610
5789
|
({ className, children, ...props }, ref) => {
|
|
5611
|
-
return /* @__PURE__ */
|
|
5790
|
+
return /* @__PURE__ */ jsx39(
|
|
5612
5791
|
"div",
|
|
5613
5792
|
{
|
|
5614
5793
|
ref,
|
|
@@ -5623,9 +5802,9 @@ var IconRailHeader = React38.forwardRef(
|
|
|
5623
5802
|
}
|
|
5624
5803
|
);
|
|
5625
5804
|
IconRailHeader.displayName = "IconRailHeader";
|
|
5626
|
-
var IconRailContent =
|
|
5805
|
+
var IconRailContent = React39.forwardRef(
|
|
5627
5806
|
({ className, children, ...props }, ref) => {
|
|
5628
|
-
return /* @__PURE__ */
|
|
5807
|
+
return /* @__PURE__ */ jsx39(
|
|
5629
5808
|
"div",
|
|
5630
5809
|
{
|
|
5631
5810
|
ref,
|
|
@@ -5637,9 +5816,9 @@ var IconRailContent = React38.forwardRef(
|
|
|
5637
5816
|
}
|
|
5638
5817
|
);
|
|
5639
5818
|
IconRailContent.displayName = "IconRailContent";
|
|
5640
|
-
var IconRailFooter =
|
|
5819
|
+
var IconRailFooter = React39.forwardRef(
|
|
5641
5820
|
({ className, children, ...props }, ref) => {
|
|
5642
|
-
return /* @__PURE__ */
|
|
5821
|
+
return /* @__PURE__ */ jsx39(
|
|
5643
5822
|
"div",
|
|
5644
5823
|
{
|
|
5645
5824
|
ref,
|
|
@@ -5654,7 +5833,7 @@ var IconRailFooter = React38.forwardRef(
|
|
|
5654
5833
|
}
|
|
5655
5834
|
);
|
|
5656
5835
|
IconRailFooter.displayName = "IconRailFooter";
|
|
5657
|
-
var IconRailItem =
|
|
5836
|
+
var IconRailItem = React39.forwardRef(
|
|
5658
5837
|
({ className, railId, icon, label, asButton = false, toggleRail = false, onClick, ...props }, ref) => {
|
|
5659
5838
|
const {
|
|
5660
5839
|
activeRail,
|
|
@@ -5680,7 +5859,7 @@ var IconRailItem = React38.forwardRef(
|
|
|
5680
5859
|
setActiveRail(railId);
|
|
5681
5860
|
}
|
|
5682
5861
|
};
|
|
5683
|
-
return /* @__PURE__ */
|
|
5862
|
+
return /* @__PURE__ */ jsxs24(
|
|
5684
5863
|
"button",
|
|
5685
5864
|
{
|
|
5686
5865
|
ref,
|
|
@@ -5699,14 +5878,14 @@ var IconRailItem = React38.forwardRef(
|
|
|
5699
5878
|
...props,
|
|
5700
5879
|
children: [
|
|
5701
5880
|
icon,
|
|
5702
|
-
isRailExpanded && label && /* @__PURE__ */
|
|
5881
|
+
isRailExpanded && label && /* @__PURE__ */ jsx39("span", { className: "text-sm font-medium truncate", children: label })
|
|
5703
5882
|
]
|
|
5704
5883
|
}
|
|
5705
5884
|
);
|
|
5706
5885
|
}
|
|
5707
5886
|
);
|
|
5708
5887
|
IconRailItem.displayName = "IconRailItem";
|
|
5709
|
-
var RailPanel =
|
|
5888
|
+
var RailPanel = React39.forwardRef(
|
|
5710
5889
|
({ className, railId, title, children, ...props }, ref) => {
|
|
5711
5890
|
const { activeRail, setActiveRail, hoverExpand } = useSidebarRail();
|
|
5712
5891
|
const isVisible = activeRail === railId;
|
|
@@ -5716,7 +5895,7 @@ var RailPanel = React38.forwardRef(
|
|
|
5716
5895
|
}
|
|
5717
5896
|
};
|
|
5718
5897
|
if (!isVisible) return null;
|
|
5719
|
-
return /* @__PURE__ */
|
|
5898
|
+
return /* @__PURE__ */ jsxs24(
|
|
5720
5899
|
"div",
|
|
5721
5900
|
{
|
|
5722
5901
|
ref,
|
|
@@ -5729,16 +5908,16 @@ var RailPanel = React38.forwardRef(
|
|
|
5729
5908
|
onMouseLeave: handleMouseLeave,
|
|
5730
5909
|
...props,
|
|
5731
5910
|
children: [
|
|
5732
|
-
title && /* @__PURE__ */
|
|
5733
|
-
/* @__PURE__ */
|
|
5734
|
-
/* @__PURE__ */
|
|
5911
|
+
title && /* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between h-14 px-4 border-b border-border shrink-0", children: [
|
|
5912
|
+
/* @__PURE__ */ jsx39("span", { className: "font-semibold text-sm", children: title }),
|
|
5913
|
+
/* @__PURE__ */ jsx39(
|
|
5735
5914
|
"button",
|
|
5736
5915
|
{
|
|
5737
5916
|
type: "button",
|
|
5738
5917
|
onClick: () => setActiveRail(null),
|
|
5739
5918
|
className: "p-1 rounded hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",
|
|
5740
5919
|
"aria-label": "Close panel",
|
|
5741
|
-
children: /* @__PURE__ */
|
|
5920
|
+
children: /* @__PURE__ */ jsxs24(
|
|
5742
5921
|
"svg",
|
|
5743
5922
|
{
|
|
5744
5923
|
className: "h-4 w-4",
|
|
@@ -5750,36 +5929,36 @@ var RailPanel = React38.forwardRef(
|
|
|
5750
5929
|
strokeLinecap: "round",
|
|
5751
5930
|
strokeLinejoin: "round",
|
|
5752
5931
|
children: [
|
|
5753
|
-
/* @__PURE__ */
|
|
5754
|
-
/* @__PURE__ */
|
|
5932
|
+
/* @__PURE__ */ jsx39("path", { d: "M18 6 6 18" }),
|
|
5933
|
+
/* @__PURE__ */ jsx39("path", { d: "m6 6 12 12" })
|
|
5755
5934
|
]
|
|
5756
5935
|
}
|
|
5757
5936
|
)
|
|
5758
5937
|
}
|
|
5759
5938
|
)
|
|
5760
5939
|
] }),
|
|
5761
|
-
/* @__PURE__ */
|
|
5940
|
+
/* @__PURE__ */ jsx39("div", { className: "flex-1 overflow-y-auto", children })
|
|
5762
5941
|
]
|
|
5763
5942
|
}
|
|
5764
5943
|
);
|
|
5765
5944
|
}
|
|
5766
5945
|
);
|
|
5767
5946
|
RailPanel.displayName = "RailPanel";
|
|
5768
|
-
var RailPanelGroup =
|
|
5947
|
+
var RailPanelGroup = React39.forwardRef(
|
|
5769
5948
|
({ className, label, children, ...props }, ref) => {
|
|
5770
|
-
return /* @__PURE__ */
|
|
5771
|
-
label && /* @__PURE__ */
|
|
5772
|
-
/* @__PURE__ */
|
|
5949
|
+
return /* @__PURE__ */ jsxs24("div", { ref, className: cn("px-2 py-2", className), ...props, children: [
|
|
5950
|
+
label && /* @__PURE__ */ jsx39("div", { className: "px-2 py-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
|
|
5951
|
+
/* @__PURE__ */ jsx39("div", { className: "space-y-1", children })
|
|
5773
5952
|
] });
|
|
5774
5953
|
}
|
|
5775
5954
|
);
|
|
5776
5955
|
RailPanelGroup.displayName = "RailPanelGroup";
|
|
5777
|
-
var RailPanelItem =
|
|
5956
|
+
var RailPanelItem = React39.forwardRef(
|
|
5778
5957
|
({ className, icon, active, disabled, badge, href, children, onClick, ...props }, ref) => {
|
|
5779
|
-
const content = /* @__PURE__ */
|
|
5780
|
-
icon && /* @__PURE__ */
|
|
5781
|
-
/* @__PURE__ */
|
|
5782
|
-
badge && /* @__PURE__ */
|
|
5958
|
+
const content = /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
5959
|
+
icon && /* @__PURE__ */ jsx39("span", { className: "shrink-0", children: icon }),
|
|
5960
|
+
/* @__PURE__ */ jsx39("span", { className: "flex-1 truncate", children }),
|
|
5961
|
+
badge && /* @__PURE__ */ jsx39("span", { className: "shrink-0", children: badge })
|
|
5783
5962
|
] });
|
|
5784
5963
|
const itemClasses = cn(
|
|
5785
5964
|
"flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors cursor-pointer",
|
|
@@ -5788,9 +5967,9 @@ var RailPanelItem = React38.forwardRef(
|
|
|
5788
5967
|
className
|
|
5789
5968
|
);
|
|
5790
5969
|
if (href) {
|
|
5791
|
-
return /* @__PURE__ */
|
|
5970
|
+
return /* @__PURE__ */ jsx39("div", { ref, ...props, children: /* @__PURE__ */ jsx39("a", { href, className: itemClasses, children: content }) });
|
|
5792
5971
|
}
|
|
5793
|
-
return /* @__PURE__ */
|
|
5972
|
+
return /* @__PURE__ */ jsx39(
|
|
5794
5973
|
"div",
|
|
5795
5974
|
{
|
|
5796
5975
|
ref,
|
|
@@ -5807,34 +5986,34 @@ var RailPanelItem = React38.forwardRef(
|
|
|
5807
5986
|
RailPanelItem.displayName = "RailPanelItem";
|
|
5808
5987
|
|
|
5809
5988
|
// src/playground.tsx
|
|
5810
|
-
import * as
|
|
5811
|
-
import { jsx as
|
|
5812
|
-
var Section = ({ title, children }) => /* @__PURE__ */
|
|
5813
|
-
/* @__PURE__ */
|
|
5814
|
-
/* @__PURE__ */
|
|
5989
|
+
import * as React40 from "react";
|
|
5990
|
+
import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5991
|
+
var Section = ({ title, children }) => /* @__PURE__ */ jsxs25("div", { className: "mb-8", children: [
|
|
5992
|
+
/* @__PURE__ */ jsx40("h2", { className: "text-xl font-semibold mb-4 text-foreground", children: title }),
|
|
5993
|
+
/* @__PURE__ */ jsx40("div", { className: "p-4 border border-border rounded-lg bg-background", children })
|
|
5815
5994
|
] });
|
|
5816
5995
|
var ThemeToggle = () => {
|
|
5817
5996
|
const { theme, setTheme } = useTheme();
|
|
5818
|
-
return /* @__PURE__ */
|
|
5819
|
-
/* @__PURE__ */
|
|
5820
|
-
/* @__PURE__ */
|
|
5821
|
-
/* @__PURE__ */
|
|
5822
|
-
/* @__PURE__ */
|
|
5823
|
-
/* @__PURE__ */
|
|
5824
|
-
/* @__PURE__ */
|
|
5825
|
-
/* @__PURE__ */
|
|
5997
|
+
return /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
5998
|
+
/* @__PURE__ */ jsx40(Label, { children: "Theme:" }),
|
|
5999
|
+
/* @__PURE__ */ jsxs25(SelectNamespace, { value: theme, onValueChange: (value) => setTheme(value), children: [
|
|
6000
|
+
/* @__PURE__ */ jsx40(SelectTrigger, { className: "w-32", children: /* @__PURE__ */ jsx40(SelectValue, { placeholder: "Select theme" }) }),
|
|
6001
|
+
/* @__PURE__ */ jsxs25(SelectContent, { children: [
|
|
6002
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "light", children: "Light" }),
|
|
6003
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "dark", children: "Dark" }),
|
|
6004
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "system", children: "System" })
|
|
5826
6005
|
] })
|
|
5827
6006
|
] })
|
|
5828
6007
|
] });
|
|
5829
6008
|
};
|
|
5830
6009
|
var PlaygroundContent = () => {
|
|
5831
|
-
const [dialogOpen, setDialogOpen] =
|
|
5832
|
-
const [checkboxChecked, setCheckboxChecked] =
|
|
5833
|
-
const [switchChecked, setSwitchChecked] =
|
|
5834
|
-
const [inputValue, setInputValue] =
|
|
5835
|
-
const [textareaValue, setTextareaValue] =
|
|
5836
|
-
const [selectValue, setSelectValue] =
|
|
5837
|
-
const [comboboxValue, setComboboxValue] =
|
|
6010
|
+
const [dialogOpen, setDialogOpen] = React40.useState(false);
|
|
6011
|
+
const [checkboxChecked, setCheckboxChecked] = React40.useState(false);
|
|
6012
|
+
const [switchChecked, setSwitchChecked] = React40.useState(false);
|
|
6013
|
+
const [inputValue, setInputValue] = React40.useState("");
|
|
6014
|
+
const [textareaValue, setTextareaValue] = React40.useState("");
|
|
6015
|
+
const [selectValue, setSelectValue] = React40.useState("");
|
|
6016
|
+
const [comboboxValue, setComboboxValue] = React40.useState(null);
|
|
5838
6017
|
const comboboxOptions = [
|
|
5839
6018
|
{ value: "react", label: "React" },
|
|
5840
6019
|
{ value: "vue", label: "Vue" },
|
|
@@ -5842,35 +6021,35 @@ var PlaygroundContent = () => {
|
|
|
5842
6021
|
{ value: "svelte", label: "Svelte" },
|
|
5843
6022
|
{ value: "solid", label: "SolidJS" }
|
|
5844
6023
|
];
|
|
5845
|
-
return /* @__PURE__ */
|
|
5846
|
-
/* @__PURE__ */
|
|
5847
|
-
/* @__PURE__ */
|
|
5848
|
-
/* @__PURE__ */
|
|
6024
|
+
return /* @__PURE__ */ jsx40("div", { className: "min-h-screen bg-background p-8", children: /* @__PURE__ */ jsxs25("div", { className: "max-w-4xl mx-auto", children: [
|
|
6025
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between mb-8", children: [
|
|
6026
|
+
/* @__PURE__ */ jsx40("h1", { className: "text-3xl font-bold text-foreground", children: "@onesaz/ui Playground" }),
|
|
6027
|
+
/* @__PURE__ */ jsx40(ThemeToggle, {})
|
|
5849
6028
|
] }),
|
|
5850
|
-
/* @__PURE__ */
|
|
5851
|
-
/* @__PURE__ */
|
|
5852
|
-
/* @__PURE__ */
|
|
5853
|
-
/* @__PURE__ */
|
|
5854
|
-
/* @__PURE__ */
|
|
5855
|
-
/* @__PURE__ */
|
|
5856
|
-
/* @__PURE__ */
|
|
5857
|
-
/* @__PURE__ */
|
|
6029
|
+
/* @__PURE__ */ jsxs25(Section, { title: "Button", children: [
|
|
6030
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex flex-wrap gap-4", children: [
|
|
6031
|
+
/* @__PURE__ */ jsx40(Button, { variant: "default", children: "Default" }),
|
|
6032
|
+
/* @__PURE__ */ jsx40(Button, { variant: "destructive", children: "Destructive" }),
|
|
6033
|
+
/* @__PURE__ */ jsx40(Button, { variant: "outline", children: "Outline" }),
|
|
6034
|
+
/* @__PURE__ */ jsx40(Button, { variant: "secondary", children: "Secondary" }),
|
|
6035
|
+
/* @__PURE__ */ jsx40(Button, { variant: "ghost", children: "Ghost" }),
|
|
6036
|
+
/* @__PURE__ */ jsx40(Button, { variant: "link", children: "Link" })
|
|
5858
6037
|
] }),
|
|
5859
|
-
/* @__PURE__ */
|
|
5860
|
-
/* @__PURE__ */
|
|
5861
|
-
/* @__PURE__ */
|
|
5862
|
-
/* @__PURE__ */
|
|
5863
|
-
/* @__PURE__ */
|
|
6038
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex flex-wrap gap-4 mt-4", children: [
|
|
6039
|
+
/* @__PURE__ */ jsx40(Button, { size: "sm", children: "Small" }),
|
|
6040
|
+
/* @__PURE__ */ jsx40(Button, { size: "default", children: "Default" }),
|
|
6041
|
+
/* @__PURE__ */ jsx40(Button, { size: "lg", children: "Large" }),
|
|
6042
|
+
/* @__PURE__ */ jsx40(Button, { size: "icon", children: "\u{1F514}" })
|
|
5864
6043
|
] }),
|
|
5865
|
-
/* @__PURE__ */
|
|
5866
|
-
/* @__PURE__ */
|
|
5867
|
-
/* @__PURE__ */
|
|
6044
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex flex-wrap gap-4 mt-4", children: [
|
|
6045
|
+
/* @__PURE__ */ jsx40(Button, { disabled: true, children: "Disabled" }),
|
|
6046
|
+
/* @__PURE__ */ jsx40(Button, { variant: "outline", disabled: true, children: "Disabled Outline" })
|
|
5868
6047
|
] })
|
|
5869
6048
|
] }),
|
|
5870
|
-
/* @__PURE__ */
|
|
5871
|
-
/* @__PURE__ */
|
|
5872
|
-
/* @__PURE__ */
|
|
5873
|
-
/* @__PURE__ */
|
|
6049
|
+
/* @__PURE__ */ jsx40(Section, { title: "Input", children: /* @__PURE__ */ jsxs25("div", { className: "space-y-4 max-w-md", children: [
|
|
6050
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6051
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "input-default", children: "Default Input" }),
|
|
6052
|
+
/* @__PURE__ */ jsx40(
|
|
5874
6053
|
Input,
|
|
5875
6054
|
{
|
|
5876
6055
|
id: "input-default",
|
|
@@ -5880,19 +6059,19 @@ var PlaygroundContent = () => {
|
|
|
5880
6059
|
}
|
|
5881
6060
|
)
|
|
5882
6061
|
] }),
|
|
5883
|
-
/* @__PURE__ */
|
|
5884
|
-
/* @__PURE__ */
|
|
5885
|
-
/* @__PURE__ */
|
|
6062
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6063
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "input-disabled", children: "Disabled Input" }),
|
|
6064
|
+
/* @__PURE__ */ jsx40(Input, { id: "input-disabled", placeholder: "Disabled...", disabled: true })
|
|
5886
6065
|
] }),
|
|
5887
|
-
/* @__PURE__ */
|
|
5888
|
-
/* @__PURE__ */
|
|
5889
|
-
/* @__PURE__ */
|
|
6066
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6067
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "input-type", children: "Email Input" }),
|
|
6068
|
+
/* @__PURE__ */ jsx40(Input, { id: "input-type", type: "email", placeholder: "email@example.com" })
|
|
5890
6069
|
] })
|
|
5891
6070
|
] }) }),
|
|
5892
|
-
/* @__PURE__ */
|
|
5893
|
-
/* @__PURE__ */
|
|
5894
|
-
/* @__PURE__ */
|
|
5895
|
-
/* @__PURE__ */
|
|
6071
|
+
/* @__PURE__ */ jsx40(Section, { title: "Textarea", children: /* @__PURE__ */ jsxs25("div", { className: "space-y-4 max-w-md", children: [
|
|
6072
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6073
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "textarea-default", children: "Default Textarea" }),
|
|
6074
|
+
/* @__PURE__ */ jsx40(
|
|
5896
6075
|
Textarea,
|
|
5897
6076
|
{
|
|
5898
6077
|
id: "textarea-default",
|
|
@@ -5902,52 +6081,52 @@ var PlaygroundContent = () => {
|
|
|
5902
6081
|
}
|
|
5903
6082
|
)
|
|
5904
6083
|
] }),
|
|
5905
|
-
/* @__PURE__ */
|
|
5906
|
-
/* @__PURE__ */
|
|
5907
|
-
/* @__PURE__ */
|
|
6084
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6085
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "textarea-disabled", children: "Disabled Textarea" }),
|
|
6086
|
+
/* @__PURE__ */ jsx40(Textarea, { id: "textarea-disabled", placeholder: "Disabled...", disabled: true })
|
|
5908
6087
|
] })
|
|
5909
6088
|
] }) }),
|
|
5910
|
-
/* @__PURE__ */
|
|
5911
|
-
/* @__PURE__ */
|
|
5912
|
-
/* @__PURE__ */
|
|
5913
|
-
/* @__PURE__ */
|
|
5914
|
-
/* @__PURE__ */
|
|
5915
|
-
/* @__PURE__ */
|
|
5916
|
-
/* @__PURE__ */
|
|
5917
|
-
/* @__PURE__ */
|
|
5918
|
-
/* @__PURE__ */
|
|
6089
|
+
/* @__PURE__ */ jsx40(Section, { title: "Select", children: /* @__PURE__ */ jsxs25("div", { className: "space-y-4 max-w-md", children: [
|
|
6090
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6091
|
+
/* @__PURE__ */ jsx40(Label, { children: "Default Select" }),
|
|
6092
|
+
/* @__PURE__ */ jsxs25(SelectNamespace, { value: selectValue, onValueChange: setSelectValue, children: [
|
|
6093
|
+
/* @__PURE__ */ jsx40(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx40(SelectValue, { placeholder: "Select an option..." }) }),
|
|
6094
|
+
/* @__PURE__ */ jsxs25(SelectContent, { children: [
|
|
6095
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "option1", children: "Option 1" }),
|
|
6096
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "option2", children: "Option 2" }),
|
|
6097
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "option3", children: "Option 3" })
|
|
5919
6098
|
] })
|
|
5920
6099
|
] })
|
|
5921
6100
|
] }),
|
|
5922
|
-
/* @__PURE__ */
|
|
5923
|
-
/* @__PURE__ */
|
|
5924
|
-
/* @__PURE__ */
|
|
5925
|
-
/* @__PURE__ */
|
|
5926
|
-
/* @__PURE__ */
|
|
5927
|
-
/* @__PURE__ */
|
|
5928
|
-
/* @__PURE__ */
|
|
5929
|
-
/* @__PURE__ */
|
|
5930
|
-
/* @__PURE__ */
|
|
6101
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6102
|
+
/* @__PURE__ */ jsx40(Label, { children: "Grouped Select" }),
|
|
6103
|
+
/* @__PURE__ */ jsxs25(SelectNamespace, { children: [
|
|
6104
|
+
/* @__PURE__ */ jsx40(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx40(SelectValue, { placeholder: "Select a food..." }) }),
|
|
6105
|
+
/* @__PURE__ */ jsxs25(SelectContent, { children: [
|
|
6106
|
+
/* @__PURE__ */ jsxs25(SelectGroup, { children: [
|
|
6107
|
+
/* @__PURE__ */ jsx40(SelectLabel, { children: "Fruits" }),
|
|
6108
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "apple", children: "Apple" }),
|
|
6109
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "banana", children: "Banana" })
|
|
5931
6110
|
] }),
|
|
5932
|
-
/* @__PURE__ */
|
|
5933
|
-
/* @__PURE__ */
|
|
5934
|
-
/* @__PURE__ */
|
|
5935
|
-
/* @__PURE__ */
|
|
6111
|
+
/* @__PURE__ */ jsxs25(SelectGroup, { children: [
|
|
6112
|
+
/* @__PURE__ */ jsx40(SelectLabel, { children: "Vegetables" }),
|
|
6113
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "carrot", children: "Carrot" }),
|
|
6114
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "potato", children: "Potato" })
|
|
5936
6115
|
] })
|
|
5937
6116
|
] })
|
|
5938
6117
|
] })
|
|
5939
6118
|
] }),
|
|
5940
|
-
/* @__PURE__ */
|
|
5941
|
-
/* @__PURE__ */
|
|
5942
|
-
/* @__PURE__ */
|
|
5943
|
-
/* @__PURE__ */
|
|
5944
|
-
/* @__PURE__ */
|
|
6119
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6120
|
+
/* @__PURE__ */ jsx40(Label, { children: "Disabled Select" }),
|
|
6121
|
+
/* @__PURE__ */ jsxs25(SelectNamespace, { disabled: true, children: [
|
|
6122
|
+
/* @__PURE__ */ jsx40(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx40(SelectValue, { placeholder: "Disabled..." }) }),
|
|
6123
|
+
/* @__PURE__ */ jsx40(SelectContent, { children: /* @__PURE__ */ jsx40(SelectItem, { value: "none", children: "None" }) })
|
|
5945
6124
|
] })
|
|
5946
6125
|
] })
|
|
5947
6126
|
] }) }),
|
|
5948
|
-
/* @__PURE__ */
|
|
5949
|
-
/* @__PURE__ */
|
|
5950
|
-
/* @__PURE__ */
|
|
6127
|
+
/* @__PURE__ */ jsx40(Section, { title: "Combobox (Searchable Select)", children: /* @__PURE__ */ jsx40("div", { className: "space-y-4 max-w-md", children: /* @__PURE__ */ jsxs25("div", { children: [
|
|
6128
|
+
/* @__PURE__ */ jsx40(Label, { children: "Framework" }),
|
|
6129
|
+
/* @__PURE__ */ jsx40(
|
|
5951
6130
|
Combobox,
|
|
5952
6131
|
{
|
|
5953
6132
|
options: comboboxOptions,
|
|
@@ -5959,9 +6138,9 @@ var PlaygroundContent = () => {
|
|
|
5959
6138
|
}
|
|
5960
6139
|
)
|
|
5961
6140
|
] }) }) }),
|
|
5962
|
-
/* @__PURE__ */
|
|
5963
|
-
/* @__PURE__ */
|
|
5964
|
-
/* @__PURE__ */
|
|
6141
|
+
/* @__PURE__ */ jsx40(Section, { title: "Checkbox & Switch", children: /* @__PURE__ */ jsxs25("div", { className: "space-y-4", children: [
|
|
6142
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
6143
|
+
/* @__PURE__ */ jsx40(
|
|
5965
6144
|
Checkbox,
|
|
5966
6145
|
{
|
|
5967
6146
|
id: "checkbox",
|
|
@@ -5969,15 +6148,15 @@ var PlaygroundContent = () => {
|
|
|
5969
6148
|
onChange: (e) => setCheckboxChecked(e.target.checked)
|
|
5970
6149
|
}
|
|
5971
6150
|
),
|
|
5972
|
-
/* @__PURE__ */
|
|
6151
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "checkbox", children: "Accept terms and conditions" })
|
|
5973
6152
|
] }),
|
|
5974
|
-
/* @__PURE__ */
|
|
5975
|
-
/* @__PURE__ */
|
|
5976
|
-
/* @__PURE__ */
|
|
6153
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
6154
|
+
/* @__PURE__ */ jsx40(Checkbox, { id: "checkbox-disabled", disabled: true }),
|
|
6155
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "checkbox-disabled", children: "Disabled checkbox" })
|
|
5977
6156
|
] }),
|
|
5978
|
-
/* @__PURE__ */
|
|
5979
|
-
/* @__PURE__ */
|
|
5980
|
-
/* @__PURE__ */
|
|
6157
|
+
/* @__PURE__ */ jsx40(Separator, {}),
|
|
6158
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
6159
|
+
/* @__PURE__ */ jsx40(
|
|
5981
6160
|
Switch,
|
|
5982
6161
|
{
|
|
5983
6162
|
id: "switch",
|
|
@@ -5985,160 +6164,160 @@ var PlaygroundContent = () => {
|
|
|
5985
6164
|
onChange: (e) => setSwitchChecked(e.target.checked)
|
|
5986
6165
|
}
|
|
5987
6166
|
),
|
|
5988
|
-
/* @__PURE__ */
|
|
6167
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "switch", children: "Enable notifications" })
|
|
5989
6168
|
] }),
|
|
5990
|
-
/* @__PURE__ */
|
|
5991
|
-
/* @__PURE__ */
|
|
5992
|
-
/* @__PURE__ */
|
|
6169
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
6170
|
+
/* @__PURE__ */ jsx40(Switch, { id: "switch-disabled", disabled: true }),
|
|
6171
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "switch-disabled", children: "Disabled switch" })
|
|
5993
6172
|
] })
|
|
5994
6173
|
] }) }),
|
|
5995
|
-
/* @__PURE__ */
|
|
5996
|
-
/* @__PURE__ */
|
|
5997
|
-
/* @__PURE__ */
|
|
5998
|
-
/* @__PURE__ */
|
|
5999
|
-
/* @__PURE__ */
|
|
6174
|
+
/* @__PURE__ */ jsx40(Section, { title: "Badge", children: /* @__PURE__ */ jsxs25("div", { className: "flex flex-wrap gap-4", children: [
|
|
6175
|
+
/* @__PURE__ */ jsx40(Badge, { children: "Default" }),
|
|
6176
|
+
/* @__PURE__ */ jsx40(Badge, { variant: "secondary", children: "Secondary" }),
|
|
6177
|
+
/* @__PURE__ */ jsx40(Badge, { variant: "destructive", children: "Destructive" }),
|
|
6178
|
+
/* @__PURE__ */ jsx40(Badge, { variant: "outline", children: "Outline" })
|
|
6000
6179
|
] }) }),
|
|
6001
|
-
/* @__PURE__ */
|
|
6002
|
-
/* @__PURE__ */
|
|
6003
|
-
/* @__PURE__ */
|
|
6004
|
-
/* @__PURE__ */
|
|
6005
|
-
/* @__PURE__ */
|
|
6180
|
+
/* @__PURE__ */ jsx40(Section, { title: "Card", children: /* @__PURE__ */ jsxs25("div", { className: "grid gap-4 md:grid-cols-2", children: [
|
|
6181
|
+
/* @__PURE__ */ jsxs25(Card, { children: [
|
|
6182
|
+
/* @__PURE__ */ jsxs25(CardHeader, { children: [
|
|
6183
|
+
/* @__PURE__ */ jsx40(CardTitle, { children: "Card Title" }),
|
|
6184
|
+
/* @__PURE__ */ jsx40(CardDescription, { children: "Card description goes here" })
|
|
6006
6185
|
] }),
|
|
6007
|
-
/* @__PURE__ */
|
|
6008
|
-
/* @__PURE__ */
|
|
6009
|
-
/* @__PURE__ */
|
|
6010
|
-
/* @__PURE__ */
|
|
6186
|
+
/* @__PURE__ */ jsx40(CardContent, { children: /* @__PURE__ */ jsx40("p", { className: "text-foreground", children: "This is the card content area." }) }),
|
|
6187
|
+
/* @__PURE__ */ jsxs25(CardFooter, { children: [
|
|
6188
|
+
/* @__PURE__ */ jsx40(Button, { variant: "outline", className: "mr-2", children: "Cancel" }),
|
|
6189
|
+
/* @__PURE__ */ jsx40(Button, { children: "Submit" })
|
|
6011
6190
|
] })
|
|
6012
6191
|
] }),
|
|
6013
|
-
/* @__PURE__ */
|
|
6014
|
-
/* @__PURE__ */
|
|
6015
|
-
/* @__PURE__ */
|
|
6016
|
-
/* @__PURE__ */
|
|
6192
|
+
/* @__PURE__ */ jsxs25(Card, { children: [
|
|
6193
|
+
/* @__PURE__ */ jsxs25(CardHeader, { children: [
|
|
6194
|
+
/* @__PURE__ */ jsx40(CardTitle, { children: "Another Card" }),
|
|
6195
|
+
/* @__PURE__ */ jsx40(CardDescription, { children: "With different content" })
|
|
6017
6196
|
] }),
|
|
6018
|
-
/* @__PURE__ */
|
|
6019
|
-
/* @__PURE__ */
|
|
6020
|
-
/* @__PURE__ */
|
|
6197
|
+
/* @__PURE__ */ jsx40(CardContent, { children: /* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
|
|
6198
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "card-input", children: "Name" }),
|
|
6199
|
+
/* @__PURE__ */ jsx40(Input, { id: "card-input", placeholder: "Enter name..." })
|
|
6021
6200
|
] }) }),
|
|
6022
|
-
/* @__PURE__ */
|
|
6201
|
+
/* @__PURE__ */ jsx40(CardFooter, { children: /* @__PURE__ */ jsx40(Button, { className: "w-full", children: "Save" }) })
|
|
6023
6202
|
] })
|
|
6024
6203
|
] }) }),
|
|
6025
|
-
/* @__PURE__ */
|
|
6026
|
-
/* @__PURE__ */
|
|
6027
|
-
/* @__PURE__ */
|
|
6028
|
-
/* @__PURE__ */
|
|
6029
|
-
/* @__PURE__ */
|
|
6030
|
-
/* @__PURE__ */
|
|
6204
|
+
/* @__PURE__ */ jsxs25(Section, { title: "Dialog", children: [
|
|
6205
|
+
/* @__PURE__ */ jsx40(Button, { onClick: () => setDialogOpen(true), children: "Open Dialog" }),
|
|
6206
|
+
/* @__PURE__ */ jsx40(DialogNamespace, { open: dialogOpen, onOpenChange: setDialogOpen, children: /* @__PURE__ */ jsxs25(DialogContent, { children: [
|
|
6207
|
+
/* @__PURE__ */ jsxs25(DialogHeader, { children: [
|
|
6208
|
+
/* @__PURE__ */ jsx40(DialogTitle, { children: "Create New Zone" }),
|
|
6209
|
+
/* @__PURE__ */ jsx40(DialogDescription, { children: "Fill in the details below to create a new zone." })
|
|
6031
6210
|
] }),
|
|
6032
|
-
/* @__PURE__ */
|
|
6033
|
-
/* @__PURE__ */
|
|
6034
|
-
/* @__PURE__ */
|
|
6035
|
-
/* @__PURE__ */
|
|
6036
|
-
/* @__PURE__ */
|
|
6211
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-4 py-4", children: [
|
|
6212
|
+
/* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6213
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6214
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "zone-name", children: "Zone Name *" }),
|
|
6215
|
+
/* @__PURE__ */ jsx40(Input, { id: "zone-name", placeholder: "eg:hyderabad" })
|
|
6037
6216
|
] }),
|
|
6038
|
-
/* @__PURE__ */
|
|
6039
|
-
/* @__PURE__ */
|
|
6040
|
-
/* @__PURE__ */
|
|
6217
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6218
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "zone-code", children: "Zone Code *" }),
|
|
6219
|
+
/* @__PURE__ */ jsx40(Input, { id: "zone-code", placeholder: "eg :hyd022" })
|
|
6041
6220
|
] })
|
|
6042
6221
|
] }),
|
|
6043
|
-
/* @__PURE__ */
|
|
6044
|
-
/* @__PURE__ */
|
|
6045
|
-
/* @__PURE__ */
|
|
6046
|
-
/* @__PURE__ */
|
|
6047
|
-
/* @__PURE__ */
|
|
6048
|
-
/* @__PURE__ */
|
|
6049
|
-
/* @__PURE__ */
|
|
6050
|
-
/* @__PURE__ */
|
|
6222
|
+
/* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6223
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6224
|
+
/* @__PURE__ */ jsx40(Label, { children: "State *" }),
|
|
6225
|
+
/* @__PURE__ */ jsxs25(SelectNamespace, { children: [
|
|
6226
|
+
/* @__PURE__ */ jsx40(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx40(SelectValue, { placeholder: "Select state" }) }),
|
|
6227
|
+
/* @__PURE__ */ jsxs25(SelectContent, { children: [
|
|
6228
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "telangana", children: "TELANGANA" }),
|
|
6229
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "andhra", children: "ANDHRA PRADESH" })
|
|
6051
6230
|
] })
|
|
6052
6231
|
] })
|
|
6053
6232
|
] }),
|
|
6054
|
-
/* @__PURE__ */
|
|
6055
|
-
/* @__PURE__ */
|
|
6056
|
-
/* @__PURE__ */
|
|
6057
|
-
/* @__PURE__ */
|
|
6058
|
-
/* @__PURE__ */
|
|
6059
|
-
/* @__PURE__ */
|
|
6060
|
-
/* @__PURE__ */
|
|
6233
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6234
|
+
/* @__PURE__ */ jsx40(Label, { children: "District *" }),
|
|
6235
|
+
/* @__PURE__ */ jsxs25(SelectNamespace, { children: [
|
|
6236
|
+
/* @__PURE__ */ jsx40(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx40(SelectValue, { placeholder: "Select District" }) }),
|
|
6237
|
+
/* @__PURE__ */ jsxs25(SelectContent, { children: [
|
|
6238
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "hyderabad", children: "HYDERABAD" }),
|
|
6239
|
+
/* @__PURE__ */ jsx40(SelectItem, { value: "rangareddy", children: "RANGAREDDY" })
|
|
6061
6240
|
] })
|
|
6062
6241
|
] })
|
|
6063
6242
|
] })
|
|
6064
6243
|
] })
|
|
6065
6244
|
] }),
|
|
6066
|
-
/* @__PURE__ */
|
|
6067
|
-
/* @__PURE__ */
|
|
6068
|
-
/* @__PURE__ */
|
|
6245
|
+
/* @__PURE__ */ jsxs25(DialogFooter, { children: [
|
|
6246
|
+
/* @__PURE__ */ jsx40(Button, { variant: "outline", onClick: () => setDialogOpen(false), children: "CANCEL" }),
|
|
6247
|
+
/* @__PURE__ */ jsx40(Button, { onClick: () => setDialogOpen(false), children: "Create" })
|
|
6069
6248
|
] })
|
|
6070
6249
|
] }) })
|
|
6071
6250
|
] }),
|
|
6072
|
-
/* @__PURE__ */
|
|
6073
|
-
/* @__PURE__ */
|
|
6074
|
-
/* @__PURE__ */
|
|
6075
|
-
/* @__PURE__ */
|
|
6076
|
-
/* @__PURE__ */
|
|
6077
|
-
/* @__PURE__ */
|
|
6078
|
-
/* @__PURE__ */
|
|
6251
|
+
/* @__PURE__ */ jsx40(Section, { title: "Table", children: /* @__PURE__ */ jsxs25(TableNamespace, { children: [
|
|
6252
|
+
/* @__PURE__ */ jsx40(TableCaption, { children: "A list of recent invoices" }),
|
|
6253
|
+
/* @__PURE__ */ jsx40(TableHeader, { children: /* @__PURE__ */ jsxs25(TableRow, { children: [
|
|
6254
|
+
/* @__PURE__ */ jsx40(TableHead, { children: "Invoice" }),
|
|
6255
|
+
/* @__PURE__ */ jsx40(TableHead, { children: "Status" }),
|
|
6256
|
+
/* @__PURE__ */ jsx40(TableHead, { children: "Method" }),
|
|
6257
|
+
/* @__PURE__ */ jsx40(TableHead, { className: "text-right", children: "Amount" })
|
|
6079
6258
|
] }) }),
|
|
6080
|
-
/* @__PURE__ */
|
|
6081
|
-
/* @__PURE__ */
|
|
6082
|
-
/* @__PURE__ */
|
|
6083
|
-
/* @__PURE__ */
|
|
6084
|
-
/* @__PURE__ */
|
|
6085
|
-
/* @__PURE__ */
|
|
6259
|
+
/* @__PURE__ */ jsxs25(TableBody, { children: [
|
|
6260
|
+
/* @__PURE__ */ jsxs25(TableRow, { children: [
|
|
6261
|
+
/* @__PURE__ */ jsx40(TableCell, { children: "INV001" }),
|
|
6262
|
+
/* @__PURE__ */ jsx40(TableCell, { children: /* @__PURE__ */ jsx40(Badge, { children: "Paid" }) }),
|
|
6263
|
+
/* @__PURE__ */ jsx40(TableCell, { children: "Credit Card" }),
|
|
6264
|
+
/* @__PURE__ */ jsx40(TableCell, { className: "text-right", children: "$250.00" })
|
|
6086
6265
|
] }),
|
|
6087
|
-
/* @__PURE__ */
|
|
6088
|
-
/* @__PURE__ */
|
|
6089
|
-
/* @__PURE__ */
|
|
6090
|
-
/* @__PURE__ */
|
|
6091
|
-
/* @__PURE__ */
|
|
6266
|
+
/* @__PURE__ */ jsxs25(TableRow, { children: [
|
|
6267
|
+
/* @__PURE__ */ jsx40(TableCell, { children: "INV002" }),
|
|
6268
|
+
/* @__PURE__ */ jsx40(TableCell, { children: /* @__PURE__ */ jsx40(Badge, { variant: "secondary", children: "Pending" }) }),
|
|
6269
|
+
/* @__PURE__ */ jsx40(TableCell, { children: "PayPal" }),
|
|
6270
|
+
/* @__PURE__ */ jsx40(TableCell, { className: "text-right", children: "$150.00" })
|
|
6092
6271
|
] }),
|
|
6093
|
-
/* @__PURE__ */
|
|
6094
|
-
/* @__PURE__ */
|
|
6095
|
-
/* @__PURE__ */
|
|
6096
|
-
/* @__PURE__ */
|
|
6097
|
-
/* @__PURE__ */
|
|
6272
|
+
/* @__PURE__ */ jsxs25(TableRow, { children: [
|
|
6273
|
+
/* @__PURE__ */ jsx40(TableCell, { children: "INV003" }),
|
|
6274
|
+
/* @__PURE__ */ jsx40(TableCell, { children: /* @__PURE__ */ jsx40(Badge, { variant: "destructive", children: "Failed" }) }),
|
|
6275
|
+
/* @__PURE__ */ jsx40(TableCell, { children: "Bank Transfer" }),
|
|
6276
|
+
/* @__PURE__ */ jsx40(TableCell, { className: "text-right", children: "$350.00" })
|
|
6098
6277
|
] })
|
|
6099
6278
|
] })
|
|
6100
6279
|
] }) }),
|
|
6101
|
-
/* @__PURE__ */
|
|
6102
|
-
/* @__PURE__ */
|
|
6103
|
-
/* @__PURE__ */
|
|
6104
|
-
/* @__PURE__ */
|
|
6105
|
-
/* @__PURE__ */
|
|
6106
|
-
/* @__PURE__ */
|
|
6107
|
-
/* @__PURE__ */
|
|
6280
|
+
/* @__PURE__ */ jsx40(Section, { title: "Pagination", children: /* @__PURE__ */ jsx40(PaginationNamespace, { children: /* @__PURE__ */ jsxs25(PaginationContent, { children: [
|
|
6281
|
+
/* @__PURE__ */ jsx40(PaginationItem, { children: /* @__PURE__ */ jsx40(PaginationPrevious, { onClick: () => console.log("Previous") }) }),
|
|
6282
|
+
/* @__PURE__ */ jsx40(PaginationItem, { children: /* @__PURE__ */ jsx40(PaginationLink, { isActive: true, children: "1" }) }),
|
|
6283
|
+
/* @__PURE__ */ jsx40(PaginationItem, { children: /* @__PURE__ */ jsx40(PaginationLink, { children: "2" }) }),
|
|
6284
|
+
/* @__PURE__ */ jsx40(PaginationItem, { children: /* @__PURE__ */ jsx40(PaginationLink, { children: "3" }) }),
|
|
6285
|
+
/* @__PURE__ */ jsx40(PaginationItem, { children: /* @__PURE__ */ jsx40(PaginationEllipsis, {}) }),
|
|
6286
|
+
/* @__PURE__ */ jsx40(PaginationItem, { children: /* @__PURE__ */ jsx40(PaginationNext, { onClick: () => console.log("Next") }) })
|
|
6108
6287
|
] }) }) }),
|
|
6109
|
-
/* @__PURE__ */
|
|
6110
|
-
/* @__PURE__ */
|
|
6111
|
-
/* @__PURE__ */
|
|
6112
|
-
/* @__PURE__ */
|
|
6288
|
+
/* @__PURE__ */ jsx40(Section, { title: "Spinner", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-8", children: [
|
|
6289
|
+
/* @__PURE__ */ jsxs25("div", { className: "text-center", children: [
|
|
6290
|
+
/* @__PURE__ */ jsx40(Spinner, { size: "sm" }),
|
|
6291
|
+
/* @__PURE__ */ jsx40("p", { className: "text-sm text-muted-foreground mt-2", children: "Small" })
|
|
6113
6292
|
] }),
|
|
6114
|
-
/* @__PURE__ */
|
|
6115
|
-
/* @__PURE__ */
|
|
6116
|
-
/* @__PURE__ */
|
|
6293
|
+
/* @__PURE__ */ jsxs25("div", { className: "text-center", children: [
|
|
6294
|
+
/* @__PURE__ */ jsx40(Spinner, { size: "default" }),
|
|
6295
|
+
/* @__PURE__ */ jsx40("p", { className: "text-sm text-muted-foreground mt-2", children: "Default" })
|
|
6117
6296
|
] }),
|
|
6118
|
-
/* @__PURE__ */
|
|
6119
|
-
/* @__PURE__ */
|
|
6120
|
-
/* @__PURE__ */
|
|
6297
|
+
/* @__PURE__ */ jsxs25("div", { className: "text-center", children: [
|
|
6298
|
+
/* @__PURE__ */ jsx40(Spinner, { size: "lg" }),
|
|
6299
|
+
/* @__PURE__ */ jsx40("p", { className: "text-sm text-muted-foreground mt-2", children: "Large" })
|
|
6121
6300
|
] })
|
|
6122
6301
|
] }) }),
|
|
6123
|
-
/* @__PURE__ */
|
|
6124
|
-
/* @__PURE__ */
|
|
6125
|
-
/* @__PURE__ */
|
|
6126
|
-
/* @__PURE__ */
|
|
6127
|
-
/* @__PURE__ */
|
|
6128
|
-
/* @__PURE__ */
|
|
6129
|
-
/* @__PURE__ */
|
|
6130
|
-
/* @__PURE__ */
|
|
6302
|
+
/* @__PURE__ */ jsx40(Section, { title: "Separator", children: /* @__PURE__ */ jsxs25("div", { className: "space-y-4", children: [
|
|
6303
|
+
/* @__PURE__ */ jsx40("p", { className: "text-foreground", children: "Content above separator" }),
|
|
6304
|
+
/* @__PURE__ */ jsx40(Separator, {}),
|
|
6305
|
+
/* @__PURE__ */ jsx40("p", { className: "text-foreground", children: "Content below separator" }),
|
|
6306
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center h-10", children: [
|
|
6307
|
+
/* @__PURE__ */ jsx40("span", { className: "text-foreground", children: "Left" }),
|
|
6308
|
+
/* @__PURE__ */ jsx40(Separator, { orientation: "vertical", className: "mx-4" }),
|
|
6309
|
+
/* @__PURE__ */ jsx40("span", { className: "text-foreground", children: "Right" })
|
|
6131
6310
|
] })
|
|
6132
6311
|
] }) }),
|
|
6133
|
-
/* @__PURE__ */
|
|
6134
|
-
/* @__PURE__ */
|
|
6135
|
-
/* @__PURE__ */
|
|
6136
|
-
/* @__PURE__ */
|
|
6137
|
-
/* @__PURE__ */
|
|
6312
|
+
/* @__PURE__ */ jsx40(Section, { title: "Typography & Colors", children: /* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
|
|
6313
|
+
/* @__PURE__ */ jsx40("p", { className: "text-foreground", children: "text-foreground - Primary text color" }),
|
|
6314
|
+
/* @__PURE__ */ jsx40("p", { className: "text-muted-foreground", children: "text-muted-foreground - Muted text color" }),
|
|
6315
|
+
/* @__PURE__ */ jsx40("p", { className: "text-accent", children: "text-accent - Accent color" }),
|
|
6316
|
+
/* @__PURE__ */ jsx40("p", { className: "text-destructive", children: "text-destructive - Destructive color" })
|
|
6138
6317
|
] }) })
|
|
6139
6318
|
] }) });
|
|
6140
6319
|
};
|
|
6141
|
-
var Playground = () => /* @__PURE__ */
|
|
6320
|
+
var Playground = () => /* @__PURE__ */ jsx40(ThemeProvider, { defaultTheme: "light", children: /* @__PURE__ */ jsx40(PlaygroundContent, {}) });
|
|
6142
6321
|
export {
|
|
6143
6322
|
Alert,
|
|
6144
6323
|
AlertDescription,
|
|
@@ -6235,7 +6414,7 @@ export {
|
|
|
6235
6414
|
InputAdornment,
|
|
6236
6415
|
Label,
|
|
6237
6416
|
LinearProgress,
|
|
6238
|
-
List,
|
|
6417
|
+
List2 as List,
|
|
6239
6418
|
ListDivider,
|
|
6240
6419
|
ListItem,
|
|
6241
6420
|
ListItemAvatar,
|
|
@@ -6306,6 +6485,10 @@ export {
|
|
|
6306
6485
|
TableHead,
|
|
6307
6486
|
TableHeader,
|
|
6308
6487
|
TableRow,
|
|
6488
|
+
Tabs,
|
|
6489
|
+
TabsContent,
|
|
6490
|
+
TabsList,
|
|
6491
|
+
TabsTrigger,
|
|
6309
6492
|
Text,
|
|
6310
6493
|
TextField,
|
|
6311
6494
|
Textarea,
|
|
@@ -6325,7 +6508,15 @@ export {
|
|
|
6325
6508
|
TopBarNavItem,
|
|
6326
6509
|
TopBarSection,
|
|
6327
6510
|
Typography,
|
|
6511
|
+
UnderlineTabsContent,
|
|
6512
|
+
UnderlineTabsList,
|
|
6513
|
+
UnderlineTabsTrigger,
|
|
6328
6514
|
VStack,
|
|
6515
|
+
VerticalTabs,
|
|
6516
|
+
VerticalTabsContent,
|
|
6517
|
+
VerticalTabsGroupLabel,
|
|
6518
|
+
VerticalTabsList,
|
|
6519
|
+
VerticalTabsTrigger,
|
|
6329
6520
|
cn,
|
|
6330
6521
|
useFormControl,
|
|
6331
6522
|
useSidebar,
|