1
0
Fork 0

worked on GarageApp stuff

This commit is contained in:
Techognito 2025-08-25 17:46:11 +02:00
parent 60aaf17af3
commit eb606572b0
51919 changed files with 2168177 additions and 18 deletions

View file

@ -0,0 +1,6 @@
declare const ClassNameGenerator: {
configure(generator: (componentName: string) => string): void;
generate(componentName: string): string;
reset(): void;
};
export default ClassNameGenerator;

View file

@ -0,0 +1,17 @@
const defaultGenerator = componentName => componentName;
const createClassNameGenerator = () => {
let generate = defaultGenerator;
return {
configure(generator) {
generate = generator;
},
generate(componentName) {
return generate(componentName);
},
reset() {
generate = defaultGenerator;
}
};
};
const ClassNameGenerator = createClassNameGenerator();
export default ClassNameGenerator;

View file

@ -0,0 +1 @@
export { default } from "./ClassNameGenerator.js";

View file

@ -0,0 +1 @@
export { default } from "./ClassNameGenerator.js";

View file

@ -0,0 +1,3 @@
export default function HTMLElementType(props: {
[key: string]: unknown;
}, propName: string, componentName: string, location: string, propFullName: string): Error | null;

View file

@ -0,0 +1,14 @@
export default function HTMLElementType(props, propName, componentName, location, propFullName) {
if (process.env.NODE_ENV === 'production') {
return null;
}
const propValue = props[propName];
const safePropName = propFullName || propName;
if (propValue == null) {
return null;
}
if (propValue && propValue.nodeType !== 1) {
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an HTMLElement.`);
}
return null;
}

View file

@ -0,0 +1 @@
export { default } from "./HTMLElementType.js";

1
node_modules/@mui/utils/esm/HTMLElementType/index.js generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./HTMLElementType.js";

View file

@ -0,0 +1,20 @@
import * as React from 'react';
import { Simplify } from '@mui/types';
/**
* Type of the ownerState based on the type of an element it applies to.
* This resolves to the provided OwnerState for React components and `undefined` for host components.
* Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
*/
type OwnerStateWhenApplicable<ElementType extends React.ElementType, OwnerState> = ElementType extends React.ComponentType<any> ? OwnerState : ElementType extends keyof React.JSX.IntrinsicElements ? undefined : OwnerState | undefined;
export type AppendOwnerStateReturnType<ElementType extends React.ElementType, OtherProps, OwnerState> = Simplify<OtherProps & {
ownerState: OwnerStateWhenApplicable<ElementType, OwnerState>;
}>;
/**
* Appends the ownerState object to the props, merging with the existing one if necessary.
*
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
* @param otherProps Props of the element.
* @param ownerState
*/
declare function appendOwnerState<ElementType extends React.ElementType, OtherProps extends Record<string, any>, OwnerState>(elementType: ElementType | undefined, otherProps: OtherProps, ownerState: OwnerState): AppendOwnerStateReturnType<ElementType, OtherProps, OwnerState>;
export default appendOwnerState;

View file

@ -0,0 +1,28 @@
import isHostComponent from "../isHostComponent/index.js";
/**
* Type of the ownerState based on the type of an element it applies to.
* This resolves to the provided OwnerState for React components and `undefined` for host components.
* Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
*/
/**
* Appends the ownerState object to the props, merging with the existing one if necessary.
*
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
* @param otherProps Props of the element.
* @param ownerState
*/
function appendOwnerState(elementType, otherProps, ownerState) {
if (elementType === undefined || isHostComponent(elementType)) {
return otherProps;
}
return {
...otherProps,
ownerState: {
...otherProps.ownerState,
...ownerState
}
};
}
export default appendOwnerState;

View file

@ -0,0 +1,2 @@
export { default } from "./appendOwnerState.js";
export type { AppendOwnerStateReturnType } from "./appendOwnerState.js";

View file

@ -0,0 +1 @@
export { default } from "./appendOwnerState.js";

View file

@ -0,0 +1 @@
export default function capitalize(string: string): string;

11
node_modules/@mui/utils/esm/capitalize/capitalize.js generated vendored Normal file
View file

@ -0,0 +1,11 @@
import _formatErrorMessage from "@mui/utils/formatMuiErrorMessage";
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
//
// A strict capitalization should uppercase the first letter of each word in the sentence.
// We only handle the first word.
export default function capitalize(string) {
if (typeof string !== 'string') {
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' : _formatErrorMessage(7));
}
return string.charAt(0).toUpperCase() + string.slice(1);
}

1
node_modules/@mui/utils/esm/capitalize/index.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./capitalize.js";

1
node_modules/@mui/utils/esm/capitalize/index.js generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./capitalize.js";

View file

@ -0,0 +1,2 @@
import PropTypes from 'prop-types';
export default function chainPropTypes<A, B>(propType1: PropTypes.Validator<A>, propType2: PropTypes.Validator<B>): PropTypes.Validator<A & B>;

View file

@ -0,0 +1,8 @@
export default function chainPropTypes(propType1, propType2) {
if (process.env.NODE_ENV === 'production') {
return () => null;
}
return function validate(...args) {
return propType1(...args) || propType2(...args);
};
}

View file

@ -0,0 +1 @@
export { default } from "./chainPropTypes.js";

1
node_modules/@mui/utils/esm/chainPropTypes/index.js generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./chainPropTypes.js";

2
node_modules/@mui/utils/esm/clamp/clamp.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
declare function clamp(val: number, min?: number, max?: number): number;
export default clamp;

4
node_modules/@mui/utils/esm/clamp/clamp.js generated vendored Normal file
View file

@ -0,0 +1,4 @@
function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
return Math.max(min, Math.min(val, max));
}
export default clamp;

1
node_modules/@mui/utils/esm/clamp/index.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./clamp.js";

1
node_modules/@mui/utils/esm/clamp/index.js generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./clamp.js";

View file

@ -0,0 +1,29 @@
/**
* Compose classes from multiple sources.
*
* @example
* ```tsx
* const slots = {
* root: ['root', 'primary'],
* label: ['label'],
* };
*
* const getUtilityClass = (slot) => `MuiButton-${slot}`;
*
* const classes = {
* root: 'my-root-class',
* };
*
* const output = composeClasses(slots, getUtilityClass, classes);
* // {
* // root: 'MuiButton-root MuiButton-primary my-root-class',
* // label: 'MuiButton-label',
* // }
* ```
*
* @param slots a list of classes for each possible slot
* @param getUtilityClass a function to resolve the class based on the slot name
* @param classes the input classes from props
* @returns the resolved classes for all slots
*/
export default function composeClasses<ClassKey extends string>(slots: Record<ClassKey, ReadonlyArray<string | false | undefined | null>>, getUtilityClass: (slot: string) => string, classes?: Record<string, string> | undefined): Record<ClassKey, string>;

View file

@ -0,0 +1,53 @@
/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0
---
These rules are preventing the performance optimizations below.
*/
/**
* Compose classes from multiple sources.
*
* @example
* ```tsx
* const slots = {
* root: ['root', 'primary'],
* label: ['label'],
* };
*
* const getUtilityClass = (slot) => `MuiButton-${slot}`;
*
* const classes = {
* root: 'my-root-class',
* };
*
* const output = composeClasses(slots, getUtilityClass, classes);
* // {
* // root: 'MuiButton-root MuiButton-primary my-root-class',
* // label: 'MuiButton-label',
* // }
* ```
*
* @param slots a list of classes for each possible slot
* @param getUtilityClass a function to resolve the class based on the slot name
* @param classes the input classes from props
* @returns the resolved classes for all slots
*/
export default function composeClasses(slots, getUtilityClass, classes = undefined) {
const output = {};
for (const slotName in slots) {
const slot = slots[slotName];
let buffer = '';
let start = true;
for (let i = 0; i < slot.length; i += 1) {
const value = slot[i];
if (value) {
buffer += (start === true ? '' : ' ') + getUtilityClass(value);
start = false;
if (classes && classes[value]) {
buffer += ' ' + classes[value];
}
}
}
output[slotName] = buffer;
}
return output;
}

View file

@ -0,0 +1 @@
export { default } from "./composeClasses.js";

1
node_modules/@mui/utils/esm/composeClasses/index.js generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./composeClasses.js";

View file

@ -0,0 +1,7 @@
/**
* Safe chained function.
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*/
export default function createChainedFunction<Args extends any[], This>(...funcs: Array<(this: This, ...args: Args) => any>): (this: This, ...args: Args) => void;

View file

@ -0,0 +1,17 @@
/**
* Safe chained function.
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*/
export default function createChainedFunction(...funcs) {
return funcs.reduce((acc, func) => {
if (func == null) {
return acc;
}
return function chainedFunction(...args) {
acc.apply(this, args);
func.apply(this, args);
};
}, () => {});
}

View file

@ -0,0 +1 @@
export { default } from "./createChainedFunction.js";

View file

@ -0,0 +1 @@
export { default } from "./createChainedFunction.js";

4
node_modules/@mui/utils/esm/debounce/debounce.d.ts generated vendored Normal file
View file

@ -0,0 +1,4 @@
export interface Cancelable {
clear(): void;
}
export default function debounce<T extends (...args: any[]) => any>(func: T, wait?: number): T & Cancelable;

17
node_modules/@mui/utils/esm/debounce/debounce.js generated vendored Normal file
View file

@ -0,0 +1,17 @@
// Corresponds to 10 frames at 60 Hz.
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
export default function debounce(func, wait = 166) {
let timeout;
function debounced(...args) {
const later = () => {
// @ts-ignore
func.apply(this, args);
};
clearTimeout(timeout);
timeout = setTimeout(later, wait);
}
debounced.clear = () => {
clearTimeout(timeout);
};
return debounced;
}

2
node_modules/@mui/utils/esm/debounce/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
export { default } from "./debounce.js";
export * from "./debounce.js";

2
node_modules/@mui/utils/esm/debounce/index.js generated vendored Normal file
View file

@ -0,0 +1,2 @@
export { default } from "./debounce.js";
export * from "./debounce.js";

23
node_modules/@mui/utils/esm/deepmerge/deepmerge.d.ts generated vendored Normal file
View file

@ -0,0 +1,23 @@
export declare function isPlainObject(item: unknown): item is Record<keyof any, unknown>;
export interface DeepmergeOptions {
clone?: boolean;
}
/**
* Merge objects deeply.
* It will shallow copy React elements.
*
* If `options.clone` is set to `false` the source object will be merged directly into the target object.
*
* @example
* ```ts
* deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });
* // => { a: { b: 1, c: 2 }, d: 4 }
* ````
*
* @param target The target object.
* @param source The source object.
* @param options The merge options.
* @param options.clone Set to `false` to merge the source object directly into the target object.
* @returns The merged object.
*/
export default function deepmerge<T>(target: T, source: unknown, options?: DeepmergeOptions): T;

