@mastra/playground-ui 29.0.0-alpha.7 → 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 +60 -0
- package/dist/index.cjs.js +325 -168
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +217 -29
- package/dist/index.es.js +323 -164
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/components/Command/command.d.ts +2 -1
- package/dist/src/ds/components/ContextMenu/context-menu.d.ts +43 -0
- package/dist/src/ds/components/ContextMenu/context-menu.stories.d.ts +11 -0
- package/dist/src/ds/components/ContextMenu/index.d.ts +1 -0
- package/dist/src/ds/components/Dialog/dialog.d.ts +27 -9
- package/dist/src/ds/components/DropdownMenu/dropdown-menu.d.ts +33 -20
- package/dist/src/ds/components/Popover/popover.d.ts +11 -5
- package/dist/src/ds/components/Slider/slider.d.ts +6 -3
- package/dist/src/ds/components/Slider/slider.stories.d.ts +4 -0
- package/package.json +6 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
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
|
+
|
|
9
|
+
## 29.0.0-alpha.8
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- Added `ContextMenu` for right-click interactions. Supports submenus, checkbox and radio items, keyboard shortcuts, and a `destructive` variant for dangerous actions like delete. ([#16791](https://github.com/mastra-ai/mastra/pull/16791))
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { ContextMenu } from '@mastra/playground-ui';
|
|
17
|
+
|
|
18
|
+
<ContextMenu>
|
|
19
|
+
<ContextMenu.Trigger className="…">Right click here</ContextMenu.Trigger>
|
|
20
|
+
<ContextMenu.Content>
|
|
21
|
+
<ContextMenu.Item>Rename</ContextMenu.Item>
|
|
22
|
+
<ContextMenu.Item variant="destructive">Delete</ContextMenu.Item>
|
|
23
|
+
</ContextMenu.Content>
|
|
24
|
+
</ContextMenu>;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Added a `destructive` variant on `DropdownMenu.Item` to highlight dangerous actions like delete. ([#16791](https://github.com/mastra-ai/mastra/pull/16791))
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
<DropdownMenu.Item variant="destructive">Delete project</DropdownMenu.Item>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- `PopoverContent` no longer forwards the underlying library's auto-focus event handlers (`onOpenAutoFocus`, `onCloseAutoFocus`). To control focus when the popover opens or closes, use `initialFocus` and `finalFocus`. ([#16791](https://github.com/mastra-ai/mastra/pull/16791))
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
// Before
|
|
39
|
+
<PopoverContent onOpenAutoFocus={(e) => e.preventDefault()} />
|
|
40
|
+
|
|
41
|
+
// After
|
|
42
|
+
<PopoverContent initialFocus={false} />
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- Migrated the Slider component to base-ui with a refined neutral visual design. ([#16788](https://github.com/mastra-ai/mastra/pull/16788))
|
|
46
|
+
|
|
47
|
+
**What changed**
|
|
48
|
+
- Replaced `@radix-ui/react-slider` with `@base-ui/react/slider` as the underlying primitive
|
|
49
|
+
- Refreshed visuals: thin rounded thumb with white border and neutral inside, opacity-based track that adapts to any surface, neutral filled indicator (no green/accent color)
|
|
50
|
+
- Larger click target via padded `Slider.Control` and an invisible hit area on the thumb so it is easier to grab
|
|
51
|
+
- Added `cursor-pointer` on the control and `cursor-not-allowed` when disabled
|
|
52
|
+
- Removed the now unused `@radix-ui/react-slider` and `@radix-ui/react-tabs` dependencies
|
|
53
|
+
|
|
54
|
+
**API compatibility**
|
|
55
|
+
|
|
56
|
+
The public API is preserved. `onValueChange` and `onValueCommitted` are wrapped so consumers always receive `number[]`, even though base-ui returns `number | number[]` internally. Existing call sites like `<Slider value={[temperature]} onValueChange={value => setTemperature(value[0])} />` continue to work without changes.
|
|
57
|
+
|
|
58
|
+
- Updated dependencies [[`9aee493`](https://github.com/mastra-ai/mastra/commit/9aee493ed6089b5133472623dcce49934bf2d509)]:
|
|
59
|
+
- @mastra/core@1.36.0-alpha.8
|
|
60
|
+
- @mastra/client-js@1.20.0-alpha.8
|
|
61
|
+
- @mastra/react@0.4.0-alpha.8
|
|
62
|
+
|
|
3
63
|
## 29.0.0-alpha.7
|
|
4
64
|
|
|
5
65
|
### Patch Changes
|