@datatechsolutions/ui 2.11.88 → 2.11.90

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.
Files changed (99) hide show
  1. package/dist/astrlabe/index.js +106 -106
  2. package/dist/astrlabe/index.mjs +3 -3
  3. package/dist/astrlabe/workflow-canvas.js +3 -3
  4. package/dist/astrlabe/workflow-canvas.mjs +2 -2
  5. package/dist/{chunk-K26RY4EQ.js → chunk-5EBDOY4M.js} +26 -26
  6. package/dist/{chunk-K26RY4EQ.js.map → chunk-5EBDOY4M.js.map} +1 -1
  7. package/dist/{chunk-TLDVFFAK.mjs → chunk-5NOWS6T3.mjs} +3 -3
  8. package/dist/{chunk-TLDVFFAK.mjs.map → chunk-5NOWS6T3.mjs.map} +1 -1
  9. package/dist/{chunk-X2KCCQPL.js → chunk-64DLD6FB.js} +55 -55
  10. package/dist/{chunk-X2KCCQPL.js.map → chunk-64DLD6FB.js.map} +1 -1
  11. package/dist/{chunk-NAQ32ZPG.mjs → chunk-76XIV6VV.mjs} +6 -6
  12. package/dist/{chunk-NAQ32ZPG.mjs.map → chunk-76XIV6VV.mjs.map} +1 -1
  13. package/dist/{chunk-URDQSUW6.js → chunk-7GDDBF6E.js} +39 -39
  14. package/dist/{chunk-URDQSUW6.js.map → chunk-7GDDBF6E.js.map} +1 -1
  15. package/dist/{chunk-3YVQXDKJ.js → chunk-APXM5GFL.js} +4 -4
  16. package/dist/{chunk-3YVQXDKJ.js.map → chunk-APXM5GFL.js.map} +1 -1
  17. package/dist/{chunk-TZ62G5WM.js → chunk-B3DI2QUM.js} +84 -66
  18. package/dist/chunk-B3DI2QUM.js.map +1 -0
  19. package/dist/{chunk-G7DZU3NM.mjs → chunk-CM5C4M4F.mjs} +3 -3
  20. package/dist/{chunk-G7DZU3NM.mjs.map → chunk-CM5C4M4F.mjs.map} +1 -1
  21. package/dist/{chunk-MXFEU7A6.js → chunk-DIKLHCEM.js} +4 -4
  22. package/dist/{chunk-MXFEU7A6.js.map → chunk-DIKLHCEM.js.map} +1 -1
  23. package/dist/{chunk-ZHHRWC27.js → chunk-FDK3PUTV.js} +135 -148
  24. package/dist/chunk-FDK3PUTV.js.map +1 -0
  25. package/dist/{chunk-XOZMUCMF.mjs → chunk-FS6SU7RE.mjs} +3 -3
  26. package/dist/{chunk-XOZMUCMF.mjs.map → chunk-FS6SU7RE.mjs.map} +1 -1
  27. package/dist/{chunk-UUHV5KHF.js → chunk-FXLGNKP4.js} +33 -33
  28. package/dist/{chunk-UUHV5KHF.js.map → chunk-FXLGNKP4.js.map} +1 -1
  29. package/dist/{chunk-TOEMSC4P.mjs → chunk-IL5RSF2U.mjs} +6 -6
  30. package/dist/{chunk-TOEMSC4P.mjs.map → chunk-IL5RSF2U.mjs.map} +1 -1
  31. package/dist/{chunk-GEUGFYLO.mjs → chunk-K6FX26BG.mjs} +3 -3
  32. package/dist/{chunk-GEUGFYLO.mjs.map → chunk-K6FX26BG.mjs.map} +1 -1
  33. package/dist/{chunk-2URBM4LA.js → chunk-M7PKDVKA.js} +6 -6
  34. package/dist/{chunk-2URBM4LA.js.map → chunk-M7PKDVKA.js.map} +1 -1
  35. package/dist/{chunk-SUHNSUMH.mjs → chunk-MJOYUX2C.mjs} +4 -4
  36. package/dist/{chunk-SUHNSUMH.mjs.map → chunk-MJOYUX2C.mjs.map} +1 -1
  37. package/dist/{chunk-HK6J6HQP.mjs → chunk-MR3BLQAU.mjs} +11 -24
  38. package/dist/chunk-MR3BLQAU.mjs.map +1 -0
  39. package/dist/{chunk-SAYVWIMJ.js → chunk-MWZQF2D5.js} +4 -4
  40. package/dist/{chunk-SAYVWIMJ.js.map → chunk-MWZQF2D5.js.map} +1 -1
  41. package/dist/{chunk-RV555OEO.mjs → chunk-ODEUUB2T.mjs} +4 -4
  42. package/dist/{chunk-RV555OEO.mjs.map → chunk-ODEUUB2T.mjs.map} +1 -1
  43. package/dist/{chunk-UVEPTYZC.js → chunk-QHTA2ISY.js} +12 -12
  44. package/dist/{chunk-UVEPTYZC.js.map → chunk-QHTA2ISY.js.map} +1 -1
  45. package/dist/{chunk-JUTOBBBI.mjs → chunk-QYH6WLKE.mjs} +4 -4
  46. package/dist/{chunk-JUTOBBBI.mjs.map → chunk-QYH6WLKE.mjs.map} +1 -1
  47. package/dist/{chunk-LBALE4JX.js → chunk-R5D6LLDF.js} +67 -67
  48. package/dist/{chunk-LBALE4JX.js.map → chunk-R5D6LLDF.js.map} +1 -1
  49. package/dist/{chunk-5HXDJBVX.mjs → chunk-RTQOGG4T.mjs} +4 -4
  50. package/dist/{chunk-5HXDJBVX.mjs.map → chunk-RTQOGG4T.mjs.map} +1 -1
  51. package/dist/{chunk-ZJQ5RLGK.mjs → chunk-S3JHPXOX.mjs} +539 -307
  52. package/dist/chunk-S3JHPXOX.mjs.map +1 -0
  53. package/dist/{chunk-D4TESEYK.mjs → chunk-T3S6KZN3.mjs} +24 -7
  54. package/dist/chunk-T3S6KZN3.mjs.map +1 -0
  55. package/dist/{chunk-NBCOVUQP.mjs → chunk-TLTYLDX4.mjs} +3 -3
  56. package/dist/{chunk-NBCOVUQP.mjs.map → chunk-TLTYLDX4.mjs.map} +1 -1
  57. package/dist/{chunk-Q2MG7S2E.js → chunk-ULWVYDDG.js} +15 -15
  58. package/dist/{chunk-Q2MG7S2E.js.map → chunk-ULWVYDDG.js.map} +1 -1
  59. package/dist/{chunk-4667D2ZT.mjs → chunk-UZ3FGGUP.mjs} +3 -3
  60. package/dist/{chunk-4667D2ZT.mjs.map → chunk-UZ3FGGUP.mjs.map} +1 -1
  61. package/dist/{chunk-SV4SMITM.js → chunk-WAOCUWO3.js} +36 -36
  62. package/dist/{chunk-SV4SMITM.js.map → chunk-WAOCUWO3.js.map} +1 -1
  63. package/dist/{chunk-ZARCUQA6.js → chunk-WETG7OO3.js} +53 -53
  64. package/dist/{chunk-ZARCUQA6.js.map → chunk-WETG7OO3.js.map} +1 -1
  65. package/dist/{chunk-KNXAOJAK.js → chunk-ZBX2QSNH.js} +532 -300
  66. package/dist/chunk-ZBX2QSNH.js.map +1 -0
  67. package/dist/{chunk-F4TOOARV.mjs → chunk-ZV5ZRT6E.mjs} +3 -3
  68. package/dist/{chunk-F4TOOARV.mjs.map → chunk-ZV5ZRT6E.mjs.map} +1 -1
  69. package/dist/index.d.mts +154 -0
  70. package/dist/index.d.ts +154 -0
  71. package/dist/index.js +744 -744
  72. package/dist/index.mjs +1 -1
  73. package/dist/platform/admin/index.js +10 -10
  74. package/dist/platform/admin/index.mjs +4 -4
  75. package/dist/platform/agents-workspace.js +6 -6
  76. package/dist/platform/agents-workspace.mjs +5 -5
  77. package/dist/platform/app-shell.js +3 -3
  78. package/dist/platform/app-shell.mjs +2 -2
  79. package/dist/platform/auth/index.js +27 -27
  80. package/dist/platform/auth/index.mjs +4 -4
  81. package/dist/platform/billing/index.js +3 -3
  82. package/dist/platform/billing/index.mjs +2 -2
  83. package/dist/platform/impersonation/index.js +3 -3
  84. package/dist/platform/impersonation/index.mjs +2 -2
  85. package/dist/platform/index.js +91 -91
  86. package/dist/platform/index.mjs +18 -18
  87. package/dist/platform/pages/index.js +195 -195
  88. package/dist/platform/pages/index.mjs +7 -7
  89. package/dist/platform/settings/index.js +7 -7
  90. package/dist/platform/settings/index.mjs +6 -6
  91. package/dist/platform/workflow-canvas-shell.js +4 -4
  92. package/dist/platform/workflow-canvas-shell.mjs +3 -3
  93. package/package.json +1 -2
  94. package/dist/chunk-D4TESEYK.mjs.map +0 -1
  95. package/dist/chunk-HK6J6HQP.mjs.map +0 -1
  96. package/dist/chunk-KNXAOJAK.js.map +0 -1
  97. package/dist/chunk-TZ62G5WM.js.map +0 -1
  98. package/dist/chunk-ZHHRWC27.js.map +0 -1
  99. package/dist/chunk-ZJQ5RLGK.mjs.map +0 -1
