@algorithm-shift/design-system 1.2.995 → 1.2.997

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
@@ -3238,8 +3238,12 @@ function LazyMultiSelectDropdown({
3238
3238
  }
3239
3239
  };
3240
3240
  const selectedOptions = useMemo5(() => {
3241
- return lazyOptions.filter((opt) => normalizedValue.includes(opt.value));
3242
- }, [lazyOptions, normalizedValue]);
3241
+ return normalizedValue.map((id2) => {
3242
+ const fromLazy = lazyOptions.find((opt) => opt.value === id2);
3243
+ if (fromLazy) return fromLazy;
3244
+ return { value: id2, label: id2 };
3245
+ });
3246
+ }, [normalizedValue, lazyOptions]);
3243
3247
  useEffect25(() => {
3244
3248
  const handleClick = (e) => {
3245
3249
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
@@ -3279,8 +3283,12 @@ function LazyMultiSelectDropdown({
3279
3283
  onChange?.(convertOutput(updated), id);
3280
3284
  };
3281
3285
  const handleFocus = () => {
3282
- if (!disabled) setIsOpen(true);
3283
- if (lazyOptions.length === 0) loadPage(1, "");
3286
+ if (!disabled) {
3287
+ setIsOpen(true);
3288
+ if (lazyOptions.length === 0) {
3289
+ loadPage(1, "");
3290
+ }
3291
+ }
3284
3292
  };
3285
3293
  return /* @__PURE__ */ jsxs28("div", { ref: dropdownRef, className: "relative w-full", children: [
3286
3294
  /* @__PURE__ */ jsxs28(
@@ -3923,9 +3931,9 @@ function DataTable({
3923
3931
  setLocalPageSize(newSize);
3924
3932
  };
3925
3933
  const pageSizeOptions = React10.useMemo(() => {
3926
- const options = [10, 20, 50, 100].filter((size) => size < totalRecords);
3934
+ const options = [5, 10, 20, 50, 100].filter((size) => size < totalRecords);
3927
3935
  if (options.length === 0) {
3928
- options.push(10);
3936
+ options.push(5);
3929
3937
  }
3930
3938
  return options;
3931
3939
  }, [totalRecords]);
@@ -4688,7 +4696,7 @@ var HistoryTimeline = ({
4688
4696
  var HistoryTimeline_default = HistoryTimeline;
4689
4697
 
4690
4698
  // src/components/Navigation/Tabs/Tabs.tsx
4691
- import { useCallback as useCallback3, useMemo as useMemo8, useState as useState12 } from "react";
4699
+ import { useCallback as useCallback4, useMemo as useMemo8, useState as useState12 } from "react";
4692
4700
  import { ChevronDown as ChevronDown2, Menu } from "lucide-react";
4693
4701
  import Link3 from "next/link";
4694
4702
  import { usePathname, useRouter } from "next/navigation";
@@ -4915,7 +4923,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
4915
4923
  const router = useRouter();
4916
4924
  const [showExitDialog, setShowExitDialog] = useState12(false);
4917
4925
  const [pendingUrl, setPendingUrl] = useState12(null);
4918
- const handleBuilderExit = useCallback3(
4926
+ const handleBuilderExit = useCallback4(
4919
4927
  (e, url) => {
4920
4928
  if (isBuilder) {
4921
4929
  e.preventDefault();
@@ -5083,7 +5091,59 @@ var Tabs_default = Tabs;
5083
5091
 
5084
5092
  // src/components/Navigation/Stages/Stages.tsx
5085
5093
  import React11, { useEffect as useEffect26, useState as useState13 } from "react";
5094
+
5095
+ // src/components/ui/tooltip.tsx
5096
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
5086
5097
  import { jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
5098
+ function TooltipProvider({
5099
+ delayDuration = 0,
5100
+ ...props
5101
+ }) {
5102
+ return /* @__PURE__ */ jsx60(
5103
+ TooltipPrimitive.Provider,
5104
+ {
5105
+ "data-slot": "tooltip-provider",
5106
+ delayDuration,
5107
+ ...props
5108
+ }
5109
+ );
5110
+ }
5111
+ function Tooltip({
5112
+ ...props
5113
+ }) {
5114
+ return /* @__PURE__ */ jsx60(TooltipProvider, { children: /* @__PURE__ */ jsx60(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
5115
+ }
5116
+ function TooltipTrigger({
5117
+ ...props
5118
+ }) {
5119
+ return /* @__PURE__ */ jsx60(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
5120
+ }
5121
+ function TooltipContent({
5122
+ className,
5123
+ sideOffset = 0,
5124
+ children,
5125
+ ...props
5126
+ }) {
5127
+ return /* @__PURE__ */ jsx60(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs37(
5128
+ TooltipPrimitive.Content,
5129
+ {
5130
+ "data-slot": "tooltip-content",
5131
+ sideOffset,
5132
+ className: cn(
5133
+ "bg-foreground text-background 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-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
5134
+ className
5135
+ ),
5136
+ ...props,
5137
+ children: [
5138
+ children,
5139
+ /* @__PURE__ */ jsx60(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
5140
+ ]
5141
+ }
5142
+ ) });
5143
+ }
5144
+
5145
+ // src/components/Navigation/Stages/Stages.tsx
5146
+ import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
5087
5147
  var StagesComponent = ({
5088
5148
  stages,
5089
5149
  isShowBtn,
@@ -5101,6 +5161,8 @@ var StagesComponent = ({
5101
5161
  }) => {
5102
5162
  const [activeStage, setActiveStage] = useState13("");
5103
5163
  const [isCompleted, setIsCompleted] = useState13(false);
5164
+ const [activeChildStage, setActiveChildStage] = useState13(null);
5165
+ const [activeRootStage, setActiveRootStage] = useState13(null);
5104
5166
  useEffect26(() => {
5105
5167
  if (currentStage) {
5106
5168
  setActiveStage(currentStage);
@@ -5111,6 +5173,9 @@ var StagesComponent = ({
5111
5173
  const updateStage = (stageKey) => {
5112
5174
  setActiveStage(stageKey);
5113
5175
  onStageChange?.(stageKey);
5176
+ const { activeRoot, activeChild } = findStageContext(stages, stageKey);
5177
+ setActiveRootStage(activeRoot);
5178
+ setActiveChildStage(activeChild);
5114
5179
  };
5115
5180
  const nextStage = () => {
5116
5181
  if (!stages || stages.length === 0) return;
@@ -5136,9 +5201,41 @@ var StagesComponent = ({
5136
5201
  onStageChange?.(stageKey);
5137
5202
  }
5138
5203
  };
5139
- const isAllStagesCompleted = isCompleted || currentStage === lastStage;
5204
+ const findStageContext = (nodes, curr, root = null) => {
5205
+ if (!nodes || nodes.length === 0) {
5206
+ return { activeRoot: null, activeChild: null };
5207
+ }
5208
+ if (!Array.isArray(nodes)) {
5209
+ return { activeRoot: null, activeChild: null };
5210
+ }
5211
+ for (const node of nodes) {
5212
+ const currentRoot = root ?? node;
5213
+ if (node?.[dataKey] === curr) {
5214
+ return {
5215
+ activeRoot: root ?? node,
5216
+ activeChild: node
5217
+ };
5218
+ }
5219
+ const result = findStageContext(node?.children, curr, currentRoot);
5220
+ if (result.activeChild) {
5221
+ return result;
5222
+ }
5223
+ }
5224
+ return { activeRoot: null, activeChild: null };
5225
+ };
5226
+ useEffect26(() => {
5227
+ if (!currentStage || !Array.isArray(stages)) {
5228
+ setActiveRootStage(null);
5229
+ setActiveChildStage(null);
5230
+ return;
5231
+ }
5232
+ const { activeRoot, activeChild } = findStageContext(stages, currentStage);
5233
+ setActiveRootStage(activeRoot);
5234
+ setActiveChildStage(activeChild);
5235
+ }, [currentStage, stages]);
5236
+ const isAllStagesCompleted = isCompleted || activeRootStage?.[dataKey] === lastStage;
5140
5237
  const disabled = isAllStagesCompleted || loading || saving;
5141
- return /* @__PURE__ */ jsx60("div", { className, style, children: /* @__PURE__ */ jsxs37(
5238
+ return /* @__PURE__ */ jsx61("div", { className, style, children: /* @__PURE__ */ jsxs38(
5142
5239
  "div",
5143
5240
  {
5144
5241
  className: `
@@ -5148,8 +5245,8 @@ var StagesComponent = ({
5148
5245
  ${isMobile ? "p-3 sm:p-4" : "p-2"}
5149
5246
  `,
5150
5247
  children: [
5151
- /* @__PURE__ */ jsx60("div", { className: "flex items-center flex-shrink-0 order-1 lg:order-1", children: /* @__PURE__ */ jsx60("button", { className: "p-2 hover:bg-gray-100 rounded flex-shrink-0", children: /* @__PURE__ */ jsx60("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx60("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
5152
- /* @__PURE__ */ jsx60(
5248
+ /* @__PURE__ */ jsx61("div", { className: "flex items-center flex-shrink-0 order-1 lg:order-1", children: /* @__PURE__ */ jsx61("button", { className: "p-2 hover:bg-gray-100 rounded flex-shrink-0", children: /* @__PURE__ */ jsx61("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx61("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
5249
+ /* @__PURE__ */ jsx61(
5153
5250
  "div",
5154
5251
  {
5155
5252
  className: `
@@ -5157,7 +5254,7 @@ var StagesComponent = ({
5157
5254
  flex-wrap gap-2 sm:gap-2 lg:gap-3 w-full lg:w-auto
5158
5255
  ${isMobile ? "order-2 mt-2 lg:mt-0" : "order-2"}
5159
5256
  `,
5160
- children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ jsx60(
5257
+ children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ jsx61(
5161
5258
  "button",
5162
5259
  {
5163
5260
  className: `
@@ -5171,41 +5268,49 @@ var StagesComponent = ({
5171
5268
  disabled: true
5172
5269
  },
5173
5270
  index
5174
- )) : stages?.length > 0 && stages?.map((stage, index) => {
5271
+ )) : (stages || [])?.length > 0 && stages?.map((stage, index) => {
5175
5272
  const currentIndex = stages.findIndex((s) => s[dataKey] === activeStage);
5176
5273
  const isCompletedStage = isAllStagesCompleted || index <= currentIndex;
5177
5274
  const isActive = !isAllStagesCompleted && index === currentIndex;
5178
- return /* @__PURE__ */ jsxs37(React11.Fragment, { children: [
5179
- /* @__PURE__ */ jsx60(
5275
+ let stageColor = !stage.isSuccess ? "bg-red-50 text-red-700 border-2 border-red-700" : "bg-green-50 text-green-700 border-2 border-green-700";
5276
+ let stageLabel = stage[dataLabel];
5277
+ if (stage[dataKey] !== activeChildStage?.[dataKey] && activeRootStage?.[dataKey] === stage[dataKey]) {
5278
+ stageLabel = activeChildStage?.[dataLabel] || stageLabel;
5279
+ stageColor = activeChildStage?.isSuccess ? "bg-green-50 text-green-700 border-2 border-green-700" : "bg-red-50 text-red-700 border-2 border-red-700";
5280
+ }
5281
+ const stageKey = typeof stage[dataKey] === "string" ? stage[dataKey] : JSON.stringify(stage[dataKey]);
5282
+ return /* @__PURE__ */ jsx61(React11.Fragment, { children: /* @__PURE__ */ jsxs38(Tooltip, { delayDuration: 500, disableHoverableContent: true, children: [
5283
+ /* @__PURE__ */ jsx61(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx61(
5180
5284
  "button",
5181
5285
  {
5182
5286
  className: `
5183
5287
  min-w-[70px] sm:min-w-[80px] w-full sm:w-auto px-3 sm:px-4 py-1.5 sm:py-2
5184
5288
  rounded-full text-xs sm:text-sm font-medium transition-colors duration-200
5185
- whitespace-normal sm:whitespace-nowrap flex-shrink-0
5186
- ${isActive ? "bg-green-700 text-white shadow-md" : isCompletedStage ? "bg-green-50 text-green-700 border-2 border-green-700" : "bg-white text-gray-700 hover:bg-gray-100 border border-gray-200"}
5289
+ whitespace-normal sm:whitespace-nowrap flex-shrink-0 max-w-[150px] text-ellipsis overflow-hidden
5290
+ ${isActive ? "bg-green-700 text-white shadow-md" : isCompletedStage ? stageColor : "bg-white text-gray-700 hover:bg-gray-100 border border-gray-200"}
5187
5291
  ${isMobile ? "flex-1 text-center py-2.5" : ""}
5188
5292
  `,
5189
5293
  onClick: () => {
5190
5294
  if (isAllStagesCompleted) return;
5191
5295
  onStageClick(stage[dataKey]);
5192
5296
  },
5193
- children: stage[dataLabel]
5297
+ children: stageLabel
5194
5298
  }
5195
- ),
5196
- !isMobile && index < stages.length - 1 && /* @__PURE__ */ jsx60("div", { className: "hidden sm:flex sm:flex-shrink-0 w-3 h-px bg-gray-300 sm:w-4" })
5197
- ] }, stage.id);
5299
+ ) }),
5300
+ /* @__PURE__ */ jsx61(TooltipContent, { className: "max-w-[400px] p-3 text-xs text-muted-foreground space-y-2", children: /* @__PURE__ */ jsx61("span", { children: /* @__PURE__ */ jsx61("b", { children: stageLabel }) }) }),
5301
+ !isMobile && index < stages.length - 1 && /* @__PURE__ */ jsx61("div", { className: "hidden sm:flex sm:flex-shrink-0 w-3 h-px bg-gray-300 sm:w-4" })
5302
+ ] }, stageKey) }, stageKey);
5198
5303
  })
5199
5304
  }
5200
5305
  ),
5201
- isShowBtn && /* @__PURE__ */ jsx60(
5306
+ isShowBtn && /* @__PURE__ */ jsx61(
5202
5307
  "div",
5203
5308
  {
5204
5309
  className: `
5205
5310
  flex items-center flex-shrink-0 w-full lg:w-auto
5206
5311
  ${isMobile ? "order-3 mt-3 lg:mt-0" : "order-3"}
5207
5312
  `,
5208
- children: /* @__PURE__ */ jsx60(
5313
+ children: /* @__PURE__ */ jsx61(
5209
5314
  "button",
5210
5315
  {
5211
5316
  className: `
@@ -5227,23 +5332,23 @@ var StagesComponent = ({
5227
5332
  var Stages_default = StagesComponent;
5228
5333
 
5229
5334
  // src/components/Navigation/Spacer/Spacer.tsx
5230
- import { jsx as jsx61 } from "react/jsx-runtime";
5335
+ import { jsx as jsx62 } from "react/jsx-runtime";
5231
5336
  var Spacer = ({ className, style }) => {
5232
- return /* @__PURE__ */ jsx61("div", { className: `${className}`, style });
5337
+ return /* @__PURE__ */ jsx62("div", { className: `${className}`, style });
5233
5338
  };
5234
5339
  var Spacer_default = Spacer;
5235
5340
 
5236
5341
  // src/components/Navigation/Profile/Profile.tsx
5237
- import { jsx as jsx62, jsxs as jsxs38 } from "react/jsx-runtime";
5342
+ import { jsx as jsx63, jsxs as jsxs39 } from "react/jsx-runtime";
5238
5343
 
5239
5344
  // src/components/Navigation/Notification/Notification.tsx
5240
- import { jsx as jsx63, jsxs as jsxs39 } from "react/jsx-runtime";
5345
+ import { jsx as jsx64, jsxs as jsxs40 } from "react/jsx-runtime";
5241
5346
 
5242
5347
  // src/components/Navigation/Logo/Logo.tsx
5243
- import { jsx as jsx64 } from "react/jsx-runtime";
5348
+ import { jsx as jsx65 } from "react/jsx-runtime";
5244
5349
 
5245
5350
  // src/components/Navigation/Navbar/Navbar.tsx
5246
- import { useCallback as useCallback4, useMemo as useMemo9, useState as useState14, useEffect as useEffect27 } from "react";
5351
+ import { useCallback as useCallback5, useMemo as useMemo9, useState as useState14, useEffect as useEffect27 } from "react";
5247
5352
  import { Bell, Search as Search2, Menu as Menu2 } from "lucide-react";
5248
5353
  import Image3 from "next/image";
5249
5354
  import Link4 from "next/link";
@@ -5252,8 +5357,8 @@ import { useRouter as useRouter2 } from "next/navigation";
5252
5357
  // src/components/ui/avatar.tsx
5253
5358
  import * as React12 from "react";
5254
5359
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
5255
- import { jsx as jsx65 } from "react/jsx-runtime";
5256
- var Avatar = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx65(
5360
+ import { jsx as jsx66 } from "react/jsx-runtime";
5361
+ var Avatar = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
5257
5362
  AvatarPrimitive.Root,
5258
5363
  {
5259
5364
  ref,
@@ -5265,7 +5370,7 @@ var Avatar = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
5265
5370
  }
5266
5371
  ));
5267
5372
  Avatar.displayName = AvatarPrimitive.Root.displayName;
5268
- var AvatarImage = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx65(
5373
+ var AvatarImage = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
5269
5374
  AvatarPrimitive.Image,
5270
5375
  {
5271
5376
  ref,
@@ -5274,7 +5379,7 @@ var AvatarImage = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
5274
5379
  }
5275
5380
  ));
5276
5381
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
5277
- var AvatarFallback = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx65(
5382
+ var AvatarFallback = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
5278
5383
  AvatarPrimitive.Fallback,
5279
5384
  {
5280
5385
  ref,
@@ -5288,7 +5393,7 @@ var AvatarFallback = React12.forwardRef(({ className, ...props }, ref) => /* @__
5288
5393
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
5289
5394
 
5290
5395
  // src/components/Navigation/Navbar/Navbar.tsx
5291
- import { Fragment as Fragment23, jsx as jsx66, jsxs as jsxs40 } from "react/jsx-runtime";
5396
+ import { Fragment as Fragment23, jsx as jsx67, jsxs as jsxs41 } from "react/jsx-runtime";
5292
5397
  function Navbar({
5293
5398
  style,
5294
5399
  badgeType,
@@ -5326,7 +5431,7 @@ function Navbar({
5326
5431
  const isMobile = mode === "mobile";
5327
5432
  const isTablet = mode === "tablet";
5328
5433
  const isDesktop = mode === "desktop";
5329
- const handleBuilderExit = useCallback4(
5434
+ const handleBuilderExit = useCallback5(
5330
5435
  (e, url) => {
5331
5436
  if (isBuilder) {
5332
5437
  e.preventDefault();
@@ -5346,9 +5451,9 @@ function Navbar({
5346
5451
  }
5347
5452
  return list;
5348
5453
  }, [source, navList, list]);
5349
- const RenderSearchInput = () => /* @__PURE__ */ jsx66("div", { className: "flex-1 px-2", children: /* @__PURE__ */ jsxs40("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
5350
- /* @__PURE__ */ jsx66(Search2, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
5351
- /* @__PURE__ */ jsx66(
5454
+ const RenderSearchInput = () => /* @__PURE__ */ jsx67("div", { className: "flex-1 px-2", children: /* @__PURE__ */ jsxs41("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
5455
+ /* @__PURE__ */ jsx67(Search2, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
5456
+ /* @__PURE__ */ jsx67(
5352
5457
  Input,
5353
5458
  {
5354
5459
  placeholder: "Search",
@@ -5364,23 +5469,23 @@ function Navbar({
5364
5469
  }
5365
5470
  )
5366
5471
  ] }) });
5367
- return /* @__PURE__ */ jsxs40(Fragment23, { children: [
5368
- /* @__PURE__ */ jsx66(
5472
+ return /* @__PURE__ */ jsxs41(Fragment23, { children: [
5473
+ /* @__PURE__ */ jsx67(
5369
5474
  "nav",
5370
5475
  {
5371
5476
  className: "w-full min-h-[75px] border-b border-gray-200 dark:border-gray-800 dark:bg-gray-800 bg-white shadow-sm",
5372
5477
  style,
5373
- children: /* @__PURE__ */ jsxs40("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
5374
- /* @__PURE__ */ jsx66(
5478
+ children: /* @__PURE__ */ jsxs41("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
5479
+ /* @__PURE__ */ jsx67(
5375
5480
  Link4,
5376
5481
  {
5377
5482
  href: "/",
5378
5483
  onClick: (e) => handleBuilderExit(e, "/"),
5379
5484
  className: "flex items-center space-x-2",
5380
- children: imageUrl ? /* @__PURE__ */ jsx66(Image3, { src: imageUrl, alt: altText, width: 180, height: 40 }) : /* @__PURE__ */ jsx66("span", { className: "font-semibold text-blue-700", children: "Logo" })
5485
+ children: imageUrl ? /* @__PURE__ */ jsx67(Image3, { src: imageUrl, alt: altText, width: 180, height: 40 }) : /* @__PURE__ */ jsx67("span", { className: "font-semibold text-blue-700", children: "Logo" })
5381
5486
  }
5382
5487
  ),
5383
- isDesktop && /* @__PURE__ */ jsx66("div", { className: "hidden md:flex items-center space-x-6", children: formattedMenu.map((item) => /* @__PURE__ */ jsx66(
5488
+ isDesktop && /* @__PURE__ */ jsx67("div", { className: "hidden md:flex items-center space-x-6", children: formattedMenu.map((item) => /* @__PURE__ */ jsx67(
5384
5489
  Link4,
5385
5490
  {
5386
5491
  href: item.url,
@@ -5390,23 +5495,23 @@ function Navbar({
5390
5495
  },
5391
5496
  item.id
5392
5497
  )) }),
5393
- /* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-3", children: [
5394
- (isDesktop || isTablet) && /* @__PURE__ */ jsx66(RenderSearchInput, {}),
5395
- /* @__PURE__ */ jsxs40("div", { className: "relative bg-gray-200 dark:bg-gray-700 rounded-md", children: [
5396
- /* @__PURE__ */ jsx66(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx66(Bell, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" }) }),
5397
- badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ jsx66("span", { className: "absolute -top-1 -right-1 h-4 w-4 flex items-center justify-center bg-red-500 rounded-full text-white text-[10px]", children: badgeCount }) : !hideBadgeWhenZero && /* @__PURE__ */ jsx66("span", { className: "absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full" })
5498
+ /* @__PURE__ */ jsxs41("div", { className: "flex items-center space-x-3", children: [
5499
+ (isDesktop || isTablet) && /* @__PURE__ */ jsx67(RenderSearchInput, {}),
5500
+ /* @__PURE__ */ jsxs41("div", { className: "relative bg-gray-200 dark:bg-gray-700 rounded-md", children: [
5501
+ /* @__PURE__ */ jsx67(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx67(Bell, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" }) }),
5502
+ badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ jsx67("span", { className: "absolute -top-1 -right-1 h-4 w-4 flex items-center justify-center bg-red-500 rounded-full text-white text-[10px]", children: badgeCount }) : !hideBadgeWhenZero && /* @__PURE__ */ jsx67("span", { className: "absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full" })
5398
5503
  ] }),
5399
- /* @__PURE__ */ jsxs40(DropdownMenu, { children: [
5400
- /* @__PURE__ */ jsx66(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-2 cursor-pointer", children: [
5401
- !isMobile && showName && /* @__PURE__ */ jsx66("h4", { className: "text-gray-900 dark:text-gray-300 text-sm", children: userName }),
5402
- /* @__PURE__ */ jsx66(Avatar, { className: "h-8 w-8", children: profileType === "avatar" ? /* @__PURE__ */ jsx66(AvatarImage, { src: "/images/appbuilder/toolset/profile.svg", alt: "profile" }) : /* @__PURE__ */ jsx66("div", { className: "bg-green-700 text-white h-full w-full rounded-full flex items-center justify-center text-xs", children: getInitials(userName) }) }),
5403
- (isMobile || isTablet) && /* @__PURE__ */ jsx66(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx66(Menu2, { className: "h-6 w-6" }) })
5504
+ /* @__PURE__ */ jsxs41(DropdownMenu, { children: [
5505
+ /* @__PURE__ */ jsx67(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs41("div", { className: "flex items-center space-x-2 cursor-pointer", children: [
5506
+ !isMobile && showName && /* @__PURE__ */ jsx67("h4", { className: "text-gray-900 dark:text-gray-300 text-sm", children: userName }),
5507
+ /* @__PURE__ */ jsx67(Avatar, { className: "h-8 w-8", children: profileType === "avatar" ? /* @__PURE__ */ jsx67(AvatarImage, { src: "/images/appbuilder/toolset/profile.svg", alt: "profile" }) : /* @__PURE__ */ jsx67("div", { className: "bg-green-700 text-white h-full w-full rounded-full flex items-center justify-center text-xs", children: getInitials(userName) }) }),
5508
+ (isMobile || isTablet) && /* @__PURE__ */ jsx67(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx67(Menu2, { className: "h-6 w-6" }) })
5404
5509
  ] }) }),
5405
- /* @__PURE__ */ jsxs40(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
5406
- profileMenu.map((item) => /* @__PURE__ */ jsx66(DropdownMenuItem, { children: /* @__PURE__ */ jsx66(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id)),
5407
- (isMobile || isTablet) && /* @__PURE__ */ jsxs40(Fragment23, { children: [
5408
- /* @__PURE__ */ jsx66(DropdownMenuSeparator, {}),
5409
- formattedMenu.map((item) => /* @__PURE__ */ jsx66(DropdownMenuItem, { children: /* @__PURE__ */ jsx66(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id))
5510
+ /* @__PURE__ */ jsxs41(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
5511
+ profileMenu.map((item) => /* @__PURE__ */ jsx67(DropdownMenuItem, { children: /* @__PURE__ */ jsx67(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id)),
5512
+ (isMobile || isTablet) && /* @__PURE__ */ jsxs41(Fragment23, { children: [
5513
+ /* @__PURE__ */ jsx67(DropdownMenuSeparator, {}),
5514
+ formattedMenu.map((item) => /* @__PURE__ */ jsx67(DropdownMenuItem, { children: /* @__PURE__ */ jsx67(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id))
5410
5515
  ] })
5411
5516
  ] })
5412
5517
  ] })
@@ -5414,12 +5519,12 @@ function Navbar({
5414
5519
  ] })
5415
5520
  }
5416
5521
  ),
5417
- isMobile && /* @__PURE__ */ jsx66("div", { className: "p-3", children: /* @__PURE__ */ jsx66(RenderSearchInput, {}) })
5522
+ isMobile && /* @__PURE__ */ jsx67("div", { className: "p-3", children: /* @__PURE__ */ jsx67(RenderSearchInput, {}) })
5418
5523
  ] });
5419
5524
  }
5420
5525
 
5421
5526
  // src/components/Chart/BarChart.tsx
5422
- import React13, { useEffect as useEffect28, useMemo as useMemo10, useState as useState15, useCallback as useCallback5 } from "react";
5527
+ import React13, { useEffect as useEffect28, useMemo as useMemo10, useState as useState15, useCallback as useCallback6 } from "react";
5423
5528
  import axios3 from "axios";
5424
5529
  import {
5425
5530
  BarChart,
@@ -5429,11 +5534,11 @@ import {
5429
5534
  XAxis,
5430
5535
  YAxis,
5431
5536
  CartesianGrid,
5432
- Tooltip,
5537
+ Tooltip as Tooltip2,
5433
5538
  ResponsiveContainer,
5434
5539
  Legend
5435
5540
  } from "recharts";
5436
- import { jsx as jsx67, jsxs as jsxs41 } from "react/jsx-runtime";
5541
+ import { jsx as jsx68, jsxs as jsxs42 } from "react/jsx-runtime";
5437
5542
  var getRandomColor = () => {
5438
5543
  const palette = [
5439
5544
  "#2563eb",
@@ -5502,7 +5607,7 @@ var ChartComponent = ({
5502
5607
  setCurrentPage(1);
5503
5608
  }
5504
5609
  }, [apiUrl]);
5505
- const fetchData = useCallback5(async (page) => {
5610
+ const fetchData = useCallback6(async (page) => {
5506
5611
  if (!apiUrl) return;
5507
5612
  const cancelled = false;
5508
5613
  try {
@@ -5560,27 +5665,27 @@ var ChartComponent = ({
5560
5665
  const chartType = props.chartType || "bar";
5561
5666
  const legendsPosition = ["middle", "bottom"].includes(props.legendsPosition) ? props.legendsPosition : "top";
5562
5667
  if (effectiveLoading || data.length === 0) {
5563
- return /* @__PURE__ */ jsxs41(
5668
+ return /* @__PURE__ */ jsxs42(
5564
5669
  "div",
5565
5670
  {
5566
5671
  className: `relative flex flex-col w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
5567
5672
  style,
5568
5673
  children: [
5569
- /* @__PURE__ */ jsx67("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ jsxs41("div", { className: "inline-flex items-center space-x-2 bg-white/90 px-6 py-2.5 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: [
5570
- /* @__PURE__ */ jsx67("div", { className: "w-5 h-5 border-2 border-gray-400 border-t-blue-500 rounded-full animate-spin" }),
5571
- /* @__PURE__ */ jsx67("span", { className: "text-sm font-medium text-gray-700 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
5674
+ /* @__PURE__ */ jsx68("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ jsxs42("div", { className: "inline-flex items-center space-x-2 bg-white/90 px-6 py-2.5 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: [
5675
+ /* @__PURE__ */ jsx68("div", { className: "w-5 h-5 border-2 border-gray-400 border-t-blue-500 rounded-full animate-spin" }),
5676
+ /* @__PURE__ */ jsx68("span", { className: "text-sm font-medium text-gray-700 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
5572
5677
  ] }) }),
5573
- /* @__PURE__ */ jsx67("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
5574
- /* @__PURE__ */ jsx67("div", { className: "flex-1 relative w-full h-full min-h-[240px] md:min-h-[320px] bg-white/80 rounded-lg border border-gray-200/50 shadow-sm", children: /* @__PURE__ */ jsx67("div", { className: "absolute bottom-0 left-4 right-4 flex gap-2 h-[200px] md:h-[280px] justify-center items-end", children: [...Array(20)].map((_, idx) => {
5678
+ /* @__PURE__ */ jsx68("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
5679
+ /* @__PURE__ */ jsx68("div", { className: "flex-1 relative w-full h-full min-h-[240px] md:min-h-[320px] bg-white/80 rounded-lg border border-gray-200/50 shadow-sm", children: /* @__PURE__ */ jsx68("div", { className: "absolute bottom-0 left-4 right-4 flex gap-2 h-[200px] md:h-[280px] justify-center items-end", children: [...Array(20)].map((_, idx) => {
5575
5680
  const randomHeight = `${Math.floor(Math.random() * 76) + 20}%`;
5576
- return /* @__PURE__ */ jsxs41(
5681
+ return /* @__PURE__ */ jsxs42(
5577
5682
  "div",
5578
5683
  {
5579
5684
  className: `relative w-10 md:w-12 flex-1 max-w-[48px] rounded-t-lg bg-gradient-to-t from-gray-100 via-gray-200 to-transparent shadow-lg border border-gray-200/50 animate-slide-up stagger-${idx} overflow-hidden`,
5580
5685
  style: { height: randomHeight, animationDelay: `${idx * 0.08}s` },
5581
5686
  children: [
5582
- /* @__PURE__ */ jsx67("div", { className: "absolute inset-0 bg-gradient-to-r from-white/40 via-transparent to-white/40 animate-shimmer-bar" }),
5583
- /* @__PURE__ */ jsx67("div", { className: "absolute bottom-1 left-1/2 w-4 h-1 rounded-full transform -translate-x-1/2 blur-sm" })
5687
+ /* @__PURE__ */ jsx68("div", { className: "absolute inset-0 bg-gradient-to-r from-white/40 via-transparent to-white/40 animate-shimmer-bar" }),
5688
+ /* @__PURE__ */ jsx68("div", { className: "absolute bottom-1 left-1/2 w-4 h-1 rounded-full transform -translate-x-1/2 blur-sm" })
5584
5689
  ]
5585
5690
  },
5586
5691
  `bar-${idx}`
@@ -5590,9 +5695,9 @@ var ChartComponent = ({
5590
5695
  }
5591
5696
  );
5592
5697
  }
5593
- return /* @__PURE__ */ jsxs41("div", { className: `${className} h-[450px]`, style, children: [
5594
- isPaginationEnabled && rawMeta && /* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between mb-4 px-2", children: [
5595
- /* @__PURE__ */ jsxs41("div", { className: "text-sm text-gray-600 hidden sm:block", children: [
5698
+ return /* @__PURE__ */ jsxs42("div", { className: `${className} h-[450px]`, style, children: [
5699
+ isPaginationEnabled && rawMeta && /* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-between mb-4 px-2", children: [
5700
+ /* @__PURE__ */ jsxs42("div", { className: "text-sm text-gray-600 hidden sm:block", children: [
5596
5701
  "Page ",
5597
5702
  rawMeta.page,
5598
5703
  " of ",
@@ -5601,52 +5706,52 @@ var ChartComponent = ({
5601
5706
  rawMeta.total.toLocaleString(),
5602
5707
  " total records)"
5603
5708
  ] }),
5604
- /* @__PURE__ */ jsxs41("div", { className: "flex items-center space-x-2 sm:hidden w-full justify-center", children: [
5605
- /* @__PURE__ */ jsx67(
5709
+ /* @__PURE__ */ jsxs42("div", { className: "flex items-center space-x-2 sm:hidden w-full justify-center", children: [
5710
+ /* @__PURE__ */ jsx68(
5606
5711
  "button",
5607
5712
  {
5608
5713
  onClick: () => handlePageChange(currentPage - 1),
5609
5714
  disabled: currentPage === 1 || localLoading,
5610
5715
  className: "flex-1 px-3 py-2 text-xs font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center space-x-1 min-w-0",
5611
- children: /* @__PURE__ */ jsx67("span", { children: "\u2190 Prev" })
5716
+ children: /* @__PURE__ */ jsx68("span", { children: "\u2190 Prev" })
5612
5717
  }
5613
5718
  ),
5614
- /* @__PURE__ */ jsx67("span", { className: "px-2 py-2 text-xs font-semibold text-gray-700 min-w-[36px] text-center flex-shrink-0", children: currentPage }),
5615
- /* @__PURE__ */ jsx67(
5719
+ /* @__PURE__ */ jsx68("span", { className: "px-2 py-2 text-xs font-semibold text-gray-700 min-w-[36px] text-center flex-shrink-0", children: currentPage }),
5720
+ /* @__PURE__ */ jsx68(
5616
5721
  "button",
5617
5722
  {
5618
5723
  onClick: () => handlePageChange(currentPage + 1),
5619
5724
  disabled: currentPage >= rawMeta.pages || localLoading,
5620
5725
  className: "flex-1 px-3 py-2 text-xs font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center space-x-1 min-w-0",
5621
- children: /* @__PURE__ */ jsx67("span", { children: "Next \u2192" })
5726
+ children: /* @__PURE__ */ jsx68("span", { children: "Next \u2192" })
5622
5727
  }
5623
5728
  )
5624
5729
  ] }),
5625
- /* @__PURE__ */ jsxs41("div", { className: "flex items-center space-x-2 hidden sm:flex", children: [
5626
- /* @__PURE__ */ jsx67(
5730
+ /* @__PURE__ */ jsxs42("div", { className: "flex items-center space-x-2 hidden sm:flex", children: [
5731
+ /* @__PURE__ */ jsx68(
5627
5732
  "button",
5628
5733
  {
5629
5734
  onClick: () => handlePageChange(currentPage - 1),
5630
5735
  disabled: currentPage === 1 || localLoading,
5631
5736
  className: "px-3 py-1.5 text-sm font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center space-x-1",
5632
- children: /* @__PURE__ */ jsx67("span", { children: "\u2190 Prev" })
5737
+ children: /* @__PURE__ */ jsx68("span", { children: "\u2190 Prev" })
5633
5738
  }
5634
5739
  ),
5635
- /* @__PURE__ */ jsx67("span", { className: "px-3 py-1 text-sm font-medium text-gray-700", children: currentPage }),
5636
- /* @__PURE__ */ jsx67(
5740
+ /* @__PURE__ */ jsx68("span", { className: "px-3 py-1 text-sm font-medium text-gray-700", children: currentPage }),
5741
+ /* @__PURE__ */ jsx68(
5637
5742
  "button",
5638
5743
  {
5639
5744
  onClick: () => handlePageChange(currentPage + 1),
5640
5745
  disabled: currentPage >= rawMeta.pages || localLoading,
5641
5746
  className: "px-3 py-1.5 text-sm font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center space-x-1",
5642
- children: /* @__PURE__ */ jsx67("span", { children: "Next \u2192" })
5747
+ children: /* @__PURE__ */ jsx68("span", { children: "Next \u2192" })
5643
5748
  }
5644
5749
  )
5645
5750
  ] })
5646
5751
  ] }),
5647
- /* @__PURE__ */ jsx67(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs41(BarChart, { data, children: [
5648
- /* @__PURE__ */ jsx67(CartesianGrid, { strokeDasharray: "3 3" }),
5649
- /* @__PURE__ */ jsx67(
5752
+ /* @__PURE__ */ jsx68(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs42(BarChart, { data, children: [
5753
+ /* @__PURE__ */ jsx68(CartesianGrid, { strokeDasharray: "3 3" }),
5754
+ /* @__PURE__ */ jsx68(
5650
5755
  XAxis,
5651
5756
  {
5652
5757
  dataKey: dataLabel,
@@ -5664,7 +5769,7 @@ var ChartComponent = ({
5664
5769
  className: "hidden sm:block"
5665
5770
  }
5666
5771
  ),
5667
- /* @__PURE__ */ jsx67(
5772
+ /* @__PURE__ */ jsx68(
5668
5773
  YAxis,
5669
5774
  {
5670
5775
  tickFormatter: (value) => `${(value / 1e3).toFixed(0)}k`,
@@ -5677,9 +5782,9 @@ var ChartComponent = ({
5677
5782
  width: 60
5678
5783
  }
5679
5784
  ),
5680
- /* @__PURE__ */ jsx67(Tooltip, { formatter: (value) => [`${value}`, "Count"] }),
5681
- /* @__PURE__ */ jsx67(Legend, { verticalAlign: legendsPosition, align: "center" }),
5682
- /* @__PURE__ */ jsx67(
5785
+ /* @__PURE__ */ jsx68(Tooltip2, { formatter: (value) => [`${value}`, "Count"] }),
5786
+ /* @__PURE__ */ jsx68(Legend, { verticalAlign: legendsPosition, align: "center" }),
5787
+ /* @__PURE__ */ jsx68(
5683
5788
  Bar,
5684
5789
  {
5685
5790
  dataKey,
@@ -5687,13 +5792,13 @@ var ChartComponent = ({
5687
5792
  isAnimationActive: false
5688
5793
  }
5689
5794
  )
5690
- ] }) : /* @__PURE__ */ jsxs41(AreaChart, { data, children: [
5691
- /* @__PURE__ */ jsx67("defs", { children: /* @__PURE__ */ jsxs41("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
5692
- /* @__PURE__ */ jsx67("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
5693
- /* @__PURE__ */ jsx67("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
5795
+ ] }) : /* @__PURE__ */ jsxs42(AreaChart, { data, children: [
5796
+ /* @__PURE__ */ jsx68("defs", { children: /* @__PURE__ */ jsxs42("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
5797
+ /* @__PURE__ */ jsx68("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
5798
+ /* @__PURE__ */ jsx68("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
5694
5799
  ] }) }),
5695
- /* @__PURE__ */ jsx67(CartesianGrid, { strokeDasharray: "3 3" }),
5696
- /* @__PURE__ */ jsx67(
5800
+ /* @__PURE__ */ jsx68(CartesianGrid, { strokeDasharray: "3 3" }),
5801
+ /* @__PURE__ */ jsx68(
5697
5802
  XAxis,
5698
5803
  {
5699
5804
  dataKey: dataLabel,
@@ -5707,7 +5812,7 @@ var ChartComponent = ({
5707
5812
  }
5708
5813
  }
5709
5814
  ),
5710
- /* @__PURE__ */ jsx67(
5815
+ /* @__PURE__ */ jsx68(
5711
5816
  YAxis,
5712
5817
  {
5713
5818
  tickFormatter: (value) => `${(value / 1e3).toFixed(0)}k`,
@@ -5720,8 +5825,8 @@ var ChartComponent = ({
5720
5825
  width: 60
5721
5826
  }
5722
5827
  ),
5723
- /* @__PURE__ */ jsx67(Tooltip, { formatter: (value) => `${value}k` }),
5724
- /* @__PURE__ */ jsx67(
5828
+ /* @__PURE__ */ jsx68(Tooltip2, { formatter: (value) => `${value}k` }),
5829
+ /* @__PURE__ */ jsx68(
5725
5830
  Area,
5726
5831
  {
5727
5832
  type: "monotone",
@@ -5745,9 +5850,9 @@ import {
5745
5850
  Pie,
5746
5851
  Cell,
5747
5852
  ResponsiveContainer as ResponsiveContainer2,
5748
- Tooltip as Tooltip2
5853
+ Tooltip as Tooltip3
5749
5854
  } from "recharts";
5750
- import { jsx as jsx68, jsxs as jsxs42 } from "react/jsx-runtime";
5855
+ import { jsx as jsx69, jsxs as jsxs43 } from "react/jsx-runtime";
5751
5856
  var getRandomColor2 = () => {
5752
5857
  const palette = [
5753
5858
  "#2563eb",
@@ -5916,32 +6021,32 @@ var DonutChart = ({
5916
6021
  }, []);
5917
6022
  const renderLegends = useMemo11(() => {
5918
6023
  if (!showLegends) return null;
5919
- return /* @__PURE__ */ jsx68("div", { className: "flex flex-wrap justify-center gap-2 mt-4 w-full max-w-4xl", children: chartData.map((d, index) => {
6024
+ return /* @__PURE__ */ jsx69("div", { className: "flex flex-wrap justify-center gap-2 mt-4 w-full max-w-4xl", children: chartData.map((d, index) => {
5920
6025
  const actualValue = data.find(
5921
6026
  (item) => item[dataLabel] === d[dataLabel]
5922
6027
  )?.[dataKey] ?? d[dataKey];
5923
6028
  const displayValue = actualValue >= 1e3 ? `${(actualValue / 1e3).toFixed(0)}k` : actualValue.toLocaleString();
5924
- return /* @__PURE__ */ jsxs42(
6029
+ return /* @__PURE__ */ jsxs43(
5925
6030
  "div",
5926
6031
  {
5927
6032
  className: "flex items-center space-x-2 rounded-lg border border-gray-200/50 px-3 py-1.5 w-[48%] sm:w-[32%] md:w-auto bg-white/80 backdrop-blur-sm shadow-sm hover:shadow-md transition-all",
5928
6033
  children: [
5929
- /* @__PURE__ */ jsx68(
6034
+ /* @__PURE__ */ jsx69(
5930
6035
  "span",
5931
6036
  {
5932
6037
  className: "inline-block w-[12px] h-[12px] rounded-full shrink-0 border-2 border-white/50",
5933
6038
  style: { backgroundColor: d.color }
5934
6039
  }
5935
6040
  ),
5936
- /* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
5937
- /* @__PURE__ */ jsx68("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight", children: d[dataLabel] }),
5938
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-1 text-xs text-gray-600 font-medium", children: [
5939
- /* @__PURE__ */ jsx68("span", { children: displayValue }),
5940
- /* @__PURE__ */ jsxs42("span", { children: [
6041
+ /* @__PURE__ */ jsxs43("div", { className: "min-w-0 flex-1", children: [
6042
+ /* @__PURE__ */ jsx69("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight", children: d[dataLabel] }),
6043
+ /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-1 text-xs text-gray-600 font-medium", children: [
6044
+ /* @__PURE__ */ jsx69("span", { children: displayValue }),
6045
+ /* @__PURE__ */ jsxs43("span", { children: [
5941
6046
  (actualValue / total * 100).toFixed(1),
5942
6047
  "%"
5943
6048
  ] }),
5944
- d.isBoosted && /* @__PURE__ */ jsx68("span", { className: "text-[9px] px-1 py-0.5 bg-blue-100 text-blue-700 rounded-full", children: "min" })
6049
+ d.isBoosted && /* @__PURE__ */ jsx69("span", { className: "text-[9px] px-1 py-0.5 bg-blue-100 text-blue-700 rounded-full", children: "min" })
5945
6050
  ] })
5946
6051
  ] })
5947
6052
  ]
@@ -5952,26 +6057,26 @@ var DonutChart = ({
5952
6057
  }, [chartData, data, dataLabel, dataKey, total, showLegends]);
5953
6058
  if (!mounted) return null;
5954
6059
  if (effectiveLoading || data.length === 0) {
5955
- return /* @__PURE__ */ jsxs42(
6060
+ return /* @__PURE__ */ jsxs43(
5956
6061
  "div",
5957
6062
  {
5958
6063
  className: `relative flex flex-col items-center w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
5959
6064
  style,
5960
6065
  children: [
5961
- /* @__PURE__ */ jsx68("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
5962
- /* @__PURE__ */ jsx68("div", { className: "mt-6 text-center", children: /* @__PURE__ */ jsxs42("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-2 rounded-full backdrop-blur-sm border border-gray-200 shadow-lg", children: [
5963
- /* @__PURE__ */ jsx68("div", { className: "w-5 h-5 border-2 border-gray-300 border-t-blue-400 rounded-full animate-spin" }),
5964
- /* @__PURE__ */ jsx68("span", { className: "text-sm font-medium text-gray-600 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
6066
+ /* @__PURE__ */ jsx69("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
6067
+ /* @__PURE__ */ jsx69("div", { className: "mt-6 text-center", children: /* @__PURE__ */ jsxs43("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-2 rounded-full backdrop-blur-sm border border-gray-200 shadow-lg", children: [
6068
+ /* @__PURE__ */ jsx69("div", { className: "w-5 h-5 border-2 border-gray-300 border-t-blue-400 rounded-full animate-spin" }),
6069
+ /* @__PURE__ */ jsx69("span", { className: "text-sm font-medium text-gray-600 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
5965
6070
  ] }) }),
5966
- /* @__PURE__ */ jsx68("div", { className: "flex flex-wrap justify-center gap-3 mt-8 w-full max-w-4xl", children: [...Array(18)].map((_, idx) => /* @__PURE__ */ jsxs42(
6071
+ /* @__PURE__ */ jsx69("div", { className: "flex flex-wrap justify-center gap-3 mt-8 w-full max-w-4xl", children: [...Array(18)].map((_, idx) => /* @__PURE__ */ jsxs43(
5967
6072
  "div",
5968
6073
  {
5969
6074
  className: `h-10 w-[48%] sm:w-[32%] md:w-32 rounded-xl bg-gradient-to-r from-gray-200 via-gray-300/50 to-gray-200 p-3 flex items-center space-x-3 animate-slide-up stagger-${idx} shadow-sm border border-gray-200/50`,
5970
6075
  children: [
5971
- /* @__PURE__ */ jsx68("div", { className: "w-4 h-4 rounded-full bg-gradient-to-r from-blue-300 to-purple-300 animate-pulse" }),
5972
- /* @__PURE__ */ jsxs42("div", { className: "flex-1 space-y-1", children: [
5973
- /* @__PURE__ */ jsx68("div", { className: "h-3 w-20 bg-gray-300 rounded animate-pulse" }),
5974
- /* @__PURE__ */ jsx68("div", { className: "h-2.5 w-16 bg-gray-200/60 rounded animate-pulse-delayed" })
6076
+ /* @__PURE__ */ jsx69("div", { className: "w-4 h-4 rounded-full bg-gradient-to-r from-blue-300 to-purple-300 animate-pulse" }),
6077
+ /* @__PURE__ */ jsxs43("div", { className: "flex-1 space-y-1", children: [
6078
+ /* @__PURE__ */ jsx69("div", { className: "h-3 w-20 bg-gray-300 rounded animate-pulse" }),
6079
+ /* @__PURE__ */ jsx69("div", { className: "h-2.5 w-16 bg-gray-200/60 rounded animate-pulse-delayed" })
5975
6080
  ] })
5976
6081
  ]
5977
6082
  },
@@ -5984,10 +6089,10 @@ var DonutChart = ({
5984
6089
  const { inner, outer } = getDynamicRadius();
5985
6090
  const innerRadius = inner;
5986
6091
  const outerRadius = outer;
5987
- return /* @__PURE__ */ jsxs42("div", { className: `relative flex flex-col items-center ${className}`, style, children: [
5988
- /* @__PURE__ */ jsxs42("div", { className: "relative w-full md:w-[75%] h-[280px] md:h-[380px] flex items-center justify-center mb-2", children: [
5989
- /* @__PURE__ */ jsx68(ResponsiveContainer2, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs42(PieChart, { children: [
5990
- /* @__PURE__ */ jsx68(
6092
+ return /* @__PURE__ */ jsxs43("div", { className: `relative flex flex-col items-center ${className}`, style, children: [
6093
+ /* @__PURE__ */ jsxs43("div", { className: "relative w-full md:w-[75%] h-[280px] md:h-[380px] flex items-center justify-center mb-2", children: [
6094
+ /* @__PURE__ */ jsx69(ResponsiveContainer2, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs43(PieChart, { children: [
6095
+ /* @__PURE__ */ jsx69(
5991
6096
  Pie,
5992
6097
  {
5993
6098
  data: chartData,
@@ -6000,7 +6105,7 @@ var DonutChart = ({
6000
6105
  isAnimationActive: true,
6001
6106
  animationDuration: 800,
6002
6107
  minAngle: 3,
6003
- children: chartData.map((entry, index) => /* @__PURE__ */ jsx68(
6108
+ children: chartData.map((entry, index) => /* @__PURE__ */ jsx69(
6004
6109
  Cell,
6005
6110
  {
6006
6111
  fill: entry.color,
@@ -6011,8 +6116,8 @@ var DonutChart = ({
6011
6116
  ))
6012
6117
  }
6013
6118
  ),
6014
- /* @__PURE__ */ jsx68(
6015
- Tooltip2,
6119
+ /* @__PURE__ */ jsx69(
6120
+ Tooltip3,
6016
6121
  {
6017
6122
  formatter: (value, name, payload) => {
6018
6123
  const label = payload && payload.payload ? payload.payload[dataLabel] : name;
@@ -6034,9 +6139,9 @@ var DonutChart = ({
6034
6139
  }
6035
6140
  )
6036
6141
  ] }) }),
6037
- total > 0 && /* @__PURE__ */ jsx68("div", { className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center pointer-events-none ${forceMobile ? "text-xl px-2" : "text-3xl px-4"} font-bold bg-white/90 backdrop-blur-sm rounded-full py-1 shadow-lg`, children: /* @__PURE__ */ jsxs42("div", { className: "text-[#1f2937] leading-tight", children: [
6142
+ total > 0 && /* @__PURE__ */ jsx69("div", { className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center pointer-events-none ${forceMobile ? "text-xl px-2" : "text-3xl px-4"} font-bold bg-white/90 backdrop-blur-sm rounded-full py-1 shadow-lg`, children: /* @__PURE__ */ jsxs43("div", { className: "text-[#1f2937] leading-tight", children: [
6038
6143
  formattedTotal,
6039
- /* @__PURE__ */ jsx68("span", { className: "text-sm md:text-base font-normal text-gray-600 block md:inline-block md:ml-1", children: "total" })
6144
+ /* @__PURE__ */ jsx69("span", { className: "text-sm md:text-base font-normal text-gray-600 block md:inline-block md:ml-1", children: "total" })
6040
6145
  ] }) })
6041
6146
  ] }),
6042
6147
  renderLegends
@@ -6045,10 +6150,10 @@ var DonutChart = ({
6045
6150
  var PieChart_default = React14.memo(DonutChart);
6046
6151
 
6047
6152
  // src/components/Blocks/EmailComposer.tsx
6048
- import { jsx as jsx69, jsxs as jsxs43 } from "react/jsx-runtime";
6153
+ import { jsx as jsx70, jsxs as jsxs44 } from "react/jsx-runtime";
6049
6154
  function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
6050
- return /* @__PURE__ */ jsx69("div", { className, style, children: /* @__PURE__ */ jsxs43("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
6051
- /* @__PURE__ */ jsx69("div", { className: "mb-3", children: /* @__PURE__ */ jsx69(
6155
+ return /* @__PURE__ */ jsx70("div", { className, style, children: /* @__PURE__ */ jsxs44("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
6156
+ /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
6052
6157
  "input",
6053
6158
  {
6054
6159
  type: "email",
@@ -6057,8 +6162,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6057
6162
  required: true
6058
6163
  }
6059
6164
  ) }),
6060
- /* @__PURE__ */ jsx69("div", { className: "mb-3", children: /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2", children: [
6061
- /* @__PURE__ */ jsx69(
6165
+ /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
6166
+ /* @__PURE__ */ jsx70(
6062
6167
  "input",
6063
6168
  {
6064
6169
  type: "email",
@@ -6069,7 +6174,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6069
6174
  required: true
6070
6175
  }
6071
6176
  ),
6072
- !showCc && /* @__PURE__ */ jsx69(
6177
+ !showCc && /* @__PURE__ */ jsx70(
6073
6178
  "button",
6074
6179
  {
6075
6180
  onClick: () => setShowCc?.(true),
@@ -6077,7 +6182,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6077
6182
  children: "Cc"
6078
6183
  }
6079
6184
  ),
6080
- !showBcc && /* @__PURE__ */ jsx69(
6185
+ !showBcc && /* @__PURE__ */ jsx70(
6081
6186
  "button",
6082
6187
  {
6083
6188
  onClick: () => setShowBcc?.(true),
@@ -6086,7 +6191,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6086
6191
  }
6087
6192
  )
6088
6193
  ] }) }),
6089
- showCc && /* @__PURE__ */ jsx69("div", { className: "mb-3", children: /* @__PURE__ */ jsx69(
6194
+ showCc && /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
6090
6195
  "input",
6091
6196
  {
6092
6197
  type: "text",
@@ -6096,7 +6201,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6096
6201
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
6097
6202
  }
6098
6203
  ) }),
6099
- showBcc && /* @__PURE__ */ jsx69("div", { className: "mb-3", children: /* @__PURE__ */ jsx69(
6204
+ showBcc && /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
6100
6205
  "input",
6101
6206
  {
6102
6207
  type: "text",
@@ -6106,7 +6211,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6106
6211
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
6107
6212
  }
6108
6213
  ) }),
6109
- /* @__PURE__ */ jsx69("div", { className: "mb-3", children: /* @__PURE__ */ jsx69(
6214
+ /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
6110
6215
  "input",
6111
6216
  {
6112
6217
  type: "text",
@@ -6116,11 +6221,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6116
6221
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
6117
6222
  }
6118
6223
  ) }),
6119
- /* @__PURE__ */ jsx69("div", { className: "mb-4", children: /* @__PURE__ */ jsx69(MyEditor, { value: body, onChange: setBody }) }),
6120
- /* @__PURE__ */ jsxs43("div", { className: "flex justify-end gap-2", children: [
6121
- /* @__PURE__ */ jsx69("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
6122
- /* @__PURE__ */ jsx69("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
6123
- /* @__PURE__ */ jsx69("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
6224
+ /* @__PURE__ */ jsx70("div", { className: "mb-4", children: /* @__PURE__ */ jsx70(MyEditor, { value: body, onChange: setBody }) }),
6225
+ /* @__PURE__ */ jsxs44("div", { className: "flex justify-end gap-2", children: [
6226
+ /* @__PURE__ */ jsx70("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
6227
+ /* @__PURE__ */ jsx70("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
6228
+ /* @__PURE__ */ jsx70("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
6124
6229
  ] })
6125
6230
  ] }) });
6126
6231
  }
@@ -6128,10 +6233,10 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6128
6233
  // src/components/ui/sonner.tsx
6129
6234
  import { useTheme } from "next-themes";
6130
6235
  import { Toaster as Sonner } from "sonner";
6131
- import { jsx as jsx70 } from "react/jsx-runtime";
6236
+ import { jsx as jsx71 } from "react/jsx-runtime";
6132
6237
  var Toaster = ({ ...props }) => {
6133
6238
  const { theme = "system" } = useTheme();
6134
- return /* @__PURE__ */ jsx70(
6239
+ return /* @__PURE__ */ jsx71(
6135
6240
  Sonner,
6136
6241
  {
6137
6242
  theme,