paradiego
This commit is contained in:
74
node_modules/@mui/material/ImageList/ImageList.d.ts
generated
vendored
Normal file
74
node_modules/@mui/material/ImageList/ImageList.d.ts
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { OverridableStringUnion } from '@mui/types';
|
||||
import { Theme } from '..';
|
||||
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
||||
import { ImageListClasses } from './imageListClasses';
|
||||
|
||||
export interface ImageListPropsVariantOverrides {}
|
||||
|
||||
export interface ImageListOwnProps {
|
||||
/**
|
||||
* The content of the component, normally `ImageListItem`s.
|
||||
*/
|
||||
children: NonNullable<React.ReactNode>;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<ImageListClasses>;
|
||||
/**
|
||||
* Number of columns.
|
||||
* @default 2
|
||||
*/
|
||||
cols?: number;
|
||||
/**
|
||||
* The gap between items in px.
|
||||
* @default 4
|
||||
*/
|
||||
gap?: number;
|
||||
/**
|
||||
* The height of one row in px.
|
||||
* @default 'auto'
|
||||
*/
|
||||
rowHeight?: number | 'auto';
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'standard'
|
||||
*/
|
||||
variant?: OverridableStringUnion<
|
||||
'masonry' | 'quilted' | 'standard' | 'woven',
|
||||
ImageListPropsVariantOverrides
|
||||
>;
|
||||
}
|
||||
|
||||
export interface ImageListTypeMap<
|
||||
AdditionalProps = {},
|
||||
RootComponent extends React.ElementType = 'ul',
|
||||
> {
|
||||
props: AdditionalProps & ImageListOwnProps;
|
||||
defaultComponent: RootComponent;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Image List](https://mui.com/material-ui/react-image-list/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [ImageList API](https://mui.com/material-ui/api/image-list/)
|
||||
*/
|
||||
declare const ImageList: OverridableComponent<ImageListTypeMap>;
|
||||
|
||||
export type ImageListProps<
|
||||
RootComponent extends React.ElementType = ImageListTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<ImageListTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export default ImageList;
|
||||
150
node_modules/@mui/material/ImageList/ImageList.js
generated
vendored
Normal file
150
node_modules/@mui/material/ImageList/ImageList.js
generated
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
'use client';
|
||||
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import integerPropType from '@mui/utils/integerPropType';
|
||||
import clsx from 'clsx';
|
||||
import PropTypes from 'prop-types';
|
||||
import * as React from 'react';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import { getImageListUtilityClass } from "./imageListClasses.js";
|
||||
import ImageListContext from "./ImageListContext.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes,
|
||||
variant
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', variant]
|
||||
};
|
||||
return composeClasses(slots, getImageListUtilityClass, classes);
|
||||
};
|
||||
const ImageListRoot = styled('ul', {
|
||||
name: 'MuiImageList',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.root, styles[ownerState.variant]];
|
||||
}
|
||||
})({
|
||||
display: 'grid',
|
||||
overflowY: 'auto',
|
||||
listStyle: 'none',
|
||||
padding: 0,
|
||||
// Add iOS momentum scrolling for iOS < 13.0
|
||||
WebkitOverflowScrolling: 'touch',
|
||||
variants: [{
|
||||
props: {
|
||||
variant: 'masonry'
|
||||
},
|
||||
style: {
|
||||
display: 'block'
|
||||
}
|
||||
}]
|
||||
});
|
||||
const ImageList = /*#__PURE__*/React.forwardRef(function ImageList(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiImageList'
|
||||
});
|
||||
const {
|
||||
children,
|
||||
className,
|
||||
cols = 2,
|
||||
component = 'ul',
|
||||
rowHeight = 'auto',
|
||||
gap = 4,
|
||||
style: styleProp,
|
||||
variant = 'standard',
|
||||
...other
|
||||
} = props;
|
||||
const contextValue = React.useMemo(() => ({
|
||||
rowHeight,
|
||||
gap,
|
||||
variant
|
||||
}), [rowHeight, gap, variant]);
|
||||
const style = variant === 'masonry' ? {
|
||||
columnCount: cols,
|
||||
columnGap: gap,
|
||||
...styleProp
|
||||
} : {
|
||||
gridTemplateColumns: `repeat(${cols}, 1fr)`,
|
||||
gap,
|
||||
...styleProp
|
||||
};
|
||||
const ownerState = {
|
||||
...props,
|
||||
component,
|
||||
gap,
|
||||
rowHeight,
|
||||
variant
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
return /*#__PURE__*/_jsx(ImageListRoot, {
|
||||
as: component,
|
||||
className: clsx(classes.root, classes[variant], className),
|
||||
ref: ref,
|
||||
style: style,
|
||||
ownerState: ownerState,
|
||||
...other,
|
||||
children: /*#__PURE__*/_jsx(ImageListContext.Provider, {
|
||||
value: contextValue,
|
||||
children: children
|
||||
})
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? ImageList.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, normally `ImageListItem`s.
|
||||
*/
|
||||
children: PropTypes /* @typescript-to-proptypes-ignore */.node.isRequired,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* Number of columns.
|
||||
* @default 2
|
||||
*/
|
||||
cols: integerPropType,
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component: PropTypes.elementType,
|
||||
/**
|
||||
* The gap between items in px.
|
||||
* @default 4
|
||||
*/
|
||||
gap: PropTypes.number,
|
||||
/**
|
||||
* The height of one row in px.
|
||||
* @default 'auto'
|
||||
*/
|
||||
rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
style: 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]),
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'standard'
|
||||
*/
|
||||
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['masonry', 'quilted', 'standard', 'woven']), PropTypes.string])
|
||||
} : void 0;
|
||||
export default ImageList;
|
||||
13
node_modules/@mui/material/ImageList/ImageListContext.js
generated
vendored
Normal file
13
node_modules/@mui/material/ImageList/ImageListContext.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
/**
|
||||
* @ignore - internal component.
|
||||
* @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}
|
||||
*/
|
||||
const ImageListContext = /*#__PURE__*/React.createContext({});
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
ImageListContext.displayName = 'ImageListContext';
|
||||
}
|
||||
export default ImageListContext;
|
||||
16
node_modules/@mui/material/ImageList/imageListClasses.d.ts
generated
vendored
Normal file
16
node_modules/@mui/material/ImageList/imageListClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export interface ImageListClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if `variant="masonry"`. */
|
||||
masonry: string;
|
||||
/** Styles applied to the root element if `variant="quilted"`. */
|
||||
quilted: string;
|
||||
/** Styles applied to the root element if `variant="standard"`. */
|
||||
standard: string;
|
||||
/** Styles applied to the root element if `variant="woven"`. */
|
||||
woven: string;
|
||||
}
|
||||
export type ImageListClassKey = keyof ImageListClasses;
|
||||
export declare function getImageListUtilityClass(slot: string): string;
|
||||
declare const imageListClasses: ImageListClasses;
|
||||
export default imageListClasses;
|
||||
7
node_modules/@mui/material/ImageList/imageListClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/ImageList/imageListClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getImageListUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiImageList', slot);
|
||||
}
|
||||
const imageListClasses = generateUtilityClasses('MuiImageList', ['root', 'masonry', 'quilted', 'standard', 'woven']);
|
||||
export default imageListClasses;
|
||||
5
node_modules/@mui/material/ImageList/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/ImageList/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export * from './ImageList';
|
||||
export { default } from './ImageList';
|
||||
|
||||
export * from './imageListClasses';
|
||||
export { default as imageListClasses } from './imageListClasses';
|
||||
3
node_modules/@mui/material/ImageList/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/ImageList/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./ImageList.js";
|
||||
export * from "./imageListClasses.js";
|
||||
export { default as imageListClasses } from "./imageListClasses.js";
|
||||
6
node_modules/@mui/material/ImageList/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/ImageList/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/ImageList/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user