@northslopetech/altitude-ui 2.3.0 → 2.4.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.mjs CHANGED
@@ -1650,6 +1650,54 @@ 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
+ );
1653
1701
 
1654
1702
  // src/components/ui/select.tsx
1655
1703
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
@@ -2829,10 +2877,294 @@ var Badge = React9.forwardRef(
2829
2877
  );
2830
2878
  Badge.displayName = "Badge";
2831
2879
 
2832
- // src/components/ui/tabs.tsx
2880
+ // src/components/pdf-viewer/index.tsx
2881
+ import * as React14 from "react";
2882
+ import "react-pdf/dist/Page/TextLayer.css";
2883
+
2884
+ // src/components/pdf-viewer/components/PdfDocument.tsx
2833
2885
  import * as React10 from "react";
2834
- import { cva as cva9 } from "class-variance-authority";
2886
+ import { Document, Page } from "react-pdf";
2835
2887
  import { jsx as jsx13 } from "react/jsx-runtime";
2888
+ var PdfDocument = ({
2889
+ file,
2890
+ pageWidth,
2891
+ enableTextLayer,
2892
+ onLoadSuccess,
2893
+ onLoadError
2894
+ }) => {
2895
+ const [numPages, setNumPages] = React10.useState();
2896
+ function handleDocumentLoadSuccess({ numPages: numPages2 }) {
2897
+ setNumPages(numPages2);
2898
+ onLoadSuccess?.(numPages2);
2899
+ }
2900
+ if (!file) {
2901
+ return /* @__PURE__ */ jsx13("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx13(Typography, { variant: "body-md", className: "text-secondary", children: "No PDF available" }) });
2902
+ }
2903
+ return /* @__PURE__ */ jsx13(
2904
+ Document,
2905
+ {
2906
+ file,
2907
+ onLoadSuccess: handleDocumentLoadSuccess,
2908
+ onLoadError,
2909
+ loading: /* @__PURE__ */ jsx13("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx13(Typography, { variant: "body-md", className: "text-secondary", children: "Rendering PDF..." }) }),
2910
+ error: /* @__PURE__ */ jsx13("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx13(Typography, { variant: "body-md", className: "text-error", children: "Failed to render PDF" }) }),
2911
+ className: "flex flex-col items-center p-4",
2912
+ children: numPages && pageWidth > 0 && Array.from(new Array(numPages), (_, index) => /* @__PURE__ */ jsx13(
2913
+ Page,
2914
+ {
2915
+ pageNumber: index + 1,
2916
+ width: pageWidth,
2917
+ className: "mb-4 shadow-sm",
2918
+ renderTextLayer: enableTextLayer,
2919
+ renderAnnotationLayer: false
2920
+ },
2921
+ `page_${index + 1}`
2922
+ ))
2923
+ }
2924
+ );
2925
+ };
2926
+ PdfDocument.displayName = "PdfDocument";
2927
+
2928
+ // src/components/pdf-viewer/components/PdfHeader.tsx
2929
+ import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
2930
+ var PdfHeader = ({
2931
+ title,
2932
+ onDownload,
2933
+ onPrint
2934
+ }) => {
2935
+ return /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between gap-4 px-4 py-3 bg-neutral-400 border-b border-subtle", children: [
2936
+ /* @__PURE__ */ jsx14("div", { className: "flex-shrink min-w-0", children: /* @__PURE__ */ jsx14(
2937
+ Typography,
2938
+ {
2939
+ variant: "label-md-bold",
2940
+ className: "text-dark truncate",
2941
+ title,
2942
+ children: title || "Untitled Document"
2943
+ }
2944
+ ) }),
2945
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
2946
+ /* @__PURE__ */ jsx14(
2947
+ "button",
2948
+ {
2949
+ onClick: onDownload,
2950
+ className: "p-2 hover:bg-neutral-500 rounded transition-colors",
2951
+ "aria-label": "Download PDF",
2952
+ type: "button",
2953
+ children: /* @__PURE__ */ jsx14(Download, { variant: "dark", className: "w-5 h-5" })
2954
+ }
2955
+ ),
2956
+ /* @__PURE__ */ jsx14(
2957
+ "button",
2958
+ {
2959
+ onClick: onPrint,
2960
+ className: "p-2 hover:bg-neutral-500 rounded transition-colors",
2961
+ "aria-label": "Print PDF",
2962
+ type: "button",
2963
+ children: /* @__PURE__ */ jsx14(Print, { variant: "dark", className: "w-5 h-5" })
2964
+ }
2965
+ )
2966
+ ] })
2967
+ ] });
2968
+ };
2969
+ PdfHeader.displayName = "PdfHeader";
2970
+
2971
+ // src/components/pdf-viewer/hooks/useContainerWidth.ts
2972
+ import * as React11 from "react";
2973
+ function useContainerWidth(padding = 32) {
2974
+ const [containerWidth, setContainerWidth] = React11.useState(0);
2975
+ const containerRef = React11.useRef(null);
2976
+ const lastWidthRef = React11.useRef(0);
2977
+ React11.useEffect(() => {
2978
+ const element = containerRef.current;
2979
+ if (!element) return;
2980
+ const resizeObserver = new ResizeObserver((entries) => {
2981
+ for (const entry of entries) {
2982
+ const newWidth = entry.contentRect.width - padding;
2983
+ if (Math.abs(newWidth - lastWidthRef.current) > 1) {
2984
+ lastWidthRef.current = newWidth;
2985
+ setContainerWidth(newWidth);
2986
+ }
2987
+ }
2988
+ });
2989
+ resizeObserver.observe(element);
2990
+ const initialWidth = element.offsetWidth - padding;
2991
+ lastWidthRef.current = initialWidth;
2992
+ setContainerWidth(initialWidth);
2993
+ return () => {
2994
+ resizeObserver.disconnect();
2995
+ };
2996
+ }, [padding]);
2997
+ return { containerWidth, containerRef };
2998
+ }
2999
+
3000
+ // src/components/pdf-viewer/hooks/usePdfDownload.ts
3001
+ import * as React12 from "react";
3002
+ function usePdfDownload(file, title) {
3003
+ const download = React12.useCallback(async () => {
3004
+ if (!file) return;
3005
+ try {
3006
+ let blob;
3007
+ let filename;
3008
+ if (typeof file === "string") {
3009
+ const response = await fetch(file);
3010
+ blob = await response.blob();
3011
+ filename = title || "document.pdf";
3012
+ } else {
3013
+ blob = file;
3014
+ filename = title || file.name || "document.pdf";
3015
+ }
3016
+ const url = URL.createObjectURL(blob);
3017
+ const link = document.createElement("a");
3018
+ link.href = url;
3019
+ link.download = filename;
3020
+ link.style.display = "none";
3021
+ document.body.appendChild(link);
3022
+ link.click();
3023
+ setTimeout(() => {
3024
+ document.body.removeChild(link);
3025
+ URL.revokeObjectURL(url);
3026
+ }, 100);
3027
+ } catch (error) {
3028
+ console.error("Failed to download PDF:", error);
3029
+ }
3030
+ }, [file, title]);
3031
+ return download;
3032
+ }
3033
+
3034
+ // src/components/pdf-viewer/hooks/usePdfPrint.ts
3035
+ import * as React13 from "react";
3036
+ function usePdfPrint(file) {
3037
+ const [printBlobUrl, setPrintBlobUrl] = React13.useState(null);
3038
+ const printFrameRef = React13.useRef(null);
3039
+ const preparePrint = React13.useCallback(async () => {
3040
+ if (!file) return;
3041
+ try {
3042
+ let blob;
3043
+ if (typeof file === "string") {
3044
+ const response = await fetch(file);
3045
+ blob = await response.blob();
3046
+ } else {
3047
+ blob = file;
3048
+ }
3049
+ const url = URL.createObjectURL(blob);
3050
+ setPrintBlobUrl(url);
3051
+ } catch (error) {
3052
+ console.error("Failed to prepare PDF for printing:", error);
3053
+ }
3054
+ }, [file]);
3055
+ React13.useEffect(() => {
3056
+ return () => {
3057
+ if (printBlobUrl) {
3058
+ URL.revokeObjectURL(printBlobUrl);
3059
+ }
3060
+ };
3061
+ }, [printBlobUrl]);
3062
+ const print = React13.useCallback(() => {
3063
+ if (printFrameRef.current?.contentWindow) {
3064
+ printFrameRef.current.contentWindow.print();
3065
+ }
3066
+ }, []);
3067
+ return { printFrameRef, printBlobUrl, preparePrint, print };
3068
+ }
3069
+
3070
+ // src/components/pdf-viewer/utils/pdfWorker.ts
3071
+ import { pdfjs } from "react-pdf";
3072
+ function initializePdfWorker(workerUrl) {
3073
+ pdfjs.GlobalWorkerOptions.workerSrc = workerUrl;
3074
+ }
3075
+
3076
+ // src/components/pdf-viewer/index.tsx
3077
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
3078
+ var PdfViewer = React14.forwardRef(
3079
+ ({
3080
+ file,
3081
+ title,
3082
+ pageWidth,
3083
+ onDownload,
3084
+ onPrint,
3085
+ onLoadSuccess,
3086
+ onError,
3087
+ enableTextLayer = false,
3088
+ className,
3089
+ ...props
3090
+ }, ref) => {
3091
+ const { containerWidth, containerRef } = useContainerWidth();
3092
+ const { printFrameRef, printBlobUrl, preparePrint, print } = usePdfPrint(file);
3093
+ const download = usePdfDownload(file, title);
3094
+ const effectiveWidth = pageWidth || containerWidth;
3095
+ const handleLoadSuccess = React14.useCallback(
3096
+ async (numPages) => {
3097
+ onLoadSuccess?.(numPages);
3098
+ await preparePrint();
3099
+ },
3100
+ [onLoadSuccess, preparePrint]
3101
+ );
3102
+ const handleDownload = React14.useCallback(() => {
3103
+ if (onDownload) {
3104
+ onDownload();
3105
+ return;
3106
+ }
3107
+ download();
3108
+ }, [onDownload, download]);
3109
+ const handlePrint = React14.useCallback(() => {
3110
+ if (onPrint) {
3111
+ onPrint();
3112
+ return;
3113
+ }
3114
+ print();
3115
+ }, [onPrint, print]);
3116
+ return /* @__PURE__ */ jsxs9(
3117
+ "div",
3118
+ {
3119
+ ref,
3120
+ className: cn("h-full flex flex-col", className),
3121
+ ...props,
3122
+ children: [
3123
+ printBlobUrl && /* @__PURE__ */ jsx15(
3124
+ "iframe",
3125
+ {
3126
+ ref: printFrameRef,
3127
+ src: printBlobUrl,
3128
+ style: { display: "none" },
3129
+ title: "PDF for printing"
3130
+ }
3131
+ ),
3132
+ /* @__PURE__ */ jsx15(
3133
+ PdfHeader,
3134
+ {
3135
+ title,
3136
+ onDownload: handleDownload,
3137
+ onPrint: handlePrint
3138
+ }
3139
+ ),
3140
+ /* @__PURE__ */ jsx15(
3141
+ "div",
3142
+ {
3143
+ ref: containerRef,
3144
+ className: "flex-1 overflow-y-auto overflow-x-hidden bg-neutral-300",
3145
+ children: /* @__PURE__ */ jsx15(
3146
+ PdfDocument,
3147
+ {
3148
+ file,
3149
+ pageWidth: effectiveWidth,
3150
+ enableTextLayer,
3151
+ onLoadSuccess: handleLoadSuccess,
3152
+ onLoadError: onError
3153
+ }
3154
+ )
3155
+ }
3156
+ )
3157
+ ]
3158
+ }
3159
+ );
3160
+ }
3161
+ );
3162
+ PdfViewer.displayName = "PdfViewer";
3163
+
3164
+ // src/components/ui/tabs.tsx
3165
+ import * as React15 from "react";
3166
+ import { cva as cva9 } from "class-variance-authority";
3167
+ import { jsx as jsx16 } from "react/jsx-runtime";
2836
3168
  var tabsVariants = cva9(
2837
3169
  "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
3170
  {
@@ -2846,17 +3178,17 @@ var tabsVariants = cva9(
2846
3178
  }
2847
3179
  }
2848
3180
  );
