paradiego
This commit is contained in:
56
node_modules/@mui/material/StepContent/StepContent.d.ts
generated
vendored
Normal file
56
node_modules/@mui/material/StepContent/StepContent.d.ts
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { InternalStandardProps as StandardProps } from '..';
|
||||
import { Theme } from '../styles';
|
||||
import { TransitionProps } from '../transitions/transition';
|
||||
import { StepContentClasses } from './stepContentClasses';
|
||||
|
||||
export interface StepContentProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<StepContentClasses>;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* The component used for the transition.
|
||||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
||||
* @default Collapse
|
||||
*/
|
||||
TransitionComponent?: React.JSXElementConstructor<
|
||||
TransitionProps & { children: React.ReactElement<unknown, any> }
|
||||
>;
|
||||
/**
|
||||
* Adjust the duration of the content expand transition.
|
||||
* Passed as a prop to the transition component.
|
||||
*
|
||||
* Set to 'auto' to automatically calculate transition time based on height.
|
||||
* @default 'auto'
|
||||
*/
|
||||
transitionDuration?: TransitionProps['timeout'] | 'auto';
|
||||
/**
|
||||
* Props applied to the transition element.
|
||||
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
||||
*/
|
||||
TransitionProps?: TransitionProps;
|
||||
}
|
||||
|
||||
export type StepContentClasskey = keyof NonNullable<StepContentProps['classes']>;
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Stepper](https://mui.com/material-ui/react-stepper/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [StepContent API](https://mui.com/material-ui/api/step-content/)
|
||||
*/
|
||||
export default function StepContent(props: StepContentProps): React.JSX.Element;
|
||||
155
node_modules/@mui/material/StepContent/StepContent.js
generated
vendored
Normal file
155
node_modules/@mui/material/StepContent/StepContent.js
generated
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import Collapse from "../Collapse/index.js";
|
||||
import StepperContext from "../Stepper/StepperContext.js";
|
||||
import StepContext from "../Step/StepContext.js";
|
||||
import { getStepContentUtilityClass } from "./stepContentClasses.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes,
|
||||
last
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', last && 'last'],
|
||||
transition: ['transition']
|
||||
};
|
||||
return composeClasses(slots, getStepContentUtilityClass, classes);
|
||||
};
|
||||
const StepContentRoot = styled('div', {
|
||||
name: 'MuiStepContent',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.root, ownerState.last && styles.last];
|
||||
}
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
marginLeft: 12,
|
||||
// half icon
|
||||
paddingLeft: 8 + 12,
|
||||
// margin + half icon
|
||||
paddingRight: 8,
|
||||
borderLeft: theme.vars ? `1px solid ${theme.vars.palette.StepContent.border}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`,
|
||||
variants: [{
|
||||
props: {
|
||||
last: true
|
||||
},
|
||||
style: {
|
||||
borderLeft: 'none'
|
||||
}
|
||||
}]
|
||||
})));
|
||||
const StepContentTransition = styled(Collapse, {
|
||||
name: 'MuiStepContent',
|
||||
slot: 'Transition',
|
||||
overridesResolver: (props, styles) => styles.transition
|
||||
})({});
|
||||
const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiStepContent'
|
||||
});
|
||||
const {
|
||||
children,
|
||||
className,
|
||||
TransitionComponent = Collapse,
|
||||
transitionDuration: transitionDurationProp = 'auto',
|
||||
TransitionProps,
|
||||
...other
|
||||
} = props;
|
||||
const {
|
||||
orientation
|
||||
} = React.useContext(StepperContext);
|
||||
const {
|
||||
active,
|
||||
last,
|
||||
expanded
|
||||
} = React.useContext(StepContext);
|
||||
const ownerState = {
|
||||
...props,
|
||||
last
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (orientation !== 'vertical') {
|
||||
console.error('MUI: <StepContent /> is only designed for use with the vertical stepper.');
|
||||
}
|
||||
}
|
||||
let transitionDuration = transitionDurationProp;
|
||||
if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {
|
||||
transitionDuration = undefined;
|
||||
}
|
||||
return /*#__PURE__*/_jsx(StepContentRoot, {
|
||||
className: clsx(classes.root, className),
|
||||
ref: ref,
|
||||
ownerState: ownerState,
|
||||
...other,
|
||||
children: /*#__PURE__*/_jsx(StepContentTransition, {
|
||||
as: TransitionComponent,
|
||||
in: active || expanded,
|
||||
className: classes.transition,
|
||||
ownerState: ownerState,
|
||||
timeout: transitionDuration,
|
||||
unmountOnExit: true,
|
||||
...TransitionProps,
|
||||
children: children
|
||||
})
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? StepContent.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 content of the component.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* 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 component used for the transition.
|
||||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
||||
* @default Collapse
|
||||
*/
|
||||
TransitionComponent: PropTypes.elementType,
|
||||
/**
|
||||
* Adjust the duration of the content expand transition.
|
||||
* Passed as a prop to the transition component.
|
||||
*
|
||||
* Set to 'auto' to automatically calculate transition time based on height.
|
||||
* @default 'auto'
|
||||
*/
|
||||
transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({
|
||||
appear: PropTypes.number,
|
||||
enter: PropTypes.number,
|
||||
exit: PropTypes.number
|
||||
})]),
|
||||
/**
|
||||
* Props applied to the transition element.
|
||||
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
||||
*/
|
||||
TransitionProps: PropTypes.object
|
||||
} : void 0;
|
||||
export default StepContent;
|
||||
5
node_modules/@mui/material/StepContent/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/StepContent/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './StepContent';
|
||||
export * from './StepContent';
|
||||
|
||||
export { default as stepContentClasses } from './stepContentClasses';
|
||||
export * from './stepContentClasses';
|
||||
3
node_modules/@mui/material/StepContent/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/StepContent/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./StepContent.js";
|
||||
export { default as stepContentClasses } from "./stepContentClasses.js";
|
||||
export * from "./stepContentClasses.js";
|
||||
6
node_modules/@mui/material/StepContent/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/StepContent/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/StepContent/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
12
node_modules/@mui/material/StepContent/stepContentClasses.d.ts
generated
vendored
Normal file
12
node_modules/@mui/material/StepContent/stepContentClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export interface StepContentClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if `last={true}` (controlled by `Step`). */
|
||||
last: string;
|
||||
/** Styles applied to the Transition component. */
|
||||
transition: string;
|
||||
}
|
||||
export type StepContentClassKey = keyof StepContentClasses;
|
||||
export declare function getStepContentUtilityClass(slot: string): string;
|
||||
declare const stepContentClasses: StepContentClasses;
|
||||
export default stepContentClasses;
|
||||
7
node_modules/@mui/material/StepContent/stepContentClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/StepContent/stepContentClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getStepContentUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiStepContent', slot);
|
||||
}
|
||||
const stepContentClasses = generateUtilityClasses('MuiStepContent', ['root', 'last', 'transition']);
|
||||
export default stepContentClasses;
|
||||
Reference in New Issue
Block a user