64
node_modules/@mui/utils/esm/deepmerge/deepmerge.js generated vendored Normal file
View file

@ -0,0 +1,64 @@
import * as React from 'react';
import { isValidElementType } from 'react-is';
// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
export function isPlainObject(item) {
if (typeof item !== 'object' || item === null) {
return false;
}
const prototype = Object.getPrototypeOf(item);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
}
function deepClone(source) {
if (/*#__PURE__*/React.isValidElement(source) || isValidElementType(source) || !isPlainObject(source)) {
return source;
}
const output = {};
Object.keys(source).forEach(key => {
output[key] = deepClone(source[key]);
});
return output;
}
/**
* Merge objects deeply.
* It will shallow copy React elements.
*
* If `options.clone` is set to `false` the source object will be merged directly into the target object.
*
* @example
* ```ts
* deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });
* // => { a: { b: 1, c: 2 }, d: 4 }
* ````
*
* @param target The target object.
* @param source The source object.
* @param options The merge options.
* @param options.clone Set to `false` to merge the source object directly into the target object.
* @returns The merged object.
*/
export default function deepmerge(target, source, options = {
clone: true
}) {
const output = options.clone ? {
...target
} : target;
if (isPlainObject(target) && isPlainObject(source)) {
Object.keys(source).forEach(key => {
if (/*#__PURE__*/React.isValidElement(source[key]) || isValidElementType(source[key])) {
output[key] = source[key];
} else if (isPlainObject(source[key]) &&
// Avoid prototype pollution
Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
output[key] = deepmerge(target[key], source[key], options);
} else if (options.clone) {
output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
} else {
output[key] = source[key];
}
});
}
return output;
}