2849
- var TabsContext = React10.createContext(
3181
+ var TabsContext = React15.createContext(
2850
3182
  void 0
2851
3183
  );
2852
3184
  function useTabsContext() {
2853
- const context = React10.useContext(TabsContext);
3185
+ const context = React15.useContext(TabsContext);
2854
3186
  if (!context) {
2855
3187
  throw new Error("Tabs components must be used within a Tabs provider");
2856
3188
  }
2857
3189
  return context;
2858
3190
  }
2859
- var Tabs = React10.forwardRef((props, ref) => {
3191
+ var Tabs = React15.forwardRef((props, ref) => {
2860
3192
  const {
2861
3193
  className,
2862
3194
  value,
@@ -2865,7 +3197,7 @@ var Tabs = React10.forwardRef((props, ref) => {
2865
3197
  children,
2866
3198
  ...restProps
2867
3199
  } = props;
2868
- const contextValue = React10.useMemo(
3200
+ const contextValue = React15.useMemo(
2869
3201
  () => ({
2870
3202
  activeTab: value,
2871
3203
  setActiveTab: onValueChange,
@@ -2873,13 +3205,13 @@ var Tabs = React10.forwardRef((props, ref) => {
2873
3205
  }),
2874
3206
  [value, onValueChange, variant]
2875
3207
  );
2876
- return /* @__PURE__ */ jsx13(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx13("div", { ref, className: cn("w-full", className), ...restProps, children }) });
3208
+ return /* @__PURE__ */ jsx16(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx16("div", { ref, className: cn("w-full", className), ...restProps, children }) });
2877
3209
  });
2878
3210
  Tabs.displayName = "Tabs";
2879
- var TabsList = React10.forwardRef(
3211
+ var TabsList = React15.forwardRef(
2880
3212
  (props, ref) => {
2881
3213
  const { className, children, ...restProps } = props;
2882
- return /* @__PURE__ */ jsx13(
3214
+ return /* @__PURE__ */ jsx16(
2883
3215
  "div",
2884
3216
  {
2885
3217
  ref,
@@ -2895,7 +3227,7 @@ TabsList.displayName = "TabsList";
2895
3227
  var getTabTypographyStyles = (isActive) => ({
2896
3228
  font: isActive ? "var(--typography-label-sm-bold)" : "var(--typography-label-sm-regular)"
2897
3229
  });
2898
- var TabsTrigger = React10.forwardRef(
3230
+ var TabsTrigger = React15.forwardRef(
2899
3231
  (props, ref) => {
2900
3232
  const { className, value, disabled, style, children, ...restProps } = props;
2901
3233
  const { activeTab, setActiveTab, variant } = useTabsContext();
@@ -2903,22 +3235,22 @@ var TabsTrigger = React10.forwardRef(
2903
3235
  throw new Error("TabsTrigger must have a value prop");
2904
3236
  }
2905
3237
  const isActive = activeTab === value;
2906
- const tokenStyles = React10.useMemo(
3238
+ const tokenStyles = React15.useMemo(
2907
3239
  () => ({
2908
3240
  ...getTabTypographyStyles(isActive),
2909
3241
  ...style
2910
3242
  }),
2911
3243
  [isActive, style]
2912
3244
  );
2913
- const triggerClassName = React10.useMemo(
3245
+ const triggerClassName = React15.useMemo(
2914
3246
  () => cn(tabsVariants({ variant }), className),
2915
3247
  [variant, className]
2916
3248
  );
2917
- const handleClick = React10.useCallback(() => {
3249
+ const handleClick = React15.useCallback(() => {
2918
3250
  if (disabled) return;
2919
3251
  setActiveTab(value);
2920
3252
  }, [disabled, setActiveTab, value]);
2921
- return /* @__PURE__ */ jsx13(
3253
+ return /* @__PURE__ */ jsx16(
2922
3254
  "button",
2923
3255
  {
2924
3256
  ref,
@@ -2932,13 +3264,13 @@ var TabsTrigger = React10.forwardRef(
2932
3264
  disabled,
2933
3265
  onClick: handleClick,
2934
3266
  ...restProps,
2935
- children: /* @__PURE__ */ jsx13("span", { className: "pl-3 pr-6 py-2", children })
3267
+ children: /* @__PURE__ */ jsx16("span", { className: "pl-3 pr-6 py-2", children })
2936
3268
  }
2937
3269
  );
2938
3270
  }
2939
3271
  );
2940
3272
  TabsTrigger.displayName = "TabsTrigger";
2941
- var TabsContent = React10.forwardRef(
3273
+ var TabsContent = React15.forwardRef(
2942
3274
  (props, ref) => {
2943
3275
  const { className, value, children, ...restProps } = props;
2944
3276
  const { activeTab } = useTabsContext();
@@ -2949,7 +3281,7 @@ var TabsContent = React10.forwardRef(
2949
3281
  if (!isActive) {
2950
3282
  return null;
2951
3283
  }
2952
- return /* @__PURE__ */ jsx13(
3284
+ return /* @__PURE__ */ jsx16(
2953
3285
  "div",
2954
3286
  {
2955
3287
  ref,
@@ -2967,11 +3299,11 @@ var TabsContent = React10.forwardRef(
2967
3299
  TabsContent.displayName = "TabsContent";
2968
3300
 
2969
3301
  // src/components/ui/dropdown-menu.tsx
2970
- import * as React11 from "react";
3302
+ import * as React16 from "react";
2971
3303
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
2972
- import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
3304
+ import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
2973
3305
  var DropdownMenu = DropdownMenuPrimitive.Root;
2974
- var DropdownMenuTrigger = React11.forwardRef(({ className, icon, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
3306
+ var DropdownMenuTrigger = React16.forwardRef(({ className, icon, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
2975
3307
  DropdownMenuPrimitive.Trigger,
2976
3308
  {
2977
3309
  ref,
@@ -2981,7 +3313,7 @@ var DropdownMenuTrigger = React11.forwardRef(({ className, icon, children, ...pr
2981
3313
  ),
2982
3314
  ...props,
2983
3315
  children: [
2984
- icon || /* @__PURE__ */ jsx14(MoreMenu, { className: "size-4" }),
3316
+ icon || /* @__PURE__ */ jsx17(MoreMenu, { className: "size-4" }),
2985
3317
  children
2986
3318
  ]
2987
3319
  }
@@ -2991,7 +3323,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
2991
3323
  var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
2992
3324
  var DropdownMenuSub = DropdownMenuPrimitive.Sub;
2993
3325
  var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
2994
- var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
3326
+ var DropdownMenuSubTrigger = React16.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
2995
3327
  DropdownMenuPrimitive.SubTrigger,
2996
3328
  {
2997
3329
  ref,
@@ -3004,12 +3336,12 @@ var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, .
3004
3336
  ...props,
3005
3337
  children: [
3006
3338
  children,
3007
- /* @__PURE__ */ jsx14(ChevronRight, { className: "ml-auto" })
3339
+ /* @__PURE__ */ jsx17(ChevronRight, { className: "ml-auto" })
3008
3340
  ]
3009
3341
  }
3010
3342
  ));
3011
3343
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
3012
- var DropdownMenuSubContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
3344
+ var DropdownMenuSubContent = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
3013
3345
  DropdownMenuPrimitive.SubContent,
3014
3346
  {
3015
3347
  ref,
@@ -3021,7 +3353,7 @@ var DropdownMenuSubContent = React11.forwardRef(({ className, ...props }, ref) =
3021
3353
  }
3022
3354
  ));
3023
3355
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
3024
- var DropdownMenuContent = React11.forwardRef(({ className, sideOffset = 4, align = "end", ...props }, ref) => /* @__PURE__ */ jsx14(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx14(
3356
+ var DropdownMenuContent = React16.forwardRef(({ className, sideOffset = 4, align = "end", ...props }, ref) => /* @__PURE__ */ jsx17(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx17(
3025
3357
  DropdownMenuPrimitive.Content,
3026
3358
  {
3027
3359
  ref,
@@ -3035,7 +3367,7 @@ var DropdownMenuContent = React11.forwardRef(({ className, sideOffset = 4, align
3035
3367
  }
3036
3368
  ) }));
3037
3369
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
3038
- var DropdownMenuItem = React11.forwardRef(({ className, inset, style, ...props }, ref) => /* @__PURE__ */ jsx14(
3370
+ var DropdownMenuItem = React16.forwardRef(({ className, inset, style, ...props }, ref) => /* @__PURE__ */ jsx17(
3039
3371
  DropdownMenuPrimitive.Item,
3040
3372
  {
3041
3373
  ref,
@@ -3052,7 +3384,7 @@ var DropdownMenuItem = React11.forwardRef(({ className, inset, style, ...props }
3052
3384
  }
3053
3385
  ));
3054
3386
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
3055
- var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, style, checked, ...props }, ref) => /* @__PURE__ */ jsxs8(
3387
+ var DropdownMenuCheckboxItem = React16.forwardRef(({ className, children, style, checked, ...props }, ref) => /* @__PURE__ */ jsxs10(
3056
3388
  DropdownMenuPrimitive.CheckboxItem,
3057
3389
  {
3058
3390
  ref,
@@ -3067,7 +3399,7 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, style,
3067
3399
  },
3068
3400
  ...props,
3069
3401
  children: [
3070
- /* @__PURE__ */ jsx14(
3402
+ /* @__PURE__ */ jsx17(
3071
3403
  Checkbox,
3072
3404
  {
3073
3405
  checked: checked === true,
@@ -3075,12 +3407,12 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, style,
3075
3407
  "aria-hidden": "true"
3076
3408
  }
3077
3409
  ),
3078
- /* @__PURE__ */ jsx14("span", { className: "flex-1", children })
3410
+ /* @__PURE__ */ jsx17("span", { className: "flex-1", children })
3079
3411
  ]
3080
3412
  }
3081
3413
  ));
3082
3414
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
3083
- var DropdownMenuRadioItem = React11.forwardRef(({ className, children, style, ...props }, ref) => /* @__PURE__ */ jsxs8(
3415
+ var DropdownMenuRadioItem = React16.forwardRef(({ className, children, style, ...props }, ref) => /* @__PURE__ */ jsxs10(
3084
3416
  DropdownMenuPrimitive.RadioItem,
3085
3417
  {
3086
3418
  ref,
@@ -3094,13 +3426,13 @@ var DropdownMenuRadioItem = React11.forwardRef(({ className, children, style, ..
3094
3426
  },
3095
3427
  ...props,
3096
3428
  children: [
3097
- /* @__PURE__ */ jsx14("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx14(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx14("span", { className: "h-2 w-2 rounded-full bg-current" }) }) }),
3429
+ /* @__PURE__ */ jsx17("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx17(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx17("span", { className: "h-2 w-2 rounded-full bg-current" }) }) }),
3098
3430
  children
3099
3431
  ]
3100
3432
  }
3101
3433
  ));
3102
3434
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
3103
- var DropdownMenuLabel = React11.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx14(
3435
+ var DropdownMenuLabel = React16.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx17(
3104
3436
  DropdownMenuPrimitive.Label,
3105
3437
  {
3106
3438
  ref,
@@ -3113,7 +3445,7 @@ var DropdownMenuLabel = React11.forwardRef(({ className, inset, ...props }, ref)
3113
3445
  }
3114
3446
  ));
3115
3447
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
3116
- var DropdownMenuSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
3448
+ var DropdownMenuSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
3117
3449
  DropdownMenuPrimitive.Separator,
3118
3450
  {
3119
3451
  ref,
@@ -3126,7 +3458,7 @@ var DropdownMenuShortcut = ({
3126
3458
  className,
3127
3459
  ...props
3128
3460
  }) => {
3129
- return /* @__PURE__ */ jsx14(
3461
+ return /* @__PURE__ */ jsx17(
3130
3462
  "span",
3131
3463
  {
3132
3464
  className: cn("ml-auto text-xs tracking-widest opacity-60", className),
@@ -3137,21 +3469,21 @@ var DropdownMenuShortcut = ({
3137
3469
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
3138
3470
 
3139
3471
  // src/components/ui/charts/chart-legend.tsx
3140
- import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
3472
+ import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
3141
3473
  function ChartLegend({
3142
3474
  items,
3143
3475
  x = 0,
3144
3476
  y = 550,
3145
3477
  className = ""
3146
3478
  }) {
3147
- return /* @__PURE__ */ jsx15("foreignObject", { x, y, width: "100%", height: "40", children: /* @__PURE__ */ jsx15(
3479
+ return /* @__PURE__ */ jsx18("foreignObject", { x, y, width: "100%", height: "40", children: /* @__PURE__ */ jsx18(
3148
3480
  "div",
3149
3481
  {
3150
3482
  className: `flex justify-center items-center gap-6 ${className}`,
3151
3483
  style: { height: "100%" },
3152
- children: items.map(({ key, color, label }) => /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
3153
- /* @__PURE__ */ jsx15("div", { className: "w-3 h-3", style: { backgroundColor: color } }),
3154
- /* @__PURE__ */ jsx15(Typography, { variant: "body-xs", children: label || key })
3484
+ children: items.map(({ key, color, label }) => /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2", children: [
3485
+ /* @__PURE__ */ jsx18("div", { className: "w-3 h-3", style: { backgroundColor: color } }),
3486
+ /* @__PURE__ */ jsx18(Typography, { variant: "body-xs", children: label || key })
3155
3487
  ] }, key))
3156
3488
  }
3157
3489
  ) });
@@ -3269,12 +3601,12 @@ var formatLargeNumber = (value) => {
3269
3601
  };
3270
3602
 
3271
3603
  // src/components/ui/charts/chart-labels.tsx
3272
- import { jsx as jsx16 } from "react/jsx-runtime";
3604
+ import { jsx as jsx19 } from "react/jsx-runtime";
3273
3605
  var createCustomXAxisLabel = (text, yOffset = 40) => {
3274
3606
  const CustomXAxisLabel = ({ viewBox }) => {
3275
3607
  if (!viewBox) return null;
3276
3608
  const { x, y, width } = viewBox;
3277
- return /* @__PURE__ */ jsx16("g", { children: /* @__PURE__ */ jsx16("foreignObject", { x, y: y + yOffset, width, height: 20, children: /* @__PURE__ */ jsx16("div", { className: "flex justify-center w-full", children: /* @__PURE__ */ jsx16(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
3609
+ return /* @__PURE__ */ jsx19("g", { children: /* @__PURE__ */ jsx19("foreignObject", { x, y: y + yOffset, width, height: 20, children: /* @__PURE__ */ jsx19("div", { className: "flex justify-center w-full", children: /* @__PURE__ */ jsx19(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
3278
3610
  };
3279
3611
  CustomXAxisLabel.displayName = "CustomXAxisLabel";
3280
3612
  return CustomXAxisLabel;
@@ -3284,7 +3616,7 @@ var createCustomYAxisLabel = (text, leftMargin) => {
3284
3616
  if (!viewBox) return null;
3285
3617
  const { x, y, height } = viewBox;
3286
3618
  const offset = leftMargin ? leftMargin + 10 : 110;
3287
- return /* @__PURE__ */ jsx16("g", { children: /* @__PURE__ */ jsx16("foreignObject", { x: x - offset, y, width: 100, height, children: /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center h-full transform -rotate-90 whitespace-nowrap", children: /* @__PURE__ */ jsx16(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
3619
+ return /* @__PURE__ */ jsx19("g", { children: /* @__PURE__ */ jsx19("foreignObject", { x: x - offset, y, width: 100, height, children: /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center h-full transform -rotate-90 whitespace-nowrap", children: /* @__PURE__ */ jsx19(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
3288
3620
  };
3289
3621
  CustomYAxisLabel.displayName = "CustomYAxisLabel";
3290
3622
  return CustomYAxisLabel;
@@ -3293,14 +3625,14 @@ var createCustomYAxisRightLabel = (text) => {
3293
3625
  const CustomYAxisRightLabel = ({ viewBox }) => {
3294
3626
  if (!viewBox) return null;
3295
3627
  const { x, y, width, height } = viewBox;
3296
- return /* @__PURE__ */ jsx16("g", { children: /* @__PURE__ */ jsx16("foreignObject", { x: x + width - 70, y, width: 120, height, children: /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center h-full transform rotate-90 whitespace-nowrap", children: /* @__PURE__ */ jsx16(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
3628
+ return /* @__PURE__ */ jsx19("g", { children: /* @__PURE__ */ jsx19("foreignObject", { x: x + width - 70, y, width: 120, height, children: /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center h-full transform rotate-90 whitespace-nowrap", children: /* @__PURE__ */ jsx19(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
3297
3629
  };
3298
3630
  CustomYAxisRightLabel.displayName = "CustomYAxisRightLabel";
3299
3631
  return CustomYAxisRightLabel;
3300
3632
  };
3301
3633
  var customXAxisTick = (props) => {
3302
3634
  const { x, y, payload } = props;
3303
- return /* @__PURE__ */ jsx16("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx16(
3635
+ return /* @__PURE__ */ jsx19("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx19(
3304
3636
  "foreignObject",
3305
3637
  {
3306
3638
  x: -20,
@@ -3308,12 +3640,12 @@ var customXAxisTick = (props) => {
3308
3640
  width: 40,
3309
3641
  height: 20,
3310
3642
  style: { overflow: "visible" },
3311
- children: /* @__PURE__ */ jsx16(
3643
+ children: /* @__PURE__ */ jsx19(
3312
3644
  "div",
3313
3645
  {
3314
3646
  className: "flex items-start justify-center h-full",
3315
3647
  style: { overflow: "visible" },
3316
- children: /* @__PURE__ */ jsx16(
3648
+ children: /* @__PURE__ */ jsx19(
3317
3649
  Typography,
3318
3650
  {
3319
3651
  variant: "body-xs",
@@ -3328,7 +3660,7 @@ var customXAxisTick = (props) => {
3328
3660
  };
3329
3661
  var customXAxisTickRotated = (props) => {
3330
3662
  const { x, y, payload } = props;
3331
- return /* @__PURE__ */ jsx16("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx16(
3663
+ return /* @__PURE__ */ jsx19("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx19(
3332
3664
  "text",
3333
3665
  {
3334
3666
  x: 0,
@@ -3347,25 +3679,25 @@ var customYAxisTick = (props) => {
3347
3679
  const { x, y, payload } = props;
3348
3680
  const text = String(payload.value);
3349
3681
  const estimatedWidth = Math.max(text.length * 8, 80);
3350
- return /* @__PURE__ */ jsx16(
3682
+ return /* @__PURE__ */ jsx19(
3351
3683
  "foreignObject",
3352
3684
  {
3353
3685
  x: x - estimatedWidth + 5,
3354
3686
  y: y - 6,
3355
3687
  width: estimatedWidth,
3356
3688
  height: 15,
3357
- children: /* @__PURE__ */ jsx16("div", { className: "flex justify-end w-full", children: /* @__PURE__ */ jsx16(Typography, { variant: "body-xs", className: "text-secondary", children: payload.value }) })
3689
+ children: /* @__PURE__ */ jsx19("div", { className: "flex justify-end w-full", children: /* @__PURE__ */ jsx19(Typography, { variant: "body-xs", className: "text-secondary", children: payload.value }) })
3358
3690
  }
3359
3691
  );
3360
3692
  };
3361
3693
 
3362
3694
  // src/components/ui/charts/chart-tooltip.tsx
3363
- import { Fragment, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
3695
+ import { Fragment, jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
3364
3696
  function TooltipContainer({
3365
3697
  children,
3366
3698
  className = ""
3367
3699
  }) {
3368
- return /* @__PURE__ */ jsx17(
3700
+ return /* @__PURE__ */ jsx20(
3369
3701
  "div",
3370
3702
  {
3371
3703
  className: `bg-light border border-subtle rounded p-2.5 text-dark ${className}`,
@@ -3379,10 +3711,10 @@ function TooltipItem({
3379
3711
  value,
3380
3712
  className = ""
3381
3713
  }) {
3382
- return /* @__PURE__ */ jsxs10(Fragment, { children: [
3383
- /* @__PURE__ */ jsx17("br", {}),
3384
- /* @__PURE__ */ jsxs10(Typography, { variant: "label-sm", className, children: [
3385
- /* @__PURE__ */ jsx17(
3714
+ return /* @__PURE__ */ jsxs12(Fragment, { children: [
3715
+ /* @__PURE__ */ jsx20("br", {}),
3716
+ /* @__PURE__ */ jsxs12(Typography, { variant: "label-sm", className, children: [
3717
+ /* @__PURE__ */ jsx20(
3386
3718
  "span",
3387
3719
  {
3388
3720
  className: "inline-block w-3 h-3 mr-1.5",
@@ -3400,9 +3732,9 @@ function GenericTooltip({
3400
3732
  items,
3401
3733
  className = ""
3402
3734
  }) {
3403
- return /* @__PURE__ */ jsxs10(TooltipContainer, { className, children: [
3404
- title && /* @__PURE__ */ jsx17(Typography, { variant: "label-sm-bold", children: title }),
3405
- items.map((item, index) => /* @__PURE__ */ jsx17(
3735
+ return /* @__PURE__ */ jsxs12(TooltipContainer, { className, children: [
3736
+ title && /* @__PURE__ */ jsx20(Typography, { variant: "label-sm-bold", children: title }),
3737
+ items.map((item, index) => /* @__PURE__ */ jsx20(
3406
3738
  TooltipItem,
3407
3739
  {
3408
3740
  color: item.color,
@@ -3415,7 +3747,7 @@ function GenericTooltip({
3415
3747
  }
3416
3748
 
3417
3749
  // src/components/ui/charts/bar-chart.tsx
3418
- import { forwardRef as forwardRef12 } from "react";
3750
+ import { forwardRef as forwardRef13 } from "react";
3419
3751
  import {
3420
3752
  BarChart as RechartsBarChart,
3421
3753
  Bar,
@@ -3424,8 +3756,8 @@ import {
3424
3756
  Tooltip,
3425
3757
  ResponsiveContainer
3426
3758
  } from "recharts";
3427
- import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
3428
- var BarChart = forwardRef12(
3759
+ import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
3760
+ var BarChart = forwardRef13(
3429
3761
  ({
3430
3762
  data,
3431
3763
  xAxisKey,
@@ -3451,19 +3783,19 @@ var BarChart = forwardRef12(
3451
3783
  };
3452
3784
  const defaultLegendItems = showLegend && legendItems.length === 0 ? [{ key: yAxisKey, color: barColor, label: yAxisKey }] : legendItems;
3453
3785
  const hasData = data && data.length > 0;
3454
- return /* @__PURE__ */ jsxs11(
3786
+ return /* @__PURE__ */ jsxs13(
3455
3787
  "div",
3456
3788
  {
3457
3789
  ref,
3458
3790
  className: `bg-light border border-subtle mx-6 ${className}`,
3459
3791
  children: [
3460
- /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx18(Typography, { variant: "label-sm-bold", children: title }) }),
3461
- /* @__PURE__ */ jsx18("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx18(
3792
+ /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx21(Typography, { variant: "label-sm-bold", children: title }) }),
3793
+ /* @__PURE__ */ jsx21("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx21(
3462
3794
  ResponsiveContainer,
3463
3795
  {
3464
3796
  width: "100%",
3465
3797
  height: CHART_CONSTANTS.STANDARD_HEIGHT,
3466
- children: /* @__PURE__ */ jsxs11(
3798
+ children: /* @__PURE__ */ jsxs13(
3467
3799
  RechartsBarChart,
3468
3800
  {
3469
3801
  data,
@@ -3475,7 +3807,7 @@ var BarChart = forwardRef12(
3475
3807
  onClick: handleClick,
3476
3808
  layout,
3477
3809
  children: [
3478
- /* @__PURE__ */ jsx18(
3810
+ /* @__PURE__ */ jsx21(
3479
3811
  XAxis,
3480
3812
  {
3481
3813
  dataKey: xAxisKey,
@@ -3489,7 +3821,7 @@ var BarChart = forwardRef12(
3489
3821
  label: xAxisLabel ? createCustomXAxisLabel(xAxisLabel, 80) : void 0
3490
3822
  }
3491
3823
  ),
3492
- /* @__PURE__ */ jsx18(
3824
+ /* @__PURE__ */ jsx21(
3493
3825
  YAxis,
3494
3826
  {
3495
3827
  axisLine: false,
@@ -3500,7 +3832,7 @@ var BarChart = forwardRef12(
3500
3832
  type: yAxisType
3501
3833
  }
3502
3834
  ),
3503
- /* @__PURE__ */ jsx18(
3835
+ /* @__PURE__ */ jsx21(
3504
3836
  Tooltip,
3505
3837
  {
3506
3838
  content: ({
@@ -3509,7 +3841,7 @@ var BarChart = forwardRef12(
3509
3841
  label
3510
3842
  }) => {
3511
3843
  if (active && payload && payload.length) {
3512
- return /* @__PURE__ */ jsx18(
3844
+ return /* @__PURE__ */ jsx21(
3513
3845
  GenericTooltip,
3514
3846
  {
3515
3847
  title: label?.toString(),
@@ -3525,7 +3857,7 @@ var BarChart = forwardRef12(
3525
3857
  }
3526
3858
  }
3527
3859
  ),
3528
- /* @__PURE__ */ jsx18(
3860
+ /* @__PURE__ */ jsx21(
3529
3861
  Bar,
3530
3862
  {
3531
3863
  dataKey: barDataKey || yAxisKey,
@@ -3533,12 +3865,12 @@ var BarChart = forwardRef12(
3533
3865
  name: barDataKey || yAxisKey
3534
3866
  }
3535
3867
  ),
3536
- showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx18(ChartLegend, { items: defaultLegendItems })
3868
+ showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx21(ChartLegend, { items: defaultLegendItems })
3537
3869
  ]
3538
3870
  }
3539
3871
  )
3540
3872
  }
3541
- ) : /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx18(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
3873
+ ) : /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx21(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
3542
3874
  ]
3543
3875
  }
3544
3876
  );
@@ -3547,7 +3879,7 @@ var BarChart = forwardRef12(
3547
3879
  BarChart.displayName = "BarChart";
3548
3880
 
3549
3881
  // src/components/ui/charts/line-chart.tsx
3550
- import { forwardRef as forwardRef13 } from "react";
3882
+ import { forwardRef as forwardRef14 } from "react";
3551
3883
  import {
3552
3884
  LineChart as RechartsLineChart,
3553
3885
  Line,
@@ -3556,8 +3888,8 @@ import {
3556
3888
  Tooltip as Tooltip2,
3557
3889
  ResponsiveContainer as ResponsiveContainer2
3558
3890
  } from "recharts";
3559
- import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
3560
- var LineChart = forwardRef13(
3891
+ import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
3892
+ var LineChart = forwardRef14(
3561
3893
  ({
3562
3894
  data,
3563
3895
  xAxisKey,
@@ -3585,19 +3917,19 @@ var LineChart = forwardRef13(
3585
3917
  )
3586
3918
  );
3587
3919
  const hasData = data && data.length > 0;
3588
- return /* @__PURE__ */ jsxs12(
3920
+ return /* @__PURE__ */ jsxs14(
3589
3921
  "div",
3590
3922
  {
3591
3923
  ref,
3592
3924
  className: `bg-light border border-subtle mx-6 ${className}`,
3593
3925
  children: [
3594
- /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx19(Typography, { variant: "label-sm-bold", children: title }) }),
3595
- /* @__PURE__ */ jsx19("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx19(
3926
+ /* @__PURE__ */ jsx22("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx22(Typography, { variant: "label-sm-bold", children: title }) }),
3927
+ /* @__PURE__ */ jsx22("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx22(
3596
3928
  ResponsiveContainer2,
3597
3929
  {
3598
3930
  width: "100%",
3599
3931
  height: CHART_CONSTANTS.STANDARD_HEIGHT,
3600
- children: /* @__PURE__ */ jsxs12(
3932
+ children: /* @__PURE__ */ jsxs14(
3601
3933
  RechartsLineChart,
3602
3934
  {
3603
3935
  data,
@@ -3608,7 +3940,7 @@ var LineChart = forwardRef13(
3608
3940
  },
3609
3941
  onClick: handleClick,
3610
3942
  children: [
3611
- /* @__PURE__ */ jsx19(
3943
+ /* @__PURE__ */ jsx22(
3612
3944
  XAxis2,
3613
3945
  {
3614
3946
  dataKey: xAxisKey,
@@ -3620,7 +3952,7 @@ var LineChart = forwardRef13(
3620
3952
  label: xAxisLabel ? createCustomXAxisLabel(xAxisLabel) : void 0
3621
3953
  }
3622
3954
  ),
3623
- /* @__PURE__ */ jsx19(
3955
+ /* @__PURE__ */ jsx22(
3624
3956
  YAxis2,
3625
3957
  {
3626
3958
  axisLine: false,
@@ -3629,7 +3961,7 @@ var LineChart = forwardRef13(
3629
3961
  label: yAxisLabel ? createCustomYAxisLabel(yAxisLabel, 40) : void 0
3630
3962
  }
3631
3963
  ),
3632
- /* @__PURE__ */ jsx19(
3964
+ /* @__PURE__ */ jsx22(
3633
3965
  Tooltip2,
3634
3966
  {
3635
3967
  content: ({
@@ -3638,7 +3970,7 @@ var LineChart = forwardRef13(
3638
3970
  label
3639
3971
  }) => {
3640
3972
  if (active && payload && payload.length) {
3641
- return /* @__PURE__ */ jsx19(
3973
+ return /* @__PURE__ */ jsx22(
3642
3974
  GenericTooltip,
3643
3975
  {
3644
3976
  title: label?.toString(),
@@ -3654,7 +3986,7 @@ var LineChart = forwardRef13(
3654
3986
  }
3655
3987
  }
3656
3988
  ),
3657
- series.map((s, index) => /* @__PURE__ */ jsx19(
3989
+ series.map((s, index) => /* @__PURE__ */ jsx22(
3658
3990
  Line,
3659
3991
  {
3660
3992
  type: "monotone",
@@ -3666,12 +3998,12 @@ var LineChart = forwardRef13(
3666
3998
  },
3667
3999
  s.dataKey
3668
4000
  )),
3669
- showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx19(ChartLegend, { items: defaultLegendItems })
4001
+ showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx22(ChartLegend, { items: defaultLegendItems })
3670
4002
  ]
3671
4003
  }
3672
4004
  )
3673
4005
  }
3674
- ) : /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx19(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
4006
+ ) : /* @__PURE__ */ jsx22("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx22(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
3675
4007
  ]
3676
4008
  }
3677
4009
  );
@@ -3680,10 +4012,10 @@ var LineChart = forwardRef13(
3680
4012
  LineChart.displayName = "LineChart";
3681
4013
 
3682
4014
  // src/components/ui/charts/pie-chart.tsx
3683
- import { forwardRef as forwardRef14 } from "react";
4015
+ import { forwardRef as forwardRef15 } from "react";
3684
4016
  import { PieChart as RechartsPieChart, Pie, Cell, Tooltip as Tooltip3 } from "recharts";
3685
- import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
3686
- var PieChart = forwardRef14(
4017
+ import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
4018
+ var PieChart = forwardRef15(
3687
4019
  ({
3688
4020
  data,
3689
4021
  title,
@@ -3710,20 +4042,20 @@ var PieChart = forwardRef14(
3710
4042
  )
3711
4043
  );
3712
4044
  const hasData = data && data.length > 0;
3713
- return /* @__PURE__ */ jsxs13(
4045
+ return /* @__PURE__ */ jsxs15(
3714
4046
  "div",
3715
4047
  {
3716
4048
  ref,
3717
4049
  className: `bg-light border border-subtle mx-6 ${className}`,
3718
4050
  children: [
3719
- /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx20(Typography, { variant: "label-sm-bold", children: title }) }),
3720
- /* @__PURE__ */ jsx20("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx20("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs13(
4051
+ /* @__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 }) }),
4052
+ /* @__PURE__ */ jsx23("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx23("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs15(
3721
4053
  RechartsPieChart,
3722
4054
  {
3723
4055
  width: 600,
3724
4056
  height: CHART_CONSTANTS.LARGE_HEIGHT,
3725
4057
  children: [
3726
- /* @__PURE__ */ jsx20(
4058
+ /* @__PURE__ */ jsx23(
3727
4059
  Pie,
3728
4060
  {
3729
4061
  data,
@@ -3735,7 +4067,7 @@ var PieChart = forwardRef14(
3735
4067
  label: showLabels,
3736
4068
  labelLine: false,
3737
4069
  onClick: handleClick,
3738
- children: data.map((entry, index) => /* @__PURE__ */ jsx20(
4070
+ children: data.map((entry, index) => /* @__PURE__ */ jsx23(
3739
4071
  Cell,
3740
4072
  {
3741
4073
  fill: entry.color || getSeriesColor(index)
@@ -3744,7 +4076,7 @@ var PieChart = forwardRef14(
3744
4076
  ))
3745
4077
  }
3746
4078
  ),
3747
- /* @__PURE__ */ jsx20(
4079
+ /* @__PURE__ */ jsx23(
3748
4080
  Tooltip3,
3749
4081
  {
3750
4082
  content: ({
@@ -3753,7 +4085,7 @@ var PieChart = forwardRef14(
3753
4085
  }) => {
3754
4086
  if (active && payload && payload.length && payload[0]) {
3755
4087
  const data2 = payload[0].payload;
3756
- return /* @__PURE__ */ jsx20(
4088
+ return /* @__PURE__ */ jsx23(
3757
4089
  GenericTooltip,
3758
4090
  {
3759
4091
  title: data2.name,
@@ -3771,10 +4103,10 @@ var PieChart = forwardRef14(
3771
4103
  }
3772
4104
  }
3773
4105
  ),
3774
- showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx20(ChartLegend, { items: defaultLegendItems, y: 400 })
4106
+ showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx23(ChartLegend, { items: defaultLegendItems, y: 400 })
3775
4107
  ]
3776
4108
  }
3777
- ) }) : /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx20(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
4109
+ ) }) : /* @__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" }) }) })
3778
4110
  ]
3779
4111
  }
3780
4112
  );
@@ -3783,11 +4115,11 @@ var PieChart = forwardRef14(
3783
4115
  PieChart.displayName = "PieChart";
3784
4116
 
3785
4117
  // src/components/ui/table.tsx
3786
- import { useCallback as useCallback2 } from "react";
4118
+ import { useCallback as useCallback5 } from "react";
3787
4119
  import {
3788
4120
  flexRender
3789
4121
  } from "@tanstack/react-table";
3790
- import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
4122
+ import { Fragment as Fragment2, jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
3791
4123
  function Table({
3792
4124
  table,
3793
4125
  className,
@@ -3799,33 +4131,33 @@ function Table({
3799
4131
  const totalPages = table.getPageCount();
3800
4132
  const totalRows = table.getFilteredRowModel().rows.length;
3801
4133
  const showingText = totalRows > 0 ? "Showing " + (currentPage * pageSize + 1) + "-" + Math.min((currentPage + 1) * pageSize, totalRows) + " of " + totalRows + " results" : "No results found";
3802
- const handlePreviousPage = useCallback2(() => {
4134
+ const handlePreviousPage = useCallback5(() => {
3803
4135
  table.previousPage();
3804
4136
  }, [table]);
3805
- const handleNextPage = useCallback2(() => {
4137
+ const handleNextPage = useCallback5(() => {
3806
4138
  table.nextPage();
3807
4139
  }, [table]);
3808
- const handlePageChange = useCallback2(
4140
+ const handlePageChange = useCallback5(
3809
4141
  (pageIndex) => {
3810
4142
  table.setPageIndex(pageIndex);
3811
4143
  },
3812
4144
  [table]
3813
4145
  );
3814
- const handlePageSizeChange = useCallback2(
4146
+ const handlePageSizeChange = useCallback5(
3815
4147
  (value) => {
3816
4148
  table.setPageSize(Number(value));
3817
4149
  },
3818
4150
  [table]
3819
4151
  );
3820
- return /* @__PURE__ */ jsxs14("div", { children: [
3821
- /* @__PURE__ */ jsx21("div", { className: cn("overflow-x-auto", className), children: /* @__PURE__ */ jsxs14("table", { className: "min-w-full divide-y divide-border", children: [
3822
- /* @__PURE__ */ jsx21("thead", { className: "bg-dark text-light", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx21("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx21("th", { className: "px-6 py-3 text-left", children: /* @__PURE__ */ jsxs14(
4152
+ return /* @__PURE__ */ jsxs16("div", { children: [
4153
+ /* @__PURE__ */ jsx24("div", { className: cn("overflow-x-auto", className), children: /* @__PURE__ */ jsxs16("table", { className: "min-w-full divide-y divide-border", children: [
4154
+ /* @__PURE__ */ jsx24("thead", { className: "bg-dark text-light", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx24("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx24("th", { className: "px-6 py-3 text-left", children: /* @__PURE__ */ jsxs16(
3823
4155
  "div",
3824
4156
  {
3825
4157
  className: `flex items-center space-x-1 ${header.column.getCanSort() ? "cursor-pointer select-none" : ""}`,
3826
4158
  onClick: header.column.getToggleSortingHandler(),
3827
4159
  children: [
3828
- /* @__PURE__ */ jsx21(
4160
+ /* @__PURE__ */ jsx24(
3829
4161
  Typography,
3830
4162
  {
3831
4163
  variant: "label-xs",
@@ -3836,19 +4168,19 @@ function Table({
3836
4168
  )
3837
4169
  }
3838
4170
  ),
3839
- header.column.getCanSort() && /* @__PURE__ */ jsxs14("span", { className: "ml-1", children: [
3840
- header.column.getIsSorted() === "asc" && /* @__PURE__ */ jsx21(ChevronUp, { className: "w-4 h-4 text-light" }),
3841
- header.column.getIsSorted() === "desc" && /* @__PURE__ */ jsx21(ChevronDown, { className: "w-4 h-4 text-light" })
4171
+ header.column.getCanSort() && /* @__PURE__ */ jsxs16("span", { className: "ml-1", children: [
4172
+ header.column.getIsSorted() === "asc" && /* @__PURE__ */ jsx24(ChevronUp, { className: "w-4 h-4 text-light" }),
4173
+ header.column.getIsSorted() === "desc" && /* @__PURE__ */ jsx24(ChevronDown, { className: "w-4 h-4 text-light" })
3842
4174
  ] })
3843
4175
  ]
3844
4176
  }
3845
4177
  ) }, header.id)) }, headerGroup.id)) }),
3846
- /* @__PURE__ */ jsx21("tbody", { className: "bg-light divide-y divide-border", children: table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx21("tr", { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx21("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsx21(Typography, { variant: "body-sm", children: flexRender(
4178
+ /* @__PURE__ */ jsx24("tbody", { className: "bg-light divide-y divide-border", children: table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx24("tr", { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx24("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsx24(Typography, { variant: "body-sm", children: flexRender(
3847
4179
  cell.column.columnDef.cell,
3848
4180
  cell.getContext()
3849
4181
  ) }) }, cell.id)) }, row.id)) })
3850
4182
  ] }) }),
3851
- showPagination && /* @__PURE__ */ jsxs14(
4183
+ showPagination && /* @__PURE__ */ jsxs16(
3852
4184
  "div",
3853
4185
  {
3854
4186
  className: cn(
@@ -3856,9 +4188,9 @@ function Table({
3856
4188
  paginationClassName
3857
4189
  ),
3858
4190
  children: [
3859
- /* @__PURE__ */ jsx21("div", { className: "flex items-center", children: /* @__PURE__ */ jsx21(Typography, { variant: "body-sm", className: "text-secondary", children: showingText }) }),
3860
- /* @__PURE__ */ jsxs14("div", { className: "flex items-center space-x-1", children: [
3861
- /* @__PURE__ */ jsx21(
4191
+ /* @__PURE__ */ jsx24("div", { className: "flex items-center", children: /* @__PURE__ */ jsx24(Typography, { variant: "body-sm", className: "text-secondary", children: showingText }) }),
4192
+ /* @__PURE__ */ jsxs16("div", { className: "flex items-center space-x-1", children: [
4193
+ /* @__PURE__ */ jsx24(
3862
4194
  Button,
3863
4195
  {
3864
4196
  variant: "ghost",
@@ -3866,7 +4198,7 @@ function Table({
3866
4198
  onClick: handlePreviousPage,
3867
4199
  disabled: !table.getCanPreviousPage(),
3868
4200
  className: "p-2",
3869
- children: /* @__PURE__ */ jsx21(ChevronLeft, { className: "w-4 h-4" })
4201
+ children: /* @__PURE__ */ jsx24(ChevronLeft, { className: "w-4 h-4" })
3870
4202
  }
3871
4203
  ),
3872
4204
  Array.from(
@@ -3883,7 +4215,7 @@ function Table({
3883
4215
  pageNumber = currentPage - 2 + i;
3884
4216
  }
3885
4217
  const isActive = pageNumber === currentPage;
3886
- return /* @__PURE__ */ jsx21(
4218
+ return /* @__PURE__ */ jsx24(
3887
4219
  Button,
3888
4220
  {
3889
4221
  variant: isActive ? "default" : "ghost",
@@ -3896,11 +4228,11 @@ function Table({
3896
4228
  );
3897
4229
  }
3898
4230
  ),
3899
- table.getPageCount() > 5 && currentPage < totalPages - 3 && /* @__PURE__ */ jsxs14(Fragment2, { children: [
3900
- /* @__PURE__ */ jsx21("span", { className: "px-1 text-secondary", children: "..." }),
3901
- /* @__PURE__ */ jsx21(Typography, { variant: "body-sm", className: "text-secondary", children: totalPages })
4231
+ table.getPageCount() > 5 && currentPage < totalPages - 3 && /* @__PURE__ */ jsxs16(Fragment2, { children: [
4232
+ /* @__PURE__ */ jsx24("span", { className: "px-1 text-secondary", children: "..." }),
4233
+ /* @__PURE__ */ jsx24(Typography, { variant: "body-sm", className: "text-secondary", children: totalPages })
3902
4234
  ] }),
3903
- /* @__PURE__ */ jsx21(
4235
+ /* @__PURE__ */ jsx24(
3904
4236
  Button,
3905
4237
  {
3906
4238
  variant: "ghost",
@@ -3908,12 +4240,12 @@ function Table({
3908
4240
  onClick: handleNextPage,
3909
4241
  disabled: !table.getCanNextPage(),
3910
4242
  className: "p-2",
3911
- children: /* @__PURE__ */ jsx21(ChevronRight, { className: "w-4 h-4" })
4243
+ children: /* @__PURE__ */ jsx24(ChevronRight, { className: "w-4 h-4" })
3912
4244
  }
3913
4245
  )
3914
4246
  ] }),
3915
- /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-3 w-48", children: [
3916
- /* @__PURE__ */ jsx21(
4247
+ /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-3 w-48", children: [
4248
+ /* @__PURE__ */ jsx24(
3917
4249
  Typography,
3918
4250
  {
3919
4251
  variant: "body-sm",
@@ -3921,14 +4253,14 @@ function Table({
3921
4253
  children: "Rows per page:"
3922
4254
  }
3923
4255
  ),
3924
- /* @__PURE__ */ jsxs14(
4256
+ /* @__PURE__ */ jsxs16(
3925
4257
  Select,
3926
4258
  {
3927
4259
  value: table.getState().pagination.pageSize.toString(),
3928
4260
  onValueChange: handlePageSizeChange,
3929
4261
  children: [
3930
- /* @__PURE__ */ jsx21(SelectTrigger, { className: "min-w-0 h-8", children: /* @__PURE__ */ jsx21(SelectValue, {}) }),
3931
- /* @__PURE__ */ jsx21(SelectContent, { children: [10, 20, 50, 100].map((size) => /* @__PURE__ */ jsx21(SelectItem, { value: size.toString(), children: size }, size)) })
4262
+ /* @__PURE__ */ jsx24(SelectTrigger, { className: "min-w-0 h-8", children: /* @__PURE__ */ jsx24(SelectValue, {}) }),
4263
+ /* @__PURE__ */ jsx24(SelectContent, { children: [10, 20, 50, 100].map((size) => /* @__PURE__ */ jsx24(SelectItem, { value: size.toString(), children: size }, size)) })
3932
4264
  ]
3933
4265
  }
3934
4266
  )
@@ -3974,6 +4306,7 @@ export {
3974
4306
  DatePicker,
3975
4307
  Doc,
3976
4308
  Dollar,
4309
+ Download,
3977
4310
  DropdownMenu,
3978
4311
  DropdownMenuCheckboxItem,
3979
4312
  DropdownMenuContent,
@@ -4023,9 +4356,11 @@ export {
4023
4356
  MagnifyingGlass,
4024
4357
  Minus,
4025
4358
  MoreMenu,
4359
+ PdfViewer,
4026
4360
  Phone,
4027
4361
  PieChart,
4028
4362
  Plus,
4363
+ Print,
4029
4364
  QuestionCircle,
4030
4365
  Select,
4031
4366
  SelectContent,
@@ -4074,6 +4409,7 @@ export {
4074
4409
  getHeatmapColor,
4075
4410
  getPerformanceColor,
4076
4411
  getSeriesColor,
4412
+ initializePdfWorker,
4077
4413
  selectTriggerVariants,
4078
4414
  tabsVariants,
4079
4415
  typographyVariants,