worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
69
node_modules/@mui/material/esm/NativeSelect/NativeSelect.d.ts
generated
vendored
Normal file
69
node_modules/@mui/material/esm/NativeSelect/NativeSelect.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { Theme } from "../styles/index.js";
|
||||
import { InternalStandardProps as StandardProps } from "../internal/index.js";
|
||||
import { InputProps } from "../Input/index.js";
|
||||
import { NativeSelectInputProps } from "./NativeSelectInput.js";
|
||||
import { NativeSelectClasses } from "./nativeSelectClasses.js";
|
||||
export interface NativeSelectProps extends StandardProps<InputProps, 'inputProps' | 'value' | 'onChange'> {
|
||||
/**
|
||||
* The option elements to populate the select with.
|
||||
* Can be some `<option>` elements.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
* @default {}
|
||||
*/
|
||||
classes?: Partial<NativeSelectClasses>;
|
||||
/**
|
||||
* The icon that displays the arrow.
|
||||
* @default ArrowDropDownIcon
|
||||
*/
|
||||
IconComponent?: React.ElementType;
|
||||
/**
|
||||
* An `Input` element; does not have to be a material-ui specific `Input`.
|
||||
* @default <Input />
|
||||
*/
|
||||
input?: React.ReactElement<unknown, any>;
|
||||
/**
|
||||
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select#attributes) applied to the `select` element.
|
||||
*/
|
||||
inputProps?: Partial<NativeSelectInputProps>;
|
||||
/**
|
||||
* Callback fired when a menu item is selected.
|
||||
*
|
||||
* @param {React.ChangeEvent<HTMLSelectElement>} event The event source of the callback.
|
||||
* You can pull out the new value by accessing `event.target.value` (string).
|
||||
*/
|
||||
onChange?: NativeSelectInputProps['onChange'];
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* The `input` value. The DOM API casts this to a string.
|
||||
*/
|
||||
value?: unknown;
|
||||
/**
|
||||
* The variant to use.
|
||||
*/
|
||||
variant?: 'standard' | 'outlined' | 'filled';
|
||||
}
|
||||
|
||||
/**
|
||||
* An alternative to `<Select native />` with a much smaller bundle size footprint.
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Select](https://mui.com/material-ui/react-select/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [NativeSelect API](https://mui.com/material-ui/api/native-select/)
|
||||
* - inherits [Input API](https://mui.com/material-ui/api/input/)
|
||||
*/
|
||||
declare const NativeSelect: ((props: NativeSelectProps) => React.JSX.Element) & {
|
||||
muiName: string;
|
||||
};
|
||||
export default NativeSelect;
|
||||
133
node_modules/@mui/material/esm/NativeSelect/NativeSelect.js
generated
vendored
Normal file
133
node_modules/@mui/material/esm/NativeSelect/NativeSelect.js
generated
vendored
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import PropTypes from 'prop-types';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import NativeSelectInput from "./NativeSelectInput.js";
|
||||
import formControlState from "../FormControl/formControlState.js";
|
||||
import useFormControl from "../FormControl/useFormControl.js";
|
||||
import ArrowDropDownIcon from "../internal/svg-icons/ArrowDropDown.js";
|
||||
import Input from "../Input/index.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import { getNativeSelectUtilityClasses } from "./nativeSelectClasses.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root']
|
||||
};
|
||||
return composeClasses(slots, getNativeSelectUtilityClasses, classes);
|
||||
};
|
||||
const defaultInput = /*#__PURE__*/_jsx(Input, {});
|
||||
/**
|
||||
* An alternative to `<Select native />` with a much smaller bundle size footprint.
|
||||
*/
|
||||
const NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
name: 'MuiNativeSelect',
|
||||
props: inProps
|
||||
});
|
||||
const {
|
||||
className,
|
||||
children,
|
||||
classes: classesProp = {},
|
||||
IconComponent = ArrowDropDownIcon,
|
||||
input = defaultInput,
|
||||
inputProps,
|
||||
variant,
|
||||
...other
|
||||
} = props;
|
||||
const muiFormControl = useFormControl();
|
||||
const fcs = formControlState({
|
||||
props,
|
||||
muiFormControl,
|
||||
states: ['variant']
|
||||
});
|
||||
const ownerState = {
|
||||
...props,
|
||||
classes: classesProp
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
const {
|
||||
root,
|
||||
...otherClasses
|
||||
} = classesProp;
|
||||
return /*#__PURE__*/_jsx(React.Fragment, {
|
||||
children: /*#__PURE__*/React.cloneElement(input, {
|
||||
// Most of the logic is implemented in `NativeSelectInput`.
|
||||
// The `Select` component is a simple API wrapper to expose something better to play with.
|
||||
inputComponent: NativeSelectInput,
|
||||
inputProps: {
|
||||
children,
|
||||
classes: otherClasses,
|
||||
IconComponent,
|
||||
variant: fcs.variant,
|
||||
type: undefined,
|
||||
// We render a select. We can ignore the type provided by the `Input`.
|
||||
...inputProps,
|
||||
...(input ? input.props.inputProps : {})
|
||||
},
|
||||
ref,
|
||||
...other,
|
||||
className: clsx(classes.root, input.props.className, className)
|
||||
})
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? NativeSelect.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`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* The option elements to populate the select with.
|
||||
* Can be some `<option>` elements.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
* @default {}
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* The icon that displays the arrow.
|
||||
* @default ArrowDropDownIcon
|
||||
*/
|
||||
IconComponent: PropTypes.elementType,
|
||||
/**
|
||||
* An `Input` element; does not have to be a material-ui specific `Input`.
|
||||
* @default <Input />
|
||||
*/
|
||||
input: PropTypes.element,
|
||||
/**
|
||||
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select#attributes) applied to the `select` element.
|
||||
*/
|
||||
inputProps: PropTypes.object,
|
||||
/**
|
||||
* Callback fired when a menu item is selected.
|
||||
*
|
||||
* @param {React.ChangeEvent<HTMLSelectElement>} event The event source of the callback.
|
||||
* You can pull out the new value by accessing `event.target.value` (string).
|
||||
*/
|
||||
onChange: PropTypes.func,
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
||||
/**
|
||||
* The `input` value. The DOM API casts this to a string.
|
||||
*/
|
||||
value: PropTypes.any,
|
||||
/**
|
||||
* The variant to use.
|
||||
*/
|
||||
variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
|
||||
} : void 0;
|
||||
NativeSelect.muiName = 'Select';
|
||||
export default NativeSelect;
|
||||
13
node_modules/@mui/material/esm/NativeSelect/NativeSelectInput.d.ts
generated
vendored
Normal file
13
node_modules/@mui/material/esm/NativeSelect/NativeSelectInput.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { Theme } from "../styles/index.js";
|
||||
export interface NativeSelectInputProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
||||
disabled?: boolean;
|
||||
IconComponent: React.ElementType;
|
||||
inputRef?: React.Ref<HTMLSelectElement>;
|
||||
variant?: 'standard' | 'outlined' | 'filled';
|
||||
error?: boolean;
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
declare const NativeSelectInput: React.JSXElementConstructor<NativeSelectInputProps>;
|
||||
export default NativeSelectInput;
|
||||
244
node_modules/@mui/material/esm/NativeSelect/NativeSelectInput.js
generated
vendored
Normal file
244
node_modules/@mui/material/esm/NativeSelect/NativeSelectInput.js
generated
vendored
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import refType from '@mui/utils/refType';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import capitalize from "../utils/capitalize.js";
|
||||
import nativeSelectClasses, { getNativeSelectUtilityClasses } from "./nativeSelectClasses.js";
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes,
|
||||
variant,
|
||||
disabled,
|
||||
multiple,
|
||||
open,
|
||||
error
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
select: ['select', variant, disabled && 'disabled', multiple && 'multiple', error && 'error'],
|
||||
icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled']
|
||||
};
|
||||
return composeClasses(slots, getNativeSelectUtilityClasses, classes);
|
||||
};
|
||||
export const StyledSelectSelect = styled('select', {
|
||||
name: 'MuiNativeSelect'
|
||||
})(({
|
||||
theme
|
||||
}) => ({
|
||||
// Reset
|
||||
MozAppearance: 'none',
|
||||
// Reset
|
||||
WebkitAppearance: 'none',
|
||||
// When interacting quickly, the text can end up selected.
|
||||
// Native select can't be selected either.
|
||||
userSelect: 'none',
|
||||
// Reset
|
||||
borderRadius: 0,
|
||||
cursor: 'pointer',
|
||||
'&:focus': {
|
||||
// Reset Chrome style
|
||||
borderRadius: 0
|
||||
},
|
||||
[`&.${nativeSelectClasses.disabled}`]: {
|
||||
cursor: 'default'
|
||||
},
|
||||
'&[multiple]': {
|
||||
height: 'auto'
|
||||
},
|
||||
'&:not([multiple]) option, &:not([multiple]) optgroup': {
|
||||
backgroundColor: (theme.vars || theme).palette.background.paper
|
||||
},
|
||||
variants: [{
|
||||
props: ({
|
||||
ownerState
|
||||
}) => ownerState.variant !== 'filled' && ownerState.variant !== 'outlined',
|
||||
style: {
|
||||
// Bump specificity to allow extending custom inputs
|
||||
'&&&': {
|
||||
paddingRight: 24,
|
||||
minWidth: 16 // So it doesn't collapse.
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
variant: 'filled'
|
||||
},
|
||||
style: {
|
||||
'&&&': {
|
||||
paddingRight: 32
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
variant: 'outlined'
|
||||
},
|
||||
style: {
|
||||
borderRadius: (theme.vars || theme).shape.borderRadius,
|
||||
'&:focus': {
|
||||
borderRadius: (theme.vars || theme).shape.borderRadius // Reset the reset for Chrome style
|
||||
},
|
||||
'&&&': {
|
||||
paddingRight: 32
|
||||
}
|
||||
}
|
||||
}]
|
||||
}));
|
||||
const NativeSelectSelect = styled(StyledSelectSelect, {
|
||||
name: 'MuiNativeSelect',
|
||||
slot: 'Select',
|
||||
shouldForwardProp: rootShouldForwardProp,
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.select, styles[ownerState.variant], ownerState.error && styles.error, {
|
||||
[`&.${nativeSelectClasses.multiple}`]: styles.multiple
|
||||
}];
|
||||
}
|
||||
})({});
|
||||
export const StyledSelectIcon = styled('svg', {
|
||||
name: 'MuiNativeSelect'
|
||||
})(({
|
||||
theme
|
||||
}) => ({
|
||||
// We use a position absolute over a flexbox in order to forward the pointer events
|
||||
// to the input and to support wrapping tags..
|
||||
position: 'absolute',
|
||||
right: 0,
|
||||
// Center vertically, height is 1em
|
||||
top: 'calc(50% - .5em)',
|
||||
// Don't block pointer events on the select under the icon.
|
||||
pointerEvents: 'none',
|
||||
color: (theme.vars || theme).palette.action.active,
|
||||
[`&.${nativeSelectClasses.disabled}`]: {
|
||||
color: (theme.vars || theme).palette.action.disabled
|
||||
},
|
||||
variants: [{
|
||||
props: ({
|
||||
ownerState
|
||||
}) => ownerState.open,
|
||||
style: {
|
||||
transform: 'rotate(180deg)'
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
variant: 'filled'
|
||||
},
|
||||
style: {
|
||||
right: 7
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
variant: 'outlined'
|
||||
},
|
||||
style: {
|
||||
right: 7
|
||||
}
|
||||
}]
|
||||
}));
|
||||
const NativeSelectIcon = styled(StyledSelectIcon, {
|
||||
name: 'MuiNativeSelect',
|
||||
slot: 'Icon',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.icon, ownerState.variant && styles[`icon${capitalize(ownerState.variant)}`], ownerState.open && styles.iconOpen];
|
||||
}
|
||||
})({});
|
||||
|
||||
/**
|
||||
* @ignore - internal component.
|
||||
*/
|
||||
const NativeSelectInput = /*#__PURE__*/React.forwardRef(function NativeSelectInput(props, ref) {
|
||||
const {
|
||||
className,
|
||||
disabled,
|
||||
error,
|
||||
IconComponent,
|
||||
inputRef,
|
||||
variant = 'standard',
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = {
|
||||
...props,
|
||||
disabled,
|
||||
variant,
|
||||
error
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
return /*#__PURE__*/_jsxs(React.Fragment, {
|
||||
children: [/*#__PURE__*/_jsx(NativeSelectSelect, {
|
||||
ownerState: ownerState,
|
||||
className: clsx(classes.select, className),
|
||||
disabled: disabled,
|
||||
ref: inputRef || ref,
|
||||
...other
|
||||
}), props.multiple ? null : /*#__PURE__*/_jsx(NativeSelectIcon, {
|
||||
as: IconComponent,
|
||||
ownerState: ownerState,
|
||||
className: classes.icon
|
||||
})]
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? NativeSelectInput.propTypes = {
|
||||
/**
|
||||
* The option elements to populate the select with.
|
||||
* Can be some `<option>` elements.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* The CSS class name of the select element.
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* If `true`, the select is disabled.
|
||||
*/
|
||||
disabled: PropTypes.bool,
|
||||
/**
|
||||
* If `true`, the `select input` will indicate an error.
|
||||
*/
|
||||
error: PropTypes.bool,
|
||||
/**
|
||||
* The icon that displays the arrow.
|
||||
*/
|
||||
IconComponent: PropTypes.elementType.isRequired,
|
||||
/**
|
||||
* Use that prop to pass a ref to the native select element.
|
||||
* @deprecated
|
||||
*/
|
||||
inputRef: refType,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
multiple: PropTypes.bool,
|
||||
/**
|
||||
* Name attribute of the `select` or hidden `input` element.
|
||||
*/
|
||||
name: PropTypes.string,
|
||||
/**
|
||||
* Callback fired when a menu item is selected.
|
||||
*
|
||||
* @param {object} event The event source of the callback.
|
||||
* You can pull out the new value by accessing `event.target.value` (string).
|
||||
*/
|
||||
onChange: PropTypes.func,
|
||||
/**
|
||||
* The input value.
|
||||
*/
|
||||
value: PropTypes.any,
|
||||
/**
|
||||
* The variant to use.
|
||||
*/
|
||||
variant: PropTypes.oneOf(['standard', 'outlined', 'filled'])
|
||||
} : void 0;
|
||||
export default NativeSelectInput;
|
||||
4
node_modules/@mui/material/esm/NativeSelect/index.d.ts
generated
vendored
Normal file
4
node_modules/@mui/material/esm/NativeSelect/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export { default } from "./NativeSelect.js";
|
||||
export * from "./NativeSelect.js";
|
||||
export { default as nativeSelectClasses } from "./nativeSelectClasses.js";
|
||||
export * from "./nativeSelectClasses.js";
|
||||
3
node_modules/@mui/material/esm/NativeSelect/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/esm/NativeSelect/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export { default } from "./NativeSelect.js";
|
||||
export { default as nativeSelectClasses } from "./nativeSelectClasses.js";
|
||||
export * from "./nativeSelectClasses.js";
|
||||
34
node_modules/@mui/material/esm/NativeSelect/nativeSelectClasses.d.ts
generated
vendored
Normal file
34
node_modules/@mui/material/esm/NativeSelect/nativeSelectClasses.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
export interface NativeSelectClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the select component `select` class. */
|
||||
select: string;
|
||||
/** Styles applied to the select component if `multiple={true}`. */
|
||||
multiple: string;
|
||||
/** Styles applied to the select component if `variant="filled"`. */
|
||||
filled: string;
|
||||
/** Styles applied to the select component if `variant="outlined"`. */
|
||||
outlined: string;
|
||||
/** Styles applied to the select component if `variant="standard"`. */
|
||||
standard: string;
|
||||
/** State class applied to the select component `disabled` class. */
|
||||
disabled: string;
|
||||
/** Styles applied to the icon component. */
|
||||
icon: string;
|
||||
/** Styles applied to the icon component if the popup is open. */
|
||||
iconOpen: string;
|
||||
/** Styles applied to the icon component if `variant="filled"`. */
|
||||
iconFilled: string;
|
||||
/** Styles applied to the icon component if `variant="outlined"`. */
|
||||
iconOutlined: string;
|
||||
/** Styles applied to the icon component if `variant="standard"`. */
|
||||
iconStandard: string;
|
||||
/** Styles applied to the underlying native input component. */
|
||||
nativeInput: string;
|
||||
/** State class applied to the select component `error` class. */
|
||||
error: string;
|
||||
}
|
||||
export type NativeSelectClassKey = keyof NativeSelectClasses;
|
||||
export declare function getNativeSelectUtilityClasses(slot: string): string;
|
||||
declare const nativeSelectClasses: NativeSelectClasses;
|
||||
export default nativeSelectClasses;
|
||||
7
node_modules/@mui/material/esm/NativeSelect/nativeSelectClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/esm/NativeSelect/nativeSelectClasses.js
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getNativeSelectUtilityClasses(slot) {
|
||||
return generateUtilityClass('MuiNativeSelect', slot);
|
||||
}
|
||||
const nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);
|
||||
export default nativeSelectClasses;
|
||||
Loading…
Add table
Add a link
Reference in a new issue