2
node_modules/@mui/utils/esm/deepmerge/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
export { default } from "./deepmerge.js";
export * from "./deepmerge.js";

2
node_modules/@mui/utils/esm/deepmerge/index.js generated vendored Normal file
View file

@ -0,0 +1,2 @@
export { default } from "./deepmerge.js";
export * from "./deepmerge.js";

View file

@ -0,0 +1,2 @@
import { Validator } from 'prop-types';
export default function deprecatedPropType<T>(validator: Validator<T>, reason: string): Validator<T>;

View file

@ -0,0 +1,13 @@
export default function deprecatedPropType(validator, reason) {
if (process.env.NODE_ENV === 'production') {
return () => null;
}
return (props, propName, componentName, location, propFullName) => {
const componentNameSafe = componentName || '<<anonymous>>';
const propFullNameSafe = propFullName || propName;
if (typeof props[propName] !== 'undefined') {
return new Error(`The ${location} \`${propFullNameSafe}\` of ` + `\`${componentNameSafe}\` is deprecated. ${reason}`);
}
return null;
};
}

View file

@ -0,0 +1 @@
export { default } from "./deprecatedPropType.js";

View file

@ -0,0 +1 @@
export { default } from "./deprecatedPropType.js";

View file

@ -0,0 +1,3 @@
import PropTypes from 'prop-types';
declare const elementAcceptingRef: PropTypes.Requireable<unknown>;
export default elementAcceptingRef;

