@mastra/playground-ui 4.0.4-alpha.0 → 4.0.4-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,5 +6,9 @@ export * from './domains/resizable-panel';
6
6
  export * from './components/dynamic-form/index';
7
7
  export * from './types';
8
8
  export * from './ds/components/Badge/index';
9
+ export * from './ds/components/Button/index';
10
+ export * from './ds/components/Breadcrumb/index';
11
+ export * from './ds/components/Header/index';
9
12
  export * from './ds/components/Logo/index';
13
+ export * from './ds/components/Table/index';
10
14
  export * from './ds/components/Txt/index';
package/dist/index.es.js CHANGED
@@ -2827,13 +2827,13 @@ const buttonVariants = cva(
2827
2827
  }
2828
2828
  }
2829
2829
  );
2830
- const Button = React.forwardRef(
2830
+ const Button$1 = React.forwardRef(
2831
2831
  ({ className, variant, size, asChild = false, ...props }, ref) => {
2832
2832
  const Comp = asChild ? Slot : "button";
2833
2833
  return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
2834
2834
  }
2835
2835
  );
2836
- Button.displayName = "Button";
2836
+ Button$1.displayName = "Button";
2837
2837
 
2838
2838
  const TooltipProvider = TooltipPrimitive.Provider;
2839
2839
  const Tooltip = TooltipPrimitive.Root;
@@ -2855,7 +2855,7 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
2855
2855
  const TooltipIconButton = forwardRef(
2856
2856
  ({ children, tooltip, side = "bottom", className, ...rest }, ref) => {
2857
2857
  return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
2858
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "icon", ...rest, className: cn("size-6 p-1", className), ref, children: [
2858
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button$1, { variant: "ghost", size: "icon", ...rest, className: cn("size-6 p-1", className), ref, children: [
2859
2859
  children,
2860
2860
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: tooltip })
2861
2861
  ] }) }),
@@ -3128,7 +3128,7 @@ const ToolFallback$1 = ({ toolName, argsText, result }) => {
3128
3128
  /* @__PURE__ */ jsx("b", { children: toolName })
3129
3129
  ] }),
3130
3130
  /* @__PURE__ */ jsx("div", { className: "flex-grow" }),
