@mastra/playground-ui 32.0.2-alpha.0 → 32.0.2-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 +6 -0
- package/dist/index.cjs.js +13 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +13 -16
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/primitives/portal-container.d.ts +4 -2
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -6485,15 +6485,16 @@ const comboboxStyles = {
|
|
|
6485
6485
|
error: "text-ui-sm text-accent2"
|
|
6486
6486
|
};
|
|
6487
6487
|
|
|
6488
|
-
const PortalContainerContext = React.createContext(
|
|
6488
|
+
const PortalContainerContext = React.createContext(void 0);
|
|
6489
6489
|
function PortalContainerProvider({
|
|
6490
6490
|
container,
|
|
6491
6491
|
children
|
|
6492
6492
|
}) {
|
|
6493
|
-
return /* @__PURE__ */ jsx(PortalContainerContext.Provider, { value: container, children });
|
|
6493
|
+
return /* @__PURE__ */ jsx(PortalContainerContext.Provider, { value: container ?? void 0, children });
|
|
6494
6494
|
}
|
|
6495
|
-
function usePortalContainer() {
|
|
6496
|
-
|
|
6495
|
+
function usePortalContainer(container) {
|
|
6496
|
+
const fromContext = React.useContext(PortalContainerContext);
|
|
6497
|
+
return container ?? fromContext ?? void 0;
|
|
6497
6498
|
}
|
|
6498
6499
|
|
|
6499
6500
|
const triggerVariantStyles = {
|
|
@@ -6518,8 +6519,7 @@ function Combobox({
|
|
|
6518
6519
|
error
|
|
6519
6520
|
}) {
|
|
6520
6521
|
const selectedOption = options.find((option) => option.value === value) ?? null;
|
|
6521
|
-
const
|
|
6522
|
-
const resolvedContainer = container ?? portalContainer ?? void 0;
|
|
6522
|
+
const resolvedContainer = usePortalContainer(container);
|
|
6523
6523
|
const handleSelect = (item) => {
|
|
6524
6524
|
if (item) {
|
|
6525
6525
|
onValueChange?.(item.value);
|
|
@@ -7096,9 +7096,8 @@ const SelectTrigger = React.forwardRef(
|
|
|
7096
7096
|
SelectTrigger.displayName = "SelectTrigger";
|
|
7097
7097
|
const SelectContent = React.forwardRef(
|
|
7098
7098
|
({ className, children, position: _position, container, side = "bottom", align = "start", sideOffset = 4, ...props }, ref) => {
|
|
7099
|
-
const
|
|
7100
|
-
|
|
7101
|
-
return /* @__PURE__ */ jsx(Select$1.Portal, { container: resolvedContainer ?? void 0, children: /* @__PURE__ */ jsx(
|
|
7099
|
+
const resolvedContainer = usePortalContainer(container);
|
|
7100
|
+
return /* @__PURE__ */ jsx(Select$1.Portal, { container: resolvedContainer, children: /* @__PURE__ */ jsx(
|
|
7102
7101
|
Select$1.Positioner,
|
|
7103
7102
|
{
|
|
7104
7103
|
className: "z-50 outline-none",
|
|
@@ -7546,8 +7545,8 @@ const DropdownMenuSubTrigger = React.forwardRef(
|
|
|
7546
7545
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
7547
7546
|
const DropdownMenuSubContent = React.forwardRef(
|
|
7548
7547
|
({ className, align = "start", alignOffset = -4, side = "right", sideOffset = 0, ...props }, ref) => {
|
|
7549
|
-
const
|
|
7550
|
-
return /* @__PURE__ */ jsx(Menu.Portal, { container:
|
|
7548
|
+
const resolvedContainer = usePortalContainer();
|
|
7549
|
+
return /* @__PURE__ */ jsx(Menu.Portal, { container: resolvedContainer, children: /* @__PURE__ */ jsx(
|
|
7551
7550
|
Menu.Positioner,
|
|
7552
7551
|
{
|
|
7553
7552
|
align,
|
|
@@ -7571,8 +7570,7 @@ const DropdownMenuSubContent = React.forwardRef(
|
|
|
7571
7570
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
7572
7571
|
const DropdownMenuContent = React.forwardRef(
|
|
7573
7572
|
({ className, container, align = "start", alignOffset = 0, side = "bottom", sideOffset = 8, ...props }, ref) => {
|
|
7574
|
-
const
|
|
7575
|
-
const resolvedContainer = container ?? portalContainer ?? void 0;
|
|
7573
|
+
const resolvedContainer = usePortalContainer(container);
|
|
7576
7574
|
return /* @__PURE__ */ jsx(Menu.Portal, { container: resolvedContainer, children: /* @__PURE__ */ jsx(
|
|
7577
7575
|
Menu.Positioner,
|
|
7578
7576
|
{
|
|
@@ -8651,9 +8649,8 @@ PopoverTrigger.displayName = "PopoverTrigger";
|
|
|
8651
8649
|
const PopoverContent = React.forwardRef(
|
|
8652
8650
|
({ className, container, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }, ref) => {
|
|
8653
8651
|
const classNameString = typeof className === "string" ? className : void 0;
|
|
8654
|
-
const
|
|
8655
|
-
|
|
8656
|
-
return /* @__PURE__ */ jsx(Popover$1.Portal, { container: resolvedContainer ?? void 0, children: /* @__PURE__ */ jsx(
|
|
8652
|
+
const resolvedContainer = usePortalContainer(container);
|
|
8653
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { container: resolvedContainer, children: /* @__PURE__ */ jsx(
|
|
8657
8654
|
Popover$1.Positioner,
|
|
8658
8655
|
{
|
|
8659
8656
|
align,
|