View file

@ -0,0 +1,42 @@
import PropTypes from 'prop-types';
import chainPropTypes from "../chainPropTypes/index.js";
function isClassComponent(elementType) {
// elementType.prototype?.isReactComponent
const {
prototype = {}
} = elementType;
return Boolean(prototype.isReactComponent);
}
function acceptingRef(props, propName, componentName, location, propFullName) {
const element = props[propName];
const safePropName = propFullName || propName;
if (element == null ||
// When server-side rendering React doesn't warn either.
// This is not an accurate check for SSR.
// This is only in place for Emotion compat.
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
typeof window === 'undefined') {
return null;
}
let warningHint;
const elementType = element.type;
/**
* Blacklisting instead of whitelisting
*
* Blacklisting will miss some components, such as React.Fragment. Those will at least
* trigger a warning in React.
* We can't whitelist because there is no safe way to detect React.forwardRef
* or class components. "Safe" means there's no public API.
*
*/
if (typeof elementType === 'function' && !isClassComponent(elementType)) {
warningHint = 'Did you accidentally use a plain function component for an element instead?';
}
if (warningHint !== undefined) {
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');
}
return null;
}
const elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);
elementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);
export default elementAcceptingRef;

View file

@ -0,0 +1 @@
export { default } from "./elementAcceptingRef.js";

View file

@ -0,0 +1 @@
export { default } from "./elementAcceptingRef.js";

View file

@ -0,0 +1,3 @@
import PropTypes from 'prop-types';
declare const _default: PropTypes.Validator<PropTypes.ReactComponentLike | null | undefined>;
export default _default;

View file

@ -0,0 +1,40 @@
import PropTypes from 'prop-types';
import chainPropTypes from "../chainPropTypes/index.js";
function isClassComponent(elementType) {
// elementType.prototype?.isReactComponent
const {
prototype = {}
} = elementType;
return Boolean(prototype.isReactComponent);
}
function elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {
const propValue = props[propName];
const safePropName = propFullName || propName;
if (propValue == null ||
// When server-side rendering React doesn't warn either.
// This is not an accurate check for SSR.
// This is only in place for emotion compat.
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
typeof window === 'undefined') {
return null;
}
let warningHint;
/**
* Blacklisting instead of whitelisting
*
* Blacklisting will miss some components, such as React.Fragment. Those will at least
* trigger a warning in React.
* We can't whitelist because there is no safe way to detect React.forwardRef
* or class components. "Safe" means there's no public API.
*
*/
if (typeof propValue === 'function' && !isClassComponent(propValue)) {
warningHint = 'Did you accidentally provide a plain function component instead?';
}
if (warningHint !== undefined) {
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');
}
return null;
}
export default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);

View file

@ -0,0 +1 @@
export { default } from "./elementTypeAcceptingRef.js";

View file

@ -0,0 +1 @@
export { default } from "./elementTypeAcceptingRef.js";

2
node_modules/@mui/utils/esm/exactProp/exactProp.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
import { ValidationMap } from 'prop-types';
export default function exactProp<T>(propTypes: ValidationMap<T>): ValidationMap<T>;

20
node_modules/@mui/utils/esm/exactProp/exactProp.js generated vendored Normal file
View file

