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 @@
export {};

View File

@@ -0,0 +1,4 @@
function areArraysEqual(array1, array2, itemComparer = (a, b) => a === b) {
return array1.length === array2.length && array1.every((value, index) => itemComparer(value, array2[index]));
}
export default areArraysEqual;

View File

@@ -0,0 +1,2 @@
import capitalize from '@mui/utils/capitalize';
export default capitalize;

View File

@@ -0,0 +1,2 @@
import createChainedFunction from '@mui/utils/createChainedFunction';
export default createChainedFunction;

View File

@@ -0,0 +1,41 @@
/**
* Type guard to check if the object has a "main" property of type string.
*
* @param obj - the object to check
* @returns boolean
*/
function hasCorrectMainProperty(obj) {
return typeof obj.main === 'string';
}
/**
* Checks if the object conforms to the SimplePaletteColorOptions type.
* The minimum requirement is that the object has a "main" property of type string, this is always checked.
* Optionally, you can pass additional properties to check.
*
* @param obj - The object to check
* @param additionalPropertiesToCheck - Array containing "light", "dark", and/or "contrastText"
* @returns boolean
*/
function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
if (!hasCorrectMainProperty(obj)) {
return false;
}
for (const value of additionalPropertiesToCheck) {
if (!obj.hasOwnProperty(value) || typeof obj[value] !== 'string') {
return false;
}
}
return true;
}
/**
* Creates a filter function used to filter simple palette color options.
* The minimum requirement is that the object has a "main" property of type string, this is always checked.
* Optionally, you can pass additional properties to check.
*
* @param additionalPropertiesToCheck - Array containing "light", "dark", and/or "contrastText"
* @returns ([, value]: [any, PaletteColorOptions]) => boolean
*/
export default function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
}

View File

@@ -0,0 +1,26 @@
'use client';
import * as React from 'react';
import SvgIcon from "../SvgIcon/index.js";
/**
* Private module reserved for @mui packages.
*/
import { jsx as _jsx } from "react/jsx-runtime";
export default function createSvgIcon(path, displayName) {
function Component(props, ref) {
return /*#__PURE__*/_jsx(SvgIcon, {
"data-testid": `${displayName}Icon`,
ref: ref,
...props,
children: path
});
}
if (process.env.NODE_ENV !== 'production') {
// Need to set `displayName` on the inner component for React.memo.
// React prior to 16.14 ignores `displayName` on the wrapper.
Component.displayName = `${displayName}Icon`;
}
Component.muiName = SvgIcon.muiName;
return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));
}

2
node_modules/@mui/material/modern/utils/debounce.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import debounce from '@mui/utils/debounce';
export default debounce;

View File

@@ -0,0 +1,2 @@
import deprecatedPropType from '@mui/utils/deprecatedPropType';
export default deprecatedPropType;

View File

@@ -0,0 +1,2 @@
import getScrollbarSize from '@mui/utils/getScrollbarSize';
export default getScrollbarSize;

30
node_modules/@mui/material/modern/utils/index.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
'use client';
import { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/utils';
export { default as capitalize } from "./capitalize.js";
export { default as createChainedFunction } from "./createChainedFunction.js";
export { default as createSvgIcon } from "./createSvgIcon.js";
export { default as debounce } from "./debounce.js";
export { default as deprecatedPropType } from "./deprecatedPropType.js";
export { default as isMuiElement } from "./isMuiElement.js";
export { default as unstable_memoTheme } from "./memoTheme.js";
export { default as ownerDocument } from "./ownerDocument.js";
export { default as ownerWindow } from "./ownerWindow.js";
export { default as requirePropFactory } from "./requirePropFactory.js";
export { default as setRef } from "./setRef.js";
export { default as unstable_useEnhancedEffect } from "./useEnhancedEffect.js";
export { default as unstable_useId } from "./useId.js";
export { default as unsupportedProp } from "./unsupportedProp.js";
export { default as useControlled } from "./useControlled.js";
export { default as useEventCallback } from "./useEventCallback.js";
export { default as useForkRef } from "./useForkRef.js";
// TODO: remove this export once ClassNameGenerator is stable
// eslint-disable-next-line @typescript-eslint/naming-convention
export const unstable_ClassNameGenerator = {
configure: generator => {
if (process.env.NODE_ENV !== 'production') {
console.warn(['MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.', '', "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", '', 'The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401', '', 'The updated documentation: https://mui.com/guides/classname-generator/'].join('\n'));
}
ClassNameGenerator.configure(generator);
}
};

View File

@@ -0,0 +1,7 @@
/**
* Determines if a given element is a DOM element name (i.e. not a React component).
*/
function isHostComponent(element) {
return typeof element === 'string';
}
export default isHostComponent;

View File

@@ -0,0 +1,2 @@
import isMuiElement from '@mui/utils/isMuiElement';
export default isMuiElement;

24
node_modules/@mui/material/modern/utils/memoTheme.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
// We need to pass an argument as `{ theme }` for PigmentCSS, but we don't want to
// allocate more objects.
const arg = {
theme: undefined
};
/**
* Memoize style function on theme.
* Intended to be used in styled() calls that only need access to the theme.
*/
export default function memoTheme(styleFn) {
let lastValue;
let lastTheme;
return props => {
let value = lastValue;
if (value === undefined || props.theme !== lastTheme) {
arg.theme = props.theme;
value = styleFn(arg);
lastValue = value;
lastTheme = props.theme;
}
return value;
};
}

View File

@@ -0,0 +1,18 @@
/**
* Removes event handlers from the given object.
* A field is considered an event handler if it is a function with a name beginning with `on`.
*
* @param object Object to remove event handlers from.
* @returns Object with event handlers removed.
*/
function omitEventHandlers(object) {
if (object === undefined) {
return {};
}
const result = {};
Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {
result[prop] = object[prop];
});
return result;
}
export default omitEventHandlers;

