Jesus sucks
This commit is contained in:
95
backend/frontend/node_modules/@mui/material/AvatarGroup/AvatarGroup.d.ts
generated
vendored
Normal file
95
backend/frontend/node_modules/@mui/material/AvatarGroup/AvatarGroup.d.ts
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
import * as React from 'react';
|
||||
import { OverridableStringUnion } from '@mui/types';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { InternalStandardProps as StandardProps, Theme } from '@mui/material';
|
||||
import { AvatarGroupClasses } from './avatarGroupClasses';
|
||||
import Avatar from '../Avatar';
|
||||
|
||||
export interface AvatarGroupPropsVariantOverrides {}
|
||||
|
||||
export interface AvatarGroupComponentsPropsOverrides {}
|
||||
export interface AvatarGroupProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
|
||||
/**
|
||||
* The avatars to stack.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AvatarGroupClasses>;
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component?: React.ElementType;
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* This prop is an alias for the `slotProps` prop.
|
||||
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
componentsProps?: {
|
||||
additionalAvatar?: React.ComponentPropsWithRef<typeof Avatar> &
|
||||
AvatarGroupComponentsPropsOverrides;
|
||||
};
|
||||
/**
|
||||
* Max avatars to show before +x.
|
||||
* @default 5
|
||||
*/
|
||||
max?: number;
|
||||
/**
|
||||
* custom renderer of extraAvatars
|
||||
* @param {number} surplus number of extra avatars
|
||||
* @returns {React.ReactNode} custom element to display
|
||||
*/
|
||||
renderSurplus?: (surplus: number) => React.ReactNode;
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
slotProps?: {
|
||||
additionalAvatar?: React.ComponentPropsWithRef<typeof Avatar> &
|
||||
AvatarGroupComponentsPropsOverrides;
|
||||
};
|
||||
/**
|
||||
* Spacing between avatars.
|
||||
* @default 'medium'
|
||||
*/
|
||||
spacing?: 'small' | 'medium' | number;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* The total number of avatars. Used for calculating the number of extra avatars.
|
||||
* @default children.length
|
||||
*/
|
||||
total?: number;
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'circular'
|
||||
*/
|
||||
variant?: OverridableStringUnion<
|
||||
'circular' | 'rounded' | 'square',
|
||||
AvatarGroupPropsVariantOverrides
|
||||
>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Avatar](https://mui.com/material-ui/react-avatar/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [AvatarGroup API](https://mui.com/material-ui/api/avatar-group/)
|
||||
*/
|
||||
export default function AvatarGroup(props: AvatarGroupProps): React.JSX.Element;
|
||||
200
backend/frontend/node_modules/@mui/material/AvatarGroup/AvatarGroup.js
generated
vendored
Normal file
200
backend/frontend/node_modules/@mui/material/AvatarGroup/AvatarGroup.js
generated
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
'use client';
|
||||
|
||||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
||||
import _extends from "@babel/runtime/helpers/esm/extends";
|
||||
const _excluded = ["children", "className", "component", "componentsProps", "max", "renderSurplus", "slotProps", "spacing", "total", "variant"];
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { isFragment } from 'react-is';
|
||||
import clsx from 'clsx';
|
||||
import chainPropTypes from '@mui/utils/chainPropTypes';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import styled from '../styles/styled';
|
||||
import { useDefaultProps } from '../DefaultPropsProvider';
|
||||
import Avatar, { avatarClasses } from '../Avatar';
|
||||
import avatarGroupClasses, { getAvatarGroupUtilityClass } from './avatarGroupClasses';
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { jsxs as _jsxs } from "react/jsx-runtime";
|
||||
const SPACINGS = {
|
||||
small: -16,
|
||||
medium: null
|
||||
};
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root'],
|
||||
avatar: ['avatar']
|
||||
};
|
||||
return composeClasses(slots, getAvatarGroupUtilityClass, classes);
|
||||
};
|
||||
const AvatarGroupRoot = styled('div', {
|
||||
name: 'MuiAvatarGroup',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => _extends({
|
||||
[`& .${avatarGroupClasses.avatar}`]: styles.avatar
|
||||
}, styles.root)
|
||||
})(({
|
||||
theme,
|
||||
ownerState
|
||||
}) => {
|
||||
const marginValue = ownerState.spacing && SPACINGS[ownerState.spacing] !== undefined ? SPACINGS[ownerState.spacing] : -ownerState.spacing;
|
||||
return {
|
||||
[`& .${avatarClasses.root}`]: {
|
||||
border: `2px solid ${(theme.vars || theme).palette.background.default}`,
|
||||
boxSizing: 'content-box',
|
||||
marginLeft: marginValue != null ? marginValue : -8,
|
||||
'&:last-child': {
|
||||
marginLeft: 0
|
||||
}
|
||||
},
|
||||
display: 'flex',
|
||||
flexDirection: 'row-reverse'
|
||||
};
|
||||
});
|
||||
const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, ref) {
|
||||
var _slotProps$additional;
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAvatarGroup'
|
||||
});
|
||||
const {
|
||||
children: childrenProp,
|
||||
className,
|
||||
component = 'div',
|
||||
componentsProps = {},
|
||||
max = 5,
|
||||
renderSurplus,
|
||||
slotProps = {},
|
||||
spacing = 'medium',
|
||||
total,
|
||||
variant = 'circular'
|
||||
} = props,
|
||||
other = _objectWithoutPropertiesLoose(props, _excluded);
|
||||
let clampedMax = max < 2 ? 2 : max;
|
||||
const ownerState = _extends({}, props, {
|
||||
max,
|
||||
spacing,
|
||||
component,
|
||||
variant
|
||||
});
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
const children = React.Children.toArray(childrenProp).filter(child => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (isFragment(child)) {
|
||||
console.error(["MUI: The AvatarGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
||||
}
|
||||
}
|
||||
return /*#__PURE__*/React.isValidElement(child);
|
||||
});
|
||||
const totalAvatars = total || children.length;
|
||||
if (totalAvatars === clampedMax) {
|
||||
clampedMax += 1;
|
||||
}
|
||||
clampedMax = Math.min(totalAvatars + 1, clampedMax);
|
||||
const maxAvatars = Math.min(children.length, clampedMax - 1);
|
||||
const extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
|
||||
const extraAvatarsElement = renderSurplus ? renderSurplus(extraAvatars) : `+${extraAvatars}`;
|
||||
const additionalAvatarSlotProps = (_slotProps$additional = slotProps.additionalAvatar) != null ? _slotProps$additional : componentsProps.additionalAvatar;
|
||||
return /*#__PURE__*/_jsxs(AvatarGroupRoot, _extends({
|
||||
as: component,
|
||||
ownerState: ownerState,
|
||||
className: clsx(classes.root, className),
|
||||
ref: ref
|
||||
}, other, {
|
||||
children: [extraAvatars ? /*#__PURE__*/_jsx(Avatar, _extends({
|
||||
variant: variant
|
||||
}, additionalAvatarSlotProps, {
|
||||
className: clsx(classes.avatar, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.className),
|
||||
children: extraAvatarsElement
|
||||
})) : null, children.slice(0, maxAvatars).reverse().map(child => {
|
||||
return /*#__PURE__*/React.cloneElement(child, {
|
||||
className: clsx(child.props.className, classes.avatar),
|
||||
variant: child.props.variant || variant
|
||||
});
|
||||
})]
|
||||
}));
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? AvatarGroup.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 avatars to stack.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component: PropTypes.elementType,
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* This prop is an alias for the `slotProps` prop.
|
||||
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
componentsProps: PropTypes.shape({
|
||||
additionalAvatar: PropTypes.object
|
||||
}),
|
||||
/**
|
||||
* Max avatars to show before +x.
|
||||
* @default 5
|
||||
*/
|
||||
max: chainPropTypes(PropTypes.number, props => {
|
||||
if (props.max < 2) {
|
||||
return new Error(['MUI: The prop `max` should be equal to 2 or above.', 'A value below is clamped to 2.'].join('\n'));
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
/**
|
||||
* custom renderer of extraAvatars
|
||||
* @param {number} surplus number of extra avatars
|
||||
* @returns {React.ReactNode} custom element to display
|
||||
*/
|
||||
renderSurplus: PropTypes.func,
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: PropTypes.shape({
|
||||
additionalAvatar: PropTypes.object
|
||||
}),
|
||||
/**
|
||||
* Spacing between avatars.
|
||||
* @default 'medium'
|
||||
*/
|
||||
spacing: PropTypes.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.number]),
|
||||
/**
|
||||
* 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 total number of avatars. Used for calculating the number of extra avatars.
|
||||
* @default children.length
|
||||
*/
|
||||
total: PropTypes.number,
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'circular'
|
||||
*/
|
||||
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['circular', 'rounded', 'square']), PropTypes.string])
|
||||
} : void 0;
|
||||
export default AvatarGroup;
|
||||
10
backend/frontend/node_modules/@mui/material/AvatarGroup/avatarGroupClasses.d.ts
generated
vendored
Normal file
10
backend/frontend/node_modules/@mui/material/AvatarGroup/avatarGroupClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export interface AvatarGroupClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the avatar elements. */
|
||||
avatar: string;
|
||||
}
|
||||
export type AvatarGroupClassKey = keyof AvatarGroupClasses;
|
||||
export declare function getAvatarGroupUtilityClass(slot: string): string;
|
||||
declare const avatarGroupClasses: AvatarGroupClasses;
|
||||
export default avatarGroupClasses;
|
||||
7
backend/frontend/node_modules/@mui/material/AvatarGroup/avatarGroupClasses.js
generated
vendored
Normal file
7
backend/frontend/node_modules/@mui/material/AvatarGroup/avatarGroupClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAvatarGroupUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAvatarGroup', slot);
|
||||
}
|
||||
const avatarGroupClasses = generateUtilityClasses('MuiAvatarGroup', ['root', 'avatar']);
|
||||
export default avatarGroupClasses;
|
||||
4
backend/frontend/node_modules/@mui/material/AvatarGroup/index.d.ts
generated
vendored
Normal file
4
backend/frontend/node_modules/@mui/material/AvatarGroup/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export { default } from './AvatarGroup';
|
||||
export * from './AvatarGroup';
|
||||
export { default as avatarGroupClasses } from './avatarGroupClasses';
|
||||
export * from './avatarGroupClasses';
|
||||
5
backend/frontend/node_modules/@mui/material/AvatarGroup/index.js
generated
vendored
Normal file
5
backend/frontend/node_modules/@mui/material/AvatarGroup/index.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
'use client';
|
||||
|
||||
export { default } from './AvatarGroup';
|
||||
export { default as avatarGroupClasses } from './avatarGroupClasses';
|
||||
export * from './avatarGroupClasses';
|
||||
6
backend/frontend/node_modules/@mui/material/AvatarGroup/package.json
generated
vendored
Normal file
6
backend/frontend/node_modules/@mui/material/AvatarGroup/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/AvatarGroup/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user