@mastra/playground-ui 29.0.0-alpha.6 → 29.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 +63 -0
- package/dist/index.cjs.js +279 -142
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +206 -25
- package/dist/index.es.js +278 -139
- package/dist/index.es.js.map +1 -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/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,68 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 29.0.0-alpha.8
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 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))
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { ContextMenu } from '@mastra/playground-ui';
|
|
11
|
+
|
|
12
|
+
<ContextMenu>
|
|
13
|
+
<ContextMenu.Trigger className="…">Right click here</ContextMenu.Trigger>
|
|
14
|
+
<ContextMenu.Content>
|
|
15
|
+
<ContextMenu.Item>Rename</ContextMenu.Item>
|
|
16
|
+
<ContextMenu.Item variant="destructive">Delete</ContextMenu.Item>
|
|
17
|
+
</ContextMenu.Content>
|
|
18
|
+
</ContextMenu>;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Added a `destructive` variant on `DropdownMenu.Item` to highlight dangerous actions like delete. ([#16791](https://github.com/mastra-ai/mastra/pull/16791))
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
<DropdownMenu.Item variant="destructive">Delete project</DropdownMenu.Item>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- `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))
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
// Before
|
|
33
|
+
<PopoverContent onOpenAutoFocus={(e) => e.preventDefault()} />
|
|
34
|
+
|
|
35
|
+
// After
|
|
36
|
+
<PopoverContent initialFocus={false} />
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- Migrated the Slider component to base-ui with a refined neutral visual design. ([#16788](https://github.com/mastra-ai/mastra/pull/16788))
|
|
40
|
+
|
|
41
|
+
**What changed**
|
|
42
|
+
- Replaced `@radix-ui/react-slider` with `@base-ui/react/slider` as the underlying primitive
|
|
43
|
+
- 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)
|
|
44
|
+
- Larger click target via padded `Slider.Control` and an invisible hit area on the thumb so it is easier to grab
|
|
45
|
+
- Added `cursor-pointer` on the control and `cursor-not-allowed` when disabled
|
|
46
|
+
- Removed the now unused `@radix-ui/react-slider` and `@radix-ui/react-tabs` dependencies
|
|
47
|
+
|
|
48
|
+
**API compatibility**
|
|
49
|
+
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [[`9aee493`](https://github.com/mastra-ai/mastra/commit/9aee493ed6089b5133472623dcce49934bf2d509)]:
|
|
53
|
+
- @mastra/core@1.36.0-alpha.8
|
|
54
|
+
- @mastra/client-js@1.20.0-alpha.8
|
|
55
|
+
- @mastra/react@0.4.0-alpha.8
|
|
56
|
+
|
|
57
|
+
## 29.0.0-alpha.7
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies [[`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0), [`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0)]:
|
|
62
|
+
- @mastra/core@1.36.0-alpha.7
|
|
63
|
+
- @mastra/react@0.4.0-alpha.7
|
|
64
|
+
- @mastra/client-js@1.20.0-alpha.7
|
|
65
|
+
|
|
3
66
|
## 29.0.0-alpha.6
|
|
4
67
|
|
|
5
68
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -27,16 +27,16 @@ const cmdk = require('cmdk');
|
|
|
27
27
|
const DialogPrimitive = require('@radix-ui/react-dialog');
|
|
28
28
|
const SelectPrimitive = require('@radix-ui/react-select');
|
|
29
29
|
const tabs = require('@base-ui/react/tabs');
|
|
30
|
-
const
|
|
30
|
+
const menu = require('@base-ui/react/menu');
|
|
31
31
|
const VisuallyHidden = require('@radix-ui/react-visually-hidden');
|
|
32
32
|
const LabelPrimitive = require('@radix-ui/react-label');
|
|
33
33
|
const Markdown = require('react-markdown');
|
|
34
34
|
const remarkGfm = require('remark-gfm');
|
|
35
|
-
const
|
|
35
|
+
const popover = require('@base-ui/react/popover');
|
|
36
36
|
const RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
37
37
|
const scrollArea = require('@base-ui/react/scroll-area');
|
|
38
38
|
const useDebounce = require('use-debounce');
|
|
39
|
-
const
|
|
39
|
+
const slider = require('@base-ui/react/slider');
|
|
40
40
|
const SwitchPrimitives = require('@radix-ui/react-switch');
|
|
41
41
|
const dateFns = require('date-fns');
|
|
42
42
|
const reactDayPicker = require('react-day-picker');
|
|
@@ -46,6 +46,7 @@ const dnd = require('@hello-pangea/dnd');
|
|
|
46
46
|
const merge = require('@codemirror/merge');
|
|
47
47
|
const format = require('date-fns/format');
|
|
48
48
|
const isToday = require('date-fns/isToday');
|
|
49
|
+
const reactDropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
49
50
|
const search = require('@codemirror/search');
|
|
50
51
|
const recharts = require('recharts');
|
|
51
52
|
const reactResizablePanels = require('react-resizable-panels');
|
|
@@ -78,12 +79,9 @@ const CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(Check
|
|
|
78
79
|
const CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(CollapsiblePrimitive);
|
|
79
80
|
const DialogPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(DialogPrimitive);
|
|
80
81
|
const SelectPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SelectPrimitive);
|
|
81
|
-
const DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(DropdownMenuPrimitive);
|
|
82
82
|
const VisuallyHidden__namespace = /*#__PURE__*/_interopNamespaceDefault(VisuallyHidden);
|
|
83
83
|
const LabelPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(LabelPrimitive);
|
|
84
|
-
const PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(PopoverPrimitive);
|
|
85
84
|
const RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(RadioGroupPrimitive);
|
|
86
|
-
const SliderPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SliderPrimitive);
|
|
87
85
|
const SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespaceDefault(SwitchPrimitives);
|
|
88
86
|
const HoverCard__namespace = /*#__PURE__*/_interopNamespaceDefault(HoverCard);
|
|
89
87
|
|
|
@@ -6929,115 +6927,178 @@ function DashboardCard({ children, className }) {
|
|
|
6929
6927
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("border border-border1 rounded-xl px-4 py-3 bg-surface-overlay-soft", className), children });
|
|
6930
6928
|
}
|
|
6931
6929
|
|
|
6932
|
-
const DropdownMenuRoot =
|
|
6933
|
-
const DropdownMenuGroup =
|
|
6934
|
-
const DropdownMenuPortal =
|
|
6935
|
-
const DropdownMenuSub =
|
|
6936
|
-
const DropdownMenuRadioGroup =
|
|
6930
|
+
const DropdownMenuRoot = menu.Menu.Root;
|
|
6931
|
+
const DropdownMenuGroup = menu.Menu.Group;
|
|
6932
|
+
const DropdownMenuPortal = menu.Menu.Portal;
|
|
6933
|
+
const DropdownMenuSub = menu.Menu.SubmenuRoot;
|
|
6934
|
+
const DropdownMenuRadioGroup = menu.Menu.RadioGroup;
|
|
6937
6935
|
const itemClass = cn(
|
|
6938
|
-
"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:
|
|
6936
|
+
"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",
|
|
6939
6937
|
"[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:opacity-60 [&:hover>svg]:opacity-100"
|
|
6940
6938
|
);
|
|
6941
|
-
const
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
ref,
|
|
6960
|
-
className: cn(
|
|
6961
|
-
"bg-surface3 text-neutral4 data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 min-w-44 max-h-[min(20rem,var(--radix-dropdown-menu-content-available-height))] overflow-x-hidden overflow-y-auto rounded-xl border border-border1 p-1 shadow-dialog",
|
|
6962
|
-
className
|
|
6963
|
-
),
|
|
6964
|
-
...props
|
|
6939
|
+
const popupClass = cn(
|
|
6940
|
+
"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",
|
|
6941
|
+
"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",
|
|
6942
|
+
"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"
|
|
6943
|
+
);
|
|
6944
|
+
const DropdownMenuTrigger = React__namespace.forwardRef(
|
|
6945
|
+
({ className, asChild, children, ...props }, ref) => {
|
|
6946
|
+
const renderProps = asChild && React__namespace.isValidElement(children) ? { render: children } : {};
|
|
6947
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6948
|
+
menu.Menu.Trigger,
|
|
6949
|
+
{
|
|
6950
|
+
ref,
|
|
6951
|
+
className: cn("cursor-pointer outline-none", className),
|
|
6952
|
+
...renderProps,
|
|
6953
|
+
...props,
|
|
6954
|
+
children: asChild ? void 0 : children
|
|
6955
|
+
}
|
|
6956
|
+
);
|
|
6965
6957
|
}
|
|
6966
|
-
)
|
|
6967
|
-
|
|
6968
|
-
const
|
|
6969
|
-
|
|
6970
|
-
|
|
6958
|
+
);
|
|
6959
|
+
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
6960
|
+
const DropdownMenuSubTrigger = React__namespace.forwardRef(
|
|
6961
|
+
({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6962
|
+
menu.Menu.SubmenuTrigger,
|
|
6971
6963
|
{
|
|
6972
6964
|
ref,
|
|
6965
|
+
className: cn(
|
|
6966
|
+
itemClass,
|
|
6967
|
+
"data-[popup-open]:bg-surface4 data-[popup-open]:text-neutral6",
|
|
6968
|
+
inset && "pl-8",
|
|
6969
|
+
className
|
|
6970
|
+
),
|
|
6971
|
+
...props,
|
|
6972
|
+
children: [
|
|
6973
|
+
children,
|
|
6974
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto pl-2", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "-rotate-90 opacity-50" }) })
|
|
6975
|
+
]
|
|
6976
|
+
}
|
|
6977
|
+
)
|
|
6978
|
+
);
|
|
6979
|
+
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
6980
|
+
const DropdownMenuSubContent = React__namespace.forwardRef(
|
|
6981
|
+
({ className, align = "start", alignOffset = -4, side = "right", sideOffset = 0, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6982
|
+
menu.Menu.Positioner,
|
|
6983
|
+
{
|
|
6984
|
+
align,
|
|
6985
|
+
alignOffset,
|
|
6986
|
+
side,
|
|
6973
6987
|
sideOffset,
|
|
6988
|
+
className: "z-50 outline-none",
|
|
6989
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6990
|
+
menu.Menu.Popup,
|
|
6991
|
+
{
|
|
6992
|
+
ref,
|
|
6993
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
6994
|
+
className: cn(popupClass, className),
|
|
6995
|
+
...props
|
|
6996
|
+
}
|
|
6997
|
+
)
|
|
6998
|
+
}
|
|
6999
|
+
) })
|
|
7000
|
+
);
|
|
7001
|
+
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
7002
|
+
const DropdownMenuContent = React__namespace.forwardRef(
|
|
7003
|
+
({ className, container, align = "start", alignOffset = 0, side = "bottom", sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7004
|
+
menu.Menu.Positioner,
|
|
7005
|
+
{
|
|
7006
|
+
align,
|
|
7007
|
+
alignOffset,
|
|
7008
|
+
side,
|
|
7009
|
+
sideOffset,
|
|
7010
|
+
className: "z-50 outline-none",
|
|
7011
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7012
|
+
menu.Menu.Popup,
|
|
7013
|
+
{
|
|
7014
|
+
ref,
|
|
7015
|
+
"data-slot": "dropdown-menu-content",
|
|
7016
|
+
className: cn(popupClass, className),
|
|
7017
|
+
...props
|
|
7018
|
+
}
|
|
7019
|
+
)
|
|
7020
|
+
}
|
|
7021
|
+
) })
|
|
7022
|
+
);
|
|
7023
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
7024
|
+
const DropdownMenuItem = React__namespace.forwardRef(
|
|
7025
|
+
({ className, inset, variant = "default", onSelect, onClick, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7026
|
+
menu.Menu.Item,
|
|
7027
|
+
{
|
|
7028
|
+
ref,
|
|
7029
|
+
"data-inset": inset ? "" : void 0,
|
|
7030
|
+
"data-variant": variant,
|
|
7031
|
+
onClick: (event) => {
|
|
7032
|
+
onClick?.(event);
|
|
7033
|
+
onSelect?.(event);
|
|
7034
|
+
},
|
|
6974
7035
|
className: cn(
|
|
6975
|
-
|
|
7036
|
+
itemClass,
|
|
7037
|
+
inset && "pl-8",
|
|
7038
|
+
"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",
|
|
6976
7039
|
className
|
|
6977
7040
|
),
|
|
6978
7041
|
...props
|
|
6979
7042
|
}
|
|
6980
|
-
)
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
const
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
7028
|
-
const DropdownMenuSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Separator, { ref, className: cn("bg-border1 -mx-1 my-1 h-px", className), ...props }));
|
|
7029
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
|
|
7043
|
+
)
|
|
7044
|
+
);
|
|
7045
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
7046
|
+
const DropdownMenuCheckboxItem = React__namespace.forwardRef(
|
|
7047
|
+
({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(menu.Menu.CheckboxItem, { ref, className: cn(itemClass, "w-full", className), checked, ...props, children: [
|
|
7048
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border border-border2 flex h-4 w-4 items-center justify-center rounded-sm", children: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {}) }) }),
|
|
7049
|
+
children
|
|
7050
|
+
] })
|
|
7051
|
+
);
|
|
7052
|
+
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
7053
|
+
const DropdownMenuRadioItem = React__namespace.forwardRef(
|
|
7054
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7055
|
+
menu.Menu.RadioItem,
|
|
7056
|
+
{
|
|
7057
|
+
ref,
|
|
7058
|
+
className: cn(
|
|
7059
|
+
"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",
|
|
7060
|
+
className
|
|
7061
|
+
),
|
|
7062
|
+
...props,
|
|
7063
|
+
children: [
|
|
7064
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
7065
|
+
children
|
|
7066
|
+
]
|
|
7067
|
+
}
|
|
7068
|
+
)
|
|
7069
|
+
);
|
|
7070
|
+
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
7071
|
+
const DropdownMenuLabel = React__namespace.forwardRef(
|
|
7072
|
+
({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7073
|
+
"div",
|
|
7074
|
+
{
|
|
7075
|
+
ref,
|
|
7076
|
+
className: cn(
|
|
7077
|
+
"px-2 pt-1.5 pb-1 text-ui-xs font-medium uppercase tracking-wider text-neutral3",
|
|
7078
|
+
inset && "pl-8",
|
|
7079
|
+
className
|
|
7080
|
+
),
|
|
7081
|
+
...props
|
|
7082
|
+
}
|
|
7083
|
+
)
|
|
7084
|
+
);
|
|
7085
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
7086
|
+
const DropdownMenuSeparator = React__namespace.forwardRef(
|
|
7087
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Separator, { ref, className: cn("bg-border1 -mx-1 my-1 h-px", className), ...props })
|
|
7088
|
+
);
|
|
7089
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
7030
7090
|
const DropdownMenuShortcut = ({ className, ...props }) => {
|
|
7031
7091
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
7032
7092
|
};
|
|
7033
7093
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
7034
7094
|
function DropdownMenu({
|
|
7035
7095
|
open,
|
|
7096
|
+
defaultOpen,
|
|
7036
7097
|
onOpenChange,
|
|
7037
7098
|
children,
|
|
7038
7099
|
modal
|
|
7039
7100
|
}) {
|
|
7040
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuRoot, { modal, open, onOpenChange, children });
|
|
7101
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuRoot, { modal, open, defaultOpen, onOpenChange, children });
|
|
7041
7102
|
}
|
|
7042
7103
|
DropdownMenu.Trigger = DropdownMenuTrigger;
|
|
7043
7104
|
DropdownMenu.Content = DropdownMenuContent;
|
|
@@ -7885,24 +7946,49 @@ function MetricsFlexGrid({ children, className }) {
|
|
|
7885
7946
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-wrap gap-8", className), children });
|
|
7886
7947
|
}
|
|
7887
7948
|
|
|
7888
|
-
const Popover =
|
|
7889
|
-
const PopoverTrigger =
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
ref,
|
|
7894
|
-
align,
|
|
7895
|
-
sideOffset,
|
|
7896
|
-
className: cn(
|
|
7897
|
-
"z-50 w-72 rounded-xl border border-border1 bg-surface3 text-neutral5 shadow-dialog focus-visible:outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
|
|
7898
|
-
className && /\bp[trblxy]?-\S+/.test(className) ? false : `py-3.5 px-3`,
|
|
7899
|
-
className
|
|
7900
|
-
),
|
|
7901
|
-
...props
|
|
7949
|
+
const Popover = popover.Popover.Root;
|
|
7950
|
+
const PopoverTrigger = React__namespace.forwardRef(
|
|
7951
|
+
({ asChild, children, ...props }, ref) => {
|
|
7952
|
+
const renderProps = asChild && React__namespace.isValidElement(children) ? { render: children } : {};
|
|
7953
|
+
return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Trigger, { ref, ...renderProps, ...props, children: asChild ? void 0 : children });
|
|
7902
7954
|
}
|
|
7903
|
-
)
|
|
7904
|
-
|
|
7905
|
-
|
|
7955
|
+
);
|
|
7956
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
7957
|
+
const PopoverContent = React__namespace.forwardRef(
|
|
7958
|
+
({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }, ref) => {
|
|
7959
|
+
const classNameString = typeof className === "string" ? className : void 0;
|
|
7960
|
+
return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7961
|
+
popover.Popover.Positioner,
|
|
7962
|
+
{
|
|
7963
|
+
align,
|
|
7964
|
+
alignOffset,
|
|
7965
|
+
side,
|
|
7966
|
+
sideOffset,
|
|
7967
|
+
className: "z-50 outline-none",
|
|
7968
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7969
|
+
popover.Popover.Popup,
|
|
7970
|
+
{
|
|
7971
|
+
ref,
|
|
7972
|
+
"data-slot": "popover-content",
|
|
7973
|
+
className: cn(
|
|
7974
|
+
"z-50 w-72 rounded-xl border border-border1 bg-surface3 text-neutral5 shadow-dialog focus-visible:outline-hidden origin-[var(--transform-origin)]",
|
|
7975
|
+
"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",
|
|
7976
|
+
"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",
|
|
7977
|
+
classNameString && /\bp[trblxy]?-\S+/.test(classNameString) ? false : `py-3.5 px-3`,
|
|
7978
|
+
className
|
|
7979
|
+
),
|
|
7980
|
+
...props
|
|
7981
|
+
}
|
|
7982
|
+
)
|
|
7983
|
+
}
|
|
7984
|
+
) });
|
|
7985
|
+
}
|
|
7986
|
+
);
|
|
7987
|
+
PopoverContent.displayName = "PopoverContent";
|
|
7988
|
+
function HoverPopover({
|
|
7989
|
+
children,
|
|
7990
|
+
...props
|
|
7991
|
+
}) {
|
|
7906
7992
|
const [open, setOpen] = React__namespace.useState(false);
|
|
7907
7993
|
const timeoutRef = React__namespace.useRef(void 0);
|
|
7908
7994
|
const handleOpen = React__namespace.useCallback(() => {
|
|
@@ -8512,12 +8598,13 @@ function PropertyFilterCreator({
|
|
|
8512
8598
|
{
|
|
8513
8599
|
align: "end",
|
|
8514
8600
|
className: "p-3 w-64",
|
|
8515
|
-
|
|
8516
|
-
|
|
8601
|
+
initialFocus: false,
|
|
8602
|
+
finalFocus: () => {
|
|
8517
8603
|
if (skipCloseFocusRef.current) {
|
|
8518
8604
|
skipCloseFocusRef.current = false;
|
|
8519
|
-
|
|
8605
|
+
return false;
|
|
8520
8606
|
}
|
|
8607
|
+
return true;
|
|
8521
8608
|
},
|
|
8522
8609
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-3", children: [
|
|
8523
8610
|
selectedField && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -8700,7 +8787,7 @@ function PickMultiMenuItem({ field, tokens, onChange, open, onToggle, onClose })
|
|
|
8700
8787
|
align: "start",
|
|
8701
8788
|
sideOffset: 8,
|
|
8702
8789
|
className: "w-64 p-2",
|
|
8703
|
-
|
|
8790
|
+
initialFocus: false,
|
|
8704
8791
|
onKeyDown: (e) => {
|
|
8705
8792
|
if (e.key !== "ArrowDown" && e.key !== "ArrowUp" && e.key !== "Home" && e.key !== "End") return;
|
|
8706
8793
|
const items = Array.from(
|
|
@@ -8991,37 +9078,87 @@ const SearchbarWrapper = ({ children }) => {
|
|
|
8991
9078
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2.5 border-b border-border1", children });
|
|
8992
9079
|
};
|
|
8993
9080
|
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9081
|
+
function toArray(value) {
|
|
9082
|
+
if (typeof value === "number") {
|
|
9083
|
+
return [value];
|
|
9084
|
+
}
|
|
9085
|
+
return [...value];
|
|
9086
|
+
}
|
|
9087
|
+
const Slider = ({
|
|
9088
|
+
className,
|
|
9089
|
+
defaultValue,
|
|
9090
|
+
value,
|
|
9091
|
+
min = 0,
|
|
9092
|
+
max = 100,
|
|
9093
|
+
onValueChange,
|
|
9094
|
+
onValueCommitted,
|
|
9095
|
+
...props
|
|
9096
|
+
}) => {
|
|
9097
|
+
const values = Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min];
|
|
9098
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9099
|
+
slider.Slider.Root,
|
|
9100
|
+
{
|
|
9101
|
+
className: cn("w-full", className),
|
|
9102
|
+
defaultValue,
|
|
9103
|
+
value,
|
|
9104
|
+
min,
|
|
9105
|
+
max,
|
|
9106
|
+
thumbAlignment: "edge",
|
|
9107
|
+
onValueChange: onValueChange ? (next, details) => onValueChange(toArray(next), details) : void 0,
|
|
9108
|
+
onValueCommitted: onValueCommitted ? (next, details) => onValueCommitted(toArray(next), details) : void 0,
|
|
9109
|
+
...props,
|
|
9110
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9111
|
+
slider.Slider.Control,
|
|
9010
9112
|
{
|
|
9011
9113
|
className: cn(
|
|
9012
|
-
"
|
|
9013
|
-
"
|
|
9014
|
-
|
|
9015
|
-
"
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9114
|
+
"relative flex w-full touch-none items-center select-none group cursor-pointer",
|
|
9115
|
+
"data-[orientation=horizontal]:py-3",
|
|
9116
|
+
"data-[orientation=vertical]:px-3 data-[orientation=vertical]:h-full data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
9117
|
+
"data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed"
|
|
9118
|
+
),
|
|
9119
|
+
children: [
|
|
9120
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9121
|
+
slider.Slider.Track,
|
|
9122
|
+
{
|
|
9123
|
+
className: cn(
|
|
9124
|
+
"relative grow overflow-hidden rounded-full bg-neutral6/20 select-none",
|
|
9125
|
+
"data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full",
|
|
9126
|
+
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
9127
|
+
),
|
|
9128
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9129
|
+
slider.Slider.Indicator,
|
|
9130
|
+
{
|
|
9131
|
+
className: cn(
|
|
9132
|
+
"bg-neutral6 select-none",
|
|
9133
|
+
"data-[orientation=horizontal]:h-full",
|
|
9134
|
+
"data-[orientation=vertical]:w-full"
|
|
9135
|
+
)
|
|
9136
|
+
}
|
|
9137
|
+
)
|
|
9138
|
+
}
|
|
9139
|
+
),
|
|
9140
|
+
values.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9141
|
+
slider.Slider.Thumb,
|
|
9142
|
+
{
|
|
9143
|
+
index,
|
|
9144
|
+
className: cn(
|
|
9145
|
+
"relative block w-2.5 h-5 shrink-0 rounded-full bg-neutral2 border-2 border-neutral6 outline-hidden select-none",
|
|
9146
|
+
'after:absolute after:-inset-2 after:content-[""]',
|
|
9147
|
+
"transition-shadow duration-normal",
|
|
9148
|
+
"hover:ring-2 hover:ring-neutral6/30",
|
|
9149
|
+
"has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-neutral6/60",
|
|
9150
|
+
"data-[orientation=vertical]:w-5 data-[orientation=vertical]:h-2.5",
|
|
9151
|
+
"data-[disabled]:pointer-events-none"
|
|
9152
|
+
)
|
|
9153
|
+
},
|
|
9154
|
+
index
|
|
9155
|
+
))
|
|
9156
|
+
]
|
|
9019
9157
|
}
|
|
9020
9158
|
)
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
Slider.displayName = SliderPrimitive__namespace.Root.displayName;
|
|
9159
|
+
}
|
|
9160
|
+
);
|
|
9161
|
+
};
|
|
9025
9162
|
|
|
9026
9163
|
const sizeClasses$1 = {
|
|
9027
9164
|
sm: "w-6",
|
|
@@ -12794,7 +12931,7 @@ const subContentClass = cn(
|
|
|
12794
12931
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
|
|
12795
12932
|
);
|
|
12796
12933
|
function PortalSubContent({ className, children, ...props }) {
|
|
12797
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12934
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactDropdownMenu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(reactDropdownMenu.SubContent, { className: cn(subContentClass, className), ...props, children }) });
|
|
12798
12935
|
}
|
|
12799
12936
|
function SubMenuSearch({
|
|
12800
12937
|
value,
|