@ai-matrx/design-system 0.8.0 → 0.10.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 +217 -0
- package/README.md +16 -0
- package/dist/index.cjs +489 -383
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +184 -9
- package/dist/index.d.ts +184 -9
- package/dist/index.js +454 -348
- package/dist/index.js.map +1 -1
- package/dist/styles.css +474 -0
- package/dist/tokens.css +25 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -708,6 +708,45 @@ var Button = React5.forwardRef(
|
|
|
708
708
|
);
|
|
709
709
|
Button.displayName = "Button";
|
|
710
710
|
|
|
711
|
+
// src/motion.ts
|
|
712
|
+
var MOTION_OVERLAY = "matrx-motion-overlay";
|
|
713
|
+
var MOTION_DIALOG = "matrx-motion-dialog";
|
|
714
|
+
var MOTION_BOTTOM_SHEET = "matrx-motion-bottom-sheet";
|
|
715
|
+
var MOTION_POPPER = "matrx-motion-popper";
|
|
716
|
+
var MOTION_SHEET = {
|
|
717
|
+
top: "matrx-motion-sheet-top",
|
|
718
|
+
bottom: "matrx-motion-sheet-bottom",
|
|
719
|
+
left: "matrx-motion-sheet-left",
|
|
720
|
+
right: "matrx-motion-sheet-right",
|
|
721
|
+
center: "matrx-motion-sheet-center"
|
|
722
|
+
};
|
|
723
|
+
var MOTION_PULSE = "matrx-pulse";
|
|
724
|
+
var MOTION_SPIN = "matrx-spin";
|
|
725
|
+
var ALL_MOTION_CLASSES = [
|
|
726
|
+
MOTION_OVERLAY,
|
|
727
|
+
MOTION_DIALOG,
|
|
728
|
+
MOTION_BOTTOM_SHEET,
|
|
729
|
+
MOTION_POPPER,
|
|
730
|
+
...Object.values(MOTION_SHEET),
|
|
731
|
+
MOTION_PULSE,
|
|
732
|
+
MOTION_SPIN
|
|
733
|
+
];
|
|
734
|
+
var FORBIDDEN_HOST_MOTION_UTILITIES = [
|
|
735
|
+
"animate-in",
|
|
736
|
+
"animate-out",
|
|
737
|
+
"fade-in",
|
|
738
|
+
"fade-out",
|
|
739
|
+
"zoom-in",
|
|
740
|
+
"zoom-out",
|
|
741
|
+
"slide-in-from",
|
|
742
|
+
"slide-out-to",
|
|
743
|
+
"animate-accordion",
|
|
744
|
+
"animate-slide-down",
|
|
745
|
+
"animate-slide-up",
|
|
746
|
+
"animate-pulse",
|
|
747
|
+
"animate-spin"
|
|
748
|
+
];
|
|
749
|
+
|
|
711
750
|
// src/portal-container.tsx
|
|
712
751
|
import * as React6 from "react";
|
|
713
752
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
@@ -746,7 +785,8 @@ var AlertDialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /*
|
|
|
746
785
|
ref,
|
|
747
786
|
"data-slot": "alert-dialog-overlay",
|
|
748
787
|
className: cn(
|
|
749
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]
|
|
788
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]",
|
|
789
|
+
MOTION_OVERLAY,
|
|
750
790
|
className
|
|
751
791
|
),
|
|
752
792
|
...props
|
|
@@ -765,7 +805,7 @@ var AlertDialogDescription = React7.forwardRef(({ className, ...props }, ref) =>
|
|
|
765
805
|
}
|
|
766
806
|
));
|
|
767
807
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
768
|
-
var AlertDialogContent = React7.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
808
|
+
var AlertDialogContent = React7.forwardRef(({ className, children, container, animated = true, ...props }, ref) => {
|
|
769
809
|
const hasDescription = treeContainsComponent2(children, AlertDialogDescription) || treeContainsComponent2(children, AlertDialogPrimitive.Description);
|
|
770
810
|
return /* @__PURE__ */ jsxs5(AlertDialogPortal, { container, children: [
|
|
771
811
|
/* @__PURE__ */ jsx10(AlertDialogOverlay, {}),
|
|
@@ -775,11 +815,12 @@ var AlertDialogContent = React7.forwardRef(({ className, children, container, ..
|
|
|
775
815
|
ref,
|
|
776
816
|
"data-slot": "alert-dialog-content",
|
|
777
817
|
className: cn(
|
|
778
|
-
"fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg
|
|
818
|
+
"fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg",
|
|
779
819
|
// Ruling 3 — never taller than the viewport, always scrollable, and
|
|
780
820
|
// the footer stays reachable via --dialog-pad like Dialog's.
|
|
781
821
|
"max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full",
|
|
782
|
-
"
|
|
822
|
+
"sm:rounded-lg",
|
|
823
|
+
animated && MOTION_DIALOG,
|
|
783
824
|
className
|
|
784
825
|
),
|
|
785
826
|
...props,
|
|
@@ -1053,22 +1094,36 @@ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
|
1053
1094
|
|
|
1054
1095
|
// src/collapsible.tsx
|
|
1055
1096
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
1097
|
+
import * as React11 from "react";
|
|
1098
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1056
1099
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
1057
1100
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
1058
|
-
var CollapsibleContent2 =
|
|
1101
|
+
var CollapsibleContent2 = React11.forwardRef(({ className, animated = true, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
1102
|
+
CollapsiblePrimitive.CollapsibleContent,
|
|
1103
|
+
{
|
|
1104
|
+
ref,
|
|
1105
|
+
"data-slot": "collapsible-content",
|
|
1106
|
+
className: cn(
|
|
1107
|
+
animated && "matrx-collapsible-content overflow-hidden",
|
|
1108
|
+
className
|
|
1109
|
+
),
|
|
1110
|
+
...props
|
|
1111
|
+
}
|
|
1112
|
+
));
|
|
1113
|
+
CollapsibleContent2.displayName = "CollapsibleContent";
|
|
1059
1114
|
|
|
1060
1115
|
// src/command.tsx
|
|
1061
1116
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
1062
1117
|
import { Command as CommandPrimitive } from "cmdk";
|
|
1063
|
-
import * as
|
|
1118
|
+
import * as React13 from "react";
|
|
1064
1119
|
|
|
1065
1120
|
// src/use-is-mobile.ts
|
|
1066
|
-
import * as
|
|
1121
|
+
import * as React12 from "react";
|
|
1067
1122
|
var MOBILE_BREAKPOINT = 768;
|
|
1068
1123
|
function useIsMobile() {
|
|
1069
|
-
const [isMobile, setIsMobile] =
|
|
1070
|
-
const [hasMounted, setHasMounted] =
|
|
1071
|
-
|
|
1124
|
+
const [isMobile, setIsMobile] = React12.useState(false);
|
|
1125
|
+
const [hasMounted, setHasMounted] = React12.useState(false);
|
|
1126
|
+
React12.useEffect(() => {
|
|
1072
1127
|
setHasMounted(true);
|
|
1073
1128
|
const onChange = () => {
|
|
1074
1129
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -1088,8 +1143,8 @@ function useIsMobile() {
|
|
|
1088
1143
|
}
|
|
1089
1144
|
|
|
1090
1145
|
// src/command.tsx
|
|
1091
|
-
import { jsx as
|
|
1092
|
-
var Command =
|
|
1146
|
+
import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1147
|
+
var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
1093
1148
|
CommandPrimitive,
|
|
1094
1149
|
{
|
|
1095
1150
|
ref,
|
|
@@ -1101,18 +1156,21 @@ var Command = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1101
1156
|
}
|
|
1102
1157
|
));
|
|
1103
1158
|
Command.displayName = CommandPrimitive.displayName;
|
|
1104
|
-
var DIALOG_DESKTOP_CLASSES = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1105
|
-
var DIALOG_MOBILE_SHEET_CLASSES = "fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1159
|
+
var DIALOG_DESKTOP_CLASSES = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg";
|
|
1160
|
+
var DIALOG_MOBILE_SHEET_CLASSES = "fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
|
|
1106
1161
|
var DIALOG_MOBILE_SHEET_OVERRIDE = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
|
|
1107
|
-
var CommandDialogContent =
|
|
1162
|
+
var CommandDialogContent = React13.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
1108
1163
|
const isMobile = useIsMobile();
|
|
1109
1164
|
const isModal = useRadixDialogModal();
|
|
1110
1165
|
const portalContainer = usePortalContainer(container);
|
|
1111
1166
|
return /* @__PURE__ */ jsxs6(DialogPrimitive.Portal, { container: portalContainer, children: [
|
|
1112
|
-
isModal ? /* @__PURE__ */
|
|
1167
|
+
isModal ? /* @__PURE__ */ jsx15(
|
|
1113
1168
|
DialogPrimitive.Overlay,
|
|
1114
1169
|
{
|
|
1115
|
-
className:
|
|
1170
|
+
className: cn(
|
|
1171
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1172
|
+
MOTION_OVERLAY
|
|
1173
|
+
)
|
|
1116
1174
|
}
|
|
1117
1175
|
) : null,
|
|
1118
1176
|
/* @__PURE__ */ jsxs6(
|
|
@@ -1123,6 +1181,7 @@ var CommandDialogContent = React12.forwardRef(({ className, children, container,
|
|
|
1123
1181
|
"aria-describedby": void 0,
|
|
1124
1182
|
className: cn(
|
|
1125
1183
|
isMobile ? DIALOG_MOBILE_SHEET_CLASSES : DIALOG_DESKTOP_CLASSES,
|
|
1184
|
+
isMobile ? MOTION_BOTTOM_SHEET : MOTION_DIALOG,
|
|
1126
1185
|
className,
|
|
1127
1186
|
isMobile && DIALOG_MOBILE_SHEET_OVERRIDE,
|
|
1128
1187
|
!isModal && "z-[900]"
|
|
@@ -1131,8 +1190,8 @@ var CommandDialogContent = React12.forwardRef(({ className, children, container,
|
|
|
1131
1190
|
children: [
|
|
1132
1191
|
children,
|
|
1133
1192
|
/* @__PURE__ */ jsxs6(DialogPrimitive.Close, { className: "absolute right-2 top-4 flex h-10 w-10 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4", children: [
|
|
1134
|
-
/* @__PURE__ */
|
|
1135
|
-
/* @__PURE__ */
|
|
1193
|
+
/* @__PURE__ */ jsx15(XIcon, { className: "h-4 w-4" }),
|
|
1194
|
+
/* @__PURE__ */ jsx15("span", { className: "sr-only", children: "Close" })
|
|
1136
1195
|
] })
|
|
1137
1196
|
]
|
|
1138
1197
|
}
|
|
@@ -1146,21 +1205,21 @@ var CommandDialog = ({
|
|
|
1146
1205
|
...props
|
|
1147
1206
|
}) => {
|
|
1148
1207
|
const modal = props.modal ?? true;
|
|
1149
|
-
return /* @__PURE__ */
|
|
1208
|
+
return /* @__PURE__ */ jsx15(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ jsx15(DialogPrimitive.Root, { ...props, modal, children: /* @__PURE__ */ jsxs6(
|
|
1150
1209
|
CommandDialogContent,
|
|
1151
1210
|
{
|
|
1152
1211
|
className: "overflow-hidden p-0",
|
|
1153
1212
|
...container !== void 0 ? { container } : {},
|
|
1154
1213
|
children: [
|
|
1155
|
-
/* @__PURE__ */
|
|
1156
|
-
/* @__PURE__ */
|
|
1214
|
+
/* @__PURE__ */ jsx15(DialogPrimitive.Title, { className: "sr-only" }),
|
|
1215
|
+
/* @__PURE__ */ jsx15(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
1157
1216
|
]
|
|
1158
1217
|
}
|
|
1159
1218
|
) }) });
|
|
1160
1219
|
};
|
|
1161
|
-
var CommandInput =
|
|
1162
|
-
/* @__PURE__ */
|
|
1163
|
-
/* @__PURE__ */
|
|
1220
|
+
var CommandInput = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs6("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1221
|
+
/* @__PURE__ */ jsx15(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1222
|
+
/* @__PURE__ */ jsx15(
|
|
1164
1223
|
CommandPrimitive.Input,
|
|
1165
1224
|
{
|
|
1166
1225
|
ref,
|
|
@@ -1173,7 +1232,7 @@ var CommandInput = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1173
1232
|
)
|
|
1174
1233
|
] }));
|
|
1175
1234
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
1176
|
-
var CommandList =
|
|
1235
|
+
var CommandList = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
1177
1236
|
CommandPrimitive.List,
|
|
1178
1237
|
{
|
|
1179
1238
|
ref,
|
|
@@ -1182,7 +1241,7 @@ var CommandList = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1182
1241
|
}
|
|
1183
1242
|
));
|
|
1184
1243
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
1185
|
-
var CommandEmpty =
|
|
1244
|
+
var CommandEmpty = React13.forwardRef((props, ref) => /* @__PURE__ */ jsx15(
|
|
1186
1245
|
CommandPrimitive.Empty,
|
|
1187
1246
|
{
|
|
1188
1247
|
ref,
|
|
@@ -1191,7 +1250,7 @@ var CommandEmpty = React12.forwardRef((props, ref) => /* @__PURE__ */ jsx14(
|
|
|
1191
1250
|
}
|
|
1192
1251
|
));
|
|
1193
1252
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
1194
|
-
var CommandGroup =
|
|
1253
|
+
var CommandGroup = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
1195
1254
|
CommandPrimitive.Group,
|
|
1196
1255
|
{
|
|
1197
1256
|
ref,
|
|
@@ -1203,7 +1262,7 @@ var CommandGroup = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1203
1262
|
}
|
|
1204
1263
|
));
|
|
1205
1264
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
1206
|
-
var CommandSeparator =
|
|
1265
|
+
var CommandSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
1207
1266
|
CommandPrimitive.Separator,
|
|
1208
1267
|
{
|
|
1209
1268
|
ref,
|
|
@@ -1212,7 +1271,7 @@ var CommandSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1212
1271
|
}
|
|
1213
1272
|
));
|
|
1214
1273
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
1215
|
-
var CommandItem =
|
|
1274
|
+
var CommandItem = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
1216
1275
|
CommandPrimitive.Item,
|
|
1217
1276
|
{
|
|
1218
1277
|
ref,
|
|
@@ -1228,7 +1287,7 @@ var CommandShortcut = ({
|
|
|
1228
1287
|
className,
|
|
1229
1288
|
...props
|
|
1230
1289
|
}) => {
|
|
1231
|
-
return /* @__PURE__ */
|
|
1290
|
+
return /* @__PURE__ */ jsx15(
|
|
1232
1291
|
"span",
|
|
1233
1292
|
{
|
|
1234
1293
|
className: cn(
|
|
@@ -1243,8 +1302,8 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
1243
1302
|
|
|
1244
1303
|
// src/context-menu.tsx
|
|
1245
1304
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
1246
|
-
import * as
|
|
1247
|
-
import { jsx as
|
|
1305
|
+
import * as React14 from "react";
|
|
1306
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1248
1307
|
var ContextMenu = ContextMenuPrimitive.Root;
|
|
1249
1308
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
1250
1309
|
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
@@ -1252,10 +1311,9 @@ var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
|
1252
1311
|
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
1253
1312
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1254
1313
|
var SURFACE_CLASS = "z-50 min-w-[8rem] max-h-[var(--radix-context-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
|
|
1255
|
-
var MOTION_CLASS = "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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
1256
1314
|
var ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1257
1315
|
var INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1258
|
-
var ContextMenuSubTrigger =
|
|
1316
|
+
var ContextMenuSubTrigger = React14.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
1259
1317
|
ContextMenuPrimitive.SubTrigger,
|
|
1260
1318
|
{
|
|
1261
1319
|
ref,
|
|
@@ -1268,35 +1326,35 @@ var ContextMenuSubTrigger = React13.forwardRef(({ className, inset, children, ..
|
|
|
1268
1326
|
...props,
|
|
1269
1327
|
children: [
|
|
1270
1328
|
children,
|
|
1271
|
-
/* @__PURE__ */
|
|
1329
|
+
/* @__PURE__ */ jsx16(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
1272
1330
|
]
|
|
1273
1331
|
}
|
|
1274
1332
|
));
|
|
1275
1333
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
1276
|
-
var ContextMenuSubContent =
|
|
1334
|
+
var ContextMenuSubContent = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
1277
1335
|
ContextMenuPrimitive.SubContent,
|
|
1278
1336
|
{
|
|
1279
1337
|
ref,
|
|
1280
1338
|
"data-slot": "context-menu-sub-content",
|
|
1281
|
-
className: cn(SURFACE_CLASS, "shadow-lg",
|
|
1339
|
+
className: cn(SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
1282
1340
|
...props
|
|
1283
1341
|
}
|
|
1284
1342
|
));
|
|
1285
1343
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
1286
|
-
var ContextMenuContent =
|
|
1344
|
+
var ContextMenuContent = React14.forwardRef(({ className, container, ...props }, ref) => {
|
|
1287
1345
|
const portalContainer = usePortalContainer(container);
|
|
1288
|
-
return /* @__PURE__ */
|
|
1346
|
+
return /* @__PURE__ */ jsx16(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx16(
|
|
1289
1347
|
ContextMenuPrimitive.Content,
|
|
1290
1348
|
{
|
|
1291
1349
|
ref,
|
|
1292
1350
|
"data-slot": "context-menu-content",
|
|
1293
|
-
className: cn(SURFACE_CLASS, "shadow-md",
|
|
1351
|
+
className: cn(SURFACE_CLASS, "shadow-md", MOTION_POPPER, className),
|
|
1294
1352
|
...props
|
|
1295
1353
|
}
|
|
1296
1354
|
) });
|
|
1297
1355
|
});
|
|
1298
1356
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1299
|
-
var ContextMenuItem =
|
|
1357
|
+
var ContextMenuItem = React14.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
1300
1358
|
ContextMenuPrimitive.Item,
|
|
1301
1359
|
{
|
|
1302
1360
|
ref,
|
|
@@ -1311,7 +1369,7 @@ var ContextMenuItem = React13.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1311
1369
|
}
|
|
1312
1370
|
));
|
|
1313
1371
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1314
|
-
var ContextMenuCheckboxItem =
|
|
1372
|
+
var ContextMenuCheckboxItem = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
1315
1373
|
ContextMenuPrimitive.CheckboxItem,
|
|
1316
1374
|
{
|
|
1317
1375
|
ref,
|
|
@@ -1319,13 +1377,13 @@ var ContextMenuCheckboxItem = React13.forwardRef(({ className, children, ...prop
|
|
|
1319
1377
|
className: cn(INDICATOR_ITEM_CLASS, className),
|
|
1320
1378
|
...props,
|
|
1321
1379
|
children: [
|
|
1322
|
-
/* @__PURE__ */
|
|
1380
|
+
/* @__PURE__ */ jsx16("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx16(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx16(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
1323
1381
|
children
|
|
1324
1382
|
]
|
|
1325
1383
|
}
|
|
1326
1384
|
));
|
|
1327
1385
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1328
|
-
var ContextMenuRadioItem =
|
|
1386
|
+
var ContextMenuRadioItem = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
1329
1387
|
ContextMenuPrimitive.RadioItem,
|
|
1330
1388
|
{
|
|
1331
1389
|
ref,
|
|
@@ -1333,13 +1391,13 @@ var ContextMenuRadioItem = React13.forwardRef(({ className, children, ...props }
|
|
|
1333
1391
|
className: cn(INDICATOR_ITEM_CLASS, className),
|
|
1334
1392
|
...props,
|
|
1335
1393
|
children: [
|
|
1336
|
-
/* @__PURE__ */
|
|
1394
|
+
/* @__PURE__ */ jsx16("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx16(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx16(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1337
1395
|
children
|
|
1338
1396
|
]
|
|
1339
1397
|
}
|
|
1340
1398
|
));
|
|
1341
1399
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1342
|
-
var ContextMenuLabel =
|
|
1400
|
+
var ContextMenuLabel = React14.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
1343
1401
|
ContextMenuPrimitive.Label,
|
|
1344
1402
|
{
|
|
1345
1403
|
ref,
|
|
@@ -1353,7 +1411,7 @@ var ContextMenuLabel = React13.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1353
1411
|
}
|
|
1354
1412
|
));
|
|
1355
1413
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1356
|
-
var ContextMenuSeparator =
|
|
1414
|
+
var ContextMenuSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
1357
1415
|
ContextMenuPrimitive.Separator,
|
|
1358
1416
|
{
|
|
1359
1417
|
ref,
|
|
@@ -1366,7 +1424,7 @@ ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
|
1366
1424
|
var ContextMenuShortcut = ({
|
|
1367
1425
|
className,
|
|
1368
1426
|
...props
|
|
1369
|
-
}) => /* @__PURE__ */
|
|
1427
|
+
}) => /* @__PURE__ */ jsx16(
|
|
1370
1428
|
"span",
|
|
1371
1429
|
{
|
|
1372
1430
|
"data-slot": "context-menu-shortcut",
|
|
@@ -1384,15 +1442,22 @@ import {
|
|
|
1384
1442
|
|
|
1385
1443
|
// src/popover.tsx
|
|
1386
1444
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1387
|
-
import * as
|
|
1388
|
-
import { jsx as
|
|
1445
|
+
import * as React15 from "react";
|
|
1446
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1389
1447
|
var Popover = PopoverPrimitive.Root;
|
|
1390
1448
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1391
1449
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1392
|
-
var PopoverContent =
|
|
1393
|
-
({
|
|
1450
|
+
var PopoverContent = React15.forwardRef(
|
|
1451
|
+
({
|
|
1452
|
+
className,
|
|
1453
|
+
align = "center",
|
|
1454
|
+
sideOffset = 4,
|
|
1455
|
+
container,
|
|
1456
|
+
animated = true,
|
|
1457
|
+
...props
|
|
1458
|
+
}, ref) => {
|
|
1394
1459
|
const portalContainer = usePortalContainer(container);
|
|
1395
|
-
return /* @__PURE__ */
|
|
1460
|
+
return /* @__PURE__ */ jsx17(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx17(
|
|
1396
1461
|
PopoverPrimitive.Content,
|
|
1397
1462
|
{
|
|
1398
1463
|
ref,
|
|
@@ -1405,7 +1470,8 @@ var PopoverContent = React14.forwardRef(
|
|
|
1405
1470
|
// z, DOM portal order decides, so a dialog opened FROM a popover stacks
|
|
1406
1471
|
// above it, and a popover opened from a dialog still stacks above the
|
|
1407
1472
|
// dialog. z-[10001] buried dialogs behind fullscreen popovers.
|
|
1408
|
-
"z-[10000] w-72 max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none
|
|
1473
|
+
"z-[10000] w-72 max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
1474
|
+
animated && MOTION_POPPER,
|
|
1409
1475
|
className
|
|
1410
1476
|
),
|
|
1411
1477
|
...props
|
|
@@ -1416,7 +1482,7 @@ var PopoverContent = React14.forwardRef(
|
|
|
1416
1482
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1417
1483
|
|
|
1418
1484
|
// src/creatable-picker.tsx
|
|
1419
|
-
import { jsx as
|
|
1485
|
+
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1420
1486
|
function article(noun) {
|
|
1421
1487
|
return /^[aeiou]/i.test(noun.trim()) ? `an ${noun}` : `a ${noun}`;
|
|
1422
1488
|
}
|
|
@@ -1492,7 +1558,7 @@ function CreatablePicker({
|
|
|
1492
1558
|
}
|
|
1493
1559
|
};
|
|
1494
1560
|
return /* @__PURE__ */ jsxs8(Popover, { open, onOpenChange: (next) => next ? setOpen(true) : close(), children: [
|
|
1495
|
-
/* @__PURE__ */
|
|
1561
|
+
/* @__PURE__ */ jsx18(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ jsxs8(
|
|
1496
1562
|
"button",
|
|
1497
1563
|
{
|
|
1498
1564
|
type: "button",
|
|
@@ -1506,12 +1572,12 @@ function CreatablePicker({
|
|
|
1506
1572
|
triggerClassName
|
|
1507
1573
|
),
|
|
1508
1574
|
children: [
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ jsx18("span", { className: "min-w-0 flex-1 truncate", children: selected ? renderSelected ?? selected.render ?? selected.label : /* @__PURE__ */ jsx18("span", { className: "text-muted-foreground", children: loading ? "Loading\u2026" : placeholder }) }),
|
|
1576
|
+
/* @__PURE__ */ jsx18(ChevronsUpDownIcon, { className: "size-3.5 shrink-0 opacity-50" })
|
|
1511
1577
|
]
|
|
1512
1578
|
}
|
|
1513
1579
|
) }),
|
|
1514
|
-
/* @__PURE__ */
|
|
1580
|
+
/* @__PURE__ */ jsx18(PopoverContent, { align: "start", className: "w-[--radix-popover-trigger-width] min-w-56 p-0", children: /* @__PURE__ */ jsxs8(
|
|
1515
1581
|
Command,
|
|
1516
1582
|
{
|
|
1517
1583
|
filter: (itemValue, search, keywords) => {
|
|
@@ -1519,7 +1585,7 @@ function CreatablePicker({
|
|
|
1519
1585
|
return haystack.includes(search.toLowerCase()) ? 1 : 0;
|
|
1520
1586
|
},
|
|
1521
1587
|
children: [
|
|
1522
|
-
/* @__PURE__ */
|
|
1588
|
+
/* @__PURE__ */ jsx18(
|
|
1523
1589
|
CommandInput,
|
|
1524
1590
|
{
|
|
1525
1591
|
ref: inputRef,
|
|
@@ -1532,8 +1598,8 @@ function CreatablePicker({
|
|
|
1532
1598
|
}
|
|
1533
1599
|
),
|
|
1534
1600
|
/* @__PURE__ */ jsxs8(CommandList, { children: [
|
|
1535
|
-
/* @__PURE__ */
|
|
1536
|
-
groups.map((group) => /* @__PURE__ */
|
|
1601
|
+
/* @__PURE__ */ jsx18(CommandEmpty, { children: emptyLabel }),
|
|
1602
|
+
groups.map((group) => /* @__PURE__ */ jsx18(
|
|
1537
1603
|
CommandGroup,
|
|
1538
1604
|
{
|
|
1539
1605
|
...group.heading === void 0 ? {} : { heading: group.heading },
|
|
@@ -1548,7 +1614,7 @@ function CreatablePicker({
|
|
|
1548
1614
|
},
|
|
1549
1615
|
className: "gap-2 text-xs",
|
|
1550
1616
|
children: [
|
|
1551
|
-
/* @__PURE__ */
|
|
1617
|
+
/* @__PURE__ */ jsx18(
|
|
1552
1618
|
LucideCheckIcon,
|
|
1553
1619
|
{
|
|
1554
1620
|
className: cn(
|
|
@@ -1557,8 +1623,8 @@ function CreatablePicker({
|
|
|
1557
1623
|
)
|
|
1558
1624
|
}
|
|
1559
1625
|
),
|
|
1560
|
-
/* @__PURE__ */
|
|
1561
|
-
option.hint ? /* @__PURE__ */
|
|
1626
|
+
/* @__PURE__ */ jsx18("span", { className: "min-w-0 flex-1 truncate", children: option.render ?? option.label }),
|
|
1627
|
+
option.hint ? /* @__PURE__ */ jsx18("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: option.hint }) : null
|
|
1562
1628
|
]
|
|
1563
1629
|
},
|
|
1564
1630
|
option.value
|
|
@@ -1568,7 +1634,7 @@ function CreatablePicker({
|
|
|
1568
1634
|
))
|
|
1569
1635
|
] }),
|
|
1570
1636
|
canCreate ? /* @__PURE__ */ jsxs8("div", { className: "space-y-1 border-t border-border p-1", children: [
|
|
1571
|
-
createExtra && typed && !exactMatch ? /* @__PURE__ */
|
|
1637
|
+
createExtra && typed && !exactMatch ? /* @__PURE__ */ jsx18("div", { className: "px-1 pt-0.5", children: typeof createExtra === "function" ? createExtra(typed) : createExtra }) : null,
|
|
1572
1638
|
/* @__PURE__ */ jsxs8(
|
|
1573
1639
|
"button",
|
|
1574
1640
|
{
|
|
@@ -1577,8 +1643,8 @@ function CreatablePicker({
|
|
|
1577
1643
|
onClick: () => void create(typed),
|
|
1578
1644
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50",
|
|
1579
1645
|
children: [
|
|
1580
|
-
busy ? /* @__PURE__ */
|
|
1581
|
-
/* @__PURE__ */
|
|
1646
|
+
busy ? /* @__PURE__ */ jsx18(Loader2Icon, { className: "size-3.5 shrink-0 matrx-spin" }) : /* @__PURE__ */ jsx18(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
1647
|
+
/* @__PURE__ */ jsx18("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
|
|
1582
1648
|
]
|
|
1583
1649
|
}
|
|
1584
1650
|
),
|
|
@@ -1602,12 +1668,12 @@ function CreatablePicker({
|
|
|
1602
1668
|
},
|
|
1603
1669
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
1604
1670
|
children: [
|
|
1605
|
-
Icon2 ? /* @__PURE__ */
|
|
1606
|
-
/* @__PURE__ */
|
|
1671
|
+
Icon2 ? /* @__PURE__ */ jsx18(Icon2, { className: "size-3.5 shrink-0" }) : null,
|
|
1672
|
+
/* @__PURE__ */ jsx18("span", { className: "min-w-0 truncate", children: action.label })
|
|
1607
1673
|
]
|
|
1608
1674
|
}
|
|
1609
1675
|
),
|
|
1610
|
-
action.note ? /* @__PURE__ */
|
|
1676
|
+
action.note ? /* @__PURE__ */ jsx18("p", { className: "px-2 pb-1 text-[10px] leading-snug text-muted-foreground", children: action.note }) : null
|
|
1611
1677
|
] }, action.label);
|
|
1612
1678
|
}),
|
|
1613
1679
|
manageAction ? /* @__PURE__ */ jsxs8(
|
|
@@ -1619,16 +1685,16 @@ function CreatablePicker({
|
|
|
1619
1685
|
onClick: close,
|
|
1620
1686
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
1621
1687
|
children: [
|
|
1622
|
-
/* @__PURE__ */
|
|
1623
|
-
/* @__PURE__ */
|
|
1688
|
+
/* @__PURE__ */ jsx18(ExternalLinkIcon, { className: "size-3.5 shrink-0" }),
|
|
1689
|
+
/* @__PURE__ */ jsx18("span", { className: "min-w-0 truncate", children: manageAction.label })
|
|
1624
1690
|
]
|
|
1625
1691
|
}
|
|
1626
1692
|
) : null
|
|
1627
1693
|
] }) : null,
|
|
1628
1694
|
lockedNote ? /* @__PURE__ */ jsxs8("div", { className: "space-y-1 border-t border-border p-2", children: [
|
|
1629
1695
|
/* @__PURE__ */ jsxs8("p", { className: "flex gap-1.5 text-[11px] leading-snug text-muted-foreground", children: [
|
|
1630
|
-
/* @__PURE__ */
|
|
1631
|
-
/* @__PURE__ */
|
|
1696
|
+
/* @__PURE__ */ jsx18(LockIcon, { className: "mt-px size-3 shrink-0" }),
|
|
1697
|
+
/* @__PURE__ */ jsx18("span", { children: lockedNote })
|
|
1632
1698
|
] }),
|
|
1633
1699
|
lockedAction ? /* @__PURE__ */ jsxs8(
|
|
1634
1700
|
"button",
|
|
@@ -1640,8 +1706,8 @@ function CreatablePicker({
|
|
|
1640
1706
|
},
|
|
1641
1707
|
className: "flex w-full items-center gap-2 rounded-sm px-1 py-1 text-left text-xs font-medium text-primary transition-colors hover:bg-accent",
|
|
1642
1708
|
children: [
|
|
1643
|
-
/* @__PURE__ */
|
|
1644
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ jsx18(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
1710
|
+
/* @__PURE__ */ jsx18("span", { className: "min-w-0 truncate", children: lockedAction.label })
|
|
1645
1711
|
]
|
|
1646
1712
|
}
|
|
1647
1713
|
) : null
|
|
@@ -1656,14 +1722,14 @@ function CreatablePicker({
|
|
|
1656
1722
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
1657
1723
|
import * as VisuallyHidden2 from "@radix-ui/react-visually-hidden";
|
|
1658
1724
|
import { treeContainsComponent as treeContainsComponent3 } from "@ai-matrx/kit/react-tree";
|
|
1659
|
-
import * as
|
|
1660
|
-
import { jsx as
|
|
1725
|
+
import * as React16 from "react";
|
|
1726
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1661
1727
|
var Dialog = ({
|
|
1662
1728
|
children,
|
|
1663
1729
|
...props
|
|
1664
1730
|
}) => {
|
|
1665
1731
|
const modal = props.modal ?? true;
|
|
1666
|
-
return /* @__PURE__ */
|
|
1732
|
+
return /* @__PURE__ */ jsx19(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ jsx19(DialogPrimitive2.Root, { ...props, modal, children }) });
|
|
1667
1733
|
};
|
|
1668
1734
|
Dialog.displayName = "Dialog";
|
|
1669
1735
|
var DialogTrigger = DialogPrimitive2.Trigger;
|
|
@@ -1673,12 +1739,12 @@ var DialogPortal = ({
|
|
|
1673
1739
|
...props
|
|
1674
1740
|
}) => {
|
|
1675
1741
|
const resolved = usePortalContainer(container);
|
|
1676
|
-
return /* @__PURE__ */
|
|
1742
|
+
return /* @__PURE__ */ jsx19(DialogPrimitive2.Portal, { container: resolved ?? null, ...props });
|
|
1677
1743
|
};
|
|
1678
1744
|
DialogPortal.displayName = "DialogPortal";
|
|
1679
|
-
var DialogContainerContext =
|
|
1680
|
-
var useDialogContainer = () =>
|
|
1681
|
-
var DialogOverlay =
|
|
1745
|
+
var DialogContainerContext = React16.createContext(null);
|
|
1746
|
+
var useDialogContainer = () => React16.useContext(DialogContainerContext);
|
|
1747
|
+
var DialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
1682
1748
|
DialogPrimitive2.Overlay,
|
|
1683
1749
|
{
|
|
1684
1750
|
ref,
|
|
@@ -1686,16 +1752,17 @@ var DialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1686
1752
|
className: cn(
|
|
1687
1753
|
// Page context behind the modal stays readable; separation comes from a
|
|
1688
1754
|
// light token scrim, not a blur.
|
|
1689
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]
|
|
1755
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1756
|
+
MOTION_OVERLAY,
|
|
1690
1757
|
className
|
|
1691
1758
|
),
|
|
1692
1759
|
...props
|
|
1693
1760
|
}
|
|
1694
1761
|
));
|
|
1695
1762
|
DialogOverlay.displayName = DialogPrimitive2.Overlay.displayName;
|
|
1696
|
-
var DialogContentPrimitive =
|
|
1763
|
+
var DialogContentPrimitive = React16.forwardRef((props, ref) => {
|
|
1697
1764
|
const isModal = useRadixDialogModal();
|
|
1698
|
-
return /* @__PURE__ */
|
|
1765
|
+
return /* @__PURE__ */ jsx19(
|
|
1699
1766
|
DialogPrimitive2.Content,
|
|
1700
1767
|
{
|
|
1701
1768
|
...props,
|
|
@@ -1705,14 +1772,15 @@ var DialogContentPrimitive = React15.forwardRef((props, ref) => {
|
|
|
1705
1772
|
);
|
|
1706
1773
|
});
|
|
1707
1774
|
DialogContentPrimitive.displayName = "DialogContentPrimitive";
|
|
1708
|
-
var DIALOG_DESKTOP_CLASSES2 = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1709
|
-
var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1775
|
+
var DIALOG_DESKTOP_CLASSES2 = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg";
|
|
1776
|
+
var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
|
|
1710
1777
|
var DIALOG_MOBILE_SHEET_OVERRIDE2 = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
|
|
1711
|
-
var DialogContent =
|
|
1778
|
+
var DialogContent = React16.forwardRef(
|
|
1712
1779
|
({
|
|
1713
1780
|
className,
|
|
1714
1781
|
children,
|
|
1715
1782
|
mobileSheet = true,
|
|
1783
|
+
animated = true,
|
|
1716
1784
|
showCloseButton = true,
|
|
1717
1785
|
container,
|
|
1718
1786
|
...props
|
|
@@ -1721,10 +1789,10 @@ var DialogContent = React15.forwardRef(
|
|
|
1721
1789
|
const isModal = useRadixDialogModal();
|
|
1722
1790
|
const injectedContainer = usePortalContainer(container);
|
|
1723
1791
|
const asSheet = mobileSheet && isMobile;
|
|
1724
|
-
const [containerEl, setContainerEl] =
|
|
1792
|
+
const [containerEl, setContainerEl] = React16.useState(
|
|
1725
1793
|
null
|
|
1726
1794
|
);
|
|
1727
|
-
const mergedRef =
|
|
1795
|
+
const mergedRef = React16.useCallback(
|
|
1728
1796
|
(node) => {
|
|
1729
1797
|
setContainerEl(node);
|
|
1730
1798
|
if (typeof ref === "function") ref(node);
|
|
@@ -1736,7 +1804,7 @@ var DialogContent = React15.forwardRef(
|
|
|
1736
1804
|
const hasTitle = treeContainsComponent3(children, DialogTitle) || treeContainsComponent3(children, DialogPrimitive2.Title);
|
|
1737
1805
|
const hasDescription = treeContainsComponent3(children, DialogDescription) || treeContainsComponent3(children, DialogPrimitive2.Description);
|
|
1738
1806
|
return /* @__PURE__ */ jsxs9(DialogPortal, { container, children: [
|
|
1739
|
-
isModal ? /* @__PURE__ */
|
|
1807
|
+
isModal ? /* @__PURE__ */ jsx19(DialogOverlay, {}) : null,
|
|
1740
1808
|
/* @__PURE__ */ jsxs9(
|
|
1741
1809
|
DialogContentPrimitive,
|
|
1742
1810
|
{
|
|
@@ -1744,6 +1812,7 @@ var DialogContent = React15.forwardRef(
|
|
|
1744
1812
|
"data-slot": "dialog-content",
|
|
1745
1813
|
className: cn(
|
|
1746
1814
|
asSheet ? DIALOG_MOBILE_SHEET_CLASSES2 : DIALOG_DESKTOP_CLASSES2,
|
|
1815
|
+
animated && (asSheet ? MOTION_BOTTOM_SHEET : MOTION_DIALOG),
|
|
1747
1816
|
className,
|
|
1748
1817
|
asSheet && DIALOG_MOBILE_SHEET_OVERRIDE2,
|
|
1749
1818
|
// A non-modal dialog is the coexistence contract for content that
|
|
@@ -1755,8 +1824,8 @@ var DialogContent = React15.forwardRef(
|
|
|
1755
1824
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
1756
1825
|
...props,
|
|
1757
1826
|
children: [
|
|
1758
|
-
hasTitle ? null : /* @__PURE__ */
|
|
1759
|
-
/* @__PURE__ */
|
|
1827
|
+
hasTitle ? null : /* @__PURE__ */ jsx19(VisuallyHidden2.Root, { children: /* @__PURE__ */ jsx19(DialogPrimitive2.Title, { children: "Dialog" }) }),
|
|
1828
|
+
/* @__PURE__ */ jsx19(DialogContainerContext.Provider, { value: containerEl, children: /* @__PURE__ */ jsx19(
|
|
1760
1829
|
PortalContainerProvider,
|
|
1761
1830
|
{
|
|
1762
1831
|
container: containerEl ?? injectedContainer ?? null,
|
|
@@ -1770,8 +1839,8 @@ var DialogContent = React15.forwardRef(
|
|
|
1770
1839
|
"aria-label": "Close",
|
|
1771
1840
|
className: "absolute right-2 top-4 flex h-11 w-11 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4 lg:h-10 lg:w-10",
|
|
1772
1841
|
children: [
|
|
1773
|
-
/* @__PURE__ */
|
|
1774
|
-
/* @__PURE__ */
|
|
1842
|
+
/* @__PURE__ */ jsx19(XIcon, { className: "h-4 w-4" }),
|
|
1843
|
+
/* @__PURE__ */ jsx19("span", { className: "sr-only", children: "Close" })
|
|
1775
1844
|
]
|
|
1776
1845
|
}
|
|
1777
1846
|
) : null
|
|
@@ -1785,7 +1854,7 @@ DialogContent.displayName = DialogPrimitive2.Content.displayName;
|
|
|
1785
1854
|
var DialogHeader = ({
|
|
1786
1855
|
className,
|
|
1787
1856
|
...props
|
|
1788
|
-
}) => /* @__PURE__ */
|
|
1857
|
+
}) => /* @__PURE__ */ jsx19(
|
|
1789
1858
|
"div",
|
|
1790
1859
|
{
|
|
1791
1860
|
"data-slot": "dialog-header",
|
|
@@ -1802,7 +1871,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
1802
1871
|
var DialogFooter = ({
|
|
1803
1872
|
className,
|
|
1804
1873
|
...props
|
|
1805
|
-
}) => /* @__PURE__ */
|
|
1874
|
+
}) => /* @__PURE__ */ jsx19(
|
|
1806
1875
|
"div",
|
|
1807
1876
|
{
|
|
1808
1877
|
"data-slot": "dialog-footer",
|
|
@@ -1816,7 +1885,7 @@ var DialogFooter = ({
|
|
|
1816
1885
|
}
|
|
1817
1886
|
);
|
|
1818
1887
|
DialogFooter.displayName = "DialogFooter";
|
|
1819
|
-
var DialogTitle =
|
|
1888
|
+
var DialogTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
1820
1889
|
DialogPrimitive2.Title,
|
|
1821
1890
|
{
|
|
1822
1891
|
ref,
|
|
@@ -1826,7 +1895,7 @@ var DialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1826
1895
|
}
|
|
1827
1896
|
));
|
|
1828
1897
|
DialogTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
1829
|
-
var DialogDescription =
|
|
1898
|
+
var DialogDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
1830
1899
|
DialogPrimitive2.Description,
|
|
1831
1900
|
{
|
|
1832
1901
|
ref,
|
|
@@ -1839,8 +1908,8 @@ DialogDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
|
1839
1908
|
|
|
1840
1909
|
// src/dropdown-menu.tsx
|
|
1841
1910
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1842
|
-
import * as
|
|
1843
|
-
import { jsx as
|
|
1911
|
+
import * as React17 from "react";
|
|
1912
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1844
1913
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1845
1914
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1846
1915
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
@@ -1848,10 +1917,9 @@ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
|
1848
1917
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1849
1918
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1850
1919
|
var MENU_SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
|
|
1851
|
-
var MENU_MOTION_CLASS = "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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
1852
1920
|
var MENU_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1853
1921
|
var MENU_INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1854
|
-
var DropdownMenuSubTrigger =
|
|
1922
|
+
var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1855
1923
|
DropdownMenuPrimitive.SubTrigger,
|
|
1856
1924
|
{
|
|
1857
1925
|
ref,
|
|
@@ -1864,24 +1932,24 @@ var DropdownMenuSubTrigger = React16.forwardRef(({ className, inset, children, .
|
|
|
1864
1932
|
...props,
|
|
1865
1933
|
children: [
|
|
1866
1934
|
children,
|
|
1867
|
-
/* @__PURE__ */
|
|
1935
|
+
/* @__PURE__ */ jsx20(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
1868
1936
|
]
|
|
1869
1937
|
}
|
|
1870
1938
|
));
|
|
1871
1939
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1872
|
-
var DropdownMenuSubContent =
|
|
1940
|
+
var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
1873
1941
|
DropdownMenuPrimitive.SubContent,
|
|
1874
1942
|
{
|
|
1875
1943
|
ref,
|
|
1876
1944
|
"data-slot": "dropdown-menu-sub-content",
|
|
1877
|
-
className: cn(MENU_SURFACE_CLASS, "shadow-lg",
|
|
1945
|
+
className: cn(MENU_SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
1878
1946
|
...props
|
|
1879
1947
|
}
|
|
1880
1948
|
));
|
|
1881
1949
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1882
|
-
var DropdownMenuContent =
|
|
1950
|
+
var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
|
|
1883
1951
|
const portalContainer = usePortalContainer(container);
|
|
1884
|
-
return /* @__PURE__ */
|
|
1952
|
+
return /* @__PURE__ */ jsx20(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx20(
|
|
1885
1953
|
DropdownMenuPrimitive.Content,
|
|
1886
1954
|
{
|
|
1887
1955
|
ref,
|
|
@@ -1890,7 +1958,7 @@ var DropdownMenuContent = React16.forwardRef(({ className, sideOffset = 4, conta
|
|
|
1890
1958
|
className: cn(
|
|
1891
1959
|
MENU_SURFACE_CLASS,
|
|
1892
1960
|
"shadow-md",
|
|
1893
|
-
|
|
1961
|
+
MOTION_POPPER,
|
|
1894
1962
|
className
|
|
1895
1963
|
),
|
|
1896
1964
|
...props
|
|
@@ -1898,7 +1966,7 @@ var DropdownMenuContent = React16.forwardRef(({ className, sideOffset = 4, conta
|
|
|
1898
1966
|
) });
|
|
1899
1967
|
});
|
|
1900
1968
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1901
|
-
var DropdownMenuItem =
|
|
1969
|
+
var DropdownMenuItem = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
1902
1970
|
DropdownMenuPrimitive.Item,
|
|
1903
1971
|
{
|
|
1904
1972
|
ref,
|
|
@@ -1908,7 +1976,7 @@ var DropdownMenuItem = React16.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1908
1976
|
}
|
|
1909
1977
|
));
|
|
1910
1978
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1911
|
-
var DropdownMenuCheckboxItem =
|
|
1979
|
+
var DropdownMenuCheckboxItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1912
1980
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1913
1981
|
{
|
|
1914
1982
|
ref,
|
|
@@ -1916,13 +1984,13 @@ var DropdownMenuCheckboxItem = React16.forwardRef(({ className, children, ...pro
|
|
|
1916
1984
|
className: cn(MENU_INDICATOR_ITEM_CLASS, className),
|
|
1917
1985
|
...props,
|
|
1918
1986
|
children: [
|
|
1919
|
-
/* @__PURE__ */
|
|
1987
|
+
/* @__PURE__ */ jsx20("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx20(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx20(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
1920
1988
|
children
|
|
1921
1989
|
]
|
|
1922
1990
|
}
|
|
1923
1991
|
));
|
|
1924
1992
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1925
|
-
var DropdownMenuRadioItem =
|
|
1993
|
+
var DropdownMenuRadioItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1926
1994
|
DropdownMenuPrimitive.RadioItem,
|
|
1927
1995
|
{
|
|
1928
1996
|
ref,
|
|
@@ -1930,13 +1998,13 @@ var DropdownMenuRadioItem = React16.forwardRef(({ className, children, ...props
|
|
|
1930
1998
|
className: cn(MENU_INDICATOR_ITEM_CLASS, className),
|
|
1931
1999
|
...props,
|
|
1932
2000
|
children: [
|
|
1933
|
-
/* @__PURE__ */
|
|
2001
|
+
/* @__PURE__ */ jsx20("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx20(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx20(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1934
2002
|
children
|
|
1935
2003
|
]
|
|
1936
2004
|
}
|
|
1937
2005
|
));
|
|
1938
2006
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1939
|
-
var DropdownMenuLabel =
|
|
2007
|
+
var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
1940
2008
|
DropdownMenuPrimitive.Label,
|
|
1941
2009
|
{
|
|
1942
2010
|
ref,
|
|
@@ -1946,7 +2014,7 @@ var DropdownMenuLabel = React16.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1946
2014
|
}
|
|
1947
2015
|
));
|
|
1948
2016
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1949
|
-
var DropdownMenuSeparator =
|
|
2017
|
+
var DropdownMenuSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
1950
2018
|
DropdownMenuPrimitive.Separator,
|
|
1951
2019
|
{
|
|
1952
2020
|
ref,
|
|
@@ -1959,7 +2027,7 @@ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
|
1959
2027
|
var DropdownMenuShortcut = ({
|
|
1960
2028
|
className,
|
|
1961
2029
|
...props
|
|
1962
|
-
}) => /* @__PURE__ */
|
|
2030
|
+
}) => /* @__PURE__ */ jsx20(
|
|
1963
2031
|
"span",
|
|
1964
2032
|
{
|
|
1965
2033
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -1971,7 +2039,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
1971
2039
|
|
|
1972
2040
|
// src/editable-label.tsx
|
|
1973
2041
|
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState4 } from "react";
|
|
1974
|
-
import { jsx as
|
|
2042
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1975
2043
|
function EditableLabel({
|
|
1976
2044
|
value,
|
|
1977
2045
|
onCommit,
|
|
@@ -2079,7 +2147,7 @@ function EditableLabel({
|
|
|
2079
2147
|
]);
|
|
2080
2148
|
if (editing) {
|
|
2081
2149
|
return /* @__PURE__ */ jsxs11("span", { className: cn("relative flex min-w-0 flex-1 items-center", className), children: [
|
|
2082
|
-
/* @__PURE__ */
|
|
2150
|
+
/* @__PURE__ */ jsx21(
|
|
2083
2151
|
"input",
|
|
2084
2152
|
{
|
|
2085
2153
|
ref: inputRef,
|
|
@@ -2119,12 +2187,12 @@ function EditableLabel({
|
|
|
2119
2187
|
)
|
|
2120
2188
|
}
|
|
2121
2189
|
),
|
|
2122
|
-
busy && /* @__PURE__ */
|
|
2123
|
-
error && /* @__PURE__ */
|
|
2190
|
+
busy && /* @__PURE__ */ jsx21(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 matrx-spin text-muted-foreground" }),
|
|
2191
|
+
error && /* @__PURE__ */ jsx21("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
|
|
2124
2192
|
] });
|
|
2125
2193
|
}
|
|
2126
2194
|
if (controlled) return null;
|
|
2127
|
-
return /* @__PURE__ */
|
|
2195
|
+
return /* @__PURE__ */ jsx21(
|
|
2128
2196
|
"button",
|
|
2129
2197
|
{
|
|
2130
2198
|
type: "button",
|
|
@@ -2158,8 +2226,8 @@ function EditableLabel({
|
|
|
2158
2226
|
}
|
|
2159
2227
|
|
|
2160
2228
|
// src/input.tsx
|
|
2161
|
-
import * as
|
|
2162
|
-
import { jsx as
|
|
2229
|
+
import * as React18 from "react";
|
|
2230
|
+
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2163
2231
|
var getVariantStyles = (variant = "default") => {
|
|
2164
2232
|
const baseStyles = `flex h-10 w-full border border-border bg-background text-foreground shadow-input rounded-md px-3 py-2 text-sm file:border-0 file:bg-transparent
|
|
2165
2233
|
file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground
|
|
@@ -2187,9 +2255,9 @@ var getVariantStyles = (variant = "default") => {
|
|
|
2187
2255
|
return baseStyles;
|
|
2188
2256
|
}
|
|
2189
2257
|
};
|
|
2190
|
-
var Input =
|
|
2258
|
+
var Input = React18.forwardRef(
|
|
2191
2259
|
({ className, type, variant = "default", ...props }, ref) => {
|
|
2192
|
-
return /* @__PURE__ */
|
|
2260
|
+
return /* @__PURE__ */ jsx22(
|
|
2193
2261
|
"input",
|
|
2194
2262
|
{
|
|
2195
2263
|
type,
|
|
@@ -2201,7 +2269,7 @@ var Input = React17.forwardRef(
|
|
|
2201
2269
|
}
|
|
2202
2270
|
);
|
|
2203
2271
|
Input.displayName = "Input";
|
|
2204
|
-
var EnterInput =
|
|
2272
|
+
var EnterInput = React18.forwardRef(
|
|
2205
2273
|
({ onEnter, ...props }, ref) => {
|
|
2206
2274
|
const handleKeyDown = (e) => {
|
|
2207
2275
|
if (e.key === "Enter" && onEnter) {
|
|
@@ -2209,7 +2277,7 @@ var EnterInput = React17.forwardRef(
|
|
|
2209
2277
|
onEnter();
|
|
2210
2278
|
}
|
|
2211
2279
|
};
|
|
2212
|
-
return /* @__PURE__ */
|
|
2280
|
+
return /* @__PURE__ */ jsx22(
|
|
2213
2281
|
Input,
|
|
2214
2282
|
{
|
|
2215
2283
|
...props,
|
|
@@ -2225,11 +2293,11 @@ var EnterInput = React17.forwardRef(
|
|
|
2225
2293
|
}
|
|
2226
2294
|
);
|
|
2227
2295
|
EnterInput.displayName = "EnterInput";
|
|
2228
|
-
var BasicInput =
|
|
2296
|
+
var BasicInput = React18.forwardRef(
|
|
2229
2297
|
// `variant` is accepted (prop-compatible with Input) but intentionally
|
|
2230
2298
|
// unused — and destructured so it never leaks onto the DOM element.
|
|
2231
2299
|
({ className, type, variant: _variant = "default", ...props }, ref) => {
|
|
2232
|
-
return /* @__PURE__ */
|
|
2300
|
+
return /* @__PURE__ */ jsx22(
|
|
2233
2301
|
"input",
|
|
2234
2302
|
{
|
|
2235
2303
|
type,
|
|
@@ -2244,10 +2312,10 @@ var BasicInput = React17.forwardRef(
|
|
|
2244
2312
|
}
|
|
2245
2313
|
);
|
|
2246
2314
|
BasicInput.displayName = "BasicInput";
|
|
2247
|
-
var InputWithPrefix =
|
|
2315
|
+
var InputWithPrefix = React18.forwardRef(({ prefix, className, wrapperClassName, ...props }, ref) => {
|
|
2248
2316
|
return /* @__PURE__ */ jsxs12("div", { className: cn("relative", wrapperClassName), children: [
|
|
2249
|
-
prefix && /* @__PURE__ */
|
|
2250
|
-
/* @__PURE__ */
|
|
2317
|
+
prefix && /* @__PURE__ */ jsx22("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: prefix }),
|
|
2318
|
+
/* @__PURE__ */ jsx22(
|
|
2251
2319
|
Input,
|
|
2252
2320
|
{
|
|
2253
2321
|
ref,
|
|
@@ -2261,9 +2329,9 @@ InputWithPrefix.displayName = "InputWithPrefix";
|
|
|
2261
2329
|
|
|
2262
2330
|
// src/label.tsx
|
|
2263
2331
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2264
|
-
import * as
|
|
2265
|
-
import { jsx as
|
|
2266
|
-
var Label3 =
|
|
2332
|
+
import * as React19 from "react";
|
|
2333
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2334
|
+
var Label3 = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
2267
2335
|
LabelPrimitive.Root,
|
|
2268
2336
|
{
|
|
2269
2337
|
ref,
|
|
@@ -2278,7 +2346,7 @@ Label3.displayName = LabelPrimitive.Root.displayName;
|
|
|
2278
2346
|
|
|
2279
2347
|
// src/overflow-toolbar.tsx
|
|
2280
2348
|
import { useLayoutEffect, useMemo, useRef as useRef3, useState as useState5 } from "react";
|
|
2281
|
-
import { Fragment, jsx as
|
|
2349
|
+
import { Fragment, jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2282
2350
|
var GAP_PX = 6;
|
|
2283
2351
|
var TONE = {
|
|
2284
2352
|
default: "border border-border bg-background hover:bg-accent text-foreground",
|
|
@@ -2301,15 +2369,15 @@ function ToolbarButton({
|
|
|
2301
2369
|
TONE[tone]
|
|
2302
2370
|
);
|
|
2303
2371
|
const inner = /* @__PURE__ */ jsxs13(Fragment, { children: [
|
|
2304
|
-
/* @__PURE__ */
|
|
2372
|
+
/* @__PURE__ */ jsx24(
|
|
2305
2373
|
Icon2,
|
|
2306
2374
|
{
|
|
2307
|
-
className: cn("w-3.5 h-3.5 shrink-0", action.running && "
|
|
2375
|
+
className: cn("w-3.5 h-3.5 shrink-0", action.running && "matrx-spin")
|
|
2308
2376
|
}
|
|
2309
2377
|
),
|
|
2310
|
-
showLabel && /* @__PURE__ */
|
|
2378
|
+
showLabel && /* @__PURE__ */ jsx24("span", { children: text })
|
|
2311
2379
|
] });
|
|
2312
|
-
const control = action.href && !action.disabled ? /* @__PURE__ */
|
|
2380
|
+
const control = action.href && !action.disabled ? /* @__PURE__ */ jsx24(
|
|
2313
2381
|
"a",
|
|
2314
2382
|
{
|
|
2315
2383
|
href: action.href,
|
|
@@ -2319,7 +2387,7 @@ function ToolbarButton({
|
|
|
2319
2387
|
"aria-label": action.label,
|
|
2320
2388
|
children: inner
|
|
2321
2389
|
}
|
|
2322
|
-
) : /* @__PURE__ */
|
|
2390
|
+
) : /* @__PURE__ */ jsx24(
|
|
2323
2391
|
"button",
|
|
2324
2392
|
{
|
|
2325
2393
|
type: "button",
|
|
@@ -2331,12 +2399,12 @@ function ToolbarButton({
|
|
|
2331
2399
|
}
|
|
2332
2400
|
);
|
|
2333
2401
|
if (enableTooltip && action.hideLabel && renderTooltip) {
|
|
2334
|
-
return /* @__PURE__ */
|
|
2402
|
+
return /* @__PURE__ */ jsx24(Fragment, { children: renderTooltip(control, action.label) });
|
|
2335
2403
|
}
|
|
2336
2404
|
return control;
|
|
2337
2405
|
}
|
|
2338
2406
|
function OverflowTrigger({ ariaLabel }) {
|
|
2339
|
-
return /* @__PURE__ */
|
|
2407
|
+
return /* @__PURE__ */ jsx24(
|
|
2340
2408
|
"button",
|
|
2341
2409
|
{
|
|
2342
2410
|
type: "button",
|
|
@@ -2347,7 +2415,7 @@ function OverflowTrigger({ ariaLabel }) {
|
|
|
2347
2415
|
"inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors",
|
|
2348
2416
|
"border border-border bg-background hover:bg-accent text-foreground"
|
|
2349
2417
|
),
|
|
2350
|
-
children: /* @__PURE__ */
|
|
2418
|
+
children: /* @__PURE__ */ jsx24(MoreHorizontalIcon, { className: "w-3.5 h-3.5" })
|
|
2351
2419
|
}
|
|
2352
2420
|
);
|
|
2353
2421
|
}
|
|
@@ -2415,14 +2483,14 @@ function OverflowToolbar({
|
|
|
2415
2483
|
"aria-hidden": true,
|
|
2416
2484
|
className: "pointer-events-none absolute left-0 top-0 flex items-center gap-1.5 opacity-0",
|
|
2417
2485
|
children: [
|
|
2418
|
-
visibleActions.map((a) => /* @__PURE__ */
|
|
2419
|
-
/* @__PURE__ */
|
|
2486
|
+
visibleActions.map((a) => /* @__PURE__ */ jsx24(ToolbarButton, { action: a }, a.id)),
|
|
2487
|
+
/* @__PURE__ */ jsx24(OverflowTrigger, { ariaLabel: overflowAriaLabel })
|
|
2420
2488
|
]
|
|
2421
2489
|
}
|
|
2422
2490
|
),
|
|
2423
2491
|
/* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-end gap-1.5", children: [
|
|
2424
|
-
leading != null && /* @__PURE__ */
|
|
2425
|
-
shown.map((a) => /* @__PURE__ */
|
|
2492
|
+
leading != null && /* @__PURE__ */ jsx24("span", { ref: leadingRef, className: "shrink-0", children: leading }),
|
|
2493
|
+
shown.map((a) => /* @__PURE__ */ jsx24(
|
|
2426
2494
|
ToolbarButton,
|
|
2427
2495
|
{
|
|
2428
2496
|
action: a,
|
|
@@ -2433,7 +2501,7 @@ function OverflowToolbar({
|
|
|
2433
2501
|
)),
|
|
2434
2502
|
hidden.length > 0 && renderOverflowMenu({
|
|
2435
2503
|
actions: hidden,
|
|
2436
|
-
trigger: /* @__PURE__ */
|
|
2504
|
+
trigger: /* @__PURE__ */ jsx24(OverflowTrigger, { ariaLabel: overflowAriaLabel })
|
|
2437
2505
|
})
|
|
2438
2506
|
] })
|
|
2439
2507
|
] });
|
|
@@ -2441,20 +2509,20 @@ function OverflowToolbar({
|
|
|
2441
2509
|
|
|
2442
2510
|
// src/progress.tsx
|
|
2443
2511
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
2444
|
-
import * as
|
|
2445
|
-
import { jsx as
|
|
2512
|
+
import * as React21 from "react";
|
|
2513
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2446
2514
|
var PROGRESS_TONES = {
|
|
2447
2515
|
default: "bg-primary",
|
|
2448
2516
|
success: "bg-success",
|
|
2449
2517
|
warning: "bg-warning",
|
|
2450
2518
|
destructive: "bg-destructive"
|
|
2451
2519
|
};
|
|
2452
|
-
var Progress =
|
|
2520
|
+
var Progress = React21.forwardRef(({ className, tone = "default", indicatorClassName, ...props }, ref) => {
|
|
2453
2521
|
const { value, max } = props;
|
|
2454
2522
|
const ceiling = max ?? 100;
|
|
2455
2523
|
const isIndeterminate = value === null || value === void 0;
|
|
2456
2524
|
const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / ceiling * 100));
|
|
2457
|
-
return /* @__PURE__ */
|
|
2525
|
+
return /* @__PURE__ */ jsx25(
|
|
2458
2526
|
ProgressPrimitive.Root,
|
|
2459
2527
|
{
|
|
2460
2528
|
ref,
|
|
@@ -2464,7 +2532,7 @@ var Progress = React20.forwardRef(({ className, tone = "default", indicatorClass
|
|
|
2464
2532
|
className
|
|
2465
2533
|
),
|
|
2466
2534
|
...props,
|
|
2467
|
-
children: /* @__PURE__ */
|
|
2535
|
+
children: /* @__PURE__ */ jsx25(
|
|
2468
2536
|
ProgressPrimitive.Indicator,
|
|
2469
2537
|
{
|
|
2470
2538
|
"data-slot": "progress-indicator",
|
|
@@ -2484,9 +2552,9 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
|
2484
2552
|
|
|
2485
2553
|
// src/scroll-area.tsx
|
|
2486
2554
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
2487
|
-
import * as
|
|
2488
|
-
import { jsx as
|
|
2489
|
-
var ScrollArea =
|
|
2555
|
+
import * as React22 from "react";
|
|
2556
|
+
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2557
|
+
var ScrollArea = React22.forwardRef(
|
|
2490
2558
|
({
|
|
2491
2559
|
className,
|
|
2492
2560
|
children,
|
|
@@ -2503,7 +2571,7 @@ var ScrollArea = React21.forwardRef(
|
|
|
2503
2571
|
className: cn("relative overflow-hidden", className),
|
|
2504
2572
|
...props,
|
|
2505
2573
|
children: [
|
|
2506
|
-
/* @__PURE__ */
|
|
2574
|
+
/* @__PURE__ */ jsx26(
|
|
2507
2575
|
ScrollAreaPrimitive.Viewport,
|
|
2508
2576
|
{
|
|
2509
2577
|
ref: viewportRef,
|
|
@@ -2512,14 +2580,14 @@ var ScrollArea = React21.forwardRef(
|
|
|
2512
2580
|
children
|
|
2513
2581
|
}
|
|
2514
2582
|
),
|
|
2515
|
-
/* @__PURE__ */
|
|
2516
|
-
/* @__PURE__ */
|
|
2583
|
+
/* @__PURE__ */ jsx26(ScrollBar, { orientation, className: scrollBarClassName }),
|
|
2584
|
+
/* @__PURE__ */ jsx26(ScrollAreaPrimitive.Corner, {})
|
|
2517
2585
|
]
|
|
2518
2586
|
}
|
|
2519
2587
|
)
|
|
2520
2588
|
);
|
|
2521
2589
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2522
|
-
var ScrollBar =
|
|
2590
|
+
var ScrollBar = React22.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
2523
2591
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2524
2592
|
{
|
|
2525
2593
|
ref,
|
|
@@ -2532,7 +2600,7 @@ var ScrollBar = React21.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
2532
2600
|
className
|
|
2533
2601
|
),
|
|
2534
2602
|
...props,
|
|
2535
|
-
children: /* @__PURE__ */
|
|
2603
|
+
children: /* @__PURE__ */ jsx26(
|
|
2536
2604
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
2537
2605
|
{
|
|
2538
2606
|
"data-slot": "scroll-area-thumb",
|
|
@@ -2544,7 +2612,7 @@ var ScrollBar = React21.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
2544
2612
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2545
2613
|
|
|
2546
2614
|
// src/score-ring.tsx
|
|
2547
|
-
import { jsx as
|
|
2615
|
+
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2548
2616
|
var DEFAULT_SCORE_THRESHOLDS = {
|
|
2549
2617
|
good: 75,
|
|
2550
2618
|
warning: 50
|
|
@@ -2587,7 +2655,7 @@ function ScoreRing({
|
|
|
2587
2655
|
"aria-label": `${label ?? "Score"}: ${pct === null ? "not available" : `${pct} out of 100`}`,
|
|
2588
2656
|
children: [
|
|
2589
2657
|
/* @__PURE__ */ jsxs15("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", children: [
|
|
2590
|
-
/* @__PURE__ */
|
|
2658
|
+
/* @__PURE__ */ jsx27(
|
|
2591
2659
|
"circle",
|
|
2592
2660
|
{
|
|
2593
2661
|
cx: "50",
|
|
@@ -2598,7 +2666,7 @@ function ScoreRing({
|
|
|
2598
2666
|
fill: "none"
|
|
2599
2667
|
}
|
|
2600
2668
|
),
|
|
2601
|
-
pct !== null ? /* @__PURE__ */
|
|
2669
|
+
pct !== null ? /* @__PURE__ */ jsx27(
|
|
2602
2670
|
"circle",
|
|
2603
2671
|
{
|
|
2604
2672
|
cx: "50",
|
|
@@ -2618,7 +2686,7 @@ function ScoreRing({
|
|
|
2618
2686
|
) : null
|
|
2619
2687
|
] }),
|
|
2620
2688
|
/* @__PURE__ */ jsxs15("div", { className: "absolute flex flex-col items-center justify-center", children: [
|
|
2621
|
-
/* @__PURE__ */
|
|
2689
|
+
/* @__PURE__ */ jsx27(
|
|
2622
2690
|
"span",
|
|
2623
2691
|
{
|
|
2624
2692
|
className: cn(
|
|
@@ -2628,7 +2696,7 @@ function ScoreRing({
|
|
|
2628
2696
|
children: pct === null ? "\u2014" : `${pct}${suffix}`
|
|
2629
2697
|
}
|
|
2630
2698
|
),
|
|
2631
|
-
label ? /* @__PURE__ */
|
|
2699
|
+
label ? /* @__PURE__ */ jsx27("span", { className: "max-w-[74px] truncate text-[9px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }) : null
|
|
2632
2700
|
] })
|
|
2633
2701
|
]
|
|
2634
2702
|
}
|
|
@@ -2636,7 +2704,7 @@ function ScoreRing({
|
|
|
2636
2704
|
}
|
|
2637
2705
|
|
|
2638
2706
|
// src/segmented-control.tsx
|
|
2639
|
-
import { jsx as
|
|
2707
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2640
2708
|
function SegmentedControl({
|
|
2641
2709
|
value,
|
|
2642
2710
|
onValueChange,
|
|
@@ -2651,7 +2719,7 @@ function SegmentedControl({
|
|
|
2651
2719
|
md: "h-9 text-sm",
|
|
2652
2720
|
lg: "h-10 text-base"
|
|
2653
2721
|
};
|
|
2654
|
-
return /* @__PURE__ */
|
|
2722
|
+
return /* @__PURE__ */ jsx28(
|
|
2655
2723
|
"div",
|
|
2656
2724
|
{
|
|
2657
2725
|
className: cn(
|
|
@@ -2662,7 +2730,7 @@ function SegmentedControl({
|
|
|
2662
2730
|
role: "tablist",
|
|
2663
2731
|
children: data.map((option) => {
|
|
2664
2732
|
const isActive = value === option.value;
|
|
2665
|
-
return /* @__PURE__ */
|
|
2733
|
+
return /* @__PURE__ */ jsx28(
|
|
2666
2734
|
"button",
|
|
2667
2735
|
{
|
|
2668
2736
|
type: "button",
|
|
@@ -2689,8 +2757,8 @@ function SegmentedControl({
|
|
|
2689
2757
|
// src/select.tsx
|
|
2690
2758
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2691
2759
|
import { cva as cva4 } from "class-variance-authority";
|
|
2692
|
-
import * as
|
|
2693
|
-
import { jsx as
|
|
2760
|
+
import * as React23 from "react";
|
|
2761
|
+
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2694
2762
|
var Select = SelectPrimitive.Root;
|
|
2695
2763
|
var SelectGroup = SelectPrimitive.Group;
|
|
2696
2764
|
var SelectValue = SelectPrimitive.Value;
|
|
@@ -2709,7 +2777,7 @@ var selectTriggerVariants = cva4(
|
|
|
2709
2777
|
}
|
|
2710
2778
|
}
|
|
2711
2779
|
);
|
|
2712
|
-
var SelectTrigger =
|
|
2780
|
+
var SelectTrigger = React23.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ jsxs16(
|
|
2713
2781
|
SelectPrimitive.Trigger,
|
|
2714
2782
|
{
|
|
2715
2783
|
ref,
|
|
@@ -2717,12 +2785,12 @@ var SelectTrigger = React22.forwardRef(({ className, children, hideArrow = false
|
|
|
2717
2785
|
...props,
|
|
2718
2786
|
children: [
|
|
2719
2787
|
children,
|
|
2720
|
-
!hideArrow && /* @__PURE__ */
|
|
2788
|
+
!hideArrow && /* @__PURE__ */ jsx29(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx29(RadixChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })
|
|
2721
2789
|
]
|
|
2722
2790
|
}
|
|
2723
2791
|
));
|
|
2724
2792
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2725
|
-
var SelectScrollUpButton =
|
|
2793
|
+
var SelectScrollUpButton = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2726
2794
|
SelectPrimitive.ScrollUpButton,
|
|
2727
2795
|
{
|
|
2728
2796
|
ref,
|
|
@@ -2731,11 +2799,11 @@ var SelectScrollUpButton = React22.forwardRef(({ className, ...props }, ref) =>
|
|
|
2731
2799
|
className
|
|
2732
2800
|
),
|
|
2733
2801
|
...props,
|
|
2734
|
-
children: /* @__PURE__ */
|
|
2802
|
+
children: /* @__PURE__ */ jsx29(RadixChevronUpIcon, {})
|
|
2735
2803
|
}
|
|
2736
2804
|
));
|
|
2737
2805
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2738
|
-
var SelectScrollDownButton =
|
|
2806
|
+
var SelectScrollDownButton = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2739
2807
|
SelectPrimitive.ScrollDownButton,
|
|
2740
2808
|
{
|
|
2741
2809
|
ref,
|
|
@@ -2744,42 +2812,52 @@ var SelectScrollDownButton = React22.forwardRef(({ className, ...props }, ref) =
|
|
|
2744
2812
|
className
|
|
2745
2813
|
),
|
|
2746
2814
|
...props,
|
|
2747
|
-
children: /* @__PURE__ */
|
|
2815
|
+
children: /* @__PURE__ */ jsx29(RadixChevronDownIcon, {})
|
|
2748
2816
|
}
|
|
2749
2817
|
));
|
|
2750
2818
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2751
|
-
var SelectContent =
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
"p-0.5 overflow-y-auto",
|
|
2771
|
-
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
|
|
2772
|
-
),
|
|
2773
|
-
children
|
|
2774
|
-
}
|
|
2819
|
+
var SelectContent = React23.forwardRef(
|
|
2820
|
+
({
|
|
2821
|
+
className,
|
|
2822
|
+
children,
|
|
2823
|
+
position = "popper",
|
|
2824
|
+
container,
|
|
2825
|
+
animated = true,
|
|
2826
|
+
...props
|
|
2827
|
+
}, ref) => {
|
|
2828
|
+
const portalContainer = usePortalContainer(container);
|
|
2829
|
+
return /* @__PURE__ */ jsx29(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs16(
|
|
2830
|
+
SelectPrimitive.Content,
|
|
2831
|
+
{
|
|
2832
|
+
ref,
|
|
2833
|
+
className: cn(
|
|
2834
|
+
"relative z-[10001] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
2835
|
+
animated && MOTION_POPPER,
|
|
2836
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
2837
|
+
className
|
|
2775
2838
|
),
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2839
|
+
position,
|
|
2840
|
+
...props,
|
|
2841
|
+
children: [
|
|
2842
|
+
/* @__PURE__ */ jsx29(SelectScrollUpButton, {}),
|
|
2843
|
+
/* @__PURE__ */ jsx29(
|
|
2844
|
+
SelectPrimitive.Viewport,
|
|
2845
|
+
{
|
|
2846
|
+
className: cn(
|
|
2847
|
+
"p-0.5 overflow-y-auto",
|
|
2848
|
+
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
|
|
2849
|
+
),
|
|
2850
|
+
children
|
|
2851
|
+
}
|
|
2852
|
+
),
|
|
2853
|
+
/* @__PURE__ */ jsx29(SelectScrollDownButton, {})
|
|
2854
|
+
]
|
|
2855
|
+
}
|
|
2856
|
+
) });
|
|
2857
|
+
}
|
|
2858
|
+
);
|
|
2781
2859
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2782
|
-
var SelectLabel =
|
|
2860
|
+
var SelectLabel = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2783
2861
|
SelectPrimitive.Label,
|
|
2784
2862
|
{
|
|
2785
2863
|
ref,
|
|
@@ -2788,7 +2866,7 @@ var SelectLabel = React22.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2788
2866
|
}
|
|
2789
2867
|
));
|
|
2790
2868
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2791
|
-
var SelectItem =
|
|
2869
|
+
var SelectItem = React23.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ jsxs16(
|
|
2792
2870
|
SelectPrimitive.Item,
|
|
2793
2871
|
{
|
|
2794
2872
|
ref,
|
|
@@ -2799,14 +2877,14 @@ var SelectItem = React22.forwardRef(({ className, children, description, ...prop
|
|
|
2799
2877
|
),
|
|
2800
2878
|
...props,
|
|
2801
2879
|
children: [
|
|
2802
|
-
/* @__PURE__ */
|
|
2803
|
-
/* @__PURE__ */
|
|
2804
|
-
description ? /* @__PURE__ */
|
|
2880
|
+
/* @__PURE__ */ jsx29("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx29(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx29(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
2881
|
+
/* @__PURE__ */ jsx29(SelectPrimitive.ItemText, { children }),
|
|
2882
|
+
description ? /* @__PURE__ */ jsx29("span", { className: "block text-xs leading-snug text-muted-foreground", children: description }) : null
|
|
2805
2883
|
]
|
|
2806
2884
|
}
|
|
2807
2885
|
));
|
|
2808
2886
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2809
|
-
var SelectSeparator =
|
|
2887
|
+
var SelectSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2810
2888
|
SelectPrimitive.Separator,
|
|
2811
2889
|
{
|
|
2812
2890
|
ref,
|
|
@@ -2818,9 +2896,9 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
2818
2896
|
|
|
2819
2897
|
// src/separator.tsx
|
|
2820
2898
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
2821
|
-
import * as
|
|
2822
|
-
import { jsx as
|
|
2823
|
-
var Separator4 =
|
|
2899
|
+
import * as React24 from "react";
|
|
2900
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2901
|
+
var Separator4 = React24.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
2824
2902
|
SeparatorPrimitive.Root,
|
|
2825
2903
|
{
|
|
2826
2904
|
ref,
|
|
@@ -2840,11 +2918,11 @@ Separator4.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
2840
2918
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
2841
2919
|
import { treeContainsComponent as treeContainsComponent4 } from "@ai-matrx/kit/react-tree";
|
|
2842
2920
|
import { cva as cva5 } from "class-variance-authority";
|
|
2843
|
-
import * as
|
|
2844
|
-
import { jsx as
|
|
2845
|
-
var SheetContentBase =
|
|
2921
|
+
import * as React25 from "react";
|
|
2922
|
+
import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2923
|
+
var SheetContentBase = React25.forwardRef(({ ...props }, ref) => {
|
|
2846
2924
|
const isModal = useRadixDialogModal();
|
|
2847
|
-
return /* @__PURE__ */
|
|
2925
|
+
return /* @__PURE__ */ jsx31(
|
|
2848
2926
|
SheetPrimitive.Content,
|
|
2849
2927
|
{
|
|
2850
2928
|
...props,
|
|
@@ -2854,19 +2932,20 @@ var SheetContentBase = React24.forwardRef(({ ...props }, ref) => {
|
|
|
2854
2932
|
);
|
|
2855
2933
|
});
|
|
2856
2934
|
SheetContentBase.displayName = "SheetContentBase";
|
|
2857
|
-
var Sheet =
|
|
2935
|
+
var Sheet = React25.forwardRef(({ children, ...props }, _ref) => {
|
|
2858
2936
|
const modal = props.modal ?? true;
|
|
2859
|
-
return /* @__PURE__ */
|
|
2937
|
+
return /* @__PURE__ */ jsx31(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ jsx31(SheetPrimitive.Root, { ...props, modal, children }) });
|
|
2860
2938
|
});
|
|
2861
2939
|
Sheet.displayName = "Sheet";
|
|
2862
2940
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
2863
2941
|
var SheetClose = SheetPrimitive.Close;
|
|
2864
2942
|
var SheetPortal = SheetPrimitive.Portal;
|
|
2865
|
-
var SheetOverlay =
|
|
2943
|
+
var SheetOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2866
2944
|
SheetPrimitive.Overlay,
|
|
2867
2945
|
{
|
|
2868
2946
|
className: cn(
|
|
2869
|
-
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]
|
|
2947
|
+
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]",
|
|
2948
|
+
MOTION_OVERLAY,
|
|
2870
2949
|
className
|
|
2871
2950
|
),
|
|
2872
2951
|
...props,
|
|
@@ -2875,15 +2954,22 @@ var SheetOverlay = React24.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2875
2954
|
));
|
|
2876
2955
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
2877
2956
|
var sheetVariants = cva5(
|
|
2878
|
-
|
|
2957
|
+
// Motion is NOT stated here (0.10.0). The `data-[state=*]:animate-in/out`
|
|
2958
|
+
// + `slide-in-from-*` pairs this base and its side variants used to carry
|
|
2959
|
+
// came from the `tailwindcss-animate` HOST plugin, which three of four
|
|
2960
|
+
// consumers never loaded — every sheet in them slammed open with no
|
|
2961
|
+
// animation and no error. `SheetContent` now applies the package-owned
|
|
2962
|
+
// `MOTION_SHEET[side]` class alongside these variants; the keyframes,
|
|
2963
|
+
// durations and reduced-motion handling all live in `styles.css`.
|
|
2964
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg",
|
|
2879
2965
|
{
|
|
2880
2966
|
variants: {
|
|
2881
2967
|
side: {
|
|
2882
|
-
top: "inset-x-0 top-0 border-b
|
|
2883
|
-
bottom: "inset-x-0 bottom-0 border-t
|
|
2884
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r
|
|
2885
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l
|
|
2886
|
-
center: "inset-0 m-auto max-h-full max-w-full border rounded-lg
|
|
2968
|
+
top: "inset-x-0 top-0 border-b",
|
|
2969
|
+
bottom: "inset-x-0 bottom-0 border-t",
|
|
2970
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
2971
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
2972
|
+
center: "inset-0 m-auto max-h-full max-w-full border rounded-lg"
|
|
2887
2973
|
}
|
|
2888
2974
|
},
|
|
2889
2975
|
defaultVariants: {
|
|
@@ -2891,7 +2977,7 @@ var sheetVariants = cva5(
|
|
|
2891
2977
|
}
|
|
2892
2978
|
}
|
|
2893
2979
|
);
|
|
2894
|
-
var SheetDescription =
|
|
2980
|
+
var SheetDescription = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2895
2981
|
SheetPrimitive.Description,
|
|
2896
2982
|
{
|
|
2897
2983
|
ref,
|
|
@@ -2900,7 +2986,7 @@ var SheetDescription = React24.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2900
2986
|
}
|
|
2901
2987
|
));
|
|
2902
2988
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
2903
|
-
var SheetContent =
|
|
2989
|
+
var SheetContent = React25.forwardRef(
|
|
2904
2990
|
({
|
|
2905
2991
|
side = "right",
|
|
2906
2992
|
className,
|
|
@@ -2908,22 +2994,27 @@ var SheetContent = React24.forwardRef(
|
|
|
2908
2994
|
hideCloseButton = false,
|
|
2909
2995
|
hideOverlay = false,
|
|
2910
2996
|
overlayClassName,
|
|
2997
|
+
animated = true,
|
|
2911
2998
|
...props
|
|
2912
2999
|
}, ref) => {
|
|
2913
3000
|
const hasDescription = treeContainsComponent4(children, SheetDescription) || treeContainsComponent4(children, SheetPrimitive.Description);
|
|
2914
3001
|
return /* @__PURE__ */ jsxs17(SheetPortal, { children: [
|
|
2915
|
-
!hideOverlay && /* @__PURE__ */
|
|
3002
|
+
!hideOverlay && /* @__PURE__ */ jsx31(SheetOverlay, { className: overlayClassName }),
|
|
2916
3003
|
/* @__PURE__ */ jsxs17(
|
|
2917
3004
|
SheetContentBase,
|
|
2918
3005
|
{
|
|
2919
3006
|
ref,
|
|
2920
|
-
className: cn(
|
|
3007
|
+
className: cn(
|
|
3008
|
+
sheetVariants({ side }),
|
|
3009
|
+
animated && MOTION_SHEET[side ?? "right"],
|
|
3010
|
+
className
|
|
3011
|
+
),
|
|
2921
3012
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
2922
3013
|
...props,
|
|
2923
3014
|
children: [
|
|
2924
3015
|
!hideCloseButton && /* @__PURE__ */ jsxs17(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
2925
|
-
/* @__PURE__ */
|
|
2926
|
-
/* @__PURE__ */
|
|
3016
|
+
/* @__PURE__ */ jsx31(Cross2Icon, { className: "h-4 w-4" }),
|
|
3017
|
+
/* @__PURE__ */ jsx31("span", { className: "sr-only", children: "Close" })
|
|
2927
3018
|
] }),
|
|
2928
3019
|
children
|
|
2929
3020
|
]
|
|
@@ -2936,7 +3027,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
2936
3027
|
var SheetHeader = ({
|
|
2937
3028
|
className,
|
|
2938
3029
|
...props
|
|
2939
|
-
}) => /* @__PURE__ */
|
|
3030
|
+
}) => /* @__PURE__ */ jsx31(
|
|
2940
3031
|
"div",
|
|
2941
3032
|
{
|
|
2942
3033
|
className: cn(
|
|
@@ -2950,7 +3041,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
2950
3041
|
var SheetFooter = ({
|
|
2951
3042
|
className,
|
|
2952
3043
|
...props
|
|
2953
|
-
}) => /* @__PURE__ */
|
|
3044
|
+
}) => /* @__PURE__ */ jsx31(
|
|
2954
3045
|
"div",
|
|
2955
3046
|
{
|
|
2956
3047
|
className: cn(
|
|
@@ -2961,7 +3052,7 @@ var SheetFooter = ({
|
|
|
2961
3052
|
}
|
|
2962
3053
|
);
|
|
2963
3054
|
SheetFooter.displayName = "SheetFooter";
|
|
2964
|
-
var SheetTitle =
|
|
3055
|
+
var SheetTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2965
3056
|
SheetPrimitive.Title,
|
|
2966
3057
|
{
|
|
2967
3058
|
ref,
|
|
@@ -2972,15 +3063,17 @@ var SheetTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2972
3063
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
2973
3064
|
|
|
2974
3065
|
// src/skeleton.tsx
|
|
2975
|
-
import { jsx as
|
|
2976
|
-
function Skeleton({
|
|
2977
|
-
|
|
2978
|
-
...props
|
|
2979
|
-
}) {
|
|
2980
|
-
return /* @__PURE__ */ jsx31(
|
|
3066
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3067
|
+
function Skeleton({ className, animated = true, ...props }) {
|
|
3068
|
+
return /* @__PURE__ */ jsx32(
|
|
2981
3069
|
"div",
|
|
2982
3070
|
{
|
|
2983
|
-
|
|
3071
|
+
"data-slot": "skeleton",
|
|
3072
|
+
className: cn(
|
|
3073
|
+
"rounded-md bg-primary/10",
|
|
3074
|
+
animated && MOTION_PULSE,
|
|
3075
|
+
className
|
|
3076
|
+
),
|
|
2984
3077
|
...props
|
|
2985
3078
|
}
|
|
2986
3079
|
);
|
|
@@ -2988,8 +3081,8 @@ function Skeleton({
|
|
|
2988
3081
|
|
|
2989
3082
|
// src/switch.tsx
|
|
2990
3083
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
2991
|
-
import * as
|
|
2992
|
-
import { jsx as
|
|
3084
|
+
import * as React26 from "react";
|
|
3085
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2993
3086
|
var SWITCH_SIZES = {
|
|
2994
3087
|
sm: {
|
|
2995
3088
|
root: "h-4 w-9 border-border data-[state=unchecked]:bg-input",
|
|
@@ -3000,7 +3093,7 @@ var SWITCH_SIZES = {
|
|
|
3000
3093
|
thumb: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
3001
3094
|
}
|
|
3002
3095
|
};
|
|
3003
|
-
var Switch =
|
|
3096
|
+
var Switch = React26.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
3004
3097
|
SwitchPrimitives.Root,
|
|
3005
3098
|
{
|
|
3006
3099
|
ref,
|
|
@@ -3011,7 +3104,7 @@ var Switch = React25.forwardRef(({ className, size = "md", ...props }, ref) => /
|
|
|
3011
3104
|
className
|
|
3012
3105
|
),
|
|
3013
3106
|
...props,
|
|
3014
|
-
children: /* @__PURE__ */
|
|
3107
|
+
children: /* @__PURE__ */ jsx33(
|
|
3015
3108
|
SwitchPrimitives.Thumb,
|
|
3016
3109
|
{
|
|
3017
3110
|
"data-slot": "switch-thumb",
|
|
@@ -3027,7 +3120,7 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
3027
3120
|
|
|
3028
3121
|
// src/tabbed-bottom-sheet.tsx
|
|
3029
3122
|
import { useState as useState6 } from "react";
|
|
3030
|
-
import { jsx as
|
|
3123
|
+
import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3031
3124
|
function TabbedBottomSheet({
|
|
3032
3125
|
open,
|
|
3033
3126
|
onOpenChange,
|
|
@@ -3041,7 +3134,7 @@ function TabbedBottomSheet({
|
|
|
3041
3134
|
if (open) setSelectedTabId(null);
|
|
3042
3135
|
}
|
|
3043
3136
|
const selectedTab = selectedTabId ? tabs.find((tab) => tab.id === selectedTabId) : null;
|
|
3044
|
-
return /* @__PURE__ */
|
|
3137
|
+
return /* @__PURE__ */ jsx34(
|
|
3045
3138
|
BottomSheet,
|
|
3046
3139
|
{
|
|
3047
3140
|
open,
|
|
@@ -3049,7 +3142,7 @@ function TabbedBottomSheet({
|
|
|
3049
3142
|
title,
|
|
3050
3143
|
size: "full",
|
|
3051
3144
|
children: /* @__PURE__ */ jsxs18("div", { className: "matrx-mobile-sheet flex min-h-0 flex-1 flex-col", children: [
|
|
3052
|
-
/* @__PURE__ */
|
|
3145
|
+
/* @__PURE__ */ jsx34(
|
|
3053
3146
|
BottomSheetHeader,
|
|
3054
3147
|
{
|
|
3055
3148
|
title: selectedTab ? selectedTab.label : title,
|
|
@@ -3057,19 +3150,19 @@ function TabbedBottomSheet({
|
|
|
3057
3150
|
onBack: () => setSelectedTabId(null)
|
|
3058
3151
|
}
|
|
3059
3152
|
),
|
|
3060
|
-
selectedTab ? /* @__PURE__ */
|
|
3153
|
+
selectedTab ? /* @__PURE__ */ jsx34("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden pb-safe", children: selectedTab.content }) : /* @__PURE__ */ jsx34(BottomSheetBody, { children: /* @__PURE__ */ jsx34("ul", { className: "divide-y divide-border", children: tabs.map((tab) => {
|
|
3061
3154
|
const Icon2 = tab.icon;
|
|
3062
|
-
return /* @__PURE__ */
|
|
3155
|
+
return /* @__PURE__ */ jsx34("li", { children: /* @__PURE__ */ jsxs18(
|
|
3063
3156
|
"button",
|
|
3064
3157
|
{
|
|
3065
3158
|
type: "button",
|
|
3066
3159
|
onClick: () => setSelectedTabId(tab.id),
|
|
3067
3160
|
className: "flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors hover:bg-muted/60 active:bg-muted",
|
|
3068
3161
|
children: [
|
|
3069
|
-
Icon2 ? /* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3162
|
+
Icon2 ? /* @__PURE__ */ jsx34(Icon2, { className: "h-5 w-5 shrink-0 text-muted-foreground" }) : null,
|
|
3163
|
+
/* @__PURE__ */ jsx34("span", { className: "min-w-0 flex-1 text-base text-foreground", children: tab.label }),
|
|
3071
3164
|
tab.trailing,
|
|
3072
|
-
/* @__PURE__ */
|
|
3165
|
+
/* @__PURE__ */ jsx34(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
|
|
3073
3166
|
]
|
|
3074
3167
|
}
|
|
3075
3168
|
) }, tab.id);
|
|
@@ -3080,19 +3173,19 @@ function TabbedBottomSheet({
|
|
|
3080
3173
|
}
|
|
3081
3174
|
|
|
3082
3175
|
// src/table.tsx
|
|
3083
|
-
import * as
|
|
3084
|
-
import { jsx as
|
|
3176
|
+
import * as React27 from "react";
|
|
3177
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3085
3178
|
var TABLE_SIZES = {
|
|
3086
3179
|
sm: { head: "px-2", cell: "p-2" },
|
|
3087
3180
|
md: { head: "px-3", cell: "p-3" }
|
|
3088
3181
|
};
|
|
3089
|
-
var TableSizeContext =
|
|
3182
|
+
var TableSizeContext = React27.createContext("md");
|
|
3090
3183
|
function useTableSize() {
|
|
3091
|
-
return
|
|
3184
|
+
return React27.useContext(TableSizeContext);
|
|
3092
3185
|
}
|
|
3093
|
-
var Table =
|
|
3186
|
+
var Table = React27.forwardRef(
|
|
3094
3187
|
({ className, size = "md", wrap = true, wrapperClassName, ...props }, ref) => {
|
|
3095
|
-
const table = /* @__PURE__ */
|
|
3188
|
+
const table = /* @__PURE__ */ jsx35(
|
|
3096
3189
|
"table",
|
|
3097
3190
|
{
|
|
3098
3191
|
ref,
|
|
@@ -3102,7 +3195,7 @@ var Table = React26.forwardRef(
|
|
|
3102
3195
|
...props
|
|
3103
3196
|
}
|
|
3104
3197
|
);
|
|
3105
|
-
return /* @__PURE__ */
|
|
3198
|
+
return /* @__PURE__ */ jsx35(TableSizeContext.Provider, { value: size, children: wrap ? /* @__PURE__ */ jsx35(
|
|
3106
3199
|
"div",
|
|
3107
3200
|
{
|
|
3108
3201
|
"data-slot": "table-wrapper",
|
|
@@ -3113,7 +3206,7 @@ var Table = React26.forwardRef(
|
|
|
3113
3206
|
}
|
|
3114
3207
|
);
|
|
3115
3208
|
Table.displayName = "Table";
|
|
3116
|
-
var TableHeader =
|
|
3209
|
+
var TableHeader = React27.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
3117
3210
|
"thead",
|
|
3118
3211
|
{
|
|
3119
3212
|
ref,
|
|
@@ -3127,7 +3220,7 @@ var TableHeader = React26.forwardRef(({ className, sticky = false, ...props }, r
|
|
|
3127
3220
|
}
|
|
3128
3221
|
));
|
|
3129
3222
|
TableHeader.displayName = "TableHeader";
|
|
3130
|
-
var TableBody =
|
|
3223
|
+
var TableBody = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
3131
3224
|
"tbody",
|
|
3132
3225
|
{
|
|
3133
3226
|
ref,
|
|
@@ -3137,7 +3230,7 @@ var TableBody = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3137
3230
|
}
|
|
3138
3231
|
));
|
|
3139
3232
|
TableBody.displayName = "TableBody";
|
|
3140
|
-
var TableFooter =
|
|
3233
|
+
var TableFooter = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
3141
3234
|
"tfoot",
|
|
3142
3235
|
{
|
|
3143
3236
|
ref,
|
|
@@ -3150,7 +3243,7 @@ var TableFooter = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3150
3243
|
}
|
|
3151
3244
|
));
|
|
3152
3245
|
TableFooter.displayName = "TableFooter";
|
|
3153
|
-
var TableRow =
|
|
3246
|
+
var TableRow = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
3154
3247
|
"tr",
|
|
3155
3248
|
{
|
|
3156
3249
|
ref,
|
|
@@ -3163,9 +3256,9 @@ var TableRow = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3163
3256
|
}
|
|
3164
3257
|
));
|
|
3165
3258
|
TableRow.displayName = "TableRow";
|
|
3166
|
-
var TableHead =
|
|
3259
|
+
var TableHead = React27.forwardRef(({ className, ...props }, ref) => {
|
|
3167
3260
|
const size = useTableSize();
|
|
3168
|
-
return /* @__PURE__ */
|
|
3261
|
+
return /* @__PURE__ */ jsx35(
|
|
3169
3262
|
"th",
|
|
3170
3263
|
{
|
|
3171
3264
|
ref,
|
|
@@ -3180,9 +3273,9 @@ var TableHead = React26.forwardRef(({ className, ...props }, ref) => {
|
|
|
3180
3273
|
);
|
|
3181
3274
|
});
|
|
3182
3275
|
TableHead.displayName = "TableHead";
|
|
3183
|
-
var TableCell =
|
|
3276
|
+
var TableCell = React27.forwardRef(({ className, ...props }, ref) => {
|
|
3184
3277
|
const size = useTableSize();
|
|
3185
|
-
return /* @__PURE__ */
|
|
3278
|
+
return /* @__PURE__ */ jsx35(
|
|
3186
3279
|
"td",
|
|
3187
3280
|
{
|
|
3188
3281
|
ref,
|
|
@@ -3197,7 +3290,7 @@ var TableCell = React26.forwardRef(({ className, ...props }, ref) => {
|
|
|
3197
3290
|
);
|
|
3198
3291
|
});
|
|
3199
3292
|
TableCell.displayName = "TableCell";
|
|
3200
|
-
var TableCaption =
|
|
3293
|
+
var TableCaption = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
3201
3294
|
"caption",
|
|
3202
3295
|
{
|
|
3203
3296
|
ref,
|
|
@@ -3210,11 +3303,11 @@ TableCaption.displayName = "TableCaption";
|
|
|
3210
3303
|
|
|
3211
3304
|
// src/tabs.tsx
|
|
3212
3305
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3213
|
-
import * as
|
|
3214
|
-
import { jsx as
|
|
3306
|
+
import * as React28 from "react";
|
|
3307
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3215
3308
|
var Tabs = TabsPrimitive.Root;
|
|
3216
3309
|
var TABS_TRIGGER_BASE = "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm";
|
|
3217
|
-
var TabsList =
|
|
3310
|
+
var TabsList = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3218
3311
|
TabsPrimitive.List,
|
|
3219
3312
|
{
|
|
3220
3313
|
ref,
|
|
@@ -3227,7 +3320,7 @@ var TabsList = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3227
3320
|
}
|
|
3228
3321
|
));
|
|
3229
3322
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3230
|
-
var TabsTrigger =
|
|
3323
|
+
var TabsTrigger = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3231
3324
|
TabsPrimitive.Trigger,
|
|
3232
3325
|
{
|
|
3233
3326
|
ref,
|
|
@@ -3241,7 +3334,7 @@ var TabsTrigger = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3241
3334
|
}
|
|
3242
3335
|
));
|
|
3243
3336
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3244
|
-
var TabsTriggerCore =
|
|
3337
|
+
var TabsTriggerCore = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3245
3338
|
TabsPrimitive.Trigger,
|
|
3246
3339
|
{
|
|
3247
3340
|
ref,
|
|
@@ -3251,7 +3344,7 @@ var TabsTriggerCore = React27.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3251
3344
|
}
|
|
3252
3345
|
));
|
|
3253
3346
|
TabsTriggerCore.displayName = TabsPrimitive.Trigger.displayName;
|
|
3254
|
-
var TabsContent =
|
|
3347
|
+
var TabsContent = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3255
3348
|
TabsPrimitive.Content,
|
|
3256
3349
|
{
|
|
3257
3350
|
ref,
|
|
@@ -3267,8 +3360,8 @@ var TabsContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3267
3360
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3268
3361
|
|
|
3269
3362
|
// src/textarea.tsx
|
|
3270
|
-
import * as
|
|
3271
|
-
import { jsx as
|
|
3363
|
+
import * as React29 from "react";
|
|
3364
|
+
import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3272
3365
|
var FILL_HEIGHT_REGEX = /(?:^|\s)(h-full|h-dvh|flex-1|grow)(?:\s|$)/;
|
|
3273
3366
|
var FILL_WIDTH_REGEX = /(?:^|\s)(w-full|w-screen)(?:\s|$)/;
|
|
3274
3367
|
function getStretchClasses(className) {
|
|
@@ -3281,7 +3374,7 @@ function getStretchClasses(className) {
|
|
|
3281
3374
|
var TEXTAREA_ELEVATED_CLASS = "flex h-auto w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-textarea transition duration-400 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
|
|
3282
3375
|
var TEXTAREA_CONTROL_CLASS = "flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
|
|
3283
3376
|
function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
|
|
3284
|
-
|
|
3377
|
+
React29.useEffect(() => {
|
|
3285
3378
|
if (!autoGrow || !ref.current) return;
|
|
3286
3379
|
const textarea = ref.current;
|
|
3287
3380
|
textarea.style.height = "auto";
|
|
@@ -3297,8 +3390,8 @@ function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
|
|
|
3297
3390
|
}, [value, autoGrow, minHeight, maxHeight, ref]);
|
|
3298
3391
|
}
|
|
3299
3392
|
function useMergedTextareaRef(forwarded) {
|
|
3300
|
-
const internal =
|
|
3301
|
-
const callback =
|
|
3393
|
+
const internal = React29.useRef(null);
|
|
3394
|
+
const callback = React29.useCallback(
|
|
3302
3395
|
(node) => {
|
|
3303
3396
|
internal.current = node;
|
|
3304
3397
|
if (typeof forwarded === "function") forwarded(node);
|
|
@@ -3315,13 +3408,13 @@ function boxStyle(minHeight, maxHeight) {
|
|
|
3315
3408
|
maxHeight: maxHeight ? `${maxHeight}px` : void 0
|
|
3316
3409
|
};
|
|
3317
3410
|
}
|
|
3318
|
-
var Textarea =
|
|
3411
|
+
var Textarea = React29.forwardRef(
|
|
3319
3412
|
({ className, autoGrow, minHeight, maxHeight, wrapperClassName, ...props }, forwarded) => {
|
|
3320
3413
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3321
3414
|
const stretchClasses = getStretchClasses(className);
|
|
3322
3415
|
const needsWrapper = Boolean(wrapperClassName || stretchClasses);
|
|
3323
3416
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3324
|
-
const textarea = /* @__PURE__ */
|
|
3417
|
+
const textarea = /* @__PURE__ */ jsx37(
|
|
3325
3418
|
"textarea",
|
|
3326
3419
|
{
|
|
3327
3420
|
ref: callback,
|
|
@@ -3337,15 +3430,15 @@ var Textarea = React28.forwardRef(
|
|
|
3337
3430
|
}
|
|
3338
3431
|
);
|
|
3339
3432
|
if (!needsWrapper) return textarea;
|
|
3340
|
-
return /* @__PURE__ */
|
|
3433
|
+
return /* @__PURE__ */ jsx37("div", { className: cn(stretchClasses, wrapperClassName), children: textarea });
|
|
3341
3434
|
}
|
|
3342
3435
|
);
|
|
3343
3436
|
Textarea.displayName = "Textarea";
|
|
3344
|
-
var BasicTextarea =
|
|
3437
|
+
var BasicTextarea = React29.forwardRef(
|
|
3345
3438
|
({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {
|
|
3346
3439
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3347
3440
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3348
|
-
return /* @__PURE__ */
|
|
3441
|
+
return /* @__PURE__ */ jsx37(
|
|
3349
3442
|
"textarea",
|
|
3350
3443
|
{
|
|
3351
3444
|
ref: callback,
|
|
@@ -3363,7 +3456,7 @@ var BasicTextarea = React28.forwardRef(
|
|
|
3363
3456
|
}
|
|
3364
3457
|
);
|
|
3365
3458
|
BasicTextarea.displayName = "BasicTextarea";
|
|
3366
|
-
var TextareaWithPrefix =
|
|
3459
|
+
var TextareaWithPrefix = React29.forwardRef(
|
|
3367
3460
|
({
|
|
3368
3461
|
prefix,
|
|
3369
3462
|
className,
|
|
@@ -3380,8 +3473,8 @@ var TextareaWithPrefix = React28.forwardRef(
|
|
|
3380
3473
|
{
|
|
3381
3474
|
className: cn("relative", getStretchClasses(className), wrapperClassName),
|
|
3382
3475
|
children: [
|
|
3383
|
-
prefix ? /* @__PURE__ */
|
|
3384
|
-
/* @__PURE__ */
|
|
3476
|
+
prefix ? /* @__PURE__ */ jsx37("div", { className: "pointer-events-none absolute left-3 top-3 z-10 text-muted-foreground", children: prefix }) : null,
|
|
3477
|
+
/* @__PURE__ */ jsx37(
|
|
3385
3478
|
"textarea",
|
|
3386
3479
|
{
|
|
3387
3480
|
ref: callback,
|
|
@@ -3460,34 +3553,37 @@ function useScrollFade() {
|
|
|
3460
3553
|
|
|
3461
3554
|
// src/hover-card.tsx
|
|
3462
3555
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
3463
|
-
import * as
|
|
3464
|
-
import { jsx as
|
|
3556
|
+
import * as React30 from "react";
|
|
3557
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3465
3558
|
var HoverCard = HoverCardPrimitive.Root;
|
|
3466
3559
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
3467
|
-
var HoverCardContent =
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
HoverCardPrimitive.
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
}
|
|
3560
|
+
var HoverCardContent = React30.forwardRef(
|
|
3561
|
+
({ className, align = "center", sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3562
|
+
const resolved = usePortalContainer(container);
|
|
3563
|
+
return /* @__PURE__ */ jsx38(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ jsx38(
|
|
3564
|
+
HoverCardPrimitive.Content,
|
|
3565
|
+
{
|
|
3566
|
+
ref,
|
|
3567
|
+
"data-slot": "hover-card-content",
|
|
3568
|
+
align,
|
|
3569
|
+
sideOffset,
|
|
3570
|
+
className: cn(
|
|
3571
|
+
"z-[10001] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
3572
|
+
animated && MOTION_POPPER,
|
|
3573
|
+
className
|
|
3574
|
+
),
|
|
3575
|
+
...props
|
|
3576
|
+
}
|
|
3577
|
+
) });
|
|
3578
|
+
}
|
|
3579
|
+
);
|
|
3484
3580
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
3485
3581
|
|
|
3486
3582
|
// src/radio-group.tsx
|
|
3487
3583
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3488
|
-
import * as
|
|
3489
|
-
import { jsx as
|
|
3490
|
-
var RadioGroupSizeContext =
|
|
3584
|
+
import * as React31 from "react";
|
|
3585
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3586
|
+
var RadioGroupSizeContext = React31.createContext("md");
|
|
3491
3587
|
var CONTROL_CLASSES = {
|
|
3492
3588
|
sm: "h-3.5 w-3.5",
|
|
3493
3589
|
md: "h-4 w-4",
|
|
@@ -3498,7 +3594,7 @@ var DOT_CLASSES = {
|
|
|
3498
3594
|
md: "h-1.5 w-1.5",
|
|
3499
3595
|
lg: "h-2 w-2"
|
|
3500
3596
|
};
|
|
3501
|
-
var RadioGroup3 =
|
|
3597
|
+
var RadioGroup3 = React31.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ jsx39(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx39(
|
|
3502
3598
|
RadioGroupPrimitive.Root,
|
|
3503
3599
|
{
|
|
3504
3600
|
ref,
|
|
@@ -3508,10 +3604,10 @@ var RadioGroup3 = React30.forwardRef(({ className, size = "md", ...props }, ref)
|
|
|
3508
3604
|
}
|
|
3509
3605
|
) }));
|
|
3510
3606
|
RadioGroup3.displayName = RadioGroupPrimitive.Root.displayName;
|
|
3511
|
-
var RadioGroupItem =
|
|
3512
|
-
const groupSize =
|
|
3607
|
+
var RadioGroupItem = React31.forwardRef(({ className, size, ...props }, ref) => {
|
|
3608
|
+
const groupSize = React31.useContext(RadioGroupSizeContext);
|
|
3513
3609
|
const resolved = size ?? groupSize;
|
|
3514
|
-
return /* @__PURE__ */
|
|
3610
|
+
return /* @__PURE__ */ jsx39(
|
|
3515
3611
|
RadioGroupPrimitive.Item,
|
|
3516
3612
|
{
|
|
3517
3613
|
ref,
|
|
@@ -3528,7 +3624,7 @@ var RadioGroupItem = React30.forwardRef(({ className, size, ...props }, ref) =>
|
|
|
3528
3624
|
className
|
|
3529
3625
|
),
|
|
3530
3626
|
...props,
|
|
3531
|
-
children: /* @__PURE__ */
|
|
3627
|
+
children: /* @__PURE__ */ jsx39(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx39(
|
|
3532
3628
|
"div",
|
|
3533
3629
|
{
|
|
3534
3630
|
className: cn("rounded-full bg-primary-foreground", DOT_CLASSES[resolved])
|
|
@@ -3541,7 +3637,7 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
|
3541
3637
|
|
|
3542
3638
|
// src/resizable.tsx
|
|
3543
3639
|
import { Group as Group4, Panel, Separator as Separator5 } from "react-resizable-panels";
|
|
3544
|
-
import { jsx as
|
|
3640
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3545
3641
|
var HANDLE_SIZES = {
|
|
3546
3642
|
xs: "w-0.5 [&[aria-orientation=horizontal]]:h-0.5 [&[aria-orientation=horizontal]]:w-full",
|
|
3547
3643
|
sm: "w-1 [&[aria-orientation=horizontal]]:h-1 [&[aria-orientation=horizontal]]:w-full",
|
|
@@ -3555,7 +3651,7 @@ var HANDLE_SIZES = {
|
|
|
3555
3651
|
var ResizablePanelGroup = ({
|
|
3556
3652
|
className,
|
|
3557
3653
|
...props
|
|
3558
|
-
}) => /* @__PURE__ */
|
|
3654
|
+
}) => /* @__PURE__ */ jsx40(
|
|
3559
3655
|
Group4,
|
|
3560
3656
|
{
|
|
3561
3657
|
"data-slot": "resizable-group",
|
|
@@ -3570,7 +3666,7 @@ var ResizableHandle = ({
|
|
|
3570
3666
|
size = "xs",
|
|
3571
3667
|
className,
|
|
3572
3668
|
...props
|
|
3573
|
-
}) => /* @__PURE__ */
|
|
3669
|
+
}) => /* @__PURE__ */ jsx40(
|
|
3574
3670
|
Separator5,
|
|
3575
3671
|
{
|
|
3576
3672
|
"data-slot": "resizable-handle",
|
|
@@ -3590,15 +3686,15 @@ var ResizableHandle = ({
|
|
|
3590
3686
|
className
|
|
3591
3687
|
),
|
|
3592
3688
|
...props,
|
|
3593
|
-
children: withHandle ? /* @__PURE__ */
|
|
3689
|
+
children: withHandle ? /* @__PURE__ */ jsx40("div", { className: "z-10 flex h-8 w-4 items-center justify-center rounded-sm border bg-border group-aria-[orientation=horizontal]/handle:h-4 group-aria-[orientation=horizontal]/handle:w-8", children: /* @__PURE__ */ jsx40(DragHandleDots2Icon, { className: "h-2.5 w-2.5 group-aria-[orientation=horizontal]/handle:rotate-90" }) }) : null
|
|
3594
3690
|
}
|
|
3595
3691
|
);
|
|
3596
3692
|
ResizableHandle.displayName = "ResizableHandle";
|
|
3597
3693
|
|
|
3598
3694
|
// src/slider.tsx
|
|
3599
3695
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3600
|
-
import * as
|
|
3601
|
-
import { jsx as
|
|
3696
|
+
import * as React32 from "react";
|
|
3697
|
+
import { jsx as jsx41, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3602
3698
|
var TRACK_CLASSES = {
|
|
3603
3699
|
sm: "h-1",
|
|
3604
3700
|
md: "h-1.5",
|
|
@@ -3609,7 +3705,7 @@ var THUMB_CLASSES = {
|
|
|
3609
3705
|
md: "h-4 w-4",
|
|
3610
3706
|
lg: "h-5 w-5"
|
|
3611
3707
|
};
|
|
3612
|
-
var Slider =
|
|
3708
|
+
var Slider = React32.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
3613
3709
|
const thumbCount = Math.max(
|
|
3614
3710
|
1,
|
|
3615
3711
|
(props.value ?? props.defaultValue ?? [0]).length
|
|
@@ -3626,7 +3722,7 @@ var Slider = React31.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
|
3626
3722
|
),
|
|
3627
3723
|
...props,
|
|
3628
3724
|
children: [
|
|
3629
|
-
/* @__PURE__ */
|
|
3725
|
+
/* @__PURE__ */ jsx41(
|
|
3630
3726
|
SliderPrimitive.Track,
|
|
3631
3727
|
{
|
|
3632
3728
|
"data-slot": "slider-track",
|
|
@@ -3635,7 +3731,7 @@ var Slider = React31.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
|
3635
3731
|
TRACK_CLASSES[size],
|
|
3636
3732
|
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
3637
3733
|
),
|
|
3638
|
-
children: /* @__PURE__ */
|
|
3734
|
+
children: /* @__PURE__ */ jsx41(
|
|
3639
3735
|
SliderPrimitive.Range,
|
|
3640
3736
|
{
|
|
3641
3737
|
"data-slot": "slider-range",
|
|
@@ -3644,7 +3740,7 @@ var Slider = React31.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
|
3644
3740
|
)
|
|
3645
3741
|
}
|
|
3646
3742
|
),
|
|
3647
|
-
Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */
|
|
3743
|
+
Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ jsx41(
|
|
3648
3744
|
SliderPrimitive.Thumb,
|
|
3649
3745
|
{
|
|
3650
3746
|
"data-slot": "slider-thumb",
|
|
@@ -3671,8 +3767,8 @@ Slider.displayName = SliderPrimitive.Root.displayName;
|
|
|
3671
3767
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
3672
3768
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
3673
3769
|
import { cva as cva6 } from "class-variance-authority";
|
|
3674
|
-
import * as
|
|
3675
|
-
import { jsx as
|
|
3770
|
+
import * as React33 from "react";
|
|
3771
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3676
3772
|
var toggleVariants = cva6(
|
|
3677
3773
|
"inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
3678
3774
|
{
|
|
@@ -3693,7 +3789,7 @@ var toggleVariants = cva6(
|
|
|
3693
3789
|
}
|
|
3694
3790
|
}
|
|
3695
3791
|
);
|
|
3696
|
-
var Toggle =
|
|
3792
|
+
var Toggle = React33.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx42(
|
|
3697
3793
|
TogglePrimitive.Root,
|
|
3698
3794
|
{
|
|
3699
3795
|
ref,
|
|
@@ -3703,21 +3799,21 @@ var Toggle = React32.forwardRef(({ className, variant, size, ...props }, ref) =>
|
|
|
3703
3799
|
}
|
|
3704
3800
|
));
|
|
3705
3801
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
3706
|
-
var ToggleGroupContext =
|
|
3707
|
-
var ToggleGroup =
|
|
3802
|
+
var ToggleGroupContext = React33.createContext({ size: "default", variant: "default" });
|
|
3803
|
+
var ToggleGroup = React33.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx42(
|
|
3708
3804
|
ToggleGroupPrimitive.Root,
|
|
3709
3805
|
{
|
|
3710
3806
|
ref,
|
|
3711
3807
|
"data-slot": "toggle-group",
|
|
3712
3808
|
className: cn("flex items-center justify-center gap-1", className),
|
|
3713
3809
|
...props,
|
|
3714
|
-
children: /* @__PURE__ */
|
|
3810
|
+
children: /* @__PURE__ */ jsx42(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
3715
3811
|
}
|
|
3716
3812
|
));
|
|
3717
3813
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
3718
|
-
var ToggleGroupItem =
|
|
3719
|
-
const context =
|
|
3720
|
-
return /* @__PURE__ */
|
|
3814
|
+
var ToggleGroupItem = React33.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
3815
|
+
const context = React33.useContext(ToggleGroupContext);
|
|
3816
|
+
return /* @__PURE__ */ jsx42(
|
|
3721
3817
|
ToggleGroupPrimitive.Item,
|
|
3722
3818
|
{
|
|
3723
3819
|
ref,
|
|
@@ -3738,21 +3834,22 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
3738
3834
|
|
|
3739
3835
|
// src/tooltip.tsx
|
|
3740
3836
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3741
|
-
import * as
|
|
3742
|
-
import { jsx as
|
|
3837
|
+
import * as React34 from "react";
|
|
3838
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3743
3839
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3744
3840
|
var Tooltip = TooltipPrimitive.Root;
|
|
3745
3841
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3746
|
-
var TooltipContent =
|
|
3842
|
+
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3747
3843
|
const resolved = usePortalContainer(container);
|
|
3748
|
-
return /* @__PURE__ */
|
|
3844
|
+
return /* @__PURE__ */ jsx43(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ jsx43(
|
|
3749
3845
|
TooltipPrimitive.Content,
|
|
3750
3846
|
{
|
|
3751
3847
|
ref,
|
|
3752
3848
|
"data-slot": "tooltip-content",
|
|
3753
3849
|
sideOffset,
|
|
3754
3850
|
className: cn(
|
|
3755
|
-
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md
|
|
3851
|
+
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md",
|
|
3852
|
+
animated && MOTION_POPPER,
|
|
3756
3853
|
className
|
|
3757
3854
|
),
|
|
3758
3855
|
...props
|
|
@@ -3761,6 +3858,7 @@ var TooltipContent = React33.forwardRef(({ className, sideOffset = 4, container,
|
|
|
3761
3858
|
});
|
|
3762
3859
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3763
3860
|
export {
|
|
3861
|
+
ALL_MOTION_CLASSES,
|
|
3764
3862
|
Accordion,
|
|
3765
3863
|
AccordionContent,
|
|
3766
3864
|
AccordionItem,
|
|
@@ -3868,6 +3966,7 @@ export {
|
|
|
3868
3966
|
DropdownMenuTrigger,
|
|
3869
3967
|
EditableLabel,
|
|
3870
3968
|
EnterInput,
|
|
3969
|
+
FORBIDDEN_HOST_MOTION_UTILITIES,
|
|
3871
3970
|
HoverCard,
|
|
3872
3971
|
HoverCardContent,
|
|
3873
3972
|
HoverCardTrigger,
|
|
@@ -3875,6 +3974,13 @@ export {
|
|
|
3875
3974
|
InputWithPrefix,
|
|
3876
3975
|
Label3 as Label,
|
|
3877
3976
|
MOBILE_BREAKPOINT,
|
|
3977
|
+
MOTION_BOTTOM_SHEET,
|
|
3978
|
+
MOTION_DIALOG,
|
|
3979
|
+
MOTION_OVERLAY,
|
|
3980
|
+
MOTION_POPPER,
|
|
3981
|
+
MOTION_PULSE,
|
|
3982
|
+
MOTION_SHEET,
|
|
3983
|
+
MOTION_SPIN,
|
|
3878
3984
|
OverflowToolbar,
|
|
3879
3985
|
Popover,
|
|
3880
3986
|
PopoverAnchor,
|