aural-ui 2.1.7 → 2.1.8
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.
|
@@ -95,6 +95,7 @@ type InputProps = {
|
|
|
95
95
|
min?: number
|
|
96
96
|
max?: number
|
|
97
97
|
unstyled?: boolean
|
|
98
|
+
transparentOnAutofill?: boolean
|
|
98
99
|
classes?: {
|
|
99
100
|
root?: string
|
|
100
101
|
label?: string
|
|
@@ -237,6 +238,7 @@ const InputBase = forwardRef<
|
|
|
237
238
|
maxLength?: number
|
|
238
239
|
startIcon?: boolean // Indicates if start icon spacing should be applied
|
|
239
240
|
endIcon?: boolean // Indicates if end icon spacing should be applied
|
|
241
|
+
transparentOnAutofill?: boolean
|
|
240
242
|
} & Omit<
|
|
241
243
|
React.InputHTMLAttributes<HTMLInputElement>,
|
|
242
244
|
"onChange" | "onBlur" | "onFocus" | "defaultValue"
|
|
@@ -263,6 +265,7 @@ const InputBase = forwardRef<
|
|
|
263
265
|
startIcon = false,
|
|
264
266
|
endIcon = false,
|
|
265
267
|
ariaLabel,
|
|
268
|
+
transparentOnAutofill = false,
|
|
266
269
|
...props
|
|
267
270
|
},
|
|
268
271
|
ref
|
|
@@ -289,6 +292,16 @@ const InputBase = forwardRef<
|
|
|
289
292
|
// Determine focus state
|
|
290
293
|
const state = disabled ? "disabled" : isFocused ? "focused" : "default"
|
|
291
294
|
|
|
295
|
+
const autoFillStyle = transparentOnAutofill
|
|
296
|
+
? {
|
|
297
|
+
WebkitTextFillColor: "#ffffff",
|
|
298
|
+
color: "#ffffff",
|
|
299
|
+
caretColor: "#ffffff",
|
|
300
|
+
transition: "background-color 999999s ease-in-out 0s",
|
|
301
|
+
backgroundColor: "transparent",
|
|
302
|
+
}
|
|
303
|
+
: {}
|
|
304
|
+
|
|
292
305
|
// Apply styles only if not unstyled
|
|
293
306
|
const inputClassName = unstyled
|
|
294
307
|
? className
|
|
@@ -322,6 +335,7 @@ const InputBase = forwardRef<
|
|
|
322
335
|
onBlur={handleBlur}
|
|
323
336
|
required={required}
|
|
324
337
|
maxLength={maxLength}
|
|
338
|
+
style={autoFillStyle}
|
|
325
339
|
{...props}
|
|
326
340
|
/>
|
|
327
341
|
)
|
|
@@ -356,6 +370,7 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
|
356
370
|
decoration,
|
|
357
371
|
unstyled = false,
|
|
358
372
|
classes = {},
|
|
373
|
+
transparentOnAutofill = false,
|
|
359
374
|
...props
|
|
360
375
|
},
|
|
361
376
|
ref
|
|
@@ -436,6 +451,7 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
|
436
451
|
endIcon={!!(endIcon || type === "password")}
|
|
437
452
|
unstyled={unstyled}
|
|
438
453
|
className={unstyled ? className : classes.input}
|
|
454
|
+
transparentOnAutofill={transparentOnAutofill}
|
|
439
455
|
{...props}
|
|
440
456
|
/>
|
|
441
457
|
|