@mastra/playground-ui 29.0.0-alpha.8 → 29.0.0
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 +230 -0
- package/dist/index.cjs.js +200 -114
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +30 -24
- package/dist/index.es.js +199 -111
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/components/AlertDialog/alert-dialog.d.ts +27 -9
- package/dist/src/ds/components/Collapsible/collapsible.d.ts +11 -4
- package/dist/src/ds/components/Command/command.d.ts +2 -1
- package/dist/src/ds/components/Dialog/dialog.d.ts +27 -9
- package/dist/src/ds/components/Table/Table.d.ts +12 -11
- package/dist/src/ds/components/Txt/Txt.d.ts +4 -3
- package/dist/src/ds/icons/Icon.d.ts +4 -3
- package/package.json +8 -8
package/dist/index.cjs.js
CHANGED
|
@@ -19,12 +19,12 @@ const autocomplete = require('@codemirror/autocomplete');
|
|
|
19
19
|
const lucideReact = require('lucide-react');
|
|
20
20
|
const sonner = require('sonner');
|
|
21
21
|
const react = require('@mastra/react');
|
|
22
|
-
const
|
|
22
|
+
const alertDialog = require('@base-ui/react/alert-dialog');
|
|
23
23
|
const CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
24
|
-
const
|
|
24
|
+
const collapsible = require('@base-ui/react/collapsible');
|
|
25
25
|
const combobox = require('@base-ui/react/combobox');
|
|
26
26
|
const cmdk = require('cmdk');
|
|
27
|
-
const
|
|
27
|
+
const dialog = require('@base-ui/react/dialog');
|
|
28
28
|
const SelectPrimitive = require('@radix-ui/react-select');
|
|
29
29
|
const tabs = require('@base-ui/react/tabs');
|
|
30
30
|
const menu = require('@base-ui/react/menu');
|
|
@@ -42,11 +42,11 @@ const dateFns = require('date-fns');
|
|
|
42
42
|
const reactDayPicker = require('react-day-picker');
|
|
43
43
|
const HoverCard = require('@radix-ui/react-hover-card');
|
|
44
44
|
const reactSlot = require('@radix-ui/react-slot');
|
|
45
|
+
const Dialog$1 = require('@radix-ui/react-dialog');
|
|
45
46
|
const dnd = require('@hello-pangea/dnd');
|
|
46
47
|
const merge = require('@codemirror/merge');
|
|
47
48
|
const format = require('date-fns/format');
|
|
48
49
|
const isToday = require('date-fns/isToday');
|
|
49
|
-
const reactDropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
50
50
|
const search = require('@codemirror/search');
|
|
51
51
|
const recharts = require('recharts');
|
|
52
52
|
const reactResizablePanels = require('react-resizable-panels');
|
|
@@ -74,16 +74,14 @@ function _interopNamespaceDefault(e) {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
77
|
-
const AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(AlertDialogPrimitive);
|
|
78
77
|
const CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(CheckboxPrimitive);
|
|
79
|
-
const CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(CollapsiblePrimitive);
|
|
80
|
-
const DialogPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(DialogPrimitive);
|
|
81
78
|
const SelectPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SelectPrimitive);
|
|
82
79
|
const VisuallyHidden__namespace = /*#__PURE__*/_interopNamespaceDefault(VisuallyHidden);
|
|
83
80
|
const LabelPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(LabelPrimitive);
|
|
84
81
|
const RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(RadioGroupPrimitive);
|
|
85
82
|
const SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespaceDefault(SwitchPrimitives);
|
|
86
83
|
const HoverCard__namespace = /*#__PURE__*/_interopNamespaceDefault(HoverCard);
|
|
84
|
+
const Dialog__namespace = /*#__PURE__*/_interopNamespaceDefault(Dialog$1);
|
|
87
85
|
|
|
88
86
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
89
87
|
|
|
@@ -6064,9 +6062,7 @@ const Textarea = React__namespace.forwardRef(
|
|
|
6064
6062
|
);
|
|
6065
6063
|
Textarea.displayName = "Textarea";
|
|
6066
6064
|
|
|
6067
|
-
const AlertDialogRoot =
|
|
6068
|
-
const AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
|
|
6069
|
-
const AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
|
|
6065
|
+
const AlertDialogRoot = alertDialog.AlertDialog.Root;
|
|
6070
6066
|
function AlertDialog({
|
|
6071
6067
|
open,
|
|
6072
6068
|
onOpenChange,
|
|
@@ -6074,21 +6070,30 @@ function AlertDialog({
|
|
|
6074
6070
|
}) {
|
|
6075
6071
|
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialogRoot, { open, onOpenChange, children });
|
|
6076
6072
|
}
|
|
6073
|
+
const AlertDialogTrigger = React__namespace.forwardRef(
|
|
6074
|
+
({ asChild, children, ...props }, ref) => {
|
|
6075
|
+
const renderProps = asChild && React__namespace.isValidElement(children) ? { render: children } : {};
|
|
6076
|
+
return /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Trigger, { ref, ...renderProps, ...props, children: asChild ? void 0 : children });
|
|
6077
|
+
}
|
|
6078
|
+
);
|
|
6079
|
+
AlertDialogTrigger.displayName = "AlertDialogTrigger";
|
|
6080
|
+
const AlertDialogPortal = alertDialog.AlertDialog.Portal;
|
|
6077
6081
|
const AlertDialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6078
|
-
|
|
6082
|
+
alertDialog.AlertDialog.Backdrop,
|
|
6079
6083
|
{
|
|
6080
6084
|
ref,
|
|
6081
6085
|
className: cn("dialog-overlay-anim fixed inset-0 z-50 bg-overlay backdrop-blur-xs", className),
|
|
6082
6086
|
...props
|
|
6083
6087
|
}
|
|
6084
6088
|
));
|
|
6085
|
-
AlertDialogOverlay.displayName =
|
|
6089
|
+
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
6086
6090
|
const AlertDialogContent = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
|
|
6087
6091
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
6088
6092
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6089
|
-
|
|
6093
|
+
alertDialog.AlertDialog.Popup,
|
|
6090
6094
|
{
|
|
6091
6095
|
ref,
|
|
6096
|
+
"data-slot": "alert-dialog-content",
|
|
6092
6097
|
className: cn(
|
|
6093
6098
|
"dialog-content-anim",
|
|
6094
6099
|
"fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%]",
|
|
@@ -6100,35 +6105,41 @@ const AlertDialogContent = React__namespace.forwardRef(({ className, ...props },
|
|
|
6100
6105
|
}
|
|
6101
6106
|
)
|
|
6102
6107
|
] }));
|
|
6103
|
-
AlertDialogContent.displayName =
|
|
6108
|
+
AlertDialogContent.displayName = "AlertDialogContent";
|
|
6104
6109
|
const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-0.5 px-4 py-3 text-left", className), ...props });
|
|
6105
6110
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
6106
6111
|
const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse gap-1.5 px-4 py-2.5 sm:flex-row sm:justify-end", className), ...props });
|
|
6107
6112
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
6108
6113
|
const AlertDialogBody = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("overflow-y-auto px-4 py-3.5 max-h-[50vh]", className), ...props });
|
|
6109
6114
|
AlertDialogBody.displayName = "AlertDialogBody";
|
|
6110
|
-
const AlertDialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6111
|
-
AlertDialogTitle.displayName =
|
|
6112
|
-
const AlertDialogDescription = React__namespace.forwardRef(
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
))
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6115
|
+
const AlertDialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Title, { ref, className: cn("text-ui-md font-medium", className), ...props }));
|
|
6116
|
+
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
6117
|
+
const AlertDialogDescription = React__namespace.forwardRef(
|
|
6118
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(alertDialog.AlertDialog.Description, { ref, className: cn("text-ui-sm text-neutral3", className), ...props })
|
|
6119
|
+
);
|
|
6120
|
+
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
6121
|
+
const AlertDialogAction = React__namespace.forwardRef(
|
|
6122
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6123
|
+
alertDialog.AlertDialog.Close,
|
|
6124
|
+
{
|
|
6125
|
+
ref,
|
|
6126
|
+
className: cn(buttonVariants({ variant: "primary", size: "default" }), className),
|
|
6127
|
+
...props
|
|
6128
|
+
}
|
|
6129
|
+
)
|
|
6130
|
+
);
|
|
6131
|
+
AlertDialogAction.displayName = "AlertDialogAction";
|
|
6132
|
+
const AlertDialogCancel = React__namespace.forwardRef(
|
|
6133
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6134
|
+
alertDialog.AlertDialog.Close,
|
|
6135
|
+
{
|
|
6136
|
+
ref,
|
|
6137
|
+
className: cn(buttonVariants({ variant: "default", size: "default" }), className),
|
|
6138
|
+
...props
|
|
6139
|
+
}
|
|
6140
|
+
)
|
|
6141
|
+
);
|
|
6142
|
+
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
6132
6143
|
AlertDialog.Trigger = AlertDialogTrigger;
|
|
6133
6144
|
AlertDialog.Portal = AlertDialogPortal;
|
|
6134
6145
|
AlertDialog.Overlay = AlertDialogOverlay;
|
|
@@ -6171,41 +6182,54 @@ const Checkbox = React__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
6171
6182
|
));
|
|
6172
6183
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
6173
6184
|
|
|
6174
|
-
const Collapsible =
|
|
6175
|
-
const CollapsibleTrigger = React.forwardRef(
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
)
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
className: cn(
|
|
6198
|
-
"overflow-hidden",
|
|
6199
|
-
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-top-1",
|
|
6200
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-1",
|
|
6201
|
-
"duration-normal ease-out-custom",
|
|
6202
|
-
className
|
|
6203
|
-
),
|
|
6204
|
-
...props,
|
|
6205
|
-
children
|
|
6185
|
+
const Collapsible = collapsible.Collapsible.Root;
|
|
6186
|
+
const CollapsibleTrigger = React.forwardRef(
|
|
6187
|
+
({ className, asChild, children, ...props }, ref) => {
|
|
6188
|
+
const renderProps = asChild && React.isValidElement(children) ? { render: children } : {};
|
|
6189
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6190
|
+
collapsible.Collapsible.Trigger,
|
|
6191
|
+
{
|
|
6192
|
+
ref,
|
|
6193
|
+
"data-slot": "collapsible-trigger",
|
|
6194
|
+
className: cn(
|
|
6195
|
+
"-outline-offset-2",
|
|
6196
|
+
transitions.colors,
|
|
6197
|
+
focusRing.visible,
|
|
6198
|
+
"hover:text-neutral5",
|
|
6199
|
+
"[&>svg]:transition-transform [&>svg]:duration-normal [&>svg]:ease-out-custom",
|
|
6200
|
+
"[&[data-panel-open]>svg]:rotate-90",
|
|
6201
|
+
className
|
|
6202
|
+
),
|
|
6203
|
+
...renderProps,
|
|
6204
|
+
...props,
|
|
6205
|
+
children: asChild ? void 0 : children
|
|
6206
|
+
}
|
|
6207
|
+
);
|
|
6206
6208
|
}
|
|
6207
|
-
)
|
|
6208
|
-
|
|
6209
|
+
);
|
|
6210
|
+
CollapsibleTrigger.displayName = "CollapsibleTrigger";
|
|
6211
|
+
const CollapsibleContent = React.forwardRef(
|
|
6212
|
+
({ className, children, ...props }, ref) => (
|
|
6213
|
+
// Base UI animates the panel's `height` between 0 and `--collapsible-panel-height`.
|
|
6214
|
+
// Padding/margin/borders must live on an inner wrapper — if applied to the panel
|
|
6215
|
+
// itself they keep it from collapsing to 0, which makes the animation jump.
|
|
6216
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6217
|
+
collapsible.Collapsible.Panel,
|
|
6218
|
+
{
|
|
6219
|
+
ref,
|
|
6220
|
+
"data-slot": "collapsible-content",
|
|
6221
|
+
className: cn(
|
|
6222
|
+
"overflow-hidden",
|
|
6223
|
+
"h-[var(--collapsible-panel-height)] transition-[height] duration-normal ease-out-custom",
|
|
6224
|
+
"data-[starting-style]:h-0 data-[ending-style]:h-0"
|
|
6225
|
+
),
|
|
6226
|
+
...props,
|
|
6227
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className, children })
|
|
6228
|
+
}
|
|
6229
|
+
)
|
|
6230
|
+
)
|
|
6231
|
+
);
|
|
6232
|
+
CollapsibleContent.displayName = "CollapsibleContent";
|
|
6209
6233
|
|
|
6210
6234
|
const comboboxStyles = {
|
|
6211
6235
|
/** Root wrapper */
|
|
@@ -6481,51 +6505,70 @@ function MultiCombobox({
|
|
|
6481
6505
|
] });
|
|
6482
6506
|
}
|
|
6483
6507
|
|
|
6484
|
-
const Dialog =
|
|
6485
|
-
const DialogTrigger =
|
|
6486
|
-
|
|
6487
|
-
const
|
|
6508
|
+
const Dialog = dialog.Dialog.Root;
|
|
6509
|
+
const DialogTrigger = React__namespace.forwardRef(
|
|
6510
|
+
({ asChild, children, ...props }, ref) => {
|
|
6511
|
+
const renderProps = asChild && React__namespace.isValidElement(children) ? { render: children } : {};
|
|
6512
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Trigger, { ref, ...renderProps, ...props, children: asChild ? void 0 : children });
|
|
6513
|
+
}
|
|
6514
|
+
);
|
|
6515
|
+
DialogTrigger.displayName = "DialogTrigger";
|
|
6516
|
+
const DialogPortal = dialog.Dialog.Portal;
|
|
6517
|
+
const DialogClose = React__namespace.forwardRef(({ asChild, children, ...props }, ref) => {
|
|
6518
|
+
const renderProps = asChild && React__namespace.isValidElement(children) ? { render: children } : {};
|
|
6519
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Close, { ref, ...renderProps, ...props, children: asChild ? void 0 : children });
|
|
6520
|
+
});
|
|
6521
|
+
DialogClose.displayName = "DialogClose";
|
|
6488
6522
|
const DialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6489
|
-
|
|
6523
|
+
dialog.Dialog.Backdrop,
|
|
6490
6524
|
{
|
|
6491
6525
|
ref,
|
|
6492
6526
|
className: cn("dialog-overlay-anim fixed inset-0 z-50 bg-overlay backdrop-blur-xs", className),
|
|
6493
6527
|
...props
|
|
6494
6528
|
}
|
|
6495
6529
|
));
|
|
6496
|
-
DialogOverlay.displayName =
|
|
6530
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
6497
6531
|
const DialogContent = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
6498
6532
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
6499
6533
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6500
|
-
|
|
6534
|
+
dialog.Dialog.Popup,
|
|
6501
6535
|
{
|
|
6502
6536
|
ref,
|
|
6537
|
+
"data-slot": "dialog-content",
|
|
6503
6538
|
className: cn(
|
|
6504
6539
|
"dialog-content-anim",
|
|
6505
6540
|
"fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%]",
|
|
6506
6541
|
"w-full max-w-[calc(100%-2rem)] sm:max-w-lg",
|
|
6507
6542
|
"rounded-xl border border-border1/40 bg-surface2/96 backdrop-blur-md shadow-dialog",
|
|
6543
|
+
"focus-visible:outline-hidden",
|
|
6508
6544
|
className
|
|
6509
6545
|
),
|
|
6510
6546
|
...props,
|
|
6511
6547
|
children: [
|
|
6512
6548
|
children,
|
|
6513
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6549
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6550
|
+
dialog.Dialog.Close,
|
|
6551
|
+
{
|
|
6552
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: "absolute top-3 right-3", "aria-label": "Close", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}) })
|
|
6553
|
+
}
|
|
6554
|
+
)
|
|
6514
6555
|
]
|
|
6515
6556
|
}
|
|
6516
6557
|
)
|
|
6517
6558
|
] }));
|
|
6518
|
-
DialogContent.displayName =
|
|
6559
|
+
DialogContent.displayName = "DialogContent";
|
|
6519
6560
|
const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-0.5 px-4 py-3 text-left", className), ...props });
|
|
6520
6561
|
DialogHeader.displayName = "DialogHeader";
|
|
6521
6562
|
const DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse gap-1.5 px-4 py-2.5 sm:flex-row sm:justify-end", className), ...props });
|
|
6522
6563
|
DialogFooter.displayName = "DialogFooter";
|
|
6523
6564
|
const DialogBody = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("overflow-y-auto px-4 py-3.5 max-h-[50vh]", className), ...props });
|
|
6524
6565
|
DialogBody.displayName = "DialogBody";
|
|
6525
|
-
const DialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6526
|
-
DialogTitle.displayName =
|
|
6527
|
-
const DialogDescription = React__namespace.forwardRef(
|
|
6528
|
-
|
|
6566
|
+
const DialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Title, { ref, className: cn("text-ui-md font-medium", className), ...props }));
|
|
6567
|
+
DialogTitle.displayName = "DialogTitle";
|
|
6568
|
+
const DialogDescription = React__namespace.forwardRef(
|
|
6569
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Description, { ref, className: cn("sr-only", className), ...props })
|
|
6570
|
+
);
|
|
6571
|
+
DialogDescription.displayName = "DialogDescription";
|
|
6529
6572
|
|
|
6530
6573
|
const Command = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6531
6574
|
cmdk.Command,
|
|
@@ -11178,9 +11221,9 @@ function MainSidebarRoot({ children, className }) {
|
|
|
11178
11221
|
[setOpenMobile]
|
|
11179
11222
|
);
|
|
11180
11223
|
if (isMobile) {
|
|
11181
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11224
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Root, { open: openMobile, onOpenChange: setOpenMobile, children: /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { children: [
|
|
11182
11225
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11183
|
-
|
|
11226
|
+
Dialog__namespace.Overlay,
|
|
11184
11227
|
{
|
|
11185
11228
|
className: cn(
|
|
11186
11229
|
"fixed inset-0 z-40 bg-overlay backdrop-blur-sm",
|
|
@@ -11190,7 +11233,7 @@ function MainSidebarRoot({ children, className }) {
|
|
|
11190
11233
|
}
|
|
11191
11234
|
),
|
|
11192
11235
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11193
|
-
|
|
11236
|
+
Dialog__namespace.Content,
|
|
11194
11237
|
{
|
|
11195
11238
|
className: cn(
|
|
11196
11239
|
"fixed inset-y-0 left-0 z-50 flex h-full flex-col",
|
|
@@ -11202,8 +11245,8 @@ function MainSidebarRoot({ children, className }) {
|
|
|
11202
11245
|
className
|
|
11203
11246
|
),
|
|
11204
11247
|
children: [
|
|
11205
|
-
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11206
|
-
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11248
|
+
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Title, { children: "Navigation" }) }),
|
|
11249
|
+
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Description, { children: "Primary site navigation drawer" }) }),
|
|
11207
11250
|
/* @__PURE__ */ jsxRuntime.jsx("div", { onClick: closeOnAnchor, className: "flex flex-col h-full min-h-0 px-4 py-2 overflow-hidden", children })
|
|
11208
11251
|
]
|
|
11209
11252
|
}
|
|
@@ -11725,9 +11768,9 @@ function SideDialogRoot({
|
|
|
11725
11768
|
className
|
|
11726
11769
|
}) {
|
|
11727
11770
|
const isConfirmation = variant === "confirmation";
|
|
11728
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11771
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Root, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { children: [
|
|
11729
11772
|
!isConfirmation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11730
|
-
|
|
11773
|
+
Dialog__namespace.Overlay,
|
|
11731
11774
|
{
|
|
11732
11775
|
className: cn(
|
|
11733
11776
|
"bg-overlay backdrop-blur-sm top-0 bottom-0 right-0 left-0 fixed z-50",
|
|
@@ -11737,7 +11780,7 @@ function SideDialogRoot({
|
|
|
11737
11780
|
}
|
|
11738
11781
|
),
|
|
11739
11782
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11740
|
-
|
|
11783
|
+
Dialog__namespace.Content,
|
|
11741
11784
|
{
|
|
11742
11785
|
className: cn(
|
|
11743
11786
|
"fixed top-0 bottom-0 right-0 border-l border-border2 z-50 bg-surface2",
|
|
@@ -11753,10 +11796,10 @@ function SideDialogRoot({
|
|
|
11753
11796
|
),
|
|
11754
11797
|
children: [
|
|
11755
11798
|
/* @__PURE__ */ jsxRuntime.jsxs(VisuallyHidden__namespace.Root, { children: [
|
|
11756
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11757
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11799
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Title, { children: dialogTitle }),
|
|
11800
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Description, { children: dialogDescription })
|
|
11758
11801
|
] }),
|
|
11759
|
-
!isConfirmation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11802
|
+
!isConfirmation && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11760
11803
|
"button",
|
|
11761
11804
|
{
|
|
11762
11805
|
className: cn(
|
|
@@ -12924,15 +12967,6 @@ const Tree = Object.assign(TreeRoot, {
|
|
|
12924
12967
|
});
|
|
12925
12968
|
|
|
12926
12969
|
const SUBMENU_SEARCH_THRESHOLD = 6;
|
|
12927
|
-
const subContentClass = cn(
|
|
12928
|
-
"bg-surface5 backdrop-blur-xl z-50 min-w-[8rem] overflow-auto rounded-lg p-2 shadow-md",
|
|
12929
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
12930
|
-
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
12931
|
-
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
|
|
12932
|
-
);
|
|
12933
|
-
function PortalSubContent({ className, children, ...props }) {
|
|
12934
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactDropdownMenu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(reactDropdownMenu.SubContent, { className: cn(subContentClass, className), ...props, children }) });
|
|
12935
|
-
}
|
|
12936
12970
|
function SubMenuSearch({
|
|
12937
12971
|
value,
|
|
12938
12972
|
onChange,
|
|
@@ -13037,7 +13071,7 @@ function SelectDataFilter({
|
|
|
13037
13071
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("truncate"), children: cat.label }),
|
|
13038
13072
|
selectedCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-ui-sm text-accent1"), children: selectedCount })
|
|
13039
13073
|
] }),
|
|
13040
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13074
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu.SubContent, { className: cn("max-h-[20rem]"), children: [
|
|
13041
13075
|
cat.values.length >= searchThreshold && /* @__PURE__ */ jsxRuntime.jsx(SubMenuSearch, { value: subSearch, onChange: setSubSearch, label: `Search ${cat.label.toLowerCase()}` }),
|
|
13042
13076
|
mode === "single" ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu.RadioGroup, { value: selected[0] ?? "", onValueChange: (val) => handleSelect(cat.id, val, mode), children: cat.values.filter((v) => !subSearch || v.label.toLowerCase().includes(subSearch.toLowerCase())).map((v) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu.RadioItem, { value: v.value, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("truncate"), children: v.label }) }, v.value)) }) : cat.values.filter((v) => !subSearch || v.label.toLowerCase().includes(subSearch.toLowerCase())).map((v) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13043
13077
|
DropdownMenu.CheckboxItem,
|
|
@@ -13101,7 +13135,7 @@ function SelectDataFilter({
|
|
|
13101
13135
|
}
|
|
13102
13136
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu.Sub, { children: [
|
|
13103
13137
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenu.SubTrigger, { children: group.label }),
|
|
13104
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13138
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenu.SubContent, { className: cn("max-h-[20rem]"), children: group.items.map((cat) => renderCategory(cat)) })
|
|
13105
13139
|
] }, group.key);
|
|
13106
13140
|
}),
|
|
13107
13141
|
activeFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -16749,18 +16783,70 @@ function MetricsProvider({
|
|
|
16749
16783
|
return /* @__PURE__ */ jsxRuntime.jsx(MetricsContext.Provider, { value, children });
|
|
16750
16784
|
}
|
|
16751
16785
|
|
|
16786
|
+
const METRICS_PRESETS = [
|
|
16787
|
+
"last-24h",
|
|
16788
|
+
"last-3d",
|
|
16789
|
+
"last-7d",
|
|
16790
|
+
"last-14d",
|
|
16791
|
+
"last-30d",
|
|
16792
|
+
"custom"
|
|
16793
|
+
];
|
|
16794
|
+
function toPickerPreset(preset) {
|
|
16795
|
+
switch (preset) {
|
|
16796
|
+
case "3d":
|
|
16797
|
+
return "last-3d";
|
|
16798
|
+
case "7d":
|
|
16799
|
+
return "last-7d";
|
|
16800
|
+
case "14d":
|
|
16801
|
+
return "last-14d";
|
|
16802
|
+
case "30d":
|
|
16803
|
+
return "last-30d";
|
|
16804
|
+
case "custom":
|
|
16805
|
+
return "custom";
|
|
16806
|
+
default:
|
|
16807
|
+
return "last-24h";
|
|
16808
|
+
}
|
|
16809
|
+
}
|
|
16810
|
+
function fromPickerPreset(preset) {
|
|
16811
|
+
switch (preset) {
|
|
16812
|
+
case "last-3d":
|
|
16813
|
+
return "3d";
|
|
16814
|
+
case "last-7d":
|
|
16815
|
+
return "7d";
|
|
16816
|
+
case "last-14d":
|
|
16817
|
+
return "14d";
|
|
16818
|
+
case "last-30d":
|
|
16819
|
+
return "30d";
|
|
16820
|
+
case "custom":
|
|
16821
|
+
return "custom";
|
|
16822
|
+
default:
|
|
16823
|
+
return "24h";
|
|
16824
|
+
}
|
|
16825
|
+
}
|
|
16752
16826
|
function DateRangeSelector() {
|
|
16753
|
-
const { datePreset, setDatePreset } = useMetrics();
|
|
16827
|
+
const { datePreset, setDatePreset, customRange, setCustomRange } = useMetrics();
|
|
16828
|
+
const presetRef = React.useRef(datePreset);
|
|
16829
|
+
presetRef.current = datePreset;
|
|
16830
|
+
const customRangeRef = React.useRef(customRange);
|
|
16831
|
+
customRangeRef.current = customRange;
|
|
16754
16832
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16755
|
-
|
|
16833
|
+
DateTimeRangePicker,
|
|
16756
16834
|
{
|
|
16757
|
-
|
|
16758
|
-
|
|
16759
|
-
|
|
16760
|
-
|
|
16761
|
-
|
|
16762
|
-
|
|
16763
|
-
|
|
16835
|
+
preset: toPickerPreset(datePreset),
|
|
16836
|
+
onPresetChange: (next) => {
|
|
16837
|
+
const mapped = fromPickerPreset(next);
|
|
16838
|
+
presetRef.current = mapped;
|
|
16839
|
+
setDatePreset(mapped);
|
|
16840
|
+
},
|
|
16841
|
+
dateFrom: customRange?.from,
|
|
16842
|
+
dateTo: customRange?.to,
|
|
16843
|
+
onDateChange: (value, type) => {
|
|
16844
|
+
if (presetRef.current !== "custom") return;
|
|
16845
|
+
const next = { ...customRangeRef.current, [type]: value };
|
|
16846
|
+
customRangeRef.current = next;
|
|
16847
|
+
setCustomRange(next);
|
|
16848
|
+
},
|
|
16849
|
+
presets: METRICS_PRESETS
|
|
16764
16850
|
}
|
|
16765
16851
|
);
|
|
16766
16852
|
}
|