@@ -10,12 +10,12 @@ var React12 = require('react');
10
10
  var framerMotion = require('framer-motion');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  var solid = require('@heroicons/react/20/solid');
13
+ var solid$1 = require('@heroicons/react/24/solid');
13
14
  var HeroIcons = require('@heroicons/react/24/outline');
14
15
  var Popover = require('@radix-ui/react-popover');
15
16
  var reactDom = require('react-dom');
16
17
  var dateFns = require('date-fns');
17
18
  var locale = require('date-fns/locale');
18
- var solid$1 = require('@heroicons/react/24/solid');
19
19
  var reactTransitionProgress = require('react-transition-progress');
20
20
  var lucideReact = require('lucide-react');
21
21
  var d3Geo = require('d3-geo');
@@ -2248,6 +2248,287 @@ function renderBars(series, seriesIndex, seriesCount, count, domain, width, heig
2248
2248
  );
2249
2249
  }) }, series.name);
2250
2250
  }
2251
+ function ItemSummary({
2252
+ icon,
2253
+ title,
2254
+ subtitle,
2255
+ metadata,
2256
+ iconContainerClassName = "flex size-10 flex-shrink-0 items-center justify-center rounded-lg bg-indigo-100 dark:bg-indigo-900/30",
2257
+ titleClassName = "truncate text-sm font-semibold text-gray-900 dark:text-white",
2258
+ subtitleClassName = "truncate text-xs text-gray-500 dark:text-gray-400",
2259
+ metadataContainerClassName = "mt-2 flex flex-wrap gap-3",
2260
+ metadataLabelClassName = "text-xs text-gray-500 dark:text-gray-400",
2261
+ metadataValueClassName = "text-xs font-medium text-gray-900 dark:text-white"
2262
+ }) {
2263
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 min-w-0 items-start gap-3", children: [
2264
+ icon ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: iconContainerClassName, children: icon }) : null,
2265
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
2266
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title }),
2267
+ subtitle ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: subtitleClassName, children: subtitle }) : null,
2268
+ metadata && metadata.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: metadataContainerClassName, children: metadata.map((metadataItem, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
2269
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: metadataLabelClassName, children: metadataItem.label }),
2270
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: metadataValueClassName, children: metadataItem.value })
2271
+ ] }, index)) }) : null
2272
+ ] })
2273
+ ] });
2274
+ }
2275
+ function isPlainTextTitle(title) {
2276
+ return typeof title === "string" || typeof title === "number";
2277
+ }
2278
+ function getTestIdFromTitle(title) {
2279
+ if (isPlainTextTitle(title)) {
2280
+ return `entity-card-${String(title).toLowerCase().replace(/\s+/g, "-")}`;
2281
+ }
2282
+ return "entity-card";
2283
+ }
2284
+ function StatusBadgeInternal({ status }) {
2285
+ const tCommon = chunkYXN2K77G_js.useTranslations("common");
2286
+ if (typeof status !== "boolean") {
2287
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: status });
2288
+ }
2289
+ return /* @__PURE__ */ jsxRuntime.jsx(
2290
+ "span",
2291
+ {
2292
+ className: `shrink-0 rounded-full px-2 py-0.5 text-xs font-medium ${status ? "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300" : "bg-white/40 text-slate-500 dark:bg-white/[0.08] dark:text-slate-400"}`,
2293
+ children: status ? tCommon("active") : tCommon("inactive")
2294
+ }
2295
+ );
2296
+ }
2297
+ function EntityCard({
2298
+ icon,
2299
+ title,
2300
+ subtitle,
2301
+ status,
2302
+ accentGradient,
2303
+ children,
2304
+ footer,
2305
+ onClick,
2306
+ className = "",
2307
+ dragProps
2308
+ }) {
2309
+ const isInteractive = Boolean(onClick);
2310
+ const plainTextTitle = isPlainTextTitle(title) ? String(title) : void 0;
2311
+ const handleKeyDown = React12.useCallback(
2312
+ (event) => {
2313
+ if (onClick && (event.key === "Enter" || event.key === " ")) {
2314
+ event.preventDefault();
2315
+ onClick();
2316
+ }
2317
+ },
2318
+ [onClick]
2319
+ );
2320
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2321
+ Card,
2322
+ {
2323
+ role: isInteractive ? "article" : "listitem",
2324
+ "aria-label": isInteractive ? plainTextTitle : void 0,
2325
+ "data-testid": getTestIdFromTitle(title),
2326
+ tabIndex: isInteractive ? 0 : void 0,
2327
+ onKeyDown: isInteractive ? handleKeyDown : void 0,
2328
+ className: `group overflow-hidden transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md ${isInteractive ? "cursor-pointer" : ""} ${className}`,
2329
+ onPress: onClick,
2330
+ pressable: isInteractive,
2331
+ ...dragProps,
2332
+ children: [
2333
+ accentGradient && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-1.5 w-full bg-gradient-to-r ${accentGradient}` }),
2334
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
2335
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
2336
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "entity-card-title", children: /* @__PURE__ */ jsxRuntime.jsx(
2337
+ ItemSummary,
2338
+ {
2339
+ icon,
2340
+ title,
2341
+ subtitle: subtitle ? /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "entity-card-subtitle", children: subtitle }) : void 0,
2342
+ iconContainerClassName: "shrink-0",
2343
+ titleClassName: isPlainTextTitle(title) ? "truncate font-semibold text-slate-900 dark:text-white" : "font-semibold text-slate-900 dark:text-white",
2344
+ subtitleClassName: "mt-0.5 text-xs text-slate-500 dark:text-slate-400"
2345
+ }
2346
+ ) }),
2347
+ status !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(StatusBadgeInternal, { status })
2348
+ ] }),
2349
+ children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children }),
2350
+ footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 border-t border-white/30 pt-3 dark:border-white/10 flex gap-2 justify-end opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-within:opacity-100", children: footer })
2351
+ ] })
2352
+ ]
2353
+ }
2354
+ );
2355
+ }
2356
+ var TONE_STYLES = {
2357
+ error: { container: "border-red-500/30 bg-red-500/20 text-red-600 dark:text-red-400", dot: "bg-red-500" },
2358
+ warning: { container: "border-amber-500/30 bg-amber-500/20 text-amber-600 dark:text-amber-400", dot: "bg-amber-500" },
2359
+ info: { container: "border-blue-500/30 bg-blue-500/20 text-blue-600 dark:text-blue-400", dot: "bg-blue-500" },
2360
+ neutral: { container: "border-slate-500/30 bg-slate-500/20 text-slate-600 dark:text-slate-400", dot: "bg-slate-500" },
2361
+ success: { container: "border-emerald-500/30 bg-emerald-500/20 text-emerald-600 dark:text-emerald-400", dot: "bg-emerald-500" }
2362
+ };
2363
+ var LEGACY_STATUS_STYLES = {
2364
+ pending: "border-yellow-200 bg-yellow-50 text-yellow-700 dark:border-yellow-700/30 dark:bg-yellow-900/20 dark:text-yellow-400",
2365
+ approved: "border-green-200 bg-green-50 text-green-700 dark:border-green-700/30 dark:bg-green-900/20 dark:text-green-400",
2366
+ rejected: "border-red-200 bg-red-50 text-red-700 dark:border-red-700/30 dark:bg-red-900/20 dark:text-red-400",
2367
+ active: "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-700/30 dark:bg-emerald-900/20 dark:text-emerald-400",
2368
+ inactive: "border-white/30 dark:border-white/10 bg-slate-500/10 text-slate-700 dark:bg-slate-900/20 dark:text-slate-400",
2369
+ processing: "border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-700/30 dark:bg-blue-900/20 dark:text-blue-400",
2370
+ error: "border-red-200 bg-red-50 text-red-700 dark:border-red-700/30 dark:bg-red-900/20 dark:text-red-400",
2371
+ success: "border-green-200 bg-green-50 text-green-700 dark:border-green-700/30 dark:bg-green-900/20 dark:text-green-400"
2372
+ };
2373
+ var LEGACY_DOT_STYLES = {
2374
+ pending: "bg-yellow-500",
2375
+ approved: "bg-green-500",
2376
+ rejected: "bg-red-500",
2377
+ active: "bg-emerald-500",
2378
+ inactive: "bg-slate-500",
2379
+ processing: "bg-blue-500",
2380
+ error: "bg-red-500",
2381
+ success: "bg-green-500"
2382
+ };
2383
+ var SIZE_STYLES = {
2384
+ sm: "px-2 py-0.5 text-xs",
2385
+ md: "px-2.5 py-1 text-xs"
2386
+ };
2387
+ var DEFAULT_LEGACY_STYLE = "border-white/30 dark:border-white/10 bg-slate-500/10 text-slate-700 dark:bg-slate-900/20 dark:text-slate-400";
2388
+ var StatusBadge = React12.forwardRef(function StatusBadge2({ status, label, size = "md", className = "", ...props }, ref) {
2389
+ if ("statusConfig" in props && props.statusConfig) {
2390
+ const configuredStatus = props.statusConfig[status];
2391
+ if (!configuredStatus) {
2392
+ return null;
2393
+ }
2394
+ const toneStyle = TONE_STYLES[configuredStatus.tone ?? "neutral"];
2395
+ const IconComponent = configuredStatus.icon;
2396
+ const resolvedLabel2 = label ?? configuredStatus.label;
2397
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2398
+ "div",
2399
+ {
2400
+ ref,
2401
+ role: "status",
2402
+ "aria-label": `Status: ${status}`,
2403
+ "data-testid": `status-badge-${status}`,
2404
+ className: `inline-flex items-center gap-1.5 rounded-full border font-semibold backdrop-blur-sm ${SIZE_STYLES[size]} ${toneStyle.container} ${className}`,
2405
+ children: [
2406
+ IconComponent ? /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: `h-3 w-3 ${configuredStatus.animateIcon ? "animate-spin motion-reduce:animate-none" : ""}` }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${toneStyle.dot}` }),
2407
+ resolvedLabel2
2408
+ ]
2409
+ }
2410
+ );
2411
+ }
2412
+ const legacyStyle = LEGACY_STATUS_STYLES[status] ?? DEFAULT_LEGACY_STYLE;
2413
+ const legacyDot = LEGACY_DOT_STYLES[status] ?? "bg-slate-500";
2414
+ const resolvedLabel = label ?? status;
2415
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2416
+ "div",
2417
+ {
2418
+ ref,
2419
+ role: "status",
2420
+ "aria-label": `Status: ${status}`,
2421
+ "data-testid": `status-badge-${status}`,
2422
+ className: `inline-flex items-center gap-1.5 rounded-full border font-semibold ${SIZE_STYLES[size]} ${legacyStyle} ${className}`,
2423
+ children: [
2424
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${legacyDot}` }),
2425
+ resolvedLabel
2426
+ ]
2427
+ }
2428
+ );
2429
+ });
2430
+ function classNames(...classes) {
2431
+ return classes.filter(Boolean).join(" ");
2432
+ }
2433
+ function StepTimeline({
2434
+ steps,
2435
+ progressLabel,
2436
+ onStepClick,
2437
+ renderCompleteContent
2438
+ }) {
2439
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:border-t lg:border-b lg:border-gray-200 dark:lg:border-white/15", children: /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": progressLabel, className: "mx-auto max-w-7xl px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxRuntime.jsx(
2440
+ "ol",
2441
+ {
2442
+ role: "list",
2443
+ className: "overflow-hidden rounded-md lg:flex lg:rounded-none lg:border-r lg:border-l lg:border-gray-200 dark:lg:border-white/15",
2444
+ children: steps.map((step2, stepIndex) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "relative overflow-hidden lg:flex-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
2445
+ "button",
2446
+ {
2447
+ type: "button",
2448
+ onClick: () => onStepClick?.(stepIndex),
2449
+ disabled: step2.status === "upcoming",
2450
+ className: classNames(
2451
+ step2.status === "upcoming" ? "cursor-not-allowed" : "cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800",
2452
+ stepIndex === 0 ? "rounded-t-md border-b-0" : "",
2453
+ stepIndex === steps.length - 1 ? "rounded-b-md border-t-0" : "",
2454
+ "w-full overflow-hidden border border-gray-200 text-left transition-colors lg:border-0 dark:border-white/15"
2455
+ ),
2456
+ children: [
2457
+ step2.status === "complete" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
2458
+ /* @__PURE__ */ jsxRuntime.jsx(
2459
+ "span",
2460
+ {
2461
+ "aria-hidden": "true",
2462
+ className: "absolute top-0 left-0 h-full w-1 bg-transparent group-hover:bg-gray-200 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:group-hover:bg-white/20"
2463
+ }
2464
+ ),
2465
+ renderCompleteContent ? renderCompleteContent(step2) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
2466
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-blue-600 dark:bg-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx(solid$1.CheckIcon, { "aria-hidden": "true", className: "h-5 w-5 text-white" }) }) }),
2467
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
2468
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-white", children: step2.name }),
2469
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
2470
+ ] })
2471
+ ] })
2472
+ ] }) : step2.status === "current" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { "aria-current": "step", children: [
2473
+ /* @__PURE__ */ jsxRuntime.jsx(
2474
+ "span",
2475
+ {
2476
+ "aria-hidden": "true",
2477
+ className: "absolute top-0 left-0 h-full w-1 bg-blue-600 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:bg-blue-500"
2478
+ }
2479
+ ),
2480
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
2481
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-blue-600 dark:border-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-blue-600 dark:text-blue-400", children: step2.id }) }) }),
2482
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
2483
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-blue-600 dark:text-blue-400", children: step2.name }),
2484
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
2485
+ ] })
2486
+ ] })
2487
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
2488
+ /* @__PURE__ */ jsxRuntime.jsx(
2489
+ "span",
2490
+ {
2491
+ "aria-hidden": "true",
2492
+ className: "absolute top-0 left-0 h-full w-1 bg-transparent group-hover:bg-gray-200 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:group-hover:bg-white/20"
2493
+ }
2494
+ ),
2495
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
2496
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-gray-300 dark:border-white/15", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500 dark:text-gray-400", children: step2.id }) }) }),
2497
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
2498
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.name }),
2499
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
2500
+ ] })
2501
+ ] })
2502
+ ] }),
2503
+ stepIndex !== 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute inset-0 top-0 left-0 hidden w-3 lg:block", children: /* @__PURE__ */ jsxRuntime.jsx(
2504
+ "svg",
2505
+ {
2506
+ fill: "none",
2507
+ viewBox: "0 0 12 82",
2508
+ preserveAspectRatio: "none",
2509
+ className: "h-full w-full text-gray-200 dark:text-white/15",
2510
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0.5 0V31L10.5 41L0.5 51V82", stroke: "currentColor", vectorEffect: "non-scaling-stroke" })
2511
+ }
2512
+ ) }) : null
2513
+ ]
2514
+ }
2515
+ ) }, step2.id))
2516
+ }
2517
+ ) }) });
2518
+ }
2519
+ function AgentAnalysisCard({ name, avatar, duration, output }) {
2520
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface rounded-xl p-3 transition-all duration-300", children: [
2521
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-1.5", children: [
2522
+ /* @__PURE__ */ jsxRuntime.jsx("img", { src: avatar, alt: "", className: "h-6 w-6 rounded-lg" }),
2523
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
2524
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] font-semibold text-white", children: name }),
2525
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[8px] text-gray-500", children: duration })
2526
+ ] }),
2527
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckCircleIcon, { className: "h-3.5 w-3.5 text-emerald-400 shrink-0" })
2528
+ ] }),
2529
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[8px] text-gray-400 leading-relaxed", children: output })
2530
+ ] });
2531
+ }
2251
2532
  function DashboardView({ spec, className }) {
2252
2533
  const layout = spec.layout ?? "grid";
2253
2534
  const hasCharts = (spec.charts?.length ?? 0) > 0;
@@ -2280,6 +2561,13 @@ function DashboardView({ spec, className }) {
2280
2561
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-indigo-700 dark:text-indigo-300", children: "Recommendation" }),
2281
2562
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-indigo-900 dark:text-indigo-100", children: spec.recommendation })
2282
2563
  ] }),
2564
+ spec.sections && spec.sections.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: spec.sections.map((section, index) => /* @__PURE__ */ jsxRuntime.jsx(
2565
+ DashboardSectionRenderer,
2566
+ {
2567
+ section
2568
+ },
2569
+ `${section.type}-${index}`
2570
+ )) }),
2283
2571
  spec.meta && Object.keys(spec.meta).length > 0 && /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "flex flex-wrap gap-4 text-[10px] text-slate-400 dark:text-slate-500", children: Object.entries(spec.meta).map(([key, value]) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2284
2572
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold uppercase tracking-wide", children: key }),
2285
2573
  ": ",
@@ -2347,6 +2635,230 @@ function formatNumber(value) {
2347
2635
  if (Math.abs(value) >= 1e3) return new Intl.NumberFormat("en-US").format(Math.round(value));
2348
2636
  return value.toFixed(Math.abs(value) < 10 ? 2 : 1);
2349
2637
  }
2638
+ function DashboardSectionRenderer({ section }) {
2639
+ switch (section.type) {
2640
+ case "entity":
2641
+ return /* @__PURE__ */ jsxRuntime.jsx(EntitySection, { data: section.data });
2642
+ case "narrative":
2643
+ return /* @__PURE__ */ jsxRuntime.jsx(NarrativeSection, { data: section.data });
2644
+ case "lifecycle":
2645
+ return /* @__PURE__ */ jsxRuntime.jsx(LifecycleSection, { data: section.data });
2646
+ case "receipt":
2647
+ return /* @__PURE__ */ jsxRuntime.jsx(ReceiptSection, { data: section.data });
2648
+ case "approval":
2649
+ return /* @__PURE__ */ jsxRuntime.jsx(ApprovalSection, { data: section.data });
2650
+ case "fiscal":
2651
+ return /* @__PURE__ */ jsxRuntime.jsx(FiscalSection, { data: section.data });
2652
+ case "feed":
2653
+ return /* @__PURE__ */ jsxRuntime.jsx(FeedSection, { data: section.data });
2654
+ case "score":
2655
+ return /* @__PURE__ */ jsxRuntime.jsx(ScoreSection, { data: section.data });
2656
+ case "note":
2657
+ return /* @__PURE__ */ jsxRuntime.jsx(NoteSection, { data: section.data });
2658
+ default:
2659
+ return /* @__PURE__ */ jsxRuntime.jsx(NoteSection, { data: { body: JSON.stringify(section, null, 2), tone: "info" } });
2660
+ }
2661
+ }
2662
+ function EntitySection({ data }) {
2663
+ const statusKey = data.status?.tone === "success" ? "success" : data.status?.tone === "danger" ? "error" : data.status?.tone === "warning" ? "pending" : data.status?.tone === "info" ? "processing" : "active";
2664
+ return /* @__PURE__ */ jsxRuntime.jsx(
2665
+ EntityCard,
2666
+ {
2667
+ title: data.title,
2668
+ subtitle: data.subtitle,
2669
+ status: data.status ? /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: statusKey, label: data.status.label }) : void 0,
2670
+ children: data.fields && data.fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
2671
+ ItemSummary,
2672
+ {
2673
+ title: "",
2674
+ metadata: data.fields.map((f) => ({ label: f.label, value: String(f.value) }))
2675
+ }
2676
+ )
2677
+ }
2678
+ );
2679
+ }
2680
+ function NarrativeSection({ data }) {
2681
+ if (data.agent) {
2682
+ return /* @__PURE__ */ jsxRuntime.jsx(
2683
+ AgentAnalysisCard,
2684
+ {
2685
+ name: data.agent.name,
2686
+ avatar: data.agent.avatarUrl ?? "",
2687
+ duration: data.durationMs !== void 0 ? `${(data.durationMs / 1e3).toFixed(1)}s` : "",
2688
+ output: data.body
2689
+ }
2690
+ );
2691
+ }
2692
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-zinc-950/10 bg-white p-4 dark:border-white/10 dark:bg-zinc-900", children: [
2693
+ data.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: data.title }),
2694
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 whitespace-pre-line text-sm leading-relaxed text-slate-700 dark:text-slate-300", children: data.body })
2695
+ ] });
2696
+ }
2697
+ function LifecycleSection({ data }) {
2698
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-zinc-950/10 bg-white p-4 dark:border-white/10 dark:bg-zinc-900", children: [
2699
+ data.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-3 text-sm font-semibold text-slate-900 dark:text-slate-100", children: data.title }),
2700
+ /* @__PURE__ */ jsxRuntime.jsx(
2701
+ StepTimeline,
2702
+ {
2703
+ steps: data.steps,
2704
+ progressLabel: data.progressLabel ?? data.title ?? "Progress"
2705
+ }
2706
+ )
2707
+ ] });
2708
+ }
2709
+ function ReceiptSection({ data }) {
2710
+ const currency = data.currency ?? "BRL";
2711
+ const fmt = (v) => typeof v === "number" ? new Intl.NumberFormat("pt-BR", { style: "currency", currency }).format(v) : v;
2712
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-zinc-950/10 bg-white dark:border-white/10 dark:bg-zinc-900", children: [
2713
+ data.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "border-b border-zinc-950/10 px-5 py-3 text-sm font-semibold text-slate-900 dark:border-white/10 dark:text-slate-100", children: data.title }),
2714
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700", children: [
2715
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-zinc-50 dark:bg-zinc-800/50", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
2716
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Item" }),
2717
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-2 text-right text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Qtd" }),
2718
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-2 text-right text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Unit." }),
2719
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-2 text-right text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Total" })
2720
+ ] }) }),
2721
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-zinc-100 dark:divide-zinc-800", children: data.items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
2722
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-2 text-left text-slate-700 dark:text-slate-300", children: item.description }),
2723
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-2 text-right text-slate-700 dark:text-slate-300", children: item.quantity }),
2724
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-2 text-right text-slate-700 dark:text-slate-300", children: fmt(item.unitPrice) }),
2725
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-2 text-right font-medium text-slate-900 dark:text-slate-100", children: fmt(item.total) })
2726
+ ] }, i)) }),
2727
+ /* @__PURE__ */ jsxRuntime.jsxs("tfoot", { className: "border-t border-zinc-200 dark:border-zinc-700", children: [
2728
+ data.subtotal !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
2729
+ /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 3, className: "px-4 py-1.5 text-right text-xs text-slate-500", children: "Subtotal" }),
2730
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-1.5 text-right text-xs text-slate-700 dark:text-slate-300", children: fmt(data.subtotal) })
2731
+ ] }),
2732
+ data.tax !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
2733
+ /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 3, className: "px-4 py-1.5 text-right text-xs text-slate-500", children: "Tributos" }),
2734
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-1.5 text-right text-xs text-slate-700 dark:text-slate-300", children: fmt(data.tax) })
2735
+ ] }),
2736
+ /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
2737
+ /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 3, className: "px-4 py-2 text-right text-sm font-semibold text-slate-900 dark:text-slate-100", children: "Total" }),
2738
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-2 text-right text-sm font-semibold text-slate-900 dark:text-slate-100", children: fmt(data.total) })
2739
+ ] })
2740
+ ] })
2741
+ ] }) })
2742
+ ] });
2743
+ }
2744
+ function ApprovalSection({ data }) {
2745
+ const tone = data.decision === "approved" ? "success" : data.decision === "rejected" ? "danger" : "warning";
2746
+ const accentClasses = TONE_BLOCK[tone];
2747
+ return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `rounded-xl border p-4 ${accentClasses}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
2748
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
2749
+ data.prompt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: data.prompt }),
2750
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-1 text-sm font-semibold capitalize text-slate-900 dark:text-slate-100", children: [
2751
+ data.decision,
2752
+ data.by?.name && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-normal text-slate-500 dark:text-slate-400", children: [
2753
+ " ",
2754
+ "\u2014 ",
2755
+ data.by.name
2756
+ ] })
2757
+ ] }),
2758
+ data.reason && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-700 dark:text-slate-300", children: data.reason })
2759
+ ] }),
2760
+ data.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[10px] uppercase tracking-wide text-slate-500 dark:text-slate-400", children: formatTimestamp(data.at) })
2761
+ ] }) });
2762
+ }
2763
+ function FiscalSection({ data }) {
2764
+ const env = data.environment ?? "homologation";
2765
+ const envLabel = env === "production" ? "Produ\xE7\xE3o (SEFAZ)" : "Homologa\xE7\xE3o (sandbox)";
2766
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-emerald-500/20 bg-emerald-500/5 p-4 dark:border-emerald-400/30 dark:bg-emerald-500/10", children: [
2767
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-emerald-800 dark:text-emerald-200", children: "NF-e emitida" }),
2768
+ /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-2 grid grid-cols-1 gap-x-4 gap-y-1 text-xs sm:grid-cols-2", children: [
2769
+ data.number && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2770
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-emerald-700/70 dark:text-emerald-300/70", children: "N\xFAmero" }),
2771
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "font-medium text-emerald-900 dark:text-emerald-100", children: data.number })
2772
+ ] }),
2773
+ data.accessKey && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:col-span-2", children: [
2774
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-emerald-700/70 dark:text-emerald-300/70", children: "Chave de acesso" }),
2775
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "break-all font-mono text-[11px] text-emerald-900 dark:text-emerald-100", children: data.accessKey })
2776
+ ] }),
2777
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2778
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-emerald-700/70 dark:text-emerald-300/70", children: "Ambiente" }),
2779
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "font-medium text-emerald-900 dark:text-emerald-100", children: envLabel })
2780
+ ] }),
2781
+ data.statusUrl && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:col-span-2", children: [
2782
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-emerald-700/70 dark:text-emerald-300/70", children: "Status" }),
2783
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { children: /* @__PURE__ */ jsxRuntime.jsx(
2784
+ "a",
2785
+ {
2786
+ href: data.statusUrl,
2787
+ target: "_blank",
2788
+ rel: "noreferrer",
2789
+ className: "text-emerald-900 underline hover:text-emerald-700 dark:text-emerald-100",
2790
+ children: data.statusUrl
2791
+ }
2792
+ ) })
2793
+ ] })
2794
+ ] })
2795
+ ] });
2796
+ }
2797
+ function FeedSection({ data }) {
2798
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-zinc-950/10 bg-white p-4 dark:border-white/10 dark:bg-zinc-900", children: [
2799
+ data.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-900 dark:text-slate-100", children: data.title }),
2800
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2", children: data.items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
2801
+ "li",
2802
+ {
2803
+ className: `rounded-lg border px-3 py-2 ${TONE_BLOCK[item.tone ?? "default"]}`,
2804
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
2805
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
2806
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-slate-900 dark:text-slate-100", children: item.title }),
2807
+ item.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-slate-600 dark:text-slate-400", children: item.description })
2808
+ ] }),
2809
+ item.timestamp && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[10px] uppercase tracking-wide text-slate-500 dark:text-slate-400", children: formatTimestamp(item.timestamp) })
2810
+ ] })
2811
+ },
2812
+ index
2813
+ )) })
2814
+ ] });
2815
+ }
2816
+ function ScoreSection({ data }) {
2817
+ const tone = data.score >= 70 ? "success" : data.score >= 40 ? "warning" : "danger";
2818
+ const variant = tone;
2819
+ return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "rounded-xl border border-zinc-950/10 bg-white p-4 dark:border-white/10 dark:bg-zinc-900", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-3", children: [
2820
+ /* @__PURE__ */ jsxRuntime.jsx(
2821
+ MetricCard,
2822
+ {
2823
+ title: data.label,
2824
+ value: `${Math.round(data.score)}`,
2825
+ variant
2826
+ }
2827
+ ),
2828
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:col-span-2", children: [
2829
+ data.qualification && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium capitalize text-slate-900 dark:text-slate-100", children: data.qualification }),
2830
+ data.reasoning && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs leading-relaxed text-slate-600 dark:text-slate-400", children: data.reasoning })
2831
+ ] })
2832
+ ] }) });
2833
+ }
2834
+ function NoteSection({ data }) {
2835
+ const accentClasses = TONE_BLOCK[data.tone ?? "default"];
2836
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `rounded-xl border p-4 ${accentClasses}`, children: [
2837
+ data.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: data.title }),
2838
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 whitespace-pre-line text-sm text-slate-700 dark:text-slate-300", children: data.body })
2839
+ ] });
2840
+ }
2841
+ var TONE_BLOCK = {
2842
+ default: "border-zinc-950/10 bg-white dark:border-white/10 dark:bg-zinc-900",
2843
+ info: "border-sky-500/20 bg-sky-500/5 dark:border-sky-400/30 dark:bg-sky-500/10",
2844
+ success: "border-emerald-500/20 bg-emerald-500/5 dark:border-emerald-400/30 dark:bg-emerald-500/10",
2845
+ warning: "border-amber-500/20 bg-amber-500/5 dark:border-amber-400/30 dark:bg-amber-500/10",
2846
+ danger: "border-rose-500/20 bg-rose-500/5 dark:border-rose-400/30 dark:bg-rose-500/10"
2847
+ };
2848
+ function formatTimestamp(iso) {
2849
+ try {
2850
+ const dt = new Date(iso);
2851
+ if (Number.isNaN(dt.getTime())) return iso;
2852
+ return dt.toLocaleString("pt-BR", {
2853
+ day: "2-digit",
2854
+ month: "2-digit",
2855
+ hour: "2-digit",
2856
+ minute: "2-digit"
2857
+ });
2858
+ } catch {
2859
+ return iso;
2860
+ }
2861
+ }
2350
2862
 
