@inf-monkeys-tech/monkeys-design 2.0.3 → 2.0.5-canary.355.1.955340d
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/dist/components/agent-workbench/index.js +124 -55
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +124 -55
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/layout/index.js +33 -6
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +33 -6
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/primitives/index.js +608 -116
- package/dist/components/primitives/index.js.map +1 -1
- package/dist/components/primitives/index.mjs +609 -117
- package/dist/components/primitives/index.mjs.map +1 -1
- package/dist/index.js +119 -59
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -59
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +9 -1
- package/package.json +3 -2
|
@@ -423,8 +423,8 @@ function getMonkeysProviderContexts() {
|
|
|
423
423
|
}
|
|
424
424
|
var providerContexts = getMonkeysProviderContexts();
|
|
425
425
|
var MonkeysLocaleContext = providerContexts.locale;
|
|
426
|
-
providerContexts.theme;
|
|
427
|
-
providerContexts.direction;
|
|
426
|
+
var MonkeysThemeContext = providerContexts.theme;
|
|
427
|
+
var MonkeysDirectionContext = providerContexts.direction;
|
|
428
428
|
providerContexts.environment;
|
|
429
429
|
function useMonkeysLocale() {
|
|
430
430
|
return React5.useContext(MonkeysLocaleContext);
|
|
@@ -432,9 +432,45 @@ function useMonkeysLocale() {
|
|
|
432
432
|
function useMonkeysLocaleMessages() {
|
|
433
433
|
return React5.useContext(MonkeysLocaleContext).messages;
|
|
434
434
|
}
|
|
435
|
+
function useMonkeysComponentAttributes() {
|
|
436
|
+
const locale = React5.useContext(MonkeysLocaleContext);
|
|
437
|
+
const theme = React5.useContext(MonkeysThemeContext);
|
|
438
|
+
const direction = React5.useContext(MonkeysDirectionContext);
|
|
439
|
+
const providerActive = locale.provided || theme.provided || direction.provided;
|
|
440
|
+
return React5.useMemo(
|
|
441
|
+
() => providerActive ? {
|
|
442
|
+
dir: direction.direction,
|
|
443
|
+
"data-monkeys-direction": direction.direction,
|
|
444
|
+
"data-monkeys-locale": locale.locale,
|
|
445
|
+
"data-monkeys-theme": theme.themeId,
|
|
446
|
+
"data-monkeys-theme-mode": theme.resolvedTheme?.colorMode
|
|
447
|
+
} : {},
|
|
448
|
+
[
|
|
449
|
+
direction.direction,
|
|
450
|
+
locale.locale,
|
|
451
|
+
providerActive,
|
|
452
|
+
theme.resolvedTheme?.colorMode,
|
|
453
|
+
theme.themeId
|
|
454
|
+
]
|
|
455
|
+
);
|
|
456
|
+
}
|
|
435
457
|
function cn(...parts) {
|
|
436
458
|
return tailwindMerge.twMerge(parts.filter(Boolean).join(" "));
|
|
437
459
|
}
|
|
460
|
+
|
|
461
|
+
// src/components/primitives/internal/overlaySurface.ts
|
|
462
|
+
var overlaySurfaceRoleClassNames = {
|
|
463
|
+
// Keep the public utilities in the built stylesheet and tailwind-merge graph.
|
|
464
|
+
menu: "monkeys-overlay-surface--menu bg-menu-surface text-popover-foreground",
|
|
465
|
+
dialog: "monkeys-overlay-surface--dialog bg-dialog-surface text-foreground"
|
|
466
|
+
};
|
|
467
|
+
function getOverlaySurfaceClassName(role, options = {}) {
|
|
468
|
+
return [
|
|
469
|
+
"monkeys-overlay-surface",
|
|
470
|
+
overlaySurfaceRoleClassNames[role],
|
|
471
|
+
options.rounded === false ? void 0 : "monkeys-overlay-surface--rounded"
|
|
472
|
+
].filter(Boolean).join(" ");
|
|
473
|
+
}
|
|
438
474
|
function cn2(...inputs) {
|
|
439
475
|
return inputs.filter(Boolean).join(" ");
|
|
440
476
|
}
|
|
@@ -807,18 +843,26 @@ var TabsContent = React5__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
807
843
|
}
|
|
808
844
|
));
|
|
809
845
|
TabsContent.displayName = "TabsContent";
|
|
810
|
-
var TooltipContent = React5__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) =>
|
|
811
|
-
|
|
812
|
-
{
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
846
|
+
var TooltipContent = React5__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
|
847
|
+
const componentAttributes = useMonkeysComponentAttributes();
|
|
848
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
849
|
+
TooltipPrimitive__namespace.Content,
|
|
850
|
+
{
|
|
851
|
+
...componentAttributes,
|
|
852
|
+
...props,
|
|
853
|
+
ref,
|
|
854
|
+
sideOffset,
|
|
855
|
+
"data-monkeys-component": "tooltip",
|
|
856
|
+
"data-slot": "content",
|
|
857
|
+
"data-surface": "menu",
|
|
858
|
+
className: cn(
|
|
859
|
+
"z-50 overflow-hidden border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
|
|
860
|
+
getOverlaySurfaceClassName("menu"),
|
|
861
|
+
className
|
|
862
|
+
)
|
|
863
|
+
}
|
|
864
|
+
) });
|
|
865
|
+
});
|
|
822
866
|
TooltipContent.displayName = "TooltipContent";
|
|
823
867
|
var Input = React5__namespace.forwardRef(({ className, appearance = "standard", type, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
824
868
|
"input",
|
|
@@ -969,7 +1013,7 @@ var InputGroupTextarea = React5__namespace.forwardRef(({ className, ...props },
|
|
|
969
1013
|
));
|
|
970
1014
|
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
971
1015
|
var menuItemClassName = "relative flex cursor-default select-none items-center gap-2 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
|
|
972
|
-
var menuContentClassName =
|
|
1016
|
+
var menuContentClassName = `z-50 min-w-[8rem] overflow-hidden border p-1 ${getOverlaySurfaceClassName("menu")} 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`;
|
|
973
1017
|
var DropdownMenu2 = DropdownMenuPrimitive__namespace.Root;
|
|
974
1018
|
var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
975
1019
|
var DropdownMenuSubTrigger = React5__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.SubTrigger, { ref, className: cn(menuItemClassName, "data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [
|
|
@@ -978,11 +1022,17 @@ var DropdownMenuSubTrigger = React5__namespace.forwardRef(({ className, inset, c
|
|
|
978
1022
|
] }));
|
|
979
1023
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
980
1024
|
var DropdownMenuSubContent = React5__namespace.forwardRef(
|
|
981
|
-
({ className, ...props }, ref) =>
|
|
1025
|
+
({ className, ...props }, ref) => {
|
|
1026
|
+
const componentAttributes = useMonkeysComponentAttributes();
|
|
1027
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.SubContent, { ...componentAttributes, ...props, ref, "data-monkeys-component": "dropdown-menu", "data-slot": "content", "data-surface": "menu", className: cn(menuContentClassName, className) });
|
|
1028
|
+
}
|
|
982
1029
|
);
|
|
983
1030
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
984
1031
|
var DropdownMenuContent = React5__namespace.forwardRef(
|
|
985
|
-
({ className, sideOffset = 4, ...props }, ref) =>
|
|
1032
|
+
({ className, sideOffset = 4, ...props }, ref) => {
|
|
1033
|
+
const componentAttributes = useMonkeysComponentAttributes();
|
|
1034
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Content, { ...componentAttributes, ...props, ref, sideOffset, "data-monkeys-component": "dropdown-menu", "data-slot": "content", "data-surface": "menu", className: cn(menuContentClassName, className) }) });
|
|
1035
|
+
}
|
|
986
1036
|
);
|
|
987
1037
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
988
1038
|
var DropdownMenuItem = React5__namespace.forwardRef(
|
|
@@ -1029,11 +1079,14 @@ var SelectScrollDownButton = React5__namespace.forwardRef(
|
|
|
1029
1079
|
);
|
|
1030
1080
|
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
1031
1081
|
var SelectContent = React5__namespace.forwardRef(
|
|
1032
|
-
({ className, children, position = "popper", viewportClassName, disableTriggerViewportSizing = false, ...props }, ref) =>
|
|
1033
|
-
|
|
1034
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.
|
|
1035
|
-
|
|
1036
|
-
|
|
1082
|
+
({ className, children, position = "popper", viewportClassName, disableTriggerViewportSizing = false, ...props }, ref) => {
|
|
1083
|
+
const componentAttributes = useMonkeysComponentAttributes();
|
|
1084
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Content, { ...componentAttributes, ...props, ref, position, "data-monkeys-component": "select", "data-slot": "content", "data-surface": "menu", className: cn(menuContentClassName, "relative max-h-[var(--radix-select-content-available-height)] overflow-y-auto overflow-x-hidden", 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", className), children: [
|
|
1085
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
1086
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: cn("p-1", position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]", position === "popper" && !disableTriggerViewportSizing && "h-[var(--radix-select-trigger-height)]", viewportClassName), children }),
|
|
1087
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
1088
|
+
] }) });
|
|
1089
|
+
}
|
|
1037
1090
|
);
|
|
1038
1091
|
SelectContent.displayName = "SelectContent";
|
|
1039
1092
|
var SelectLabel = React5__namespace.forwardRef(
|
|
@@ -1056,17 +1109,24 @@ var SelectSeparator = React5__namespace.forwardRef(
|
|
|
1056
1109
|
SelectSeparator.displayName = "SelectSeparator";
|
|
1057
1110
|
var Sheet = DialogPrimitive__namespace.Root;
|
|
1058
1111
|
var SheetPortal = DialogPrimitive__namespace.Portal;
|
|
1059
|
-
var SheetOverlay = React5__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1112
|
+
var SheetOverlay = React5__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1113
|
+
const componentAttributes = useMonkeysComponentAttributes();
|
|
1114
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1115
|
+
DialogPrimitive__namespace.Overlay,
|
|
1116
|
+
{
|
|
1117
|
+
...componentAttributes,
|
|
1118
|
+
...props,
|
|
1119
|
+
ref,
|
|
1120
|
+
"data-monkeys-component": "sheet",
|
|
1121
|
+
"data-slot": "overlay",
|
|
1122
|
+
"data-monkeys-overlay": true,
|
|
1123
|
+
className: cn(
|
|
1124
|
+
"theme-overlay-backdrop fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1125
|
+
className
|
|
1126
|
+
)
|
|
1127
|
+
}
|
|
1128
|
+
);
|
|
1129
|
+
});
|
|
1070
1130
|
SheetOverlay.displayName = "SheetOverlay";
|
|
1071
1131
|
var sideClassNames = {
|
|
1072
1132
|
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
@@ -1074,28 +1134,37 @@ var sideClassNames = {
|
|
|
1074
1134
|
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1075
1135
|
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm"
|
|
1076
1136
|
};
|
|
1077
|
-
var SheetContent = React5__namespace.forwardRef(({ side = "right", className, children, ...props }, ref) =>
|
|
1078
|
-
|
|
1079
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
]
|
|
1137
|
+
var SheetContent = React5__namespace.forwardRef(({ side = "right", className, children, ...props }, ref) => {
|
|
1138
|
+
const componentAttributes = useMonkeysComponentAttributes();
|
|
1139
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
1140
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
1141
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1142
|
+
DialogPrimitive__namespace.Content,
|
|
1143
|
+
{
|
|
1144
|
+
...componentAttributes,
|
|
1145
|
+
...props,
|
|
1146
|
+
ref,
|
|
1147
|
+
"data-monkeys-component": "sheet",
|
|
1148
|
+
"data-slot": "content",
|
|
1149
|
+
"data-surface": "dialog",
|
|
1150
|
+
"data-monkeys-dialog-content": true,
|
|
1151
|
+
className: cn(
|
|
1152
|
+
"fixed z-50 gap-4 p-6 transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1153
|
+
getOverlaySurfaceClassName("dialog", { rounded: false }),
|
|
1154
|
+
sideClassNames[side],
|
|
1155
|
+
className
|
|
1156
|
+
),
|
|
1157
|
+
children: [
|
|
1158
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-dialog-surface 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: [
|
|
1159
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" }) }),
|
|
1160
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1161
|
+
] }),
|
|
1162
|
+
children
|
|
1163
|
+
]
|
|
1164
|
+
}
|
|
1165
|
+
)
|
|
1166
|
+
] });
|
|
1167
|
+
});
|
|
1099
1168
|
SheetContent.displayName = "SheetContent";
|
|
1100
1169
|
var SheetTitle = React5__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { ref, className: cn("text-lg font-semibold text-foreground", className), ...props }));
|
|
1101
1170
|
SheetTitle.displayName = "SheetTitle";
|