@mastra/playground-ui 5.1.16-alpha.0 → 5.1.16-alpha.1

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.es.js CHANGED
@@ -6034,7 +6034,8 @@ const PlaygroundTabs = ({
6034
6034
  children,
6035
6035
  defaultTab,
6036
6036
  value,
6037
- onValueChange
6037
+ onValueChange,
6038
+ className
6038
6039
  }) => {
6039
6040
  const [internalTab, setInternalTab] = useState(defaultTab);
6040
6041
  const isControlled = value !== void 0 && onValueChange !== void 0;
@@ -6047,10 +6048,10 @@ const PlaygroundTabs = ({
6047
6048
  setInternalTab(typedValue);
6048
6049
  }
6049
6050
  };
6050
- return /* @__PURE__ */ jsx(Tabs, { value: currentTab, onValueChange: handleTabChange, className: "h-full", children });
6051
+ return /* @__PURE__ */ jsx(Tabs, { value: currentTab, onValueChange: handleTabChange, className: cn("h-full", className), children });
6051
6052
  };
6052
- const TabList = ({ children }) => {
6053
- return /* @__PURE__ */ jsx("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ jsx(TabsList, { className: "border-b-sm border-border1 flex min-w-full shrink-0", children }) });
6053
+ const TabList = ({ children, className }) => {
6054
+ return /* @__PURE__ */ jsx("div", { className: cn("w-full overflow-x-auto", className), children: /* @__PURE__ */ jsx(TabsList, { className: "border-b border-border1 flex min-w-full shrink-0", children }) });
6054
6055
  };
6055
6056
  const Tab = ({ children, value, onClick }) => {
6056
6057
  return /* @__PURE__ */ jsx(
@@ -7844,7 +7845,7 @@ const AgentMetadataPrompt = ({ prompt }) => {
7844
7845
  };
7845
7846
 
7846
7847
  const EntityHeader = ({ icon, title, isLoading, children }) => {
7847
- return /* @__PURE__ */ jsxs("div", { className: "p-5", children: [
7848
+ return /* @__PURE__ */ jsxs("div", { className: "p-5 w-full overflow-x-hidden", children: [
7848
7849
  /* @__PURE__ */ jsxs("div", { className: "text-icon6 flex items-center gap-2", children: [
7849
7850
  /* @__PURE__ */ jsx(Icon, { size: "lg", className: "bg-surface4 rounded-md p-1", children: icon }),
7850
7851
  isLoading ? /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-1/3" }) : /* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-4", children: /* @__PURE__ */ jsx(Txt, { variant: "header-md", as: "h2", className: "truncate font-medium", children: title }) })
@@ -12429,7 +12430,7 @@ function DynamicForm({
12429
12430
  },
12430
12431
  defaultValues: isNotZodObject ? defaultValues ? { "​": defaultValues } : void 0 : defaultValues,
12431
12432
  formProps: {
12432
- className: ""
12433
+ className
12433
12434
  },
12434
12435
  uiComponents: {
12435
12436
  SubmitButton: ({ children }) => onSubmit ? /* @__PURE__ */ jsx(Button, { variant: "light", className: "w-full", size: "lg", disabled: isSubmitLoading, children: isSubmitLoading ? /* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) }) : submitButtonLabel || children }) : null
@@ -12708,33 +12709,50 @@ const WorkflowInputData = ({
12708
12709
  }) => {
12709
12710
  const [type, setType] = useState("form");
12710
12711
  return /* @__PURE__ */ jsxs("div", { children: [
12711
- /* @__PURE__ */ jsx(RadioGroup, { value: type, onValueChange: (value) => setType(value), className: "pb-4", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-4", children: [
12712
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
12713
- /* @__PURE__ */ jsx(RadioGroupItem, { value: "form", id: "form" }),
12714
- /* @__PURE__ */ jsx(Label, { htmlFor: "form", className: "!text-icon3 text-ui-sm", children: "Form" })
12715
- ] }),
12716
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
12717
- /* @__PURE__ */ jsx(RadioGroupItem, { value: "json", id: "json" }),
12718
- /* @__PURE__ */ jsx(Label, { htmlFor: "json", className: "!text-icon3 text-ui-sm", children: "JSON" })
12719
- ] })
12720
- ] }) }),
12721
- type === "form" ? /* @__PURE__ */ jsx(
12722
- DynamicForm,
12712
+ /* @__PURE__ */ jsx(
12713
+ RadioGroup,
12723
12714
  {
12724
- schema,
12725
- defaultValues,
12726
- isSubmitLoading,
12727
- submitButtonLabel,
12728
- onSubmit
12715
+ disabled: isSubmitLoading,
12716
+ value: type,
12717
+ onValueChange: (value) => setType(value),
12718
+ className: "pb-4",
12719
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-4", children: [
12720
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
12721
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: "form", id: "form" }),
12722
+ /* @__PURE__ */ jsx(Label, { htmlFor: "form", className: "!text-icon3 text-ui-sm", children: "Form" })
12723
+ ] }),
12724
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
12725
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: "json", id: "json" }),
12726
+ /* @__PURE__ */ jsx(Label, { htmlFor: "json", className: "!text-icon3 text-ui-sm", children: "JSON" })
12727
+ ] })
12728
+ ] })
12729
12729
  }
12730
- ) : /* @__PURE__ */ jsx(
12731
- JSONInput,
12730
+ ),
12731
+ /* @__PURE__ */ jsx(
12732
+ "div",
12732
12733
  {
12733
- schema,
12734
- defaultValues,
12735
- isSubmitLoading,
12736
- submitButtonLabel,
12737
- onSubmit
12734
+ className: cn({
12735
+ "opacity-50 pointer-events-none": isSubmitLoading
12736
+ }),
12737
+ children: type === "form" ? /* @__PURE__ */ jsx(
12738
+ DynamicForm,
12739
+ {
12740
+ schema,
12741
+ defaultValues,
12742
+ isSubmitLoading,
12743
+ submitButtonLabel,
12744
+ onSubmit
12745
+ }
12746
+ ) : /* @__PURE__ */ jsx(
12747
+ JSONInput,
12748
+ {
12749
+ schema,
12750
+ defaultValues,
12751
+ isSubmitLoading,
12752
+ submitButtonLabel,
12753
+ onSubmit
12754
+ }
12755
+ )
12738
12756
  }
12739
12757
  )
12740
12758
  ] });