@ -0,0 +1,20 @@
// This module is based on https://github.com/airbnb/prop-types-exact repository.
// However, in order to reduce the number of dependencies and to remove some extra safe checks
// the module was forked.
const specialProperty = 'exact-prop: \u200b';
export default function exactProp(propTypes) {
if (process.env.NODE_ENV === 'production') {
return propTypes;
}
return {
...propTypes,
[specialProperty]: props => {
const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));
if (unsupportedProps.length > 0) {
return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\`${prop}\``).join(', ')}. Please remove them.`);
}
return null;
}
};
}

1
node_modules/@mui/utils/esm/exactProp/index.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./exactProp.js";

1
node_modules/@mui/utils/esm/exactProp/index.js generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./exactProp.js";

View file

@ -0,0 +1,10 @@
import { EventHandlers } from "../types/index.js";
/**
* Extracts event handlers from a given object.
* A prop is considered an event handler if it is a function and its name starts with `on`.
*
* @param object An object to extract event handlers from.
* @param excludeKeys An array of keys to exclude from the returned object.
*/
declare function extractEventHandlers(object: Record<string, any> | undefined, excludeKeys?: string[]): EventHandlers;
export default extractEventHandlers;

View file

@ -0,0 +1,18 @@
/**
* Extracts event handlers from a given object.
* A prop is considered an event handler if it is a function and its name starts with `on`.
*
* @param object An object to extract event handlers from.
* @param excludeKeys An array of keys to exclude from the returned object.
*/
function extractEventHandlers(object, excludeKeys = []) {
if (object === undefined) {
return {};
}
const result = {};
Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {
result[prop] = object[prop];
});
return result;
}
export default extractEventHandlers;

View file

@ -0,0 +1 @@
export { default } from "./extractEventHandlers.js";

View file

@ -0,0 +1 @@
export { default } from "./extractEventHandlers.js";

View file

@ -0,0 +1,11 @@
/**
* WARNING: Don't import this directly. It's imported by the code generated by
* `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`
* constructors to ensure the plugin works as expected. Supported patterns include:
* throw new Error('My message');
* throw new Error(`My message: ${foo}`);
* throw new Error(`My message: ${foo}` + 'another string');
* ...
* @param {number} code
*/
export default function formatMuiErrorMessage(code: number, ...args: string[]): string;

View file

@ -0,0 +1,15 @@
/**
* WARNING: Don't import this directly. It's imported by the code generated by
* `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`
* constructors to ensure the plugin works as expected. Supported patterns include:
* throw new Error('My message');
* throw new Error(`My message: ${foo}`);
* throw new Error(`My message: ${foo}` + 'another string');
* ...
* @param {number} code
*/
export default function formatMuiErrorMessage(code, ...args) {
const url = new URL(`https://mui.com/production-error/?code=${code}`);
args.forEach(arg => url.searchParams.append('args[]', arg));
return `Minified MUI error #${code}; visit ${url} for the full message.`;
}

View file

@ -0,0 +1 @@
export { default } from "./formatMuiErrorMessage.js";

View file

@ -0,0 +1 @@
export { default } from "./formatMuiErrorMessage.js";

View file

@ -0,0 +1,17 @@
export type GlobalStateSlot = keyof typeof globalStateClasses;
export declare const globalStateClasses: {
active: string;
checked: string;
completed: string;
disabled: string;
error: string;
expanded: string;
focused: string;
focusVisible: string;
open: string;
readOnly: string;
required: string;
selected: string;
};
export default function generateUtilityClass(componentName: string, slot: string, globalStatePrefix?: string): string;
export declare function isGlobalState(slot: string): boolean;

View file

@ -0,0 +1,22 @@
import ClassNameGenerator from "../ClassNameGenerator/index.js";
export const globalStateClasses = {
active: 'active',
checked: 'checked',
completed: 'completed',
disabled: 'disabled',
error: 'error',
expanded: 'expanded',
focused: 'focused',
focusVisible: 'focusVisible',
open: 'open',
readOnly: 'readOnly',
required: 'required',
selected: 'selected'
};
export default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
const globalStateClass = globalStateClasses[slot];
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
}
export function isGlobalState(slot) {
return globalStateClasses[slot] !== undefined;
}

View file

@ -0,0 +1,2 @@
export { default } from "./generateUtilityClass.js";
export * from "./generateUtilityClass.js";

View file

@ -0,0 +1,2 @@
export { default } from "./generateUtilityClass.js";
export * from "./generateUtilityClass.js";

View file

@ -0,0 +1 @@
export default function generateUtilityClasses<T extends string>(componentName: string, slots: T[], globalStatePrefix?: string): Record<T, string>;

View file

@ -0,0 +1,8 @@
import generateUtilityClass from "../generateUtilityClass/index.js";
export default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
const result = {};
slots.forEach(slot => {
result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
});
return result;
}

View file

@ -0,0 +1 @@
export { default } from "./generateUtilityClasses.js";

View file

@ -0,0 +1 @@
export { default } from "./generateUtilityClasses.js";

View file

@ -0,0 +1,7 @@
import * as React from 'react';
/**
* cherry-pick from
* https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js
* originally forked from recompose/getDisplayName
*/
export default function getDisplayName(Component: React.ElementType): string | undefined;

View file

@ -0,0 +1,38 @@
import { ForwardRef, Memo } from 'react-is';
function getFunctionComponentName(Component, fallback = '') {
return Component.displayName || Component.name || fallback;
}
function getWrappedName(outerType, innerType, wrapperName) {
const functionName = getFunctionComponentName(innerType);
return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);
}
/**
* cherry-pick from
* https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js
* originally forked from recompose/getDisplayName
*/
export default function getDisplayName(Component) {
if (Component == null) {
return undefined;
}
if (typeof Component === 'string') {
return Component;
}
if (typeof Component === 'function') {
return getFunctionComponentName(Component, 'Component');
}
// TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`
if (typeof Component === 'object') {
switch (Component.$$typeof) {
case ForwardRef:
return getWrappedName(Component, Component.render, 'ForwardRef');
case Memo:
return getWrappedName(Component, Component.type, 'memo');
default:
return undefined;
}
}
return undefined;
}

