@mastra/playground-ui 30.0.0-alpha.4 → 30.0.0-alpha.8
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 +67 -0
- package/dist/index.cjs.js +322 -51
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +72 -52
- package/dist/index.es.js +324 -53
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/components/Avatar/Avatar.d.ts +3 -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/Searchbar/searchbar.d.ts +2 -1
- package/dist/src/ds/components/Select/select.d.ts +48 -12
- package/dist/src/ds/components/Tabs/tabs-list.d.ts +7 -1
- package/dist/src/ds/components/Tabs/tabs.stories.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/lib/colors.d.ts +1 -3
- package/package.json +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 30.0.0-alpha.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Exported ContextMenu from the package entry so it can be imported alongside other Base UI primitives. ([#17062](https://github.com/mastra-ai/mastra/pull/17062))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`c35b962`](https://github.com/mastra-ai/mastra/commit/c35b9625c7e854fcfdeee226a3338a750d0ff211), [`c35b962`](https://github.com/mastra-ai/mastra/commit/c35b9625c7e854fcfdeee226a3338a750d0ff211), [`9be1545`](https://github.com/mastra-ai/mastra/commit/9be1545475eb81a716169bb1281a37853cc739e0), [`4084113`](https://github.com/mastra-ai/mastra/commit/408411370fc48a822e8b616b3b63f9409774e0e9), [`bc01b1b`](https://github.com/mastra-ai/mastra/commit/bc01b1bfafe381d90af909f8bce7eeb4eee779f2), [`1120b4f`](https://github.com/mastra-ai/mastra/commit/1120b4fa928552c6ee1751efa5603d955841e766)]:
|
|
10
|
+
- @mastra/core@1.37.0-alpha.8
|
|
11
|
+
- @mastra/client-js@1.21.0-alpha.8
|
|
12
|
+
- @mastra/react@0.4.1-alpha.8
|
|
13
|
+
|
|
14
|
+
## 30.0.0-alpha.7
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Design-system additions to support theming: ([#17059](https://github.com/mastra-ai/mastra/pull/17059))
|
|
19
|
+
- `Avatar` now accepts optional `color` and `textColor` props for per-instance tinting, and falls back to the initial when the image fails to load.
|
|
20
|
+
- `Searchbar` accepts an optional `className` to let consumers tune layout without forking.
|
|
21
|
+
- `TabList` accepts a `style` prop and the active-tab indicator now reads from the `--tab-indicator-color` CSS variable, letting parents theme the indicator (e.g. per-agent accent color).
|
|
22
|
+
- `stringToColor` now accepts any `number` for the `lightness` argument and defaults to `90` instead of `75` for a lighter fallback chip.
|
|
23
|
+
- Global `body` rule enables `font-smoothing` / `-webkit-font-smoothing` for crisper UI text.
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [[`f1b9f87`](https://github.com/mastra-ai/mastra/commit/f1b9f87a00505f15d4fe39f92de287674adc2198), [`168fa09`](https://github.com/mastra-ai/mastra/commit/168fa09d6b39114cb8c13bd06f1dccb9bc81c6cd), [`af2e1f8`](https://github.com/mastra-ai/mastra/commit/af2e1f8e2a2d2c4ba75167d5c93ca44395639eff)]:
|
|
26
|
+
- @mastra/react@0.4.1-alpha.7
|
|
27
|
+
- @mastra/core@1.37.0-alpha.7
|
|
28
|
+
- @mastra/client-js@1.21.0-alpha.7
|
|
29
|
+
|
|
30
|
+
## 30.0.0-alpha.6
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [[`0cbece9`](https://github.com/mastra-ai/mastra/commit/0cbece9d832cb134a74cdbf3682d390a058215a4), [`7dfe1bc`](https://github.com/mastra-ai/mastra/commit/7dfe1bcfe71d261a6fd6bbf29b1dec49d78fb98f), [`70cb714`](https://github.com/mastra-ai/mastra/commit/70cb7149c8f16f478e15b58498254a53181750a4), [`7f9da22`](https://github.com/mastra-ai/mastra/commit/7f9da22efd5aa595e138a31de55a5f0f2f28b33d)]:
|
|
35
|
+
- @mastra/core@1.37.0-alpha.6
|
|
36
|
+
- @mastra/client-js@1.21.0-alpha.6
|
|
37
|
+
- @mastra/react@0.4.1-alpha.6
|
|
38
|
+
|
|
39
|
+
## 30.0.0-alpha.5
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- 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))
|
|
44
|
+
|
|
45
|
+
- 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))
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
{
|
|
49
|
+
rows.map(row =>
|
|
50
|
+
row.href ? (
|
|
51
|
+
<DataList.RowLink key={row.id} to={row.href} LinkComponent={Link}>
|
|
52
|
+
{row.cells}
|
|
53
|
+
</DataList.RowLink>
|
|
54
|
+
) : (
|
|
55
|
+
<DataList.RowStatic key={row.id}>{row.cells}</DataList.RowStatic>
|
|
56
|
+
),
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- 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))
|
|
62
|
+
|
|
63
|
+
- 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))
|
|
64
|
+
|
|
65
|
+
- Updated dependencies [[`6096445`](https://github.com/mastra-ai/mastra/commit/60964459733f0ab384584d95e19c36607ffdf7b0), [`91cf0e0`](https://github.com/mastra-ai/mastra/commit/91cf0e027e511b871481a8576b56b7af83b15afd)]:
|
|
66
|
+
- @mastra/core@1.37.0-alpha.5
|
|
67
|
+
- @mastra/client-js@1.21.0-alpha.5
|
|
68
|
+
- @mastra/react@0.4.1-alpha.5
|
|
69
|
+
|
|
3
70
|
## 30.0.0-alpha.4
|
|
4
71
|
|
|
5
72
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
require('./index.css');const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const tokens = require('./tokens.cjs.js');
|
|
7
6
|
const React = require('react');
|
|
7
|
+
const tokens = require('./tokens.cjs.js');
|
|
8
8
|
const tooltip = require('@base-ui/react/tooltip');
|
|
9
9
|
const langJson = require('@codemirror/lang-json');
|
|
10
10
|
const langMarkdown = require('@codemirror/lang-markdown');
|
|
@@ -25,7 +25,8 @@ 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 contextMenu = require('@base-ui/react/context-menu');
|
|
29
|
+
const select = require('@base-ui/react/select');
|
|
29
30
|
const tabs = require('@base-ui/react/tabs');
|
|
30
31
|
const drawer = require('@base-ui/react/drawer');
|
|
31
32
|
const menu = require('@base-ui/react/menu');
|
|
@@ -75,7 +76,6 @@ function _interopNamespaceDefault(e) {
|
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
78
|
-
const SelectPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SelectPrimitive);
|
|
79
79
|
const VisuallyHidden__namespace = /*#__PURE__*/_interopNamespaceDefault(VisuallyHidden);
|
|
80
80
|
const Dialog__namespace = /*#__PURE__*/_interopNamespaceDefault(Dialog$1);
|
|
81
81
|
|
|
@@ -3424,17 +3424,31 @@ const sizeClasses$4 = {
|
|
|
3424
3424
|
md: "h-avatar-md w-avatar-md",
|
|
3425
3425
|
lg: "h-avatar-lg w-avatar-lg"
|
|
3426
3426
|
};
|
|
3427
|
-
const Avatar = ({ src, name, size = "sm", interactive = false }) => {
|
|
3427
|
+
const Avatar = ({ src, name, size = "sm", interactive = false, color, textColor }) => {
|
|
3428
|
+
const [didError, setDidError] = React.useState(false);
|
|
3429
|
+
const initial = name.trim()[0]?.toUpperCase() ?? "A";
|
|
3430
|
+
const showImage = Boolean(src) && !didError;
|
|
3431
|
+
const showFallbackTint = !showImage && Boolean(color);
|
|
3428
3432
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3429
3433
|
"div",
|
|
3430
3434
|
{
|
|
3431
3435
|
className: cn(
|
|
3432
3436
|
sizeClasses$4[size],
|
|
3433
|
-
"border border-border1
|
|
3437
|
+
"border border-border1 shrink-0 overflow-hidden rounded-full flex items-center justify-center",
|
|
3438
|
+
!showFallbackTint && "bg-surface3",
|
|
3434
3439
|
transitions.all,
|
|
3435
3440
|
interactive && "cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"
|
|
3436
3441
|
),
|
|
3437
|
-
|
|
3442
|
+
style: showFallbackTint ? { backgroundColor: color } : void 0,
|
|
3443
|
+
children: showImage ? /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: name, className: "h-full w-full object-cover", onError: () => setDidError(true) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3444
|
+
Txt,
|
|
3445
|
+
{
|
|
3446
|
+
variant: "ui-md",
|
|
3447
|
+
className: cn("text-center", !showFallbackTint && "text-neutral4"),
|
|
3448
|
+
style: showFallbackTint && textColor ? { color: textColor } : void 0,
|
|
3449
|
+
children: initial
|
|
3450
|
+
}
|
|
3451
|
+
)
|
|
3438
3452
|
}
|
|
3439
3453
|
);
|
|
3440
3454
|
};
|
|
@@ -6695,13 +6709,226 @@ const CommandShortcut = ({ className, ...props }) => {
|
|
|
6695
6709
|
};
|
|
6696
6710
|
CommandShortcut.displayName = "CommandShortcut";
|
|
6697
6711
|
|
|
6698
|
-
const
|
|
6699
|
-
const
|
|
6700
|
-
const
|
|
6712
|
+
const ContextMenuRoot = contextMenu.ContextMenu.Root;
|
|
6713
|
+
const ContextMenuGroup = contextMenu.ContextMenu.Group;
|
|
6714
|
+
const ContextMenuPortal = contextMenu.ContextMenu.Portal;
|
|
6715
|
+
const ContextMenuSub = contextMenu.ContextMenu.SubmenuRoot;
|
|
6716
|
+
const ContextMenuRadioGroup = contextMenu.ContextMenu.RadioGroup;
|
|
6717
|
+
const itemClass$1 = cn(
|
|
6718
|
+
"relative flex cursor-pointer select-none items-center gap-2.5 rounded-lg px-2 py-1.5 text-ui-smd leading-ui-sm transition-colors text-neutral4 hover:text-neutral6 focus:text-neutral6 hover:bg-surface4 focus:bg-surface4 data-[highlighted]:bg-surface4 data-[highlighted]:text-neutral6 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:hover:bg-transparent data-disabled:hover:text-neutral4 data-disabled:focus:bg-transparent data-disabled:focus:text-neutral4 data-disabled:data-[highlighted]:bg-transparent data-disabled:data-[highlighted]:text-neutral4 [&>span]:truncate [&_svg]:size-4 [&_svg]:shrink-0 outline-none focus:outline-none focus-visible:outline-none focus-visible:ring-0",
|
|
6719
|
+
"[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:opacity-60 [&:hover>svg]:opacity-100"
|
|
6720
|
+
);
|
|
6721
|
+
const popupClass$1 = cn(
|
|
6722
|
+
"bg-surface3 text-neutral4 z-50 min-w-44 max-h-[min(20rem,var(--available-height))] overflow-x-hidden overflow-y-auto rounded-xl border border-border1 p-1 shadow-dialog origin-[var(--transform-origin)] outline-none",
|
|
6723
|
+
"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",
|
|
6724
|
+
"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"
|
|
6725
|
+
);
|
|
6726
|
+
const ContextMenuTrigger = contextMenu.ContextMenu.Trigger;
|
|
6727
|
+
const ContextMenuContent = React__namespace.forwardRef(
|
|
6728
|
+
({ className, align = "start", alignOffset = 4, side, sideOffset = 0, container, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6729
|
+
contextMenu.ContextMenu.Positioner,
|
|
6730
|
+
{
|
|
6731
|
+
align,
|
|
6732
|
+
alignOffset,
|
|
6733
|
+
side,
|
|
6734
|
+
sideOffset,
|
|
6735
|
+
className: "z-50 outline-none",
|
|
6736
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6737
|
+
contextMenu.ContextMenu.Popup,
|
|
6738
|
+
{
|
|
6739
|
+
ref,
|
|
6740
|
+
"data-slot": "context-menu-content",
|
|
6741
|
+
className: cn(popupClass$1, className),
|
|
6742
|
+
...props
|
|
6743
|
+
}
|
|
6744
|
+
)
|
|
6745
|
+
}
|
|
6746
|
+
) })
|
|
6747
|
+
);
|
|
6748
|
+
ContextMenuContent.displayName = "ContextMenuContent";
|
|
6749
|
+
const ContextMenuItem = React__namespace.forwardRef(
|
|
6750
|
+
({ className, inset, variant = "default", onSelect, onClick, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6751
|
+
contextMenu.ContextMenu.Item,
|
|
6752
|
+
{
|
|
6753
|
+
ref,
|
|
6754
|
+
"data-inset": inset ? "" : void 0,
|
|
6755
|
+
"data-variant": variant,
|
|
6756
|
+
onClick: (event) => {
|
|
6757
|
+
onClick?.(event);
|
|
6758
|
+
onSelect?.(event);
|
|
6759
|
+
},
|
|
6760
|
+
className: cn(
|
|
6761
|
+
itemClass$1,
|
|
6762
|
+
inset && "pl-8",
|
|
6763
|
+
"data-[variant=destructive]:text-accent2 data-[variant=destructive]:hover:bg-accent2/10 data-[variant=destructive]:hover:text-accent2 data-[variant=destructive]:data-[highlighted]:bg-accent2/10 data-[variant=destructive]:data-[highlighted]:text-accent2",
|
|
6764
|
+
className
|
|
6765
|
+
),
|
|
6766
|
+
...props
|
|
6767
|
+
}
|
|
6768
|
+
)
|
|
6769
|
+
);
|
|
6770
|
+
ContextMenuItem.displayName = "ContextMenuItem";
|
|
6771
|
+
const ContextMenuCheckboxItem = React__namespace.forwardRef(
|
|
6772
|
+
({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6773
|
+
contextMenu.ContextMenu.CheckboxItem,
|
|
6774
|
+
{
|
|
6775
|
+
ref,
|
|
6776
|
+
checked,
|
|
6777
|
+
className: cn(itemClass$1, "w-full", className),
|
|
6778
|
+
...props,
|
|
6779
|
+
children: [
|
|
6780
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border border-border2 flex h-4 w-4 items-center justify-center rounded-sm", children: /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {}) }) }),
|
|
6781
|
+
children
|
|
6782
|
+
]
|
|
6783
|
+
}
|
|
6784
|
+
)
|
|
6785
|
+
);
|
|
6786
|
+
ContextMenuCheckboxItem.displayName = "ContextMenuCheckboxItem";
|
|
6787
|
+
const ContextMenuRadioItem = React__namespace.forwardRef(
|
|
6788
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6789
|
+
contextMenu.ContextMenu.RadioItem,
|
|
6790
|
+
{
|
|
6791
|
+
ref,
|
|
6792
|
+
className: cn(
|
|
6793
|
+
"relative flex cursor-pointer select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-ui-smd leading-ui-sm transition-colors text-neutral4 hover:text-neutral6 focus:text-neutral6 hover:bg-surface4 focus:bg-surface4 data-[highlighted]:bg-surface4 data-[highlighted]:text-neutral6 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:hover:bg-transparent data-disabled:hover:text-neutral4 data-disabled:focus:bg-transparent data-disabled:focus:text-neutral4 data-disabled:data-[highlighted]:bg-transparent data-disabled:data-[highlighted]:text-neutral4 outline-none focus:outline-none focus-visible:outline-none focus-visible:ring-0",
|
|
6794
|
+
className
|
|
6795
|
+
),
|
|
6796
|
+
...props,
|
|
6797
|
+
children: [
|
|
6798
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.RadioItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
6799
|
+
children
|
|
6800
|
+
]
|
|
6801
|
+
}
|
|
6802
|
+
)
|
|
6803
|
+
);
|
|
6804
|
+
ContextMenuRadioItem.displayName = "ContextMenuRadioItem";
|
|
6805
|
+
const ContextMenuLabel = React__namespace.forwardRef(
|
|
6806
|
+
({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6807
|
+
"div",
|
|
6808
|
+
{
|
|
6809
|
+
ref,
|
|
6810
|
+
className: cn(
|
|
6811
|
+
"px-2 pt-1.5 pb-1 text-ui-xs font-medium uppercase tracking-wider text-neutral3",
|
|
6812
|
+
inset && "pl-8",
|
|
6813
|
+
className
|
|
6814
|
+
),
|
|
6815
|
+
...props
|
|
6816
|
+
}
|
|
6817
|
+
)
|
|
6818
|
+
);
|
|
6819
|
+
ContextMenuLabel.displayName = "ContextMenuLabel";
|
|
6820
|
+
const ContextMenuSeparator = React__namespace.forwardRef(
|
|
6821
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.Separator, { ref, className: cn("bg-border1 -mx-1 my-1 h-px", className), ...props })
|
|
6822
|
+
);
|
|
6823
|
+
ContextMenuSeparator.displayName = "ContextMenuSeparator";
|
|
6824
|
+
const ContextMenuShortcut = ({ className, ...props }) => {
|
|
6825
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
6826
|
+
};
|
|
6827
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
6828
|
+
const ContextMenuSubTrigger = React__namespace.forwardRef(
|
|
6829
|
+
({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6830
|
+
contextMenu.ContextMenu.SubmenuTrigger,
|
|
6831
|
+
{
|
|
6832
|
+
ref,
|
|
6833
|
+
className: cn(
|
|
6834
|
+
itemClass$1,
|
|
6835
|
+
"data-[popup-open]:bg-surface4 data-[popup-open]:text-neutral6",
|
|
6836
|
+
inset && "pl-8",
|
|
6837
|
+
className
|
|
6838
|
+
),
|
|
6839
|
+
...props,
|
|
6840
|
+
children: [
|
|
6841
|
+
children,
|
|
6842
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto pl-2", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "-rotate-90 opacity-50" }) })
|
|
6843
|
+
]
|
|
6844
|
+
}
|
|
6845
|
+
)
|
|
6846
|
+
);
|
|
6847
|
+
ContextMenuSubTrigger.displayName = "ContextMenuSubTrigger";
|
|
6848
|
+
const ContextMenuSubContent = React__namespace.forwardRef(
|
|
6849
|
+
({ className, align = "start", alignOffset = -4, side = "right", sideOffset = -4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6850
|
+
contextMenu.ContextMenu.Positioner,
|
|
6851
|
+
{
|
|
6852
|
+
align,
|
|
6853
|
+
alignOffset,
|
|
6854
|
+
side,
|
|
6855
|
+
sideOffset,
|
|
6856
|
+
className: "z-50 outline-none",
|
|
6857
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6858
|
+
contextMenu.ContextMenu.Popup,
|
|
6859
|
+
{
|
|
6860
|
+
ref,
|
|
6861
|
+
"data-slot": "context-menu-sub-content",
|
|
6862
|
+
className: cn(popupClass$1, className),
|
|
6863
|
+
...props
|
|
6864
|
+
}
|
|
6865
|
+
)
|
|
6866
|
+
}
|
|
6867
|
+
) })
|
|
6868
|
+
);
|
|
6869
|
+
ContextMenuSubContent.displayName = "ContextMenuSubContent";
|
|
6870
|
+
function ContextMenu({
|
|
6871
|
+
open,
|
|
6872
|
+
defaultOpen,
|
|
6873
|
+
onOpenChange,
|
|
6874
|
+
children
|
|
6875
|
+
}) {
|
|
6876
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuRoot, { open, defaultOpen, onOpenChange, children });
|
|
6877
|
+
}
|
|
6878
|
+
ContextMenu.Trigger = ContextMenuTrigger;
|
|
6879
|
+
ContextMenu.Content = ContextMenuContent;
|
|
6880
|
+
ContextMenu.Group = ContextMenuGroup;
|
|
6881
|
+
ContextMenu.Portal = ContextMenuPortal;
|
|
6882
|
+
ContextMenu.Item = ContextMenuItem;
|
|
6883
|
+
ContextMenu.CheckboxItem = ContextMenuCheckboxItem;
|
|
6884
|
+
ContextMenu.RadioItem = ContextMenuRadioItem;
|
|
6885
|
+
ContextMenu.Label = ContextMenuLabel;
|
|
6886
|
+
ContextMenu.Separator = ContextMenuSeparator;
|
|
6887
|
+
ContextMenu.Shortcut = ContextMenuShortcut;
|
|
6888
|
+
ContextMenu.Sub = ContextMenuSub;
|
|
6889
|
+
ContextMenu.SubContent = ContextMenuSubContent;
|
|
6890
|
+
ContextMenu.SubTrigger = ContextMenuSubTrigger;
|
|
6891
|
+
ContextMenu.RadioGroup = ContextMenuRadioGroup;
|
|
6892
|
+
|
|
6893
|
+
function isSelectItem(node) {
|
|
6894
|
+
return React__namespace.isValidElement(node) && node.type?.displayName === "SelectItem";
|
|
6895
|
+
}
|
|
6896
|
+
function collectItems(children, acc) {
|
|
6897
|
+
React__namespace.Children.forEach(children, (child) => {
|
|
6898
|
+
if (!React__namespace.isValidElement(child)) return;
|
|
6899
|
+
if (isSelectItem(child)) {
|
|
6900
|
+
acc.push({ value: child.props.value, label: child.props.children });
|
|
6901
|
+
return;
|
|
6902
|
+
}
|
|
6903
|
+
const nested = child.props?.children;
|
|
6904
|
+
if (nested != null) collectItems(nested, acc);
|
|
6905
|
+
});
|
|
6906
|
+
}
|
|
6907
|
+
function Select({ children, items, onValueChange, ...props }) {
|
|
6908
|
+
const derivedItems = React__namespace.useMemo(() => {
|
|
6909
|
+
if (items != null) return items;
|
|
6910
|
+
const acc = [];
|
|
6911
|
+
collectItems(children, acc);
|
|
6912
|
+
return acc.length > 0 ? acc : void 0;
|
|
6913
|
+
}, [items, children]);
|
|
6914
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6915
|
+
select.Select.Root,
|
|
6916
|
+
{
|
|
6917
|
+
items: derivedItems,
|
|
6918
|
+
onValueChange: onValueChange ? (value, eventDetails) => onValueChange(value, eventDetails) : void 0,
|
|
6919
|
+
...props,
|
|
6920
|
+
children
|
|
6921
|
+
}
|
|
6922
|
+
);
|
|
6923
|
+
}
|
|
6924
|
+
Select.displayName = "Select";
|
|
6925
|
+
const SelectGroup = select.Select.Group;
|
|
6926
|
+
const SelectValue = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(select.Select.Value, { ref, className: cn("truncate", className), ...props }));
|
|
6927
|
+
SelectValue.displayName = "SelectValue";
|
|
6701
6928
|
const SelectTrigger = React__namespace.forwardRef(
|
|
6702
|
-
({ className, children, size = "default", ...props }, ref) => {
|
|
6929
|
+
({ className, children, size = "default", variant: _variant, ...props }, ref) => {
|
|
6703
6930
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6704
|
-
|
|
6931
|
+
select.Select.Trigger,
|
|
6705
6932
|
{
|
|
6706
6933
|
ref,
|
|
6707
6934
|
className: cn(
|
|
@@ -6711,7 +6938,7 @@ const SelectTrigger = React__namespace.forwardRef(
|
|
|
6711
6938
|
"outline-none transition-colors duration-normal ease-out-custom",
|
|
6712
6939
|
"hover:bg-surface3 hover:text-neutral6 hover:border-border2 active:bg-surface4",
|
|
6713
6940
|
"focus:outline-none focus-visible:outline-none focus-visible:border-border2",
|
|
6714
|
-
"data-[
|
|
6941
|
+
"data-[popup-open]:bg-surface3 data-[popup-open]:text-neutral6 data-[popup-open]:border-border2",
|
|
6715
6942
|
"data-[placeholder]:text-neutral3",
|
|
6716
6943
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
6717
6944
|
"[&>span]:truncate",
|
|
@@ -6720,39 +6947,47 @@ const SelectTrigger = React__namespace.forwardRef(
|
|
|
6720
6947
|
...props,
|
|
6721
6948
|
children: [
|
|
6722
6949
|
children,
|
|
6723
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6950
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6951
|
+
select.Select.Icon,
|
|
6952
|
+
{
|
|
6953
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: cn("h-4 w-4 shrink-0 text-neutral3 opacity-70", transitions.colors) })
|
|
6954
|
+
}
|
|
6955
|
+
)
|
|
6724
6956
|
]
|
|
6725
6957
|
}
|
|
6726
6958
|
);
|
|
6727
6959
|
}
|
|
6728
6960
|
);
|
|
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
|
-
|
|
6961
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
6962
|
+
const SelectContent = React__namespace.forwardRef(
|
|
6963
|
+
({ 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(
|
|
6964
|
+
select.Select.Positioner,
|
|
6965
|
+
{
|
|
6966
|
+
className: "z-50 outline-none",
|
|
6967
|
+
side,
|
|
6968
|
+
align,
|
|
6969
|
+
sideOffset,
|
|
6970
|
+
alignItemWithTrigger: false,
|
|
6971
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6972
|
+
select.Select.Popup,
|
|
6973
|
+
{
|
|
6974
|
+
ref,
|
|
6975
|
+
className: cn(
|
|
6976
|
+
"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)]",
|
|
6977
|
+
"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",
|
|
6978
|
+
"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",
|
|
6979
|
+
className
|
|
6980
|
+
),
|
|
6981
|
+
...props,
|
|
6982
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.List, { children })
|
|
6983
|
+
}
|
|
6984
|
+
)
|
|
6985
|
+
}
|
|
6986
|
+
) })
|
|
6987
|
+
);
|
|
6988
|
+
SelectContent.displayName = "SelectContent";
|
|
6754
6989
|
const SelectItem = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6755
|
-
|
|
6990
|
+
select.Select.Item,
|
|
6756
6991
|
{
|
|
6757
6992
|
ref,
|
|
6758
6993
|
className: cn(
|
|
@@ -6762,18 +6997,18 @@ const SelectItem = React__namespace.forwardRef(({ className, children, ...props
|
|
|
6762
6997
|
"hover:bg-surface4 hover:text-neutral6",
|
|
6763
6998
|
"focus:bg-surface4 focus:text-neutral6",
|
|
6764
6999
|
"data-[highlighted]:bg-surface4 data-[highlighted]:text-neutral6",
|
|
6765
|
-
"data-[
|
|
7000
|
+
"data-[selected]:text-neutral6",
|
|
6766
7001
|
"data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
6767
7002
|
className
|
|
6768
7003
|
),
|
|
6769
7004
|
...props,
|
|
6770
7005
|
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(
|
|
7006
|
+
/* @__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" }) }) }),
|
|
7007
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemText, { children })
|
|
6773
7008
|
]
|
|
6774
7009
|
}
|
|
6775
7010
|
));
|
|
6776
|
-
SelectItem.displayName =
|
|
7011
|
+
SelectItem.displayName = "SelectItem";
|
|
6777
7012
|
|
|
6778
7013
|
const Tabs = ({ children, defaultTab, value, onValueChange, className }) => {
|
|
6779
7014
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6800,20 +7035,21 @@ const tabListVariants = cva("flex items-center relative text-ui-lg", {
|
|
|
6800
7035
|
variant: "line"
|
|
6801
7036
|
}
|
|
6802
7037
|
});
|
|
6803
|
-
const TabList = ({ children, className, variant, sticky }) => {
|
|
7038
|
+
const TabList = ({ children, className, variant, sticky, style }) => {
|
|
6804
7039
|
const resolvedVariant = variant ?? "line";
|
|
6805
7040
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full overflow-x-auto", sticky && "sticky top-0 z-10 bg-surface2"), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6806
7041
|
tabs.Tabs.List,
|
|
6807
7042
|
{
|
|
6808
7043
|
"data-variant": resolvedVariant,
|
|
6809
7044
|
className: cn("group/tabs-list", tabListVariants({ variant: resolvedVariant }), className),
|
|
7045
|
+
style,
|
|
6810
7046
|
children: [
|
|
6811
7047
|
children,
|
|
6812
7048
|
resolvedVariant === "line" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6813
7049
|
tabs.Tabs.Indicator,
|
|
6814
7050
|
{
|
|
6815
7051
|
className: cn(
|
|
6816
|
-
"absolute bottom-0 left-0 bg-neutral3",
|
|
7052
|
+
"absolute bottom-0 left-0 bg-[var(--tab-indicator-color,var(--neutral3))]",
|
|
6817
7053
|
"w-[var(--active-tab-width)] h-0.5",
|
|
6818
7054
|
"transition-all duration-200 ease-in-out"
|
|
6819
7055
|
),
|
|
@@ -6824,7 +7060,7 @@ const TabList = ({ children, className, variant, sticky }) => {
|
|
|
6824
7060
|
tabs.Tabs.Indicator,
|
|
6825
7061
|
{
|
|
6826
7062
|
className: cn(
|
|
6827
|
-
"absolute top-1/2 left-0 z-0 rounded-full bg-surface4",
|
|
7063
|
+
"absolute top-1/2 left-0 z-0 rounded-full bg-[var(--tab-indicator-color,var(--surface4))]",
|
|
6828
7064
|
"w-[var(--active-tab-width)] h-[calc(100%-0.5rem)]",
|
|
6829
7065
|
"transition-all duration-200 ease-in-out"
|
|
6830
7066
|
),
|
|
@@ -9233,7 +9469,14 @@ const searchbarSizeClasses = {
|
|
|
9233
9469
|
lg: formElementSizes.lg,
|
|
9234
9470
|
default: formElementSizes.default
|
|
9235
9471
|
};
|
|
9236
|
-
const Searchbar = ({
|
|
9472
|
+
const Searchbar = ({
|
|
9473
|
+
onSearch,
|
|
9474
|
+
label,
|
|
9475
|
+
placeholder,
|
|
9476
|
+
debounceMs = 300,
|
|
9477
|
+
size = "md",
|
|
9478
|
+
className
|
|
9479
|
+
}) => {
|
|
9237
9480
|
const id = React.useId();
|
|
9238
9481
|
const inputRef = React.useRef(null);
|
|
9239
9482
|
const debouncedSearch = useDebounce.useDebouncedCallback((value) => {
|
|
@@ -9270,7 +9513,8 @@ const Searchbar = ({ onSearch, label, placeholder, debounceMs = 300, size = "md"
|
|
|
9270
9513
|
formElementFocusWithin,
|
|
9271
9514
|
transitions.all,
|
|
9272
9515
|
"hover:border-neutral2",
|
|
9273
|
-
searchbarSizeClasses[size]
|
|
9516
|
+
searchbarSizeClasses[size],
|
|
9517
|
+
className
|
|
9274
9518
|
),
|
|
9275
9519
|
children: [
|
|
9276
9520
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: cn("text-neutral3 h-4 w-4", transitions.colors) }),
|
|
@@ -13334,6 +13578,31 @@ function DataListRowLink({
|
|
|
13334
13578
|
);
|
|
13335
13579
|
}
|
|
13336
13580
|
|
|
13581
|
+
const DataListRowStatic = React.forwardRef(
|
|
13582
|
+
({ children, className, flushLeft, flushRight, colStart, colEnd, featured, style, ...rest }, ref) => {
|
|
13583
|
+
const hasColumnOverride = colStart !== void 0 || colEnd !== void 0;
|
|
13584
|
+
const resolvedStyle = hasColumnOverride ? { ...style, gridColumn: `${colStart ?? 1} / ${colEnd ?? -1}` } : style;
|
|
13585
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13586
|
+
"div",
|
|
13587
|
+
{
|
|
13588
|
+
ref,
|
|
13589
|
+
className: cn(
|
|
13590
|
+
"mx-1 grid grid-cols-subgrid gap-8 px-5",
|
|
13591
|
+
...dataListRowOuterStyles,
|
|
13592
|
+
flushLeft && "ml-0!",
|
|
13593
|
+
flushRight && "mr-0!",
|
|
13594
|
+
featured && "bg-surface4",
|
|
13595
|
+
className
|
|
13596
|
+
),
|
|
13597
|
+
style: resolvedStyle,
|
|
13598
|
+
...rest,
|
|
13599
|
+
children
|
|
13600
|
+
}
|
|
13601
|
+
);
|
|
13602
|
+
}
|
|
13603
|
+
);
|
|
13604
|
+
DataListRowStatic.displayName = "DataListRowStatic";
|
|
13605
|
+
|
|
13337
13606
|
function DataListSpacer({ height }) {
|
|
13338
13607
|
if (height <= 0) return null;
|
|
13339
13608
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-full", style: { height } });
|
|
@@ -13468,6 +13737,7 @@ const DataList = Object.assign(DataListRoot, {
|
|
|
13468
13737
|
Row: DataListRow,
|
|
13469
13738
|
RowButton: DataListRowButton,
|
|
13470
13739
|
RowLink: DataListRowLink,
|
|
13740
|
+
RowStatic: DataListRowStatic,
|
|
13471
13741
|
Cell: DataListCell,
|
|
13472
13742
|
TextCell: DataListTextCell,
|
|
13473
13743
|
NameCell: DataListNameCell,
|
|
@@ -13958,10 +14228,10 @@ function PageLayoutRoot({
|
|
|
13958
14228
|
"main",
|
|
13959
14229
|
{
|
|
13960
14230
|
className: cn(
|
|
13961
|
-
"w-full
|
|
14231
|
+
"w-full grid grid-rows-[auto_auto] p-6 content-start",
|
|
13962
14232
|
{
|
|
13963
14233
|
"max-w-screen-lg mx-auto pt-8": width === "narrow",
|
|
13964
|
-
"grid-rows-[auto_1fr]": height === "full"
|
|
14234
|
+
"h-full grid-rows-[auto_1fr] overflow-y-auto": height === "full"
|
|
13965
14235
|
},
|
|
13966
14236
|
className
|
|
13967
14237
|
// 'LAYOUT_ROOT border border-dashed border-orange-400',
|
|
@@ -15686,7 +15956,7 @@ const isValidJson = (str) => {
|
|
|
15686
15956
|
}
|
|
15687
15957
|
};
|
|
15688
15958
|
|
|
15689
|
-
const stringToColor = (str, lightness =
|
|
15959
|
+
const stringToColor = (str, lightness = 90, saturation = 100) => {
|
|
15690
15960
|
let hash = 0;
|
|
15691
15961
|
for (let i = 0; i < str.length; i++) {
|
|
15692
15962
|
hash = str.charCodeAt(i) + ((hash << 5) - hash);
|
|
@@ -22139,6 +22409,7 @@ exports.CommandShortcut = CommandShortcut;
|
|
|
22139
22409
|
exports.CommitIcon = CommitIcon;
|
|
22140
22410
|
exports.ContentBlock = ContentBlock;
|
|
22141
22411
|
exports.ContentBlocks = ContentBlocks;
|
|
22412
|
+
exports.ContextMenu = ContextMenu;
|
|
22142
22413
|
exports.CopyButton = CopyButton;
|
|
22143
22414
|
exports.CrossIcon = CrossIcon;
|
|
22144
22415
|
exports.Crumb = Crumb;
|