paradiego
This commit is contained in:
55
node_modules/@mui/material/AccordionSummary/AccordionSummary.d.ts
generated
vendored
Normal file
55
node_modules/@mui/material/AccordionSummary/AccordionSummary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
|
||||
import { OverrideProps } from '../OverridableComponent';
|
||||
import { Theme } from '..';
|
||||
import { AccordionSummaryClasses } from './accordionSummaryClasses';
|
||||
|
||||
export interface AccordionSummaryOwnProps {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AccordionSummaryClasses>;
|
||||
/**
|
||||
* The icon to display as the expand indicator.
|
||||
*/
|
||||
expandIcon?: React.ReactNode;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
|
||||
export type AccordionSummaryTypeMap<
|
||||
AdditionalProps = {},
|
||||
RootComponent extends React.ElementType = 'div',
|
||||
> = ExtendButtonBaseTypeMap<{
|
||||
props: AdditionalProps & AccordionSummaryOwnProps;
|
||||
defaultComponent: RootComponent;
|
||||
}>;
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Accordion](https://mui.com/material-ui/react-accordion/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [AccordionSummary API](https://mui.com/material-ui/api/accordion-summary/)
|
||||
* - inherits [ButtonBase API](https://mui.com/material-ui/api/button-base/)
|
||||
*/
|
||||
declare const AccordionSummary: ExtendButtonBase<AccordionSummaryTypeMap>;
|
||||
|
||||
export type AccordionSummaryProps<
|
||||
RootComponent extends React.ElementType = AccordionSummaryTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<AccordionSummaryTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export default AccordionSummary;
|
||||
198
node_modules/@mui/material/AccordionSummary/AccordionSummary.js
generated
vendored
Normal file
198
node_modules/@mui/material/AccordionSummary/AccordionSummary.js
generated
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
'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 ButtonBase from "../ButtonBase/index.js";
|
||||
import AccordionContext from "../Accordion/AccordionContext.js";
|
||||
import accordionSummaryClasses, { getAccordionSummaryUtilityClass } from "./accordionSummaryClasses.js";
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes,
|
||||
expanded,
|
||||
disabled,
|
||||
disableGutters
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', expanded && 'expanded', disabled && 'disabled', !disableGutters && 'gutters'],
|
||||
focusVisible: ['focusVisible'],
|
||||
content: ['content', expanded && 'expanded', !disableGutters && 'contentGutters'],
|
||||
expandIconWrapper: ['expandIconWrapper', expanded && 'expanded']
|
||||
};
|
||||
return composeClasses(slots, getAccordionSummaryUtilityClass, classes);
|
||||
};
|
||||
const AccordionSummaryRoot = styled(ButtonBase, {
|
||||
name: 'MuiAccordionSummary',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => styles.root
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => {
|
||||
const transition = {
|
||||
duration: theme.transitions.duration.shortest
|
||||
};
|
||||
return {
|
||||
display: 'flex',
|
||||
minHeight: 48,
|
||||
padding: theme.spacing(0, 2),
|
||||
transition: theme.transitions.create(['min-height', 'background-color'], transition),
|
||||
[`&.${accordionSummaryClasses.focusVisible}`]: {
|
||||
backgroundColor: (theme.vars || theme).palette.action.focus
|
||||
},
|
||||
[`&.${accordionSummaryClasses.disabled}`]: {
|
||||
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
||||
},
|
||||
[`&:hover:not(.${accordionSummaryClasses.disabled})`]: {
|
||||
cursor: 'pointer'
|
||||
},
|
||||
variants: [{
|
||||
props: props => !props.disableGutters,
|
||||
style: {
|
||||
[`&.${accordionSummaryClasses.expanded}`]: {
|
||||
minHeight: 64
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
}));
|
||||
const AccordionSummaryContent = styled('div', {
|
||||
name: 'MuiAccordionSummary',
|
||||
slot: 'Content',
|
||||
overridesResolver: (props, styles) => styles.content
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
display: 'flex',
|
||||
flexGrow: 1,
|
||||
margin: '12px 0',
|
||||
variants: [{
|
||||
props: props => !props.disableGutters,
|
||||
style: {
|
||||
transition: theme.transitions.create(['margin'], {
|
||||
duration: theme.transitions.duration.shortest
|
||||
}),
|
||||
[`&.${accordionSummaryClasses.expanded}`]: {
|
||||
margin: '20px 0'
|
||||
}
|
||||
}
|
||||
}]
|
||||
})));
|
||||
const AccordionSummaryExpandIconWrapper = styled('div', {
|
||||
name: 'MuiAccordionSummary',
|
||||
slot: 'ExpandIconWrapper',
|
||||
overridesResolver: (props, styles) => styles.expandIconWrapper
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
display: 'flex',
|
||||
color: (theme.vars || theme).palette.action.active,
|
||||
transform: 'rotate(0deg)',
|
||||
transition: theme.transitions.create('transform', {
|
||||
duration: theme.transitions.duration.shortest
|
||||
}),
|
||||
[`&.${accordionSummaryClasses.expanded}`]: {
|
||||
transform: 'rotate(180deg)'
|
||||
}
|
||||
})));
|
||||
const AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAccordionSummary'
|
||||
});
|
||||
const {
|
||||
children,
|
||||
className,
|
||||
expandIcon,
|
||||
focusVisibleClassName,
|
||||
onClick,
|
||||
...other
|
||||
} = props;
|
||||
const {
|
||||
disabled = false,
|
||||
disableGutters,
|
||||
expanded,
|
||||
toggle
|
||||
} = React.useContext(AccordionContext);
|
||||
const handleChange = event => {
|
||||
if (toggle) {
|
||||
toggle(event);
|
||||
}
|
||||
if (onClick) {
|
||||
onClick(event);
|
||||
}
|
||||
};
|
||||
const ownerState = {
|
||||
...props,
|
||||
expanded,
|
||||
disabled,
|
||||
disableGutters
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
return /*#__PURE__*/_jsxs(AccordionSummaryRoot, {
|
||||
focusRipple: false,
|
||||
disableRipple: true,
|
||||
disabled: disabled,
|
||||
component: "div",
|
||||
"aria-expanded": expanded,
|
||||
className: clsx(classes.root, className),
|
||||
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
||||
onClick: handleChange,
|
||||
ref: ref,
|
||||
ownerState: ownerState,
|
||||
...other,
|
||||
children: [/*#__PURE__*/_jsx(AccordionSummaryContent, {
|
||||
className: classes.content,
|
||||
ownerState: ownerState,
|
||||
children: children
|
||||
}), expandIcon && /*#__PURE__*/_jsx(AccordionSummaryExpandIconWrapper, {
|
||||
className: classes.expandIconWrapper,
|
||||
ownerState: ownerState,
|
||||
children: expandIcon
|
||||
})]
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? AccordionSummary.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 icon to display as the expand indicator.
|
||||
*/
|
||||
expandIcon: PropTypes.node,
|
||||
/**
|
||||
* This prop can help identify which element has keyboard focus.
|
||||
* The class name will be applied when the element gains the focus through keyboard interaction.
|
||||
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
||||
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
||||
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
||||
* if needed.
|
||||
*/
|
||||
focusVisibleClassName: PropTypes.string,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
onClick: 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])
|
||||
} : void 0;
|
||||
export default AccordionSummary;
|
||||
25
node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.d.ts
generated
vendored
Normal file
25
node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
export interface AccordionSummaryClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** State class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */
|
||||
expanded: string;
|
||||
/** State class applied to the ButtonBase root element if the button is keyboard focused. */
|
||||
focusVisible: string;
|
||||
/** State class applied to the root element if `disabled={true}`. */
|
||||
disabled: string;
|
||||
/** Styles applied to the root element unless `disableGutters={true}`. */
|
||||
gutters: string;
|
||||
/**
|
||||
* Styles applied to the children wrapper element unless `disableGutters={true}`.
|
||||
* @deprecated Combine the [.MuiAccordionSummary-gutters](/material-ui/api/accordion-summary/#AccordionSummary-classes-gutters) and [.MuiAccordionSummary-content](/material-ui/api/accordion-summary/#AccordionSummary-classes-content) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
contentGutters: string;
|
||||
/** Styles applied to the children wrapper element. */
|
||||
content: string;
|
||||
/** Styles applied to the `expandIcon`'s wrapper element. */
|
||||
expandIconWrapper: string;
|
||||
}
|
||||
export type AccordionSummaryClassKey = keyof AccordionSummaryClasses;
|
||||
export declare function getAccordionSummaryUtilityClass(slot: string): string;
|
||||
declare const accordionSummaryClasses: AccordionSummaryClasses;
|
||||
export default accordionSummaryClasses;
|
||||
7
node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAccordionSummaryUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAccordionSummary', slot);
|
||||
}
|
||||
const accordionSummaryClasses = generateUtilityClasses('MuiAccordionSummary', ['root', 'expanded', 'focusVisible', 'disabled', 'gutters', 'contentGutters', 'content', 'expandIconWrapper']);
|
||||
export default accordionSummaryClasses;
|
||||
5
node_modules/@mui/material/AccordionSummary/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/AccordionSummary/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './AccordionSummary';
|
||||
export * from './AccordionSummary';
|
||||
|
||||
export { default as accordionSummaryClasses } from './accordionSummaryClasses';
|
||||
export * from './accordionSummaryClasses';
|
||||
3
node_modules/@mui/material/AccordionSummary/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/AccordionSummary/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./AccordionSummary.js";
|
||||
export { default as accordionSummaryClasses } from "./accordionSummaryClasses.js";
|
||||
export * from "./accordionSummaryClasses.js";
|
||||
6
node_modules/@mui/material/AccordionSummary/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/AccordionSummary/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/AccordionSummary/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user