View file

@ -0,0 +1 @@
export { default } from "./getDisplayName.js";

1
node_modules/@mui/utils/esm/getDisplayName/index.js generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./getDisplayName.js";

View file

@ -0,0 +1,9 @@
import * as React from 'react';
/**
* Returns the ref of a React element handling differences between React 19 and older versions.
* It will throw runtime error if the element is not a valid React element.
*
* @param element React.ReactElement
* @returns React.Ref<any> | null
*/
export default function getReactElementRef(element: React.ReactElement): React.Ref<any> | null;

View file

@ -0,0 +1,18 @@
import * as React from 'react';
/**
* Returns the ref of a React element handling differences between React 19 and older versions.
* It will throw runtime error if the element is not a valid React element.
*
* @param element React.ReactElement
* @returns React.Ref<any> | null
*/
export default function getReactElementRef(element) {
// 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions
if (parseInt(React.version, 10) >= 19) {
return element?.props?.ref || null;
}
// @ts-expect-error element.ref is not included in the ReactElement type
// https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189
return element?.ref || null;
}

View file

@ -0,0 +1 @@
export { default } from "./getReactElementRef.js";

View file

@ -0,0 +1 @@
export { default } from "./getReactElementRef.js";

View file

@ -0,0 +1,11 @@
import * as React from 'react';
/**
* Returns the ref of a React node handling differences between React 19 and older versions.
* It will return null if the node is not a valid React element.
*
* @param element React.ReactNode
* @returns React.Ref<any> | null
*
* @deprecated Use getReactElementRef instead
*/
export default function getReactNodeRef(element: React.ReactNode): React.Ref<any> | null;

View file

@ -0,0 +1,23 @@
import * as React from 'react';
/**
* Returns the ref of a React node handling differences between React 19 and older versions.
* It will return null if the node is not a valid React element.
*
* @param element React.ReactNode
* @returns React.Ref<any> | null
*
* @deprecated Use getReactElementRef instead
*/
export default function getReactNodeRef(element) {
if (!element || ! /*#__PURE__*/React.isValidElement(element)) {
return null;
}
// 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions
return element.props.propertyIsEnumerable('ref') ? element.props.ref :
// @ts-expect-error element.ref is not included in the ReactElement type
// We cannot check for it, but isValidElement is true at this point
// https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189
element.ref;
}

View file

@ -0,0 +1 @@
export { default } from "./getReactNodeRef.js";

1
node_modules/@mui/utils/esm/getReactNodeRef/index.js generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./getReactNodeRef.js";

View file

@ -0,0 +1 @@
export default function getScrollbarSize(win?: Window): number;

View file

@ -0,0 +1,7 @@
// A change of the browser zoom change the scrollbar size.
// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18
export default function getScrollbarSize(win = window) {
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
const documentWidth = win.document.documentElement.clientWidth;
return win.innerWidth - documentWidth;
}

View file

@ -0,0 +1 @@
export { default } from "./getScrollbarSize.js";

View file

@ -0,0 +1 @@
export { default } from "./getScrollbarSize.js";

View file

@ -0,0 +1,8 @@
import * as React from 'react';
/**
* Gets only the valid children of a component,
* and ignores any nullish or falsy child.
*
* @param children the children
*/
export default function getValidReactChildren(children: React.ReactNode): React.ReactElement<unknown>[];

View file

@ -0,0 +1,11 @@
import * as React from 'react';
/**
* Gets only the valid children of a component,
* and ignores any nullish or falsy child.
*
* @param children the children
*/
export default function getValidReactChildren(children) {
return React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child));
}

View file

@ -0,0 +1 @@
export { default } from "./getValidReactChildren.js";

View file

@ -0,0 +1 @@
export { default } from "./getValidReactChildren.js";

