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 @@
import { DefaultTheme } from "../defaultTheme/index.js";
export interface ThemeProviderProps<Theme = DefaultTheme> {
children?: React.ReactNode;
theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
}
export default function ThemeProvider<T = DefaultTheme>(props: ThemeProviderProps<T>): React.ReactElement<ThemeProviderProps<T>>;

View file

@ -0,0 +1,69 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import exactProp from '@mui/utils/exactProp';
import ThemeContext from "../useTheme/ThemeContext.js";
import useTheme from "../useTheme/index.js";
import nested from "./nested.js";
// To support composition of theme.
import { jsx as _jsx } from "react/jsx-runtime";
function mergeOuterLocalTheme(outerTheme, localTheme) {
if (typeof localTheme === 'function') {
const mergedTheme = localTheme(outerTheme);
if (process.env.NODE_ENV !== 'production') {
if (!mergedTheme) {
console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\n'));
}
}
return mergedTheme;
}
return {
...outerTheme,
...localTheme
};
}
/**
* This component takes a `theme` prop.
* It makes the `theme` available down the React tree thanks to React context.
* This component should preferably be used at **the root of your component tree**.
*/
function ThemeProvider(props) {
const {
children,
theme: localTheme
} = props;
const outerTheme = useTheme();
if (process.env.NODE_ENV !== 'production') {
if (outerTheme === null && typeof localTheme === 'function') {
console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
}
}
const theme = React.useMemo(() => {
const output = outerTheme === null ? {
...localTheme
} : mergeOuterLocalTheme(outerTheme, localTheme);
if (output != null) {
output[nested] = outerTheme !== null;
}
return output;
}, [localTheme, outerTheme]);
return /*#__PURE__*/_jsx(ThemeContext.Provider, {
value: theme,
children: children
});
}
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = {
/**
* Your component tree.
*/
children: PropTypes.node,
/**
* A theme object. You can provide a function to extend the outer theme.
*/
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
} : void 0;
if (process.env.NODE_ENV !== 'production') {
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;
}
export default ThemeProvider;

View file

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

View file

@ -0,0 +1,2 @@
export { default } from "./ThemeProvider.js";
export { default as unstable_nested } from "./nested.js";

View file

@ -0,0 +1,2 @@
const hasSymbol = typeof Symbol === 'function' && Symbol.for;
export default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';

View file

@ -0,0 +1,5 @@
/**
* The default theme interface, augment this to avoid having to set the theme type everywhere.
* Our [TypeScript guide on theme customization](https://mui.com/material-ui/customization/theming/#custom-variables) explains in detail how you would add custom properties.
*/
export interface DefaultTheme {}

View file

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

5
node_modules/@mui/private-theming/esm/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,5 @@
export { default as ThemeProvider } from "./ThemeProvider/index.js";
export * from "./ThemeProvider/index.js";
export { default as useTheme } from "./useTheme/index.js";
export * from "./useTheme/index.js";
export * from "./defaultTheme/index.js";

10
node_modules/@mui/private-theming/esm/index.js generated vendored Normal file
View file

@ -0,0 +1,10 @@
/**
* @mui/private-theming 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 ThemeProvider } from "./ThemeProvider/index.js";
export * from "./ThemeProvider/index.js";
export { default as useTheme } from "./useTheme/index.js";

1
node_modules/@mui/private-theming/esm/package.json generated vendored Normal file
View file

@ -0,0 +1 @@
{"type":"module","sideEffects":false}

View file

@ -0,0 +1,8 @@
'use client';
import * as React from 'react';
const ThemeContext = /*#__PURE__*/React.createContext(null);
if (process.env.NODE_ENV !== 'production') {
ThemeContext.displayName = 'ThemeContext';
}
export default ThemeContext;

View file

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

View file

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

View file

@ -0,0 +1,2 @@
import { DefaultTheme } from "../defaultTheme/index.js";
export default function useTheme<T = DefaultTheme>(): T;

View file

@ -0,0 +1,11 @@
import * as React from 'react';
import ThemeContext from "./ThemeContext.js";
export default function useTheme() {
const theme = React.useContext(ThemeContext);
if (process.env.NODE_ENV !== 'production') {
// TODO: uncomment once we enable eslint-plugin-react-compiler eslint-disable-next-line react-compiler/react-compiler
// eslint-disable-next-line react-hooks/rules-of-hooks -- It's not required to run React.useDebugValue in production
React.useDebugValue(theme);
}
return theme;
}