paradiego

This commit is contained in:
2024-09-18 13:34:19 -03:00
commit 3f0e204289
12510 changed files with 1486101 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { TypographyProps } from '../Typography';
import { ListItemTextClasses } from './listItemTextClasses';
export interface ListItemTextProps<
PrimaryTypographyComponent extends React.ElementType = 'span',
SecondaryTypographyComponent extends React.ElementType = 'p',
> extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
/**
* Alias for the `primary` prop.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<ListItemTextClasses>;
/**
* If `true`, the children won't be wrapped by a Typography component.
* This can be useful to render an alternative Typography variant by wrapping
* the `children` (or `primary`) text, and optional `secondary` text
* with the Typography component.
* @default false
*/
disableTypography?: boolean;
/**
* If `true`, the children are indented.
* This should be used if there is no left avatar or left icon.
* @default false
*/
inset?: boolean;
/**
* The main content element.
*/
primary?: React.ReactNode;
/**
* These props will be forwarded to the primary typography component
* (as long as disableTypography is not `true`).
*/
primaryTypographyProps?: TypographyProps<
PrimaryTypographyComponent,
{ component?: PrimaryTypographyComponent }
>;
/**
* The secondary content element.
*/
secondary?: React.ReactNode;
/**
* These props will be forwarded to the secondary typography component
* (as long as disableTypography is not `true`).
*/
secondaryTypographyProps?: TypographyProps<
SecondaryTypographyComponent,
{ component?: SecondaryTypographyComponent }
>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
}
/**
*
* Demos:
*
* - [Lists](https://mui.com/material-ui/react-list/)
*
* API:
*
* - [ListItemText API](https://mui.com/material-ui/api/list-item-text/)
*/
export default function ListItemText<
PrimaryTypographyComponent extends React.ElementType = 'span',
SecondaryTypographyComponent extends React.ElementType = 'p',
>(
props: ListItemTextProps<PrimaryTypographyComponent, SecondaryTypographyComponent>,
): React.JSX.Element;

179
node_modules/@mui/material/ListItemText/ListItemText.js generated vendored Normal file
View File