51
node_modules/@mui/utils/esm/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,51 @@
export { default as chainPropTypes } from "./chainPropTypes/index.js";
export { default as deepmerge } from "./deepmerge/index.js";
export { isPlainObject } from "./deepmerge/index.js";
export { default as elementAcceptingRef } from "./elementAcceptingRef/index.js";
export { default as elementTypeAcceptingRef } from "./elementTypeAcceptingRef/index.js";
export { default as exactProp } from "./exactProp/index.js";
export { default as formatMuiErrorMessage } from "./formatMuiErrorMessage/index.js";
export { default as getDisplayName } from "./getDisplayName/index.js";
export { default as HTMLElementType } from "./HTMLElementType/index.js";
export { default as ponyfillGlobal } from "./ponyfillGlobal/index.js";
export { default as refType } from "./refType/index.js";
export { default as unstable_capitalize } from "./capitalize/index.js";
export { default as unstable_createChainedFunction } from "./createChainedFunction/index.js";
export { default as unstable_debounce } from "./debounce/index.js";
export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.js";
export { default as unstable_isMuiElement } from "./isMuiElement/index.js";
export { default as unstable_ownerDocument } from "./ownerDocument/index.js";
export { default as unstable_ownerWindow } from "./ownerWindow/index.js";
export { default as unstable_requirePropFactory } from "./requirePropFactory/index.js";
export { default as unstable_setRef } from "./setRef/index.js";
export { default as unstable_useEnhancedEffect } from "./useEnhancedEffect/index.js";
export { default as unstable_useId } from "./useId/index.js";
export { default as unstable_unsupportedProp } from "./unsupportedProp/index.js";
export { default as unstable_useControlled } from "./useControlled/index.js";
export { default as unstable_useEventCallback } from "./useEventCallback/index.js";
export { default as unstable_useForkRef } from "./useForkRef/index.js";
export { default as unstable_useLazyRef } from "./useLazyRef/index.js";
export { default as unstable_useTimeout, Timeout as unstable_Timeout } from "./useTimeout/index.js";
export { default as unstable_useOnMount } from "./useOnMount/index.js";
export { default as unstable_useIsFocusVisible } from "./useIsFocusVisible/index.js";
export { default as unstable_isFocusVisible } from "./isFocusVisible/index.js";
export { default as unstable_getScrollbarSize } from "./getScrollbarSize/index.js";
export { default as usePreviousProps } from "./usePreviousProps/index.js";
export { default as getValidReactChildren } from "./getValidReactChildren/index.js";
export { default as visuallyHidden } from "./visuallyHidden/index.js";
export { default as integerPropType } from "./integerPropType/index.js";
export { default as internal_resolveProps } from "./resolveProps/index.js";
export { default as unstable_composeClasses } from "./composeClasses/index.js";
export { default as unstable_generateUtilityClass } from "./generateUtilityClass/index.js";
export { isGlobalState as unstable_isGlobalState } from "./generateUtilityClass/index.js";
export * from "./generateUtilityClass/index.js";
export { default as unstable_generateUtilityClasses } from "./generateUtilityClasses/index.js";
export { default as unstable_ClassNameGenerator } from "./ClassNameGenerator/index.js";
export { default as clamp } from "./clamp/index.js";
export { default as unstable_useSlotProps } from "./useSlotProps/index.js";
export type { UseSlotPropsParameters, UseSlotPropsResult } from "./useSlotProps/index.js";
export { default as unstable_resolveComponentProps } from "./resolveComponentProps/index.js";
export { default as unstable_extractEventHandlers } from "./extractEventHandlers/index.js";
export { default as unstable_getReactNodeRef } from "./getReactNodeRef/index.js";
export { default as unstable_getReactElementRef } from "./getReactElementRef/index.js";
export * from "./types/index.js";

57
node_modules/@mui/utils/esm/index.js generated vendored Normal file
View file