2351
2863
  // src/types/dashboard-spec.ts
2352
2864
  function validateDashboardSpec(spec) {
@@ -2355,8 +2867,9 @@ function validateDashboardSpec(spec) {
2355
2867
  const hasKpis = (spec.kpis?.length ?? 0) > 0;
2356
2868
  const hasTable = (spec.table?.rows.length ?? 0) > 0;
2357
2869
  const hasRecommendation = Boolean(spec.recommendation?.trim());
2358
- if (!hasCharts && !hasKpis && !hasTable && !hasRecommendation) {
2359
- issues.push({ kind: "empty", message: "Dashboard has no content (no charts, KPIs, table, or recommendation)." });
2870
+ const hasSections = (spec.sections?.length ?? 0) > 0;
2871
+ if (!hasCharts && !hasKpis && !hasTable && !hasRecommendation && !hasSections) {
2872
+ issues.push({ kind: "empty", message: "Dashboard has no content (no charts, KPIs, table, recommendation, or sections)." });
2360
2873
  }
2361
2874
  spec.charts?.forEach((chart, chartIndex) => {
2362
2875
  if (chart.series.length === 0) {
@@ -2385,19 +2898,6 @@ function validateDashboardSpec(spec) {
2385
2898
  }
2386
2899
  return issues;
2387
2900
  }
2388
- function AgentAnalysisCard({ name, avatar, duration, output }) {
2389
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface rounded-xl p-3 transition-all duration-300", children: [
2390
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-1.5", children: [
2391
- /* @__PURE__ */ jsxRuntime.jsx("img", { src: avatar, alt: "", className: "h-6 w-6 rounded-lg" }),
2392
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
2393
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] font-semibold text-white", children: name }),
2394
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[8px] text-gray-500", children: duration })
2395
- ] }),
2396
- /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckCircleIcon, { className: "h-3.5 w-3.5 text-emerald-400 shrink-0" })
2397
- ] }),
2398
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[8px] text-gray-400 leading-relaxed", children: output })
2399
- ] });
2400
- }
2401
2901
  function RecommendationCard({ price, delta, confidence, margin, minMax }) {
2402
2902
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface rounded-xl p-3.5", children: [
2403
2903
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center gap-1.5 text-[11px] font-semibold text-gray-400", children: [
@@ -3777,7 +4277,7 @@ function ProgressIndicator({
3777
4277
  stiffness: 500,
3778
4278
  damping: 30
3779
4279
  },
3780
- children: showNumbers && (isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon2, { className: "w-4 h-4" }) : index + 1)
4280
+ children: showNumbers && (isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon3, { className: "w-4 h-4" }) : index + 1)
3781
4281
  }