@@ -0,0 +1,179 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import composeClasses from '@mui/utils/composeClasses';
import Typography, { typographyClasses } from "../Typography/index.js";
import ListContext from "../List/ListContext.js";
import { styled } from "../zero-styled/index.js";
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
import listItemTextClasses, { getListItemTextUtilityClass } from "./listItemTextClasses.js";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
const useUtilityClasses = ownerState => {
const {
classes,
inset,
primary,
secondary,
dense
} = ownerState;
const slots = {
root: ['root', inset && 'inset', dense && 'dense', primary && secondary && 'multiline'],
primary: ['primary'],
secondary: ['secondary']
};
return composeClasses(slots, getListItemTextUtilityClass, classes);
};
const ListItemTextRoot = styled('div', {
name: 'MuiListItemText',
slot: 'Root',
overridesResolver: (props, styles) => {
const {
ownerState
} = props;
return [{
[`& .${listItemTextClasses.primary}`]: styles.primary
}, {
[`& .${listItemTextClasses.secondary}`]: styles.secondary
}, styles.root, ownerState.inset && styles.inset, ownerState.primary && ownerState.secondary && styles.multiline, ownerState.dense && styles.dense];
}
})({
flex: '1 1 auto',
minWidth: 0,
marginTop: 4,
marginBottom: 4,
[`.${typographyClasses.root}:where(& .${listItemTextClasses.primary})`]: {
display: 'block'
},
[`.${typographyClasses.root}:where(& .${listItemTextClasses.secondary})`]: {
display: 'block'
},
variants: [{
props: ({
ownerState
}) => ownerState.primary && ownerState.secondary,
style: {
marginTop: 6,
marginBottom: 6
}
}, {
props: ({
ownerState
}) => ownerState.inset,
style: {
paddingLeft: 56
}
}]
});
const ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(inProps, ref) {
const props = useDefaultProps({
props: inProps,
name: 'MuiListItemText'
});
const {
children,
className,
disableTypography = false,
inset = false,
primary: primaryProp,
primaryTypographyProps,
secondary: secondaryProp,
secondaryTypographyProps,
...other
} = props;
const {
dense
} = React.useContext(ListContext);
let primary = primaryProp != null ? primaryProp : children;
let secondary = secondaryProp;
const ownerState = {
...props,
disableTypography,
inset,
primary: !!primary,
secondary: !!secondary,
dense
};
const classes = useUtilityClasses(ownerState);
if (primary != null && primary.type !== Typography && !disableTypography) {
primary = /*#__PURE__*/_jsx(Typography, {
variant: dense ? 'body2' : 'body1',
className: classes.primary,
component: primaryTypographyProps?.variant ? undefined : 'span',
...primaryTypographyProps,
children: primary
});
}
if (secondary != null && secondary.type !== Typography && !disableTypography) {
secondary = /*#__PURE__*/_jsx(Typography, {
variant: "body2",
className: classes.secondary,
color: "textSecondary",
...secondaryTypographyProps,
children: secondary
});
}
return /*#__PURE__*/_jsxs(ListItemTextRoot, {
className: clsx(classes.root, className),
ownerState: ownerState,
ref: ref,
...other,
children: [primary, secondary]
});
});
process.env.NODE_ENV !== "production" ? ListItemText.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`. │
// └─────────────────────────────────────────────────────────────────────┘
/**
* Alias for the `primary` prop.
*/
children: PropTypes.node,
/**
* Override or extend the styles applied to the component.
*/
classes: PropTypes.object,
/**
* @ignore
*/
className: PropTypes.string,
/**
* If `true`, the children won't be wrapped by a Typography component.
* This can be useful to render an alternative Typography variant by wrapping
* the `children` (or `primary`) text, and optional `secondary` text
* with the Typography component.
* @default false
*/
disableTypography: PropTypes.bool,
/**
* If `true`, the children are indented.
* This should be used if there is no left avatar or left icon.
* @default false
*/
inset: PropTypes.bool,
/**
* The main content element.
*/
primary: PropTypes.node,
/**
* These props will be forwarded to the primary typography component
* (as long as disableTypography is not `true`).
*/
primaryTypographyProps: PropTypes.object,
/**
* The secondary content element.
*/
secondary: PropTypes.node,
/**
* These props will be forwarded to the secondary typography component
* (as long as disableTypography is not `true`).
*/
secondaryTypographyProps: PropTypes.object,
/**
* 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 ListItemText;

5
node_modules/@mui/material/ListItemText/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export { default } from './ListItemText';
export * from './ListItemText';
export { default as listItemTextClasses } from './listItemTextClasses';
export * from './listItemTextClasses';

3
node_modules/@mui/material/ListItemText/index.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export { default } from "./ListItemText.js";
export { default as listItemTextClasses } from "./listItemTextClasses.js";
export * from "./listItemTextClasses.js";

View File

@@ -0,0 +1,18 @@
export interface ListItemTextClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the Typography component if primary and secondary are set. */
multiline: string;
/** Styles applied to the Typography component if dense. */
dense: string;
/** Styles applied to the root element if `inset={true}`. */
inset: string;
/** Styles applied to the primary `Typography` component. */
primary: string;
/** Styles applied to the secondary `Typography` component. */
secondary: string;
}
export type ListItemTextClassKey = keyof ListItemTextClasses;
export declare function getListItemTextUtilityClass(slot: string): string;
declare const listItemTextClasses: ListItemTextClasses;
export default listItemTextClasses;

View File

@@ -0,0 +1,7 @@
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
import generateUtilityClass from '@mui/utils/generateUtilityClass';
export function getListItemTextUtilityClass(slot) {
return generateUtilityClass('MuiListItemText', slot);
}
const listItemTextClasses = generateUtilityClasses('MuiListItemText', ['root', 'multiline', 'dense', 'inset', 'primary', 'secondary']);
export default listItemTextClasses;

6
node_modules/@mui/material/ListItemText/package.json generated vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"sideEffects": false,
"module": "./index.js",
"main": "../node/ListItemText/index.js",
"types": "./index.d.ts"
}