@ -0,0 +1,57 @@
/**
* @mui/utils v7.3.1
*
* @license MIT
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
export { default as chainPropTypes } from "./chainPropTypes/index.js";
export { default as deepmerge } from "./deepmerge/index.js";
export { isPlainObject } from "./deepmerge/index.js";
export { default as elementAcceptingRef } from "./elementAcceptingRef/index.js";
export { default as elementTypeAcceptingRef } from "./elementTypeAcceptingRef/index.js";
export { default as exactProp } from "./exactProp/index.js";
export { default as formatMuiErrorMessage } from "./formatMuiErrorMessage/index.js";
export { default as getDisplayName } from "./getDisplayName/index.js";
export { default as HTMLElementType } from "./HTMLElementType/index.js";
export { default as ponyfillGlobal } from "./ponyfillGlobal/index.js";
export { default as refType } from "./refType/index.js";
export { default as unstable_capitalize } from "./capitalize/index.js";
export { default as unstable_createChainedFunction } from "./createChainedFunction/index.js";
export { default as unstable_debounce } from "./debounce/index.js";
export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.js";
export { default as unstable_isMuiElement } from "./isMuiElement/index.js";
export { default as unstable_ownerDocument } from "./ownerDocument/index.js";
export { default as unstable_ownerWindow } from "./ownerWindow/index.js";
export { default as unstable_requirePropFactory } from "./requirePropFactory/index.js";
export { default as unstable_setRef } from "./setRef/index.js";
export { default as unstable_useEnhancedEffect } from "./useEnhancedEffect/index.js";
export { default as unstable_useId } from "./useId/index.js";
export { default as unstable_unsupportedProp } from "./unsupportedProp/index.js";
export { default as unstable_useControlled } from "./useControlled/index.js";
export { default as unstable_useEventCallback } from "./useEventCallback/index.js";
export { default as unstable_useForkRef } from "./useForkRef/index.js";
export { default as unstable_useLazyRef } from "./useLazyRef/index.js";
export { default as unstable_useTimeout, Timeout as unstable_Timeout } from "./useTimeout/index.js";
export { default as unstable_useOnMount } from "./useOnMount/index.js";
export { default as unstable_useIsFocusVisible } from "./useIsFocusVisible/index.js";
export { default as unstable_isFocusVisible } from "./isFocusVisible/index.js";
export { default as unstable_getScrollbarSize } from "./getScrollbarSize/index.js";
export { default as usePreviousProps } from "./usePreviousProps/index.js";
export { default as getValidReactChildren } from "./getValidReactChildren/index.js";
export { default as visuallyHidden } from "./visuallyHidden/index.js";
export { default as integerPropType } from "./integerPropType/index.js";
export { default as internal_resolveProps } from "./resolveProps/index.js";
export { default as unstable_composeClasses } from "./composeClasses/index.js";
export { default as unstable_generateUtilityClass } from "./generateUtilityClass/index.js";
export { isGlobalState as unstable_isGlobalState } from "./generateUtilityClass/index.js";
export * from "./generateUtilityClass/index.js";
export { default as unstable_generateUtilityClasses } from "./generateUtilityClasses/index.js";
export { default as unstable_ClassNameGenerator } from "./ClassNameGenerator/index.js";
export { default as clamp } from "./clamp/index.js";
export { default as unstable_useSlotProps } from "./useSlotProps/index.js";
export { default as unstable_resolveComponentProps } from "./resolveComponentProps/index.js";
export { default as unstable_extractEventHandlers } from "./extractEventHandlers/index.js";
export { default as unstable_getReactNodeRef } from "./getReactNodeRef/index.js";
export { default as unstable_getReactElementRef } from "./getReactElementRef/index.js";
export * from "./types/index.js";

View file

@ -0,0 +1,2 @@
export { default } from "./integerPropType.js";
export * from "./integerPropType.js";

2
node_modules/@mui/utils/esm/integerPropType/index.js generated vendored Normal file
View file

@ -0,0 +1,2 @@
export { default } from "./integerPropType.js";
export * from "./integerPropType.js";

View file

@ -0,0 +1,4 @@
import PropTypes from 'prop-types';
export declare function getTypeByValue(value: any): string;
declare const integerPropType: PropTypes.Requireable<number>;
export default integerPropType;

View file

@ -0,0 +1,45 @@
export function getTypeByValue(value) {
const valueType = typeof value;
switch (valueType) {
case 'number':
if (Number.isNaN(value)) {
return 'NaN';
}
if (!Number.isFinite(value)) {
return 'Infinity';
}
if (value !== Math.floor(value)) {
return 'float';
}
return 'number';
case 'object':
if (value === null) {
return 'null';
}
return value.constructor.name;
default:
return valueType;
}
}
function requiredInteger(props, propName, componentName, location) {
const propValue = props[propName];
if (propValue == null || !Number.isInteger(propValue)) {
const propType = getTypeByValue(propValue);
return new RangeError(`Invalid ${location} \`${propName}\` of type \`${propType}\` supplied to \`${componentName}\`, expected \`integer\`.`);
}
return null;
}
function validator(props, propName, componentName, location) {
const propValue = props[propName];
if (propValue === undefined) {
return null;
}
return requiredInteger(props, propName, componentName, location);
}
function validatorNoop() {
return null;
}
validator.isRequired = requiredInteger;
validatorNoop.isRequired = validatorNoop;
const integerPropType = process.env.NODE_ENV === 'production' ? validatorNoop : validator;
export default integerPropType;

View file

@ -0,0 +1 @@
export { default } from "./isFocusVisible.js";

1
node_modules/@mui/utils/esm/isFocusVisible/index.js generated vendored Normal file
View file

@ -0,0 +1 @@
export { default } from "./isFocusVisible.js";

Some files were not shown because too many files have changed in this diff Show more