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

76
node_modules/@mui/material/Skeleton/Skeleton.d.ts generated vendored Normal file
View File

@@ -0,0 +1,76 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableStringUnion } from '@mui/types';
import { Theme } from '..';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { SkeletonClasses } from './skeletonClasses';
export interface SkeletonPropsVariantOverrides {}
export interface SkeletonOwnProps {
/**
* The animation.
* If `false` the animation effect is disabled.
* @default 'pulse'
*/
animation?: 'pulse' | 'wave' | false;
/**
* Optional children to infer width and height from.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<SkeletonClasses>;
/**
* Height of the skeleton.
* Useful when you don't want to adapt the skeleton to a text element but for instance a card.
*/
height?: number | string;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
/**
* The type of content that will be rendered.
* @default 'text'
*/
variant?: OverridableStringUnion<
'text' | 'rectangular' | 'rounded' | 'circular',
SkeletonPropsVariantOverrides
>;
/**
* Width of the skeleton.
* Useful when the skeleton is inside an inline element with no width of its own.
*/
width?: number | string;
}
export interface SkeletonTypeMap<
AdditionalProps = {},
RootComponent extends React.ElementType = 'span',
> {
props: AdditionalProps & SkeletonOwnProps;
defaultComponent: RootComponent;
}
/**
*
* Demos:
*
* - [Skeleton](https://mui.com/material-ui/react-skeleton/)
*
* API:
*
* - [Skeleton API](https://mui.com/material-ui/api/skeleton/)
*/
declare const Skeleton: OverridableComponent<SkeletonTypeMap>;
export type SkeletonProps<
RootComponent extends React.ElementType = SkeletonTypeMap['defaultComponent'],
AdditionalProps = {},
> = OverrideProps<SkeletonTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
component?: React.ElementType;
};
export default Skeleton;

267
node_modules/@mui/material/Skeleton/Skeleton.js generated vendored Normal file
View File

