@mastra/playground-ui 29.0.0-alpha.8 → 29.0.0-alpha.9
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/CHANGELOG.md +6 -0
- package/dist/index.cjs.js +46 -26
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +11 -4
- package/dist/index.es.js +45 -25
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/components/Command/command.d.ts +2 -1
- package/dist/src/ds/components/Dialog/dialog.d.ts +27 -9
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 29.0.0-alpha.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Moved the `Dialog` component to Base UI. The public API is unchanged — `asChild` on `DialogTrigger` and `DialogClose` still works the same way, and open/close animations behave as before. ([#16821](https://github.com/mastra-ai/mastra/pull/16821))
|
|
8
|
+
|
|
3
9
|
## 29.0.0-alpha.8
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -24,7 +24,7 @@ const CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
|
24
24
|
const CollapsiblePrimitive = require('@radix-ui/react-collapsible');
|
|
25
25
|
const combobox = require('@base-ui/react/combobox');
|
|
26
26
|
const cmdk = require('cmdk');
|
|
27
|
-
const
|
|
27
|
+
const dialog = require('@base-ui/react/dialog');
|
|
28
28
|
const SelectPrimitive = require('@radix-ui/react-select');
|
|
29
29
|
const tabs = require('@base-ui/react/tabs');
|
|
30
30
|
const menu = require('@base-ui/react/menu');
|
|
@@ -42,6 +42,7 @@ const dateFns = require('date-fns');
|
|
|
42
42
|
const reactDayPicker = require('react-day-picker');
|
|
43
43
|
const HoverCard = require('@radix-ui/react-hover-card');
|
|
44
44
|
const reactSlot = require('@radix-ui/react-slot');
|
|
45
|
+
const Dialog$1 = require('@radix-ui/react-dialog');
|
|
45
46
|
const dnd = require('@hello-pangea/dnd');
|
|
46
47
|
const merge = require('@codemirror/merge');
|
|
47
48
|
const format = require('date-fns/format');
|
|
@@ -77,13 +78,13 @@ const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
|
77
78
|
const AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(AlertDialogPrimitive);
|
|
78
79
|
const CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(CheckboxPrimitive);
|
|
79
80
|
const CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(CollapsiblePrimitive);
|
|
80
|
-
const DialogPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(DialogPrimitive);
|
|
81
81
|
const SelectPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SelectPrimitive);
|
|
82
82
|
const VisuallyHidden__namespace = /*#__PURE__*/_interopNamespaceDefault(VisuallyHidden);
|
|
83
83
|
const LabelPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(LabelPrimitive);
|
|
84
84
|
const RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(RadioGroupPrimitive);
|
|
85
85
|
const SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespaceDefault(SwitchPrimitives);
|
|
86
86
|
const HoverCard__namespace = /*#__PURE__*/_interopNamespaceDefault(HoverCard);
|
|
87
|
+
const Dialog__namespace = /*#__PURE__*/_interopNamespaceDefault(Dialog$1);
|
|
87
88
|
|
|
88
89
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
89
90
|
|
|
@@ -6481,51 +6482,70 @@ function MultiCombobox({
|
|
|
6481
6482
|
] });
|
|
6482
6483
|
}
|
|
6483
6484
|
|
|
6484
|
-
const Dialog =
|
|
6485
|
-
const DialogTrigger =
|
|
6486
|
-
|
|
6487
|
-
const
|
|
6485
|
+
const Dialog = dialog.Dialog.Root;
|
|
6486
|
+
const DialogTrigger = React__namespace.forwardRef(
|
|
6487
|
+
({ asChild, children, ...props }, ref) => {
|
|
6488
|
+
const renderProps = asChild && React__namespace.isValidElement(children) ? { render: children } : {};
|
|
6489
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Trigger, { ref, ...renderProps, ...props, children: asChild ? void 0 : children });
|
|
6490
|
+
}
|
|
6491
|
+
);
|
|
6492
|
+
DialogTrigger.displayName = "DialogTrigger";
|
|
6493
|
+
const DialogPortal = dialog.Dialog.Portal;
|
|
6494
|
+
const DialogClose = React__namespace.forwardRef(({ asChild, children, ...props }, ref) => {
|
|
6495
|
+
const renderProps = asChild && React__namespace.isValidElement(children) ? { render: children } : {};
|
|
6496
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Close, { ref, ...renderProps, ...props, children: asChild ? void 0 : children });
|
|
6497
|
+
});
|
|
6498
|
+
DialogClose.displayName = "DialogClose";
|
|
6488
6499
|
const DialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6489
|
-
|
|
6500
|
+
dialog.Dialog.Backdrop,
|
|
6490
6501
|
{
|
|
6491
6502
|
ref,
|
|
6492
6503
|
className: cn("dialog-overlay-anim fixed inset-0 z-50 bg-overlay backdrop-blur-xs", className),
|
|
6493
6504
|
...props
|
|
6494
6505
|
}
|
|
6495
6506
|
));
|
|
6496
|
-
DialogOverlay.displayName =
|
|
6507
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
6497
6508
|
const DialogContent = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
6498
6509
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
6499
6510
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6500
|
-
|
|
6511
|
+
dialog.Dialog.Popup,
|
|
6501
6512
|
{
|
|
6502
6513
|
ref,
|
|
6514
|
+
"data-slot": "dialog-content",
|
|
6503
6515
|
className: cn(
|
|
6504
6516
|
"dialog-content-anim",
|
|
6505
6517
|
"fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%]",
|
|
6506
6518
|
"w-full max-w-[calc(100%-2rem)] sm:max-w-lg",
|
|
6507
6519
|
"rounded-xl border border-border1/40 bg-surface2/96 backdrop-blur-md shadow-dialog",
|
|
6520
|
+
"focus-visible:outline-hidden",
|
|
6508
6521
|
className
|
|
6509
6522
|
),
|
|
6510
6523
|
...props,
|
|
6511
6524
|
children: [
|
|
6512
6525
|
children,
|
|
6513
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6526
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6527
|
+
dialog.Dialog.Close,
|
|
6528
|
+
{
|
|
6529
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: "absolute top-3 right-3", "aria-label": "Close", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}) })
|
|
6530
|
+
}
|
|
6531
|
+
)
|
|
6514
6532
|
]
|
|
6515
6533
|
}
|
|
6516
6534
|
)
|
|
6517
6535
|
] }));
|
|
6518
|
-
DialogContent.displayName =
|
|
6536
|
+
DialogContent.displayName = "DialogContent";
|
|
6519
6537
|
const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-0.5 px-4 py-3 text-left", className), ...props });
|
|
6520
6538
|
DialogHeader.displayName = "DialogHeader";
|
|
6521
6539
|
const DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse gap-1.5 px-4 py-2.5 sm:flex-row sm:justify-end", className), ...props });
|
|
6522
6540
|
DialogFooter.displayName = "DialogFooter";
|
|
6523
6541
|
const DialogBody = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("overflow-y-auto px-4 py-3.5 max-h-[50vh]", className), ...props });
|
|
6524
6542
|
DialogBody.displayName = "DialogBody";
|
|
6525
|
-
const DialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6526
|
-
DialogTitle.displayName =
|
|
6527
|
-
const DialogDescription = React__namespace.forwardRef(
|
|
6528
|
-
|
|
6543
|
+
const DialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Title, { ref, className: cn("text-ui-md font-medium", className), ...props }));
|
|
6544
|
+
DialogTitle.displayName = "DialogTitle";
|
|
6545
|
+
const DialogDescription = React__namespace.forwardRef(
|
|
6546
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Description, { ref, className: cn("sr-only", className), ...props })
|
|
6547
|
+
);
|
|
6548
|
+
DialogDescription.displayName = "DialogDescription";
|
|
6529
6549
|
|
|
6530
6550
|
const Command = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6531
6551
|
cmdk.Command,
|
|
@@ -11178,9 +11198,9 @@ function MainSidebarRoot({ children, className }) {
|
|
|
11178
11198
|
[setOpenMobile]
|
|
11179
11199
|
);
|
|
11180
11200
|
if (isMobile) {
|
|
11181
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11201
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Root, { open: openMobile, onOpenChange: setOpenMobile, children: /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { children: [
|
|
11182
11202
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11183
|
-
|
|
11203
|
+
Dialog__namespace.Overlay,
|
|
11184
11204
|
{
|
|
11185
11205
|
className: cn(
|
|
11186
11206
|
"fixed inset-0 z-40 bg-overlay backdrop-blur-sm",
|
|
@@ -11190,7 +11210,7 @@ function MainSidebarRoot({ children, className }) {
|
|
|
11190
11210
|
}
|
|
11191
11211
|
),
|
|
11192
11212
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11193
|
-
|
|
11213
|
+
Dialog__namespace.Content,
|
|
11194
11214
|
{
|
|
11195
11215
|
className: cn(
|
|
11196
11216
|
"fixed inset-y-0 left-0 z-50 flex h-full flex-col",
|
|
@@ -11202,8 +11222,8 @@ function MainSidebarRoot({ children, className }) {
|
|
|
11202
11222
|
className
|
|
11203
11223
|
),
|
|
11204
11224
|
children: [
|
|
11205
|
-
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11206
|
-
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11225
|
+
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Title, { children: "Navigation" }) }),
|
|
11226
|
+
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Description, { children: "Primary site navigation drawer" }) }),
|
|
11207
11227
|
/* @__PURE__ */ jsxRuntime.jsx("div", { onClick: closeOnAnchor, className: "flex flex-col h-full min-h-0 px-4 py-2 overflow-hidden", children })
|
|
11208
11228
|
]
|
|
11209
11229
|
}
|
|
@@ -11725,9 +11745,9 @@ function SideDialogRoot({
|
|
|
11725
11745
|
className
|
|
11726
11746
|
}) {
|
|
11727
11747
|
const isConfirmation = variant === "confirmation";
|
|
11728
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11748
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Root, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { children: [
|
|
11729
11749
|
!isConfirmation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11730
|
-
|
|
11750
|
+
Dialog__namespace.Overlay,
|
|
11731
11751
|
{
|
|
11732
11752
|
className: cn(
|
|
11733
11753
|
"bg-overlay backdrop-blur-sm top-0 bottom-0 right-0 left-0 fixed z-50",
|
|
@@ -11737,7 +11757,7 @@ function SideDialogRoot({
|
|
|
11737
11757
|
}
|
|
11738
11758
|
),
|
|
11739
11759
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11740
|
-
|
|
11760
|
+
Dialog__namespace.Content,
|
|
11741
11761
|
{
|
|
11742
11762
|
className: cn(
|
|
11743
11763
|
"fixed top-0 bottom-0 right-0 border-l border-border2 z-50 bg-surface2",
|
|
@@ -11753,10 +11773,10 @@ function SideDialogRoot({
|
|
|
11753
11773
|
),
|
|
11754
11774
|
children: [
|
|
11755
11775
|
/* @__PURE__ */ jsxRuntime.jsxs(VisuallyHidden__namespace.Root, { children: [
|
|
11756
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11757
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11776
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Title, { children: dialogTitle }),
|
|
11777
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Description, { children: dialogDescription })
|
|
11758
11778
|
] }),
|
|
11759
|
-
!isConfirmation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11779
|
+
!isConfirmation && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11760
11780
|
"button",
|
|
11761
11781
|
{
|
|
11762
11782
|
className: cn(
|