@@ -48,6 +48,7 @@ import {
48
48
import { type FC , useEffect , useId , useRef , useState } from "react" ;
49
49
import type { AutofillBuildParameter } from "utils/richParameters" ;
50
50
import * as Yup from "yup" ;
51
+ import { cn } from "utils/cn" ;
51
52
52
53
interface DynamicParameterProps {
53
54
parameter : PreviewParameter ;
@@ -317,7 +318,12 @@ const DebouncedParameterField: FC<DebouncedParameterFieldProps> = ({
317
318
< Textarea
318
319
ref = { textareaRef }
319
320
id = { id }
320
- className = "overflow-y-auto max-h-[500px]"
321
+ className = { cn (
322
+ "overflow-y-auto max-h-[500px]" ,
323
+ parameter . styling ?. mask_input &&
324
+ ! showMaskedInput &&
325
+ "[-webkit-text-security:disc]" ,
326
+ ) }
321
327
value = { localValue }
322
328
onChange = { ( e ) => {
323
329
const target = e . currentTarget ;
@@ -335,8 +341,9 @@ const DebouncedParameterField: FC<DebouncedParameterFieldProps> = ({
335
341
type = "button"
336
342
variant = "subtle"
337
343
size = "sm"
338
- className = "absolute top-2 right-2 h-6 w-6 p-0"
339
- onClick = { ( ) => setShowMaskedInput ( ! showMaskedInput ) }
344
+ className = "absolute top-1 right-1 h-6 w-6 p-0"
345
+ onMouseDown = { ( ) => setShowMaskedInput ( true ) }
346
+ onMouseUp = { ( ) => setShowMaskedInput ( false ) }
340
347
disabled = { disabled }
341
348
>
342
349
{ showMaskedInput ? (
@@ -391,8 +398,9 @@ const DebouncedParameterField: FC<DebouncedParameterFieldProps> = ({
391
398
type = "button"
392
399
variant = "subtle"
393
400
size = "sm"
394
- className = "absolute top-1/2 right-2 h-6 w-6 p-0 -translate-y-1/2"
395
- onClick = { ( ) => setShowMaskedInput ( ! showMaskedInput ) }
401
+ className = "absolute top-1/2 right-1 h-6 w-6 p-0"
402
+ onMouseDown = { ( ) => setShowMaskedInput ( true ) }
403
+ onMouseUp = { ( ) => setShowMaskedInput ( false ) }
396
404
disabled = { disabled }
397
405
>
398
406
{ showMaskedInput ? (
@@ -682,8 +690,8 @@ const ParameterDiagnostics: FC<ParameterDiagnosticsProps> = ({
682
690
< div
683
691
key = { `parameter-diagnostic-${ diagnostic . summary } -${ index } ` }
684
692
className = { `text-xs px-1 ${ diagnostic . severity === "error"
685
- ? "text-content-destructive"
686
- : "text-content-warning"
693
+ ? "text-content-destructive"
694
+ : "text-content-warning"
687
695
} `}
688
696
>
689
697
< p className = "font-medium" > { diagnostic . summary } </ p >
0 commit comments