View File

@@ -0,0 +1,2 @@
import ownerDocument from '@mui/utils/ownerDocument';
export default ownerDocument;

View File

@@ -0,0 +1,2 @@
import ownerWindow from '@mui/utils/ownerWindow';
export default ownerWindow;

View File

@@ -0,0 +1,2 @@
import requirePropFactory from '@mui/utils/requirePropFactory';
export default requirePropFactory;

2
node_modules/@mui/material/modern/utils/setRef.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import setRef from '@mui/utils/setRef';
export default setRef;

View File

@@ -0,0 +1,5 @@
import isHostComponent from "./isHostComponent.js";
const shouldSpreadAdditionalProps = Slot => {
return !Slot || !isHostComponent(Slot);
};
export default shouldSpreadAdditionalProps;

1
node_modules/@mui/material/modern/utils/types.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,2 @@
import unsupportedProp from '@mui/utils/unsupportedProp';
export default unsupportedProp;

View File

@@ -0,0 +1,4 @@
'use client';
import useControlled from '@mui/utils/useControlled';
export default useControlled;

View File

@@ -0,0 +1,4 @@
'use client';
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
export default useEnhancedEffect;

View File

@@ -0,0 +1,4 @@
'use client';
import useEventCallback from '@mui/utils/useEventCallback';
export default useEventCallback;

View File

@@ -0,0 +1,4 @@
'use client';
import useForkRef from '@mui/utils/useForkRef';
export default useForkRef;

4
node_modules/@mui/material/modern/utils/useId.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
'use client';
import useId from '@mui/utils/useId';
export default useId;

85
node_modules/@mui/material/modern/utils/useSlot.js generated vendored Normal file
View File

@@ -0,0 +1,85 @@
'use client';
import useForkRef from '@mui/utils/useForkRef';
import appendOwnerState from '@mui/utils/appendOwnerState';
import resolveComponentProps from '@mui/utils/resolveComponentProps';
import mergeSlotProps from '@mui/utils/mergeSlotProps';
/**
* An internal function to create a Material UI slot.
*
* This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop
* while Base UI does not need to support leaf component customization.
*
* @param {string} name: name of the slot
* @param {object} parameters
* @returns {[Slot, slotProps]} The slot's React component and the slot's props
*
* Note: the returned slot's props
* - will never contain `component` prop.
* - might contain `as` prop.
*/
export default function useSlot(
/**
* The slot's name. All Material UI components should have `root` slot.
*
* If the name is `root`, the logic behaves differently from other slots,
* e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.
*/
name, parameters) {
const {
className,
elementType: initialElementType,
ownerState,
externalForwardedProps,
getSlotOwnerState,
internalForwardedProps,
...useSlotPropsParams
} = parameters;
const {
component: rootComponent,
slots = {
[name]: undefined
},
slotProps = {
[name]: undefined
},
...other
} = externalForwardedProps;
const elementType = slots[name] || initialElementType;
// `slotProps[name]` can be a callback that receives the component's ownerState.
// `resolvedComponentsProps` is always a plain object.
const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);
const {
props: {
component: slotComponent,
...mergedProps
},
internalRef
} = mergeSlotProps({
className,
...useSlotPropsParams,
externalForwardedProps: name === 'root' ? other : undefined,
externalSlotProps: resolvedComponentsProps
});
const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);
const slotOwnerState = getSlotOwnerState ? getSlotOwnerState(mergedProps) : {};
const finalOwnerState = {
...ownerState,
...slotOwnerState
};
const LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;
const props = appendOwnerState(elementType, {
...(name === 'root' && !rootComponent && !slots[name] && internalForwardedProps),
...(name !== 'root' && !slots[name] && internalForwardedProps),
...mergedProps,
...(LeafComponent && {
as: LeafComponent
}),
ref
}, finalOwnerState);
Object.keys(slotOwnerState).forEach(propName => {
delete props[propName];
});
return [elementType, props];
}