3782
4282
  ),
3783
4283
  index < steps - 1 && /* @__PURE__ */ jsxRuntime.jsx(
@@ -3792,7 +4292,7 @@ function ProgressIndicator({
3792
4292
  ] }, index);
3793
4293
  }) });
3794
4294
  }
3795
- function CheckIcon2({ className }) {
4295
+ function CheckIcon3({ className }) {
3796
4296
  return /* @__PURE__ */ jsxRuntime.jsx(
3797
4297
  "svg",
3798
4298
  {
@@ -5750,42 +6250,18 @@ var FormField = React12__namespace.default.forwardRef(
5750
6250
  }
5751
6251
  );
5752
6252
  FormField.displayName = "FormField";
5753
- var FormSection = React12__namespace.default.forwardRef(
5754
- ({ title, description, children, className, ...props }, ref) => {
5755
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: clsx__default.default("space-y-4", className), ...props, children: [
5756
- (title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
5757
- title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-gray-900 dark:text-white", children: title }),
5758
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: description })
5759
- ] }),
5760
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children })
5761
- ] });
5762
- }
5763
- );
5764
- FormSection.displayName = "FormSection";
5765
- function ItemSummary({
5766
- icon,
5767
- title,
5768
- subtitle,
5769
- metadata,
5770
- iconContainerClassName = "flex size-10 flex-shrink-0 items-center justify-center rounded-lg bg-indigo-100 dark:bg-indigo-900/30",
5771
- titleClassName = "truncate text-sm font-semibold text-gray-900 dark:text-white",
5772
- subtitleClassName = "truncate text-xs text-gray-500 dark:text-gray-400",
5773
- metadataContainerClassName = "mt-2 flex flex-wrap gap-3",
5774
- metadataLabelClassName = "text-xs text-gray-500 dark:text-gray-400",
5775
- metadataValueClassName = "text-xs font-medium text-gray-900 dark:text-white"
5776
- }) {
5777
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 min-w-0 items-start gap-3", children: [
5778
- icon ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: iconContainerClassName, children: icon }) : null,
5779
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
5780
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title }),
5781
- subtitle ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: subtitleClassName, children: subtitle }) : null,
5782
- metadata && metadata.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: metadataContainerClassName, children: metadata.map((metadataItem, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
5783
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: metadataLabelClassName, children: metadataItem.label }),
5784
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: metadataValueClassName, children: metadataItem.value })
5785
- ] }, index)) }) : null
5786
- ] })
5787
- ] });
5788
- }
6253
+ var FormSection = React12__namespace.default.forwardRef(
6254
+ ({ title, description, children, className, ...props }, ref) => {
6255
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: clsx__default.default("space-y-4", className), ...props, children: [
6256
+ (title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
6257
+ title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-gray-900 dark:text-white", children: title }),
6258
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: description })
6259
+ ] }),
6260
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children })
6261
+ ] });
6262
+ }
6263
+ );
6264
+ FormSection.displayName = "FormSection";
5789
6265
  var CONTAINER_STYLES2 = {
5790
6266
  default: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",
5791
6267
  compact: "bg-transparent",
@@ -5849,80 +6325,6 @@ var ListItem = React12__namespace.default.forwardRef(
5849
6325
  }
5850
6326
  );
