worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
342
node_modules/@mui/material/TextField/TextField.d.ts
generated
vendored
Normal file
342
node_modules/@mui/material/TextField/TextField.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,342 @@
|
|||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { OverridableStringUnion } from '@mui/types';
|
||||
import { Theme } from "../styles/index.js";
|
||||
import { InternalStandardProps as StandardProps } from "../internal/index.js";
|
||||
import { FormControlProps } from "../FormControl/index.js";
|
||||
import { FormHelperTextProps } from "../FormHelperText/index.js";
|
||||
import { InputBaseProps } from "../InputBase/index.js";
|
||||
import { InputProps as StandardInputProps } from "../Input/index.js";
|
||||
import { FilledInputProps } from "../FilledInput/index.js";
|
||||
import { OutlinedInputProps } from "../OutlinedInput/index.js";
|
||||
import { InputLabelProps } from "../InputLabel/index.js";
|
||||
import { SelectProps } from "../Select/index.js";
|
||||
import { TextFieldClasses } from "./textFieldClasses.js";
|
||||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
|
||||
export interface TextFieldPropsColorOverrides {}
|
||||
export interface TextFieldPropsSizeOverrides {}
|
||||
export interface TextFieldSlots {
|
||||
/**
|
||||
* The component that renders the root.
|
||||
* @default FormControl
|
||||
*/
|
||||
root: React.ElementType;
|
||||
/**
|
||||
* The component that renders the input.
|
||||
* @default OutlinedInput
|
||||
*/
|
||||
input: React.ElementType;
|
||||
/**
|
||||
* The component that renders the input's label.
|
||||
* @default InputLabel
|
||||
*/
|
||||
inputLabel: React.ElementType;
|
||||
/**
|
||||
* The html input element.
|
||||
* @default 'input'
|
||||
*/
|
||||
htmlInput: React.ElementType;
|
||||
/**
|
||||
* The component that renders the helper text.
|
||||
* @default FormHelperText
|
||||
*/
|
||||
formHelperText: React.ElementType;
|
||||
/**
|
||||
* The component that renders the select.
|
||||
* @default Select
|
||||
*/
|
||||
select: React.ElementType;
|
||||
}
|
||||
export type TextFieldSlotsAndSlotProps<InputPropsType> = CreateSlotsAndSlotProps<TextFieldSlots, {
|
||||
/**
|
||||
* Props forwarded to the root slot.
|
||||
* By default, the avaible props are based on the [FormControl](https://mui.com/material-ui/api/form-control/#props) component.
|
||||
*/
|
||||
root: SlotProps<React.ElementType<FormControlProps>, {}, TextFieldOwnerState>;
|
||||
/**
|
||||
* Props forwarded to the input slot.
|
||||
* By default, the avaible props are based on the [Input](https://mui.com/material-ui/api/input/#props) component.
|
||||
*/
|
||||
input: SlotProps<React.ElementType<InputPropsType>, {}, TextFieldOwnerState>;
|
||||
/**
|
||||
* Props forwarded to the input label slot.
|
||||
* By default, the avaible props are based on the [InputLabel](https://mui.com/material-ui/api/input-label/#props) component.
|
||||
*/
|
||||
inputLabel: SlotProps<React.ElementType<InputLabelProps>, {}, TextFieldOwnerState>;
|
||||
/**
|
||||
* Props forwarded to the html input slot.
|
||||
* By default, the avaible props are based on the html input element.
|
||||
*/
|
||||
htmlInput: SlotProps<React.ElementType<InputBaseProps['inputProps']>, {}, TextFieldOwnerState>;
|
||||
/**
|
||||
* Props forwarded to the form helper text slot.
|
||||
* By default, the avaible props are based on the [FormHelperText](https://mui.com/material-ui/api/form-helper-text/#props) component.
|
||||
*/
|
||||
formHelperText: SlotProps<React.ElementType<FormHelperTextProps>, {}, TextFieldOwnerState>;
|
||||
/**
|
||||
* Props forwarded to the select slot.
|
||||
* By default, the avaible props are based on the [Select](https://mui.com/material-ui/api/select/#props) component.
|
||||
*/
|
||||
select: SlotProps<React.ElementType<SelectProps>, {}, TextFieldOwnerState>;
|
||||
}>;
|
||||
export interface BaseTextFieldProps extends StandardProps<FormControlProps,
|
||||
// event handlers are declared on derived interfaces
|
||||
'onChange' | 'onBlur' | 'onFocus' | 'defaultValue'> {
|
||||
/**
|
||||
* This prop helps users to fill forms faster, especially on mobile devices.
|
||||
* The name can be confusing, as it's more like an autofill.
|
||||
* You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
|
||||
*/
|
||||
autoComplete?: string;
|
||||
/**
|
||||
* If `true`, the `input` element is focused during the first mount.
|
||||
* @default false
|
||||
*/
|
||||
autoFocus?: boolean;
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
children?: FormControlProps['children'];
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<TextFieldClasses>;
|
||||
/**
|
||||
* The color of the component.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
* @default 'primary'
|
||||
*/
|
||||
color?: OverridableStringUnion<'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning', TextFieldPropsColorOverrides>;
|
||||
/**
|
||||
* The default value. Use when the component is not controlled.
|
||||
*/
|
||||
defaultValue?: unknown;
|
||||
/**
|
||||
* If `true`, the component is disabled.
|
||||
* @default false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* If `true`, the label is displayed in an error state.
|
||||
* @default false
|
||||
*/
|
||||
error?: boolean;
|
||||
/**
|
||||
* Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
|
||||
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
FormHelperTextProps?: Partial<FormHelperTextProps>;
|
||||
/**
|
||||
* If `true`, the input will take up the full width of its container.
|
||||
* @default false
|
||||
*/
|
||||
fullWidth?: boolean;
|
||||
/**
|
||||
* The helper text content.
|
||||
*/
|
||||
helperText?: React.ReactNode;
|
||||
/**
|
||||
* The id of the `input` element.
|
||||
* Use this prop to make `label` and `helperText` accessible for screen readers.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
|
||||
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
||||
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
InputLabelProps?: Partial<InputLabelProps>;
|
||||
/**
|
||||
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.
|
||||
* @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
inputProps?: InputBaseProps['inputProps'];
|
||||
/**
|
||||
* Pass a ref to the `input` element.
|
||||
*/
|
||||
inputRef?: React.Ref<any>;
|
||||
/**
|
||||
* The label content.
|
||||
*/
|
||||
label?: React.ReactNode;
|
||||
/**
|
||||
* If `true`, a `textarea` element is rendered instead of an input.
|
||||
* @default false
|
||||
*/
|
||||
multiline?: boolean;
|
||||
/**
|
||||
* Name attribute of the `input` element.
|
||||
*/
|
||||
name?: string;
|
||||
onBlur?: InputBaseProps['onBlur'];
|
||||
onFocus?: StandardInputProps['onFocus'];
|
||||
/**
|
||||
* The short hint displayed in the `input` before the user enters a value.
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* If `true`, the label is displayed as required and the `input` element is required.
|
||||
* @default false
|
||||
*/
|
||||
required?: boolean;
|
||||
/**
|
||||
* Number of rows to display when multiline option is set to true.
|
||||
*/
|
||||
rows?: string | number;
|
||||
/**
|
||||
* Maximum number of rows to display when multiline option is set to true.
|
||||
*/
|
||||
maxRows?: string | number;
|
||||
/**
|
||||
* Minimum number of rows to display when multiline option is set to true.
|
||||
*/
|
||||
minRows?: string | number;
|
||||
/**
|
||||
* Render a [`Select`](https://mui.com/material-ui/api/select/) element while passing the Input element to `Select` as `input` parameter.
|
||||
* If this option is set you must pass the options of the select as children.
|
||||
* @default false
|
||||
*/
|
||||
select?: boolean;
|
||||
/**
|
||||
* Props applied to the [`Select`](https://mui.com/material-ui/api/select/) element.
|
||||
* @deprecated Use `slotProps.select` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
SelectProps?: Partial<SelectProps>;
|
||||
/**
|
||||
* The size of the component.
|
||||
* @default 'medium'
|
||||
*/
|
||||
size?: OverridableStringUnion<'small' | 'medium', TextFieldPropsSizeOverrides>;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).
|
||||
*/
|
||||
type?: React.InputHTMLAttributes<unknown>['type'];
|
||||
/**
|
||||
* The value of the `input` element, required for a controlled component.
|
||||
*/
|
||||
value?: unknown;
|
||||
}
|
||||
export interface StandardTextFieldProps extends BaseTextFieldProps, TextFieldSlotsAndSlotProps<StandardInputProps> {
|
||||
/**
|
||||
* Callback fired when the value is changed.
|
||||
*
|
||||
* @param {object} event The event source of the callback.
|
||||
* You can pull out the new value by accessing `event.target.value` (string).
|
||||
*/
|
||||
onChange?: StandardInputProps['onChange'];
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'outlined'
|
||||
*/
|
||||
variant?: 'standard';
|
||||
/**
|
||||
* Props applied to the Input element.
|
||||
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
||||
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
||||
* component depending on the `variant` prop value.
|
||||
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
InputProps?: Partial<StandardInputProps>;
|
||||
}
|
||||
export interface FilledTextFieldProps extends BaseTextFieldProps, TextFieldSlotsAndSlotProps<FilledInputProps> {
|
||||
/**
|
||||
* Callback fired when the value is changed.
|
||||
*
|
||||
* @param {object} event The event source of the callback.
|
||||
* You can pull out the new value by accessing `event.target.value` (string).
|
||||
*/
|
||||
onChange?: FilledInputProps['onChange'];
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'outlined'
|
||||
*/
|
||||
variant: 'filled';
|
||||
/**
|
||||
* Props applied to the Input element.
|
||||
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
||||
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
||||
* component depending on the `variant` prop value.
|
||||
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
InputProps?: Partial<FilledInputProps>;
|
||||
}
|
||||
export interface OutlinedTextFieldProps extends BaseTextFieldProps, TextFieldSlotsAndSlotProps<OutlinedInputProps> {
|
||||
/**
|
||||
* Callback fired when the value is changed.
|
||||
*
|
||||
* @param {object} event The event source of the callback.
|
||||
* You can pull out the new value by accessing `event.target.value` (string).
|
||||
*/
|
||||
onChange?: OutlinedInputProps['onChange'];
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'outlined'
|
||||
*/
|
||||
variant: 'outlined';
|
||||
/**
|
||||
* Props applied to the Input element.
|
||||
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
||||
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
||||
* component depending on the `variant` prop value.
|
||||
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
InputProps?: Partial<OutlinedInputProps>;
|
||||
}
|
||||
export type TextFieldVariants = 'outlined' | 'standard' | 'filled';
|
||||
export type TextFieldProps<Variant extends TextFieldVariants = TextFieldVariants> = Variant extends 'filled' ? FilledTextFieldProps : Variant extends 'standard' ? StandardTextFieldProps : OutlinedTextFieldProps;
|
||||
export type TextFieldOwnerState = BaseTextFieldProps;
|
||||
|
||||
/**
|
||||
* The `TextField` is a convenience wrapper for the most common cases (80%).
|
||||
* It cannot be all things to all people, otherwise the API would grow out of control.
|
||||
*
|
||||
* ## Advanced Configuration
|
||||
*
|
||||
* It's important to understand that the text field is a simple abstraction
|
||||
* on top of the following components:
|
||||
*
|
||||
* * [FormControl](https://mui.com/material-ui/api/form-control/)
|
||||
* * [InputLabel](https://mui.com/material-ui/api/input-label/)
|
||||
* * [FilledInput](https://mui.com/material-ui/api/filled-input/)
|
||||
* * [OutlinedInput](https://mui.com/material-ui/api/outlined-input/)
|
||||
* * [Input](https://mui.com/material-ui/api/input/)
|
||||
* * [FormHelperText](https://mui.com/material-ui/api/form-helper-text/)
|
||||
*
|
||||
* If you wish to alter the props applied to the `input` element, you can do so as follows:
|
||||
*
|
||||
* ```jsx
|
||||
* const inputProps = {
|
||||
* step: 300,
|
||||
* };
|
||||
*
|
||||
* return <TextField id="time" type="time" inputProps={inputProps} />;
|
||||
* ```
|
||||
*
|
||||
* For advanced cases, please look at the source of TextField by clicking on the
|
||||
* "Edit this page" button above. Consider either:
|
||||
*
|
||||
* * using the upper case props for passing values directly to the components
|
||||
* * using the underlying components directly as shown in the demos
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)
|
||||
* - [Text Field](https://mui.com/material-ui/react-text-field/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [TextField API](https://mui.com/material-ui/api/text-field/)
|
||||
* - inherits [FormControl API](https://mui.com/material-ui/api/form-control/)
|
||||
*/
|
||||
export default function TextField<Variant extends TextFieldVariants>(props: {
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'outlined'
|
||||
*/
|
||||
variant?: Variant;
|
||||
} & Omit<TextFieldProps, 'variant'>): React.JSX.Element;
|
||||
463
node_modules/@mui/material/TextField/TextField.js
generated
vendored
Normal file
463
node_modules/@mui/material/TextField/TextField.js
generated
vendored
Normal file
|
|
@ -0,0 +1,463 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _clsx = _interopRequireDefault(require("clsx"));
|
||||
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
||||
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
||||
var _refType = _interopRequireDefault(require("@mui/utils/refType"));
|
||||
var _zeroStyled = require("../zero-styled");
|
||||
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
||||
var _Input = _interopRequireDefault(require("../Input"));
|
||||
var _FilledInput = _interopRequireDefault(require("../FilledInput"));
|
||||
var _OutlinedInput = _interopRequireDefault(require("../OutlinedInput"));
|
||||
var _InputLabel = _interopRequireDefault(require("../InputLabel"));
|
||||
var _FormControl = _interopRequireDefault(require("../FormControl"));
|
||||
var _FormHelperText = _interopRequireDefault(require("../FormHelperText"));
|
||||
var _Select = _interopRequireDefault(require("../Select"));
|
||||
var _textFieldClasses = require("./textFieldClasses");
|
||||
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
const variantComponent = {
|
||||
standard: _Input.default,
|
||||
filled: _FilledInput.default,
|
||||
outlined: _OutlinedInput.default
|
||||
};
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root']
|
||||
};
|
||||
return (0, _composeClasses.default)(slots, _textFieldClasses.getTextFieldUtilityClass, classes);
|
||||
};
|
||||
const TextFieldRoot = (0, _zeroStyled.styled)(_FormControl.default, {
|
||||
name: 'MuiTextField',
|
||||
slot: 'Root'
|
||||
})({});
|
||||
|
||||
/**
|
||||
* The `TextField` is a convenience wrapper for the most common cases (80%).
|
||||
* It cannot be all things to all people, otherwise the API would grow out of control.
|
||||
*
|
||||
* ## Advanced Configuration
|
||||
*
|
||||
* It's important to understand that the text field is a simple abstraction
|
||||
* on top of the following components:
|
||||
*
|
||||
* - [FormControl](/material-ui/api/form-control/)
|
||||
* - [InputLabel](/material-ui/api/input-label/)
|
||||
* - [FilledInput](/material-ui/api/filled-input/)
|
||||
* - [OutlinedInput](/material-ui/api/outlined-input/)
|
||||
* - [Input](/material-ui/api/input/)
|
||||
* - [FormHelperText](/material-ui/api/form-helper-text/)
|
||||
*
|
||||
* If you wish to alter the props applied to the `input` element, you can do so as follows:
|
||||
*
|
||||
* ```jsx
|
||||
* const inputProps = {
|
||||
* step: 300,
|
||||
* };
|
||||
*
|
||||
* return <TextField id="time" type="time" inputProps={inputProps} />;
|
||||
* ```
|
||||
*
|
||||
* For advanced cases, please look at the source of TextField by clicking on the
|
||||
* "Edit this page" button above. Consider either:
|
||||
*
|
||||
* - using the upper case props for passing values directly to the components
|
||||
* - using the underlying components directly as shown in the demos
|
||||
*/
|
||||
const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref) {
|
||||
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
||||
props: inProps,
|
||||
name: 'MuiTextField'
|
||||
});
|
||||
const {
|
||||
autoComplete,
|
||||
autoFocus = false,
|
||||
children,
|
||||
className,
|
||||
color = 'primary',
|
||||
defaultValue,
|
||||
disabled = false,
|
||||
error = false,
|
||||
FormHelperTextProps: FormHelperTextPropsProp,
|
||||
fullWidth = false,
|
||||
helperText,
|
||||
id: idOverride,
|
||||
InputLabelProps: InputLabelPropsProp,
|
||||
inputProps: inputPropsProp,
|
||||
InputProps: InputPropsProp,
|
||||
inputRef,
|
||||
label,
|
||||
maxRows,
|
||||
minRows,
|
||||
multiline = false,
|
||||
name,
|
||||
onBlur,
|
||||
onChange,
|
||||
onFocus,
|
||||
placeholder,
|
||||
required = false,
|
||||
rows,
|
||||
select = false,
|
||||
SelectProps: SelectPropsProp,
|
||||
slots = {},
|
||||
slotProps = {},
|
||||
type,
|
||||
value,
|
||||
variant = 'outlined',
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = {
|
||||
...props,
|
||||
autoFocus,
|
||||
color,
|
||||
disabled,
|
||||
error,
|
||||
fullWidth,
|
||||
multiline,
|
||||
required,
|
||||
select,
|
||||
variant
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (select && !children) {
|
||||
console.error('MUI: `children` must be passed when using the `TextField` component with `select`.');
|
||||
}
|
||||
}
|
||||
const id = (0, _useId.default)(idOverride);
|
||||
const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
|
||||
const inputLabelId = label && id ? `${id}-label` : undefined;
|
||||
const InputComponent = variantComponent[variant];
|
||||
const externalForwardedProps = {
|
||||
slots,
|
||||
slotProps: {
|
||||
input: InputPropsProp,
|
||||
inputLabel: InputLabelPropsProp,
|
||||
htmlInput: inputPropsProp,
|
||||
formHelperText: FormHelperTextPropsProp,
|
||||
select: SelectPropsProp,
|
||||
...slotProps
|
||||
}
|
||||
};
|
||||
const inputAdditionalProps = {};
|
||||
const inputLabelSlotProps = externalForwardedProps.slotProps.inputLabel;
|
||||
if (variant === 'outlined') {
|
||||
if (inputLabelSlotProps && typeof inputLabelSlotProps.shrink !== 'undefined') {
|
||||
inputAdditionalProps.notched = inputLabelSlotProps.shrink;
|
||||
}
|
||||
inputAdditionalProps.label = label;
|
||||
}
|
||||
if (select) {
|
||||
// unset defaults from textbox inputs
|
||||
if (!SelectPropsProp || !SelectPropsProp.native) {
|
||||
inputAdditionalProps.id = undefined;
|
||||
}
|
||||
inputAdditionalProps['aria-describedby'] = undefined;
|
||||
}
|
||||
const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
|
||||
elementType: TextFieldRoot,
|
||||
shouldForwardComponentProp: true,
|
||||
externalForwardedProps: {
|
||||
...externalForwardedProps,
|
||||
...other
|
||||
},
|
||||
ownerState,
|
||||
className: (0, _clsx.default)(classes.root, className),
|
||||
ref,
|
||||
additionalProps: {
|
||||
disabled,
|
||||
error,
|
||||
fullWidth,
|
||||
required,
|
||||
color,
|
||||
variant
|
||||
}
|
||||
});
|
||||
const [InputSlot, inputProps] = (0, _useSlot.default)('input', {
|
||||
elementType: InputComponent,
|
||||
externalForwardedProps,
|
||||
additionalProps: inputAdditionalProps,
|
||||
ownerState
|
||||
});
|
||||
const [InputLabelSlot, inputLabelProps] = (0, _useSlot.default)('inputLabel', {
|
||||
elementType: _InputLabel.default,
|
||||
externalForwardedProps,
|
||||
ownerState
|
||||
});
|
||||
const [HtmlInputSlot, htmlInputProps] = (0, _useSlot.default)('htmlInput', {
|
||||
elementType: 'input',
|
||||
externalForwardedProps,
|
||||
ownerState
|
||||
});
|
||||
const [FormHelperTextSlot, formHelperTextProps] = (0, _useSlot.default)('formHelperText', {
|
||||
elementType: _FormHelperText.default,
|
||||
externalForwardedProps,
|
||||
ownerState
|
||||
});
|
||||
const [SelectSlot, selectProps] = (0, _useSlot.default)('select', {
|
||||
elementType: _Select.default,
|
||||
externalForwardedProps,
|
||||
ownerState
|
||||
});
|
||||
const InputElement = /*#__PURE__*/(0, _jsxRuntime.jsx)(InputSlot, {
|
||||
"aria-describedby": helperTextId,
|
||||
autoComplete: autoComplete,
|
||||
autoFocus: autoFocus,
|
||||
defaultValue: defaultValue,
|
||||
fullWidth: fullWidth,
|
||||
multiline: multiline,
|
||||
name: name,
|
||||
rows: rows,
|
||||
maxRows: maxRows,
|
||||
minRows: minRows,
|
||||
type: type,
|
||||
value: value,
|
||||
id: id,
|
||||
inputRef: inputRef,
|
||||
onBlur: onBlur,
|
||||
onChange: onChange,
|
||||
onFocus: onFocus,
|
||||
placeholder: placeholder,
|
||||
inputProps: htmlInputProps,
|
||||
slots: {
|
||||
input: slots.htmlInput ? HtmlInputSlot : undefined
|
||||
},
|
||||
...inputProps
|
||||
});
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
|
||||
...rootProps,
|
||||
children: [label != null && label !== '' && /*#__PURE__*/(0, _jsxRuntime.jsx)(InputLabelSlot, {
|
||||
htmlFor: id,
|
||||
id: inputLabelId,
|
||||
...inputLabelProps,
|
||||
children: label
|
||||
}), select ? /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectSlot, {
|
||||
"aria-describedby": helperTextId,
|
||||
id: id,
|
||||
labelId: inputLabelId,
|
||||
value: value,
|
||||
input: InputElement,
|
||||
...selectProps,
|
||||
children: children
|
||||
}) : InputElement, helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(FormHelperTextSlot, {
|
||||
id: helperTextId,
|
||||
...formHelperTextProps,
|
||||
children: helperText
|
||||
})]
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes */ = {
|
||||
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
||||
// │ These PropTypes are generated from the TypeScript type definitions. │
|
||||
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* This prop helps users to fill forms faster, especially on mobile devices.
|
||||
* The name can be confusing, as it's more like an autofill.
|
||||
* You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
|
||||
*/
|
||||
autoComplete: _propTypes.default.string,
|
||||
/**
|
||||
* If `true`, the `input` element is focused during the first mount.
|
||||
* @default false
|
||||
*/
|
||||
autoFocus: _propTypes.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
children: _propTypes.default.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: _propTypes.default.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes.default.string,
|
||||
/**
|
||||
* The color of the component.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
* @default 'primary'
|
||||
*/
|
||||
color: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), _propTypes.default.string]),
|
||||
/**
|
||||
* The default value. Use when the component is not controlled.
|
||||
*/
|
||||
defaultValue: _propTypes.default.any,
|
||||
/**
|
||||
* If `true`, the component is disabled.
|
||||
* @default false
|
||||
*/
|
||||
disabled: _propTypes.default.bool,
|
||||
/**
|
||||
* If `true`, the label is displayed in an error state.
|
||||
* @default false
|
||||
*/
|
||||
error: _propTypes.default.bool,
|
||||
/**
|
||||
* Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
|
||||
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
FormHelperTextProps: _propTypes.default.object,
|
||||
/**
|
||||
* If `true`, the input will take up the full width of its container.
|
||||
* @default false
|
||||
*/
|
||||
fullWidth: _propTypes.default.bool,
|
||||
/**
|
||||
* The helper text content.
|
||||
*/
|
||||
helperText: _propTypes.default.node,
|
||||
/**
|
||||
* The id of the `input` element.
|
||||
* Use this prop to make `label` and `helperText` accessible for screen readers.
|
||||
*/
|
||||
id: _propTypes.default.string,
|
||||
/**
|
||||
* Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
|
||||
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
||||
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
InputLabelProps: _propTypes.default.object,
|
||||
/**
|
||||
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.
|
||||
* @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
inputProps: _propTypes.default.object,
|
||||
/**
|
||||
* Props applied to the Input element.
|
||||
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
||||
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
||||
* component depending on the `variant` prop value.
|
||||
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
InputProps: _propTypes.default.object,
|
||||
/**
|
||||
* Pass a ref to the `input` element.
|
||||
*/
|
||||
inputRef: _refType.default,
|
||||
/**
|
||||
* The label content.
|
||||
*/
|
||||
label: _propTypes.default.node,
|
||||
/**
|
||||
* If `dense` or `normal`, will adjust vertical spacing of this and contained components.
|
||||
* @default 'none'
|
||||
*/
|
||||
margin: _propTypes.default.oneOf(['dense', 'none', 'normal']),
|
||||
/**
|
||||
* Maximum number of rows to display when multiline option is set to true.
|
||||
*/
|
||||
maxRows: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
||||
/**
|
||||
* Minimum number of rows to display when multiline option is set to true.
|
||||
*/
|
||||
minRows: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
||||
/**
|
||||
* If `true`, a `textarea` element is rendered instead of an input.
|
||||
* @default false
|
||||
*/
|
||||
multiline: _propTypes.default.bool,
|
||||
/**
|
||||
* Name attribute of the `input` element.
|
||||
*/
|
||||
name: _propTypes.default.string,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
onBlur: _propTypes.default.func,
|
||||
/**
|
||||
* Callback fired when the value is changed.
|
||||
*
|
||||
* @param {object} event The event source of the callback.
|
||||
* You can pull out the new value by accessing `event.target.value` (string).
|
||||
*/
|
||||
onChange: _propTypes.default.func,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
onFocus: _propTypes.default.func,
|
||||
/**
|
||||
* The short hint displayed in the `input` before the user enters a value.
|
||||
*/
|
||||
placeholder: _propTypes.default.string,
|
||||
/**
|
||||
* If `true`, the label is displayed as required and the `input` element is required.
|
||||
* @default false
|
||||
*/
|
||||
required: _propTypes.default.bool,
|
||||
/**
|
||||
* Number of rows to display when multiline option is set to true.
|
||||
*/
|
||||
rows: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
||||
/**
|
||||
* Render a [`Select`](https://mui.com/material-ui/api/select/) element while passing the Input element to `Select` as `input` parameter.
|
||||
* If this option is set you must pass the options of the select as children.
|
||||
* @default false
|
||||
*/
|
||||
select: _propTypes.default.bool,
|
||||
/**
|
||||
* Props applied to the [`Select`](https://mui.com/material-ui/api/select/) element.
|
||||
* @deprecated Use `slotProps.select` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
SelectProps: _propTypes.default.object,
|
||||
/**
|
||||
* The size of the component.
|
||||
* @default 'medium'
|
||||
*/
|
||||
size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['medium', 'small']), _propTypes.default.string]),
|
||||
/**
|
||||
* The props used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: _propTypes.default /* @typescript-to-proptypes-ignore */.shape({
|
||||
formHelperText: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
||||
htmlInput: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
||||
input: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
||||
inputLabel: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
||||
select: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
||||
}),
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slots: _propTypes.default.shape({
|
||||
formHelperText: _propTypes.default.elementType,
|
||||
htmlInput: _propTypes.default.elementType,
|
||||
input: _propTypes.default.elementType,
|
||||
inputLabel: _propTypes.default.elementType,
|
||||
root: _propTypes.default.elementType,
|
||||
select: _propTypes.default.elementType
|
||||
}),
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
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]),
|
||||
/**
|
||||
* Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).
|
||||
*/
|
||||
type: _propTypes.default /* @typescript-to-proptypes-ignore */.string,
|
||||
/**
|
||||
* The value of the `input` element, required for a controlled component.
|
||||
*/
|
||||
value: _propTypes.default.any,
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'outlined'
|
||||
*/
|
||||
variant: _propTypes.default.oneOf(['filled', 'outlined', 'standard'])
|
||||
} : void 0;
|
||||
var _default = exports.default = TextField;
|
||||
4
node_modules/@mui/material/TextField/index.d.ts
generated
vendored
Normal file
4
node_modules/@mui/material/TextField/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export { default } from "./TextField.js";
|
||||
export * from "./TextField.js";
|
||||
export { default as textFieldClasses } from "./textFieldClasses.js";
|
||||
export * from "./textFieldClasses.js";
|
||||
35
node_modules/@mui/material/TextField/index.js
generated
vendored
Normal file
35
node_modules/@mui/material/TextField/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
textFieldClasses: true
|
||||
};
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _TextField.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "textFieldClasses", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _textFieldClasses.default;
|
||||
}
|
||||
});
|
||||
var _TextField = _interopRequireDefault(require("./TextField"));
|
||||
var _textFieldClasses = _interopRequireWildcard(require("./textFieldClasses"));
|
||||
Object.keys(_textFieldClasses).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _textFieldClasses[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _textFieldClasses[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
8
node_modules/@mui/material/TextField/textFieldClasses.d.ts
generated
vendored
Normal file
8
node_modules/@mui/material/TextField/textFieldClasses.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export interface TextFieldClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
}
|
||||
export type TextFieldClassKey = keyof TextFieldClasses;
|
||||
export declare function getTextFieldUtilityClass(slot: string): string;
|
||||
declare const textFieldClasses: TextFieldClasses;
|
||||
export default textFieldClasses;
|
||||
15
node_modules/@mui/material/TextField/textFieldClasses.js
generated
vendored
Normal file
15
node_modules/@mui/material/TextField/textFieldClasses.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
exports.getTextFieldUtilityClass = getTextFieldUtilityClass;
|
||||
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
||||
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
||||
function getTextFieldUtilityClass(slot) {
|
||||
return (0, _generateUtilityClass.default)('MuiTextField', slot);
|
||||
}
|
||||
const textFieldClasses = (0, _generateUtilityClasses.default)('MuiTextField', ['root']);
|
||||
var _default = exports.default = textFieldClasses;
|
||||
Loading…
Add table
Add a link
Reference in a new issue