1 | 'use client';
|
2 |
|
3 | import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
4 | var _InputGlobalStyles;
|
5 | import * as React from 'react';
|
6 | import PropTypes from 'prop-types';
|
7 | import clsx from 'clsx';
|
8 | import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
|
9 | import refType from '@mui/utils/refType';
|
10 | import composeClasses from '@mui/utils/composeClasses';
|
11 | import TextareaAutosize from "../TextareaAutosize/index.js";
|
12 | import isHostComponent from "../utils/isHostComponent.js";
|
13 | import formControlState from "../FormControl/formControlState.js";
|
14 | import FormControlContext from "../FormControl/FormControlContext.js";
|
15 | import useFormControl from "../FormControl/useFormControl.js";
|
16 | import { styled, globalCss } from "../zero-styled/index.js";
|
17 | import memoTheme from "../utils/memoTheme.js";
|
18 | import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
19 | import capitalize from "../utils/capitalize.js";
|
20 | import useForkRef from "../utils/useForkRef.js";
|
21 | import useEnhancedEffect from "../utils/useEnhancedEffect.js";
|
22 | import { isFilled } from "./utils.js";
|
23 | import inputBaseClasses, { getInputBaseUtilityClass } from "./inputBaseClasses.js";
|
24 | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
25 | export const rootOverridesResolver = (props, styles) => {
|
26 | const {
|
27 | ownerState
|
28 | } = props;
|
29 | return [styles.root, ownerState.formControl && styles.formControl, ownerState.startAdornment && styles.adornedStart, ownerState.endAdornment && styles.adornedEnd, ownerState.error && styles.error, ownerState.size === 'small' && styles.sizeSmall, ownerState.multiline && styles.multiline, ownerState.color && styles[`color${capitalize(ownerState.color)}`], ownerState.fullWidth && styles.fullWidth, ownerState.hiddenLabel && styles.hiddenLabel];
|
30 | };
|
31 | export const inputOverridesResolver = (props, styles) => {
|
32 | const {
|
33 | ownerState
|
34 | } = props;
|
35 | return [styles.input, ownerState.size === 'small' && styles.inputSizeSmall, ownerState.multiline && styles.inputMultiline, ownerState.type === 'search' && styles.inputTypeSearch, ownerState.startAdornment && styles.inputAdornedStart, ownerState.endAdornment && styles.inputAdornedEnd, ownerState.hiddenLabel && styles.inputHiddenLabel];
|
36 | };
|
37 | const useUtilityClasses = ownerState => {
|
38 | const {
|
39 | classes,
|
40 | color,
|
41 | disabled,
|
42 | error,
|
43 | endAdornment,
|
44 | focused,
|
45 | formControl,
|
46 | fullWidth,
|
47 | hiddenLabel,
|
48 | multiline,
|
49 | readOnly,
|
50 | size,
|
51 | startAdornment,
|
52 | type
|
53 | } = ownerState;
|
54 | const slots = {
|
55 | root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size && size !== 'medium' && `size${capitalize(size)}`, multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
|
56 | input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
|
57 | };
|
58 | return composeClasses(slots, getInputBaseUtilityClass, classes);
|
59 | };
|
60 | export const InputBaseRoot = styled('div', {
|
61 | name: 'MuiInputBase',
|
62 | slot: 'Root',
|
63 | overridesResolver: rootOverridesResolver
|
64 | })(memoTheme(({
|
65 | theme
|
66 | }) => ({
|
67 | ...theme.typography.body1,
|
68 | color: (theme.vars || theme).palette.text.primary,
|
69 | lineHeight: '1.4375em',
|
70 |
|
71 | boxSizing: 'border-box',
|
72 |
|
73 | position: 'relative',
|
74 | cursor: 'text',
|
75 | display: 'inline-flex',
|
76 | alignItems: 'center',
|
77 | [`&.${inputBaseClasses.disabled}`]: {
|
78 | color: (theme.vars || theme).palette.text.disabled,
|
79 | cursor: 'default'
|
80 | },
|
81 | variants: [{
|
82 | props: ({
|
83 | ownerState
|
84 | }) => ownerState.multiline,
|
85 | style: {
|
86 | padding: '4px 0 5px'
|
87 | }
|
88 | }, {
|
89 | props: ({
|
90 | ownerState,
|
91 | size
|
92 | }) => ownerState.multiline && size === 'small',
|
93 | style: {
|
94 | paddingTop: 1
|
95 | }
|
96 | }, {
|
97 | props: ({
|
98 | ownerState
|
99 | }) => ownerState.fullWidth,
|
100 | style: {
|
101 | width: '100%'
|
102 | }
|
103 | }]
|
104 | })));
|
105 | export const InputBaseInput = styled('input', {
|
106 | name: 'MuiInputBase',
|
107 | slot: 'Input',
|
108 | overridesResolver: inputOverridesResolver
|
109 | })(memoTheme(({
|
110 | theme
|
111 | }) => {
|
112 | const light = theme.palette.mode === 'light';
|
113 | const placeholder = {
|
114 | color: 'currentColor',
|
115 | ...(theme.vars ? {
|
116 | opacity: theme.vars.opacity.inputPlaceholder
|
117 | } : {
|
118 | opacity: light ? 0.42 : 0.5
|
119 | }),
|
120 | transition: theme.transitions.create('opacity', {
|
121 | duration: theme.transitions.duration.shorter
|
122 | })
|
123 | };
|
124 | const placeholderHidden = {
|
125 | opacity: '0 !important'
|
126 | };
|
127 | const placeholderVisible = theme.vars ? {
|
128 | opacity: theme.vars.opacity.inputPlaceholder
|
129 | } : {
|
130 | opacity: light ? 0.42 : 0.5
|
131 | };
|
132 | return {
|
133 | font: 'inherit',
|
134 | letterSpacing: 'inherit',
|
135 | color: 'currentColor',
|
136 | padding: '4px 0 5px',
|
137 | border: 0,
|
138 | boxSizing: 'content-box',
|
139 | background: 'none',
|
140 | height: '1.4375em',
|
141 |
|
142 | margin: 0,
|
143 |
|
144 | WebkitTapHighlightColor: 'transparent',
|
145 | display: 'block',
|
146 |
|
147 | minWidth: 0,
|
148 | width: '100%',
|
149 | '&::-webkit-input-placeholder': placeholder,
|
150 | '&::-moz-placeholder': placeholder,
|
151 |
|
152 | '&::-ms-input-placeholder': placeholder,
|
153 |
|
154 | '&:focus': {
|
155 | outline: 0
|
156 | },
|
157 |
|
158 | '&:invalid': {
|
159 | boxShadow: 'none'
|
160 | },
|
161 | '&::-webkit-search-decoration': {
|
162 |
|
163 | WebkitAppearance: 'none'
|
164 | },
|
165 |
|
166 | [`label[data-shrink=false] + .${inputBaseClasses.formControl} &`]: {
|
167 | '&::-webkit-input-placeholder': placeholderHidden,
|
168 | '&::-moz-placeholder': placeholderHidden,
|
169 |
|
170 | '&::-ms-input-placeholder': placeholderHidden,
|
171 |
|
172 | '&:focus::-webkit-input-placeholder': placeholderVisible,
|
173 | '&:focus::-moz-placeholder': placeholderVisible,
|
174 |
|
175 | '&:focus::-ms-input-placeholder': placeholderVisible
|
176 | },
|
177 | [`&.${inputBaseClasses.disabled}`]: {
|
178 | opacity: 1,
|
179 |
|
180 | WebkitTextFillColor: (theme.vars || theme).palette.text.disabled
|
181 | },
|
182 | variants: [{
|
183 | props: ({
|
184 | ownerState
|
185 | }) => !ownerState.disableInjectingGlobalStyles,
|
186 | style: {
|
187 | animationName: 'mui-auto-fill-cancel',
|
188 | animationDuration: '10ms',
|
189 | '&:-webkit-autofill': {
|
190 | animationDuration: '5000s',
|
191 | animationName: 'mui-auto-fill'
|
192 | }
|
193 | }
|
194 | }, {
|
195 | props: {
|
196 | size: 'small'
|
197 | },
|
198 | style: {
|
199 | paddingTop: 1
|
200 | }
|
201 | }, {
|
202 | props: ({
|
203 | ownerState
|
204 | }) => ownerState.multiline,
|
205 | style: {
|
206 | height: 'auto',
|
207 | resize: 'none',
|
208 | padding: 0,
|
209 | paddingTop: 0
|
210 | }
|
211 | }, {
|
212 | props: {
|
213 | type: 'search'
|
214 | },
|
215 | style: {
|
216 | MozAppearance: 'textfield'
|
217 | }
|
218 | }]
|
219 | };
|
220 | }));
|
221 | const InputGlobalStyles = globalCss({
|
222 | '@keyframes mui-auto-fill': {
|
223 | from: {
|
224 | display: 'block'
|
225 | }
|
226 | },
|
227 | '@keyframes mui-auto-fill-cancel': {
|
228 | from: {
|
229 | display: 'block'
|
230 | }
|
231 | }
|
232 | });
|
233 |
|
234 |
|
235 |
|
236 |
|
237 |
|
238 |
|
239 | const InputBase = React.forwardRef(function InputBase(inProps, ref) {
|
240 | const props = useDefaultProps({
|
241 | props: inProps,
|
242 | name: 'MuiInputBase'
|
243 | });
|
244 | const {
|
245 | 'aria-describedby': ariaDescribedby,
|
246 | autoComplete,
|
247 | autoFocus,
|
248 | className,
|
249 | color,
|
250 | components = {},
|
251 | componentsProps = {},
|
252 | defaultValue,
|
253 | disabled,
|
254 | disableInjectingGlobalStyles,
|
255 | endAdornment,
|
256 | error,
|
257 | fullWidth = false,
|
258 | id,
|
259 | inputComponent = 'input',
|
260 | inputProps: inputPropsProp = {},
|
261 | inputRef: inputRefProp,
|
262 | margin,
|
263 | maxRows,
|
264 | minRows,
|
265 | multiline = false,
|
266 | name,
|
267 | onBlur,
|
268 | onChange,
|
269 | onClick,
|
270 | onFocus,
|
271 | onKeyDown,
|
272 | onKeyUp,
|
273 | placeholder,
|
274 | readOnly,
|
275 | renderSuffix,
|
276 | rows,
|
277 | size,
|
278 | slotProps = {},
|
279 | slots = {},
|
280 | startAdornment,
|
281 | type = 'text',
|
282 | value: valueProp,
|
283 | ...other
|
284 | } = props;
|
285 | const value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;
|
286 | const {
|
287 | current: isControlled
|
288 | } = React.useRef(value != null);
|
289 | const inputRef = React.useRef();
|
290 | const handleInputRefWarning = React.useCallback(instance => {
|
291 | if (process.env.NODE_ENV !== 'production') {
|
292 | if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {
|
293 | console.error(['MUI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `ref` prop.', 'Make sure the `ref` prop is called with a HTMLInputElement.'].join('\n'));
|
294 | }
|
295 | }
|
296 | }, []);
|
297 | const handleInputRef = useForkRef(inputRef, inputRefProp, inputPropsProp.ref, handleInputRefWarning);
|
298 | const [focused, setFocused] = React.useState(false);
|
299 | const muiFormControl = useFormControl();
|
300 | if (process.env.NODE_ENV !== 'production') {
|
301 |
|
302 |
|
303 | React.useEffect(() => {
|
304 | if (muiFormControl) {
|
305 | return muiFormControl.registerEffect();
|
306 | }
|
307 | return undefined;
|
308 | }, [muiFormControl]);
|
309 | }
|
310 | const fcs = formControlState({
|
311 | props,
|
312 | muiFormControl,
|
313 | states: ['color', 'disabled', 'error', 'hiddenLabel', 'size', 'required', 'filled']
|
314 | });
|
315 | fcs.focused = muiFormControl ? muiFormControl.focused : focused;
|
316 |
|
317 |
|
318 |
|
319 | React.useEffect(() => {
|
320 | if (!muiFormControl && disabled && focused) {
|
321 | setFocused(false);
|
322 | if (onBlur) {
|
323 | onBlur();
|
324 | }
|
325 | }
|
326 | }, [muiFormControl, disabled, focused, onBlur]);
|
327 | const onFilled = muiFormControl && muiFormControl.onFilled;
|
328 | const onEmpty = muiFormControl && muiFormControl.onEmpty;
|
329 | const checkDirty = React.useCallback(obj => {
|
330 | if (isFilled(obj)) {
|
331 | if (onFilled) {
|
332 | onFilled();
|
333 | }
|
334 | } else if (onEmpty) {
|
335 | onEmpty();
|
336 | }
|
337 | }, [onFilled, onEmpty]);
|
338 | useEnhancedEffect(() => {
|
339 | if (isControlled) {
|
340 | checkDirty({
|
341 | value
|
342 | });
|
343 | }
|
344 | }, [value, checkDirty, isControlled]);
|
345 | const handleFocus = event => {
|
346 | if (onFocus) {
|
347 | onFocus(event);
|
348 | }
|
349 | if (inputPropsProp.onFocus) {
|
350 | inputPropsProp.onFocus(event);
|
351 | }
|
352 | if (muiFormControl && muiFormControl.onFocus) {
|
353 | muiFormControl.onFocus(event);
|
354 | } else {
|
355 | setFocused(true);
|
356 | }
|
357 | };
|
358 | const handleBlur = event => {
|
359 | if (onBlur) {
|
360 | onBlur(event);
|
361 | }
|
362 | if (inputPropsProp.onBlur) {
|
363 | inputPropsProp.onBlur(event);
|
364 | }
|
365 | if (muiFormControl && muiFormControl.onBlur) {
|
366 | muiFormControl.onBlur(event);
|
367 | } else {
|
368 | setFocused(false);
|
369 | }
|
370 | };
|
371 | const handleChange = (event, ...args) => {
|
372 | if (!isControlled) {
|
373 | const element = event.target || inputRef.current;
|
374 | if (element == null) {
|
375 | throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: Expected valid input target. ' + 'Did you use a custom `inputComponent` and forget to forward refs? ' + 'See https://mui.com/r/input-component-ref-interface for more info.' : _formatMuiErrorMessage(1));
|
376 | }
|
377 | checkDirty({
|
378 | value: element.value
|
379 | });
|
380 | }
|
381 | if (inputPropsProp.onChange) {
|
382 | inputPropsProp.onChange(event, ...args);
|
383 | }
|
384 |
|
385 |
|
386 | if (onChange) {
|
387 | onChange(event, ...args);
|
388 | }
|
389 | };
|
390 |
|
391 |
|
392 |
|
393 | React.useEffect(() => {
|
394 | checkDirty(inputRef.current);
|
395 |
|
396 |
|
397 | }, []);
|
398 | const handleClick = event => {
|
399 | if (inputRef.current && event.currentTarget === event.target) {
|
400 | inputRef.current.focus();
|
401 | }
|
402 | if (onClick) {
|
403 | onClick(event);
|
404 | }
|
405 | };
|
406 | let InputComponent = inputComponent;
|
407 | let inputProps = inputPropsProp;
|
408 | if (multiline && InputComponent === 'input') {
|
409 | if (rows) {
|
410 | if (process.env.NODE_ENV !== 'production') {
|
411 | if (minRows || maxRows) {
|
412 | console.warn('MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set.');
|
413 | }
|
414 | }
|
415 | inputProps = {
|
416 | type: undefined,
|
417 | minRows: rows,
|
418 | maxRows: rows,
|
419 | ...inputProps
|
420 | };
|
421 | } else {
|
422 | inputProps = {
|
423 | type: undefined,
|
424 | maxRows,
|
425 | minRows,
|
426 | ...inputProps
|
427 | };
|
428 | }
|
429 | InputComponent = TextareaAutosize;
|
430 | }
|
431 | const handleAutoFill = event => {
|
432 |
|
433 | checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {
|
434 | value: 'x'
|
435 | });
|
436 | };
|
437 | React.useEffect(() => {
|
438 | if (muiFormControl) {
|
439 | muiFormControl.setAdornedStart(Boolean(startAdornment));
|
440 | }
|
441 | }, [muiFormControl, startAdornment]);
|
442 | const ownerState = {
|
443 | ...props,
|
444 | color: fcs.color || 'primary',
|
445 | disabled: fcs.disabled,
|
446 | endAdornment,
|
447 | error: fcs.error,
|
448 | focused: fcs.focused,
|
449 | formControl: muiFormControl,
|
450 | fullWidth,
|
451 | hiddenLabel: fcs.hiddenLabel,
|
452 | multiline,
|
453 | size: fcs.size,
|
454 | startAdornment,
|
455 | type
|
456 | };
|
457 | const classes = useUtilityClasses(ownerState);
|
458 | const Root = slots.root || components.Root || InputBaseRoot;
|
459 | const rootProps = slotProps.root || componentsProps.root || {};
|
460 | const Input = slots.input || components.Input || InputBaseInput;
|
461 | inputProps = {
|
462 | ...inputProps,
|
463 | ...(slotProps.input ?? componentsProps.input)
|
464 | };
|
465 | return _jsxs(React.Fragment, {
|
466 | children: [!disableInjectingGlobalStyles && typeof InputGlobalStyles === 'function' && (
|
467 |
|
468 | _InputGlobalStyles || (_InputGlobalStyles = _jsx(InputGlobalStyles, {}))), _jsxs(Root, {
|
469 | ...rootProps,
|
470 | ref: ref,
|
471 | onClick: handleClick,
|
472 | ...other,
|
473 | ...(!isHostComponent(Root) && {
|
474 | ownerState: {
|
475 | ...ownerState,
|
476 | ...rootProps.ownerState
|
477 | }
|
478 | }),
|
479 | className: clsx(classes.root, rootProps.className, className, readOnly && 'MuiInputBase-readOnly'),
|
480 | children: [startAdornment, _jsx(FormControlContext.Provider, {
|
481 | value: null,
|
482 | children: _jsx(Input, {
|
483 | "aria-invalid": fcs.error,
|
484 | "aria-describedby": ariaDescribedby,
|
485 | autoComplete: autoComplete,
|
486 | autoFocus: autoFocus,
|
487 | defaultValue: defaultValue,
|
488 | disabled: fcs.disabled,
|
489 | id: id,
|
490 | onAnimationStart: handleAutoFill,
|
491 | name: name,
|
492 | placeholder: placeholder,
|
493 | readOnly: readOnly,
|
494 | required: fcs.required,
|
495 | rows: rows,
|
496 | value: value,
|
497 | onKeyDown: onKeyDown,
|
498 | onKeyUp: onKeyUp,
|
499 | type: type,
|
500 | ...inputProps,
|
501 | ...(!isHostComponent(Input) && {
|
502 | as: InputComponent,
|
503 | ownerState: {
|
504 | ...ownerState,
|
505 | ...inputProps.ownerState
|
506 | }
|
507 | }),
|
508 | ref: handleInputRef,
|
509 | className: clsx(classes.input, inputProps.className, readOnly && 'MuiInputBase-readOnly'),
|
510 | onBlur: handleBlur,
|
511 | onChange: handleChange,
|
512 | onFocus: handleFocus
|
513 | })
|
514 | }), endAdornment, renderSuffix ? renderSuffix({
|
515 | ...fcs,
|
516 | startAdornment
|
517 | }) : null]
|
518 | })]
|
519 | });
|
520 | });
|
521 | process.env.NODE_ENV !== "production" ? InputBase.propTypes = {
|
522 |
|
523 |
|
524 |
|
525 |
|
526 | |
527 |
|
528 |
|
529 | 'aria-describedby': PropTypes.string,
|
530 | |
531 |
|
532 |
|
533 |
|
534 |
|
535 | autoComplete: PropTypes.string,
|
536 | |
537 |
|
538 |
|
539 | autoFocus: PropTypes.bool,
|
540 | |
541 |
|
542 |
|
543 | classes: PropTypes.object,
|
544 | |
545 |
|
546 |
|
547 | className: PropTypes.string,
|
548 | |
549 |
|
550 |
|
551 |
|
552 |
|
553 |
|
554 | color: PropTypes .oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
|
555 | |
556 |
|
557 |
|
558 |
|
559 |
|
560 |
|
561 |
|
562 | components: PropTypes.shape({
|
563 | Input: PropTypes.elementType,
|
564 | Root: PropTypes.elementType
|
565 | }),
|
566 | |
567 |
|
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 |
|
574 | componentsProps: PropTypes.shape({
|
575 | input: PropTypes.object,
|
576 | root: PropTypes.object
|
577 | }),
|
578 | |
579 |
|
580 |
|
581 | defaultValue: PropTypes.any,
|
582 | |
583 |
|
584 |
|
585 |
|
586 | disabled: PropTypes.bool,
|
587 | |
588 |
|
589 |
|
590 |
|
591 |
|
592 | disableInjectingGlobalStyles: PropTypes.bool,
|
593 | |
594 |
|
595 |
|
596 | endAdornment: PropTypes.node,
|
597 | |
598 |
|
599 |
|
600 |
|
601 | error: PropTypes.bool,
|
602 | |
603 |
|
604 |
|
605 |
|
606 | fullWidth: PropTypes.bool,
|
607 | |
608 |
|
609 |
|
610 | id: PropTypes.string,
|
611 | |
612 |
|
613 |
|
614 |
|
615 |
|
616 | inputComponent: elementTypeAcceptingRef,
|
617 | |
618 |
|
619 |
|
620 |
|
621 | inputProps: PropTypes.object,
|
622 | |
623 |
|
624 |
|
625 | inputRef: refType,
|
626 | |
627 |
|
628 |
|
629 |
|
630 |
|
631 | margin: PropTypes.oneOf(['dense', 'none']),
|
632 | |
633 |
|
634 |
|
635 | maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
636 | |
637 |
|
638 |
|
639 | minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
640 | |
641 |
|
642 |
|
643 |
|
644 | multiline: PropTypes.bool,
|
645 | |
646 |
|
647 |
|
648 | name: PropTypes.string,
|
649 | |
650 |
|
651 |
|
652 |
|
653 |
|
654 | onBlur: PropTypes.func,
|
655 | |
656 |
|
657 |
|
658 |
|
659 |
|
660 |
|
661 | onChange: PropTypes.func,
|
662 | |
663 |
|
664 |
|
665 | onClick: PropTypes.func,
|
666 | |
667 |
|
668 |
|
669 | onFocus: PropTypes.func,
|
670 | |
671 |
|
672 |
|
673 | onInvalid: PropTypes.func,
|
674 | |
675 |
|
676 |
|
677 | onKeyDown: PropTypes.func,
|
678 | |
679 |
|
680 |
|
681 | onKeyUp: PropTypes.func,
|
682 | |
683 |
|
684 |
|
685 | placeholder: PropTypes.string,
|
686 | |
687 |
|
688 |
|
689 |
|
690 | readOnly: PropTypes.bool,
|
691 | |
692 |
|
693 |
|
694 | renderSuffix: PropTypes.func,
|
695 | |
696 |
|
697 |
|
698 |
|
699 | required: PropTypes.bool,
|
700 | |
701 |
|
702 |
|
703 | rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
704 | |
705 |
|
706 |
|
707 | size: PropTypes .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
|
708 | |
709 |
|
710 |
|
711 |
|
712 |
|
713 |
|
714 |
|
715 |
|
716 | slotProps: PropTypes.shape({
|
717 | input: PropTypes.object,
|
718 | root: PropTypes.object
|
719 | }),
|
720 | |
721 |
|
722 |
|
723 |
|
724 |
|
725 |
|
726 |
|
727 | slots: PropTypes.shape({
|
728 | input: PropTypes.elementType,
|
729 | root: PropTypes.elementType
|
730 | }),
|
731 | |
732 |
|
733 |
|
734 | startAdornment: PropTypes.node,
|
735 | |
736 |
|
737 |
|
738 | sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
739 | |
740 |
|
741 |
|
742 |
|
743 | type: PropTypes.string,
|
744 | |
745 |
|
746 |
|
747 | value: PropTypes.any
|
748 | } : void 0;
|
749 | export default InputBase; |
\ | No newline at end of file |