5851
6327
  ListItem.displayName = "ListItem";
5852
- var TONE_STYLES = {
5853
- error: { container: "border-red-500/30 bg-red-500/20 text-red-600 dark:text-red-400", dot: "bg-red-500" },
5854
- warning: { container: "border-amber-500/30 bg-amber-500/20 text-amber-600 dark:text-amber-400", dot: "bg-amber-500" },
5855
- info: { container: "border-blue-500/30 bg-blue-500/20 text-blue-600 dark:text-blue-400", dot: "bg-blue-500" },
5856
- neutral: { container: "border-slate-500/30 bg-slate-500/20 text-slate-600 dark:text-slate-400", dot: "bg-slate-500" },
5857
- success: { container: "border-emerald-500/30 bg-emerald-500/20 text-emerald-600 dark:text-emerald-400", dot: "bg-emerald-500" }
5858
- };
5859
- var LEGACY_STATUS_STYLES = {
5860
- pending: "border-yellow-200 bg-yellow-50 text-yellow-700 dark:border-yellow-700/30 dark:bg-yellow-900/20 dark:text-yellow-400",
5861
- approved: "border-green-200 bg-green-50 text-green-700 dark:border-green-700/30 dark:bg-green-900/20 dark:text-green-400",
5862
- rejected: "border-red-200 bg-red-50 text-red-700 dark:border-red-700/30 dark:bg-red-900/20 dark:text-red-400",
5863
- active: "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-700/30 dark:bg-emerald-900/20 dark:text-emerald-400",
5864
- inactive: "border-white/30 dark:border-white/10 bg-slate-500/10 text-slate-700 dark:bg-slate-900/20 dark:text-slate-400",
5865
- processing: "border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-700/30 dark:bg-blue-900/20 dark:text-blue-400",
5866
- error: "border-red-200 bg-red-50 text-red-700 dark:border-red-700/30 dark:bg-red-900/20 dark:text-red-400",
5867
- success: "border-green-200 bg-green-50 text-green-700 dark:border-green-700/30 dark:bg-green-900/20 dark:text-green-400"
5868
- };
5869
- var LEGACY_DOT_STYLES = {
5870
- pending: "bg-yellow-500",
5871
- approved: "bg-green-500",
5872
- rejected: "bg-red-500",
5873
- active: "bg-emerald-500",
5874
- inactive: "bg-slate-500",
5875
- processing: "bg-blue-500",
5876
- error: "bg-red-500",
5877
- success: "bg-green-500"
5878
- };
5879
- var SIZE_STYLES = {
5880
- sm: "px-2 py-0.5 text-xs",
5881
- md: "px-2.5 py-1 text-xs"
5882
- };
5883
- var DEFAULT_LEGACY_STYLE = "border-white/30 dark:border-white/10 bg-slate-500/10 text-slate-700 dark:bg-slate-900/20 dark:text-slate-400";
5884
- var StatusBadge = React12.forwardRef(function StatusBadge2({ status, label, size = "md", className = "", ...props }, ref) {
5885
- if ("statusConfig" in props && props.statusConfig) {
5886
- const configuredStatus = props.statusConfig[status];
5887
- if (!configuredStatus) {
5888
- return null;
5889
- }
5890
- const toneStyle = TONE_STYLES[configuredStatus.tone ?? "neutral"];
5891
- const IconComponent = configuredStatus.icon;
5892
- const resolvedLabel2 = label ?? configuredStatus.label;
5893
- return /* @__PURE__ */ jsxRuntime.jsxs(
5894
- "div",
5895
- {
5896
- ref,
5897
- role: "status",
5898
- "aria-label": `Status: ${status}`,
5899
- "data-testid": `status-badge-${status}`,
5900
- className: `inline-flex items-center gap-1.5 rounded-full border font-semibold backdrop-blur-sm ${SIZE_STYLES[size]} ${toneStyle.container} ${className}`,
5901
- children: [
5902
- IconComponent ? /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: `h-3 w-3 ${configuredStatus.animateIcon ? "animate-spin motion-reduce:animate-none" : ""}` }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${toneStyle.dot}` }),
5903
- resolvedLabel2
5904
- ]
5905
- }
5906
- );
5907
- }
5908
- const legacyStyle = LEGACY_STATUS_STYLES[status] ?? DEFAULT_LEGACY_STYLE;
5909
- const legacyDot = LEGACY_DOT_STYLES[status] ?? "bg-slate-500";
5910
- const resolvedLabel = label ?? status;
5911
- return /* @__PURE__ */ jsxRuntime.jsxs(
5912
- "div",
5913
- {
5914
- ref,
5915
- role: "status",
5916
- "aria-label": `Status: ${status}`,
5917
- "data-testid": `status-badge-${status}`,
5918
- className: `inline-flex items-center gap-1.5 rounded-full border font-semibold ${SIZE_STYLES[size]} ${legacyStyle} ${className}`,
5919
- children: [
5920
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${legacyDot}` }),
5921
- resolvedLabel
5922
- ]
5923
- }
5924
- );
5925
- });
5926
6328
  function ProfileIdentityCard({
5927
6329
  displayName,
5928
6330
  profileInitial,
@@ -7276,95 +7678,6 @@ function TimePicker({
7276
7678
  ) })
7277
7679
  ] });
