@northslopetech/altitude-ui 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +233 -1
- package/dist/index.d.ts +233 -1
- package/dist/index.js +911 -200
- package/dist/index.mjs +906 -216
- package/dist/pdf.worker.min.mjs +28 -0
- package/dist/tokens.css +1 -1
- package/package.json +6 -2
package/dist/index.mjs
CHANGED
|
@@ -1650,6 +1650,77 @@ var Logout = ({
|
|
|
1650
1650
|
]
|
|
1651
1651
|
}
|
|
1652
1652
|
);
|
|
1653
|
+
var Print = ({
|
|
1654
|
+
className,
|
|
1655
|
+
variant = "dark",
|
|
1656
|
+
...props
|
|
1657
|
+
}) => /* @__PURE__ */ jsx2(
|
|
1658
|
+
"svg",
|
|
1659
|
+
{
|
|
1660
|
+
width: "16",
|
|
1661
|
+
height: "16",
|
|
1662
|
+
viewBox: "0 0 16 16",
|
|
1663
|
+
fill: "none",
|
|
1664
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1665
|
+
className: cn(getVariantStyles(variant), className),
|
|
1666
|
+
...props,
|
|
1667
|
+
children: /* @__PURE__ */ jsx2(
|
|
1668
|
+
"path",
|
|
1669
|
+
{
|
|
1670
|
+
d: "M12.9 5.33333H3.1C1.938 5.33333 1 6.22667 1 7.33333V11.3333H3.8V14H12.2V11.3333H15V7.33333C15 6.22667 14.062 5.33333 12.9 5.33333ZM10.8 12.6667H5.2V9.33333H10.8V12.6667ZM12.9 8C12.515 8 12.2 7.7 12.2 7.33333C12.2 6.96667 12.515 6.66667 12.9 6.66667C13.285 6.66667 13.6 6.96667 13.6 7.33333C13.6 7.7 13.285 8 12.9 8ZM12.2 2H3.8V4.66667H12.2V2Z",
|
|
1671
|
+
fill: "#161616"
|
|
1672
|
+
}
|
|
1673
|
+
)
|
|
1674
|
+
}
|
|
1675
|
+
);
|
|
1676
|
+
var Download = ({
|
|
1677
|
+
className,
|
|
1678
|
+
variant = "dark",
|
|
1679
|
+
...props
|
|
1680
|
+
}) => /* @__PURE__ */ jsx2(
|
|
1681
|
+
"svg",
|
|
1682
|
+
{
|
|
1683
|
+
width: "16",
|
|
1684
|
+
height: "16",
|
|
1685
|
+
viewBox: "0 0 16 16",
|
|
1686
|
+
fill: "none",
|
|
1687
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1688
|
+
className: cn(getVariantStyles(variant), className),
|
|
1689
|
+
...props,
|
|
1690
|
+
children: /* @__PURE__ */ jsx2(
|
|
1691
|
+
"path",
|
|
1692
|
+
{
|
|
1693
|
+
fillRule: "evenodd",
|
|
1694
|
+
clipRule: "evenodd",
|
|
1695
|
+
d: "M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.1464 9.31042L8.3535 12.1033C8.15824 12.2986 7.84166 12.2986 7.6464 12.1033L4.8535 9.31042C4.53852 8.99543 4.76161 8.45686 5.20706 8.45686H6.99995V4.75C6.99995 4.19772 7.44767 3.75 7.99995 3.75C8.55224 3.75 8.99995 4.19772 8.99995 4.75V8.45686H10.7928C11.2383 8.45686 11.4614 8.99543 11.1464 9.31042Z",
|
|
1696
|
+
fill: "#161616"
|
|
1697
|
+
}
|
|
1698
|
+
)
|
|
1699
|
+
}
|
|
1700
|
+
);
|
|
1701
|
+
var Panel = ({
|
|
1702
|
+
className,
|
|
1703
|
+
variant = "dark",
|
|
1704
|
+
...props
|
|
1705
|
+
}) => /* @__PURE__ */ jsx2(
|
|
1706
|
+
"svg",
|
|
1707
|
+
{
|
|
1708
|
+
width: "16",
|
|
1709
|
+
height: "16",
|
|
1710
|
+
viewBox: "0 0 16 16",
|
|
1711
|
+
fill: "none",
|
|
1712
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1713
|
+
className: cn(getVariantStyles(variant), className),
|
|
1714
|
+
...props,
|
|
1715
|
+
children: /* @__PURE__ */ jsx2(
|
|
1716
|
+
"path",
|
|
1717
|
+
{
|
|
1718
|
+
d: "M14 2C14.5523 2 15 2.44772 15 3V13C15 13.5523 14.5523 14 14 14H2C1.44772 14 1 13.5523 1 13V3C1 2.44772 1.44772 2 2 2H14ZM7 12H13V4H7V12ZM3 12H5V4H3V12Z",
|
|
1719
|
+
fill: "currentColor"
|
|
1720
|
+
}
|
|
1721
|
+
)
|
|
1722
|
+
}
|
|
1723
|
+
);
|
|
1653
1724
|
|
|
1654
1725
|
// src/components/ui/select.tsx
|
|
1655
1726
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -2069,15 +2140,329 @@ function FieldError({
|
|
|
2069
2140
|
);
|
|
2070
2141
|
}
|
|
2071
2142
|
|
|
2072
|
-
// src/components/ui/
|
|
2143
|
+
// src/components/ui/tooltip.tsx
|
|
2144
|
+
import * as React4 from "react";
|
|
2145
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2146
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2147
|
+
function TooltipProvider({
|
|
2148
|
+
delayDuration = 0,
|
|
2149
|
+
...props
|
|
2150
|
+
}) {
|
|
2151
|
+
return /* @__PURE__ */ jsx7(
|
|
2152
|
+
TooltipPrimitive.Provider,
|
|
2153
|
+
{
|
|
2154
|
+
"data-slot": "tooltip-provider",
|
|
2155
|
+
delayDuration,
|
|
2156
|
+
...props
|
|
2157
|
+
}
|
|
2158
|
+
);
|
|
2159
|
+
}
|
|
2160
|
+
TooltipProvider.displayName = "TooltipProvider";
|
|
2161
|
+
function Tooltip({ delayDuration, ...props }) {
|
|
2162
|
+
return /* @__PURE__ */ jsx7(TooltipProvider, { delayDuration, children: /* @__PURE__ */ jsx7(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
2163
|
+
}
|
|
2164
|
+
Tooltip.displayName = "Tooltip";
|
|
2165
|
+
var TooltipTrigger = React4.forwardRef(({ ...props }, ref) => {
|
|
2166
|
+
return /* @__PURE__ */ jsx7(
|
|
2167
|
+
TooltipPrimitive.Trigger,
|
|
2168
|
+
{
|
|
2169
|
+
ref,
|
|
2170
|
+
"data-slot": "tooltip-trigger",
|
|
2171
|
+
...props
|
|
2172
|
+
}
|
|
2173
|
+
);
|
|
2174
|
+
});
|
|
2175
|
+
TooltipTrigger.displayName = "TooltipTrigger";
|
|
2176
|
+
var TooltipContent = React4.forwardRef(({ className, sideOffset = 2, children, ...props }, ref) => {
|
|
2177
|
+
return /* @__PURE__ */ jsx7(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs5(
|
|
2178
|
+
TooltipPrimitive.Content,
|
|
2179
|
+
{
|
|
2180
|
+
ref,
|
|
2181
|
+
"data-slot": "tooltip-content",
|
|
2182
|
+
sideOffset,
|
|
2183
|
+
className: cn(
|
|
2184
|
+
"bg-dark text-light animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-[var(--radix-tooltip-content-transform-origin)] flex items-start gap-2 rounded p-1.5 text-balance shadow-sm",
|
|
2185
|
+
className
|
|
2186
|
+
),
|
|
2187
|
+
...props,
|
|
2188
|
+
children: [
|
|
2189
|
+
/* @__PURE__ */ jsx7(TooltipPrimitive.Arrow, { className: "fill-dark", width: 10, height: 9 }),
|
|
2190
|
+
children
|
|
2191
|
+
]
|
|
2192
|
+
}
|
|
2193
|
+
) });
|
|
2194
|
+
});
|
|
2195
|
+
TooltipContent.displayName = "TooltipContent";
|
|
2196
|
+
|
|
2197
|
+
// src/components/ui/sidebar.tsx
|
|
2073
2198
|
import * as React5 from "react";
|
|
2199
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2200
|
+
var SIDEBAR_CONSTANTS = {
|
|
2201
|
+
WIDTH: "144px",
|
|
2202
|
+
WIDTH_ICON: "48px"
|
|
2203
|
+
};
|
|
2204
|
+
var SidebarContext = React5.createContext(null);
|
|
2205
|
+
function useSidebar() {
|
|
2206
|
+
const context = React5.useContext(SidebarContext);
|
|
2207
|
+
if (!context) {
|
|
2208
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
2209
|
+
}
|
|
2210
|
+
return context;
|
|
2211
|
+
}
|
|
2212
|
+
var SidebarProvider = React5.forwardRef(
|
|
2213
|
+
({
|
|
2214
|
+
defaultOpen = true,
|
|
2215
|
+
open: openProp,
|
|
2216
|
+
onOpenChange: setOpenProp,
|
|
2217
|
+
className,
|
|
2218
|
+
style,
|
|
2219
|
+
children,
|
|
2220
|
+
...props
|
|
2221
|
+
}, ref) => {
|
|
2222
|
+
const [_open, _setOpen] = React5.useState(defaultOpen);
|
|
2223
|
+
const open = openProp ?? _open;
|
|
2224
|
+
const setOpen = React5.useCallback(
|
|
2225
|
+
(value) => {
|
|
2226
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
2227
|
+
if (setOpenProp) {
|
|
2228
|
+
setOpenProp(openState);
|
|
2229
|
+
} else {
|
|
2230
|
+
_setOpen(openState);
|
|
2231
|
+
}
|
|
2232
|
+
},
|
|
2233
|
+
[setOpenProp, open]
|
|
2234
|
+
);
|
|
2235
|
+
const toggleSidebar = React5.useCallback(() => {
|
|
2236
|
+
return setOpen((open2) => !open2);
|
|
2237
|
+
}, [setOpen]);
|
|
2238
|
+
const state = open ? "expanded" : "collapsed";
|
|
2239
|
+
const contextValue = React5.useMemo(
|
|
2240
|
+
() => ({
|
|
2241
|
+
state,
|
|
2242
|
+
open,
|
|
2243
|
+
setOpen,
|
|
2244
|
+
toggleSidebar
|
|
2245
|
+
}),
|
|
2246
|
+
[state, open, setOpen, toggleSidebar]
|
|
2247
|
+
);
|
|
2248
|
+
return /* @__PURE__ */ jsx8(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx8(
|
|
2249
|
+
"div",
|
|
2250
|
+
{
|
|
2251
|
+
style: {
|
|
2252
|
+
"--sidebar-width": SIDEBAR_CONSTANTS.WIDTH,
|
|
2253
|
+
"--sidebar-width-icon": SIDEBAR_CONSTANTS.WIDTH_ICON,
|
|
2254
|
+
...style
|
|
2255
|
+
},
|
|
2256
|
+
className: cn(
|
|
2257
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-light",
|
|
2258
|
+
className
|
|
2259
|
+
),
|
|
2260
|
+
ref,
|
|
2261
|
+
...props,
|
|
2262
|
+
children
|
|
2263
|
+
}
|
|
2264
|
+
) });
|
|
2265
|
+
}
|
|
2266
|
+
);
|
|
2267
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
2268
|
+
var Sidebar = React5.forwardRef(
|
|
2269
|
+
({ collapsible = "icon", className, children, ...props }, ref) => {
|
|
2270
|
+
const { state } = useSidebar();
|
|
2271
|
+
return /* @__PURE__ */ jsxs6(
|
|
2272
|
+
"aside",
|
|
2273
|
+
{
|
|
2274
|
+
ref,
|
|
2275
|
+
className: "group peer text-light",
|
|
2276
|
+
"data-state": state,
|
|
2277
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
2278
|
+
"aria-label": "Main navigation",
|
|
2279
|
+
"aria-expanded": state === "expanded",
|
|
2280
|
+
role: "navigation",
|
|
2281
|
+
children: [
|
|
2282
|
+
/* @__PURE__ */ jsx8(
|
|
2283
|
+
"div",
|
|
2284
|
+
{
|
|
2285
|
+
className: cn(
|
|
2286
|
+
"relative h-svh shrink-0 transition-[width] duration-200 ease-linear",
|
|
2287
|
+
"w-[var(--sidebar-width)] group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]"
|
|
2288
|
+
)
|
|
2289
|
+
}
|
|
2290
|
+
),
|
|
2291
|
+
/* @__PURE__ */ jsx8(
|
|
2292
|
+
"div",
|
|
2293
|
+
{
|
|
2294
|
+
className: cn(
|
|
2295
|
+
"fixed inset-y-0 z-10 h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear flex left-0",
|
|
2296
|
+
"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]",
|
|
2297
|
+
className
|
|
2298
|
+
),
|
|
2299
|
+
...props,
|
|
2300
|
+
children: /* @__PURE__ */ jsx8(
|
|
2301
|
+
"div",
|
|
2302
|
+
{
|
|
2303
|
+
"data-sidebar": "sidebar",
|
|
2304
|
+
className: "flex h-full w-full flex-col gap-8 p-4 px-2 bg-dark",
|
|
2305
|
+
children
|
|
2306
|
+
}
|
|
2307
|
+
)
|
|
2308
|
+
}
|
|
2309
|
+
)
|
|
2310
|
+
]
|
|
2311
|
+
}
|
|
2312
|
+
);
|
|
2313
|
+
}
|
|
2314
|
+
);
|
|
2315
|
+
Sidebar.displayName = "Sidebar";
|
|
2316
|
+
var SidebarInset = React5.forwardRef(
|
|
2317
|
+
({ className, ...props }, ref) => {
|
|
2318
|
+
return /* @__PURE__ */ jsx8(
|
|
2319
|
+
"main",
|
|
2320
|
+
{
|
|
2321
|
+
ref,
|
|
2322
|
+
className: cn(
|
|
2323
|
+
"relative flex min-h-svh flex-1 flex-col bg-dark",
|
|
2324
|
+
className
|
|
2325
|
+
),
|
|
2326
|
+
...props
|
|
2327
|
+
}
|
|
2328
|
+
);
|
|
2329
|
+
}
|
|
2330
|
+
);
|
|
2331
|
+
SidebarInset.displayName = "SidebarInset";
|
|
2332
|
+
var SidebarHeader = React5.forwardRef(
|
|
2333
|
+
({ className, ...props }, ref) => {
|
|
2334
|
+
return /* @__PURE__ */ jsx8(
|
|
2335
|
+
"div",
|
|
2336
|
+
{
|
|
2337
|
+
ref,
|
|
2338
|
+
"data-sidebar": "header",
|
|
2339
|
+
className: cn(
|
|
2340
|
+
"flex h-8 justify-between items-center shrink-0 self-stretch",
|
|
2341
|
+
"group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:p-2",
|
|
2342
|
+
className
|
|
2343
|
+
),
|
|
2344
|
+
...props
|
|
2345
|
+
}
|
|
2346
|
+
);
|
|
2347
|
+
}
|
|
2348
|
+
);
|
|
2349
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
2350
|
+
var SidebarFooter = React5.forwardRef(
|
|
2351
|
+
({ className, ...props }, ref) => {
|
|
2352
|
+
return /* @__PURE__ */ jsx8(
|
|
2353
|
+
"div",
|
|
2354
|
+
{
|
|
2355
|
+
ref,
|
|
2356
|
+
"data-sidebar": "footer",
|
|
2357
|
+
className: cn("flex flex-col gap-2", className),
|
|
2358
|
+
...props
|
|
2359
|
+
}
|
|
2360
|
+
);
|
|
2361
|
+
}
|
|
2362
|
+
);
|
|
2363
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
2364
|
+
var SidebarContent = React5.forwardRef(
|
|
2365
|
+
({ className, ...props }, ref) => {
|
|
2366
|
+
return /* @__PURE__ */ jsx8(
|
|
2367
|
+
"div",
|
|
2368
|
+
{
|
|
2369
|
+
ref,
|
|
2370
|
+
"data-sidebar": "content",
|
|
2371
|
+
className: cn(
|
|
2372
|
+
"flex min-h-0 flex-1 flex-col gap-8 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
2373
|
+
className
|
|
2374
|
+
),
|
|
2375
|
+
...props
|
|
2376
|
+
}
|
|
2377
|
+
);
|
|
2378
|
+
}
|
|
2379
|
+
);
|
|
2380
|
+
SidebarContent.displayName = "SidebarContent";
|
|
2381
|
+
var SidebarGroup = React5.forwardRef(
|
|
2382
|
+
({ className, ...props }, ref) => {
|
|
2383
|
+
return /* @__PURE__ */ jsx8(
|
|
2384
|
+
"div",
|
|
2385
|
+
{
|
|
2386
|
+
ref,
|
|
2387
|
+
"data-sidebar": "group",
|
|
2388
|
+
className: cn("relative flex w-full min-w-0 flex-col", className),
|
|
2389
|
+
...props
|
|
2390
|
+
}
|
|
2391
|
+
);
|
|
2392
|
+
}
|
|
2393
|
+
);
|
|
2394
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
2395
|
+
var SidebarGroupContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
2396
|
+
"div",
|
|
2397
|
+
{
|
|
2398
|
+
ref,
|
|
2399
|
+
"data-sidebar": "group-content",
|
|
2400
|
+
className: cn("w-full text-sm", className),
|
|
2401
|
+
...props
|
|
2402
|
+
}
|
|
2403
|
+
));
|
|
2404
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
2405
|
+
var SidebarMenu = React5.forwardRef(
|
|
2406
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
2407
|
+
"ul",
|
|
2408
|
+
{
|
|
2409
|
+
ref,
|
|
2410
|
+
"data-sidebar": "menu",
|
|
2411
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
2412
|
+
...props
|
|
2413
|
+
}
|
|
2414
|
+
)
|
|
2415
|
+
);
|
|
2416
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
2417
|
+
var SidebarMenuItem = React5.forwardRef(
|
|
2418
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
2419
|
+
"li",
|
|
2420
|
+
{
|
|
2421
|
+
ref,
|
|
2422
|
+
"data-sidebar": "menu-item",
|
|
2423
|
+
className: cn("group/menu-item relative", className),
|
|
2424
|
+
...props
|
|
2425
|
+
}
|
|
2426
|
+
)
|
|
2427
|
+
);
|
|
2428
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
2429
|
+
var SidebarMenuButton = React5.forwardRef(({ isActive = false, tooltip, className, children, ...props }, ref) => {
|
|
2430
|
+
const { state } = useSidebar();
|
|
2431
|
+
const button = /* @__PURE__ */ jsx8(
|
|
2432
|
+
"button",
|
|
2433
|
+
{
|
|
2434
|
+
ref,
|
|
2435
|
+
"data-sidebar": "menu-button",
|
|
2436
|
+
"data-active": isActive,
|
|
2437
|
+
"aria-current": isActive ? "page" : void 0,
|
|
2438
|
+
className: cn(
|
|
2439
|
+
"peer/menu-button flex w-full h-8 items-center gap-2 overflow-hidden rounded-lg p-2 text-left outline-none transition-[width,height,padding] hover:bg-white/10 data-[active=true]:bg-info data-[active=true]:hover:bg-info group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:!gap-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2440
|
+
className
|
|
2441
|
+
),
|
|
2442
|
+
...props,
|
|
2443
|
+
children
|
|
2444
|
+
}
|
|
2445
|
+
);
|
|
2446
|
+
if (!tooltip || state !== "collapsed") {
|
|
2447
|
+
return button;
|
|
2448
|
+
}
|
|
2449
|
+
const tooltipProps = typeof tooltip === "string" ? { children: tooltip } : tooltip;
|
|
2450
|
+
return /* @__PURE__ */ jsxs6(Tooltip, { delayDuration: 0, children: [
|
|
2451
|
+
/* @__PURE__ */ jsx8(TooltipTrigger, { asChild: true, children: button }),
|
|
2452
|
+
/* @__PURE__ */ jsx8(TooltipContent, { side: "right", align: "center", ...tooltipProps })
|
|
2453
|
+
] });
|
|
2454
|
+
});
|
|
2455
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
2456
|
+
|
|
2457
|
+
// src/components/ui/date-picker.tsx
|
|
2458
|
+
import * as React7 from "react";
|
|
2074
2459
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2075
2460
|
|
|
2076
2461
|
// src/components/ui/input.tsx
|
|
2077
|
-
import * as
|
|
2078
|
-
import { jsx as
|
|
2462
|
+
import * as React6 from "react";
|
|
2463
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2079
2464
|
var inputBaseStyles = "flex h-10 py-2 w-full border bg-light text-dark focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 transition-colors rounded-md px-3 min-w-80 placeholder:text-secondary read-only:bg-gray read-only:cursor-default read-only:border-transparent read-only:text-secondary read-only:focus-visible:border-transparent border-secondary focus-visible:border-2 focus-visible:border-strong disabled:border-secondary aria-invalid:border-error aria-invalid:focus-visible:border-error";
|
|
2080
|
-
var Input =
|
|
2465
|
+
var Input = React6.forwardRef(
|
|
2081
2466
|
({
|
|
2082
2467
|
className,
|
|
2083
2468
|
style,
|
|
@@ -2088,7 +2473,7 @@ var Input = React4.forwardRef(
|
|
|
2088
2473
|
readOnly,
|
|
2089
2474
|
...props
|
|
2090
2475
|
}, ref) => {
|
|
2091
|
-
const [internalValue, setInternalValue] =
|
|
2476
|
+
const [internalValue, setInternalValue] = React6.useState(value || "");
|
|
2092
2477
|
const isControlled = value !== void 0;
|
|
2093
2478
|
const currentValue = isControlled ? value : internalValue;
|
|
2094
2479
|
const showClear = showClearProp !== false && currentValue && currentValue.toString().length > 0 && !readOnly;
|
|
@@ -2118,8 +2503,8 @@ var Input = React4.forwardRef(
|
|
|
2118
2503
|
}
|
|
2119
2504
|
onClear?.();
|
|
2120
2505
|
};
|
|
2121
|
-
return /* @__PURE__ */
|
|
2122
|
-
/* @__PURE__ */
|
|
2506
|
+
return /* @__PURE__ */ jsxs7("div", { className: "relative", children: [
|
|
2507
|
+
/* @__PURE__ */ jsx9(
|
|
2123
2508
|
"input",
|
|
2124
2509
|
{
|
|
2125
2510
|
className: cn(
|
|
@@ -2135,23 +2520,23 @@ var Input = React4.forwardRef(
|
|
|
2135
2520
|
...props
|
|
2136
2521
|
}
|
|
2137
2522
|
),
|
|
2138
|
-
showClear && /* @__PURE__ */
|
|
2523
|
+
showClear && /* @__PURE__ */ jsx9(
|
|
2139
2524
|
"button",
|
|
2140
2525
|
{
|
|
2141
2526
|
type: "button",
|
|
2142
2527
|
onClick: handleClear,
|
|
2143
2528
|
className: "absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-secondary hover:text-dark transition-colors",
|
|
2144
|
-
children: /* @__PURE__ */
|
|
2529
|
+
children: /* @__PURE__ */ jsx9(X, { className: "h-4 w-4" })
|
|
2145
2530
|
}
|
|
2146
2531
|
),
|
|
2147
|
-
showLock && /* @__PURE__ */
|
|
2532
|
+
showLock && /* @__PURE__ */ jsx9(Lock, { className: "absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-secondary" })
|
|
2148
2533
|
] });
|
|
2149
2534
|
}
|
|
2150
2535
|
);
|
|
2151
2536
|
Input.displayName = "Input";
|
|
2152
2537
|
|
|
2153
2538
|
// src/components/ui/date-picker.tsx
|
|
2154
|
-
import { jsx as
|
|
2539
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2155
2540
|
var getDayNames = () => {
|
|
2156
2541
|
const days = [];
|
|
2157
2542
|
for (let i = 0; i < 7; i++) {
|
|
@@ -2187,7 +2572,7 @@ var formatDateInput = (date) => {
|
|
|
2187
2572
|
day: "2-digit"
|
|
2188
2573
|
});
|
|
2189
2574
|
};
|
|
2190
|
-
var DatePicker =
|
|
2575
|
+
var DatePicker = React7.forwardRef(
|
|
2191
2576
|
({
|
|
2192
2577
|
value,
|
|
2193
2578
|
onValueChange,
|
|
@@ -2206,19 +2591,19 @@ var DatePicker = React5.forwardRef(
|
|
|
2206
2591
|
if (isNaN(parsed.getTime())) return void 0;
|
|
2207
2592
|
return parsed;
|
|
2208
2593
|
};
|
|
2209
|
-
const [selectedDate, setSelectedDate] =
|
|
2594
|
+
const [selectedDate, setSelectedDate] = React7.useState(
|
|
2210
2595
|
value || parseDate(defaultValue)
|
|
2211
2596
|
);
|
|
2212
|
-
const [currentMonth, setCurrentMonth] =
|
|
2597
|
+
const [currentMonth, setCurrentMonth] = React7.useState(() => {
|
|
2213
2598
|
const date = value || parseDate(defaultValue) || /* @__PURE__ */ new Date();
|
|
2214
2599
|
return new Date(date.getFullYear(), date.getMonth());
|
|
2215
2600
|
});
|
|
2216
|
-
const [open, setOpen] =
|
|
2217
|
-
const [inputValue, setInputValue] =
|
|
2601
|
+
const [open, setOpen] = React7.useState(false);
|
|
2602
|
+
const [inputValue, setInputValue] = React7.useState(() => {
|
|
2218
2603
|
const initialDate = value || parseDate(defaultValue);
|
|
2219
2604
|
return initialDate ? formatDateInput(initialDate) : "";
|
|
2220
2605
|
});
|
|
2221
|
-
|
|
2606
|
+
React7.useEffect(() => {
|
|
2222
2607
|
setSelectedDate(value);
|
|
2223
2608
|
if (value) {
|
|
2224
2609
|
setCurrentMonth(new Date(value.getFullYear(), value.getMonth()));
|
|
@@ -2229,7 +2614,7 @@ var DatePicker = React5.forwardRef(
|
|
|
2229
2614
|
setInputValue("");
|
|
2230
2615
|
}
|
|
2231
2616
|
}, [value]);
|
|
2232
|
-
|
|
2617
|
+
React7.useEffect(() => {
|
|
2233
2618
|
if (value) return;
|
|
2234
2619
|
const parsedDefault = parseDate(defaultValue);
|
|
2235
2620
|
if (!parsedDefault) return;
|
|
@@ -2352,14 +2737,14 @@ var DatePicker = React5.forwardRef(
|
|
|
2352
2737
|
const months = getMonthNames();
|
|
2353
2738
|
const dayNames = getDayNames();
|
|
2354
2739
|
const years = generateYears();
|
|
2355
|
-
return /* @__PURE__ */
|
|
2740
|
+
return /* @__PURE__ */ jsxs8(
|
|
2356
2741
|
PopoverPrimitive.Root,
|
|
2357
2742
|
{
|
|
2358
2743
|
open: disabled ? false : open,
|
|
2359
2744
|
onOpenChange: disabled ? void 0 : setOpen,
|
|
2360
2745
|
children: [
|
|
2361
|
-
/* @__PURE__ */
|
|
2362
|
-
/* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ jsxs8("div", { className: "relative", children: [
|
|
2747
|
+
/* @__PURE__ */ jsx10(
|
|
2363
2748
|
Input,
|
|
2364
2749
|
{
|
|
2365
2750
|
ref,
|
|
@@ -2372,7 +2757,7 @@ var DatePicker = React5.forwardRef(
|
|
|
2372
2757
|
...props
|
|
2373
2758
|
}
|
|
2374
2759
|
),
|
|
2375
|
-
/* @__PURE__ */
|
|
2760
|
+
/* @__PURE__ */ jsx10(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx10("button", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 hover:bg-gray rounded p-0.5 transition-colors", children: /* @__PURE__ */ jsx10(
|
|
2376
2761
|
Calendar,
|
|
2377
2762
|
{
|
|
2378
2763
|
className: cn(
|
|
@@ -2382,7 +2767,7 @@ var DatePicker = React5.forwardRef(
|
|
|
2382
2767
|
}
|
|
2383
2768
|
) }) })
|
|
2384
2769
|
] }),
|
|
2385
|
-
/* @__PURE__ */
|
|
2770
|
+
/* @__PURE__ */ jsx10(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx10(
|
|
2386
2771
|
PopoverPrimitive.Content,
|
|
2387
2772
|
{
|
|
2388
2773
|
className: "z-50 w-80 rounded-lg border border-secondary bg-light text-dark shadow-lg animate-in fade-in-0 zoom-in-95 duration-200",
|
|
@@ -2391,51 +2776,51 @@ var DatePicker = React5.forwardRef(
|
|
|
2391
2776
|
alignOffset: -12,
|
|
2392
2777
|
side: "bottom",
|
|
2393
2778
|
sticky: "always",
|
|
2394
|
-
children: /* @__PURE__ */
|
|
2395
|
-
/* @__PURE__ */
|
|
2396
|
-
/* @__PURE__ */
|
|
2779
|
+
children: /* @__PURE__ */ jsxs8("div", { className: "p-4", children: [
|
|
2780
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between mb-4 gap-1", children: [
|
|
2781
|
+
/* @__PURE__ */ jsx10(
|
|
2397
2782
|
"button",
|
|
2398
2783
|
{
|
|
2399
2784
|
onClick: () => handleMonthChange("prev"),
|
|
2400
2785
|
className: "p-1 hover:bg-gray rounded transition-colors flex-shrink-0",
|
|
2401
|
-
children: /* @__PURE__ */
|
|
2786
|
+
children: /* @__PURE__ */ jsx10(ChevronLeft, { className: "h-4 w-4" })
|
|
2402
2787
|
}
|
|
2403
2788
|
),
|
|
2404
|
-
/* @__PURE__ */
|
|
2405
|
-
/* @__PURE__ */
|
|
2789
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex gap-1 flex-1 min-w-0", children: [
|
|
2790
|
+
/* @__PURE__ */ jsxs8(
|
|
2406
2791
|
Select,
|
|
2407
2792
|
{
|
|
2408
2793
|
value: currentMonth.getMonth().toString(),
|
|
2409
2794
|
onValueChange: handleMonthSelect,
|
|
2410
2795
|
children: [
|
|
2411
|
-
/* @__PURE__ */
|
|
2412
|
-
/* @__PURE__ */
|
|
2796
|
+
/* @__PURE__ */ jsx10(SelectTrigger, { className: "min-w-fit h-8 text-sm", children: /* @__PURE__ */ jsx10(SelectValue, {}) }),
|
|
2797
|
+
/* @__PURE__ */ jsx10(SelectContent, { children: months.map((month, index) => /* @__PURE__ */ jsx10(SelectItem, { value: index.toString(), children: month }, month)) })
|
|
2413
2798
|
]
|
|
2414
2799
|
}
|
|
2415
2800
|
),
|
|
2416
|
-
/* @__PURE__ */
|
|
2801
|
+
/* @__PURE__ */ jsxs8(
|
|
2417
2802
|
Select,
|
|
2418
2803
|
{
|
|
2419
2804
|
value: currentMonth.getFullYear().toString(),
|
|
2420
2805
|
onValueChange: handleYearSelect,
|
|
2421
2806
|
children: [
|
|
2422
|
-
/* @__PURE__ */
|
|
2423
|
-
/* @__PURE__ */
|
|
2807
|
+
/* @__PURE__ */ jsx10(SelectTrigger, { className: "min-w-fit h-8 text-sm", children: /* @__PURE__ */ jsx10(SelectValue, {}) }),
|
|
2808
|
+
/* @__PURE__ */ jsx10(SelectContent, { children: years.map((year) => /* @__PURE__ */ jsx10(SelectItem, { value: year.toString(), children: year }, year)) })
|
|
2424
2809
|
]
|
|
2425
2810
|
}
|
|
2426
2811
|
)
|
|
2427
2812
|
] }),
|
|
2428
|
-
/* @__PURE__ */
|
|
2813
|
+
/* @__PURE__ */ jsx10(
|
|
2429
2814
|
"button",
|
|
2430
2815
|
{
|
|
2431
2816
|
onClick: () => handleMonthChange("next"),
|
|
2432
2817
|
className: "p-1 hover:bg-gray rounded transition-colors flex-shrink-0",
|
|
2433
|
-
children: /* @__PURE__ */
|
|
2818
|
+
children: /* @__PURE__ */ jsx10(ChevronRight, { className: "h-4 w-4" })
|
|
2434
2819
|
}
|
|
2435
2820
|
)
|
|
2436
2821
|
] }),
|
|
2437
|
-
/* @__PURE__ */
|
|
2438
|
-
/* @__PURE__ */
|
|
2822
|
+
/* @__PURE__ */ jsxs8("div", { className: "space-y-1", children: [
|
|
2823
|
+
/* @__PURE__ */ jsx10("div", { className: "grid grid-cols-7 gap-1 mb-2", children: dayNames.map((day) => /* @__PURE__ */ jsx10(
|
|
2439
2824
|
Typography,
|
|
2440
2825
|
{
|
|
2441
2826
|
variant: "label-xs-bold",
|
|
@@ -2445,11 +2830,11 @@ var DatePicker = React5.forwardRef(
|
|
|
2445
2830
|
},
|
|
2446
2831
|
day
|
|
2447
2832
|
)) }),
|
|
2448
|
-
/* @__PURE__ */
|
|
2833
|
+
/* @__PURE__ */ jsx10("div", { className: "grid grid-cols-7 gap-1", children: days.map((date, index) => /* @__PURE__ */ jsx10(
|
|
2449
2834
|
"div",
|
|
2450
2835
|
{
|
|
2451
2836
|
className: "h-8 w-8 flex items-center justify-center",
|
|
2452
|
-
children: date && /* @__PURE__ */
|
|
2837
|
+
children: date && /* @__PURE__ */ jsx10(
|
|
2453
2838
|
"button",
|
|
2454
2839
|
{
|
|
2455
2840
|
onClick: () => handleDateSelect(date),
|
|
@@ -2463,7 +2848,7 @@ var DatePicker = React5.forwardRef(
|
|
|
2463
2848
|
isToday(date) && !isDateSelected(date) && !isDateDisabled(date) && "text-blue-600 after:content-[''] after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:w-1 after:h-1 after:bg-blue-600 after:rounded-full",
|
|
2464
2849
|
isDateDisabled(date) && "text-secondary/40 cursor-not-allowed opacity-50"
|
|
2465
2850
|
),
|
|
2466
|
-
children: /* @__PURE__ */
|
|
2851
|
+
children: /* @__PURE__ */ jsx10(Typography, { variant: "label-sm", as: "span", children: date.getDate() })
|
|
2467
2852
|
}
|
|
2468
2853
|
)
|
|
2469
2854
|
},
|
|
@@ -2481,9 +2866,9 @@ var DatePicker = React5.forwardRef(
|
|
|
2481
2866
|
DatePicker.displayName = "DatePicker";
|
|
2482
2867
|
|
|
2483
2868
|
// src/components/ui/upload.tsx
|
|
2484
|
-
import * as
|
|
2869
|
+
import * as React8 from "react";
|
|
2485
2870
|
import { cva as cva6 } from "class-variance-authority";
|
|
2486
|
-
import { jsx as
|
|
2871
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2487
2872
|
var DEFAULT_MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
2488
2873
|
var uploadVariants = cva6(
|
|
2489
2874
|
"relative flex flex-col items-center justify-center rounded-lg transition-all duration-200 ease-in-out overflow-hidden",
|
|
@@ -2507,7 +2892,7 @@ var uploadVariants = cva6(
|
|
|
2507
2892
|
}
|
|
2508
2893
|
}
|
|
2509
2894
|
);
|
|
2510
|
-
var Upload =
|
|
2895
|
+
var Upload = React8.forwardRef(
|
|
2511
2896
|
({
|
|
2512
2897
|
className,
|
|
2513
2898
|
onFileSelect,
|
|
@@ -2520,8 +2905,8 @@ var Upload = React6.forwardRef(
|
|
|
2520
2905
|
selectedFiles = [],
|
|
2521
2906
|
...props
|
|
2522
2907
|
}, ref) => {
|
|
2523
|
-
const fileInputRef =
|
|
2524
|
-
const [isDragOver, setIsDragOver] =
|
|
2908
|
+
const fileInputRef = React8.useRef(null);
|
|
2909
|
+
const [isDragOver, setIsDragOver] = React8.useState(false);
|
|
2525
2910
|
const getFileTypeDisplay = () => {
|
|
2526
2911
|
const typeMap = {
|
|
2527
2912
|
"application/pdf": "PDF",
|
|
@@ -2585,17 +2970,17 @@ var Upload = React6.forwardRef(
|
|
|
2585
2970
|
const renderContent = () => {
|
|
2586
2971
|
switch (effectiveState) {
|
|
2587
2972
|
case "error":
|
|
2588
|
-
return /* @__PURE__ */
|
|
2973
|
+
return /* @__PURE__ */ jsxs9(
|
|
2589
2974
|
"div",
|
|
2590
2975
|
{
|
|
2591
2976
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2592
2977
|
style: { gap: "32px" },
|
|
2593
2978
|
children: [
|
|
2594
|
-
/* @__PURE__ */
|
|
2595
|
-
/* @__PURE__ */
|
|
2596
|
-
/* @__PURE__ */
|
|
2979
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-4", children: [
|
|
2980
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "heading-sm", children: "Upload fail" }),
|
|
2981
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "body-md", className: "text-error", children: errorMessage })
|
|
2597
2982
|
] }),
|
|
2598
|
-
/* @__PURE__ */
|
|
2983
|
+
/* @__PURE__ */ jsx11(
|
|
2599
2984
|
Button,
|
|
2600
2985
|
{
|
|
2601
2986
|
variant: "destructive",
|
|
@@ -2609,22 +2994,22 @@ var Upload = React6.forwardRef(
|
|
|
2609
2994
|
}
|
|
2610
2995
|
);
|
|
2611
2996
|
case "uploading":
|
|
2612
|
-
return /* @__PURE__ */
|
|
2997
|
+
return /* @__PURE__ */ jsxs9(
|
|
2613
2998
|
"div",
|
|
2614
2999
|
{
|
|
2615
3000
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2616
3001
|
style: { gap: "32px" },
|
|
2617
3002
|
children: [
|
|
2618
|
-
/* @__PURE__ */
|
|
2619
|
-
/* @__PURE__ */
|
|
2620
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "heading-sm", className: "text-dark", children: "Uploading files" }),
|
|
3004
|
+
/* @__PURE__ */ jsxs9("div", { className: "w-full max-w-[720px] space-y-2", children: [
|
|
3005
|
+
/* @__PURE__ */ jsx11("div", { className: "w-full bg-gray rounded-full h-2", children: /* @__PURE__ */ jsx11(
|
|
2621
3006
|
"div",
|
|
2622
3007
|
{
|
|
2623
3008
|
className: "bg-canvas-primary h-2 rounded-full transition-all duration-300 ease-in-out",
|
|
2624
3009
|
style: { width: `${progress}%` }
|
|
2625
3010
|
}
|
|
2626
3011
|
) }),
|
|
2627
|
-
/* @__PURE__ */
|
|
3012
|
+
/* @__PURE__ */ jsxs9(
|
|
2628
3013
|
Typography,
|
|
2629
3014
|
{
|
|
2630
3015
|
variant: "body-sm",
|
|
@@ -2640,29 +3025,29 @@ var Upload = React6.forwardRef(
|
|
|
2640
3025
|
}
|
|
2641
3026
|
);
|
|
2642
3027
|
case "success":
|
|
2643
|
-
return /* @__PURE__ */
|
|
3028
|
+
return /* @__PURE__ */ jsx11(
|
|
2644
3029
|
"div",
|
|
2645
3030
|
{
|
|
2646
3031
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2647
3032
|
style: { gap: "32px" },
|
|
2648
|
-
children: /* @__PURE__ */
|
|
2649
|
-
/* @__PURE__ */
|
|
2650
|
-
selectedFiles.length > 0 && /* @__PURE__ */
|
|
3033
|
+
children: /* @__PURE__ */ jsxs9("div", { className: "space-y-4", children: [
|
|
3034
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "heading-sm", className: "text-success", children: "Upload successful!" }),
|
|
3035
|
+
selectedFiles.length > 0 && /* @__PURE__ */ jsx11("div", { className: "text-center", children: selectedFiles.map((file, index) => /* @__PURE__ */ jsx11(Typography, { variant: "body-sm", children: file.name }, index)) })
|
|
2651
3036
|
] })
|
|
2652
3037
|
}
|
|
2653
3038
|
);
|
|
2654
3039
|
default:
|
|
2655
|
-
return /* @__PURE__ */
|
|
3040
|
+
return /* @__PURE__ */ jsxs9(
|
|
2656
3041
|
"div",
|
|
2657
3042
|
{
|
|
2658
3043
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
2659
3044
|
style: { gap: "32px" },
|
|
2660
3045
|
children: [
|
|
2661
|
-
/* @__PURE__ */
|
|
2662
|
-
/* @__PURE__ */
|
|
2663
|
-
/* @__PURE__ */
|
|
3046
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-4", children: [
|
|
3047
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "heading-sm", className: "text-dark", children: "Drag & drop files here" }),
|
|
3048
|
+
/* @__PURE__ */ jsx11(Typography, { variant: "body-md", className: "text-secondary", children: "or click to browse from your computer" })
|
|
2664
3049
|
] }),
|
|
2665
|
-
/* @__PURE__ */
|
|
3050
|
+
/* @__PURE__ */ jsx11(
|
|
2666
3051
|
Button,
|
|
2667
3052
|
{
|
|
2668
3053
|
variant: "default",
|
|
@@ -2676,10 +3061,10 @@ var Upload = React6.forwardRef(
|
|
|
2676
3061
|
children: "Choose files"
|
|
2677
3062
|
}
|
|
2678
3063
|
),
|
|
2679
|
-
/* @__PURE__ */
|
|
3064
|
+
/* @__PURE__ */ jsxs9(Typography, { variant: "body-sm", className: "text-secondary", children: [
|
|
2680
3065
|
"Supported file: ",
|
|
2681
3066
|
getFileTypeDisplay(),
|
|
2682
|
-
/* @__PURE__ */
|
|
3067
|
+
/* @__PURE__ */ jsx11("br", {}),
|
|
2683
3068
|
"Max: ",
|
|
2684
3069
|
Math.round(maxFileSize / 1024 / 1024),
|
|
2685
3070
|
" MB each"
|
|
@@ -2689,7 +3074,7 @@ var Upload = React6.forwardRef(
|
|
|
2689
3074
|
);
|
|
2690
3075
|
}
|
|
2691
3076
|
};
|
|
2692
|
-
return /* @__PURE__ */
|
|
3077
|
+
return /* @__PURE__ */ jsxs9(
|
|
2693
3078
|
"div",
|
|
2694
3079
|
{
|
|
2695
3080
|
ref,
|
|
@@ -2713,7 +3098,7 @@ var Upload = React6.forwardRef(
|
|
|
2713
3098
|
"aria-disabled": disabled,
|
|
2714
3099
|
...props,
|
|
2715
3100
|
children: [
|
|
2716
|
-
/* @__PURE__ */
|
|
3101
|
+
/* @__PURE__ */ jsx11(
|
|
2717
3102
|
"input",
|
|
2718
3103
|
{
|
|
2719
3104
|
ref: fileInputRef,
|
|
@@ -2733,34 +3118,34 @@ var Upload = React6.forwardRef(
|
|
|
2733
3118
|
Upload.displayName = "Upload";
|
|
2734
3119
|
|
|
2735
3120
|
// src/components/ui/checkbox.tsx
|
|
2736
|
-
import * as
|
|
3121
|
+
import * as React9 from "react";
|
|
2737
3122
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2738
3123
|
import { cva as cva7 } from "class-variance-authority";
|
|
2739
|
-
import { jsx as
|
|
3124
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
2740
3125
|
var checkboxVariants = cva7(
|
|
2741
3126
|
"peer size-4 shrink-0 rounded-[4px] border bg-light hover:bg-info-subtle transition-colors focus-visible:outline-none focus-visible:border-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-light [&_svg]:pointer-events-none [&_svg]:size-3 [&_svg]:shrink-0 border-strong focus-visible:border-interactive aria-invalid:border-error aria-invalid:focus-visible:border-error"
|
|
2742
3127
|
);
|
|
2743
|
-
var Checkbox =
|
|
3128
|
+
var Checkbox = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
2744
3129
|
CheckboxPrimitive.Root,
|
|
2745
3130
|
{
|
|
2746
3131
|
ref,
|
|
2747
3132
|
className: cn(checkboxVariants(), className),
|
|
2748
3133
|
...props,
|
|
2749
|
-
children: /* @__PURE__ */
|
|
3134
|
+
children: /* @__PURE__ */ jsx12(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ jsx12(CheckIcon, { variant: "light", className: "size-3" }) })
|
|
2750
3135
|
}
|
|
2751
3136
|
));
|
|
2752
3137
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
2753
3138
|
|
|
2754
3139
|
// src/components/ui/textarea.tsx
|
|
2755
|
-
import * as
|
|
2756
|
-
import { jsx as
|
|
2757
|
-
var Textarea =
|
|
3140
|
+
import * as React10 from "react";
|
|
3141
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
3142
|
+
var Textarea = React10.forwardRef(
|
|
2758
3143
|
({ className, style, ...props }, ref) => {
|
|
2759
3144
|
const tokenStyles = {
|
|
2760
3145
|
font: "var(--typography-label-md-regular)",
|
|
2761
3146
|
...style
|
|
2762
3147
|
};
|
|
2763
|
-
return /* @__PURE__ */
|
|
3148
|
+
return /* @__PURE__ */ jsx13(
|
|
2764
3149
|
"textarea",
|
|
2765
3150
|
{
|
|
2766
3151
|
className: cn(
|
|
@@ -2777,9 +3162,9 @@ var Textarea = React8.forwardRef(
|
|
|
2777
3162
|
Textarea.displayName = "Textarea";
|
|
2778
3163
|
|
|
2779
3164
|
// src/components/ui/badge.tsx
|
|
2780
|
-
import * as
|
|
3165
|
+
import * as React11 from "react";
|
|
2781
3166
|
import { cva as cva8 } from "class-variance-authority";
|
|
2782
|
-
import { jsx as
|
|
3167
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
2783
3168
|
var badgeVariants = cva8(
|
|
2784
3169
|
"inline-flex items-center justify-center gap-1 whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
2785
3170
|
{
|
|
@@ -2802,7 +3187,7 @@ var badgeVariants = cva8(
|
|
|
2802
3187
|
function getBadgeTypographyStyles() {
|
|
2803
3188
|
return { font: "var(--typography-label-sm-bold)" };
|
|
2804
3189
|
}
|
|
2805
|
-
var Badge =
|
|
3190
|
+
var Badge = React11.forwardRef(
|
|
2806
3191
|
({ className, variant, style, ...props }, ref) => {
|
|
2807
3192
|
if (!variant) {
|
|
2808
3193
|
return null;
|
|
@@ -2812,7 +3197,7 @@ var Badge = React9.forwardRef(
|
|
|
2812
3197
|
...typographyStyles,
|
|
2813
3198
|
...style
|
|
2814
3199
|
};
|
|
2815
|
-
return /* @__PURE__ */
|
|
3200
|
+
return /* @__PURE__ */ jsx14(
|
|
2816
3201
|
"span",
|
|
2817
3202
|
{
|
|
2818
3203
|
className: cn(
|
|
@@ -2829,10 +3214,294 @@ var Badge = React9.forwardRef(
|
|
|
2829
3214
|
);
|
|
2830
3215
|
Badge.displayName = "Badge";
|
|
2831
3216
|
|
|
3217
|
+
// src/components/pdf-viewer/index.tsx
|
|
3218
|
+
import * as React16 from "react";
|
|
3219
|
+
import "react-pdf/dist/Page/TextLayer.css";
|
|
3220
|
+
|
|
3221
|
+
// src/components/pdf-viewer/components/PdfDocument.tsx
|
|
3222
|
+
import * as React12 from "react";
|
|
3223
|
+
import { Document, Page } from "react-pdf";
|
|
3224
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
3225
|
+
var PdfDocument = ({
|
|
3226
|
+
file,
|
|
3227
|
+
pageWidth,
|
|
3228
|
+
enableTextLayer,
|
|
3229
|
+
onLoadSuccess,
|
|
3230
|
+
onLoadError
|
|
3231
|
+
}) => {
|
|
3232
|
+
const [numPages, setNumPages] = React12.useState();
|
|
3233
|
+
function handleDocumentLoadSuccess({ numPages: numPages2 }) {
|
|
3234
|
+
setNumPages(numPages2);
|
|
3235
|
+
onLoadSuccess?.(numPages2);
|
|
3236
|
+
}
|
|
3237
|
+
if (!file) {
|
|
3238
|
+
return /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx15(Typography, { variant: "body-md", className: "text-secondary", children: "No PDF available" }) });
|
|
3239
|
+
}
|
|
3240
|
+
return /* @__PURE__ */ jsx15(
|
|
3241
|
+
Document,
|
|
3242
|
+
{
|
|
3243
|
+
file,
|
|
3244
|
+
onLoadSuccess: handleDocumentLoadSuccess,
|
|
3245
|
+
onLoadError,
|
|
3246
|
+
loading: /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx15(Typography, { variant: "body-md", className: "text-secondary", children: "Rendering PDF..." }) }),
|
|
3247
|
+
error: /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx15(Typography, { variant: "body-md", className: "text-error", children: "Failed to render PDF" }) }),
|
|
3248
|
+
className: "flex flex-col items-center p-4",
|
|
3249
|
+
children: numPages && pageWidth > 0 && Array.from(new Array(numPages), (_, index) => /* @__PURE__ */ jsx15(
|
|
3250
|
+
Page,
|
|
3251
|
+
{
|
|
3252
|
+
pageNumber: index + 1,
|
|
3253
|
+
width: pageWidth,
|
|
3254
|
+
className: "mb-4 shadow-sm",
|
|
3255
|
+
renderTextLayer: enableTextLayer,
|
|
3256
|
+
renderAnnotationLayer: false
|
|
3257
|
+
},
|
|
3258
|
+
`page_${index + 1}`
|
|
3259
|
+
))
|
|
3260
|
+
}
|
|
3261
|
+
);
|
|
3262
|
+
};
|
|
3263
|
+
PdfDocument.displayName = "PdfDocument";
|
|
3264
|
+
|
|
3265
|
+
// src/components/pdf-viewer/components/PdfHeader.tsx
|
|
3266
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3267
|
+
var PdfHeader = ({
|
|
3268
|
+
title,
|
|
3269
|
+
onDownload,
|
|
3270
|
+
onPrint
|
|
3271
|
+
}) => {
|
|
3272
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between gap-4 px-4 py-3 bg-neutral-400 border-b border-subtle", children: [
|
|
3273
|
+
/* @__PURE__ */ jsx16("div", { className: "flex-shrink min-w-0", children: /* @__PURE__ */ jsx16(
|
|
3274
|
+
Typography,
|
|
3275
|
+
{
|
|
3276
|
+
variant: "label-md-bold",
|
|
3277
|
+
className: "text-dark truncate",
|
|
3278
|
+
title,
|
|
3279
|
+
children: title || "Untitled Document"
|
|
3280
|
+
}
|
|
3281
|
+
) }),
|
|
3282
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
3283
|
+
/* @__PURE__ */ jsx16(
|
|
3284
|
+
"button",
|
|
3285
|
+
{
|
|
3286
|
+
onClick: onDownload,
|
|
3287
|
+
className: "p-2 hover:bg-neutral-500 rounded transition-colors",
|
|
3288
|
+
"aria-label": "Download PDF",
|
|
3289
|
+
type: "button",
|
|
3290
|
+
children: /* @__PURE__ */ jsx16(Download, { variant: "dark", className: "w-5 h-5" })
|
|
3291
|
+
}
|
|
3292
|
+
),
|
|
3293
|
+
/* @__PURE__ */ jsx16(
|
|
3294
|
+
"button",
|
|
3295
|
+
{
|
|
3296
|
+
onClick: onPrint,
|
|
3297
|
+
className: "p-2 hover:bg-neutral-500 rounded transition-colors",
|
|
3298
|
+
"aria-label": "Print PDF",
|
|
3299
|
+
type: "button",
|
|
3300
|
+
children: /* @__PURE__ */ jsx16(Print, { variant: "dark", className: "w-5 h-5" })
|
|
3301
|
+
}
|
|
3302
|
+
)
|
|
3303
|
+
] })
|
|
3304
|
+
] });
|
|
3305
|
+
};
|
|
3306
|
+
PdfHeader.displayName = "PdfHeader";
|
|
3307
|
+
|
|
3308
|
+
// src/components/pdf-viewer/hooks/useContainerWidth.ts
|
|
3309
|
+
import * as React13 from "react";
|
|
3310
|
+
function useContainerWidth(padding = 32) {
|
|
3311
|
+
const [containerWidth, setContainerWidth] = React13.useState(0);
|
|
3312
|
+
const containerRef = React13.useRef(null);
|
|
3313
|
+
const lastWidthRef = React13.useRef(0);
|
|
3314
|
+
React13.useEffect(() => {
|
|
3315
|
+
const element = containerRef.current;
|
|
3316
|
+
if (!element) return;
|
|
3317
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
3318
|
+
for (const entry of entries) {
|
|
3319
|
+
const newWidth = entry.contentRect.width - padding;
|
|
3320
|
+
if (Math.abs(newWidth - lastWidthRef.current) > 1) {
|
|
3321
|
+
lastWidthRef.current = newWidth;
|
|
3322
|
+
setContainerWidth(newWidth);
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
});
|
|
3326
|
+
resizeObserver.observe(element);
|
|
3327
|
+
const initialWidth = element.offsetWidth - padding;
|
|
3328
|
+
lastWidthRef.current = initialWidth;
|
|
3329
|
+
setContainerWidth(initialWidth);
|
|
3330
|
+
return () => {
|
|
3331
|
+
resizeObserver.disconnect();
|
|
3332
|
+
};
|
|
3333
|
+
}, [padding]);
|
|
3334
|
+
return { containerWidth, containerRef };
|
|
3335
|
+
}
|
|
3336
|
+
|
|
3337
|
+
// src/components/pdf-viewer/hooks/usePdfDownload.ts
|
|
3338
|
+
import * as React14 from "react";
|
|
3339
|
+
function usePdfDownload(file, title) {
|
|
3340
|
+
const download = React14.useCallback(async () => {
|
|
3341
|
+
if (!file) return;
|
|
3342
|
+
try {
|
|
3343
|
+
let blob;
|
|
3344
|
+
let filename;
|
|
3345
|
+
if (typeof file === "string") {
|
|
3346
|
+
const response = await fetch(file);
|
|
3347
|
+
blob = await response.blob();
|
|
3348
|
+
filename = title || "document.pdf";
|
|
3349
|
+
} else {
|
|
3350
|
+
blob = file;
|
|
3351
|
+
filename = title || file.name || "document.pdf";
|
|
3352
|
+
}
|
|
3353
|
+
const url = URL.createObjectURL(blob);
|
|
3354
|
+
const link = document.createElement("a");
|
|
3355
|
+
link.href = url;
|
|
3356
|
+
link.download = filename;
|
|
3357
|
+
link.style.display = "none";
|
|
3358
|
+
document.body.appendChild(link);
|
|
3359
|
+
link.click();
|
|
3360
|
+
setTimeout(() => {
|
|
3361
|
+
document.body.removeChild(link);
|
|
3362
|
+
URL.revokeObjectURL(url);
|
|
3363
|
+
}, 100);
|
|
3364
|
+
} catch (error) {
|
|
3365
|
+
console.error("Failed to download PDF:", error);
|
|
3366
|
+
}
|
|
3367
|
+
}, [file, title]);
|
|
3368
|
+
return download;
|
|
3369
|
+
}
|
|
3370
|
+
|
|
3371
|
+
// src/components/pdf-viewer/hooks/usePdfPrint.ts
|
|
3372
|
+
import * as React15 from "react";
|
|
3373
|
+
function usePdfPrint(file) {
|
|
3374
|
+
const [printBlobUrl, setPrintBlobUrl] = React15.useState(null);
|
|
3375
|
+
const printFrameRef = React15.useRef(null);
|
|
3376
|
+
const preparePrint = React15.useCallback(async () => {
|
|
3377
|
+
if (!file) return;
|
|
3378
|
+
try {
|
|
3379
|
+
let blob;
|
|
3380
|
+
if (typeof file === "string") {
|
|
3381
|
+
const response = await fetch(file);
|
|
3382
|
+
blob = await response.blob();
|
|
3383
|
+
} else {
|
|
3384
|
+
blob = file;
|
|
3385
|
+
}
|
|
3386
|
+
const url = URL.createObjectURL(blob);
|
|
3387
|
+
setPrintBlobUrl(url);
|
|
3388
|
+
} catch (error) {
|
|
3389
|
+
console.error("Failed to prepare PDF for printing:", error);
|
|
3390
|
+
}
|
|
3391
|
+
}, [file]);
|
|
3392
|
+
React15.useEffect(() => {
|
|
3393
|
+
return () => {
|
|
3394
|
+
if (printBlobUrl) {
|
|
3395
|
+
URL.revokeObjectURL(printBlobUrl);
|
|
3396
|
+
}
|
|
3397
|
+
};
|
|
3398
|
+
}, [printBlobUrl]);
|
|
3399
|
+
const print = React15.useCallback(() => {
|
|
3400
|
+
if (printFrameRef.current?.contentWindow) {
|
|
3401
|
+
printFrameRef.current.contentWindow.print();
|
|
3402
|
+
}
|
|
3403
|
+
}, []);
|
|
3404
|
+
return { printFrameRef, printBlobUrl, preparePrint, print };
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
// src/components/pdf-viewer/utils/pdfWorker.ts
|
|
3408
|
+
import { pdfjs } from "react-pdf";
|
|
3409
|
+
function initializePdfWorker(workerUrl) {
|
|
3410
|
+
pdfjs.GlobalWorkerOptions.workerSrc = workerUrl;
|
|
3411
|
+
}
|
|
3412
|
+
|
|
3413
|
+
// src/components/pdf-viewer/index.tsx
|
|
3414
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3415
|
+
var PdfViewer = React16.forwardRef(
|
|
3416
|
+
({
|
|
3417
|
+
file,
|
|
3418
|
+
title,
|
|
3419
|
+
pageWidth,
|
|
3420
|
+
onDownload,
|
|
3421
|
+
onPrint,
|
|
3422
|
+
onLoadSuccess,
|
|
3423
|
+
onError,
|
|
3424
|
+
enableTextLayer = false,
|
|
3425
|
+
className,
|
|
3426
|
+
...props
|
|
3427
|
+
}, ref) => {
|
|
3428
|
+
const { containerWidth, containerRef } = useContainerWidth();
|
|
3429
|
+
const { printFrameRef, printBlobUrl, preparePrint, print } = usePdfPrint(file);
|
|
3430
|
+
const download = usePdfDownload(file, title);
|
|
3431
|
+
const effectiveWidth = pageWidth || containerWidth;
|
|
3432
|
+
const handleLoadSuccess = React16.useCallback(
|
|
3433
|
+
async (numPages) => {
|
|
3434
|
+
onLoadSuccess?.(numPages);
|
|
3435
|
+
await preparePrint();
|
|
3436
|
+
},
|
|
3437
|
+
[onLoadSuccess, preparePrint]
|
|
3438
|
+
);
|
|
3439
|
+
const handleDownload = React16.useCallback(() => {
|
|
3440
|
+
if (onDownload) {
|
|
3441
|
+
onDownload();
|
|
3442
|
+
return;
|
|
3443
|
+
}
|
|
3444
|
+
download();
|
|
3445
|
+
}, [onDownload, download]);
|
|
3446
|
+
const handlePrint = React16.useCallback(() => {
|
|
3447
|
+
if (onPrint) {
|
|
3448
|
+
onPrint();
|
|
3449
|
+
return;
|
|
3450
|
+
}
|
|
3451
|
+
print();
|
|
3452
|
+
}, [onPrint, print]);
|
|
3453
|
+
return /* @__PURE__ */ jsxs11(
|
|
3454
|
+
"div",
|
|
3455
|
+
{
|
|
3456
|
+
ref,
|
|
3457
|
+
className: cn("h-full flex flex-col", className),
|
|
3458
|
+
...props,
|
|
3459
|
+
children: [
|
|
3460
|
+
printBlobUrl && /* @__PURE__ */ jsx17(
|
|
3461
|
+
"iframe",
|
|
3462
|
+
{
|
|
3463
|
+
ref: printFrameRef,
|
|
3464
|
+
src: printBlobUrl,
|
|
3465
|
+
style: { display: "none" },
|
|
3466
|
+
title: "PDF for printing"
|
|
3467
|
+
}
|
|
3468
|
+
),
|
|
3469
|
+
/* @__PURE__ */ jsx17(
|
|
3470
|
+
PdfHeader,
|
|
3471
|
+
{
|
|
3472
|
+
title,
|
|
3473
|
+
onDownload: handleDownload,
|
|
3474
|
+
onPrint: handlePrint
|
|
3475
|
+
}
|
|
3476
|
+
),
|
|
3477
|
+
/* @__PURE__ */ jsx17(
|
|
3478
|
+
"div",
|
|
3479
|
+
{
|
|
3480
|
+
ref: containerRef,
|
|
3481
|
+
className: "flex-1 overflow-y-auto overflow-x-hidden bg-neutral-300",
|
|
3482
|
+
children: /* @__PURE__ */ jsx17(
|
|
3483
|
+
PdfDocument,
|
|
3484
|
+
{
|
|
3485
|
+
file,
|
|
3486
|
+
pageWidth: effectiveWidth,
|
|
3487
|
+
enableTextLayer,
|
|
3488
|
+
onLoadSuccess: handleLoadSuccess,
|
|
3489
|
+
onLoadError: onError
|
|
3490
|
+
}
|
|
3491
|
+
)
|
|
3492
|
+
}
|
|
3493
|
+
)
|
|
3494
|
+
]
|
|
3495
|
+
}
|
|
3496
|
+
);
|
|
3497
|
+
}
|
|
3498
|
+
);
|
|
3499
|
+
PdfViewer.displayName = "PdfViewer";
|
|
3500
|
+
|
|
2832
3501
|
// src/components/ui/tabs.tsx
|
|
2833
|
-
import * as
|
|
3502
|
+
import * as React17 from "react";
|
|
2834
3503
|
import { cva as cva9 } from "class-variance-authority";
|
|
2835
|
-
import { jsx as
|
|
3504
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2836
3505
|
var tabsVariants = cva9(
|
|
2837
3506
|
"inline-flex items-center justify-start whitespace-nowrap transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-interactive focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 h-10",
|
|
2838
3507
|
{
|
|
@@ -2846,17 +3515,17 @@ var tabsVariants = cva9(
|
|
|
2846
3515
|
}
|
|
2847
3516
|
}
|
|
2848
3517
|
);
|
|
2849
|
-
var TabsContext =
|
|
3518
|
+
var TabsContext = React17.createContext(
|
|
2850
3519
|
void 0
|
|
2851
3520
|
);
|
|
2852
3521
|
function useTabsContext() {
|
|
2853
|
-
const context =
|
|
3522
|
+
const context = React17.useContext(TabsContext);
|
|
2854
3523
|
if (!context) {
|
|
2855
3524
|
throw new Error("Tabs components must be used within a Tabs provider");
|
|
2856
3525
|
}
|
|
2857
3526
|
return context;
|
|
2858
3527
|
}
|
|
2859
|
-
var Tabs =
|
|
3528
|
+
var Tabs = React17.forwardRef((props, ref) => {
|
|
2860
3529
|
const {
|
|
2861
3530
|
className,
|
|
2862
3531
|
value,
|
|
@@ -2865,7 +3534,7 @@ var Tabs = React10.forwardRef((props, ref) => {
|
|
|
2865
3534
|
children,
|
|
2866
3535
|
...restProps
|
|
2867
3536
|
} = props;
|
|
2868
|
-
const contextValue =
|
|
3537
|
+
const contextValue = React17.useMemo(
|
|
2869
3538
|
() => ({
|
|
2870
3539
|
activeTab: value,
|
|
2871
3540
|
setActiveTab: onValueChange,
|
|
@@ -2873,13 +3542,13 @@ var Tabs = React10.forwardRef((props, ref) => {
|
|
|
2873
3542
|
}),
|
|
2874
3543
|
[value, onValueChange, variant]
|
|
2875
3544
|
);
|
|
2876
|
-
return /* @__PURE__ */
|
|
3545
|
+
return /* @__PURE__ */ jsx18(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx18("div", { ref, className: cn("w-full", className), ...restProps, children }) });
|
|
2877
3546
|
});
|
|
2878
3547
|
Tabs.displayName = "Tabs";
|
|
2879
|
-
var TabsList =
|
|
3548
|
+
var TabsList = React17.forwardRef(
|
|
2880
3549
|
(props, ref) => {
|
|
2881
3550
|
const { className, children, ...restProps } = props;
|
|
2882
|
-
return /* @__PURE__ */
|
|
3551
|
+
return /* @__PURE__ */ jsx18(
|
|
2883
3552
|
"div",
|
|
2884
3553
|
{
|
|
2885
3554
|
ref,
|
|
@@ -2895,7 +3564,7 @@ TabsList.displayName = "TabsList";
|
|
|
2895
3564
|
var getTabTypographyStyles = (isActive) => ({
|
|
2896
3565
|
font: isActive ? "var(--typography-label-sm-bold)" : "var(--typography-label-sm-regular)"
|
|
2897
3566
|
});
|
|
2898
|
-
var TabsTrigger =
|
|
3567
|
+
var TabsTrigger = React17.forwardRef(
|
|
2899
3568
|
(props, ref) => {
|
|
2900
3569
|
const { className, value, disabled, style, children, ...restProps } = props;
|
|
2901
3570
|
const { activeTab, setActiveTab, variant } = useTabsContext();
|
|
@@ -2903,22 +3572,22 @@ var TabsTrigger = React10.forwardRef(
|
|
|
2903
3572
|
throw new Error("TabsTrigger must have a value prop");
|
|
2904
3573
|
}
|
|
2905
3574
|
const isActive = activeTab === value;
|
|
2906
|
-
const tokenStyles =
|
|
3575
|
+
const tokenStyles = React17.useMemo(
|
|
2907
3576
|
() => ({
|
|
2908
3577
|
...getTabTypographyStyles(isActive),
|
|
2909
3578
|
...style
|
|
2910
3579
|
}),
|
|
2911
3580
|
[isActive, style]
|
|
2912
3581
|
);
|
|
2913
|
-
const triggerClassName =
|
|
3582
|
+
const triggerClassName = React17.useMemo(
|
|
2914
3583
|
() => cn(tabsVariants({ variant }), className),
|
|
2915
3584
|
[variant, className]
|
|
2916
3585
|
);
|
|
2917
|
-
const handleClick =
|
|
3586
|
+
const handleClick = React17.useCallback(() => {
|
|
2918
3587
|
if (disabled) return;
|
|
2919
3588
|
setActiveTab(value);
|
|
2920
3589
|
}, [disabled, setActiveTab, value]);
|
|
2921
|
-
return /* @__PURE__ */
|
|
3590
|
+
return /* @__PURE__ */ jsx18(
|
|
2922
3591
|
"button",
|
|
2923
3592
|
{
|
|
2924
3593
|
ref,
|
|
@@ -2932,13 +3601,13 @@ var TabsTrigger = React10.forwardRef(
|
|
|
2932
3601
|
disabled,
|
|
2933
3602
|
onClick: handleClick,
|
|
2934
3603
|
...restProps,
|
|
2935
|
-
children: /* @__PURE__ */
|
|
3604
|
+
children: /* @__PURE__ */ jsx18("span", { className: "pl-3 pr-6 py-2", children })
|
|
2936
3605
|
}
|
|
2937
3606
|
);
|
|
2938
3607
|
}
|
|
2939
3608
|
);
|
|
2940
3609
|
TabsTrigger.displayName = "TabsTrigger";
|
|
2941
|
-
var TabsContent =
|
|
3610
|
+
var TabsContent = React17.forwardRef(
|
|
2942
3611
|
(props, ref) => {
|
|
2943
3612
|
const { className, value, children, ...restProps } = props;
|
|
2944
3613
|
const { activeTab } = useTabsContext();
|
|
@@ -2949,7 +3618,7 @@ var TabsContent = React10.forwardRef(
|
|
|
2949
3618
|
if (!isActive) {
|
|
2950
3619
|
return null;
|
|
2951
3620
|
}
|
|
2952
|
-
return /* @__PURE__ */
|
|
3621
|
+
return /* @__PURE__ */ jsx18(
|
|
2953
3622
|
"div",
|
|
2954
3623
|
{
|
|
2955
3624
|
ref,
|
|
@@ -2967,11 +3636,11 @@ var TabsContent = React10.forwardRef(
|
|
|
2967
3636
|
TabsContent.displayName = "TabsContent";
|
|
2968
3637
|
|
|
2969
3638
|
// src/components/ui/dropdown-menu.tsx
|
|
2970
|
-
import * as
|
|
3639
|
+
import * as React18 from "react";
|
|
2971
3640
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2972
|
-
import { jsx as
|
|
3641
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2973
3642
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2974
|
-
var DropdownMenuTrigger =
|
|
3643
|
+
var DropdownMenuTrigger = React18.forwardRef(({ className, icon, children, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
2975
3644
|
DropdownMenuPrimitive.Trigger,
|
|
2976
3645
|
{
|
|
2977
3646
|
ref,
|
|
@@ -2981,7 +3650,7 @@ var DropdownMenuTrigger = React11.forwardRef(({ className, icon, children, ...pr
|
|
|
2981
3650
|
),
|
|
2982
3651
|
...props,
|
|
2983
3652
|
children: [
|
|
2984
|
-
icon || /* @__PURE__ */
|
|
3653
|
+
icon || /* @__PURE__ */ jsx19(MoreMenu, { className: "size-4" }),
|
|
2985
3654
|
children
|
|
2986
3655
|
]
|
|
2987
3656
|
}
|
|
@@ -2991,7 +3660,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
2991
3660
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
2992
3661
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
2993
3662
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
2994
|
-
var DropdownMenuSubTrigger =
|
|
3663
|
+
var DropdownMenuSubTrigger = React18.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
2995
3664
|
DropdownMenuPrimitive.SubTrigger,
|
|
2996
3665
|
{
|
|
2997
3666
|
ref,
|
|
@@ -3004,12 +3673,12 @@ var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, .
|
|
|
3004
3673
|
...props,
|
|
3005
3674
|
children: [
|
|
3006
3675
|
children,
|
|
3007
|
-
/* @__PURE__ */
|
|
3676
|
+
/* @__PURE__ */ jsx19(ChevronRight, { className: "ml-auto" })
|
|
3008
3677
|
]
|
|
3009
3678
|
}
|
|
3010
3679
|
));
|
|
3011
3680
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
3012
|
-
var DropdownMenuSubContent =
|
|
3681
|
+
var DropdownMenuSubContent = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
3013
3682
|
DropdownMenuPrimitive.SubContent,
|
|
3014
3683
|
{
|
|
3015
3684
|
ref,
|
|
@@ -3021,7 +3690,7 @@ var DropdownMenuSubContent = React11.forwardRef(({ className, ...props }, ref) =
|
|
|
3021
3690
|
}
|
|
3022
3691
|
));
|
|
3023
3692
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
3024
|
-
var DropdownMenuContent =
|
|
3693
|
+
var DropdownMenuContent = React18.forwardRef(({ className, sideOffset = 4, align = "end", ...props }, ref) => /* @__PURE__ */ jsx19(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx19(
|
|
3025
3694
|
DropdownMenuPrimitive.Content,
|
|
3026
3695
|
{
|
|
3027
3696
|
ref,
|
|
@@ -3035,7 +3704,7 @@ var DropdownMenuContent = React11.forwardRef(({ className, sideOffset = 4, align
|
|
|
3035
3704
|
}
|
|
3036
3705
|
) }));
|
|
3037
3706
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
3038
|
-
var DropdownMenuItem =
|
|
3707
|
+
var DropdownMenuItem = React18.forwardRef(({ className, inset, style, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
3039
3708
|
DropdownMenuPrimitive.Item,
|
|
3040
3709
|
{
|
|
3041
3710
|
ref,
|
|
@@ -3052,7 +3721,7 @@ var DropdownMenuItem = React11.forwardRef(({ className, inset, style, ...props }
|
|
|
3052
3721
|
}
|
|
3053
3722
|
));
|
|
3054
3723
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
3055
|
-
var DropdownMenuCheckboxItem =
|
|
3724
|
+
var DropdownMenuCheckboxItem = React18.forwardRef(({ className, children, style, checked, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
3056
3725
|
DropdownMenuPrimitive.CheckboxItem,
|
|
3057
3726
|
{
|
|
3058
3727
|
ref,
|
|
@@ -3067,7 +3736,7 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, style,
|
|
|
3067
3736
|
},
|
|
3068
3737
|
...props,
|
|
3069
3738
|
children: [
|
|
3070
|
-
/* @__PURE__ */
|
|
3739
|
+
/* @__PURE__ */ jsx19(
|
|
3071
3740
|
Checkbox,
|
|
3072
3741
|
{
|
|
3073
3742
|
checked: checked === true,
|
|
@@ -3075,12 +3744,12 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, style,
|
|
|
3075
3744
|
"aria-hidden": "true"
|
|
3076
3745
|
}
|
|
3077
3746
|
),
|
|
3078
|
-
/* @__PURE__ */
|
|
3747
|
+
/* @__PURE__ */ jsx19("span", { className: "flex-1", children })
|
|
3079
3748
|
]
|
|
3080
3749
|
}
|
|
3081
3750
|
));
|
|
3082
3751
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
3083
|
-
var DropdownMenuRadioItem =
|
|
3752
|
+
var DropdownMenuRadioItem = React18.forwardRef(({ className, children, style, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
3084
3753
|
DropdownMenuPrimitive.RadioItem,
|
|
3085
3754
|
{
|
|
3086
3755
|
ref,
|
|
@@ -3094,13 +3763,13 @@ var DropdownMenuRadioItem = React11.forwardRef(({ className, children, style, ..
|
|
|
3094
3763
|
},
|
|
3095
3764
|
...props,
|
|
3096
3765
|
children: [
|
|
3097
|
-
/* @__PURE__ */
|
|
3766
|
+
/* @__PURE__ */ jsx19("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx19(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx19("span", { className: "h-2 w-2 rounded-full bg-current" }) }) }),
|
|
3098
3767
|
children
|
|
3099
3768
|
]
|
|
3100
3769
|
}
|
|
3101
3770
|
));
|
|
3102
3771
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
3103
|
-
var DropdownMenuLabel =
|
|
3772
|
+
var DropdownMenuLabel = React18.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
3104
3773
|
DropdownMenuPrimitive.Label,
|
|
3105
3774
|
{
|
|
3106
3775
|
ref,
|
|
@@ -3113,7 +3782,7 @@ var DropdownMenuLabel = React11.forwardRef(({ className, inset, ...props }, ref)
|
|
|
3113
3782
|
}
|
|
3114
3783
|
));
|
|
3115
3784
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
3116
|
-
var DropdownMenuSeparator =
|
|
3785
|
+
var DropdownMenuSeparator = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
3117
3786
|
DropdownMenuPrimitive.Separator,
|
|
3118
3787
|
{
|
|
3119
3788
|
ref,
|
|
@@ -3126,7 +3795,7 @@ var DropdownMenuShortcut = ({
|
|
|
3126
3795
|
className,
|
|
3127
3796
|
...props
|
|
3128
3797
|
}) => {
|
|
3129
|
-
return /* @__PURE__ */
|
|
3798
|
+
return /* @__PURE__ */ jsx19(
|
|
3130
3799
|
"span",
|
|
3131
3800
|
{
|
|
3132
3801
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
@@ -3137,21 +3806,21 @@ var DropdownMenuShortcut = ({
|
|
|
3137
3806
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
3138
3807
|
|
|
3139
3808
|
// src/components/ui/charts/chart-legend.tsx
|
|
3140
|
-
import { jsx as
|
|
3809
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3141
3810
|
function ChartLegend({
|
|
3142
3811
|
items,
|
|
3143
3812
|
x = 0,
|
|
3144
3813
|
y = 550,
|
|
3145
3814
|
className = ""
|
|
3146
3815
|
}) {
|
|
3147
|
-
return /* @__PURE__ */
|
|
3816
|
+
return /* @__PURE__ */ jsx20("foreignObject", { x, y, width: "100%", height: "40", children: /* @__PURE__ */ jsx20(
|
|
3148
3817
|
"div",
|
|
3149
3818
|
{
|
|
3150
3819
|
className: `flex justify-center items-center gap-6 ${className}`,
|
|
3151
3820
|
style: { height: "100%" },
|
|
3152
|
-
children: items.map(({ key, color, label }) => /* @__PURE__ */
|
|
3153
|
-
/* @__PURE__ */
|
|
3154
|
-
/* @__PURE__ */
|
|
3821
|
+
children: items.map(({ key, color, label }) => /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
|
|
3822
|
+
/* @__PURE__ */ jsx20("div", { className: "w-3 h-3", style: { backgroundColor: color } }),
|
|
3823
|
+
/* @__PURE__ */ jsx20(Typography, { variant: "body-xs", children: label || key })
|
|
3155
3824
|
] }, key))
|
|
3156
3825
|
}
|
|
3157
3826
|
) });
|
|
@@ -3269,12 +3938,12 @@ var formatLargeNumber = (value) => {
|
|
|
3269
3938
|
};
|
|
3270
3939
|
|
|
3271
3940
|
// src/components/ui/charts/chart-labels.tsx
|
|
3272
|
-
import { jsx as
|
|
3941
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
3273
3942
|
var createCustomXAxisLabel = (text, yOffset = 40) => {
|
|
3274
3943
|
const CustomXAxisLabel = ({ viewBox }) => {
|
|
3275
3944
|
if (!viewBox) return null;
|
|
3276
3945
|
const { x, y, width } = viewBox;
|
|
3277
|
-
return /* @__PURE__ */
|
|
3946
|
+
return /* @__PURE__ */ jsx21("g", { children: /* @__PURE__ */ jsx21("foreignObject", { x, y: y + yOffset, width, height: 20, children: /* @__PURE__ */ jsx21("div", { className: "flex justify-center w-full", children: /* @__PURE__ */ jsx21(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
3278
3947
|
};
|
|
3279
3948
|
CustomXAxisLabel.displayName = "CustomXAxisLabel";
|
|
3280
3949
|
return CustomXAxisLabel;
|
|
@@ -3284,7 +3953,7 @@ var createCustomYAxisLabel = (text, leftMargin) => {
|
|
|
3284
3953
|
if (!viewBox) return null;
|
|
3285
3954
|
const { x, y, height } = viewBox;
|
|
3286
3955
|
const offset = leftMargin ? leftMargin + 10 : 110;
|
|
3287
|
-
return /* @__PURE__ */
|
|
3956
|
+
return /* @__PURE__ */ jsx21("g", { children: /* @__PURE__ */ jsx21("foreignObject", { x: x - offset, y, width: 100, height, children: /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-center h-full transform -rotate-90 whitespace-nowrap", children: /* @__PURE__ */ jsx21(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
3288
3957
|
};
|
|
3289
3958
|
CustomYAxisLabel.displayName = "CustomYAxisLabel";
|
|
3290
3959
|
return CustomYAxisLabel;
|
|
@@ -3293,14 +3962,14 @@ var createCustomYAxisRightLabel = (text) => {
|
|
|
3293
3962
|
const CustomYAxisRightLabel = ({ viewBox }) => {
|
|
3294
3963
|
if (!viewBox) return null;
|
|
3295
3964
|
const { x, y, width, height } = viewBox;
|
|
3296
|
-
return /* @__PURE__ */
|
|
3965
|
+
return /* @__PURE__ */ jsx21("g", { children: /* @__PURE__ */ jsx21("foreignObject", { x: x + width - 70, y, width: 120, height, children: /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-center h-full transform rotate-90 whitespace-nowrap", children: /* @__PURE__ */ jsx21(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
3297
3966
|
};
|
|
3298
3967
|
CustomYAxisRightLabel.displayName = "CustomYAxisRightLabel";
|
|
3299
3968
|
return CustomYAxisRightLabel;
|
|
3300
3969
|
};
|
|
3301
3970
|
var customXAxisTick = (props) => {
|
|
3302
3971
|
const { x, y, payload } = props;
|
|
3303
|
-
return /* @__PURE__ */
|
|
3972
|
+
return /* @__PURE__ */ jsx21("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx21(
|
|
3304
3973
|
"foreignObject",
|
|
3305
3974
|
{
|
|
3306
3975
|
x: -20,
|
|
@@ -3308,12 +3977,12 @@ var customXAxisTick = (props) => {
|
|
|
3308
3977
|
width: 40,
|
|
3309
3978
|
height: 20,
|
|
3310
3979
|
style: { overflow: "visible" },
|
|
3311
|
-
children: /* @__PURE__ */
|
|
3980
|
+
children: /* @__PURE__ */ jsx21(
|
|
3312
3981
|
"div",
|
|
3313
3982
|
{
|
|
3314
3983
|
className: "flex items-start justify-center h-full",
|
|
3315
3984
|
style: { overflow: "visible" },
|
|
3316
|
-
children: /* @__PURE__ */
|
|
3985
|
+
children: /* @__PURE__ */ jsx21(
|
|
3317
3986
|
Typography,
|
|
3318
3987
|
{
|
|
3319
3988
|
variant: "body-xs",
|
|
@@ -3328,7 +3997,7 @@ var customXAxisTick = (props) => {
|
|
|
3328
3997
|
};
|
|
3329
3998
|
var customXAxisTickRotated = (props) => {
|
|
3330
3999
|
const { x, y, payload } = props;
|
|
3331
|
-
return /* @__PURE__ */
|
|
4000
|
+
return /* @__PURE__ */ jsx21("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx21(
|
|
3332
4001
|
"text",
|
|
3333
4002
|
{
|
|
3334
4003
|
x: 0,
|
|
@@ -3347,25 +4016,25 @@ var customYAxisTick = (props) => {
|
|
|
3347
4016
|
const { x, y, payload } = props;
|
|
3348
4017
|
const text = String(payload.value);
|
|
3349
4018
|
const estimatedWidth = Math.max(text.length * 8, 80);
|
|
3350
|
-
return /* @__PURE__ */
|
|
4019
|
+
return /* @__PURE__ */ jsx21(
|
|
3351
4020
|
"foreignObject",
|
|
3352
4021
|
{
|
|
3353
4022
|
x: x - estimatedWidth + 5,
|
|
3354
4023
|
y: y - 6,
|
|
3355
4024
|
width: estimatedWidth,
|
|
3356
4025
|
height: 15,
|
|
3357
|
-
children: /* @__PURE__ */
|
|
4026
|
+
children: /* @__PURE__ */ jsx21("div", { className: "flex justify-end w-full", children: /* @__PURE__ */ jsx21(Typography, { variant: "body-xs", className: "text-secondary", children: payload.value }) })
|
|
3358
4027
|
}
|
|
3359
4028
|
);
|
|
3360
4029
|
};
|
|
3361
4030
|
|
|
3362
4031
|
// src/components/ui/charts/chart-tooltip.tsx
|
|
3363
|
-
import { Fragment, jsx as
|
|
4032
|
+
import { Fragment, jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3364
4033
|
function TooltipContainer({
|
|
3365
4034
|
children,
|
|
3366
4035
|
className = ""
|
|
3367
4036
|
}) {
|
|
3368
|
-
return /* @__PURE__ */
|
|
4037
|
+
return /* @__PURE__ */ jsx22(
|
|
3369
4038
|
"div",
|
|
3370
4039
|
{
|
|
3371
4040
|
className: `bg-light border border-subtle rounded p-2.5 text-dark ${className}`,
|
|
@@ -3379,10 +4048,10 @@ function TooltipItem({
|
|
|
3379
4048
|
value,
|
|
3380
4049
|
className = ""
|
|
3381
4050
|
}) {
|
|
3382
|
-
return /* @__PURE__ */
|
|
3383
|
-
/* @__PURE__ */
|
|
3384
|
-
/* @__PURE__ */
|
|
3385
|
-
/* @__PURE__ */
|
|
4051
|
+
return /* @__PURE__ */ jsxs14(Fragment, { children: [
|
|
4052
|
+
/* @__PURE__ */ jsx22("br", {}),
|
|
4053
|
+
/* @__PURE__ */ jsxs14(Typography, { variant: "label-sm", className, children: [
|
|
4054
|
+
/* @__PURE__ */ jsx22(
|
|
3386
4055
|
"span",
|
|
3387
4056
|
{
|
|
3388
4057
|
className: "inline-block w-3 h-3 mr-1.5",
|
|
@@ -3400,9 +4069,9 @@ function GenericTooltip({
|
|
|
3400
4069
|
items,
|
|
3401
4070
|
className = ""
|
|
3402
4071
|
}) {
|
|
3403
|
-
return /* @__PURE__ */
|
|
3404
|
-
title && /* @__PURE__ */
|
|
3405
|
-
items.map((item, index) => /* @__PURE__ */
|
|
4072
|
+
return /* @__PURE__ */ jsxs14(TooltipContainer, { className, children: [
|
|
4073
|
+
title && /* @__PURE__ */ jsx22(Typography, { variant: "label-sm-bold", children: title }),
|
|
4074
|
+
items.map((item, index) => /* @__PURE__ */ jsx22(
|
|
3406
4075
|
TooltipItem,
|
|
3407
4076
|
{
|
|
3408
4077
|
color: item.color,
|
|
@@ -3415,17 +4084,17 @@ function GenericTooltip({
|
|
|
3415
4084
|
}
|
|
3416
4085
|
|
|
3417
4086
|
// src/components/ui/charts/bar-chart.tsx
|
|
3418
|
-
import { forwardRef as
|
|
4087
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
3419
4088
|
import {
|
|
3420
4089
|
BarChart as RechartsBarChart,
|
|
3421
4090
|
Bar,
|
|
3422
4091
|
XAxis,
|
|
3423
4092
|
YAxis,
|
|
3424
|
-
Tooltip,
|
|
4093
|
+
Tooltip as Tooltip2,
|
|
3425
4094
|
ResponsiveContainer
|
|
3426
4095
|
} from "recharts";
|
|
3427
|
-
import { jsx as
|
|
3428
|
-
var BarChart =
|
|
4096
|
+
import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4097
|
+
var BarChart = forwardRef15(
|
|
3429
4098
|
({
|
|
3430
4099
|
data,
|
|
3431
4100
|
xAxisKey,
|
|
@@ -3451,19 +4120,19 @@ var BarChart = forwardRef12(
|
|
|
3451
4120
|
};
|
|
3452
4121
|
const defaultLegendItems = showLegend && legendItems.length === 0 ? [{ key: yAxisKey, color: barColor, label: yAxisKey }] : legendItems;
|
|
3453
4122
|
const hasData = data && data.length > 0;
|
|
3454
|
-
return /* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ jsxs15(
|
|
3455
4124
|
"div",
|
|
3456
4125
|
{
|
|
3457
4126
|
ref,
|
|
3458
4127
|
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
3459
4128
|
children: [
|
|
3460
|
-
/* @__PURE__ */
|
|
3461
|
-
/* @__PURE__ */
|
|
4129
|
+
/* @__PURE__ */ jsx23("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx23(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
4130
|
+
/* @__PURE__ */ jsx23("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx23(
|
|
3462
4131
|
ResponsiveContainer,
|
|
3463
4132
|
{
|
|
3464
4133
|
width: "100%",
|
|
3465
4134
|
height: CHART_CONSTANTS.STANDARD_HEIGHT,
|
|
3466
|
-
children: /* @__PURE__ */
|
|
4135
|
+
children: /* @__PURE__ */ jsxs15(
|
|
3467
4136
|
RechartsBarChart,
|
|
3468
4137
|
{
|
|
3469
4138
|
data,
|
|
@@ -3475,7 +4144,7 @@ var BarChart = forwardRef12(
|
|
|
3475
4144
|
onClick: handleClick,
|
|
3476
4145
|
layout,
|
|
3477
4146
|
children: [
|
|
3478
|
-
/* @__PURE__ */
|
|
4147
|
+
/* @__PURE__ */ jsx23(
|
|
3479
4148
|
XAxis,
|
|
3480
4149
|
{
|
|
3481
4150
|
dataKey: xAxisKey,
|
|
@@ -3489,7 +4158,7 @@ var BarChart = forwardRef12(
|
|
|
3489
4158
|
label: xAxisLabel ? createCustomXAxisLabel(xAxisLabel, 80) : void 0
|
|
3490
4159
|
}
|
|
3491
4160
|
),
|
|
3492
|
-
/* @__PURE__ */
|
|
4161
|
+
/* @__PURE__ */ jsx23(
|
|
3493
4162
|
YAxis,
|
|
3494
4163
|
{
|
|
3495
4164
|
axisLine: false,
|
|
@@ -3500,8 +4169,8 @@ var BarChart = forwardRef12(
|
|
|
3500
4169
|
type: yAxisType
|
|
3501
4170
|
}
|
|
3502
4171
|
),
|
|
3503
|
-
/* @__PURE__ */
|
|
3504
|
-
|
|
4172
|
+
/* @__PURE__ */ jsx23(
|
|
4173
|
+
Tooltip2,
|
|
3505
4174
|
{
|
|
3506
4175
|
content: ({
|
|
3507
4176
|
active,
|
|
@@ -3509,7 +4178,7 @@ var BarChart = forwardRef12(
|
|
|
3509
4178
|
label
|
|
3510
4179
|
}) => {
|
|
3511
4180
|
if (active && payload && payload.length) {
|
|
3512
|
-
return /* @__PURE__ */
|
|
4181
|
+
return /* @__PURE__ */ jsx23(
|
|
3513
4182
|
GenericTooltip,
|
|
3514
4183
|
{
|
|
3515
4184
|
title: label?.toString(),
|
|
@@ -3525,7 +4194,7 @@ var BarChart = forwardRef12(
|
|
|
3525
4194
|
}
|
|
3526
4195
|
}
|
|
3527
4196
|
),
|
|
3528
|
-
/* @__PURE__ */
|
|
4197
|
+
/* @__PURE__ */ jsx23(
|
|
3529
4198
|
Bar,
|
|
3530
4199
|
{
|
|
3531
4200
|
dataKey: barDataKey || yAxisKey,
|
|
@@ -3533,12 +4202,12 @@ var BarChart = forwardRef12(
|
|
|
3533
4202
|
name: barDataKey || yAxisKey
|
|
3534
4203
|
}
|
|
3535
4204
|
),
|
|
3536
|
-
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */
|
|
4205
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx23(ChartLegend, { items: defaultLegendItems })
|
|
3537
4206
|
]
|
|
3538
4207
|
}
|
|
3539
4208
|
)
|
|
3540
4209
|
}
|
|
3541
|
-
) : /* @__PURE__ */
|
|
4210
|
+
) : /* @__PURE__ */ jsx23("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx23(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
3542
4211
|
]
|
|
3543
4212
|
}
|
|
3544
4213
|
);
|
|
@@ -3547,17 +4216,17 @@ var BarChart = forwardRef12(
|
|
|
3547
4216
|
BarChart.displayName = "BarChart";
|
|
3548
4217
|
|
|
3549
4218
|
// src/components/ui/charts/line-chart.tsx
|
|
3550
|
-
import { forwardRef as
|
|
4219
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
3551
4220
|
import {
|
|
3552
4221
|
LineChart as RechartsLineChart,
|
|
3553
4222
|
Line,
|
|
3554
4223
|
XAxis as XAxis2,
|
|
3555
4224
|
YAxis as YAxis2,
|
|
3556
|
-
Tooltip as
|
|
4225
|
+
Tooltip as Tooltip3,
|
|
3557
4226
|
ResponsiveContainer as ResponsiveContainer2
|
|
3558
4227
|
} from "recharts";
|
|
3559
|
-
import { jsx as
|
|
3560
|
-
var LineChart =
|
|
4228
|
+
import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4229
|
+
var LineChart = forwardRef16(
|
|
3561
4230
|
({
|
|
3562
4231
|
data,
|
|
3563
4232
|
xAxisKey,
|
|
@@ -3585,19 +4254,19 @@ var LineChart = forwardRef13(
|
|
|
3585
4254
|
)
|
|
3586
4255
|
);
|
|
3587
4256
|
const hasData = data && data.length > 0;
|
|
3588
|
-
return /* @__PURE__ */
|
|
4257
|
+
return /* @__PURE__ */ jsxs16(
|
|
3589
4258
|
"div",
|
|
3590
4259
|
{
|
|
3591
4260
|
ref,
|
|
3592
4261
|
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
3593
4262
|
children: [
|
|
3594
|
-
/* @__PURE__ */
|
|
3595
|
-
/* @__PURE__ */
|
|
4263
|
+
/* @__PURE__ */ jsx24("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx24(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
4264
|
+
/* @__PURE__ */ jsx24("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx24(
|
|
3596
4265
|
ResponsiveContainer2,
|
|
3597
4266
|
{
|
|
3598
4267
|
width: "100%",
|
|
3599
4268
|
height: CHART_CONSTANTS.STANDARD_HEIGHT,
|
|
3600
|
-
children: /* @__PURE__ */
|
|
4269
|
+
children: /* @__PURE__ */ jsxs16(
|
|
3601
4270
|
RechartsLineChart,
|
|
3602
4271
|
{
|
|
3603
4272
|
data,
|
|
@@ -3608,7 +4277,7 @@ var LineChart = forwardRef13(
|
|
|
3608
4277
|
},
|
|
3609
4278
|
onClick: handleClick,
|
|
3610
4279
|
children: [
|
|
3611
|
-
/* @__PURE__ */
|
|
4280
|
+
/* @__PURE__ */ jsx24(
|
|
3612
4281
|
XAxis2,
|
|
3613
4282
|
{
|
|
3614
4283
|
dataKey: xAxisKey,
|
|
@@ -3620,7 +4289,7 @@ var LineChart = forwardRef13(
|
|
|
3620
4289
|
label: xAxisLabel ? createCustomXAxisLabel(xAxisLabel) : void 0
|
|
3621
4290
|
}
|
|
3622
4291
|
),
|
|
3623
|
-
/* @__PURE__ */
|
|
4292
|
+
/* @__PURE__ */ jsx24(
|
|
3624
4293
|
YAxis2,
|
|
3625
4294
|
{
|
|
3626
4295
|
axisLine: false,
|
|
@@ -3629,8 +4298,8 @@ var LineChart = forwardRef13(
|
|
|
3629
4298
|
label: yAxisLabel ? createCustomYAxisLabel(yAxisLabel, 40) : void 0
|
|
3630
4299
|
}
|
|
3631
4300
|
),
|
|
3632
|
-
/* @__PURE__ */
|
|
3633
|
-
|
|
4301
|
+
/* @__PURE__ */ jsx24(
|
|
4302
|
+
Tooltip3,
|
|
3634
4303
|
{
|
|
3635
4304
|
content: ({
|
|
3636
4305
|
active,
|
|
@@ -3638,7 +4307,7 @@ var LineChart = forwardRef13(
|
|
|
3638
4307
|
label
|
|
3639
4308
|
}) => {
|
|
3640
4309
|
if (active && payload && payload.length) {
|
|
3641
|
-
return /* @__PURE__ */
|
|
4310
|
+
return /* @__PURE__ */ jsx24(
|
|
3642
4311
|
GenericTooltip,
|
|
3643
4312
|
{
|
|
3644
4313
|
title: label?.toString(),
|
|
@@ -3654,7 +4323,7 @@ var LineChart = forwardRef13(
|
|
|
3654
4323
|
}
|
|
3655
4324
|
}
|
|
3656
4325
|
),
|
|
3657
|
-
series.map((s, index) => /* @__PURE__ */
|
|
4326
|
+
series.map((s, index) => /* @__PURE__ */ jsx24(
|
|
3658
4327
|
Line,
|
|
3659
4328
|
{
|
|
3660
4329
|
type: "monotone",
|
|
@@ -3666,12 +4335,12 @@ var LineChart = forwardRef13(
|
|
|
3666
4335
|
},
|
|
3667
4336
|
s.dataKey
|
|
3668
4337
|
)),
|
|
3669
|
-
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */
|
|
4338
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx24(ChartLegend, { items: defaultLegendItems })
|
|
3670
4339
|
]
|
|
3671
4340
|
}
|
|
3672
4341
|
)
|
|
3673
4342
|
}
|
|
3674
|
-
) : /* @__PURE__ */
|
|
4343
|
+
) : /* @__PURE__ */ jsx24("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx24(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
3675
4344
|
]
|
|
3676
4345
|
}
|
|
3677
4346
|
);
|
|
@@ -3680,10 +4349,10 @@ var LineChart = forwardRef13(
|
|
|
3680
4349
|
LineChart.displayName = "LineChart";
|
|
3681
4350
|
|
|
3682
4351
|
// src/components/ui/charts/pie-chart.tsx
|
|
3683
|
-
import { forwardRef as
|
|
3684
|
-
import { PieChart as RechartsPieChart, Pie, Cell, Tooltip as
|
|
3685
|
-
import { jsx as
|
|
3686
|
-
var PieChart =
|
|
4352
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
4353
|
+
import { PieChart as RechartsPieChart, Pie, Cell, Tooltip as Tooltip4 } from "recharts";
|
|
4354
|
+
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4355
|
+
var PieChart = forwardRef17(
|
|
3687
4356
|
({
|
|
3688
4357
|
data,
|
|
3689
4358
|
title,
|
|
@@ -3710,20 +4379,20 @@ var PieChart = forwardRef14(
|
|
|
3710
4379
|
)
|
|
3711
4380
|
);
|
|
3712
4381
|
const hasData = data && data.length > 0;
|
|
3713
|
-
return /* @__PURE__ */
|
|
4382
|
+
return /* @__PURE__ */ jsxs17(
|
|
3714
4383
|
"div",
|
|
3715
4384
|
{
|
|
3716
4385
|
ref,
|
|
3717
4386
|
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
3718
4387
|
children: [
|
|
3719
|
-
/* @__PURE__ */
|
|
3720
|
-
/* @__PURE__ */
|
|
4388
|
+
/* @__PURE__ */ jsx25("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx25(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
4389
|
+
/* @__PURE__ */ jsx25("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx25("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs17(
|
|
3721
4390
|
RechartsPieChart,
|
|
3722
4391
|
{
|
|
3723
4392
|
width: 600,
|
|
3724
4393
|
height: CHART_CONSTANTS.LARGE_HEIGHT,
|
|
3725
4394
|
children: [
|
|
3726
|
-
/* @__PURE__ */
|
|
4395
|
+
/* @__PURE__ */ jsx25(
|
|
3727
4396
|
Pie,
|
|
3728
4397
|
{
|
|
3729
4398
|
data,
|
|
@@ -3735,7 +4404,7 @@ var PieChart = forwardRef14(
|
|
|
3735
4404
|
label: showLabels,
|
|
3736
4405
|
labelLine: false,
|
|
3737
4406
|
onClick: handleClick,
|
|
3738
|
-
children: data.map((entry, index) => /* @__PURE__ */
|
|
4407
|
+
children: data.map((entry, index) => /* @__PURE__ */ jsx25(
|
|
3739
4408
|
Cell,
|
|
3740
4409
|
{
|
|
3741
4410
|
fill: entry.color || getSeriesColor(index)
|
|
@@ -3744,8 +4413,8 @@ var PieChart = forwardRef14(
|
|
|
3744
4413
|
))
|
|
3745
4414
|
}
|
|
3746
4415
|
),
|
|
3747
|
-
/* @__PURE__ */
|
|
3748
|
-
|
|
4416
|
+
/* @__PURE__ */ jsx25(
|
|
4417
|
+
Tooltip4,
|
|
3749
4418
|
{
|
|
3750
4419
|
content: ({
|
|
3751
4420
|
active,
|
|
@@ -3753,7 +4422,7 @@ var PieChart = forwardRef14(
|
|
|
3753
4422
|
}) => {
|
|
3754
4423
|
if (active && payload && payload.length && payload[0]) {
|
|
3755
4424
|
const data2 = payload[0].payload;
|
|
3756
|
-
return /* @__PURE__ */
|
|
4425
|
+
return /* @__PURE__ */ jsx25(
|
|
3757
4426
|
GenericTooltip,
|
|
3758
4427
|
{
|
|
3759
4428
|
title: data2.name,
|
|
@@ -3771,10 +4440,10 @@ var PieChart = forwardRef14(
|
|
|
3771
4440
|
}
|
|
3772
4441
|
}
|
|
3773
4442
|
),
|
|
3774
|
-
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */
|
|
4443
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx25(ChartLegend, { items: defaultLegendItems, y: 400 })
|
|
3775
4444
|
]
|
|
3776
4445
|
}
|
|
3777
|
-
) }) : /* @__PURE__ */
|
|
4446
|
+
) }) : /* @__PURE__ */ jsx25("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx25(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
3778
4447
|
]
|
|
3779
4448
|
}
|
|
3780
4449
|
);
|
|
@@ -3783,11 +4452,11 @@ var PieChart = forwardRef14(
|
|
|
3783
4452
|
PieChart.displayName = "PieChart";
|
|
3784
4453
|
|
|
3785
4454
|
// src/components/ui/table.tsx
|
|
3786
|
-
import { useCallback as
|
|
4455
|
+
import { useCallback as useCallback6 } from "react";
|
|
3787
4456
|
import {
|
|
3788
4457
|
flexRender
|
|
3789
4458
|
} from "@tanstack/react-table";
|
|
3790
|
-
import { Fragment as Fragment2, jsx as
|
|
4459
|
+
import { Fragment as Fragment2, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3791
4460
|
function Table({
|
|
3792
4461
|
table,
|
|
3793
4462
|
className,
|
|
@@ -3799,33 +4468,33 @@ function Table({
|
|
|
3799
4468
|
const totalPages = table.getPageCount();
|
|
3800
4469
|
const totalRows = table.getFilteredRowModel().rows.length;
|
|
3801
4470
|
const showingText = totalRows > 0 ? "Showing " + (currentPage * pageSize + 1) + "-" + Math.min((currentPage + 1) * pageSize, totalRows) + " of " + totalRows + " results" : "No results found";
|
|
3802
|
-
const handlePreviousPage =
|
|
4471
|
+
const handlePreviousPage = useCallback6(() => {
|
|
3803
4472
|
table.previousPage();
|
|
3804
4473
|
}, [table]);
|
|
3805
|
-
const handleNextPage =
|
|
4474
|
+
const handleNextPage = useCallback6(() => {
|
|
3806
4475
|
table.nextPage();
|
|
3807
4476
|
}, [table]);
|
|
3808
|
-
const handlePageChange =
|
|
4477
|
+
const handlePageChange = useCallback6(
|
|
3809
4478
|
(pageIndex) => {
|
|
3810
4479
|
table.setPageIndex(pageIndex);
|
|
3811
4480
|
},
|
|
3812
4481
|
[table]
|
|
3813
4482
|
);
|
|
3814
|
-
const handlePageSizeChange =
|
|
4483
|
+
const handlePageSizeChange = useCallback6(
|
|
3815
4484
|
(value) => {
|
|
3816
4485
|
table.setPageSize(Number(value));
|
|
3817
4486
|
},
|
|
3818
4487
|
[table]
|
|
3819
4488
|
);
|
|
3820
|
-
return /* @__PURE__ */
|
|
3821
|
-
/* @__PURE__ */
|
|
3822
|
-
/* @__PURE__ */
|
|
4489
|
+
return /* @__PURE__ */ jsxs18("div", { children: [
|
|
4490
|
+
/* @__PURE__ */ jsx26("div", { className: cn("overflow-x-auto", className), children: /* @__PURE__ */ jsxs18("table", { className: "min-w-full divide-y divide-border", children: [
|
|
4491
|
+
/* @__PURE__ */ jsx26("thead", { className: "bg-dark text-light", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx26("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx26("th", { className: "px-6 py-3 text-left", children: /* @__PURE__ */ jsxs18(
|
|
3823
4492
|
"div",
|
|
3824
4493
|
{
|
|
3825
4494
|
className: `flex items-center space-x-1 ${header.column.getCanSort() ? "cursor-pointer select-none" : ""}`,
|
|
3826
4495
|
onClick: header.column.getToggleSortingHandler(),
|
|
3827
4496
|
children: [
|
|
3828
|
-
/* @__PURE__ */
|
|
4497
|
+
/* @__PURE__ */ jsx26(
|
|
3829
4498
|
Typography,
|
|
3830
4499
|
{
|
|
3831
4500
|
variant: "label-xs",
|
|
@@ -3836,19 +4505,19 @@ function Table({
|
|
|
3836
4505
|
)
|
|
3837
4506
|
}
|
|
3838
4507
|
),
|
|
3839
|
-
header.column.getCanSort() && /* @__PURE__ */
|
|
3840
|
-
header.column.getIsSorted() === "asc" && /* @__PURE__ */
|
|
3841
|
-
header.column.getIsSorted() === "desc" && /* @__PURE__ */
|
|
4508
|
+
header.column.getCanSort() && /* @__PURE__ */ jsxs18("span", { className: "ml-1", children: [
|
|
4509
|
+
header.column.getIsSorted() === "asc" && /* @__PURE__ */ jsx26(ChevronUp, { className: "w-4 h-4 text-light" }),
|
|
4510
|
+
header.column.getIsSorted() === "desc" && /* @__PURE__ */ jsx26(ChevronDown, { className: "w-4 h-4 text-light" })
|
|
3842
4511
|
] })
|
|
3843
4512
|
]
|
|
3844
4513
|
}
|
|
3845
4514
|
) }, header.id)) }, headerGroup.id)) }),
|
|
3846
|
-
/* @__PURE__ */
|
|
4515
|
+
/* @__PURE__ */ jsx26("tbody", { className: "bg-light divide-y divide-border", children: table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx26("tr", { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx26("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsx26(Typography, { variant: "body-sm", children: flexRender(
|
|
3847
4516
|
cell.column.columnDef.cell,
|
|
3848
4517
|
cell.getContext()
|
|
3849
4518
|
) }) }, cell.id)) }, row.id)) })
|
|
3850
4519
|
] }) }),
|
|
3851
|
-
showPagination && /* @__PURE__ */
|
|
4520
|
+
showPagination && /* @__PURE__ */ jsxs18(
|
|
3852
4521
|
"div",
|
|
3853
4522
|
{
|
|
3854
4523
|
className: cn(
|
|
@@ -3856,9 +4525,9 @@ function Table({
|
|
|
3856
4525
|
paginationClassName
|
|
3857
4526
|
),
|
|
3858
4527
|
children: [
|
|
3859
|
-
/* @__PURE__ */
|
|
3860
|
-
/* @__PURE__ */
|
|
3861
|
-
/* @__PURE__ */
|
|
4528
|
+
/* @__PURE__ */ jsx26("div", { className: "flex items-center", children: /* @__PURE__ */ jsx26(Typography, { variant: "body-sm", className: "text-secondary", children: showingText }) }),
|
|
4529
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center space-x-1", children: [
|
|
4530
|
+
/* @__PURE__ */ jsx26(
|
|
3862
4531
|
Button,
|
|
3863
4532
|
{
|
|
3864
4533
|
variant: "ghost",
|
|
@@ -3866,7 +4535,7 @@ function Table({
|
|
|
3866
4535
|
onClick: handlePreviousPage,
|
|
3867
4536
|
disabled: !table.getCanPreviousPage(),
|
|
3868
4537
|
className: "p-2",
|
|
3869
|
-
children: /* @__PURE__ */
|
|
4538
|
+
children: /* @__PURE__ */ jsx26(ChevronLeft, { className: "w-4 h-4" })
|
|
3870
4539
|
}
|
|
3871
4540
|
),
|
|
3872
4541
|
Array.from(
|
|
@@ -3883,7 +4552,7 @@ function Table({
|
|
|
3883
4552
|
pageNumber = currentPage - 2 + i;
|
|
3884
4553
|
}
|
|
3885
4554
|
const isActive = pageNumber === currentPage;
|
|
3886
|
-
return /* @__PURE__ */
|
|
4555
|
+
return /* @__PURE__ */ jsx26(
|
|
3887
4556
|
Button,
|
|
3888
4557
|
{
|
|
3889
4558
|
variant: isActive ? "default" : "ghost",
|
|
@@ -3896,11 +4565,11 @@ function Table({
|
|
|
3896
4565
|
);
|
|
3897
4566
|
}
|
|
3898
4567
|
),
|
|
3899
|
-
table.getPageCount() > 5 && currentPage < totalPages - 3 && /* @__PURE__ */
|
|
3900
|
-
/* @__PURE__ */
|
|
3901
|
-
/* @__PURE__ */
|
|
4568
|
+
table.getPageCount() > 5 && currentPage < totalPages - 3 && /* @__PURE__ */ jsxs18(Fragment2, { children: [
|
|
4569
|
+
/* @__PURE__ */ jsx26("span", { className: "px-1 text-secondary", children: "..." }),
|
|
4570
|
+
/* @__PURE__ */ jsx26(Typography, { variant: "body-sm", className: "text-secondary", children: totalPages })
|
|
3902
4571
|
] }),
|
|
3903
|
-
/* @__PURE__ */
|
|
4572
|
+
/* @__PURE__ */ jsx26(
|
|
3904
4573
|
Button,
|
|
3905
4574
|
{
|
|
3906
4575
|
variant: "ghost",
|
|
@@ -3908,12 +4577,12 @@ function Table({
|
|
|
3908
4577
|
onClick: handleNextPage,
|
|
3909
4578
|
disabled: !table.getCanNextPage(),
|
|
3910
4579
|
className: "p-2",
|
|
3911
|
-
children: /* @__PURE__ */
|
|
4580
|
+
children: /* @__PURE__ */ jsx26(ChevronRight, { className: "w-4 h-4" })
|
|
3912
4581
|
}
|
|
3913
4582
|
)
|
|
3914
4583
|
] }),
|
|
3915
|
-
/* @__PURE__ */
|
|
3916
|
-
/* @__PURE__ */
|
|
4584
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-3 w-48", children: [
|
|
4585
|
+
/* @__PURE__ */ jsx26(
|
|
3917
4586
|
Typography,
|
|
3918
4587
|
{
|
|
3919
4588
|
variant: "body-sm",
|
|
@@ -3921,14 +4590,14 @@ function Table({
|
|
|
3921
4590
|
children: "Rows per page:"
|
|
3922
4591
|
}
|
|
3923
4592
|
),
|
|
3924
|
-
/* @__PURE__ */
|
|
4593
|
+
/* @__PURE__ */ jsxs18(
|
|
3925
4594
|
Select,
|
|
3926
4595
|
{
|
|
3927
4596
|
value: table.getState().pagination.pageSize.toString(),
|
|
3928
4597
|
onValueChange: handlePageSizeChange,
|
|
3929
4598
|
children: [
|
|
3930
|
-
/* @__PURE__ */
|
|
3931
|
-
/* @__PURE__ */
|
|
4599
|
+
/* @__PURE__ */ jsx26(SelectTrigger, { className: "min-w-0 h-8", children: /* @__PURE__ */ jsx26(SelectValue, {}) }),
|
|
4600
|
+
/* @__PURE__ */ jsx26(SelectContent, { children: [10, 20, 50, 100].map((size) => /* @__PURE__ */ jsx26(SelectItem, { value: size.toString(), children: size }, size)) })
|
|
3932
4601
|
]
|
|
3933
4602
|
}
|
|
3934
4603
|
)
|
|
@@ -3974,6 +4643,7 @@ export {
|
|
|
3974
4643
|
DatePicker,
|
|
3975
4644
|
Doc,
|
|
3976
4645
|
Dollar,
|
|
4646
|
+
Download,
|
|
3977
4647
|
DropdownMenu,
|
|
3978
4648
|
DropdownMenuCheckboxItem,
|
|
3979
4649
|
DropdownMenuContent,
|
|
@@ -4023,9 +4693,12 @@ export {
|
|
|
4023
4693
|
MagnifyingGlass,
|
|
4024
4694
|
Minus,
|
|
4025
4695
|
MoreMenu,
|
|
4696
|
+
Panel,
|
|
4697
|
+
PdfViewer,
|
|
4026
4698
|
Phone,
|
|
4027
4699
|
PieChart,
|
|
4028
4700
|
Plus,
|
|
4701
|
+
Print,
|
|
4029
4702
|
QuestionCircle,
|
|
4030
4703
|
Select,
|
|
4031
4704
|
SelectContent,
|
|
@@ -4039,6 +4712,17 @@ export {
|
|
|
4039
4712
|
SelectValue,
|
|
4040
4713
|
Separator2 as Separator,
|
|
4041
4714
|
Share,
|
|
4715
|
+
Sidebar,
|
|
4716
|
+
SidebarContent,
|
|
4717
|
+
SidebarFooter,
|
|
4718
|
+
SidebarGroup,
|
|
4719
|
+
SidebarGroupContent,
|
|
4720
|
+
SidebarHeader,
|
|
4721
|
+
SidebarInset,
|
|
4722
|
+
SidebarMenu,
|
|
4723
|
+
SidebarMenuButton,
|
|
4724
|
+
SidebarMenuItem,
|
|
4725
|
+
SidebarProvider,
|
|
4042
4726
|
Star,
|
|
4043
4727
|
Statement,
|
|
4044
4728
|
Table,
|
|
@@ -4048,8 +4732,12 @@ export {
|
|
|
4048
4732
|
TabsList,
|
|
4049
4733
|
TabsTrigger,
|
|
4050
4734
|
Textarea,
|
|
4735
|
+
Tooltip,
|
|
4051
4736
|
TooltipContainer,
|
|
4737
|
+
TooltipContent,
|
|
4052
4738
|
TooltipItem,
|
|
4739
|
+
TooltipProvider,
|
|
4740
|
+
TooltipTrigger,
|
|
4053
4741
|
Trash,
|
|
4054
4742
|
Typography,
|
|
4055
4743
|
Upload,
|
|
@@ -4074,8 +4762,10 @@ export {
|
|
|
4074
4762
|
getHeatmapColor,
|
|
4075
4763
|
getPerformanceColor,
|
|
4076
4764
|
getSeriesColor,
|
|
4765
|
+
initializePdfWorker,
|
|
4077
4766
|
selectTriggerVariants,
|
|
4078
4767
|
tabsVariants,
|
|
4079
4768
|
typographyVariants,
|
|
4080
|
-
uploadVariants
|
|
4769
|
+
uploadVariants,
|
|
4770
|
+
useSidebar
|
|
4081
4771
|
};
|