@mastra/playground-ui 30.0.0-alpha.4 → 30.0.0-alpha.5
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 +31 -0
- package/dist/index.cjs.js +106 -41
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +62 -52
- package/dist/index.es.js +106 -40
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/components/DataList/data-list-row-static.d.ts +8 -0
- package/dist/src/ds/components/DataList/data-list.d.ts +1 -0
- package/dist/src/ds/components/Select/select.d.ts +48 -12
- package/package.json +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 30.0.0-alpha.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Improved the Select component by migrating it to Base UI for more reliable positioning and accessibility. The public API (`Select`, `SelectTrigger`, `SelectContent`, `SelectItem`, `SelectValue`, `SelectGroup`) is unchanged, so no consumer updates are needed. ([#16918](https://github.com/mastra-ai/mastra/pull/16918))
|
|
8
|
+
|
|
9
|
+
- Added `DataList.RowStatic`, a non-interactive row primitive. It renders a row that looks identical to other list rows but does not respond to clicks and shows no hover/focus state — use it alongside `DataList.RowButton` / `DataList.RowLink` when only some rows are clickable (e.g. error or placeholder entries in an otherwise navigable list). ([#16970](https://github.com/mastra-ai/mastra/pull/16970))
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
{
|
|
13
|
+
rows.map(row =>
|
|
14
|
+
row.href ? (
|
|
15
|
+
<DataList.RowLink key={row.id} to={row.href} LinkComponent={Link}>
|
|
16
|
+
{row.cells}
|
|
17
|
+
</DataList.RowLink>
|
|
18
|
+
) : (
|
|
19
|
+
<DataList.RowStatic key={row.id}>{row.cells}</DataList.RowStatic>
|
|
20
|
+
),
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- Fixed Studio Settings page (and other default-height `PageLayout` pages) clipping their content with no scrollbar on viewports shorter than the form. Users on short laptop screens (under ~991px tall) could not reach the Save button under the Mastra Connection headers form, making it impossible to apply changes. Default-height `PageLayout` pages now grow with their content and scroll through the studio chrome wrapper; `height="full"` pages (Logs, Traces, Metrics, etc.) are unchanged. ([#16999](https://github.com/mastra-ai/mastra/pull/16999))
|
|
26
|
+
|
|
27
|
+
- Restyled scrollbars across the studio UI to match the design system — thin, themed thumb on a transparent track — replacing the default OS scrollbars that clashed with dark and light surfaces. ([#16918](https://github.com/mastra-ai/mastra/pull/16918))
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`6096445`](https://github.com/mastra-ai/mastra/commit/60964459733f0ab384584d95e19c36607ffdf7b0), [`91cf0e0`](https://github.com/mastra-ai/mastra/commit/91cf0e027e511b871481a8576b56b7af83b15afd)]:
|
|
30
|
+
- @mastra/core@1.37.0-alpha.5
|
|
31
|
+
- @mastra/client-js@1.21.0-alpha.5
|
|
32
|
+
- @mastra/react@0.4.1-alpha.5
|
|
33
|
+
|
|
3
34
|
## 30.0.0-alpha.4
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -25,7 +25,7 @@ const collapsible = require('@base-ui/react/collapsible');
|
|
|
25
25
|
const combobox = require('@base-ui/react/combobox');
|
|
26
26
|
const cmdk = require('cmdk');
|
|
27
27
|
const dialog = require('@base-ui/react/dialog');
|
|
28
|
-
const
|
|
28
|
+
const select = require('@base-ui/react/select');
|
|
29
29
|
const tabs = require('@base-ui/react/tabs');
|
|
30
30
|
const drawer = require('@base-ui/react/drawer');
|
|
31
31
|
const menu = require('@base-ui/react/menu');
|
|
@@ -75,7 +75,6 @@ function _interopNamespaceDefault(e) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
78
|
-
const SelectPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SelectPrimitive);
|
|
79
78
|
const VisuallyHidden__namespace = /*#__PURE__*/_interopNamespaceDefault(VisuallyHidden);
|
|
80
79
|
const Dialog__namespace = /*#__PURE__*/_interopNamespaceDefault(Dialog$1);
|
|
81
80
|
|
|
@@ -6695,13 +6694,45 @@ const CommandShortcut = ({ className, ...props }) => {
|
|
|
6695
6694
|
};
|
|
6696
6695
|
CommandShortcut.displayName = "CommandShortcut";
|
|
6697
6696
|
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6697
|
+
function isSelectItem(node) {
|
|
6698
|
+
return React__namespace.isValidElement(node) && node.type?.displayName === "SelectItem";
|
|
6699
|
+
}
|
|
6700
|
+
function collectItems(children, acc) {
|
|
6701
|
+
React__namespace.Children.forEach(children, (child) => {
|
|
6702
|
+
if (!React__namespace.isValidElement(child)) return;
|
|
6703
|
+
if (isSelectItem(child)) {
|
|
6704
|
+
acc.push({ value: child.props.value, label: child.props.children });
|
|
6705
|
+
return;
|
|
6706
|
+
}
|
|
6707
|
+
const nested = child.props?.children;
|
|
6708
|
+
if (nested != null) collectItems(nested, acc);
|
|
6709
|
+
});
|
|
6710
|
+
}
|
|
6711
|
+
function Select({ children, items, onValueChange, ...props }) {
|
|
6712
|
+
const derivedItems = React__namespace.useMemo(() => {
|
|
6713
|
+
if (items != null) return items;
|
|
6714
|
+
const acc = [];
|
|
6715
|
+
collectItems(children, acc);
|
|
6716
|
+
return acc.length > 0 ? acc : void 0;
|
|
6717
|
+
}, [items, children]);
|
|
6718
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6719
|
+
select.Select.Root,
|
|
6720
|
+
{
|
|
6721
|
+
items: derivedItems,
|
|
6722
|
+
onValueChange: onValueChange ? (value, eventDetails) => onValueChange(value, eventDetails) : void 0,
|
|
6723
|
+
...props,
|
|
6724
|
+
children
|
|
6725
|
+
}
|
|
6726
|
+
);
|
|
6727
|
+
}
|
|
6728
|
+
Select.displayName = "Select";
|
|
6729
|
+
const SelectGroup = select.Select.Group;
|
|
6730
|
+
const SelectValue = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(select.Select.Value, { ref, className: cn("truncate", className), ...props }));
|
|
6731
|
+
SelectValue.displayName = "SelectValue";
|
|
6701
6732
|
const SelectTrigger = React__namespace.forwardRef(
|
|
6702
|
-
({ className, children, size = "default", ...props }, ref) => {
|
|
6733
|
+
({ className, children, size = "default", variant: _variant, ...props }, ref) => {
|
|
6703
6734
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6704
|
-
|
|
6735
|
+
select.Select.Trigger,
|
|
6705
6736
|
{
|
|
6706
6737
|
ref,
|
|
6707
6738
|
className: cn(
|
|
@@ -6711,7 +6742,7 @@ const SelectTrigger = React__namespace.forwardRef(
|
|
|
6711
6742
|
"outline-none transition-colors duration-normal ease-out-custom",
|
|
6712
6743
|
"hover:bg-surface3 hover:text-neutral6 hover:border-border2 active:bg-surface4",
|
|
6713
6744
|
"focus:outline-none focus-visible:outline-none focus-visible:border-border2",
|
|
6714
|
-
"data-[
|
|
6745
|
+
"data-[popup-open]:bg-surface3 data-[popup-open]:text-neutral6 data-[popup-open]:border-border2",
|
|
6715
6746
|
"data-[placeholder]:text-neutral3",
|
|
6716
6747
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
6717
6748
|
"[&>span]:truncate",
|
|
@@ -6720,39 +6751,47 @@ const SelectTrigger = React__namespace.forwardRef(
|
|
|
6720
6751
|
...props,
|
|
6721
6752
|
children: [
|
|
6722
6753
|
children,
|
|
6723
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6754
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6755
|
+
select.Select.Icon,
|
|
6756
|
+
{
|
|
6757
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: cn("h-4 w-4 shrink-0 text-neutral3 opacity-70", transitions.colors) })
|
|
6758
|
+
}
|
|
6759
|
+
)
|
|
6724
6760
|
]
|
|
6725
6761
|
}
|
|
6726
6762
|
);
|
|
6727
6763
|
}
|
|
6728
6764
|
);
|
|
6729
|
-
SelectTrigger.displayName =
|
|
6730
|
-
const SelectContent = React__namespace.forwardRef(
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
)
|
|
6753
|
-
|
|
6765
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
6766
|
+
const SelectContent = React__namespace.forwardRef(
|
|
6767
|
+
({ className, children, position: _position, container, side = "bottom", align = "start", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(select.Select.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6768
|
+
select.Select.Positioner,
|
|
6769
|
+
{
|
|
6770
|
+
className: "z-50 outline-none",
|
|
6771
|
+
side,
|
|
6772
|
+
align,
|
|
6773
|
+
sideOffset,
|
|
6774
|
+
alignItemWithTrigger: false,
|
|
6775
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6776
|
+
select.Select.Popup,
|
|
6777
|
+
{
|
|
6778
|
+
ref,
|
|
6779
|
+
className: cn(
|
|
6780
|
+
"relative z-50 min-w-32 min-w-[var(--anchor-width)] max-h-dropdown-max-height max-h-[var(--available-height)] overflow-y-auto overflow-x-hidden rounded-xl border border-border1 bg-surface3 p-1 text-neutral4 shadow-dialog origin-[var(--transform-origin)]",
|
|
6781
|
+
"data-[open]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95 data-[open]:zoom-in-95",
|
|
6782
|
+
"data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
|
6783
|
+
className
|
|
6784
|
+
),
|
|
6785
|
+
...props,
|
|
6786
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.List, { children })
|
|
6787
|
+
}
|
|
6788
|
+
)
|
|
6789
|
+
}
|
|
6790
|
+
) })
|
|
6791
|
+
);
|
|
6792
|
+
SelectContent.displayName = "SelectContent";
|
|
6754
6793
|
const SelectItem = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6755
|
-
|
|
6794
|
+
select.Select.Item,
|
|
6756
6795
|
{
|
|
6757
6796
|
ref,
|
|
6758
6797
|
className: cn(
|
|
@@ -6762,18 +6801,18 @@ const SelectItem = React__namespace.forwardRef(({ className, children, ...props
|
|
|
6762
6801
|
"hover:bg-surface4 hover:text-neutral6",
|
|
6763
6802
|
"focus:bg-surface4 focus:text-neutral6",
|
|
6764
6803
|
"data-[highlighted]:bg-surface4 data-[highlighted]:text-neutral6",
|
|
6765
|
-
"data-[
|
|
6804
|
+
"data-[selected]:text-neutral6",
|
|
6766
6805
|
"data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
6767
6806
|
className
|
|
6768
6807
|
),
|
|
6769
6808
|
...props,
|
|
6770
6809
|
children: [
|
|
6771
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6772
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6810
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-neutral6" }) }) }),
|
|
6811
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemText, { children })
|
|
6773
6812
|
]
|
|
6774
6813
|
}
|
|
6775
6814
|
));
|
|
6776
|
-
SelectItem.displayName =
|
|
6815
|
+
SelectItem.displayName = "SelectItem";
|
|
6777
6816
|
|
|
6778
6817
|
const Tabs = ({ children, defaultTab, value, onValueChange, className }) => {
|
|
6779
6818
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13334,6 +13373,31 @@ function DataListRowLink({
|
|
|
13334
13373
|
);
|
|
13335
13374
|
}
|
|
13336
13375
|
|
|
13376
|
+
const DataListRowStatic = React.forwardRef(
|
|
13377
|
+
({ children, className, flushLeft, flushRight, colStart, colEnd, featured, style, ...rest }, ref) => {
|
|
13378
|
+
const hasColumnOverride = colStart !== void 0 || colEnd !== void 0;
|
|
13379
|
+
const resolvedStyle = hasColumnOverride ? { ...style, gridColumn: `${colStart ?? 1} / ${colEnd ?? -1}` } : style;
|
|
13380
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13381
|
+
"div",
|
|
13382
|
+
{
|
|
13383
|
+
ref,
|
|
13384
|
+
className: cn(
|
|
13385
|
+
"mx-1 grid grid-cols-subgrid gap-8 px-5",
|
|
13386
|
+
...dataListRowOuterStyles,
|
|
13387
|
+
flushLeft && "ml-0!",
|
|
13388
|
+
flushRight && "mr-0!",
|
|
13389
|
+
featured && "bg-surface4",
|
|
13390
|
+
className
|
|
13391
|
+
),
|
|
13392
|
+
style: resolvedStyle,
|
|
13393
|
+
...rest,
|
|
13394
|
+
children
|
|
13395
|
+
}
|
|
13396
|
+
);
|
|
13397
|
+
}
|
|
13398
|
+
);
|
|
13399
|
+
DataListRowStatic.displayName = "DataListRowStatic";
|
|
13400
|
+
|
|
13337
13401
|
function DataListSpacer({ height }) {
|
|
13338
13402
|
if (height <= 0) return null;
|
|
13339
13403
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-full", style: { height } });
|
|
@@ -13468,6 +13532,7 @@ const DataList = Object.assign(DataListRoot, {
|
|
|
13468
13532
|
Row: DataListRow,
|
|
13469
13533
|
RowButton: DataListRowButton,
|
|
13470
13534
|
RowLink: DataListRowLink,
|
|
13535
|
+
RowStatic: DataListRowStatic,
|
|
13471
13536
|
Cell: DataListCell,
|
|
13472
13537
|
TextCell: DataListTextCell,
|
|
13473
13538
|
NameCell: DataListNameCell,
|
|
@@ -13958,10 +14023,10 @@ function PageLayoutRoot({
|
|
|
13958
14023
|
"main",
|
|
13959
14024
|
{
|
|
13960
14025
|
className: cn(
|
|
13961
|
-
"w-full
|
|
14026
|
+
"w-full grid grid-rows-[auto_auto] p-6 content-start",
|
|
13962
14027
|
{
|
|
13963
14028
|
"max-w-screen-lg mx-auto pt-8": width === "narrow",
|
|
13964
|
-
"grid-rows-[auto_1fr]": height === "full"
|
|
14029
|
+
"h-full grid-rows-[auto_1fr] overflow-y-auto": height === "full"
|
|
13965
14030
|
},
|
|
13966
14031
|
className
|
|
13967
14032
|
// 'LAYOUT_ROOT border border-dashed border-orange-400',
|