7278
7680
  }
7279
- function classNames(...classes) {
7280
- return classes.filter(Boolean).join(" ");
7281
- }
7282
- function StepTimeline({
7283
- steps,
7284
- progressLabel,
7285
- onStepClick,
7286
- renderCompleteContent
7287
- }) {
7288
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:border-t lg:border-b lg:border-gray-200 dark:lg:border-white/15", children: /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": progressLabel, className: "mx-auto max-w-7xl px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxRuntime.jsx(
7289
- "ol",
7290
- {
7291
- role: "list",
7292
- className: "overflow-hidden rounded-md lg:flex lg:rounded-none lg:border-r lg:border-l lg:border-gray-200 dark:lg:border-white/15",
7293
- children: steps.map((step2, stepIndex) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "relative overflow-hidden lg:flex-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
7294
- "button",
7295
- {
7296
- type: "button",
7297
- onClick: () => onStepClick?.(stepIndex),
7298
- disabled: step2.status === "upcoming",
7299
- className: classNames(
7300
- step2.status === "upcoming" ? "cursor-not-allowed" : "cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800",
7301
- stepIndex === 0 ? "rounded-t-md border-b-0" : "",
7302
- stepIndex === steps.length - 1 ? "rounded-b-md border-t-0" : "",
7303
- "w-full overflow-hidden border border-gray-200 text-left transition-colors lg:border-0 dark:border-white/15"
7304
- ),
7305
- children: [
7306
- step2.status === "complete" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
7307
- /* @__PURE__ */ jsxRuntime.jsx(
7308
- "span",
7309
- {
7310
- "aria-hidden": "true",
7311
- className: "absolute top-0 left-0 h-full w-1 bg-transparent group-hover:bg-gray-200 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:group-hover:bg-white/20"
7312
- }
7313
- ),
7314
- renderCompleteContent ? renderCompleteContent(step2) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
7315
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-blue-600 dark:bg-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx(solid$1.CheckIcon, { "aria-hidden": "true", className: "h-5 w-5 text-white" }) }) }),
7316
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
7317
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-white", children: step2.name }),
7318
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
7319
- ] })
7320
- ] })
7321
- ] }) : step2.status === "current" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { "aria-current": "step", children: [
7322
- /* @__PURE__ */ jsxRuntime.jsx(
7323
- "span",
7324
- {
7325
- "aria-hidden": "true",
7326
- className: "absolute top-0 left-0 h-full w-1 bg-blue-600 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:bg-blue-500"
7327
- }
7328
- ),
7329
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
7330
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-blue-600 dark:border-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-blue-600 dark:text-blue-400", children: step2.id }) }) }),
7331
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
7332
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-blue-600 dark:text-blue-400", children: step2.name }),
7333
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
7334
- ] })
7335
- ] })
7336
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
7337
- /* @__PURE__ */ jsxRuntime.jsx(
7338
- "span",
7339
- {
7340
- "aria-hidden": "true",
7341
- className: "absolute top-0 left-0 h-full w-1 bg-transparent group-hover:bg-gray-200 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:group-hover:bg-white/20"
7342
- }
7343
- ),
7344
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
7345
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-gray-300 dark:border-white/15", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500 dark:text-gray-400", children: step2.id }) }) }),
7346
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
7347
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.name }),
7348
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
7349
- ] })
7350
- ] })
7351
- ] }),
7352
- stepIndex !== 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute inset-0 top-0 left-0 hidden w-3 lg:block", children: /* @__PURE__ */ jsxRuntime.jsx(
7353
- "svg",
7354
- {
7355
- fill: "none",
7356
- viewBox: "0 0 12 82",
7357
- preserveAspectRatio: "none",
7358
- className: "h-full w-full text-gray-200 dark:text-white/15",
7359
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0.5 0V31L10.5 41L0.5 51V82", stroke: "currentColor", vectorEffect: "non-scaling-stroke" })
7360
- }
7361
- ) }) : null
7362
- ]
7363
- }
7364
- ) }, step2.id))
7365
- }
7366
- ) }) });
7367
- }
7368
7681
  function PageHeading({ breadcrumbs, title, subtitle, icon, meta, actions }) {
7369
7682
  const t = chunkYXN2K77G_js.useTranslations("common");
7370
7683
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 lg:flex lg:items-start lg:justify-between", children: [
@@ -8228,87 +8541,6 @@ function SearchFilterToolbar({
8228
8541
  ] }) })
