myoperator-mcp 0.2.307 → 0.2.309
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 +82 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3999,7 +3999,7 @@ const inputVariants = cva(
|
|
|
3999
3999
|
default:
|
|
4000
4000
|
"border border-solid border-semantic-border-input focus:outline-none focus:border-semantic-border-input-focus focus:shadow-[0_0_0_1px_rgba(43,188,202,0.15)]",
|
|
4001
4001
|
error:
|
|
4002
|
-
"border border-solid border-semantic-error-primary focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
4002
|
+
"border border-solid border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
4003
4003
|
},
|
|
4004
4004
|
},
|
|
4005
4005
|
defaultVariants: {
|
|
@@ -4079,7 +4079,10 @@ const Input = React.forwardRef(
|
|
|
4079
4079
|
<input
|
|
4080
4080
|
type={type}
|
|
4081
4081
|
className={cn(
|
|
4082
|
-
inputVariants({ state
|
|
4082
|
+
inputVariants({ state }),
|
|
4083
|
+
className,
|
|
4084
|
+
state === "error" &&
|
|
4085
|
+
"border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
4083
4086
|
showCheckIcon && "pr-9",
|
|
4084
4087
|
type === "number" &&
|
|
4085
4088
|
hideNumberSpinners &&
|
|
@@ -5838,10 +5841,30 @@ Panel.displayName = "Panel";
|
|
|
5838
5841
|
export { Panel, panelVariants };
|
|
5839
5842
|
`,
|
|
5840
5843
|
"phone-input": `import * as React from "react";
|
|
5844
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
5841
5845
|
import { ChevronDown } from "lucide-react";
|
|
5842
5846
|
|
|
5843
5847
|
import { cn } from "@/lib/utils";
|
|
5844
5848
|
|
|
5849
|
+
const phoneInputContainerVariants = cva(
|
|
5850
|
+
"flex items-center border border-solid rounded transition-all",
|
|
5851
|
+
{
|
|
5852
|
+
variants: {
|
|
5853
|
+
state: {
|
|
5854
|
+
default:
|
|
5855
|
+
"border-semantic-border-input focus-within:outline-none focus-within:border-semantic-border-input-focus focus-within:ring-1 focus-within:ring-semantic-border-input-focus/15",
|
|
5856
|
+
empty:
|
|
5857
|
+
"border-semantic-border-input focus-within:outline-none focus-within:border-semantic-border-input-focus focus-within:ring-1 focus-within:ring-semantic-border-input-focus/15",
|
|
5858
|
+
error:
|
|
5859
|
+
"border-semantic-error-primary focus-within:outline-none focus-within:border-semantic-error-primary focus-within:ring-1 focus-within:ring-semantic-error-primary/15",
|
|
5860
|
+
},
|
|
5861
|
+
},
|
|
5862
|
+
defaultVariants: {
|
|
5863
|
+
state: "default",
|
|
5864
|
+
},
|
|
5865
|
+
}
|
|
5866
|
+
);
|
|
5867
|
+
|
|
5845
5868
|
/**
|
|
5846
5869
|
* A phone number input with a country code prefix area.
|
|
5847
5870
|
*
|
|
@@ -5850,11 +5873,18 @@ import { cn } from "@/lib/utils";
|
|
|
5850
5873
|
* <PhoneInput placeholder="Enter phone number" />
|
|
5851
5874
|
* <PhoneInput countryFlag="\u{1F1FA}\u{1F1F8}" countryCode="+1" />
|
|
5852
5875
|
* <PhoneInput phoneMaxNumber={10} />
|
|
5876
|
+
* <PhoneInput state="empty" />
|
|
5877
|
+
* <PhoneInput validation="Enter a valid phone number" />
|
|
5853
5878
|
* <PhoneInput onCountryClick={() => openCountryPicker()} />
|
|
5854
5879
|
* \`\`\`
|
|
5855
5880
|
*/
|
|
5856
5881
|
export interface PhoneInputProps
|
|
5857
|
-
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"
|
|
5882
|
+
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type">,
|
|
5883
|
+
VariantProps<typeof phoneInputContainerVariants> {
|
|
5884
|
+
/** Visual validation state of the phone input */
|
|
5885
|
+
state?: "default" | "empty" | "error";
|
|
5886
|
+
/** Validation message displayed below the input. Also applies error styling. */
|
|
5887
|
+
validation?: string;
|
|
5858
5888
|
/** Country flag emoji (e.g., "\u{1F1EE}\u{1F1F3}", "\u{1F1FA}\u{1F1F8}"). Defaults to "\u{1F1EE}\u{1F1F3}" */
|
|
5859
5889
|
countryFlag?: string;
|
|
5860
5890
|
/** Country dial code (e.g., "+91", "+1"). Defaults to "+91" */
|
|
@@ -5873,6 +5903,8 @@ const PhoneInput = React.forwardRef(
|
|
|
5873
5903
|
(
|
|
5874
5904
|
{
|
|
5875
5905
|
className,
|
|
5906
|
+
state,
|
|
5907
|
+
validation,
|
|
5876
5908
|
countryFlag = "\u{1F1EE}\u{1F1F3}",
|
|
5877
5909
|
countryCode = "+91",
|
|
5878
5910
|
showChevron = true,
|
|
@@ -5886,11 +5918,21 @@ const PhoneInput = React.forwardRef(
|
|
|
5886
5918
|
onKeyDown,
|
|
5887
5919
|
maxLength,
|
|
5888
5920
|
phoneMaxNumber,
|
|
5921
|
+
id,
|
|
5922
|
+
"aria-describedby": ariaDescribedBy,
|
|
5923
|
+
"aria-invalid": ariaInvalid,
|
|
5889
5924
|
...props
|
|
5890
5925
|
}: PhoneInputProps,
|
|
5891
5926
|
ref: React.Ref<HTMLInputElement>
|
|
5892
5927
|
) => {
|
|
5893
5928
|
const effectiveMaxLength = phoneMaxNumber ?? maxLength;
|
|
5929
|
+
const generatedId = React.useId();
|
|
5930
|
+
const inputId = id || generatedId;
|
|
5931
|
+
const validationId = \`\${inputId}-validation\`;
|
|
5932
|
+
const derivedState = validation ? "error" : (state ?? "default");
|
|
5933
|
+
const describedBy = [ariaDescribedBy, validation ? validationId : undefined]
|
|
5934
|
+
.filter(Boolean)
|
|
5935
|
+
.join(" ");
|
|
5894
5936
|
|
|
5895
5937
|
const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {
|
|
5896
5938
|
onKeyDown?.(event);
|
|
@@ -5935,10 +5977,12 @@ const PhoneInput = React.forwardRef(
|
|
|
5935
5977
|
onChange?.(event);
|
|
5936
5978
|
};
|
|
5937
5979
|
|
|
5938
|
-
|
|
5980
|
+
const phoneInput = (
|
|
5939
5981
|
<div
|
|
5940
5982
|
className={cn(
|
|
5941
|
-
|
|
5983
|
+
phoneInputContainerVariants({
|
|
5984
|
+
state: derivedState,
|
|
5985
|
+
}),
|
|
5942
5986
|
disabled && "opacity-60 bg-semantic-bg-ui cursor-not-allowed",
|
|
5943
5987
|
wrapperClassName
|
|
5944
5988
|
)}
|
|
@@ -5962,11 +6006,14 @@ const PhoneInput = React.forwardRef(
|
|
|
5962
6006
|
<div className="w-px h-5 bg-semantic-border-layout shrink-0" />
|
|
5963
6007
|
<input
|
|
5964
6008
|
type="tel"
|
|
6009
|
+
id={inputId}
|
|
5965
6010
|
ref={ref}
|
|
5966
6011
|
disabled={disabled}
|
|
5967
6012
|
inputMode={inputMode}
|
|
5968
6013
|
pattern={pattern}
|
|
5969
6014
|
maxLength={effectiveMaxLength}
|
|
6015
|
+
aria-invalid={ariaInvalid ?? derivedState === "error"}
|
|
6016
|
+
aria-describedby={describedBy || undefined}
|
|
5970
6017
|
className={cn(
|
|
5971
6018
|
"flex-1 h-10 px-3 text-sm text-semantic-text-primary placeholder:text-semantic-text-muted outline-none bg-transparent disabled:cursor-not-allowed",
|
|
5972
6019
|
className
|
|
@@ -5978,11 +6025,24 @@ const PhoneInput = React.forwardRef(
|
|
|
5978
6025
|
/>
|
|
5979
6026
|
</div>
|
|
5980
6027
|
);
|
|
6028
|
+
|
|
6029
|
+
if (!validation) {
|
|
6030
|
+
return phoneInput;
|
|
6031
|
+
}
|
|
6032
|
+
|
|
6033
|
+
return (
|
|
6034
|
+
<div className="flex flex-col gap-1.5">
|
|
6035
|
+
{phoneInput}
|
|
6036
|
+
<p id={validationId} className="m-0 text-sm text-semantic-error-primary">
|
|
6037
|
+
{validation}
|
|
6038
|
+
</p>
|
|
6039
|
+
</div>
|
|
6040
|
+
);
|
|
5981
6041
|
}
|
|
5982
6042
|
);
|
|
5983
6043
|
PhoneInput.displayName = "PhoneInput";
|
|
5984
6044
|
|
|
5985
|
-
export { PhoneInput };
|
|
6045
|
+
export { PhoneInput, phoneInputContainerVariants };
|
|
5986
6046
|
`,
|
|
5987
6047
|
"readable-field": `import * as React from "react";
|
|
5988
6048
|
import { Copy, Check, Eye, EyeOff } from "lucide-react";
|
|
@@ -7992,7 +8052,7 @@ const textFieldContainerVariants = cva(
|
|
|
7992
8052
|
empty:
|
|
7993
8053
|
"border border-solid border-semantic-border-input focus-within:border-semantic-border-input-focus focus-within:shadow-[0_0_0_1px_rgba(43,188,202,0.15)]",
|
|
7994
8054
|
error:
|
|
7995
|
-
"border border-solid border-semantic-error-primary focus-within:border-semantic-error-primary focus-within:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8055
|
+
"border border-solid border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus-within:border-semantic-error-primary focus-within:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
7996
8056
|
},
|
|
7997
8057
|
disabled: {
|
|
7998
8058
|
true: "cursor-not-allowed opacity-50 bg-[var(--color-neutral-50)]",
|
|
@@ -8019,7 +8079,7 @@ const textFieldInputVariants = cva(
|
|
|
8019
8079
|
empty:
|
|
8020
8080
|
"border border-solid border-semantic-border-input focus:outline-none focus:border-semantic-border-input-focus focus:shadow-[0_0_0_1px_rgba(43,188,202,0.15)]",
|
|
8021
8081
|
error:
|
|
8022
|
-
"border border-solid border-semantic-error-primary focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8082
|
+
"border border-solid border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8023
8083
|
},
|
|
8024
8084
|
size: {
|
|
8025
8085
|
default: "h-[42px] px-4 py-2 text-base file:text-base",
|
|
@@ -8187,7 +8247,12 @@ const TextField = React.forwardRef(
|
|
|
8187
8247
|
"flex-1 bg-transparent border-0 outline-none focus:ring-0 px-0 h-full text-semantic-text-primary placeholder:text-semantic-text-placeholder disabled:cursor-not-allowed",
|
|
8188
8248
|
size === "sm" ? "text-sm" : "text-base"
|
|
8189
8249
|
)
|
|
8190
|
-
:
|
|
8250
|
+
: cn(
|
|
8251
|
+
textFieldInputVariants({ state: derivedState, size }),
|
|
8252
|
+
className,
|
|
8253
|
+
derivedState === "error" &&
|
|
8254
|
+
"border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]"
|
|
8255
|
+
),
|
|
8191
8256
|
type === "number" &&
|
|
8192
8257
|
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
|
|
8193
8258
|
)}
|
|
@@ -8237,7 +8302,9 @@ const TextField = React.forwardRef(
|
|
|
8237
8302
|
disabled: disabled || loading,
|
|
8238
8303
|
}),
|
|
8239
8304
|
size === "sm" ? "h-9 px-3" : "h-[42px] px-4",
|
|
8240
|
-
inputContainerClassName
|
|
8305
|
+
inputContainerClassName,
|
|
8306
|
+
derivedState === "error" &&
|
|
8307
|
+
"border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus-within:border-semantic-error-primary focus-within:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]"
|
|
8241
8308
|
)}
|
|
8242
8309
|
>
|
|
8243
8310
|
{prefix && (
|
|
@@ -8346,7 +8413,7 @@ const textareaVariants = cva(
|
|
|
8346
8413
|
default:
|
|
8347
8414
|
"border border-solid border-semantic-border-input focus:outline-none focus:border-semantic-border-input-focus focus:shadow-[0_0_0_1px_rgba(43,188,202,0.15)]",
|
|
8348
8415
|
error:
|
|
8349
|
-
"border border-solid border-semantic-error-primary focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8416
|
+
"border border-solid border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:outline-none focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8350
8417
|
},
|
|
8351
8418
|
size: {
|
|
8352
8419
|
default: "px-4 py-2.5 text-base",
|
|
@@ -8519,7 +8586,10 @@ const Textarea = React.forwardRef(
|
|
|
8519
8586
|
id={textareaId}
|
|
8520
8587
|
rows={rows}
|
|
8521
8588
|
className={cn(
|
|
8522
|
-
textareaVariants({ state: derivedState, size
|
|
8589
|
+
textareaVariants({ state: derivedState, size }),
|
|
8590
|
+
className,
|
|
8591
|
+
derivedState === "error" &&
|
|
8592
|
+
"border-semantic-error-primary shadow-[0_0_0_1px_rgba(240,68,56,0.12)] focus:border-semantic-error-primary focus:shadow-[0_0_0_1px_rgba(240,68,56,0.12)]",
|
|
8523
8593
|
resizeClasses[resize]
|
|
8524
8594
|
)}
|
|
8525
8595
|
disabled={disabled}
|
package/package.json
CHANGED