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