8229
8542
  ] });
8230
8543
  }
8231
- function isPlainTextTitle(title) {
8232
- return typeof title === "string" || typeof title === "number";
8233
- }
8234
- function getTestIdFromTitle(title) {
8235
- if (isPlainTextTitle(title)) {
8236
- return `entity-card-${String(title).toLowerCase().replace(/\s+/g, "-")}`;
8237
- }
8238
- return "entity-card";
8239
- }
8240
- function StatusBadgeInternal({ status }) {
8241
- const tCommon = chunkYXN2K77G_js.useTranslations("common");
8242
- if (typeof status !== "boolean") {
8243
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: status });
8244
- }
8245
- return /* @__PURE__ */ jsxRuntime.jsx(
8246
- "span",
8247
- {
8248
- className: `shrink-0 rounded-full px-2 py-0.5 text-xs font-medium ${status ? "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300" : "bg-white/40 text-slate-500 dark:bg-white/[0.08] dark:text-slate-400"}`,
8249
- children: status ? tCommon("active") : tCommon("inactive")
8250
- }
8251
- );
8252
- }
8253
- function EntityCard({
8254
- icon,
8255
- title,
8256
- subtitle,
8257
- status,
8258
- accentGradient,
8259
- children,
8260
- footer,
8261
- onClick,
8262
- className = "",
8263
- dragProps
8264
- }) {
8265
- const isInteractive = Boolean(onClick);
8266
- const plainTextTitle = isPlainTextTitle(title) ? String(title) : void 0;
8267
- const handleKeyDown = React12.useCallback(
8268
- (event) => {
8269
- if (onClick && (event.key === "Enter" || event.key === " ")) {
8270
- event.preventDefault();
8271
- onClick();
8272
- }
8273
- },
8274
- [onClick]
8275
- );
8276
- return /* @__PURE__ */ jsxRuntime.jsxs(
8277
- Card,
8278
- {
8279
- role: isInteractive ? "article" : "listitem",
8280
- "aria-label": isInteractive ? plainTextTitle : void 0,
8281
- "data-testid": getTestIdFromTitle(title),
8282
- tabIndex: isInteractive ? 0 : void 0,
8283
- onKeyDown: isInteractive ? handleKeyDown : void 0,
8284
- className: `group overflow-hidden transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md ${isInteractive ? "cursor-pointer" : ""} ${className}`,
8285
- onPress: onClick,
8286
- pressable: isInteractive,
8287
- ...dragProps,
8288
- children: [
8289
- accentGradient && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-1.5 w-full bg-gradient-to-r ${accentGradient}` }),
8290
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
8291
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
8292
- /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "entity-card-title", children: /* @__PURE__ */ jsxRuntime.jsx(
8293
- ItemSummary,
8294
- {
8295
- icon,
8296
- title,
8297
- subtitle: subtitle ? /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "entity-card-subtitle", children: subtitle }) : void 0,
8298
- iconContainerClassName: "shrink-0",
8299
- titleClassName: isPlainTextTitle(title) ? "truncate font-semibold text-slate-900 dark:text-white" : "font-semibold text-slate-900 dark:text-white",
8300
- subtitleClassName: "mt-0.5 text-xs text-slate-500 dark:text-slate-400"
8301
- }
8302
- ) }),
8303
- status !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(StatusBadgeInternal, { status })
8304
- ] }),
8305
- children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children }),
8306
- footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 border-t border-white/30 pt-3 dark:border-white/10 flex gap-2 justify-end opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-within:opacity-100", children: footer })
8307
- ] })
8308
- ]
8309
- }
8310
- );
8311
- }
8312
8544
  var COLOR_MAP = {
8313
8545
  blue: {
8314
8546
  activeGradient: "bg-gradient-to-br from-blue-500 to-blue-600 ring-2 ring-blue-500 shadow-lg",
@@ -25577,5 +25809,5 @@ exports.usePullToRefresh = usePullToRefresh;
25577
25809
  exports.validateDashboardSpec = validateDashboardSpec;
25578
25810
  exports.xScale = xScale;
25579
25811
  exports.yScale = yScale;
25580
- //# sourceMappingURL=chunk-KNXAOJAK.js.map
25581
- //# sourceMappingURL=chunk-KNXAOJAK.js.map
25812
+ //# sourceMappingURL=chunk-ZBX2QSNH.js.map
25813
+ //# sourceMappingURL=chunk-ZBX2QSNH.js.map