@onesaz/ui 0.3.5 → 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 +40 -12
- package/dist/index.js +901 -689
- 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,47 +3156,65 @@ var Combobox = React30.forwardRef(
|
|
|
2977
3156
|
} = props;
|
|
2978
3157
|
const labelKey = props.labelKey ?? "label";
|
|
2979
3158
|
const valueKey = props.valueKey ?? "value";
|
|
2980
|
-
const
|
|
2981
|
-
|
|
2982
|
-
if (typeof option === "string")
|
|
2983
|
-
return { label: option, value: option };
|
|
2984
|
-
}
|
|
3159
|
+
const getOptionLabel = React31.useCallback(
|
|
3160
|
+
(option) => {
|
|
3161
|
+
if (typeof option === "string") return option;
|
|
2985
3162
|
const record = option;
|
|
2986
3163
|
const maybeLabel = record[labelKey];
|
|
3164
|
+
return typeof maybeLabel === "string" ? maybeLabel : String(maybeLabel ?? "");
|
|
3165
|
+
},
|
|
3166
|
+
[labelKey]
|
|
3167
|
+
);
|
|
3168
|
+
const getOptionValue = React31.useCallback(
|
|
3169
|
+
(option) => {
|
|
3170
|
+
if (typeof option === "string") return option;
|
|
3171
|
+
const record = option;
|
|
2987
3172
|
const maybeValue = record[valueKey];
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
const
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
3173
|
+
if (maybeValue !== void 0 && maybeValue !== null) {
|
|
3174
|
+
return String(maybeValue);
|
|
3175
|
+
}
|
|
3176
|
+
return getOptionLabel(option);
|
|
3177
|
+
},
|
|
3178
|
+
[valueKey, getOptionLabel]
|
|
3179
|
+
);
|
|
3180
|
+
const normalizedOptions = React31.useMemo(
|
|
3181
|
+
() => (options ?? []).map((option) => ({
|
|
3182
|
+
raw: option,
|
|
3183
|
+
label: getOptionLabel(option),
|
|
3184
|
+
value: getOptionValue(option),
|
|
3185
|
+
disabled: Boolean(option.disabled)
|
|
3186
|
+
})),
|
|
3187
|
+
[options, getOptionLabel, getOptionValue]
|
|
3188
|
+
);
|
|
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);
|
|
2999
3193
|
const isMultiple = isMultipleProps(props);
|
|
3000
3194
|
const selectAll = isMultiple ? props.selectAll ?? false : false;
|
|
3001
3195
|
const selectAllLabel = isMultiple ? props.selectAllLabel ?? "Select all" : "Select all";
|
|
3002
|
-
const [internalSingleValue, setInternalSingleValue] =
|
|
3003
|
-
const [internalMultiValue, setInternalMultiValue] =
|
|
3196
|
+
const [internalSingleValue, setInternalSingleValue] = React31.useState(!isMultiple ? props.defaultValue ?? null : null);
|
|
3197
|
+
const [internalMultiValue, setInternalMultiValue] = React31.useState(isMultiple ? props.defaultValue ?? [] : []);
|
|
3004
3198
|
const singleValue = !isMultiple ? props.value !== void 0 ? props.value : internalSingleValue : null;
|
|
3005
3199
|
const multiValue = isMultiple ? props.value !== void 0 ? props.value : internalMultiValue : [];
|
|
3006
3200
|
const search = props.inputValue !== void 0 ? props.inputValue : internalSearch;
|
|
3007
|
-
const filteredOptions =
|
|
3201
|
+
const filteredOptions = React31.useMemo(() => {
|
|
3008
3202
|
if (!search) return normalizedOptions;
|
|
3009
3203
|
return normalizedOptions.filter(
|
|
3010
3204
|
(option) => option.label.toLowerCase().includes(search.toLowerCase())
|
|
3011
3205
|
);
|
|
3012
3206
|
}, [normalizedOptions, search]);
|
|
3013
3207
|
const selectedOptions = isMultiple ? multiValue : [];
|
|
3014
|
-
const
|
|
3208
|
+
const selectedValueKeys = React31.useMemo(
|
|
3209
|
+
() => new Set(selectedOptions.map((option) => getOptionValue(option))),
|
|
3210
|
+
[selectedOptions, getOptionValue]
|
|
3211
|
+
);
|
|
3212
|
+
const singleValueKey = singleValue ? getOptionValue(singleValue) : null;
|
|
3213
|
+
const selectableOptions = React31.useMemo(
|
|
3015
3214
|
() => normalizedOptions.filter((option) => !option.disabled),
|
|
3016
3215
|
[normalizedOptions]
|
|
3017
3216
|
);
|
|
3018
|
-
const allSelected = isMultiple && selectableOptions.length > 0 && selectableOptions.every(
|
|
3019
|
-
(option) => multiValue.some((item) => item.value === option.value)
|
|
3020
|
-
);
|
|
3217
|
+
const allSelected = isMultiple && selectableOptions.length > 0 && selectableOptions.every((option) => selectedValueKeys.has(option.value));
|
|
3021
3218
|
const handleSingleSelect = (option) => {
|
|
3022
3219
|
if (!isMultiple) {
|
|
3023
3220
|
if (props.value === void 0) {
|
|
@@ -3032,8 +3229,9 @@ var Combobox = React30.forwardRef(
|
|
|
3032
3229
|
};
|
|
3033
3230
|
const handleMultiSelect = (option) => {
|
|
3034
3231
|
if (isMultiple) {
|
|
3035
|
-
const
|
|
3036
|
-
const
|
|
3232
|
+
const optionKey = getOptionValue(option);
|
|
3233
|
+
const exists = multiValue.some((item) => getOptionValue(item) === optionKey);
|
|
3234
|
+
const newValue = exists ? multiValue.filter((item) => getOptionValue(item) !== optionKey) : [...multiValue, option];
|
|
3037
3235
|
if (props.value === void 0) {
|
|
3038
3236
|
setInternalMultiValue(newValue);
|
|
3039
3237
|
}
|
|
@@ -3043,7 +3241,7 @@ var Combobox = React30.forwardRef(
|
|
|
3043
3241
|
const handleRemoveItem = (optionValue, e) => {
|
|
3044
3242
|
e.stopPropagation();
|
|
3045
3243
|
if (isMultiple) {
|
|
3046
|
-
const newValue = multiValue.filter((v) => v
|
|
3244
|
+
const newValue = multiValue.filter((v) => getOptionValue(v) !== optionValue);
|
|
3047
3245
|
if (props.value === void 0) {
|
|
3048
3246
|
setInternalMultiValue(newValue);
|
|
3049
3247
|
}
|
|
@@ -3064,9 +3262,9 @@ var Combobox = React30.forwardRef(
|
|
|
3064
3262
|
if (!isMultiple) return;
|
|
3065
3263
|
const nextValue = allSelected ? [] : selectableOptions;
|
|
3066
3264
|
if (props.value === void 0) {
|
|
3067
|
-
setInternalMultiValue(nextValue);
|
|
3265
|
+
setInternalMultiValue(nextValue.map((option) => option.raw));
|
|
3068
3266
|
}
|
|
3069
|
-
props.onChange?.(nextValue);
|
|
3267
|
+
props.onChange?.(nextValue.map((option) => option.raw));
|
|
3070
3268
|
};
|
|
3071
3269
|
const handleClearSingle = (e) => {
|
|
3072
3270
|
e.stopPropagation();
|
|
@@ -3080,7 +3278,7 @@ var Combobox = React30.forwardRef(
|
|
|
3080
3278
|
}
|
|
3081
3279
|
}
|
|
3082
3280
|
};
|
|
3083
|
-
|
|
3281
|
+
React31.useEffect(() => {
|
|
3084
3282
|
const handleClickOutside = (event) => {
|
|
3085
3283
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
3086
3284
|
setOpen(false);
|
|
@@ -3089,12 +3287,12 @@ var Combobox = React30.forwardRef(
|
|
|
3089
3287
|
document.addEventListener("mousedown", handleClickOutside);
|
|
3090
3288
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3091
3289
|
}, []);
|
|
3092
|
-
|
|
3290
|
+
React31.useEffect(() => {
|
|
3093
3291
|
if (open) {
|
|
3094
3292
|
searchInputRef.current?.focus();
|
|
3095
3293
|
}
|
|
3096
3294
|
}, [open]);
|
|
3097
|
-
|
|
3295
|
+
React31.useImperativeHandle(
|
|
3098
3296
|
ref,
|
|
3099
3297
|
() => searchInputRef.current,
|
|
3100
3298
|
[]
|
|
@@ -3105,8 +3303,8 @@ var Combobox = React30.forwardRef(
|
|
|
3105
3303
|
const maxDisplayItems = isMultiple ? props.maxDisplayItems ?? 3 : 0;
|
|
3106
3304
|
const displayedOptions = selectedOptions.slice(0, maxDisplayItems);
|
|
3107
3305
|
const remainingCount = selectedOptions.length - maxDisplayItems;
|
|
3108
|
-
return /* @__PURE__ */
|
|
3109
|
-
/* @__PURE__ */
|
|
3306
|
+
return /* @__PURE__ */ jsxs16("div", { ref: containerRef, className: "relative", children: [
|
|
3307
|
+
/* @__PURE__ */ jsxs16(
|
|
3110
3308
|
"button",
|
|
3111
3309
|
{
|
|
3112
3310
|
type: "button",
|
|
@@ -3123,20 +3321,20 @@ var Combobox = React30.forwardRef(
|
|
|
3123
3321
|
className
|
|
3124
3322
|
),
|
|
3125
3323
|
children: [
|
|
3126
|
-
isMultiple ? /* @__PURE__ */
|
|
3127
|
-
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(
|
|
3128
3326
|
"span",
|
|
3129
3327
|
{
|
|
3130
3328
|
className: "inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs font-medium",
|
|
3131
3329
|
children: [
|
|
3132
|
-
option
|
|
3133
|
-
/* @__PURE__ */
|
|
3330
|
+
getOptionLabel(option),
|
|
3331
|
+
/* @__PURE__ */ jsx31(
|
|
3134
3332
|
"button",
|
|
3135
3333
|
{
|
|
3136
3334
|
type: "button",
|
|
3137
|
-
onClick: (e) => handleRemoveItem(option
|
|
3335
|
+
onClick: (e) => handleRemoveItem(getOptionValue(option), e),
|
|
3138
3336
|
className: "ml-1 rounded-full hover:bg-background/50",
|
|
3139
|
-
children: /* @__PURE__ */
|
|
3337
|
+
children: /* @__PURE__ */ jsx31(
|
|
3140
3338
|
"svg",
|
|
3141
3339
|
{
|
|
3142
3340
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3148,29 +3346,29 @@ var Combobox = React30.forwardRef(
|
|
|
3148
3346
|
strokeWidth: "2",
|
|
3149
3347
|
strokeLinecap: "round",
|
|
3150
3348
|
strokeLinejoin: "round",
|
|
3151
|
-
children: /* @__PURE__ */
|
|
3349
|
+
children: /* @__PURE__ */ jsx31("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
3152
3350
|
}
|
|
3153
3351
|
)
|
|
3154
3352
|
}
|
|
3155
3353
|
)
|
|
3156
3354
|
]
|
|
3157
3355
|
},
|
|
3158
|
-
option
|
|
3356
|
+
getOptionValue(option)
|
|
3159
3357
|
)),
|
|
3160
|
-
remainingCount > 0 && /* @__PURE__ */
|
|
3358
|
+
remainingCount > 0 && /* @__PURE__ */ jsxs16("span", { className: "text-xs text-muted-foreground", children: [
|
|
3161
3359
|
"+",
|
|
3162
3360
|
remainingCount,
|
|
3163
3361
|
" more"
|
|
3164
3362
|
] })
|
|
3165
|
-
] }) }) : /* @__PURE__ */
|
|
3166
|
-
/* @__PURE__ */
|
|
3167
|
-
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(
|
|
3168
3366
|
"button",
|
|
3169
3367
|
{
|
|
3170
3368
|
type: "button",
|
|
3171
3369
|
onClick: handleClearAll,
|
|
3172
3370
|
className: "rounded p-0.5 hover:bg-muted",
|
|
3173
|
-
children: /* @__PURE__ */
|
|
3371
|
+
children: /* @__PURE__ */ jsx31(
|
|
3174
3372
|
"svg",
|
|
3175
3373
|
{
|
|
3176
3374
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3183,19 +3381,19 @@ var Combobox = React30.forwardRef(
|
|
|
3183
3381
|
strokeLinecap: "round",
|
|
3184
3382
|
strokeLinejoin: "round",
|
|
3185
3383
|
className: "opacity-50 hover:opacity-100",
|
|
3186
|
-
children: /* @__PURE__ */
|
|
3384
|
+
children: /* @__PURE__ */ jsx31("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
3187
3385
|
}
|
|
3188
3386
|
)
|
|
3189
3387
|
}
|
|
3190
3388
|
),
|
|
3191
|
-
!isMultiple && clearable && singleValue && /* @__PURE__ */
|
|
3389
|
+
!isMultiple && clearable && singleValue && /* @__PURE__ */ jsx31(
|
|
3192
3390
|
"button",
|
|
3193
3391
|
{
|
|
3194
3392
|
type: "button",
|
|
3195
3393
|
onClick: handleClearSingle,
|
|
3196
3394
|
className: "rounded p-0.5 hover:bg-muted",
|
|
3197
3395
|
"aria-label": "Clear selection",
|
|
3198
|
-
children: /* @__PURE__ */
|
|
3396
|
+
children: /* @__PURE__ */ jsx31(
|
|
3199
3397
|
"svg",
|
|
3200
3398
|
{
|
|
3201
3399
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3208,12 +3406,12 @@ var Combobox = React30.forwardRef(
|
|
|
3208
3406
|
strokeLinecap: "round",
|
|
3209
3407
|
strokeLinejoin: "round",
|
|
3210
3408
|
className: "opacity-50 hover:opacity-100",
|
|
3211
|
-
children: /* @__PURE__ */
|
|
3409
|
+
children: /* @__PURE__ */ jsx31("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
3212
3410
|
}
|
|
3213
3411
|
)
|
|
3214
3412
|
}
|
|
3215
3413
|
),
|
|
3216
|
-
/* @__PURE__ */
|
|
3414
|
+
/* @__PURE__ */ jsx31(
|
|
3217
3415
|
"svg",
|
|
3218
3416
|
{
|
|
3219
3417
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3229,16 +3427,16 @@ var Combobox = React30.forwardRef(
|
|
|
3229
3427
|
"h-4 w-4 shrink-0 opacity-50 transition-transform",
|
|
3230
3428
|
open && "rotate-180"
|
|
3231
3429
|
),
|
|
3232
|
-
children: /* @__PURE__ */
|
|
3430
|
+
children: /* @__PURE__ */ jsx31("path", { d: "m6 9 6 6 6-6" })
|
|
3233
3431
|
}
|
|
3234
3432
|
)
|
|
3235
3433
|
] })
|
|
3236
3434
|
]
|
|
3237
3435
|
}
|
|
3238
3436
|
),
|
|
3239
|
-
open && /* @__PURE__ */
|
|
3240
|
-
/* @__PURE__ */
|
|
3241
|
-
/* @__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(
|
|
3242
3440
|
"svg",
|
|
3243
3441
|
{
|
|
3244
3442
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3252,12 +3450,12 @@ var Combobox = React30.forwardRef(
|
|
|
3252
3450
|
strokeLinejoin: "round",
|
|
3253
3451
|
className: "mr-2 h-4 w-4 shrink-0 opacity-50",
|
|
3254
3452
|
children: [
|
|
3255
|
-
/* @__PURE__ */
|
|
3256
|
-
/* @__PURE__ */
|
|
3453
|
+
/* @__PURE__ */ jsx31("circle", { cx: "11", cy: "11", r: "8" }),
|
|
3454
|
+
/* @__PURE__ */ jsx31("path", { d: "m21 21-4.3-4.3" })
|
|
3257
3455
|
]
|
|
3258
3456
|
}
|
|
3259
3457
|
),
|
|
3260
|
-
/* @__PURE__ */
|
|
3458
|
+
/* @__PURE__ */ jsx31(
|
|
3261
3459
|
"input",
|
|
3262
3460
|
{
|
|
3263
3461
|
ref: setSearchRef,
|
|
@@ -3276,8 +3474,8 @@ var Combobox = React30.forwardRef(
|
|
|
3276
3474
|
}
|
|
3277
3475
|
)
|
|
3278
3476
|
] }),
|
|
3279
|
-
/* @__PURE__ */
|
|
3280
|
-
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(
|
|
3281
3479
|
"button",
|
|
3282
3480
|
{
|
|
3283
3481
|
type: "button",
|
|
@@ -3289,14 +3487,14 @@ var Combobox = React30.forwardRef(
|
|
|
3289
3487
|
allSelected && "bg-muted"
|
|
3290
3488
|
),
|
|
3291
3489
|
children: [
|
|
3292
|
-
/* @__PURE__ */
|
|
3490
|
+
/* @__PURE__ */ jsx31("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx31(
|
|
3293
3491
|
"div",
|
|
3294
3492
|
{
|
|
3295
3493
|
className: cn(
|
|
3296
3494
|
"flex h-4 w-4 items-center justify-center rounded border border-input",
|
|
3297
3495
|
allSelected && "bg-accent border-accent"
|
|
3298
3496
|
),
|
|
3299
|
-
children: allSelected && /* @__PURE__ */
|
|
3497
|
+
children: allSelected && /* @__PURE__ */ jsx31(
|
|
3300
3498
|
"svg",
|
|
3301
3499
|
{
|
|
3302
3500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3309,7 +3507,7 @@ var Combobox = React30.forwardRef(
|
|
|
3309
3507
|
strokeLinecap: "round",
|
|
3310
3508
|
strokeLinejoin: "round",
|
|
3311
3509
|
className: "h-3 w-3",
|
|
3312
|
-
children: /* @__PURE__ */
|
|
3510
|
+
children: /* @__PURE__ */ jsx31("polyline", { points: "20 6 9 17 4 12" })
|
|
3313
3511
|
}
|
|
3314
3512
|
)
|
|
3315
3513
|
}
|
|
@@ -3319,13 +3517,13 @@ var Combobox = React30.forwardRef(
|
|
|
3319
3517
|
}
|
|
3320
3518
|
),
|
|
3321
3519
|
filteredOptions.map((option) => {
|
|
3322
|
-
const isSelected = isMultiple ?
|
|
3323
|
-
return /* @__PURE__ */
|
|
3520
|
+
const isSelected = isMultiple ? selectedValueKeys.has(option.value) : option.value === singleValueKey;
|
|
3521
|
+
return /* @__PURE__ */ jsxs16(
|
|
3324
3522
|
"button",
|
|
3325
3523
|
{
|
|
3326
3524
|
type: "button",
|
|
3327
3525
|
disabled: option.disabled,
|
|
3328
|
-
onClick: () => isMultiple ? handleMultiSelect(option) : handleSingleSelect(option),
|
|
3526
|
+
onClick: () => isMultiple ? handleMultiSelect(option.raw) : handleSingleSelect(option.raw),
|
|
3329
3527
|
className: cn(
|
|
3330
3528
|
"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none",
|
|
3331
3529
|
"hover:bg-muted hover:text-foreground",
|
|
@@ -3334,16 +3532,16 @@ var Combobox = React30.forwardRef(
|
|
|
3334
3532
|
isSelected && "bg-muted"
|
|
3335
3533
|
),
|
|
3336
3534
|
children: [
|
|
3337
|
-
/* @__PURE__ */
|
|
3535
|
+
/* @__PURE__ */ jsx31("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: isMultiple ? (
|
|
3338
3536
|
// Checkbox for multi-select
|
|
3339
|
-
/* @__PURE__ */
|
|
3537
|
+
/* @__PURE__ */ jsx31(
|
|
3340
3538
|
"div",
|
|
3341
3539
|
{
|
|
3342
3540
|
className: cn(
|
|
3343
3541
|
"flex h-4 w-4 items-center justify-center rounded border border-input",
|
|
3344
3542
|
isSelected && "bg-accent border-accent"
|
|
3345
3543
|
),
|
|
3346
|
-
children: isSelected && /* @__PURE__ */
|
|
3544
|
+
children: isSelected && /* @__PURE__ */ jsx31(
|
|
3347
3545
|
"svg",
|
|
3348
3546
|
{
|
|
3349
3547
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3356,14 +3554,14 @@ var Combobox = React30.forwardRef(
|
|
|
3356
3554
|
strokeLinecap: "round",
|
|
3357
3555
|
strokeLinejoin: "round",
|
|
3358
3556
|
className: "h-3 w-3",
|
|
3359
|
-
children: /* @__PURE__ */
|
|
3557
|
+
children: /* @__PURE__ */ jsx31("polyline", { points: "20 6 9 17 4 12" })
|
|
3360
3558
|
}
|
|
3361
3559
|
)
|
|
3362
3560
|
}
|
|
3363
3561
|
)
|
|
3364
3562
|
) : (
|
|
3365
3563
|
// Checkmark for single-select
|
|
3366
|
-
isSelected && /* @__PURE__ */
|
|
3564
|
+
isSelected && /* @__PURE__ */ jsx31(
|
|
3367
3565
|
"svg",
|
|
3368
3566
|
{
|
|
3369
3567
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3376,7 +3574,7 @@ var Combobox = React30.forwardRef(
|
|
|
3376
3574
|
strokeLinecap: "round",
|
|
3377
3575
|
strokeLinejoin: "round",
|
|
3378
3576
|
className: "h-4 w-4",
|
|
3379
|
-
children: /* @__PURE__ */
|
|
3577
|
+
children: /* @__PURE__ */ jsx31("polyline", { points: "20 6 9 17 4 12" })
|
|
3380
3578
|
}
|
|
3381
3579
|
)
|
|
3382
3580
|
) }),
|
|
@@ -3394,7 +3592,7 @@ var Combobox = React30.forwardRef(
|
|
|
3394
3592
|
Combobox.displayName = "Combobox";
|
|
3395
3593
|
|
|
3396
3594
|
// src/components/data-grid/index.tsx
|
|
3397
|
-
import * as
|
|
3595
|
+
import * as React32 from "react";
|
|
3398
3596
|
import {
|
|
3399
3597
|
useReactTable,
|
|
3400
3598
|
getCoreRowModel,
|
|
@@ -3404,13 +3602,13 @@ import {
|
|
|
3404
3602
|
flexRender
|
|
3405
3603
|
} from "@tanstack/react-table";
|
|
3406
3604
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
3407
|
-
import { jsx as
|
|
3605
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3408
3606
|
function convertColumns(columns, checkboxSelection) {
|
|
3409
3607
|
const tanstackColumns = [];
|
|
3410
3608
|
if (checkboxSelection) {
|
|
3411
3609
|
tanstackColumns.push({
|
|
3412
3610
|
id: "__select__",
|
|
3413
|
-
header: ({ table }) => /* @__PURE__ */
|
|
3611
|
+
header: ({ table }) => /* @__PURE__ */ jsx32("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx32(
|
|
3414
3612
|
Checkbox,
|
|
3415
3613
|
{
|
|
3416
3614
|
checked: table.getIsAllPageRowsSelected(),
|
|
@@ -3418,7 +3616,7 @@ function convertColumns(columns, checkboxSelection) {
|
|
|
3418
3616
|
"aria-label": "Select all"
|
|
3419
3617
|
}
|
|
3420
3618
|
) }),
|
|
3421
|
-
cell: ({ row }) => /* @__PURE__ */
|
|
3619
|
+
cell: ({ row }) => /* @__PURE__ */ jsx32("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx32(
|
|
3422
3620
|
Checkbox,
|
|
3423
3621
|
{
|
|
3424
3622
|
checked: row.getIsSelected(),
|
|
@@ -3540,7 +3738,7 @@ function calculateInitialColumnWidths(columns, containerWidth, checkboxSelection
|
|
|
3540
3738
|
return widthMap;
|
|
3541
3739
|
}
|
|
3542
3740
|
function useColumnWidths(columns, containerWidth, checkboxSelection, columnSizing) {
|
|
3543
|
-
return
|
|
3741
|
+
return React32.useMemo(
|
|
3544
3742
|
() => calculateInitialColumnWidths(columns, containerWidth, checkboxSelection, columnSizing),
|
|
3545
3743
|
[columns, containerWidth, checkboxSelection, columnSizing]
|
|
3546
3744
|
);
|
|
@@ -3549,7 +3747,7 @@ var ColumnResizeHandle = ({
|
|
|
3549
3747
|
header,
|
|
3550
3748
|
isResizing
|
|
3551
3749
|
}) => {
|
|
3552
|
-
return /* @__PURE__ */
|
|
3750
|
+
return /* @__PURE__ */ jsx32(
|
|
3553
3751
|
"div",
|
|
3554
3752
|
{
|
|
3555
3753
|
className: cn(
|
|
@@ -3568,16 +3766,16 @@ var ColumnResizeHandle = ({
|
|
|
3568
3766
|
};
|
|
3569
3767
|
var SortIcon = ({ direction }) => {
|
|
3570
3768
|
if (!direction) {
|
|
3571
|
-
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" }) });
|
|
3572
3770
|
}
|
|
3573
|
-
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" }) });
|
|
3574
3772
|
};
|
|
3575
3773
|
var ColumnVisibilityDropdown = ({
|
|
3576
3774
|
table
|
|
3577
3775
|
}) => {
|
|
3578
|
-
const [open, setOpen] =
|
|
3579
|
-
const dropdownRef =
|
|
3580
|
-
|
|
3776
|
+
const [open, setOpen] = React32.useState(false);
|
|
3777
|
+
const dropdownRef = React32.useRef(null);
|
|
3778
|
+
React32.useEffect(() => {
|
|
3581
3779
|
const handleClickOutside = (event) => {
|
|
3582
3780
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
3583
3781
|
setOpen(false);
|
|
@@ -3587,8 +3785,8 @@ var ColumnVisibilityDropdown = ({
|
|
|
3587
3785
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3588
3786
|
}, []);
|
|
3589
3787
|
const allColumns = table.getAllLeafColumns().filter((col) => col.id !== "__select__");
|
|
3590
|
-
return /* @__PURE__ */
|
|
3591
|
-
/* @__PURE__ */
|
|
3788
|
+
return /* @__PURE__ */ jsxs17("div", { className: "relative", ref: dropdownRef, children: [
|
|
3789
|
+
/* @__PURE__ */ jsxs17(
|
|
3592
3790
|
Button,
|
|
3593
3791
|
{
|
|
3594
3792
|
variant: "outline",
|
|
@@ -3596,40 +3794,40 @@ var ColumnVisibilityDropdown = ({
|
|
|
3596
3794
|
onClick: () => setOpen(!open),
|
|
3597
3795
|
className: "h-9 gap-2",
|
|
3598
3796
|
children: [
|
|
3599
|
-
/* @__PURE__ */
|
|
3600
|
-
/* @__PURE__ */
|
|
3601
|
-
/* @__PURE__ */
|
|
3602
|
-
/* @__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" })
|
|
3603
3801
|
] }),
|
|
3604
3802
|
"Columns"
|
|
3605
3803
|
]
|
|
3606
3804
|
}
|
|
3607
3805
|
),
|
|
3608
|
-
open && /* @__PURE__ */
|
|
3609
|
-
/* @__PURE__ */
|
|
3610
|
-
/* @__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) => {
|
|
3611
3809
|
const meta = column.columnDef.meta;
|
|
3612
3810
|
const headerName = meta?.headerName || column.id;
|
|
3613
|
-
return /* @__PURE__ */
|
|
3811
|
+
return /* @__PURE__ */ jsxs17(
|
|
3614
3812
|
"label",
|
|
3615
3813
|
{
|
|
3616
3814
|
className: "flex items-center gap-2 px-2 py-1.5 hover:bg-muted rounded cursor-pointer",
|
|
3617
3815
|
children: [
|
|
3618
|
-
/* @__PURE__ */
|
|
3816
|
+
/* @__PURE__ */ jsx32(
|
|
3619
3817
|
Checkbox,
|
|
3620
3818
|
{
|
|
3621
3819
|
checked: column.getIsVisible(),
|
|
3622
3820
|
onChange: (e) => column.toggleVisibility(e.target.checked)
|
|
3623
3821
|
}
|
|
3624
3822
|
),
|
|
3625
|
-
/* @__PURE__ */
|
|
3823
|
+
/* @__PURE__ */ jsx32("span", { className: "text-sm", children: headerName })
|
|
3626
3824
|
]
|
|
3627
3825
|
},
|
|
3628
3826
|
column.id
|
|
3629
3827
|
);
|
|
3630
3828
|
}) }),
|
|
3631
|
-
/* @__PURE__ */
|
|
3632
|
-
/* @__PURE__ */
|
|
3829
|
+
/* @__PURE__ */ jsxs17("div", { className: "border-t border-border mt-2 pt-2 flex gap-2 px-2", children: [
|
|
3830
|
+
/* @__PURE__ */ jsx32(
|
|
3633
3831
|
Button,
|
|
3634
3832
|
{
|
|
3635
3833
|
variant: "ghost",
|
|
@@ -3639,7 +3837,7 @@ var ColumnVisibilityDropdown = ({
|
|
|
3639
3837
|
children: "Show All"
|
|
3640
3838
|
}
|
|
3641
3839
|
),
|
|
3642
|
-
/* @__PURE__ */
|
|
3840
|
+
/* @__PURE__ */ jsx32(
|
|
3643
3841
|
Button,
|
|
3644
3842
|
{
|
|
3645
3843
|
variant: "ghost",
|
|
@@ -3689,28 +3887,28 @@ var DataGridPagination = ({
|
|
|
3689
3887
|
};
|
|
3690
3888
|
const startRow = currentPage * pageSize + 1;
|
|
3691
3889
|
const endRow = Math.min((currentPage + 1) * pageSize, totalRows);
|
|
3692
|
-
return /* @__PURE__ */
|
|
3693
|
-
/* @__PURE__ */
|
|
3694
|
-
/* @__PURE__ */
|
|
3695
|
-
/* @__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(
|
|
3696
3894
|
"select",
|
|
3697
3895
|
{
|
|
3698
3896
|
value: pageSize,
|
|
3699
3897
|
onChange: (e) => table.setPageSize(Number(e.target.value)),
|
|
3700
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",
|
|
3701
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */
|
|
3899
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx32("option", { value: size, children: size }, size))
|
|
3702
3900
|
}
|
|
3703
3901
|
)
|
|
3704
3902
|
] }),
|
|
3705
|
-
/* @__PURE__ */
|
|
3903
|
+
/* @__PURE__ */ jsxs17("span", { className: "text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
3706
3904
|
startRow,
|
|
3707
3905
|
"-",
|
|
3708
3906
|
endRow,
|
|
3709
3907
|
" of ",
|
|
3710
3908
|
totalRows
|
|
3711
3909
|
] }),
|
|
3712
|
-
/* @__PURE__ */
|
|
3713
|
-
/* @__PURE__ */
|
|
3910
|
+
/* @__PURE__ */ jsx32(PaginationNamespace, { className: "mx-0 w-auto", children: /* @__PURE__ */ jsxs17(PaginationContent, { children: [
|
|
3911
|
+
/* @__PURE__ */ jsx32(PaginationItem, { children: /* @__PURE__ */ jsx32(
|
|
3714
3912
|
Button,
|
|
3715
3913
|
{
|
|
3716
3914
|
variant: "outline",
|
|
@@ -3718,10 +3916,10 @@ var DataGridPagination = ({
|
|
|
3718
3916
|
className: "h-8 w-8",
|
|
3719
3917
|
onClick: () => table.setPageIndex(0),
|
|
3720
3918
|
disabled: !table.getCanPreviousPage(),
|
|
3721
|
-
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" }) })
|
|
3722
3920
|
}
|
|
3723
3921
|
) }),
|
|
3724
|
-
/* @__PURE__ */
|
|
3922
|
+
/* @__PURE__ */ jsx32(PaginationItem, { children: /* @__PURE__ */ jsx32(
|
|
3725
3923
|
Button,
|
|
3726
3924
|
{
|
|
3727
3925
|
variant: "outline",
|
|
@@ -3729,11 +3927,11 @@ var DataGridPagination = ({
|
|
|
3729
3927
|
className: "h-8 w-8",
|
|
3730
3928
|
onClick: () => table.previousPage(),
|
|
3731
3929
|
disabled: !table.getCanPreviousPage(),
|
|
3732
|
-
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" }) })
|
|
3733
3931
|
}
|
|
3734
3932
|
) }),
|
|
3735
3933
|
getPageNumbers().map(
|
|
3736
|
-
(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(
|
|
3737
3935
|
PaginationLink,
|
|
3738
3936
|
{
|
|
3739
3937
|
isActive: page === currentPage,
|
|
@@ -3742,7 +3940,7 @@ var DataGridPagination = ({
|
|
|
3742
3940
|
}
|
|
3743
3941
|
) }, page)
|
|
3744
3942
|
),
|
|
3745
|
-
/* @__PURE__ */
|
|
3943
|
+
/* @__PURE__ */ jsx32(PaginationItem, { children: /* @__PURE__ */ jsx32(
|
|
3746
3944
|
Button,
|
|
3747
3945
|
{
|
|
3748
3946
|
variant: "outline",
|
|
@@ -3750,10 +3948,10 @@ var DataGridPagination = ({
|
|
|
3750
3948
|
className: "h-8 w-8",
|
|
3751
3949
|
onClick: () => table.nextPage(),
|
|
3752
3950
|
disabled: !table.getCanNextPage(),
|
|
3753
|
-
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" }) })
|
|
3754
3952
|
}
|
|
3755
3953
|
) }),
|
|
3756
|
-
/* @__PURE__ */
|
|
3954
|
+
/* @__PURE__ */ jsx32(PaginationItem, { children: /* @__PURE__ */ jsx32(
|
|
3757
3955
|
Button,
|
|
3758
3956
|
{
|
|
3759
3957
|
variant: "outline",
|
|
@@ -3761,7 +3959,7 @@ var DataGridPagination = ({
|
|
|
3761
3959
|
className: "h-8 w-8",
|
|
3762
3960
|
onClick: () => table.setPageIndex(pageCount - 1),
|
|
3763
3961
|
disabled: !table.getCanNextPage(),
|
|
3764
|
-
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" }) })
|
|
3765
3963
|
}
|
|
3766
3964
|
) })
|
|
3767
3965
|
] }) })
|
|
@@ -3773,9 +3971,9 @@ var ExportDropdown = ({
|
|
|
3773
3971
|
columns,
|
|
3774
3972
|
fileName = "data-export"
|
|
3775
3973
|
}) => {
|
|
3776
|
-
const [open, setOpen] =
|
|
3777
|
-
const dropdownRef =
|
|
3778
|
-
|
|
3974
|
+
const [open, setOpen] = React32.useState(false);
|
|
3975
|
+
const dropdownRef = React32.useRef(null);
|
|
3976
|
+
React32.useEffect(() => {
|
|
3779
3977
|
const handleClickOutside = (event) => {
|
|
3780
3978
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
3781
3979
|
setOpen(false);
|
|
@@ -3832,8 +4030,8 @@ var ExportDropdown = ({
|
|
|
3832
4030
|
}
|
|
3833
4031
|
setOpen(false);
|
|
3834
4032
|
};
|
|
3835
|
-
return /* @__PURE__ */
|
|
3836
|
-
/* @__PURE__ */
|
|
4033
|
+
return /* @__PURE__ */ jsxs17("div", { className: "relative", ref: dropdownRef, children: [
|
|
4034
|
+
/* @__PURE__ */ jsxs17(
|
|
3837
4035
|
Button,
|
|
3838
4036
|
{
|
|
3839
4037
|
variant: "outline",
|
|
@@ -3841,53 +4039,53 @@ var ExportDropdown = ({
|
|
|
3841
4039
|
onClick: () => setOpen(!open),
|
|
3842
4040
|
className: "h-9 gap-2",
|
|
3843
4041
|
children: [
|
|
3844
|
-
/* @__PURE__ */
|
|
3845
|
-
/* @__PURE__ */
|
|
3846
|
-
/* @__PURE__ */
|
|
3847
|
-
/* @__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" })
|
|
3848
4046
|
] }),
|
|
3849
4047
|
"Export"
|
|
3850
4048
|
]
|
|
3851
4049
|
}
|
|
3852
4050
|
),
|
|
3853
|
-
open && /* @__PURE__ */
|
|
3854
|
-
/* @__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(
|
|
3855
4053
|
"button",
|
|
3856
4054
|
{
|
|
3857
4055
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
3858
4056
|
onClick: exportToCSV,
|
|
3859
4057
|
children: [
|
|
3860
|
-
/* @__PURE__ */
|
|
3861
|
-
/* @__PURE__ */
|
|
3862
|
-
/* @__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" })
|
|
3863
4061
|
] }),
|
|
3864
4062
|
"Export CSV"
|
|
3865
4063
|
]
|
|
3866
4064
|
}
|
|
3867
4065
|
),
|
|
3868
|
-
/* @__PURE__ */
|
|
4066
|
+
/* @__PURE__ */ jsxs17(
|
|
3869
4067
|
"button",
|
|
3870
4068
|
{
|
|
3871
4069
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
3872
4070
|
onClick: exportToJSON,
|
|
3873
4071
|
children: [
|
|
3874
|
-
/* @__PURE__ */
|
|
3875
|
-
/* @__PURE__ */
|
|
3876
|
-
/* @__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" })
|
|
3877
4075
|
] }),
|
|
3878
4076
|
"Export JSON"
|
|
3879
4077
|
]
|
|
3880
4078
|
}
|
|
3881
4079
|
),
|
|
3882
|
-
onExport && /* @__PURE__ */
|
|
4080
|
+
onExport && /* @__PURE__ */ jsxs17(
|
|
3883
4081
|
"button",
|
|
3884
4082
|
{
|
|
3885
4083
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
3886
4084
|
onClick: handleCustomExport,
|
|
3887
4085
|
children: [
|
|
3888
|
-
/* @__PURE__ */
|
|
3889
|
-
/* @__PURE__ */
|
|
3890
|
-
/* @__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" })
|
|
3891
4089
|
] }),
|
|
3892
4090
|
"Custom Export"
|
|
3893
4091
|
]
|
|
@@ -3899,9 +4097,9 @@ var ExportDropdown = ({
|
|
|
3899
4097
|
var MoreOptionsDropdown = ({
|
|
3900
4098
|
options
|
|
3901
4099
|
}) => {
|
|
3902
|
-
const [open, setOpen] =
|
|
3903
|
-
const dropdownRef =
|
|
3904
|
-
|
|
4100
|
+
const [open, setOpen] = React32.useState(false);
|
|
4101
|
+
const dropdownRef = React32.useRef(null);
|
|
4102
|
+
React32.useEffect(() => {
|
|
3905
4103
|
const handleClickOutside = (event) => {
|
|
3906
4104
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
3907
4105
|
setOpen(false);
|
|
@@ -3911,22 +4109,22 @@ var MoreOptionsDropdown = ({
|
|
|
3911
4109
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3912
4110
|
}, []);
|
|
3913
4111
|
if (options.length === 0) return null;
|
|
3914
|
-
return /* @__PURE__ */
|
|
3915
|
-
/* @__PURE__ */
|
|
4112
|
+
return /* @__PURE__ */ jsxs17("div", { className: "relative", ref: dropdownRef, children: [
|
|
4113
|
+
/* @__PURE__ */ jsx32(
|
|
3916
4114
|
Button,
|
|
3917
4115
|
{
|
|
3918
4116
|
variant: "outline",
|
|
3919
4117
|
size: "icon",
|
|
3920
4118
|
onClick: () => setOpen(!open),
|
|
3921
4119
|
className: "h-9 w-9",
|
|
3922
|
-
children: /* @__PURE__ */
|
|
3923
|
-
/* @__PURE__ */
|
|
3924
|
-
/* @__PURE__ */
|
|
3925
|
-
/* @__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" })
|
|
3926
4124
|
] })
|
|
3927
4125
|
}
|
|
3928
4126
|
),
|
|
3929
|
-
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(
|
|
3930
4128
|
"button",
|
|
3931
4129
|
{
|
|
3932
4130
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
@@ -3958,10 +4156,10 @@ var DataGridToolbar = ({
|
|
|
3958
4156
|
customButtons,
|
|
3959
4157
|
moreOptions = []
|
|
3960
4158
|
}) => {
|
|
3961
|
-
return /* @__PURE__ */
|
|
3962
|
-
title && /* @__PURE__ */
|
|
3963
|
-
/* @__PURE__ */
|
|
3964
|
-
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(
|
|
3965
4163
|
Input,
|
|
3966
4164
|
{
|
|
3967
4165
|
placeholder: "Search...",
|
|
@@ -3970,8 +4168,8 @@ var DataGridToolbar = ({
|
|
|
3970
4168
|
className: "h-9 w-64"
|
|
3971
4169
|
}
|
|
3972
4170
|
),
|
|
3973
|
-
showColumnSelector && /* @__PURE__ */
|
|
3974
|
-
showExport && /* @__PURE__ */
|
|
4171
|
+
showColumnSelector && /* @__PURE__ */ jsx32(ColumnVisibilityDropdown, { table }),
|
|
4172
|
+
showExport && /* @__PURE__ */ jsx32(
|
|
3975
4173
|
ExportDropdown,
|
|
3976
4174
|
{
|
|
3977
4175
|
onExport,
|
|
@@ -3981,7 +4179,7 @@ var DataGridToolbar = ({
|
|
|
3981
4179
|
}
|
|
3982
4180
|
),
|
|
3983
4181
|
customButtons,
|
|
3984
|
-
moreOptions.length > 0 && /* @__PURE__ */
|
|
4182
|
+
moreOptions.length > 0 && /* @__PURE__ */ jsx32(MoreOptionsDropdown, { options: moreOptions })
|
|
3985
4183
|
] })
|
|
3986
4184
|
] });
|
|
3987
4185
|
};
|
|
@@ -3998,7 +4196,7 @@ var RowRenderer = ({
|
|
|
3998
4196
|
columnWidths
|
|
3999
4197
|
}) => {
|
|
4000
4198
|
const customClassName = getRowClassName?.({ row: row.original, rowIndex });
|
|
4001
|
-
return /* @__PURE__ */
|
|
4199
|
+
return /* @__PURE__ */ jsx32(
|
|
4002
4200
|
"tr",
|
|
4003
4201
|
{
|
|
4004
4202
|
className: cn(
|
|
@@ -4020,7 +4218,7 @@ var RowRenderer = ({
|
|
|
4020
4218
|
const cellClassName = meta?.cellClassName;
|
|
4021
4219
|
const colWidth = columnWidths.get(cell.column.id);
|
|
4022
4220
|
const width = colWidth?.width || cell.column.getSize();
|
|
4023
|
-
return /* @__PURE__ */
|
|
4221
|
+
return /* @__PURE__ */ jsx32(
|
|
4024
4222
|
"td",
|
|
4025
4223
|
{
|
|
4026
4224
|
className: cn(
|
|
@@ -4035,7 +4233,7 @@ var RowRenderer = ({
|
|
|
4035
4233
|
maxWidth: colWidth?.maxWidth || width,
|
|
4036
4234
|
minWidth: colWidth?.minWidth || cell.column.columnDef.minSize
|
|
4037
4235
|
},
|
|
4038
|
-
children: /* @__PURE__ */
|
|
4236
|
+
children: /* @__PURE__ */ jsx32(
|
|
4039
4237
|
"div",
|
|
4040
4238
|
{
|
|
4041
4239
|
className: cn(
|
|
@@ -4078,7 +4276,7 @@ var VirtualizedTableBody = ({
|
|
|
4078
4276
|
});
|
|
4079
4277
|
const virtualRows = virtualizer.getVirtualItems();
|
|
4080
4278
|
if (rows.length === 0) {
|
|
4081
|
-
return /* @__PURE__ */
|
|
4279
|
+
return /* @__PURE__ */ jsx32("tbody", { children: /* @__PURE__ */ jsx32("tr", { children: /* @__PURE__ */ jsx32(
|
|
4082
4280
|
"td",
|
|
4083
4281
|
{
|
|
4084
4282
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4089,8 +4287,8 @@ var VirtualizedTableBody = ({
|
|
|
4089
4287
|
}
|
|
4090
4288
|
const paddingTop = virtualRows.length > 0 ? virtualRows[0].start : 0;
|
|
4091
4289
|
const paddingBottom = virtualRows.length > 0 ? virtualizer.getTotalSize() - virtualRows[virtualRows.length - 1].end : 0;
|
|
4092
|
-
return /* @__PURE__ */
|
|
4093
|
-
paddingTop > 0 && /* @__PURE__ */
|
|
4290
|
+
return /* @__PURE__ */ jsxs17("tbody", { children: [
|
|
4291
|
+
paddingTop > 0 && /* @__PURE__ */ jsx32("tr", { children: /* @__PURE__ */ jsx32(
|
|
4094
4292
|
"td",
|
|
4095
4293
|
{
|
|
4096
4294
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4099,7 +4297,7 @@ var VirtualizedTableBody = ({
|
|
|
4099
4297
|
) }),
|
|
4100
4298
|
virtualRows.map((virtualRow) => {
|
|
4101
4299
|
const row = rows[virtualRow.index];
|
|
4102
|
-
return /* @__PURE__ */
|
|
4300
|
+
return /* @__PURE__ */ jsx32(
|
|
4103
4301
|
RowRenderer,
|
|
4104
4302
|
{
|
|
4105
4303
|
row,
|
|
@@ -4115,7 +4313,7 @@ var VirtualizedTableBody = ({
|
|
|
4115
4313
|
row.id
|
|
4116
4314
|
);
|
|
4117
4315
|
}),
|
|
4118
|
-
paddingBottom > 0 && /* @__PURE__ */
|
|
4316
|
+
paddingBottom > 0 && /* @__PURE__ */ jsx32("tr", { children: /* @__PURE__ */ jsx32(
|
|
4119
4317
|
"td",
|
|
4120
4318
|
{
|
|
4121
4319
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4136,7 +4334,7 @@ var StandardTableBody = ({
|
|
|
4136
4334
|
}) => {
|
|
4137
4335
|
const rows = table.getRowModel().rows;
|
|
4138
4336
|
if (rows.length === 0) {
|
|
4139
|
-
return /* @__PURE__ */
|
|
4337
|
+
return /* @__PURE__ */ jsx32("tbody", { children: /* @__PURE__ */ jsx32("tr", { children: /* @__PURE__ */ jsx32(
|
|
4140
4338
|
"td",
|
|
4141
4339
|
{
|
|
4142
4340
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4145,7 +4343,7 @@ var StandardTableBody = ({
|
|
|
4145
4343
|
}
|
|
4146
4344
|
) }) });
|
|
4147
4345
|
}
|
|
4148
|
-
return /* @__PURE__ */
|
|
4346
|
+
return /* @__PURE__ */ jsx32("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsx32(
|
|
4149
4347
|
RowRenderer,
|
|
4150
4348
|
{
|
|
4151
4349
|
row,
|
|
@@ -4203,22 +4401,22 @@ function DataGrid({
|
|
|
4203
4401
|
resizableColumns = false,
|
|
4204
4402
|
onColumnResize
|
|
4205
4403
|
}) {
|
|
4206
|
-
const tableContainerRef =
|
|
4207
|
-
const [sorting, setSorting] =
|
|
4208
|
-
const [globalFilter, setGlobalFilter] =
|
|
4209
|
-
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(
|
|
4210
4408
|
rowSelectionModel || {}
|
|
4211
4409
|
);
|
|
4212
|
-
const [pagination, setPagination] =
|
|
4410
|
+
const [pagination, setPagination] = React32.useState({
|
|
4213
4411
|
pageIndex: paginationModel?.page || 0,
|
|
4214
4412
|
pageSize: paginationModel?.pageSize || 10
|
|
4215
4413
|
});
|
|
4216
|
-
const [columnVisibility, setColumnVisibility] =
|
|
4414
|
+
const [columnVisibility, setColumnVisibility] = React32.useState(
|
|
4217
4415
|
columnVisibilityModel || {}
|
|
4218
4416
|
);
|
|
4219
|
-
const [containerWidth, setContainerWidth] =
|
|
4220
|
-
const [columnSizing, setColumnSizing] =
|
|
4221
|
-
|
|
4417
|
+
const [containerWidth, setContainerWidth] = React32.useState(0);
|
|
4418
|
+
const [columnSizing, setColumnSizing] = React32.useState({});
|
|
4419
|
+
React32.useEffect(() => {
|
|
4222
4420
|
const container = tableContainerRef.current;
|
|
4223
4421
|
if (!container) return;
|
|
4224
4422
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -4231,11 +4429,11 @@ function DataGrid({
|
|
|
4231
4429
|
return () => resizeObserver.disconnect();
|
|
4232
4430
|
}, []);
|
|
4233
4431
|
const columnWidths = useColumnWidths(columns, containerWidth, checkboxSelection, columnSizing);
|
|
4234
|
-
const tanstackColumns =
|
|
4432
|
+
const tanstackColumns = React32.useMemo(
|
|
4235
4433
|
() => convertColumns(columns, checkboxSelection),
|
|
4236
4434
|
[columns, checkboxSelection]
|
|
4237
4435
|
);
|
|
4238
|
-
|
|
4436
|
+
React32.useEffect(() => {
|
|
4239
4437
|
if (paginationModel) {
|
|
4240
4438
|
setPagination({
|
|
4241
4439
|
pageIndex: paginationModel.page,
|
|
@@ -4243,12 +4441,12 @@ function DataGrid({
|
|
|
4243
4441
|
});
|
|
4244
4442
|
}
|
|
4245
4443
|
}, [paginationModel?.page, paginationModel?.pageSize]);
|
|
4246
|
-
|
|
4444
|
+
React32.useEffect(() => {
|
|
4247
4445
|
if (rowSelectionModel) {
|
|
4248
4446
|
setRowSelection(rowSelectionModel);
|
|
4249
4447
|
}
|
|
4250
4448
|
}, [rowSelectionModel]);
|
|
4251
|
-
|
|
4449
|
+
React32.useEffect(() => {
|
|
4252
4450
|
if (columnVisibilityModel) {
|
|
4253
4451
|
setColumnVisibility(columnVisibilityModel);
|
|
4254
4452
|
}
|
|
@@ -4321,7 +4519,7 @@ function DataGrid({
|
|
|
4321
4519
|
if (minHeight) containerStyle.minHeight = minHeight;
|
|
4322
4520
|
if (maxHeight) containerStyle.maxHeight = maxHeight;
|
|
4323
4521
|
}
|
|
4324
|
-
return /* @__PURE__ */
|
|
4522
|
+
return /* @__PURE__ */ jsxs17(
|
|
4325
4523
|
"div",
|
|
4326
4524
|
{
|
|
4327
4525
|
className: cn(
|
|
@@ -4330,7 +4528,7 @@ function DataGrid({
|
|
|
4330
4528
|
),
|
|
4331
4529
|
style: containerStyle,
|
|
4332
4530
|
children: [
|
|
4333
|
-
toolBar && /* @__PURE__ */
|
|
4531
|
+
toolBar && /* @__PURE__ */ jsx32(
|
|
4334
4532
|
DataGridToolbar,
|
|
4335
4533
|
{
|
|
4336
4534
|
title,
|
|
@@ -4348,17 +4546,17 @@ function DataGrid({
|
|
|
4348
4546
|
moreOptions
|
|
4349
4547
|
}
|
|
4350
4548
|
),
|
|
4351
|
-
/* @__PURE__ */
|
|
4549
|
+
/* @__PURE__ */ jsxs17(
|
|
4352
4550
|
"div",
|
|
4353
4551
|
{
|
|
4354
4552
|
ref: tableContainerRef,
|
|
4355
4553
|
className: "relative flex-1 overflow-auto",
|
|
4356
4554
|
children: [
|
|
4357
|
-
loading && /* @__PURE__ */
|
|
4358
|
-
/* @__PURE__ */
|
|
4359
|
-
/* @__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) => {
|
|
4360
4558
|
const colWidth = columnWidths.get(column.id);
|
|
4361
|
-
return /* @__PURE__ */
|
|
4559
|
+
return /* @__PURE__ */ jsx32(
|
|
4362
4560
|
"col",
|
|
4363
4561
|
{
|
|
4364
4562
|
style: {
|
|
@@ -4370,12 +4568,12 @@ function DataGrid({
|
|
|
4370
4568
|
column.id
|
|
4371
4569
|
);
|
|
4372
4570
|
}) }),
|
|
4373
|
-
/* @__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) => {
|
|
4374
4572
|
const meta = header.column.columnDef.meta;
|
|
4375
4573
|
const align = meta?.headerAlign || meta?.align || "left";
|
|
4376
4574
|
const colWidth = columnWidths.get(header.column.id);
|
|
4377
4575
|
const effectiveWidth = colWidth?.width || header.getSize();
|
|
4378
|
-
return /* @__PURE__ */
|
|
4576
|
+
return /* @__PURE__ */ jsxs17(
|
|
4379
4577
|
"th",
|
|
4380
4578
|
{
|
|
4381
4579
|
className: cn(
|
|
@@ -4394,15 +4592,15 @@ function DataGrid({
|
|
|
4394
4592
|
},
|
|
4395
4593
|
onClick: header.column.getToggleSortingHandler(),
|
|
4396
4594
|
children: [
|
|
4397
|
-
/* @__PURE__ */
|
|
4595
|
+
/* @__PURE__ */ jsxs17("div", { className: cn(
|
|
4398
4596
|
"flex items-center gap-1 truncate",
|
|
4399
4597
|
align === "center" && "justify-center",
|
|
4400
4598
|
align === "right" && "justify-end"
|
|
4401
4599
|
), children: [
|
|
4402
4600
|
header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()),
|
|
4403
|
-
header.column.getCanSort() && /* @__PURE__ */
|
|
4601
|
+
header.column.getCanSort() && /* @__PURE__ */ jsx32(SortIcon, { direction: header.column.getIsSorted() })
|
|
4404
4602
|
] }),
|
|
4405
|
-
resizableColumns && header.column.id !== "__select__" && /* @__PURE__ */
|
|
4603
|
+
resizableColumns && header.column.id !== "__select__" && /* @__PURE__ */ jsx32(
|
|
4406
4604
|
ColumnResizeHandle,
|
|
4407
4605
|
{
|
|
4408
4606
|
header,
|
|
@@ -4414,7 +4612,7 @@ function DataGrid({
|
|
|
4414
4612
|
header.id
|
|
4415
4613
|
);
|
|
4416
4614
|
}) }, headerGroup.id)) }),
|
|
4417
|
-
virtualized ? /* @__PURE__ */
|
|
4615
|
+
virtualized ? /* @__PURE__ */ jsx32(
|
|
4418
4616
|
VirtualizedTableBody,
|
|
4419
4617
|
{
|
|
4420
4618
|
table,
|
|
@@ -4428,7 +4626,7 @@ function DataGrid({
|
|
|
4428
4626
|
globalWrapText: wrapText,
|
|
4429
4627
|
columnWidths
|
|
4430
4628
|
}
|
|
4431
|
-
) : /* @__PURE__ */
|
|
4629
|
+
) : /* @__PURE__ */ jsx32(
|
|
4432
4630
|
StandardTableBody,
|
|
4433
4631
|
{
|
|
4434
4632
|
table,
|
|
@@ -4445,7 +4643,7 @@ function DataGrid({
|
|
|
4445
4643
|
]
|
|
4446
4644
|
}
|
|
4447
4645
|
),
|
|
4448
|
-
!virtualized && !hideFooter && !hideFooterPagination && /* @__PURE__ */
|
|
4646
|
+
!virtualized && !hideFooter && !hideFooterPagination && /* @__PURE__ */ jsx32(
|
|
4449
4647
|
DataGridPagination,
|
|
4450
4648
|
{
|
|
4451
4649
|
table,
|
|
@@ -4454,7 +4652,7 @@ function DataGrid({
|
|
|
4454
4652
|
paginationMode
|
|
4455
4653
|
}
|
|
4456
4654
|
),
|
|
4457
|
-
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: [
|
|
4458
4656
|
table.getFilteredRowModel().rows.length,
|
|
4459
4657
|
" total rows (virtualized)"
|
|
4460
4658
|
] }) })
|
|
@@ -4465,10 +4663,10 @@ function DataGrid({
|
|
|
4465
4663
|
DataGrid.displayName = "DataGrid";
|
|
4466
4664
|
|
|
4467
4665
|
// src/components/list.tsx
|
|
4468
|
-
import * as
|
|
4469
|
-
import { jsx as
|
|
4470
|
-
var
|
|
4471
|
-
({ 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(
|
|
4472
4670
|
"ul",
|
|
4473
4671
|
{
|
|
4474
4672
|
ref,
|
|
@@ -4481,8 +4679,8 @@ var List = React32.forwardRef(
|
|
|
4481
4679
|
}
|
|
4482
4680
|
)
|
|
4483
4681
|
);
|
|
4484
|
-
|
|
4485
|
-
var ListItem =
|
|
4682
|
+
List2.displayName = "List";
|
|
4683
|
+
var ListItem = React33.forwardRef(
|
|
4486
4684
|
({
|
|
4487
4685
|
selected = false,
|
|
4488
4686
|
disabled = false,
|
|
@@ -4493,7 +4691,7 @@ var ListItem = React32.forwardRef(
|
|
|
4493
4691
|
className,
|
|
4494
4692
|
children,
|
|
4495
4693
|
...props
|
|
4496
|
-
}, ref) => /* @__PURE__ */
|
|
4694
|
+
}, ref) => /* @__PURE__ */ jsxs18(
|
|
4497
4695
|
"li",
|
|
4498
4696
|
{
|
|
4499
4697
|
ref,
|
|
@@ -4518,18 +4716,18 @@ var ListItem = React32.forwardRef(
|
|
|
4518
4716
|
),
|
|
4519
4717
|
...props,
|
|
4520
4718
|
children: [
|
|
4521
|
-
leading && /* @__PURE__ */
|
|
4522
|
-
/* @__PURE__ */
|
|
4523
|
-
trailing && /* @__PURE__ */
|
|
4524
|
-
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 })
|
|
4525
4723
|
]
|
|
4526
4724
|
}
|
|
4527
4725
|
)
|
|
4528
4726
|
);
|
|
4529
4727
|
ListItem.displayName = "ListItem";
|
|
4530
|
-
var ListItemText =
|
|
4531
|
-
({ primary, secondary, noWrap = false, className, children, ...props }, ref) => /* @__PURE__ */
|
|
4532
|
-
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(
|
|
4533
4731
|
"div",
|
|
4534
4732
|
{
|
|
4535
4733
|
className: cn(
|
|
@@ -4539,7 +4737,7 @@ var ListItemText = React32.forwardRef(
|
|
|
4539
4737
|
children: primary
|
|
4540
4738
|
}
|
|
4541
4739
|
),
|
|
4542
|
-
secondary && /* @__PURE__ */
|
|
4740
|
+
secondary && /* @__PURE__ */ jsx33(
|
|
4543
4741
|
"div",
|
|
4544
4742
|
{
|
|
4545
4743
|
className: cn(
|
|
@@ -4553,8 +4751,8 @@ var ListItemText = React32.forwardRef(
|
|
|
4553
4751
|
] })
|
|
4554
4752
|
);
|
|
4555
4753
|
ListItemText.displayName = "ListItemText";
|
|
4556
|
-
var ListItemIcon =
|
|
4557
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4754
|
+
var ListItemIcon = React33.forwardRef(
|
|
4755
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
4558
4756
|
"div",
|
|
4559
4757
|
{
|
|
4560
4758
|
ref,
|
|
@@ -4564,12 +4762,12 @@ var ListItemIcon = React32.forwardRef(
|
|
|
4564
4762
|
)
|
|
4565
4763
|
);
|
|
4566
4764
|
ListItemIcon.displayName = "ListItemIcon";
|
|
4567
|
-
var ListItemAvatar =
|
|
4568
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4765
|
+
var ListItemAvatar = React33.forwardRef(
|
|
4766
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx33("div", { ref, className: cn("shrink-0", className), ...props })
|
|
4569
4767
|
);
|
|
4570
4768
|
ListItemAvatar.displayName = "ListItemAvatar";
|
|
4571
|
-
var ListSubheader =
|
|
4572
|
-
({ sticky = false, className, ...props }, ref) => /* @__PURE__ */
|
|
4769
|
+
var ListSubheader = React33.forwardRef(
|
|
4770
|
+
({ sticky = false, className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
4573
4771
|
"li",
|
|
4574
4772
|
{
|
|
4575
4773
|
ref,
|
|
@@ -4584,8 +4782,8 @@ var ListSubheader = React32.forwardRef(
|
|
|
4584
4782
|
)
|
|
4585
4783
|
);
|
|
4586
4784
|
ListSubheader.displayName = "ListSubheader";
|
|
4587
|
-
var ListDivider =
|
|
4588
|
-
({ inset = false, className, ...props }, ref) => /* @__PURE__ */
|
|
4785
|
+
var ListDivider = React33.forwardRef(
|
|
4786
|
+
({ inset = false, className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
4589
4787
|
"li",
|
|
4590
4788
|
{
|
|
4591
4789
|
ref,
|
|
@@ -4602,9 +4800,9 @@ var ListDivider = React32.forwardRef(
|
|
|
4602
4800
|
ListDivider.displayName = "ListDivider";
|
|
4603
4801
|
|
|
4604
4802
|
// src/components/breadcrumbs.tsx
|
|
4605
|
-
import * as
|
|
4606
|
-
import { jsx as
|
|
4607
|
-
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(
|
|
4608
4806
|
({
|
|
4609
4807
|
separator,
|
|
4610
4808
|
maxItems,
|
|
@@ -4614,9 +4812,9 @@ var Breadcrumbs = React33.forwardRef(
|
|
|
4614
4812
|
children,
|
|
4615
4813
|
...props
|
|
4616
4814
|
}, ref) => {
|
|
4617
|
-
const childArray =
|
|
4815
|
+
const childArray = React34.Children.toArray(children);
|
|
4618
4816
|
const totalItems = childArray.length;
|
|
4619
|
-
const separatorElement = separator ?? /* @__PURE__ */
|
|
4817
|
+
const separatorElement = separator ?? /* @__PURE__ */ jsx34(
|
|
4620
4818
|
"svg",
|
|
4621
4819
|
{
|
|
4622
4820
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4629,7 +4827,7 @@ var Breadcrumbs = React33.forwardRef(
|
|
|
4629
4827
|
strokeLinecap: "round",
|
|
4630
4828
|
strokeLinejoin: "round",
|
|
4631
4829
|
className: "text-muted-foreground",
|
|
4632
|
-
children: /* @__PURE__ */
|
|
4830
|
+
children: /* @__PURE__ */ jsx34("path", { d: "m9 18 6-6-6-6" })
|
|
4633
4831
|
}
|
|
4634
4832
|
);
|
|
4635
4833
|
const shouldCollapse = maxItems && totalItems > maxItems;
|
|
@@ -4639,20 +4837,20 @@ var Breadcrumbs = React33.forwardRef(
|
|
|
4639
4837
|
const endItems = childArray.slice(-itemsAfterCollapse);
|
|
4640
4838
|
displayedItems = [
|
|
4641
4839
|
...startItems,
|
|
4642
|
-
/* @__PURE__ */
|
|
4840
|
+
/* @__PURE__ */ jsx34(BreadcrumbEllipsis, {}, "ellipsis"),
|
|
4643
4841
|
...endItems
|
|
4644
4842
|
];
|
|
4645
4843
|
} else {
|
|
4646
4844
|
displayedItems = childArray;
|
|
4647
4845
|
}
|
|
4648
|
-
return /* @__PURE__ */
|
|
4649
|
-
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 }),
|
|
4650
4848
|
child
|
|
4651
4849
|
] }, index)) }) });
|
|
4652
4850
|
}
|
|
4653
4851
|
);
|
|
4654
4852
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
4655
|
-
var BreadcrumbItem =
|
|
4853
|
+
var BreadcrumbItem = React34.forwardRef(
|
|
4656
4854
|
({ current = false, href, onClick, className, children, ...props }, ref) => {
|
|
4657
4855
|
const baseClasses = cn(
|
|
4658
4856
|
"text-sm transition-colors",
|
|
@@ -4661,7 +4859,7 @@ var BreadcrumbItem = React33.forwardRef(
|
|
|
4661
4859
|
className
|
|
4662
4860
|
);
|
|
4663
4861
|
if (current) {
|
|
4664
|
-
return /* @__PURE__ */
|
|
4862
|
+
return /* @__PURE__ */ jsx34(
|
|
4665
4863
|
"span",
|
|
4666
4864
|
{
|
|
4667
4865
|
ref,
|
|
@@ -4673,7 +4871,7 @@ var BreadcrumbItem = React33.forwardRef(
|
|
|
4673
4871
|
);
|
|
4674
4872
|
}
|
|
4675
4873
|
if (href) {
|
|
4676
|
-
return /* @__PURE__ */
|
|
4874
|
+
return /* @__PURE__ */ jsx34(
|
|
4677
4875
|
"a",
|
|
4678
4876
|
{
|
|
4679
4877
|
href,
|
|
@@ -4683,7 +4881,7 @@ var BreadcrumbItem = React33.forwardRef(
|
|
|
4683
4881
|
}
|
|
4684
4882
|
);
|
|
4685
4883
|
}
|
|
4686
|
-
return /* @__PURE__ */
|
|
4884
|
+
return /* @__PURE__ */ jsx34(
|
|
4687
4885
|
"span",
|
|
4688
4886
|
{
|
|
4689
4887
|
ref,
|
|
@@ -4704,8 +4902,8 @@ var BreadcrumbItem = React33.forwardRef(
|
|
|
4704
4902
|
}
|
|
4705
4903
|
);
|
|
4706
4904
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
4707
|
-
var BreadcrumbLink =
|
|
4708
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4905
|
+
var BreadcrumbLink = React34.forwardRef(
|
|
4906
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
4709
4907
|
"a",
|
|
4710
4908
|
{
|
|
4711
4909
|
ref,
|
|
@@ -4718,8 +4916,8 @@ var BreadcrumbLink = React33.forwardRef(
|
|
|
4718
4916
|
)
|
|
4719
4917
|
);
|
|
4720
4918
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
4721
|
-
var BreadcrumbSeparator =
|
|
4722
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
4919
|
+
var BreadcrumbSeparator = React34.forwardRef(
|
|
4920
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
4723
4921
|
"span",
|
|
4724
4922
|
{
|
|
4725
4923
|
ref,
|
|
@@ -4727,7 +4925,7 @@ var BreadcrumbSeparator = React33.forwardRef(
|
|
|
4727
4925
|
"aria-hidden": "true",
|
|
4728
4926
|
className: cn("text-muted-foreground", className),
|
|
4729
4927
|
...props,
|
|
4730
|
-
children: children ?? /* @__PURE__ */
|
|
4928
|
+
children: children ?? /* @__PURE__ */ jsx34(
|
|
4731
4929
|
"svg",
|
|
4732
4930
|
{
|
|
4733
4931
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4739,15 +4937,15 @@ var BreadcrumbSeparator = React33.forwardRef(
|
|
|
4739
4937
|
strokeWidth: "2",
|
|
4740
4938
|
strokeLinecap: "round",
|
|
4741
4939
|
strokeLinejoin: "round",
|
|
4742
|
-
children: /* @__PURE__ */
|
|
4940
|
+
children: /* @__PURE__ */ jsx34("path", { d: "m9 18 6-6-6-6" })
|
|
4743
4941
|
}
|
|
4744
4942
|
)
|
|
4745
4943
|
}
|
|
4746
4944
|
)
|
|
4747
4945
|
);
|
|
4748
4946
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
4749
|
-
var BreadcrumbEllipsis =
|
|
4750
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4947
|
+
var BreadcrumbEllipsis = React34.forwardRef(
|
|
4948
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
4751
4949
|
"span",
|
|
4752
4950
|
{
|
|
4753
4951
|
ref,
|
|
@@ -4755,7 +4953,7 @@ var BreadcrumbEllipsis = React33.forwardRef(
|
|
|
4755
4953
|
"aria-hidden": "true",
|
|
4756
4954
|
className: cn("text-sm text-muted-foreground", className),
|
|
4757
4955
|
...props,
|
|
4758
|
-
children: /* @__PURE__ */
|
|
4956
|
+
children: /* @__PURE__ */ jsxs19(
|
|
4759
4957
|
"svg",
|
|
4760
4958
|
{
|
|
4761
4959
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4768,9 +4966,9 @@ var BreadcrumbEllipsis = React33.forwardRef(
|
|
|
4768
4966
|
strokeLinecap: "round",
|
|
4769
4967
|
strokeLinejoin: "round",
|
|
4770
4968
|
children: [
|
|
4771
|
-
/* @__PURE__ */
|
|
4772
|
-
/* @__PURE__ */
|
|
4773
|
-
/* @__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" })
|
|
4774
4972
|
]
|
|
4775
4973
|
}
|
|
4776
4974
|
)
|
|
@@ -4778,8 +4976,8 @@ var BreadcrumbEllipsis = React33.forwardRef(
|
|
|
4778
4976
|
)
|
|
4779
4977
|
);
|
|
4780
4978
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
4781
|
-
var BreadcrumbPage =
|
|
4782
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4979
|
+
var BreadcrumbPage = React34.forwardRef(
|
|
4980
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
4783
4981
|
"span",
|
|
4784
4982
|
{
|
|
4785
4983
|
ref,
|
|
@@ -4792,16 +4990,16 @@ var BreadcrumbPage = React33.forwardRef(
|
|
|
4792
4990
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
4793
4991
|
|
|
4794
4992
|
// src/components/dropdown-menu.tsx
|
|
4795
|
-
import * as
|
|
4993
|
+
import * as React35 from "react";
|
|
4796
4994
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4797
|
-
import { jsx as
|
|
4995
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4798
4996
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
4799
4997
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
4800
4998
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
4801
4999
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
4802
5000
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
4803
5001
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
4804
|
-
var DropdownMenuSubTrigger =
|
|
5002
|
+
var DropdownMenuSubTrigger = React35.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs20(
|
|
4805
5003
|
DropdownMenuPrimitive.SubTrigger,
|
|
4806
5004
|
{
|
|
4807
5005
|
ref,
|
|
@@ -4815,7 +5013,7 @@ var DropdownMenuSubTrigger = React34.forwardRef(({ className, inset, children, .
|
|
|
4815
5013
|
...props,
|
|
4816
5014
|
children: [
|
|
4817
5015
|
children,
|
|
4818
|
-
/* @__PURE__ */
|
|
5016
|
+
/* @__PURE__ */ jsx35(
|
|
4819
5017
|
"svg",
|
|
4820
5018
|
{
|
|
4821
5019
|
className: "ml-auto h-4 w-4",
|
|
@@ -4826,14 +5024,14 @@ var DropdownMenuSubTrigger = React34.forwardRef(({ className, inset, children, .
|
|
|
4826
5024
|
strokeWidth: "2",
|
|
4827
5025
|
strokeLinecap: "round",
|
|
4828
5026
|
strokeLinejoin: "round",
|
|
4829
|
-
children: /* @__PURE__ */
|
|
5027
|
+
children: /* @__PURE__ */ jsx35("path", { d: "m9 18 6-6-6-6" })
|
|
4830
5028
|
}
|
|
4831
5029
|
)
|
|
4832
5030
|
]
|
|
4833
5031
|
}
|
|
4834
5032
|
));
|
|
4835
5033
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
4836
|
-
var DropdownMenuSubContent =
|
|
5034
|
+
var DropdownMenuSubContent = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4837
5035
|
DropdownMenuPrimitive.SubContent,
|
|
4838
5036
|
{
|
|
4839
5037
|
ref,
|
|
@@ -4850,7 +5048,7 @@ var DropdownMenuSubContent = React34.forwardRef(({ className, ...props }, ref) =
|
|
|
4850
5048
|
}
|
|
4851
5049
|
));
|
|
4852
5050
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
4853
|
-
var DropdownMenuContent =
|
|
5051
|
+
var DropdownMenuContent = React35.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx35(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx35(
|
|
4854
5052
|
DropdownMenuPrimitive.Content,
|
|
4855
5053
|
{
|
|
4856
5054
|
ref,
|
|
@@ -4868,7 +5066,7 @@ var DropdownMenuContent = React34.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
4868
5066
|
}
|
|
4869
5067
|
) }));
|
|
4870
5068
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
4871
|
-
var DropdownMenuItem =
|
|
5069
|
+
var DropdownMenuItem = React35.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4872
5070
|
DropdownMenuPrimitive.Item,
|
|
4873
5071
|
{
|
|
4874
5072
|
ref,
|
|
@@ -4884,7 +5082,7 @@ var DropdownMenuItem = React34.forwardRef(({ className, inset, ...props }, ref)
|
|
|
4884
5082
|
}
|
|
4885
5083
|
));
|
|
4886
5084
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
4887
|
-
var DropdownMenuCheckboxItem =
|
|
5085
|
+
var DropdownMenuCheckboxItem = React35.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs20(
|
|
4888
5086
|
DropdownMenuPrimitive.CheckboxItem,
|
|
4889
5087
|
{
|
|
4890
5088
|
ref,
|
|
@@ -4897,7 +5095,7 @@ var DropdownMenuCheckboxItem = React34.forwardRef(({ className, children, checke
|
|
|
4897
5095
|
checked,
|
|
4898
5096
|
...props,
|
|
4899
5097
|
children: [
|
|
4900
|
-
/* @__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(
|
|
4901
5099
|
"svg",
|
|
4902
5100
|
{
|
|
4903
5101
|
className: "h-4 w-4",
|
|
@@ -4908,7 +5106,7 @@ var DropdownMenuCheckboxItem = React34.forwardRef(({ className, children, checke
|
|
|
4908
5106
|
strokeWidth: "2",
|
|
4909
5107
|
strokeLinecap: "round",
|
|
4910
5108
|
strokeLinejoin: "round",
|
|
4911
|
-
children: /* @__PURE__ */
|
|
5109
|
+
children: /* @__PURE__ */ jsx35("path", { d: "M20 6 9 17l-5-5" })
|
|
4912
5110
|
}
|
|
4913
5111
|
) }) }),
|
|
4914
5112
|
children
|
|
@@ -4916,7 +5114,7 @@ var DropdownMenuCheckboxItem = React34.forwardRef(({ className, children, checke
|
|
|
4916
5114
|
}
|
|
4917
5115
|
));
|
|
4918
5116
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
4919
|
-
var DropdownMenuRadioItem =
|
|
5117
|
+
var DropdownMenuRadioItem = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs20(
|
|
4920
5118
|
DropdownMenuPrimitive.RadioItem,
|
|
4921
5119
|
{
|
|
4922
5120
|
ref,
|
|
@@ -4928,13 +5126,13 @@ var DropdownMenuRadioItem = React34.forwardRef(({ className, children, ...props
|
|
|
4928
5126
|
),
|
|
4929
5127
|
...props,
|
|
4930
5128
|
children: [
|
|
4931
|
-
/* @__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(
|
|
4932
5130
|
"svg",
|
|
4933
5131
|
{
|
|
4934
5132
|
className: "h-2 w-2 fill-current",
|
|
4935
5133
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4936
5134
|
viewBox: "0 0 24 24",
|
|
4937
|
-
children: /* @__PURE__ */
|
|
5135
|
+
children: /* @__PURE__ */ jsx35("circle", { cx: "12", cy: "12", r: "10" })
|
|
4938
5136
|
}
|
|
4939
5137
|
) }) }),
|
|
4940
5138
|
children
|
|
@@ -4942,7 +5140,7 @@ var DropdownMenuRadioItem = React34.forwardRef(({ className, children, ...props
|
|
|
4942
5140
|
}
|
|
4943
5141
|
));
|
|
4944
5142
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
4945
|
-
var DropdownMenuLabel =
|
|
5143
|
+
var DropdownMenuLabel = React35.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4946
5144
|
DropdownMenuPrimitive.Label,
|
|
4947
5145
|
{
|
|
4948
5146
|
ref,
|
|
@@ -4955,7 +5153,7 @@ var DropdownMenuLabel = React34.forwardRef(({ className, inset, ...props }, ref)
|
|
|
4955
5153
|
}
|
|
4956
5154
|
));
|
|
4957
5155
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
4958
|
-
var DropdownMenuSeparator =
|
|
5156
|
+
var DropdownMenuSeparator = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4959
5157
|
DropdownMenuPrimitive.Separator,
|
|
4960
5158
|
{
|
|
4961
5159
|
ref,
|
|
@@ -4968,7 +5166,7 @@ var DropdownMenuShortcut = ({
|
|
|
4968
5166
|
className,
|
|
4969
5167
|
...props
|
|
4970
5168
|
}) => {
|
|
4971
|
-
return /* @__PURE__ */
|
|
5169
|
+
return /* @__PURE__ */ jsx35(
|
|
4972
5170
|
"span",
|
|
4973
5171
|
{
|
|
4974
5172
|
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
@@ -4979,14 +5177,14 @@ var DropdownMenuShortcut = ({
|
|
|
4979
5177
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
4980
5178
|
|
|
4981
5179
|
// src/components/drawer.tsx
|
|
4982
|
-
import * as
|
|
5180
|
+
import * as React36 from "react";
|
|
4983
5181
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
4984
|
-
import { jsx as
|
|
5182
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4985
5183
|
var Drawer = DialogPrimitive2.Root;
|
|
4986
5184
|
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
4987
5185
|
var DrawerClose = DialogPrimitive2.Close;
|
|
4988
5186
|
var DrawerPortal = DialogPrimitive2.Portal;
|
|
4989
|
-
var DrawerOverlay =
|
|
5187
|
+
var DrawerOverlay = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
4990
5188
|
DialogPrimitive2.Overlay,
|
|
4991
5189
|
{
|
|
4992
5190
|
ref,
|
|
@@ -5006,9 +5204,9 @@ var slideVariants = {
|
|
|
5006
5204
|
top: "inset-x-0 top-0 w-full data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
5007
5205
|
bottom: "inset-x-0 bottom-0 w-full data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom"
|
|
5008
5206
|
};
|
|
5009
|
-
var DrawerContent =
|
|
5010
|
-
/* @__PURE__ */
|
|
5011
|
-
/* @__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(
|
|
5012
5210
|
DialogPrimitive2.Content,
|
|
5013
5211
|
{
|
|
5014
5212
|
ref,
|
|
@@ -5022,7 +5220,7 @@ var DrawerContent = React35.forwardRef(({ side = "right", showClose = true, clas
|
|
|
5022
5220
|
...props,
|
|
5023
5221
|
children: [
|
|
5024
5222
|
children,
|
|
5025
|
-
showClose && /* @__PURE__ */
|
|
5223
|
+
showClose && /* @__PURE__ */ jsxs21(
|
|
5026
5224
|
DrawerClose,
|
|
5027
5225
|
{
|
|
5028
5226
|
className: cn(
|
|
@@ -5032,7 +5230,7 @@ var DrawerContent = React35.forwardRef(({ side = "right", showClose = true, clas
|
|
|
5032
5230
|
"disabled:pointer-events-none"
|
|
5033
5231
|
),
|
|
5034
5232
|
children: [
|
|
5035
|
-
/* @__PURE__ */
|
|
5233
|
+
/* @__PURE__ */ jsx36(
|
|
5036
5234
|
"svg",
|
|
5037
5235
|
{
|
|
5038
5236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5045,10 +5243,10 @@ var DrawerContent = React35.forwardRef(({ side = "right", showClose = true, clas
|
|
|
5045
5243
|
strokeLinecap: "round",
|
|
5046
5244
|
strokeLinejoin: "round",
|
|
5047
5245
|
className: "h-4 w-4",
|
|
5048
|
-
children: /* @__PURE__ */
|
|
5246
|
+
children: /* @__PURE__ */ jsx36("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
5049
5247
|
}
|
|
5050
5248
|
),
|
|
5051
|
-
/* @__PURE__ */
|
|
5249
|
+
/* @__PURE__ */ jsx36("span", { className: "sr-only", children: "Close" })
|
|
5052
5250
|
]
|
|
5053
5251
|
}
|
|
5054
5252
|
)
|
|
@@ -5057,8 +5255,8 @@ var DrawerContent = React35.forwardRef(({ side = "right", showClose = true, clas
|
|
|
5057
5255
|
)
|
|
5058
5256
|
] }));
|
|
5059
5257
|
DrawerContent.displayName = "DrawerContent";
|
|
5060
|
-
var DrawerHeader =
|
|
5061
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
5258
|
+
var DrawerHeader = React36.forwardRef(
|
|
5259
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5062
5260
|
"div",
|
|
5063
5261
|
{
|
|
5064
5262
|
ref,
|
|
@@ -5068,7 +5266,7 @@ var DrawerHeader = React35.forwardRef(
|
|
|
5068
5266
|
)
|
|
5069
5267
|
);
|
|
5070
5268
|
DrawerHeader.displayName = "DrawerHeader";
|
|
5071
|
-
var DrawerTitle =
|
|
5269
|
+
var DrawerTitle = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5072
5270
|
DialogPrimitive2.Title,
|
|
5073
5271
|
{
|
|
5074
5272
|
ref,
|
|
@@ -5077,7 +5275,7 @@ var DrawerTitle = React35.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5077
5275
|
}
|
|
5078
5276
|
));
|
|
5079
5277
|
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
5080
|
-
var DrawerDescription =
|
|
5278
|
+
var DrawerDescription = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5081
5279
|
DialogPrimitive2.Description,
|
|
5082
5280
|
{
|
|
5083
5281
|
ref,
|
|
@@ -5086,8 +5284,8 @@ var DrawerDescription = React35.forwardRef(({ className, ...props }, ref) => /*
|
|
|
5086
5284
|
}
|
|
5087
5285
|
));
|
|
5088
5286
|
DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
5089
|
-
var DrawerBody =
|
|
5090
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
5287
|
+
var DrawerBody = React36.forwardRef(
|
|
5288
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5091
5289
|
"div",
|
|
5092
5290
|
{
|
|
5093
5291
|
ref,
|
|
@@ -5097,8 +5295,8 @@ var DrawerBody = React35.forwardRef(
|
|
|
5097
5295
|
)
|
|
5098
5296
|
);
|
|
5099
5297
|
DrawerBody.displayName = "DrawerBody";
|
|
5100
|
-
var DrawerFooter =
|
|
5101
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
5298
|
+
var DrawerFooter = React36.forwardRef(
|
|
5299
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
5102
5300
|
"div",
|
|
5103
5301
|
{
|
|
5104
5302
|
ref,
|
|
@@ -5124,16 +5322,16 @@ var SheetBody = DrawerBody;
|
|
|
5124
5322
|
var SheetFooter = DrawerFooter;
|
|
5125
5323
|
|
|
5126
5324
|
// src/components/topbar.tsx
|
|
5127
|
-
import * as
|
|
5128
|
-
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";
|
|
5129
5327
|
var sizeClasses4 = {
|
|
5130
5328
|
sm: "h-12",
|
|
5131
5329
|
md: "h-14",
|
|
5132
5330
|
lg: "h-16"
|
|
5133
5331
|
};
|
|
5134
|
-
var TopBar =
|
|
5332
|
+
var TopBar = React37.forwardRef(
|
|
5135
5333
|
({ className, bordered = true, sticky = false, size = "md", children, ...props }, ref) => {
|
|
5136
|
-
return /* @__PURE__ */
|
|
5334
|
+
return /* @__PURE__ */ jsx37(
|
|
5137
5335
|
"header",
|
|
5138
5336
|
{
|
|
5139
5337
|
ref,
|
|
@@ -5151,23 +5349,23 @@ var TopBar = React36.forwardRef(
|
|
|
5151
5349
|
}
|
|
5152
5350
|
);
|
|
5153
5351
|
TopBar.displayName = "TopBar";
|
|
5154
|
-
var TopBarBrand =
|
|
5352
|
+
var TopBarBrand = React37.forwardRef(
|
|
5155
5353
|
({ className, logo, name, href, children, ...props }, ref) => {
|
|
5156
|
-
const content = /* @__PURE__ */
|
|
5157
|
-
logo && /* @__PURE__ */
|
|
5158
|
-
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 }),
|
|
5159
5357
|
children
|
|
5160
5358
|
] });
|
|
5161
5359
|
if (href) {
|
|
5162
|
-
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 }) });
|
|
5163
5361
|
}
|
|
5164
|
-
return /* @__PURE__ */
|
|
5362
|
+
return /* @__PURE__ */ jsx37("div", { ref, className: cn("flex items-center gap-2", className), ...props, children: content });
|
|
5165
5363
|
}
|
|
5166
5364
|
);
|
|
5167
5365
|
TopBarBrand.displayName = "TopBarBrand";
|
|
5168
|
-
var TopBarNav =
|
|
5366
|
+
var TopBarNav = React37.forwardRef(
|
|
5169
5367
|
({ className, children, ...props }, ref) => {
|
|
5170
|
-
return /* @__PURE__ */
|
|
5368
|
+
return /* @__PURE__ */ jsx37(
|
|
5171
5369
|
"nav",
|
|
5172
5370
|
{
|
|
5173
5371
|
ref,
|
|
@@ -5179,9 +5377,9 @@ var TopBarNav = React36.forwardRef(
|
|
|
5179
5377
|
}
|
|
5180
5378
|
);
|
|
5181
5379
|
TopBarNav.displayName = "TopBarNav";
|
|
5182
|
-
var TopBarNavItem =
|
|
5380
|
+
var TopBarNavItem = React37.forwardRef(
|
|
5183
5381
|
({ className, active, children, ...props }, ref) => {
|
|
5184
|
-
return /* @__PURE__ */
|
|
5382
|
+
return /* @__PURE__ */ jsx37(
|
|
5185
5383
|
"a",
|
|
5186
5384
|
{
|
|
5187
5385
|
ref,
|
|
@@ -5197,9 +5395,9 @@ var TopBarNavItem = React36.forwardRef(
|
|
|
5197
5395
|
}
|
|
5198
5396
|
);
|
|
5199
5397
|
TopBarNavItem.displayName = "TopBarNavItem";
|
|
5200
|
-
var TopBarSection =
|
|
5398
|
+
var TopBarSection = React37.forwardRef(
|
|
5201
5399
|
({ className, align = "left", children, ...props }, ref) => {
|
|
5202
|
-
return /* @__PURE__ */
|
|
5400
|
+
return /* @__PURE__ */ jsx37(
|
|
5203
5401
|
"div",
|
|
5204
5402
|
{
|
|
5205
5403
|
ref,
|
|
@@ -5219,9 +5417,9 @@ var TopBarSection = React36.forwardRef(
|
|
|
5219
5417
|
}
|
|
5220
5418
|
);
|
|
5221
5419
|
TopBarSection.displayName = "TopBarSection";
|
|
5222
|
-
var TopBarDivider =
|
|
5420
|
+
var TopBarDivider = React37.forwardRef(
|
|
5223
5421
|
({ className, ...props }, ref) => {
|
|
5224
|
-
return /* @__PURE__ */
|
|
5422
|
+
return /* @__PURE__ */ jsx37(
|
|
5225
5423
|
"div",
|
|
5226
5424
|
{
|
|
5227
5425
|
ref,
|
|
@@ -5234,17 +5432,17 @@ var TopBarDivider = React36.forwardRef(
|
|
|
5234
5432
|
TopBarDivider.displayName = "TopBarDivider";
|
|
5235
5433
|
|
|
5236
5434
|
// src/components/sidebar.tsx
|
|
5237
|
-
import * as
|
|
5238
|
-
import { Fragment as Fragment5, jsx as
|
|
5239
|
-
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);
|
|
5240
5438
|
var useSidebar = () => {
|
|
5241
|
-
const context =
|
|
5439
|
+
const context = React38.useContext(SidebarContext);
|
|
5242
5440
|
if (!context) {
|
|
5243
5441
|
throw new Error("useSidebar must be used within a Sidebar");
|
|
5244
5442
|
}
|
|
5245
5443
|
return context;
|
|
5246
5444
|
};
|
|
5247
|
-
var Sidebar =
|
|
5445
|
+
var Sidebar = React38.forwardRef(
|
|
5248
5446
|
({
|
|
5249
5447
|
className,
|
|
5250
5448
|
collapsed: controlledCollapsed,
|
|
@@ -5256,10 +5454,10 @@ var Sidebar = React37.forwardRef(
|
|
|
5256
5454
|
children,
|
|
5257
5455
|
...props
|
|
5258
5456
|
}, ref) => {
|
|
5259
|
-
const [uncontrolledCollapsed, setUncontrolledCollapsed] =
|
|
5457
|
+
const [uncontrolledCollapsed, setUncontrolledCollapsed] = React38.useState(defaultCollapsed);
|
|
5260
5458
|
const isControlled = controlledCollapsed !== void 0;
|
|
5261
5459
|
const collapsed = isControlled ? controlledCollapsed : uncontrolledCollapsed;
|
|
5262
|
-
const setCollapsed =
|
|
5460
|
+
const setCollapsed = React38.useCallback(
|
|
5263
5461
|
(value) => {
|
|
5264
5462
|
if (!isControlled) {
|
|
5265
5463
|
setUncontrolledCollapsed(value);
|
|
@@ -5268,7 +5466,7 @@ var Sidebar = React37.forwardRef(
|
|
|
5268
5466
|
},
|
|
5269
5467
|
[isControlled, onCollapsedChange]
|
|
5270
5468
|
);
|
|
5271
|
-
return /* @__PURE__ */
|
|
5469
|
+
return /* @__PURE__ */ jsx38(SidebarContext.Provider, { value: { collapsed, setCollapsed }, children: /* @__PURE__ */ jsx38(
|
|
5272
5470
|
"aside",
|
|
5273
5471
|
{
|
|
5274
5472
|
ref,
|
|
@@ -5288,9 +5486,9 @@ var Sidebar = React37.forwardRef(
|
|
|
5288
5486
|
}
|
|
5289
5487
|
);
|
|
5290
5488
|
Sidebar.displayName = "Sidebar";
|
|
5291
|
-
var SidebarHeader =
|
|
5489
|
+
var SidebarHeader = React38.forwardRef(
|
|
5292
5490
|
({ className, children, ...props }, ref) => {
|
|
5293
|
-
return /* @__PURE__ */
|
|
5491
|
+
return /* @__PURE__ */ jsx38(
|
|
5294
5492
|
"div",
|
|
5295
5493
|
{
|
|
5296
5494
|
ref,
|
|
@@ -5302,9 +5500,9 @@ var SidebarHeader = React37.forwardRef(
|
|
|
5302
5500
|
}
|
|
5303
5501
|
);
|
|
5304
5502
|
SidebarHeader.displayName = "SidebarHeader";
|
|
5305
|
-
var SidebarContent =
|
|
5503
|
+
var SidebarContent = React38.forwardRef(
|
|
5306
5504
|
({ className, children, ...props }, ref) => {
|
|
5307
|
-
return /* @__PURE__ */
|
|
5505
|
+
return /* @__PURE__ */ jsx38(
|
|
5308
5506
|
"div",
|
|
5309
5507
|
{
|
|
5310
5508
|
ref,
|
|
@@ -5316,9 +5514,9 @@ var SidebarContent = React37.forwardRef(
|
|
|
5316
5514
|
}
|
|
5317
5515
|
);
|
|
5318
5516
|
SidebarContent.displayName = "SidebarContent";
|
|
5319
|
-
var SidebarFooter =
|
|
5517
|
+
var SidebarFooter = React38.forwardRef(
|
|
5320
5518
|
({ className, children, ...props }, ref) => {
|
|
5321
|
-
return /* @__PURE__ */
|
|
5519
|
+
return /* @__PURE__ */ jsx38(
|
|
5322
5520
|
"div",
|
|
5323
5521
|
{
|
|
5324
5522
|
ref,
|
|
@@ -5330,25 +5528,25 @@ var SidebarFooter = React37.forwardRef(
|
|
|
5330
5528
|
}
|
|
5331
5529
|
);
|
|
5332
5530
|
SidebarFooter.displayName = "SidebarFooter";
|
|
5333
|
-
var SidebarGroup =
|
|
5531
|
+
var SidebarGroup = React38.forwardRef(
|
|
5334
5532
|
({ className, label, children, ...props }, ref) => {
|
|
5335
5533
|
const { collapsed } = useSidebar();
|
|
5336
|
-
return /* @__PURE__ */
|
|
5337
|
-
label && !collapsed && /* @__PURE__ */
|
|
5338
|
-
label && collapsed && /* @__PURE__ */
|
|
5339
|
-
/* @__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 })
|
|
5340
5538
|
] });
|
|
5341
5539
|
}
|
|
5342
5540
|
);
|
|
5343
5541
|
SidebarGroup.displayName = "SidebarGroup";
|
|
5344
|
-
var SidebarItem =
|
|
5542
|
+
var SidebarItem = React38.forwardRef(
|
|
5345
5543
|
({ className, icon, active, disabled, badge, onClick, href, children, ...props }, ref) => {
|
|
5346
5544
|
const { collapsed } = useSidebar();
|
|
5347
|
-
const content = /* @__PURE__ */
|
|
5348
|
-
icon && /* @__PURE__ */
|
|
5349
|
-
!collapsed && /* @__PURE__ */
|
|
5350
|
-
/* @__PURE__ */
|
|
5351
|
-
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 })
|
|
5352
5550
|
] })
|
|
5353
5551
|
] });
|
|
5354
5552
|
const itemClasses = cn(
|
|
@@ -5359,9 +5557,9 @@ var SidebarItem = React37.forwardRef(
|
|
|
5359
5557
|
className
|
|
5360
5558
|
);
|
|
5361
5559
|
if (href) {
|
|
5362
|
-
return /* @__PURE__ */
|
|
5560
|
+
return /* @__PURE__ */ jsx38("div", { ref, ...props, children: /* @__PURE__ */ jsx38("a", { href, className: itemClasses, children: content }) });
|
|
5363
5561
|
}
|
|
5364
|
-
return /* @__PURE__ */
|
|
5562
|
+
return /* @__PURE__ */ jsx38(
|
|
5365
5563
|
"div",
|
|
5366
5564
|
{
|
|
5367
5565
|
ref,
|
|
@@ -5376,20 +5574,20 @@ var SidebarItem = React37.forwardRef(
|
|
|
5376
5574
|
}
|
|
5377
5575
|
);
|
|
5378
5576
|
SidebarItem.displayName = "SidebarItem";
|
|
5379
|
-
var SidebarSubMenu =
|
|
5577
|
+
var SidebarSubMenu = React38.forwardRef(
|
|
5380
5578
|
({ className, icon, label, defaultOpen = false, children, ...props }, ref) => {
|
|
5381
|
-
const [open, setOpen] =
|
|
5579
|
+
const [open, setOpen] = React38.useState(defaultOpen);
|
|
5382
5580
|
const { collapsed } = useSidebar();
|
|
5383
|
-
|
|
5581
|
+
React38.useEffect(() => {
|
|
5384
5582
|
if (collapsed) {
|
|
5385
5583
|
setOpen(false);
|
|
5386
5584
|
}
|
|
5387
5585
|
}, [collapsed]);
|
|
5388
5586
|
if (collapsed) {
|
|
5389
|
-
return /* @__PURE__ */
|
|
5587
|
+
return /* @__PURE__ */ jsx38(SidebarItem, { icon, className, children: label });
|
|
5390
5588
|
}
|
|
5391
|
-
return /* @__PURE__ */
|
|
5392
|
-
/* @__PURE__ */
|
|
5589
|
+
return /* @__PURE__ */ jsxs23("div", { ref, className, ...props, children: [
|
|
5590
|
+
/* @__PURE__ */ jsxs23(
|
|
5393
5591
|
"div",
|
|
5394
5592
|
{
|
|
5395
5593
|
className: cn(
|
|
@@ -5400,9 +5598,9 @@ var SidebarSubMenu = React37.forwardRef(
|
|
|
5400
5598
|
role: "button",
|
|
5401
5599
|
tabIndex: 0,
|
|
5402
5600
|
children: [
|
|
5403
|
-
icon && /* @__PURE__ */
|
|
5404
|
-
/* @__PURE__ */
|
|
5405
|
-
/* @__PURE__ */
|
|
5601
|
+
icon && /* @__PURE__ */ jsx38("span", { className: "shrink-0", children: icon }),
|
|
5602
|
+
/* @__PURE__ */ jsx38("span", { className: "flex-1 truncate", children: label }),
|
|
5603
|
+
/* @__PURE__ */ jsx38(
|
|
5406
5604
|
"svg",
|
|
5407
5605
|
{
|
|
5408
5606
|
className: cn("h-4 w-4 shrink-0 transition-transform", open && "rotate-90"),
|
|
@@ -5413,21 +5611,21 @@ var SidebarSubMenu = React37.forwardRef(
|
|
|
5413
5611
|
strokeWidth: "2",
|
|
5414
5612
|
strokeLinecap: "round",
|
|
5415
5613
|
strokeLinejoin: "round",
|
|
5416
|
-
children: /* @__PURE__ */
|
|
5614
|
+
children: /* @__PURE__ */ jsx38("path", { d: "m9 18 6-6-6-6" })
|
|
5417
5615
|
}
|
|
5418
5616
|
)
|
|
5419
5617
|
]
|
|
5420
5618
|
}
|
|
5421
5619
|
),
|
|
5422
|
-
open && /* @__PURE__ */
|
|
5620
|
+
open && /* @__PURE__ */ jsx38("div", { className: "ml-4 pl-3 border-l border-border space-y-1 mt-1", children })
|
|
5423
5621
|
] });
|
|
5424
5622
|
}
|
|
5425
5623
|
);
|
|
5426
5624
|
SidebarSubMenu.displayName = "SidebarSubMenu";
|
|
5427
|
-
var SidebarToggle =
|
|
5625
|
+
var SidebarToggle = React38.forwardRef(
|
|
5428
5626
|
({ className, children, ...props }, ref) => {
|
|
5429
5627
|
const { collapsed, setCollapsed } = useSidebar();
|
|
5430
|
-
return /* @__PURE__ */
|
|
5628
|
+
return /* @__PURE__ */ jsx38(
|
|
5431
5629
|
"button",
|
|
5432
5630
|
{
|
|
5433
5631
|
ref,
|
|
@@ -5441,7 +5639,7 @@ var SidebarToggle = React37.forwardRef(
|
|
|
5441
5639
|
),
|
|
5442
5640
|
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
5443
5641
|
...props,
|
|
5444
|
-
children: children || /* @__PURE__ */
|
|
5642
|
+
children: children || /* @__PURE__ */ jsxs23(
|
|
5445
5643
|
"svg",
|
|
5446
5644
|
{
|
|
5447
5645
|
className: cn("h-5 w-5 transition-transform", collapsed && "rotate-180"),
|
|
@@ -5453,9 +5651,9 @@ var SidebarToggle = React37.forwardRef(
|
|
|
5453
5651
|
strokeLinecap: "round",
|
|
5454
5652
|
strokeLinejoin: "round",
|
|
5455
5653
|
children: [
|
|
5456
|
-
/* @__PURE__ */
|
|
5457
|
-
/* @__PURE__ */
|
|
5458
|
-
/* @__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" })
|
|
5459
5657
|
]
|
|
5460
5658
|
}
|
|
5461
5659
|
)
|
|
@@ -5466,17 +5664,17 @@ var SidebarToggle = React37.forwardRef(
|
|
|
5466
5664
|
SidebarToggle.displayName = "SidebarToggle";
|
|
5467
5665
|
|
|
5468
5666
|
// src/components/sidebar-rail.tsx
|
|
5469
|
-
import * as
|
|
5470
|
-
import { Fragment as Fragment6, jsx as
|
|
5471
|
-
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);
|
|
5472
5670
|
var useSidebarRail = () => {
|
|
5473
|
-
const context =
|
|
5671
|
+
const context = React39.useContext(SidebarRailContext);
|
|
5474
5672
|
if (!context) {
|
|
5475
5673
|
throw new Error("useSidebarRail must be used within a SidebarRail");
|
|
5476
5674
|
}
|
|
5477
5675
|
return context;
|
|
5478
5676
|
};
|
|
5479
|
-
var SidebarRail =
|
|
5677
|
+
var SidebarRail = React39.forwardRef(
|
|
5480
5678
|
({
|
|
5481
5679
|
className,
|
|
5482
5680
|
defaultActiveRail = null,
|
|
@@ -5494,14 +5692,14 @@ var SidebarRail = React38.forwardRef(
|
|
|
5494
5692
|
children,
|
|
5495
5693
|
...props
|
|
5496
5694
|
}, ref) => {
|
|
5497
|
-
const [uncontrolledActiveRail, setUncontrolledActiveRail] =
|
|
5498
|
-
const [expanded, setExpanded] =
|
|
5499
|
-
const [uncontrolledRailExpanded, setUncontrolledRailExpanded] =
|
|
5695
|
+
const [uncontrolledActiveRail, setUncontrolledActiveRail] = React39.useState(defaultActiveRail);
|
|
5696
|
+
const [expanded, setExpanded] = React39.useState(!!defaultActiveRail);
|
|
5697
|
+
const [uncontrolledRailExpanded, setUncontrolledRailExpanded] = React39.useState(defaultRailExpanded);
|
|
5500
5698
|
const isControlled = controlledActiveRail !== void 0;
|
|
5501
5699
|
const activeRail = isControlled ? controlledActiveRail : uncontrolledActiveRail;
|
|
5502
5700
|
const isRailControlled = controlledRailExpanded !== void 0;
|
|
5503
5701
|
const railExpanded = isRailControlled ? controlledRailExpanded : uncontrolledRailExpanded;
|
|
5504
|
-
const setActiveRail =
|
|
5702
|
+
const setActiveRail = React39.useCallback(
|
|
5505
5703
|
(rail) => {
|
|
5506
5704
|
if (!isControlled) {
|
|
5507
5705
|
setUncontrolledActiveRail(rail);
|
|
@@ -5511,7 +5709,7 @@ var SidebarRail = React38.forwardRef(
|
|
|
5511
5709
|
},
|
|
5512
5710
|
[isControlled, onActiveRailChange]
|
|
5513
5711
|
);
|
|
5514
|
-
const setRailExpanded =
|
|
5712
|
+
const setRailExpanded = React39.useCallback(
|
|
5515
5713
|
(value) => {
|
|
5516
5714
|
if (!isRailControlled) {
|
|
5517
5715
|
setUncontrolledRailExpanded(value);
|
|
@@ -5520,7 +5718,7 @@ var SidebarRail = React38.forwardRef(
|
|
|
5520
5718
|
},
|
|
5521
5719
|
[isRailControlled, onRailExpandedChange]
|
|
5522
5720
|
);
|
|
5523
|
-
return /* @__PURE__ */
|
|
5721
|
+
return /* @__PURE__ */ jsx39(
|
|
5524
5722
|
SidebarRailContext.Provider,
|
|
5525
5723
|
{
|
|
5526
5724
|
value: {
|
|
@@ -5534,7 +5732,7 @@ var SidebarRail = React38.forwardRef(
|
|
|
5534
5732
|
overlayRail: overlayRail && expandableRail,
|
|
5535
5733
|
expandableRail
|
|
5536
5734
|
},
|
|
5537
|
-
children: /* @__PURE__ */
|
|
5735
|
+
children: /* @__PURE__ */ jsx39(
|
|
5538
5736
|
"div",
|
|
5539
5737
|
{
|
|
5540
5738
|
ref,
|
|
@@ -5557,11 +5755,11 @@ var SidebarRail = React38.forwardRef(
|
|
|
5557
5755
|
}
|
|
5558
5756
|
);
|
|
5559
5757
|
SidebarRail.displayName = "SidebarRail";
|
|
5560
|
-
var IconRail =
|
|
5758
|
+
var IconRail = React39.forwardRef(
|
|
5561
5759
|
({ className, children, ...props }, ref) => {
|
|
5562
5760
|
const { railExpanded, overlayRail, expandableRail } = useSidebarRail();
|
|
5563
5761
|
const isExpanded = expandableRail && railExpanded;
|
|
5564
|
-
return /* @__PURE__ */
|
|
5762
|
+
return /* @__PURE__ */ jsx39(
|
|
5565
5763
|
"div",
|
|
5566
5764
|
{
|
|
5567
5765
|
ref,
|
|
@@ -5570,7 +5768,7 @@ var IconRail = React38.forwardRef(
|
|
|
5570
5768
|
isExpanded && !overlayRail ? "w-[var(--rail-expanded-width)]" : "w-[var(--rail-width)]"
|
|
5571
5769
|
),
|
|
5572
5770
|
...props,
|
|
5573
|
-
children: /* @__PURE__ */
|
|
5771
|
+
children: /* @__PURE__ */ jsx39(
|
|
5574
5772
|
"div",
|
|
5575
5773
|
{
|
|
5576
5774
|
className: cn(
|
|
@@ -5587,9 +5785,9 @@ var IconRail = React38.forwardRef(
|
|
|
5587
5785
|
}
|
|
5588
5786
|
);
|
|
5589
5787
|
IconRail.displayName = "IconRail";
|
|
5590
|
-
var IconRailHeader =
|
|
5788
|
+
var IconRailHeader = React39.forwardRef(
|
|
5591
5789
|
({ className, children, ...props }, ref) => {
|
|
5592
|
-
return /* @__PURE__ */
|
|
5790
|
+
return /* @__PURE__ */ jsx39(
|
|
5593
5791
|
"div",
|
|
5594
5792
|
{
|
|
5595
5793
|
ref,
|
|
@@ -5604,9 +5802,9 @@ var IconRailHeader = React38.forwardRef(
|
|
|
5604
5802
|
}
|
|
5605
5803
|
);
|
|
5606
5804
|
IconRailHeader.displayName = "IconRailHeader";
|
|
5607
|
-
var IconRailContent =
|
|
5805
|
+
var IconRailContent = React39.forwardRef(
|
|
5608
5806
|
({ className, children, ...props }, ref) => {
|
|
5609
|
-
return /* @__PURE__ */
|
|
5807
|
+
return /* @__PURE__ */ jsx39(
|
|
5610
5808
|
"div",
|
|
5611
5809
|
{
|
|
5612
5810
|
ref,
|
|
@@ -5618,9 +5816,9 @@ var IconRailContent = React38.forwardRef(
|
|
|
5618
5816
|
}
|
|
5619
5817
|
);
|
|
5620
5818
|
IconRailContent.displayName = "IconRailContent";
|
|
5621
|
-
var IconRailFooter =
|
|
5819
|
+
var IconRailFooter = React39.forwardRef(
|
|
5622
5820
|
({ className, children, ...props }, ref) => {
|
|
5623
|
-
return /* @__PURE__ */
|
|
5821
|
+
return /* @__PURE__ */ jsx39(
|
|
5624
5822
|
"div",
|
|
5625
5823
|
{
|
|
5626
5824
|
ref,
|
|
@@ -5635,7 +5833,7 @@ var IconRailFooter = React38.forwardRef(
|
|
|
5635
5833
|
}
|
|
5636
5834
|
);
|
|
5637
5835
|
IconRailFooter.displayName = "IconRailFooter";
|
|
5638
|
-
var IconRailItem =
|
|
5836
|
+
var IconRailItem = React39.forwardRef(
|
|
5639
5837
|
({ className, railId, icon, label, asButton = false, toggleRail = false, onClick, ...props }, ref) => {
|
|
5640
5838
|
const {
|
|
5641
5839
|
activeRail,
|
|
@@ -5661,7 +5859,7 @@ var IconRailItem = React38.forwardRef(
|
|
|
5661
5859
|
setActiveRail(railId);
|
|
5662
5860
|
}
|
|
5663
5861
|
};
|
|
5664
|
-
return /* @__PURE__ */
|
|
5862
|
+
return /* @__PURE__ */ jsxs24(
|
|
5665
5863
|
"button",
|
|
5666
5864
|
{
|
|
5667
5865
|
ref,
|
|
@@ -5680,14 +5878,14 @@ var IconRailItem = React38.forwardRef(
|
|
|
5680
5878
|
...props,
|
|
5681
5879
|
children: [
|
|
5682
5880
|
icon,
|
|
5683
|
-
isRailExpanded && label && /* @__PURE__ */
|
|
5881
|
+
isRailExpanded && label && /* @__PURE__ */ jsx39("span", { className: "text-sm font-medium truncate", children: label })
|
|
5684
5882
|
]
|
|
5685
5883
|
}
|
|
5686
5884
|
);
|
|
5687
5885
|
}
|
|
5688
5886
|
);
|
|
5689
5887
|
IconRailItem.displayName = "IconRailItem";
|
|
5690
|
-
var RailPanel =
|
|
5888
|
+
var RailPanel = React39.forwardRef(
|
|
5691
5889
|
({ className, railId, title, children, ...props }, ref) => {
|
|
5692
5890
|
const { activeRail, setActiveRail, hoverExpand } = useSidebarRail();
|
|
5693
5891
|
const isVisible = activeRail === railId;
|
|
@@ -5697,7 +5895,7 @@ var RailPanel = React38.forwardRef(
|
|
|
5697
5895
|
}
|
|
5698
5896
|
};
|
|
5699
5897
|
if (!isVisible) return null;
|
|
5700
|
-
return /* @__PURE__ */
|
|
5898
|
+
return /* @__PURE__ */ jsxs24(
|
|
5701
5899
|
"div",
|
|
5702
5900
|
{
|
|
5703
5901
|
ref,
|
|
@@ -5710,16 +5908,16 @@ var RailPanel = React38.forwardRef(
|
|
|
5710
5908
|
onMouseLeave: handleMouseLeave,
|
|
5711
5909
|
...props,
|
|
5712
5910
|
children: [
|
|
5713
|
-
title && /* @__PURE__ */
|
|
5714
|
-
/* @__PURE__ */
|
|
5715
|
-
/* @__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(
|
|
5716
5914
|
"button",
|
|
5717
5915
|
{
|
|
5718
5916
|
type: "button",
|
|
5719
5917
|
onClick: () => setActiveRail(null),
|
|
5720
5918
|
className: "p-1 rounded hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",
|
|
5721
5919
|
"aria-label": "Close panel",
|
|
5722
|
-
children: /* @__PURE__ */
|
|
5920
|
+
children: /* @__PURE__ */ jsxs24(
|
|
5723
5921
|
"svg",
|
|
5724
5922
|
{
|
|
5725
5923
|
className: "h-4 w-4",
|
|
@@ -5731,36 +5929,36 @@ var RailPanel = React38.forwardRef(
|
|
|
5731
5929
|
strokeLinecap: "round",
|
|
5732
5930
|
strokeLinejoin: "round",
|
|
5733
5931
|
children: [
|
|
5734
|
-
/* @__PURE__ */
|
|
5735
|
-
/* @__PURE__ */
|
|
5932
|
+
/* @__PURE__ */ jsx39("path", { d: "M18 6 6 18" }),
|
|
5933
|
+
/* @__PURE__ */ jsx39("path", { d: "m6 6 12 12" })
|
|
5736
5934
|
]
|
|
5737
5935
|
}
|
|
5738
5936
|
)
|
|
5739
5937
|
}
|
|
5740
5938
|
)
|
|
5741
5939
|
] }),
|
|
5742
|
-
/* @__PURE__ */
|
|
5940
|
+
/* @__PURE__ */ jsx39("div", { className: "flex-1 overflow-y-auto", children })
|
|
5743
5941
|
]
|
|
5744
5942
|
}
|
|
5745
5943
|
);
|
|
5746
5944
|
}
|
|
5747
5945
|
);
|
|
5748
5946
|
RailPanel.displayName = "RailPanel";
|
|
5749
|
-
var RailPanelGroup =
|
|
5947
|
+
var RailPanelGroup = React39.forwardRef(
|
|
5750
5948
|
({ className, label, children, ...props }, ref) => {
|
|
5751
|
-
return /* @__PURE__ */
|
|
5752
|
-
label && /* @__PURE__ */
|
|
5753
|
-
/* @__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 })
|
|
5754
5952
|
] });
|
|
5755
5953
|
}
|
|
5756
5954
|
);
|
|
5757
5955
|
RailPanelGroup.displayName = "RailPanelGroup";
|
|
5758
|
-
var RailPanelItem =
|
|
5956
|
+
var RailPanelItem = React39.forwardRef(
|
|
5759
5957
|
({ className, icon, active, disabled, badge, href, children, onClick, ...props }, ref) => {
|
|
5760
|
-
const content = /* @__PURE__ */
|
|
5761
|
-
icon && /* @__PURE__ */
|
|
5762
|
-
/* @__PURE__ */
|
|
5763
|
-
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 })
|
|
5764
5962
|
] });
|
|
5765
5963
|
const itemClasses = cn(
|
|
5766
5964
|
"flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors cursor-pointer",
|
|
@@ -5769,9 +5967,9 @@ var RailPanelItem = React38.forwardRef(
|
|
|
5769
5967
|
className
|
|
5770
5968
|
);
|
|
5771
5969
|
if (href) {
|
|
5772
|
-
return /* @__PURE__ */
|
|
5970
|
+
return /* @__PURE__ */ jsx39("div", { ref, ...props, children: /* @__PURE__ */ jsx39("a", { href, className: itemClasses, children: content }) });
|
|
5773
5971
|
}
|
|
5774
|
-
return /* @__PURE__ */
|
|
5972
|
+
return /* @__PURE__ */ jsx39(
|
|
5775
5973
|
"div",
|
|
5776
5974
|
{
|
|
5777
5975
|
ref,
|
|
@@ -5788,34 +5986,34 @@ var RailPanelItem = React38.forwardRef(
|
|
|
5788
5986
|
RailPanelItem.displayName = "RailPanelItem";
|
|
5789
5987
|
|
|
5790
5988
|
// src/playground.tsx
|
|
5791
|
-
import * as
|
|
5792
|
-
import { jsx as
|
|
5793
|
-
var Section = ({ title, children }) => /* @__PURE__ */
|
|
5794
|
-
/* @__PURE__ */
|
|
5795
|
-
/* @__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 })
|
|
5796
5994
|
] });
|
|
5797
5995
|
var ThemeToggle = () => {
|
|
5798
5996
|
const { theme, setTheme } = useTheme();
|
|
5799
|
-
return /* @__PURE__ */
|
|
5800
|
-
/* @__PURE__ */
|
|
5801
|
-
/* @__PURE__ */
|
|
5802
|
-
/* @__PURE__ */
|
|
5803
|
-
/* @__PURE__ */
|
|
5804
|
-
/* @__PURE__ */
|
|
5805
|
-
/* @__PURE__ */
|
|
5806
|
-
/* @__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" })
|
|
5807
6005
|
] })
|
|
5808
6006
|
] })
|
|
5809
6007
|
] });
|
|
5810
6008
|
};
|
|
5811
6009
|
var PlaygroundContent = () => {
|
|
5812
|
-
const [dialogOpen, setDialogOpen] =
|
|
5813
|
-
const [checkboxChecked, setCheckboxChecked] =
|
|
5814
|
-
const [switchChecked, setSwitchChecked] =
|
|
5815
|
-
const [inputValue, setInputValue] =
|
|
5816
|
-
const [textareaValue, setTextareaValue] =
|
|
5817
|
-
const [selectValue, setSelectValue] =
|
|
5818
|
-
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);
|
|
5819
6017
|
const comboboxOptions = [
|
|
5820
6018
|
{ value: "react", label: "React" },
|
|
5821
6019
|
{ value: "vue", label: "Vue" },
|
|
@@ -5823,35 +6021,35 @@ var PlaygroundContent = () => {
|
|
|
5823
6021
|
{ value: "svelte", label: "Svelte" },
|
|
5824
6022
|
{ value: "solid", label: "SolidJS" }
|
|
5825
6023
|
];
|
|
5826
|
-
return /* @__PURE__ */
|
|
5827
|
-
/* @__PURE__ */
|
|
5828
|
-
/* @__PURE__ */
|
|
5829
|
-
/* @__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, {})
|
|
5830
6028
|
] }),
|
|
5831
|
-
/* @__PURE__ */
|
|
5832
|
-
/* @__PURE__ */
|
|
5833
|
-
/* @__PURE__ */
|
|
5834
|
-
/* @__PURE__ */
|
|
5835
|
-
/* @__PURE__ */
|
|
5836
|
-
/* @__PURE__ */
|
|
5837
|
-
/* @__PURE__ */
|
|
5838
|
-
/* @__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" })
|
|
5839
6037
|
] }),
|
|
5840
|
-
/* @__PURE__ */
|
|
5841
|
-
/* @__PURE__ */
|
|
5842
|
-
/* @__PURE__ */
|
|
5843
|
-
/* @__PURE__ */
|
|
5844
|
-
/* @__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}" })
|
|
5845
6043
|
] }),
|
|
5846
|
-
/* @__PURE__ */
|
|
5847
|
-
/* @__PURE__ */
|
|
5848
|
-
/* @__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" })
|
|
5849
6047
|
] })
|
|
5850
6048
|
] }),
|
|
5851
|
-
/* @__PURE__ */
|
|
5852
|
-
/* @__PURE__ */
|
|
5853
|
-
/* @__PURE__ */
|
|
5854
|
-
/* @__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(
|
|
5855
6053
|
Input,
|
|
5856
6054
|
{
|
|
5857
6055
|
id: "input-default",
|
|
@@ -5861,19 +6059,19 @@ var PlaygroundContent = () => {
|
|
|
5861
6059
|
}
|
|
5862
6060
|
)
|
|
5863
6061
|
] }),
|
|
5864
|
-
/* @__PURE__ */
|
|
5865
|
-
/* @__PURE__ */
|
|
5866
|
-
/* @__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 })
|
|
5867
6065
|
] }),
|
|
5868
|
-
/* @__PURE__ */
|
|
5869
|
-
/* @__PURE__ */
|
|
5870
|
-
/* @__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" })
|
|
5871
6069
|
] })
|
|
5872
6070
|
] }) }),
|
|
5873
|
-
/* @__PURE__ */
|
|
5874
|
-
/* @__PURE__ */
|
|
5875
|
-
/* @__PURE__ */
|
|
5876
|
-
/* @__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(
|
|
5877
6075
|
Textarea,
|
|
5878
6076
|
{
|
|
5879
6077
|
id: "textarea-default",
|
|
@@ -5883,64 +6081,66 @@ var PlaygroundContent = () => {
|
|
|
5883
6081
|
}
|
|
5884
6082
|
)
|
|
5885
6083
|
] }),
|
|
5886
|
-
/* @__PURE__ */
|
|
5887
|
-
/* @__PURE__ */
|
|
5888
|
-
/* @__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 })
|
|
5889
6087
|
] })
|
|
5890
6088
|
] }) }),
|
|
5891
|
-
/* @__PURE__ */
|
|
5892
|
-
/* @__PURE__ */
|
|
5893
|
-
/* @__PURE__ */
|
|
5894
|
-
/* @__PURE__ */
|
|
5895
|
-
/* @__PURE__ */
|
|
5896
|
-
/* @__PURE__ */
|
|
5897
|
-
/* @__PURE__ */
|
|
5898
|
-
/* @__PURE__ */
|
|
5899
|
-
/* @__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" })
|
|
5900
6098
|
] })
|
|
5901
6099
|
] })
|
|
5902
6100
|
] }),
|
|
5903
|
-
/* @__PURE__ */
|
|
5904
|
-
/* @__PURE__ */
|
|
5905
|
-
/* @__PURE__ */
|
|
5906
|
-
/* @__PURE__ */
|
|
5907
|
-
/* @__PURE__ */
|
|
5908
|
-
/* @__PURE__ */
|
|
5909
|
-
/* @__PURE__ */
|
|
5910
|
-
/* @__PURE__ */
|
|
5911
|
-
/* @__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" })
|
|
5912
6110
|
] }),
|
|
5913
|
-
/* @__PURE__ */
|
|
5914
|
-
/* @__PURE__ */
|
|
5915
|
-
/* @__PURE__ */
|
|
5916
|
-
/* @__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" })
|
|
5917
6115
|
] })
|
|
5918
6116
|
] })
|
|
5919
6117
|
] })
|
|
5920
6118
|
] }),
|
|
5921
|
-
/* @__PURE__ */
|
|
5922
|
-
/* @__PURE__ */
|
|
5923
|
-
/* @__PURE__ */
|
|
5924
|
-
/* @__PURE__ */
|
|
5925
|
-
/* @__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" }) })
|
|
5926
6124
|
] })
|
|
5927
6125
|
] })
|
|
5928
6126
|
] }) }),
|
|
5929
|
-
/* @__PURE__ */
|
|
5930
|
-
/* @__PURE__ */
|
|
5931
|
-
/* @__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(
|
|
5932
6130
|
Combobox,
|
|
5933
6131
|
{
|
|
5934
6132
|
options: comboboxOptions,
|
|
5935
6133
|
value: comboboxValue,
|
|
5936
|
-
onChange:
|
|
6134
|
+
onChange: (nextValue) => {
|
|
6135
|
+
setComboboxValue(nextValue);
|
|
6136
|
+
},
|
|
5937
6137
|
placeholder: "Search frameworks..."
|
|
5938
6138
|
}
|
|
5939
6139
|
)
|
|
5940
6140
|
] }) }) }),
|
|
5941
|
-
/* @__PURE__ */
|
|
5942
|
-
/* @__PURE__ */
|
|
5943
|
-
/* @__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(
|
|
5944
6144
|
Checkbox,
|
|
5945
6145
|
{
|
|
5946
6146
|
id: "checkbox",
|
|
@@ -5948,15 +6148,15 @@ var PlaygroundContent = () => {
|
|
|
5948
6148
|
onChange: (e) => setCheckboxChecked(e.target.checked)
|
|
5949
6149
|
}
|
|
5950
6150
|
),
|
|
5951
|
-
/* @__PURE__ */
|
|
6151
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "checkbox", children: "Accept terms and conditions" })
|
|
5952
6152
|
] }),
|
|
5953
|
-
/* @__PURE__ */
|
|
5954
|
-
/* @__PURE__ */
|
|
5955
|
-
/* @__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" })
|
|
5956
6156
|
] }),
|
|
5957
|
-
/* @__PURE__ */
|
|
5958
|
-
/* @__PURE__ */
|
|
5959
|
-
/* @__PURE__ */
|
|
6157
|
+
/* @__PURE__ */ jsx40(Separator, {}),
|
|
6158
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
6159
|
+
/* @__PURE__ */ jsx40(
|
|
5960
6160
|
Switch,
|
|
5961
6161
|
{
|
|
5962
6162
|
id: "switch",
|
|
@@ -5964,160 +6164,160 @@ var PlaygroundContent = () => {
|
|
|
5964
6164
|
onChange: (e) => setSwitchChecked(e.target.checked)
|
|
5965
6165
|
}
|
|
5966
6166
|
),
|
|
5967
|
-
/* @__PURE__ */
|
|
6167
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "switch", children: "Enable notifications" })
|
|
5968
6168
|
] }),
|
|
5969
|
-
/* @__PURE__ */
|
|
5970
|
-
/* @__PURE__ */
|
|
5971
|
-
/* @__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" })
|
|
5972
6172
|
] })
|
|
5973
6173
|
] }) }),
|
|
5974
|
-
/* @__PURE__ */
|
|
5975
|
-
/* @__PURE__ */
|
|
5976
|
-
/* @__PURE__ */
|
|
5977
|
-
/* @__PURE__ */
|
|
5978
|
-
/* @__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" })
|
|
5979
6179
|
] }) }),
|
|
5980
|
-
/* @__PURE__ */
|
|
5981
|
-
/* @__PURE__ */
|
|
5982
|
-
/* @__PURE__ */
|
|
5983
|
-
/* @__PURE__ */
|
|
5984
|
-
/* @__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" })
|
|
5985
6185
|
] }),
|
|
5986
|
-
/* @__PURE__ */
|
|
5987
|
-
/* @__PURE__ */
|
|
5988
|
-
/* @__PURE__ */
|
|
5989
|
-
/* @__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" })
|
|
5990
6190
|
] })
|
|
5991
6191
|
] }),
|
|
5992
|
-
/* @__PURE__ */
|
|
5993
|
-
/* @__PURE__ */
|
|
5994
|
-
/* @__PURE__ */
|
|
5995
|
-
/* @__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" })
|
|
5996
6196
|
] }),
|
|
5997
|
-
/* @__PURE__ */
|
|
5998
|
-
/* @__PURE__ */
|
|
5999
|
-
/* @__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..." })
|
|
6000
6200
|
] }) }),
|
|
6001
|
-
/* @__PURE__ */
|
|
6201
|
+
/* @__PURE__ */ jsx40(CardFooter, { children: /* @__PURE__ */ jsx40(Button, { className: "w-full", children: "Save" }) })
|
|
6002
6202
|
] })
|
|
6003
6203
|
] }) }),
|
|
6004
|
-
/* @__PURE__ */
|
|
6005
|
-
/* @__PURE__ */
|
|
6006
|
-
/* @__PURE__ */
|
|
6007
|
-
/* @__PURE__ */
|
|
6008
|
-
/* @__PURE__ */
|
|
6009
|
-
/* @__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." })
|
|
6010
6210
|
] }),
|
|
6011
|
-
/* @__PURE__ */
|
|
6012
|
-
/* @__PURE__ */
|
|
6013
|
-
/* @__PURE__ */
|
|
6014
|
-
/* @__PURE__ */
|
|
6015
|
-
/* @__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" })
|
|
6016
6216
|
] }),
|
|
6017
|
-
/* @__PURE__ */
|
|
6018
|
-
/* @__PURE__ */
|
|
6019
|
-
/* @__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" })
|
|
6020
6220
|
] })
|
|
6021
6221
|
] }),
|
|
6022
|
-
/* @__PURE__ */
|
|
6023
|
-
/* @__PURE__ */
|
|
6024
|
-
/* @__PURE__ */
|
|
6025
|
-
/* @__PURE__ */
|
|
6026
|
-
/* @__PURE__ */
|
|
6027
|
-
/* @__PURE__ */
|
|
6028
|
-
/* @__PURE__ */
|
|
6029
|
-
/* @__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" })
|
|
6030
6230
|
] })
|
|
6031
6231
|
] })
|
|
6032
6232
|
] }),
|
|
6033
|
-
/* @__PURE__ */
|
|
6034
|
-
/* @__PURE__ */
|
|
6035
|
-
/* @__PURE__ */
|
|
6036
|
-
/* @__PURE__ */
|
|
6037
|
-
/* @__PURE__ */
|
|
6038
|
-
/* @__PURE__ */
|
|
6039
|
-
/* @__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" })
|
|
6040
6240
|
] })
|
|
6041
6241
|
] })
|
|
6042
6242
|
] })
|
|
6043
6243
|
] })
|
|
6044
6244
|
] }),
|
|
6045
|
-
/* @__PURE__ */
|
|
6046
|
-
/* @__PURE__ */
|
|
6047
|
-
/* @__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" })
|
|
6048
6248
|
] })
|
|
6049
6249
|
] }) })
|
|
6050
6250
|
] }),
|
|
6051
|
-
/* @__PURE__ */
|
|
6052
|
-
/* @__PURE__ */
|
|
6053
|
-
/* @__PURE__ */
|
|
6054
|
-
/* @__PURE__ */
|
|
6055
|
-
/* @__PURE__ */
|
|
6056
|
-
/* @__PURE__ */
|
|
6057
|
-
/* @__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" })
|
|
6058
6258
|
] }) }),
|
|
6059
|
-
/* @__PURE__ */
|
|
6060
|
-
/* @__PURE__ */
|
|
6061
|
-
/* @__PURE__ */
|
|
6062
|
-
/* @__PURE__ */
|
|
6063
|
-
/* @__PURE__ */
|
|
6064
|
-
/* @__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" })
|
|
6065
6265
|
] }),
|
|
6066
|
-
/* @__PURE__ */
|
|
6067
|
-
/* @__PURE__ */
|
|
6068
|
-
/* @__PURE__ */
|
|
6069
|
-
/* @__PURE__ */
|
|
6070
|
-
/* @__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" })
|
|
6071
6271
|
] }),
|
|
6072
|
-
/* @__PURE__ */
|
|
6073
|
-
/* @__PURE__ */
|
|
6074
|
-
/* @__PURE__ */
|
|
6075
|
-
/* @__PURE__ */
|
|
6076
|
-
/* @__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" })
|
|
6077
6277
|
] })
|
|
6078
6278
|
] })
|
|
6079
6279
|
] }) }),
|
|
6080
|
-
/* @__PURE__ */
|
|
6081
|
-
/* @__PURE__ */
|
|
6082
|
-
/* @__PURE__ */
|
|
6083
|
-
/* @__PURE__ */
|
|
6084
|
-
/* @__PURE__ */
|
|
6085
|
-
/* @__PURE__ */
|
|
6086
|
-
/* @__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") }) })
|
|
6087
6287
|
] }) }) }),
|
|
6088
|
-
/* @__PURE__ */
|
|
6089
|
-
/* @__PURE__ */
|
|
6090
|
-
/* @__PURE__ */
|
|
6091
|
-
/* @__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" })
|
|
6092
6292
|
] }),
|
|
6093
|
-
/* @__PURE__ */
|
|
6094
|
-
/* @__PURE__ */
|
|
6095
|
-
/* @__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" })
|
|
6096
6296
|
] }),
|
|
6097
|
-
/* @__PURE__ */
|
|
6098
|
-
/* @__PURE__ */
|
|
6099
|
-
/* @__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" })
|
|
6100
6300
|
] })
|
|
6101
6301
|
] }) }),
|
|
6102
|
-
/* @__PURE__ */
|
|
6103
|
-
/* @__PURE__ */
|
|
6104
|
-
/* @__PURE__ */
|
|
6105
|
-
/* @__PURE__ */
|
|
6106
|
-
/* @__PURE__ */
|
|
6107
|
-
/* @__PURE__ */
|
|
6108
|
-
/* @__PURE__ */
|
|
6109
|
-
/* @__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" })
|
|
6110
6310
|
] })
|
|
6111
6311
|
] }) }),
|
|
6112
|
-
/* @__PURE__ */
|
|
6113
|
-
/* @__PURE__ */
|
|
6114
|
-
/* @__PURE__ */
|
|
6115
|
-
/* @__PURE__ */
|
|
6116
|
-
/* @__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" })
|
|
6117
6317
|
] }) })
|
|
6118
6318
|
] }) });
|
|
6119
6319
|
};
|
|
6120
|
-
var Playground = () => /* @__PURE__ */
|
|
6320
|
+
var Playground = () => /* @__PURE__ */ jsx40(ThemeProvider, { defaultTheme: "light", children: /* @__PURE__ */ jsx40(PlaygroundContent, {}) });
|
|
6121
6321
|
export {
|
|
6122
6322
|
Alert,
|
|
6123
6323
|
AlertDescription,
|
|
@@ -6214,7 +6414,7 @@ export {
|
|
|
6214
6414
|
InputAdornment,
|
|
6215
6415
|
Label,
|
|
6216
6416
|
LinearProgress,
|
|
6217
|
-
List,
|
|
6417
|
+
List2 as List,
|
|
6218
6418
|
ListDivider,
|
|
6219
6419
|
ListItem,
|
|
6220
6420
|
ListItemAvatar,
|
|
@@ -6285,6 +6485,10 @@ export {
|
|
|
6285
6485
|
TableHead,
|
|
6286
6486
|
TableHeader,
|
|
6287
6487
|
TableRow,
|
|
6488
|
+
Tabs,
|
|
6489
|
+
TabsContent,
|
|
6490
|
+
TabsList,
|
|
6491
|
+
TabsTrigger,
|
|
6288
6492
|
Text,
|
|
6289
6493
|
TextField,
|
|
6290
6494
|
Textarea,
|
|
@@ -6304,7 +6508,15 @@ export {
|
|
|
6304
6508
|
TopBarNavItem,
|
|
6305
6509
|
TopBarSection,
|
|
6306
6510
|
Typography,
|
|
6511
|
+
UnderlineTabsContent,
|
|
6512
|
+
UnderlineTabsList,
|
|
6513
|
+
UnderlineTabsTrigger,
|
|
6307
6514
|
VStack,
|
|
6515
|
+
VerticalTabs,
|
|
6516
|
+
VerticalTabsContent,
|
|
6517
|
+
VerticalTabsGroupLabel,
|
|
6518
|
+
VerticalTabsList,
|
|
6519
|
+
VerticalTabsTrigger,
|
|
6308
6520
|
cn,
|
|
6309
6521
|
useFormControl,
|
|
6310
6522
|
useSidebar,
|