myoperator-mcp 0.2.52 → 0.2.54
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/index.js +160 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1263,7 +1263,7 @@ const DeleteConfirmationModal = React.forwardRef<
|
|
|
1263
1263
|
<DialogContent ref={ref} size="sm" className={cn(className)}>
|
|
1264
1264
|
<DialogHeader>
|
|
1265
1265
|
<DialogTitle>{title || defaultTitle}</DialogTitle>
|
|
1266
|
-
<DialogDescription className={description ? undefined : "sr-only"}>
|
|
1266
|
+
<DialogDescription className={description ? undefined : "tw-sr-only"}>
|
|
1267
1267
|
{description ||
|
|
1268
1268
|
"Delete confirmation dialog - this action cannot be undone"}
|
|
1269
1269
|
</DialogDescription>
|
|
@@ -1393,7 +1393,7 @@ const DialogContent = React.forwardRef<
|
|
|
1393
1393
|
<DialogOverlay />
|
|
1394
1394
|
<DialogPrimitive.Content
|
|
1395
1395
|
ref={ref}
|
|
1396
|
-
className={cn(dialogContentVariants({ size, className
|
|
1396
|
+
className={cn(dialogContentVariants({ size }), className)}
|
|
1397
1397
|
{...props}
|
|
1398
1398
|
>
|
|
1399
1399
|
{children}
|
|
@@ -1683,6 +1683,144 @@ export {
|
|
|
1683
1683
|
DropdownMenuSubTrigger,
|
|
1684
1684
|
DropdownMenuRadioGroup,
|
|
1685
1685
|
};
|
|
1686
|
+
`,
|
|
1687
|
+
"form-modal": `import * as React from "react";
|
|
1688
|
+
|
|
1689
|
+
import { cn } from "@/lib/utils";
|
|
1690
|
+
import {
|
|
1691
|
+
Dialog,
|
|
1692
|
+
DialogContent,
|
|
1693
|
+
DialogHeader,
|
|
1694
|
+
DialogFooter,
|
|
1695
|
+
DialogTitle,
|
|
1696
|
+
DialogDescription,
|
|
1697
|
+
} from "./dialog";
|
|
1698
|
+
import { Button } from "./button";
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* Props for the FormModal component
|
|
1702
|
+
*/
|
|
1703
|
+
export interface FormModalProps {
|
|
1704
|
+
/** Controls modal visibility (controlled mode) */
|
|
1705
|
+
open: boolean;
|
|
1706
|
+
/** Callback when open state changes */
|
|
1707
|
+
onOpenChange: (open: boolean) => void;
|
|
1708
|
+
/** Modal title */
|
|
1709
|
+
title: React.ReactNode;
|
|
1710
|
+
/** Optional modal description */
|
|
1711
|
+
description?: React.ReactNode;
|
|
1712
|
+
/** Form content (inputs, selects, etc.) */
|
|
1713
|
+
children: React.ReactNode;
|
|
1714
|
+
/** Called when user saves/submits the form */
|
|
1715
|
+
onSave?: () => void;
|
|
1716
|
+
/** Called when user cancels */
|
|
1717
|
+
onCancel?: () => void;
|
|
1718
|
+
/** Loading state for save button */
|
|
1719
|
+
loading?: boolean;
|
|
1720
|
+
/** Text for save button (default: "Save") */
|
|
1721
|
+
saveButtonText?: string;
|
|
1722
|
+
/** Text for cancel button (default: "Cancel") */
|
|
1723
|
+
cancelButtonText?: string;
|
|
1724
|
+
/** Disable the save button */
|
|
1725
|
+
disableSave?: boolean;
|
|
1726
|
+
/** Additional className for the dialog content */
|
|
1727
|
+
className?: string;
|
|
1728
|
+
/** Size of the dialog */
|
|
1729
|
+
size?: "sm" | "default" | "lg" | "xl" | "full";
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
/**
|
|
1733
|
+
* A reusable modal component for forms with inputs, selects, and other form controls.
|
|
1734
|
+
* Provides consistent layout and spacing for form-based dialogs.
|
|
1735
|
+
*
|
|
1736
|
+
* @example
|
|
1737
|
+
* Basic usage with form fields
|
|
1738
|
+
*
|
|
1739
|
+
* \`\`\`tsx
|
|
1740
|
+
* const [isOpen, setIsOpen] = useState(false);
|
|
1741
|
+
* const [name, setName] = useState('');
|
|
1742
|
+
*
|
|
1743
|
+
* <FormModal
|
|
1744
|
+
* open={isOpen}
|
|
1745
|
+
* onOpenChange={setIsOpen}
|
|
1746
|
+
* title="Edit Profile"
|
|
1747
|
+
* description="Make changes to your profile here."
|
|
1748
|
+
* onSave={handleSave}
|
|
1749
|
+
* loading={loading}
|
|
1750
|
+
* >
|
|
1751
|
+
* <div className="grid gap-2">
|
|
1752
|
+
* <label htmlFor="name">Name</label>
|
|
1753
|
+
* <Input id="name" value={name} onChange={e => setName(e.target.value)} />
|
|
1754
|
+
* </div>
|
|
1755
|
+
* </FormModal>
|
|
1756
|
+
* \`\`\`
|
|
1757
|
+
*/
|
|
1758
|
+
const FormModal = React.forwardRef<HTMLDivElement, FormModalProps>(
|
|
1759
|
+
(
|
|
1760
|
+
{
|
|
1761
|
+
open,
|
|
1762
|
+
onOpenChange,
|
|
1763
|
+
title,
|
|
1764
|
+
description,
|
|
1765
|
+
children,
|
|
1766
|
+
onSave,
|
|
1767
|
+
onCancel,
|
|
1768
|
+
loading = false,
|
|
1769
|
+
saveButtonText = "Save",
|
|
1770
|
+
cancelButtonText = "Cancel",
|
|
1771
|
+
disableSave = false,
|
|
1772
|
+
className,
|
|
1773
|
+
size = "sm",
|
|
1774
|
+
},
|
|
1775
|
+
ref
|
|
1776
|
+
) => {
|
|
1777
|
+
const handleSave = () => {
|
|
1778
|
+
onSave?.();
|
|
1779
|
+
};
|
|
1780
|
+
|
|
1781
|
+
const handleCancel = () => {
|
|
1782
|
+
onCancel?.();
|
|
1783
|
+
onOpenChange?.(false);
|
|
1784
|
+
};
|
|
1785
|
+
|
|
1786
|
+
return (
|
|
1787
|
+
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
1788
|
+
<DialogContent ref={ref} size={size} className={cn(className)}>
|
|
1789
|
+
<DialogHeader>
|
|
1790
|
+
<DialogTitle>{title}</DialogTitle>
|
|
1791
|
+
{description && (
|
|
1792
|
+
<DialogDescription>{description}</DialogDescription>
|
|
1793
|
+
)}
|
|
1794
|
+
</DialogHeader>
|
|
1795
|
+
|
|
1796
|
+
{/* Form content with consistent spacing */}
|
|
1797
|
+
<div className="grid gap-4 py-4">{children}</div>
|
|
1798
|
+
|
|
1799
|
+
<DialogFooter className="gap-2 sm:gap-0">
|
|
1800
|
+
<Button
|
|
1801
|
+
variant="outline"
|
|
1802
|
+
onClick={handleCancel}
|
|
1803
|
+
disabled={loading}
|
|
1804
|
+
>
|
|
1805
|
+
{cancelButtonText}
|
|
1806
|
+
</Button>
|
|
1807
|
+
<Button
|
|
1808
|
+
variant="default"
|
|
1809
|
+
onClick={handleSave}
|
|
1810
|
+
disabled={loading || disableSave}
|
|
1811
|
+
loading={loading}
|
|
1812
|
+
>
|
|
1813
|
+
{saveButtonText}
|
|
1814
|
+
</Button>
|
|
1815
|
+
</DialogFooter>
|
|
1816
|
+
</DialogContent>
|
|
1817
|
+
</Dialog>
|
|
1818
|
+
);
|
|
1819
|
+
}
|
|
1820
|
+
);
|
|
1821
|
+
FormModal.displayName = "FormModal";
|
|
1822
|
+
|
|
1823
|
+
export { FormModal };
|
|
1686
1824
|
`,
|
|
1687
1825
|
"input": `import * as React from "react";
|
|
1688
1826
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
@@ -4142,7 +4280,7 @@ function useToast() {
|
|
|
4142
4280
|
listeners.splice(index, 1);
|
|
4143
4281
|
}
|
|
4144
4282
|
};
|
|
4145
|
-
}, [
|
|
4283
|
+
}, []);
|
|
4146
4284
|
|
|
4147
4285
|
return {
|
|
4148
4286
|
...state,
|
|
@@ -4417,7 +4555,7 @@ const mapColorClassName: { [key in Color]: string } = {
|
|
|
4417
4555
|
primary: "text-semantic-text-primary",
|
|
4418
4556
|
secondary: "text-semantic-text-secondary",
|
|
4419
4557
|
muted: "text-semantic-text-muted",
|
|
4420
|
-
placeholder: "text-semantic-text-placeholder",
|
|
4558
|
+
placeholder: "tw-text-semantic-text-placeholder",
|
|
4421
4559
|
link: "text-semantic-text-link",
|
|
4422
4560
|
inverted: "text-semantic-text-inverted",
|
|
4423
4561
|
error: "text-semantic-error-primary",
|
|
@@ -4983,6 +5121,24 @@ var componentMetadata = {
|
|
|
4983
5121
|
}
|
|
4984
5122
|
]
|
|
4985
5123
|
},
|
|
5124
|
+
"form-modal": {
|
|
5125
|
+
"name": "FormModal",
|
|
5126
|
+
"description": "A form modal component.",
|
|
5127
|
+
"dependencies": [
|
|
5128
|
+
"class-variance-authority",
|
|
5129
|
+
"clsx",
|
|
5130
|
+
"tailwind-merge"
|
|
5131
|
+
],
|
|
5132
|
+
"props": [],
|
|
5133
|
+
"variants": [],
|
|
5134
|
+
"examples": [
|
|
5135
|
+
{
|
|
5136
|
+
"title": "Basic FormModal",
|
|
5137
|
+
"code": "<FormModal>Content</FormModal>",
|
|
5138
|
+
"description": "Simple form modal usage"
|
|
5139
|
+
}
|
|
5140
|
+
]
|
|
5141
|
+
},
|
|
4986
5142
|
"input": {
|
|
4987
5143
|
"name": "Input",
|
|
4988
5144
|
"description": "A flexible input component for text entry with state variants. Supports default and error states.",
|
package/package.json
CHANGED