@@ -0,0 +1,267 @@
'use client';
import * as React from 'react';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import composeClasses from '@mui/utils/composeClasses';
import { alpha, unstable_getUnit as getUnit, unstable_toUnitless as toUnitless } from "../styles/index.js";
import { keyframes, css, styled } from "../zero-styled/index.js";
import memoTheme from "../utils/memoTheme.js";
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
import { getSkeletonUtilityClass } from "./skeletonClasses.js";
import { jsx as _jsx } from "react/jsx-runtime";
const useUtilityClasses = ownerState => {
const {
classes,
variant,
animation,
hasChildren,
width,
height
} = ownerState;
const slots = {
root: ['root', variant, animation, hasChildren && 'withChildren', hasChildren && !width && 'fitContent', hasChildren && !height && 'heightAuto']
};
return composeClasses(slots, getSkeletonUtilityClass, classes);
};
const pulseKeyframe = keyframes`
0% {
opacity: 1;
}
50% {
opacity: 0.4;
}
100% {
opacity: 1;
}
`;
const waveKeyframe = keyframes`
0% {
transform: translateX(-100%);
}
50% {
/* +0.5s of delay between each loop */
transform: translateX(100%);
}
100% {
transform: translateX(100%);
}
`;
// This implementation is for supporting both Styled-components v4+ and Pigment CSS.
// A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).
// which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).
const pulseAnimation = typeof pulseKeyframe !== 'string' ? css`
animation: ${pulseKeyframe} 2s ease-in-out 0.5s infinite;
` : null;
const waveAnimation = typeof waveKeyframe !== 'string' ? css`
animation: ${waveKeyframe} 2s linear 0.5s infinite;
` : null;
const SkeletonRoot = styled('span', {
name: 'MuiSkeleton',
slot: 'Root',
overridesResolver: (props, styles) => {
const {
ownerState
} = props;
return [styles.root, styles[ownerState.variant], ownerState.animation !== false && styles[ownerState.animation], ownerState.hasChildren && styles.withChildren, ownerState.hasChildren && !ownerState.width && styles.fitContent, ownerState.hasChildren && !ownerState.height && styles.heightAuto];
}
})(memoTheme(({
theme
}) => {
const radiusUnit = getUnit(theme.shape.borderRadius) || 'px';
const radiusValue = toUnitless(theme.shape.borderRadius);
return {
display: 'block',
// Create a "on paper" color with sufficient contrast retaining the color
backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
height: '1.2em',
variants: [{
props: {
variant: 'text'
},
style: {
marginTop: 0,
marginBottom: 0,
height: 'auto',
transformOrigin: '0 55%',
transform: 'scale(1, 0.60)',
borderRadius: `${radiusValue}${radiusUnit}/${Math.round(radiusValue / 0.6 * 10) / 10}${radiusUnit}`,
'&:empty:before': {
content: '"\\00a0"'
}
}
}, {
props: {
variant: 'circular'
},
style: {
borderRadius: '50%'
}
}, {
props: {
variant: 'rounded'
},
style: {
borderRadius: (theme.vars || theme).shape.borderRadius
}
}, {
props: ({
ownerState
}) => ownerState.hasChildren,
style: {
'& > *': {
visibility: 'hidden'
}
}
}, {
props: ({
ownerState
}) => ownerState.hasChildren && !ownerState.width,
style: {
maxWidth: 'fit-content'
}
}, {
props: ({
ownerState
}) => ownerState.hasChildren && !ownerState.height,
style: {
height: 'auto'
}
}, {
props: {
animation: 'pulse'
},
style: pulseAnimation || {
animation: `${pulseKeyframe} 2s ease-in-out 0.5s infinite`
}
}, {
props: {
animation: 'wave'
},
style: {
position: 'relative',
overflow: 'hidden',
/* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
WebkitMaskImage: '-webkit-radial-gradient(white, black)',
'&::after': {
background: `linear-gradient(
90deg,
transparent,
${(theme.vars || theme).palette.action.hover},
transparent
)`,
content: '""',
position: 'absolute',
transform: 'translateX(-100%)' /* Avoid flash during server-side hydration */,
bottom: 0,
left: 0,
right: 0,
top: 0
}
}
}, {
props: {
animation: 'wave'
},
style: {
'&::after': waveAnimation || {
animation: `${waveKeyframe} 2s linear 0.5s infinite`
}
}
}]
};
}));
const Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {
const props = useDefaultProps({
props: inProps,
name: 'MuiSkeleton'
});
const {
animation = 'pulse',
className,
component = 'span',
height,
style,
variant = 'text',
width,
...other
} = props;
const ownerState = {
...props,
animation,
component,
variant,
hasChildren: Boolean(other.children)
};
const classes = useUtilityClasses(ownerState);
return /*#__PURE__*/_jsx(SkeletonRoot, {
as: component,
ref: ref,
className: clsx(classes.root, className),
ownerState: ownerState,
...other,
style: {
width,
height,
...style
}
});
});
process.env.NODE_ENV !== "production" ? Skeleton.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 animation.
* If `false` the animation effect is disabled.
* @default 'pulse'
*/
animation: PropTypes.oneOf(['pulse', 'wave', false]),
/**
* Optional children to infer width and height from.
*/
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,
/**
* Height of the skeleton.
* Useful when you don't want to adapt the skeleton to a text element but for instance a card.
*/
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* @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 type of content that will be rendered.
* @default 'text'
*/
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['circular', 'rectangular', 'rounded', 'text']), PropTypes.string]),
/**
* Width of the skeleton.
* Useful when the skeleton is inside an inline element with no width of its own.
*/
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
} : void 0;
export default Skeleton;

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

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

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

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

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

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

View File

@@ -0,0 +1,26 @@
export interface SkeletonClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the root element if `variant="text"`. */
text: string;
/** Styles applied to the root element if `variant="rectangular"`. */
rectangular: string;
/** Styles applied to the root element if `variant="rounded"`. */
rounded: string;
/** Styles applied to the root element if `variant="circular"`. */
circular: string;
/** Styles applied to the root element if `animation="pulse"`. */
pulse: string;
/** Styles applied to the root element if `animation="wave"`. */
wave: string;
/** Styles applied when the component is passed children. */
withChildren: string;
/** Styles applied when the component is passed children and no width. */
fitContent: string;
/** Styles applied when the component is passed children and no height. */
heightAuto: string;
}
export type SkeletonClassKey = keyof SkeletonClasses;
export declare function getSkeletonUtilityClass(slot: string): string;
declare const skeletonClasses: SkeletonClasses;
export default skeletonClasses;

View File

@@ -0,0 +1,7 @@
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
import generateUtilityClass from '@mui/utils/generateUtilityClass';
export function getSkeletonUtilityClass(slot) {
return generateUtilityClass('MuiSkeleton', slot);
}
const skeletonClasses = generateUtilityClasses('MuiSkeleton', ['root', 'text', 'rectangular', 'rounded', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);
export default skeletonClasses;