@mastra/playground-ui 29.0.1-alpha.0 → 30.0.0-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/CHANGELOG.md +108 -0
- package/dist/index.cjs.js +288 -378
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +110 -64
- package/dist/index.es.js +290 -371
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/components/Checkbox/checkbox.d.ts +18 -2
- package/dist/src/ds/components/DataList/ScoresDataList/scores-data-list.d.ts +6 -2
- package/dist/src/ds/components/DataList/TracesDataList/traces-data-list-cells.d.ts +0 -12
- package/dist/src/ds/components/DataList/TracesDataList/traces-data-list.d.ts +11 -6
- package/dist/src/ds/components/DataList/data-list-cells.d.ts +46 -3
- package/dist/src/ds/components/DataList/data-list-row-button.d.ts +3 -2
- package/dist/src/ds/components/DataList/data-list-row-link.d.ts +5 -3
- package/dist/src/ds/components/DataList/data-list-row.d.ts +7 -2
- package/dist/src/ds/components/DataList/data-list-top-cell.d.ts +24 -3
- package/dist/src/ds/components/DataList/data-list-top-cells.d.ts +35 -0
- package/dist/src/ds/components/DataList/data-list-top.d.ts +8 -1
- package/dist/src/ds/components/DataList/data-list.d.ts +18 -4
- package/dist/src/ds/components/DataList/data-list.stories.d.ts +26 -0
- package/dist/src/ds/components/DataList/shared.d.ts +44 -1
- package/dist/src/ds/components/Label/label.d.ts +1 -3
- package/dist/src/ds/components/LogsDataList/logs-data-list-cells.d.ts +0 -8
- package/dist/src/ds/components/LogsDataList/logs-data-list.d.ts +10 -5
- package/dist/src/ds/components/RadioGroup/radio-group.d.ts +10 -3
- package/dist/src/ds/components/Switch/switch.d.ts +7 -2
- package/dist/src/ds/components/ThemeToggle/theme-toggle.d.ts +4 -2
- package/dist/src/index.d.ts +0 -1
- package/package.json +6 -10
- package/dist/src/ds/components/EntryList/entry-list-entries-skeleton.d.ts +0 -6
- package/dist/src/ds/components/EntryList/entry-list-entries.d.ts +0 -5
- package/dist/src/ds/components/EntryList/entry-list-entry-col.d.ts +0 -9
- package/dist/src/ds/components/EntryList/entry-list-entry.d.ts +0 -10
- package/dist/src/ds/components/EntryList/entry-list-header.d.ts +0 -5
- package/dist/src/ds/components/EntryList/entry-list-message.d.ts +0 -7
- package/dist/src/ds/components/EntryList/entry-list-next-page-loading.d.ts +0 -8
- package/dist/src/ds/components/EntryList/entry-list-pagination.d.ts +0 -7
- package/dist/src/ds/components/EntryList/entry-list-root.d.ts +0 -5
- package/dist/src/ds/components/EntryList/entry-list-skeleton.d.ts +0 -2
- package/dist/src/ds/components/EntryList/entry-list-trim.d.ts +0 -5
- package/dist/src/ds/components/EntryList/entry-list.d.ts +0 -20
- package/dist/src/ds/components/EntryList/entry-list.stories.d.ts +0 -10
- package/dist/src/ds/components/EntryList/helpers.d.ts +0 -10
- package/dist/src/ds/components/EntryList/index.d.ts +0 -5
- package/dist/src/ds/components/EntryList/shared.d.ts +0 -2
- package/dist/src/ds/components/EntryList/types.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,113 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 30.0.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Migrated the Switch component to Base UI for smoother animations and consistent behavior. No API changes — `checked`, `defaultChecked`, `onCheckedChange`, and `disabled` work exactly as before. ([#16891](https://github.com/mastra-ai/mastra/pull/16891))
|
|
8
|
+
|
|
9
|
+
- Added `DataList` primitives and props for building selection-aware, condensed list rows that match the Traces/Logs visual style. ([#16820](https://github.com/mastra-ai/mastra/pull/16820))
|
|
10
|
+
|
|
11
|
+
**New cells** on `DataList`:
|
|
12
|
+
- `IdCell` — compact mono cell that truncates long IDs to 8 chars.
|
|
13
|
+
- `MonoCell` — compact mono + truncate text cell (for input previews, JSON summaries, etc.).
|
|
14
|
+
- `DateCell` — compact date cell rendering "Today" or "MMM dd".
|
|
15
|
+
- `TimeCell` — compact mono time cell rendering `HH:mm:ss.SSS` with the millisecond portion tinted.
|
|
16
|
+
- `SelectCell` — labelled checkbox cell with a shift-key range-select handler.
|
|
17
|
+
- `TopSelectCell` — header version with `indeterminate` support for "select all".
|
|
18
|
+
- `TopCells` — non-interactive header sibling of `RowButton`, for hosting top cells beside a leading select cell.
|
|
19
|
+
|
|
20
|
+
**New props** on `DataList.RowButton` and `DataList.RowLink`:
|
|
21
|
+
- `flushLeft` — drops the default left margin when wrapped beside a leading cell.
|
|
22
|
+
- `colStart` — places the row starting at a column line (e.g. `colStart={2}` to leave column 1 for a leading cell).
|
|
23
|
+
- `featured` — applies the highlighted background to mark the active row.
|
|
24
|
+
|
|
25
|
+
**New props** on existing wrappers:
|
|
26
|
+
- `as` on `DataList.Cell` and `DataList.TopCell` — render the cell as any HTML element (e.g. `<label>` so the whole cell is clickable).
|
|
27
|
+
- `hasLeadingCell` on `DataList.Top` — drops default gap and left padding so a leading cell sits flush, mirroring how `Row` + `RowButton` compose.
|
|
28
|
+
|
|
29
|
+
**Example** — selection row with a checkbox in column 1 and an interactive button spanning the rest:
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
<DataList.Row>
|
|
33
|
+
<DataList.SelectCell checked={isSelected} onToggle={shiftKey => toggle(id, shiftKey)} />
|
|
34
|
+
<DataList.RowButton flushLeft colStart={2} featured={isFeatured} onClick={onRowClick}>
|
|
35
|
+
<DataList.IdCell id={item.id} />
|
|
36
|
+
<DataList.MonoCell>{item.input}</DataList.MonoCell>
|
|
37
|
+
</DataList.RowButton>
|
|
38
|
+
</DataList.Row>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Internally the Traces and Logs list views now use the shared primitives — no behavior change for those consumers.
|
|
42
|
+
|
|
43
|
+
- Added support for trailing cells in `DataList` rows. `DataList.RowButton` and `DataList.RowLink` now accept `colEnd` and `flushRight` (mirrors of the existing `colStart`/`flushLeft`), so a row can sit beside a non-interactive trailing cell (e.g. an actions column) and stay aligned with the header. Rows wrapped in `DataList.Row` now render a full-width separator that extends through the leading and trailing cells. `DataList.MonoCell` also gained an optional `height` prop so non-compact lists can use it without forcing compact padding. ([#16888](https://github.com/mastra-ai/mastra/pull/16888))
|
|
44
|
+
|
|
45
|
+
**Usage**
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
<DataList.Row>
|
|
49
|
+
<DataList.RowButton flushLeft flushRight colEnd={-2} onClick={onClick}>
|
|
50
|
+
{/* main row content */}
|
|
51
|
+
</DataList.RowButton>
|
|
52
|
+
<DataList.Cell>
|
|
53
|
+
{/* trailing actions, e.g. icon buttons */}
|
|
54
|
+
</DataList.Cell>
|
|
55
|
+
</DataList.Row>
|
|
56
|
+
|
|
57
|
+
<DataList.MonoCell height="default">long mono text…</DataList.MonoCell>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- Migrated the Label component off Radix UI. It now renders a native `<label>` element with the same props and styling — `htmlFor`, `className`, and children behave exactly as before. ([#16892](https://github.com/mastra-ai/mastra/pull/16892))
|
|
61
|
+
|
|
62
|
+
- Removed `EntryList` and its sub-components (`EntryList.Header`, `EntryList.Entries`, `EntryList.Entry`, `EntryList.EntryText`, `EntryList.Pagination`, `EntryList.NoMatch`, `EntryListSkeleton`, etc.) from the public API. All in-repo list views have migrated to `DataList`, which is the recommended replacement. ([#16910](https://github.com/mastra-ai/mastra/pull/16910))
|
|
63
|
+
|
|
64
|
+
**Migration:**
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
// Before
|
|
68
|
+
import { EntryList, EntryListSkeleton } from '@mastra/playground-ui';
|
|
69
|
+
|
|
70
|
+
<EntryList>
|
|
71
|
+
<EntryList.Trim>
|
|
72
|
+
<EntryList.Header columns={columns} />
|
|
73
|
+
<EntryList.Entries>
|
|
74
|
+
{items.map(item => (
|
|
75
|
+
<EntryList.Entry key={item.id} columns={columns} entry={item} onClick={…}>
|
|
76
|
+
{columns.map(col => <EntryList.EntryText key={col.name}>{item[col.name]}</EntryList.EntryText>)}
|
|
77
|
+
</EntryList.Entry>
|
|
78
|
+
))}
|
|
79
|
+
</EntryList.Entries>
|
|
80
|
+
</EntryList.Trim>
|
|
81
|
+
<EntryList.Pagination …/>
|
|
82
|
+
</EntryList>
|
|
83
|
+
|
|
84
|
+
// After
|
|
85
|
+
import { DataList } from '@mastra/playground-ui';
|
|
86
|
+
|
|
87
|
+
<DataList columns={gridColumns}>
|
|
88
|
+
<DataList.Top>
|
|
89
|
+
{columns.map(col => <DataList.TopCell key={col.name}>{col.label}</DataList.TopCell>)}
|
|
90
|
+
</DataList.Top>
|
|
91
|
+
{items.map(item => (
|
|
92
|
+
<DataList.RowButton key={item.id} onClick={…}>
|
|
93
|
+
{columns.map(col => <DataList.Cell key={col.name}>{item[col.name]}</DataList.Cell>)}
|
|
94
|
+
</DataList.RowButton>
|
|
95
|
+
))}
|
|
96
|
+
<DataList.Pagination …/>
|
|
97
|
+
</DataList>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- Improved the Checkbox component by migrating it to Base UI. The public API is unchanged — `checked` (including the `'indeterminate'` value), `defaultChecked`, `onCheckedChange`, and `disabled` all behave as before. ([#16905](https://github.com/mastra-ai/mastra/pull/16905))
|
|
101
|
+
|
|
102
|
+
- Fixed MetricsDataTable sticky header and column backgrounds to use surface3 token, matching DashboardCard surface ([#16828](https://github.com/mastra-ai/mastra/pull/16828))
|
|
103
|
+
|
|
104
|
+
- Improved the RadioGroup component by migrating it to Base UI. The public API (`RadioGroup`, `RadioGroupItem`, `value`, `onValueChange`, `disabled`) is unchanged. Also fixes the radio indicator sizing/centering — the control now stays square and the inner dot is properly centered. ([#16904](https://github.com/mastra-ai/mastra/pull/16904))
|
|
105
|
+
|
|
106
|
+
- Updated dependencies [[`2f5f58a`](https://github.com/mastra-ai/mastra/commit/2f5f58a9a8bb13bcdc6789db221eef7c9bf1ff02), [`2f5f58a`](https://github.com/mastra-ai/mastra/commit/2f5f58a9a8bb13bcdc6789db221eef7c9bf1ff02)]:
|
|
107
|
+
- @mastra/client-js@1.21.0-alpha.1
|
|
108
|
+
- @mastra/core@1.37.0-alpha.1
|
|
109
|
+
- @mastra/react@0.4.1-alpha.1
|
|
110
|
+
|
|
3
111
|
## 29.0.1-alpha.0
|
|
4
112
|
|
|
5
113
|
### Patch Changes
|