3131
- /* @__PURE__ */ jsx(Button, { onClick: () => setIsCollapsed(!isCollapsed), children: isCollapsed ? /* @__PURE__ */ jsx(ChevronUpIcon, {}) : /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
3131
+ /* @__PURE__ */ jsx(Button$1, { onClick: () => setIsCollapsed(!isCollapsed), children: isCollapsed ? /* @__PURE__ */ jsx(ChevronUpIcon, {}) : /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
3132
3132
  ] }),
3133
3133
  !isCollapsed && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 border-t pt-2", children: [
3134
3134
  /* @__PURE__ */ jsx("div", { className: "px-4", children: /* @__PURE__ */ jsx("pre", { className: "whitespace-pre-wrap", children: argsText }) }),
@@ -3311,7 +3311,7 @@ const Thread = ({
3311
3311
  bottom: 0,
3312
3312
  margin: "0 auto",
3313
3313
  zIndex: 10,
3314
- paddingBottom: "0.5em",
3314
+ paddingBottom: "4rem",
3315
3315
  left: "50%",
3316
3316
  transform: "translate(-50%)",
3317
3317
  background: "#0f0f0f"
@@ -3473,8 +3473,8 @@ const EditComposer = () => {
3473
3473
  children: [
3474
3474
  /* @__PURE__ */ jsx(ComposerPrimitive.Input, { className: "text-foreground flex h-8 w-full resize-none bg-transparent p-4 pb-0 outline-none" }),
3475
3475
  /* @__PURE__ */ jsxs("div", { className: "mx-3 mb-3 flex items-center justify-center gap-2 self-end", children: [
3476
- /* @__PURE__ */ jsx(ComposerPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", children: "Cancel" }) }),
3477
- /* @__PURE__ */ jsx(ComposerPrimitive.Send, { asChild: true, children: /* @__PURE__ */ jsx(Button, { children: "Send" }) })
3476
+ /* @__PURE__ */ jsx(ComposerPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ jsx(Button$1, { variant: "ghost", children: "Cancel" }) }),
3477
+ /* @__PURE__ */ jsx(ComposerPrimitive.Send, { asChild: true, children: /* @__PURE__ */ jsx(Button$1, { children: "Send" }) })
3478
3478
  ] })
3479
3479
  ]
3480
3480
  }
@@ -3760,7 +3760,7 @@ function CopyableContent({ content, label, multiline = false }) {
3760
3760
  return /* @__PURE__ */ jsxs("div", { className: "group relative flex items-start gap-2", children: [
3761
3761
  /* @__PURE__ */ jsx("span", { className: cn("text-sm text-mastra-el-4", multiline ? "whitespace-pre-wrap" : "truncate"), children: content }),
3762
3762
  /* @__PURE__ */ jsx(
3763
- Button,
3763
+ Button$1,
3764
3764
  {
3765
3765
  variant: "ghost",
3766
3766
  size: "sm",
@@ -3832,10 +3832,10 @@ function Skeleton({ className, ...props }) {
3832
3832
  return /* @__PURE__ */ jsx("div", { className: cn("animate-pulse rounded-md bg-muted/50", className), ...props });
3833
3833
  }
3834
3834
 
3835
- const Table = React.forwardRef(
3835
+ const Table$1 = React.forwardRef(
3836
3836
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("table", { ref, className: cn("w-full caption-bottom text-sm border-spacing-0", className), ...props })
3837
3837
  );
3838
- Table.displayName = "Table";
3838
+ Table$1.displayName = "Table";
3839
3839
  const TableHeader = React.forwardRef(
3840
3840
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b-[0.5px]", className), ...props })
3841
3841
  );
@@ -4010,9 +4010,9 @@ function EvalTable({ evals, isCIMode = false }) {
4010
4010
  evals.length,
4011
4011
  " Total Evaluations"
4012
4012
  ] }),
4013
- /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", onClick: handleRefresh, disabled: isTableLoading, className: "h-9 w-9", children: isTableLoading ? /* @__PURE__ */ jsx(RefreshCcwIcon, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx(RefreshCcwIcon, { className: "h-4 w-4" }) })
4013
+ /* @__PURE__ */ jsx(Button$1, { variant: "ghost", size: "icon", onClick: handleRefresh, disabled: isTableLoading, className: "h-9 w-9", children: isTableLoading ? /* @__PURE__ */ jsx(RefreshCcwIcon, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx(RefreshCcwIcon, { className: "h-4 w-4" }) })
4014
4014
  ] }),
4015
- /* @__PURE__ */ jsx("div", { className: "overflow-auto", children: /* @__PURE__ */ jsxs(Table, { className: "w-full", children: [
4015
+ /* @__PURE__ */ jsx("div", { className: "overflow-auto", children: /* @__PURE__ */ jsxs(Table$1, { className: "w-full", children: [
4016
4016
  /* @__PURE__ */ jsx(TableHeader, { className: "bg-mastra-bg-2 h-[var(--table-header-height)] sticky top-0 z-10", children: /* @__PURE__ */ jsxs(TableRow, { className: "border-gray-6 border-b-[0.1px] text-[0.8125rem]", children: [
4017
4017
  /* @__PURE__ */ jsx(TableHead, { className: "w-12 h-12" }),
4018
4018
  /* @__PURE__ */ jsx(
@@ -4075,7 +4075,7 @@ function EvalTable({ evals, isCIMode = false }) {
4075
4075
  {
4076
4076
  colSpan: 5 + (getHasReasons(group.evals) ? 1 : 0) + (isCIMode ? 1 : 0),
4077
4077
  className: "p-0",
4078
- children: /* @__PURE__ */ jsx("div", { className: "bg-mastra-bg-3 rounded-lg m-2", children: /* @__PURE__ */ jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxs(Table, { className: "w-full", children: [
4078
+ children: /* @__PURE__ */ jsx("div", { className: "bg-mastra-bg-3 rounded-lg m-2", children: /* @__PURE__ */ jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxs(Table$1, { className: "w-full", children: [
4079
4079
  /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { className: "text-[0.7rem] text-mastra-el-3 hover:bg-transparent", children: [
4080
4080
  /* @__PURE__ */ jsx(TableHead, { className: "pl-12 w-[120px]", children: "Timestamp" }),
4081
4081
  /* @__PURE__ */ jsx(TableHead, { className: "w-[300px]", children: "Instructions" }),
@@ -4467,7 +4467,7 @@ function Traces({ traces }) {
4467
4467
  return !prevTracesId.has(traceId);
4468
4468
  };
4469
4469
  const currentTraceParentSpan = currentTrace?.find((span) => span.parentSpanId === void 0) || currentTrace?.[0];
4470
- return /* @__PURE__ */ jsx("div", { className: "h-full w-[calc(100%_-_325px)]", children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsxs(Table, { children: [
4470
+ return /* @__PURE__ */ jsx("div", { className: "h-full w-[calc(100%_-_325px)]", children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsxs(Table$1, { children: [
4471
4471
  /* @__PURE__ */ jsx(TableHeader, { className: "sticky top-0 z-10 bg-[#0F0F0F]", style: { outline: "1px solid 0_0%_20.4%" }, children: /* @__PURE__ */ jsxs(TableRow, { className: "border-gray-6 border-b-[0.1px] text-[0.8125rem]", children: [
4472
4472
  /* @__PURE__ */ jsx(TableHead, { className: "text-mastra-el-3 h-10", children: "Trace" }),
4473
4473
  /* @__PURE__ */ jsxs(TableHead, { className: "text-mastra-el-3 flex items-center gap-1 h-10", children: [
@@ -4526,7 +4526,7 @@ function TraceButton({
4526
4526
  setCurrentTraceIndex
4527
4527
  } = useContext(TraceContext);
4528
4528
  return /* @__PURE__ */ jsxs(
4529
- Button,
4529
+ Button$1,
4530
4530
  {
4531
4531
  variant: "ghost",
4532
4532
  className: "flex h-0 items-center gap-2 p-0",
@@ -4581,7 +4581,7 @@ function TreeNode({ node, depth = 0 }) {
4581
4581
  const widthPercentage = Math.min(node.relativePercentage ? node?.relativePercentage * 100 : 0, 100);
4582
4582
  return /* @__PURE__ */ jsxs("div", { ref: containerRef, children: [
4583
4583
  /* @__PURE__ */ jsxs(
4584
- Button,
4584
+ Button$1,
4585
4585
  {
4586
4586
  variant: "ghost",
4587
4587
  className: cn("relative flex w-full items-center justify-start gap-2 py-3 pr-1 text-sm", {
@@ -4696,7 +4696,7 @@ function TraceDetails() {
4696
4696
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
4697
4697
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
4698
4698
  /* @__PURE__ */ jsx(
4699
- Button,
4699
+ Button$1,
4700
4700
  {
4701
4701
  onClick: () => {
4702
4702
  prevTrace();
@@ -4710,7 +4710,7 @@ function TraceDetails() {
4710
4710
  ),
4711
4711
  " ",
4712
4712
  /* @__PURE__ */ jsx(
4713
- Button,
4713
+ Button$1,
4714
4714
  {
4715
4715
  onClick: () => {
4716
4716
  nextTrace();
@@ -4725,7 +4725,7 @@ function TraceDetails() {
4725
4725
  ] }),
4726
4726
  /* @__PURE__ */ jsx("span", { className: "bg-secondary inline-block h-5 w-px" }),
4727
4727
  /* @__PURE__ */ jsx(
4728
- Button,
4728
+ Button$1,
4729
4729
  {
4730
4730
  onClick: () => {
4731
4731
  clearData();
@@ -5010,7 +5010,7 @@ const useTraces = (componentName, baseUrl, isWorkflow = false) => {
5010
5010
  if (!res.traces) {
5011
5011
  throw new Error("Error fetching traces");
5012
5012
  }
5013
- const refinedTraces = refineTraces(res?.traces?.traces || [], isWorkflow);
5013
+ const refinedTraces = refineTraces(res?.traces || [], isWorkflow);
5014
5014
  return refinedTraces;
5015
5015
  } catch (error2) {
5016
5016
  throw error2;
@@ -5058,7 +5058,7 @@ function AgentTracesInner({
5058
5058
  const { isOpen: open } = useContext(TraceContext);
5059
5059
  if (firstCallLoading) {
5060
5060
  return /* @__PURE__ */ jsxs("main", { className: "flex-1 relative overflow-hidden h-full", children: [
5061
- /* @__PURE__ */ jsx("div", { className: "h-full w-[calc(100%_-_325px)]", children: /* @__PURE__ */ jsxs(Table, { children: [
5061
+ /* @__PURE__ */ jsx("div", { className: "h-full w-[calc(100%_-_325px)]", children: /* @__PURE__ */ jsxs(Table$1, { children: [
5062
5062
  /* @__PURE__ */ jsx(TableHeader, { className: "sticky top-0 z-10 bg-[#0F0F0F]", children: /* @__PURE__ */ jsxs(TableRow, { className: "border-gray-6 border-b-[0.1px] text-[0.8125rem]", children: [
5063
5063
  /* @__PURE__ */ jsx(TableHead, { className: "text-mastra-el-3 h-10", children: "Trace" }),
5064
5064
  /* @__PURE__ */ jsxs(TableHead, { className: "text-mastra-el-3 flex items-center gap-1 h-10", children: [
@@ -5080,7 +5080,7 @@ function AgentTracesInner({
5080
5080
  }
5081
5081
  if (!traces || traces.length === 0) {
5082
5082
  return /* @__PURE__ */ jsxs("main", { className: "flex-1 h-full relative overflow-hidden", children: [
5083
- /* @__PURE__ */ jsx("div", { className: "h-full w-[calc(100%_-_325px)]", children: /* @__PURE__ */ jsxs(Table, { children: [
5083
+ /* @__PURE__ */ jsx("div", { className: "h-full w-[calc(100%_-_325px)]", children: /* @__PURE__ */ jsxs(Table$1, { children: [
5084
5084
  /* @__PURE__ */ jsx(TableHeader, { className: "sticky top-0 z-10 bg-[#0F0F0F]", children: /* @__PURE__ */ jsxs(TableRow, { className: "border-gray-6 border-b-[0.1px] text-[0.8125rem]", children: [
5085
5085
  /* @__PURE__ */ jsx(TableHead, { className: "text-mastra-el-3 h-10", children: "Trace" }),
5086
5086
  /* @__PURE__ */ jsxs(TableHead, { className: "text-mastra-el-3 flex items-center gap-1 h-10", children: [
@@ -5177,7 +5177,6 @@ const AgentIcon = ({ className }) => {
5177
5177
  };
5178
5178
 
5179
5179
  const DataTable = ({
5180
- title,
5181
5180
  icon,
5182
5181
  withoutBorder = false,
5183
5182
  columns,
@@ -5186,7 +5185,6 @@ const DataTable = ({
5186
5185
  pagination,
5187
5186
  gotoNextPage,
5188
5187
  gotoPreviousPage,
5189
- maxHeight,
5190
5188
  withoutRadius = false,
5191
5189
  disabledFlex,
5192
5190
  emptyStateHeight,
@@ -5223,17 +5221,10 @@ const DataTable = ({
5223
5221
  onRowSelectionChange: setRowSelection
5224
5222
  });
5225
5223
  return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col", disabledFlex ? "block" : ""), children: [
5226
- /* @__PURE__ */ jsx("div", { className: cn("border", !withoutRadius && "rounded-md", className), children: /* @__PURE__ */ jsxs(Table, { children: [
5227
- /* @__PURE__ */ jsx(TableHeader, { className: "sticky top-0", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxs(TableRow, { className: cn("z-50 bg-[#0f0f0f]", title && "hover:bg-transparent"), children: [
5228
- icon && !title ? /* @__PURE__ */ jsx(TableHead, { className: "w-9 rounded-tl-md" }) : null,
5229
- title ? /* @__PURE__ */ jsx(
5230
- TableHead,
5231
- {
5232
- className: cn("px-0", !withoutRadius && "rounded-tl-md rounded-tr-md"),
5233
- colSpan: headerGroup.headers.length + (icon ? 1 : 0),
5234
- children: title
5235
- }
5236
- ) : headerGroup.headers.map((header) => {
5224
+ /* @__PURE__ */ jsx("div", { className: cn("border", !withoutRadius && "rounded-md", className), children: /* @__PURE__ */ jsxs(Table$1, { children: [
5225
+ /* @__PURE__ */ jsx(TableHeader, { className: "sticky top-0", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxs(TableRow, { className: cn("z-50 bg-[#0f0f0f]", "hover:bg-transparent"), children: [
5226
+ icon ? /* @__PURE__ */ jsx(TableHead, { className: "w-9 rounded-tl-md" }) : null,
5227
+ headerGroup.headers.map((header) => {
5237
5228
  return /* @__PURE__ */ jsx(
5238
5229
  TableHead,
5239
5230
  {
@@ -5268,7 +5259,7 @@ const DataTable = ({
5268
5259
  },
5269
5260
  cell.id
5270
5261
  ))
5271
- ] }, row.id)) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsxs(TableCell, { colSpan: columns.length, className: cn("h-24 text-center", emptyStateHeight), children: [
5262
+ ] }, row.id)) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsxs(TableCell, { colSpan: columns.length, className: cn("h-24 text-center w-full", emptyStateHeight), children: [
5272
5263
  "No ",
5273
5264
  emptyText || "results"
5274
5265
  ] }) }) })
@@ -5285,15 +5276,14 @@ const DataTable = ({
5285
5276
  " results"
5286
5277
  ] }),
5287
5278
  /* @__PURE__ */ jsx("div", { className: "flex items-center space-x-6 lg:space-x-8", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
5288
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: gotoPreviousPage, disabled: !pagination.offset, children: "Previous" }),
5289
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: gotoNextPage, disabled: !pagination.hasMore, children: "Next" })
5279
+ /* @__PURE__ */ jsx(Button$1, { variant: "outline", size: "sm", onClick: gotoPreviousPage, disabled: !pagination.offset, children: "Previous" }),
5280
+ /* @__PURE__ */ jsx(Button$1, { variant: "outline", size: "sm", onClick: gotoNextPage, disabled: !pagination.hasMore, children: "Next" })
5290
5281
  ] }) })
5291
5282
  ] })
5292
5283
  ] });
5293
5284
  };
5294
5285
 
5295
5286
  const AgentsTable = ({
5296
- title,
5297
5287
  agentsList,
5298
5288
  columns,
5299
5289
  isLoading
@@ -5302,7 +5292,6 @@ const AgentsTable = ({
5302
5292
  DataTable,
5303
5293
  {
5304
5294
  emptyText: "Agents",
5305
- title,
5306
5295
  isLoading,
5307
5296
  withoutBorder: true,
5308
5297
  withoutRadius: true,
@@ -5510,7 +5499,7 @@ function CopyButton({ content, copyMessage, classname }) {
5510
5499
  copyMessage
5511
5500
  });
5512
5501
  return /* @__PURE__ */ jsxs(
5513
- Button,
5502
+ Button$1,
5514
5503
  {
5515
5504
  variant: "ghost",
5516
5505
  size: "icon",
@@ -5758,7 +5747,7 @@ function WorkflowTracesInner({
5758
5747
  const { isOpen: open } = useContext(TraceContext);
5759
5748
  if (firstCallLoading) {
5760
5749
  return /* @__PURE__ */ jsxs("main", { className: "flex-1 h-full relative overflow-hidden", children: [
5761
- /* @__PURE__ */ jsx("div", { className: "h-full w-[calc(100%_-_325px)]", children: /* @__PURE__ */ jsxs(Table, { children: [
5750
+ /* @__PURE__ */ jsx("div", { className: "h-full w-[calc(100%_-_325px)]", children: /* @__PURE__ */ jsxs(Table$1, { children: [
5762
5751
  /* @__PURE__ */ jsx(TableHeader, { className: "sticky top-0 z-10 bg-[#0F0F0F]", children: /* @__PURE__ */ jsxs(TableRow, { className: "border-gray-6 border-b-[0.1px] text-[0.8125rem]", children: [
5763
5752
  /* @__PURE__ */ jsx(TableHead, { className: "text-mastra-el-3 h-10", children: "Trace" }),
5764
5753
  /* @__PURE__ */ jsxs(TableHead, { className: "text-mastra-el-3 flex items-center gap-1 h-10", children: [
@@ -5780,7 +5769,7 @@ function WorkflowTracesInner({
5780
5769
  }
5781
5770
  if (!traces || traces.length === 0) {
5782
5771
  return /* @__PURE__ */ jsxs("main", { className: "flex-1 h-full relative overflow-hidden", children: [
5783
- /* @__PURE__ */ jsx("div", { className: "h-full w-[calc(100%_-_325px)]", children: /* @__PURE__ */ jsxs(Table, { children: [
5772
+ /* @__PURE__ */ jsx("div", { className: "h-full w-[calc(100%_-_325px)]", children: /* @__PURE__ */ jsxs(Table$1, { children: [
5784
5773
  /* @__PURE__ */ jsx(TableHeader, { className: "sticky top-0 z-10 bg-[#0F0F0F]", children: /* @__PURE__ */ jsxs(TableRow, { className: "border-gray-6 border-b-[0.1px] text-[0.8125rem]", children: [
5785
5774
  /* @__PURE__ */ jsx(TableHead, { className: "text-mastra-el-3 h-10", children: "Trace" }),
5786
5775
  /* @__PURE__ */ jsxs(TableHead, { className: "text-mastra-el-3 flex items-center gap-1 h-10", children: [
@@ -6806,7 +6795,6 @@ const AutomationIcon = ({ className }) => {
6806
6795
  };
6807
6796
 
6808
6797
  const WorkflowsTable = ({
6809
- title,
6810
6798
  workflowsList,
6811
6799
  columns,
6812
6800
  isLoading
@@ -6815,7 +6803,6 @@ const WorkflowsTable = ({
6815
6803
  DataTable,
6816
6804
  {
6817
6805
  emptyText: "Workflows",
6818
- title,
6819
6806
  withoutBorder: true,
6820
6807
  withoutRadius: true,
6821
6808
  isLoading,
@@ -6879,7 +6866,7 @@ const ErrorMessage = ({ error }) => /* @__PURE__ */ jsxs(Alert, { variant: "dest
6879
6866
  /* @__PURE__ */ jsx(AlertTitle, { children: error })
6880
6867
  ] });
6881
6868
 
6882
- const SubmitButton = ({ children }) => /* @__PURE__ */ jsx(Button, { type: "submit", children });
6869
+ const SubmitButton = ({ children }) => /* @__PURE__ */ jsx(Button$1, { type: "submit", children });
6883
6870
 
6884
6871
  const StringField = ({ inputProps, error, id }) => {
6885
6872
  const { key, ...props } = inputProps;
@@ -7140,7 +7127,7 @@ const DatePickerOnly = ({
7140
7127
  }
7141
7128
  ),
7142
7129
  /* @__PURE__ */ jsx("div", { className: "px-3 pb-2", children: clearable && /* @__PURE__ */ jsx(
7143
- Button,
7130
+ Button$1,
7144
7131
  {
7145
7132
  variant: "outline",
7146
7133
  tabIndex: 0,
@@ -7161,7 +7148,7 @@ const DatePickerOnly = ({
7161
7148
  const DefaultButton = React.forwardRef(
7162
7149
  ({ value, placeholder, className, ...props }, ref) => {
7163
7150
  return /* @__PURE__ */ jsxs(
7164
- Button,
7151
+ Button$1,
7165
7152
  {
7166
7153
  ref,
7167
7154
  variant: "outline",
@@ -7298,7 +7285,7 @@ const ArrayWrapper = ({ label, children, onAddItem }) => {
7298
7285
  /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium", children: label }),
7299
7286
  children,
7300
7287
  /* @__PURE__ */ jsx(
7301
- Button,
7288
+ Button$1,
7302
7289
  {
7303
7290
  className: "w-full flex items-center justify-center",
7304
7291
  onClick: onAddItem,
@@ -7313,7 +7300,7 @@ const ArrayWrapper = ({ label, children, onAddItem }) => {
7313
7300
 
7314
7301
  const ArrayElementWrapper = ({ children, onRemove }) => {
7315
7302
  return /* @__PURE__ */ jsxs("div", { className: "relative border p-4 rounded-md mt-2", children: [
7316
- /* @__PURE__ */ jsx(Button, { onClick: onRemove, variant: "ghost", className: "absolute top-2 right-2", type: "button", children: /* @__PURE__ */ jsx(TrashIcon, { className: "h-4 w-4" }) }),
7303
+ /* @__PURE__ */ jsx(Button$1, { onClick: onRemove, variant: "ghost", className: "absolute top-2 right-2", type: "button", children: /* @__PURE__ */ jsx(TrashIcon, { className: "h-4 w-4" }) }),
7317
7304
  children
7318
7305
  ] });
7319
7306
  };
@@ -7371,7 +7358,7 @@ const RecordField = ({ inputProps, error, id }) => {
7371
7358
  return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
7372
7359
  pairs.map((pair) => /* @__PURE__ */ jsxs("div", { className: "relative space-y-2 rounded-lg border p-4", children: [
7373
7360
  /* @__PURE__ */ jsx(
7374
- Button,
7361
+ Button$1,
7375
7362
  {
7376
7363
  type: "button",
7377
7364
  variant: "ghost",
@@ -7402,7 +7389,7 @@ const RecordField = ({ inputProps, error, id }) => {
7402
7389
  )
7403
7390
  ] })
7404
7391
  ] }, pair.id)),
7405
- /* @__PURE__ */ jsxs(Button, { type: "button", variant: "outline", size: "sm", className: "w-full", onClick: addPair, children: [
7392
+ /* @__PURE__ */ jsxs(Button$1, { type: "button", variant: "outline", size: "sm", className: "w-full", onClick: addPair, children: [
7406
7393
  /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
7407
7394
  "Add Key-Value Pair"
7408
7395
  ] })
@@ -7540,7 +7527,7 @@ function DynamicForm({
7540
7527
  className: "space-y-4 p-4"
7541
7528
  },
7542
7529
  uiComponents: {
7543
- SubmitButton: ({ children }) => /* @__PURE__ */ jsx(Button, { className: "w-full", type: "submit", disabled: isSubmitLoading, children: isSubmitLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : children || submitButtonLabel })
7530
+ SubmitButton: ({ children }) => /* @__PURE__ */ jsx(Button$1, { className: "w-full", type: "submit", disabled: isSubmitLoading, children: isSubmitLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : children || submitButtonLabel })
7544
7531
  },
7545
7532
  formComponents: {
7546
7533
  Label: ({ value }) => /* @__PURE__ */ jsx(Label, { className: "text-sm font-normal", children: value })
@@ -7691,7 +7678,7 @@ function WorkflowTrigger({
7691
7678
  /* @__PURE__ */ jsx(Loader2, { className: "w-3 h-3 animate-spin text-mastra-el-accent" }),
7692
7679
  " Resuming workflow"
7693
7680
  ] }) : /* @__PURE__ */ jsx(Fragment, {}),
7694
- /* @__PURE__ */ jsx(Button, { className: "w-full", disabled: isRunning, onClick: () => handleExecuteWorkflow(null), children: isRunning ? /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin" }) : "Trigger" })
7681
+ /* @__PURE__ */ jsx(Button$1, { className: "w-full", disabled: isRunning, onClick: () => handleExecuteWorkflow(null), children: isRunning ? /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin" }) : "Trigger" })
7695
7682
  ] }) }),
7696
7683
  Object.values(workflowActivePaths).length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
7697
7684
  /* @__PURE__ */ jsx(Text, { variant: "secondary", className: "px-4 text-mastra-el-3", size: "xs", children: "Status" }),
@@ -7790,6 +7777,68 @@ const Badge = ({ icon, variant = "default", className, children, ...props }) =>
7790
7777
  );
7791
7778
  };
7792
7779
 
7780
+ const Button = ({ className, as, ...props }) => {
7781
+ const Component = as || "button";
7782
+ return /* @__PURE__ */ jsx(
7783
+ Component,
7784
+ {
7785
+ className: clsx(
7786
+ "bg-surface2 border-sm border-border1 px-lg h-button-default text-ui-md text-icon3 gap-md inline-flex items-center rounded-md border",
7787
+ "hover:bg-surface4 hover:text-white",
7788
+ className
7789
+ ),
7790
+ ...props
7791
+ }
7792
+ );
7793
+ };
7794
+
7795
+ const SlashIcon = (props) => /* @__PURE__ */ jsx("svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsx("path", { d: "M5.25684 12.6387L10.4003 3.36133H11.7432L6.5997 12.6387H5.25684Z", fill: "currentColor" }) });
7796
+
7797
+ const Breadcrumb = ({ children, label }) => {
7798
+ return /* @__PURE__ */ jsx("nav", { "aria-label": label, children: /* @__PURE__ */ jsx("ol", { className: "gap-sm flex items-center", children }) });
7799
+ };
7800
+ const Crumb = ({ className, as, isCurrent, ...props }) => {
7801
+ const Root = as || "span";
7802
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
7803
+ /* @__PURE__ */ jsx("li", { className: "flex h-full items-center", children: /* @__PURE__ */ jsx(
7804
+ Root,
7805
+ {
7806
+ "aria-current": isCurrent ? "page" : void 0,
7807
+ className: clsx("text-ui-lg leading-ui-lg font-medium", isCurrent ? "text-white" : "text-icon3", className),
7808
+ ...props
7809
+ }
7810
+ ) }),
7811
+ !isCurrent && /* @__PURE__ */ jsx("li", { role: "separator", className: "flex h-full items-center", children: /* @__PURE__ */ jsx(Icon, { className: "text-icon3", children: /* @__PURE__ */ jsx(SlashIcon, {}) }) })
7812
+ ] });
7813
+ };
7814
+
7815
+ const variants = {
7816
+ "header-md": "text-header-md leading-header-md",
7817
+ "ui-lg": "text-ui-lg leading-ui-lg",
7818
+ "ui-md": "text-ui-md leading-ui-md",
7819
+ "ui-sm": "text-ui-sm leading-ui-sm",
7820
+ "ui-xs": "text-ui-xs leading-ui-xs"
7821
+ };
7822
+ const fonts = {
7823
+ mono: "font-mono"
7824
+ };
7825
+ const Txt = ({ as: Root = "p", className, variant = "ui-md", font, ...props }) => {
7826
+ return /* @__PURE__ */ jsx(Root, { className: clsx(variants[variant], font && fonts[font], className), ...props });
7827
+ };
7828
+
7829
+ const Header = ({ children }) => {
7830
+ return /* @__PURE__ */ jsx("header", { className: "h-header-default bg-surface2 border-b-sm border-border1 z-50 flex w-full items-center gap-[18px] px-5", children });
7831
+ };
7832
+ const HeaderTitle = ({ children }) => {
7833
+ return /* @__PURE__ */ jsx(Txt, { as: "h1", variant: "ui-lg", className: "font-medium text-white", children });
7834
+ };
7835
+ const HeaderAction = ({ children }) => {
7836
+ return /* @__PURE__ */ jsx("div", { className: "ml-auto", children });
7837
+ };
7838
+ const HeaderGroup = ({ children }) => {
7839
+ return /* @__PURE__ */ jsx("div", { className: "gap-lg flex items-center", children });
7840
+ };
7841
+
7793
7842
  const DarkLogo = (props) => /* @__PURE__ */ jsxs("svg", { width: "100", height: "100", viewBox: "0 0 100 100", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
7794
7843
  /* @__PURE__ */ jsx("rect", { width: "100", height: "100", fill: "black" }),
7795
7844
  /* @__PURE__ */ jsx(
@@ -7848,19 +7897,76 @@ const DarkLogo = (props) => /* @__PURE__ */ jsxs("svg", { width: "100", height:
7848
7897
  )
7849
7898
  ] });
7850
7899
 
7851
- const variants = {
7852
- "header-md": "text-header-md leading-header-md",
7853
- "ui-lg": "text-ui-lg leading-ui-lg",
7854
- "ui-md": "text-ui-md leading-ui-md",
7855
- "ui-sm": "text-ui-sm leading-ui-sm",
7856
- "ui-xs": "text-ui-xs leading-ui-xs"
7900
+ const rowSize = {
7901
+ default: "[&>tbody>tr]:h-table-row",
7902
+ small: "[&>tbody>tr]:h-table-row-small"
7857
7903
  };
7858
- const fonts = {
7859
- mono: "font-mono"
7904
+ const Table = ({ className, children, size = "default" }) => {
7905
+ return /* @__PURE__ */ jsx("table", { className: clsx("w-full", rowSize[size], className), children });
7860
7906
  };
7861
- const Txt = ({ as: Root = "p", className, variant = "ui-md", font, ...props }) => {
7862
- return /* @__PURE__ */ jsx(Root, { className: clsx(variants[variant], font && fonts[font], className), ...props });
7907
+ const Thead = ({ className, children }) => {
7908
+ return /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: clsx("h-table-header border-b-sm border-border1", className), children }) });
7909
+ };
7910
+ const Th = ({ className, children }) => {
7911
+ return /* @__PURE__ */ jsx(
7912
+ "th",
7913
+ {
7914
+ className: clsx("text-icon3 text-ui-sm h-full text-left font-normal uppercase first:pl-5 last:pr-5", className),
7915
+ children
7916
+ }
7917
+ );
7918
+ };
7919
+ const Tbody = ({ className, children }) => {
7920
+ return /* @__PURE__ */ jsx("tbody", { className: clsx("", className), children });
7921
+ };
7922
+ const Row = ({ className, children, selected = false }) => {
7923
+ return /* @__PURE__ */ jsx("tr", { className: clsx("border-b-sm border-border1 hover:bg-surface3", selected && "bg-surface4", className), children });
7924
+ };
7925
+
7926
+ const formatDateCell = (date) => {
7927
+ const month = new Intl.DateTimeFormat("en-US", { month: "short" }).format(date).toUpperCase();
7928
+ const day = date.getDate();
7929
+ const formattedDay = `${month} ${day}`;
7930
+ const time = new Intl.DateTimeFormat("en-US", {
7931
+ hour: "2-digit",
7932
+ minute: "2-digit",
7933
+ second: "2-digit",
7934
+ hour12: false
7935
+ // Use 24-hour format
7936
+ }).format(date);
7937
+ return { day: formattedDay, time };
7938
+ };
7939
+
7940
+ const Cell = ({ className, children }) => {
7941
+ return /* @__PURE__ */ jsx("td", { className: "text-icon5 first:pl-5 last:pr-5", children: /* @__PURE__ */ jsx("div", { className: clsx("flex h-full items-center", className), children }) });
7942
+ };
7943
+ const TxtCell = ({ className, children }) => {
7944
+ return /* @__PURE__ */ jsx(Cell, { className, children: /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-md", className: "w-full max-w-[330px] truncate", children }) });
7945
+ };
7946
+ const UnitCell = ({ className, children, unit }) => {
7947
+ return /* @__PURE__ */ jsx(Cell, { className, children: /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center", children: [
7948
+ /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-md", className: "shrink-0", children }),
7949
+ /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-sm", className: "text-icon3 w-full max-w-[200px] truncate", children: unit })
7950
+ ] }) });
7951
+ };
7952
+ const DateTimeCell = ({ className, dateTime }) => {
7953
+ const { day, time } = formatDateCell(dateTime);
7954
+ return /* @__PURE__ */ jsx(Cell, { className, children: /* @__PURE__ */ jsxs("div", { className: "w-28 shrink-0", children: [
7955
+ /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-sm", className: "text-icon3", children: day }),
7956
+ " ",
7957
+ /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-md", children: time })
7958
+ ] }) });
7959
+ };
7960
+ const EntryCell = ({ className, name, description, icon, meta }) => {
7961
+ return /* @__PURE__ */ jsxs(Cell, { className: clsx("!gap-[14px]", className), children: [
7962
+ /* @__PURE__ */ jsx(Icon, { size: "lg", className: "text-icon5", children: icon }),
7963
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0", children: [
7964
+ /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-md", className: "text-icon6 font-medium !leading-tight", children: name }),
7965
+ description && /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-xs", className: "text-icon3 w-full max-w-[300px] truncate !leading-tight", children: description })
7966
+ ] }),
7967
+ meta
7968
+ ] });
7863
7969
  };
7864
7970
 
7865
- export { AgentChat, AgentContext, AgentEvals, AgentProvider, AgentTraces, AgentsTable, Badge, DarkLogo, DynamicForm, MastraResizablePanel, NetworkChat, Txt, WorkflowGraph, WorkflowRunContext, WorkflowRunProvider, WorkflowTraces, WorkflowTrigger, WorkflowsTable };
7971
+ export { AgentChat, AgentContext, AgentEvals, AgentProvider, AgentTraces, AgentsTable, Badge, Breadcrumb, Button, Cell, Crumb, DarkLogo, DateTimeCell, DynamicForm, EntryCell, Header, HeaderAction, HeaderGroup, HeaderTitle, MastraResizablePanel, NetworkChat, Row, Table, Tbody, Th, Thead, Txt, TxtCell, UnitCell, WorkflowGraph, WorkflowRunContext, WorkflowRunProvider, WorkflowTraces, WorkflowTrigger, WorkflowsTable };
7866
7972
  //# sourceMappingURL=index.es.js.map