init 3
This commit is contained in:
106
node_modules/@mui/system/esm/Grid/Grid.js
generated
vendored
Normal file
106
node_modules/@mui/system/esm/Grid/Grid.js
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
'use client';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
import createGrid from "./createGrid.js";
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Grid (Joy UI)](https://mui.com/joy-ui/react-grid/)
|
||||
* - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Grid API](https://mui.com/system/api/grid/)
|
||||
*/
|
||||
const Grid = createGrid();
|
||||
process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ = {
|
||||
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
||||
// │ These PropTypes are generated from the TypeScript type definitions. │
|
||||
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* The number of columns.
|
||||
* @default 12
|
||||
*/
|
||||
columns: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number, PropTypes.object]),
|
||||
/**
|
||||
* Defines the horizontal space between the type `item` components.
|
||||
* It overrides the value of the `spacing` prop.
|
||||
*/
|
||||
columnSpacing: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
||||
/**
|
||||
* If `true`, the component will have the flex *container* behavior.
|
||||
* You should be wrapping *items* with a *container*.
|
||||
* @default false
|
||||
*/
|
||||
container: PropTypes.bool,
|
||||
/**
|
||||
* Defines the `flex-direction` style property.
|
||||
* It is applied for all screen sizes.
|
||||
* @default 'row'
|
||||
*/
|
||||
direction: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
||||
/**
|
||||
* Defines the offset value for the type `item` components.
|
||||
*/
|
||||
offset: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), PropTypes.object]),
|
||||
/**
|
||||
* Defines the vertical space between the type `item` components.
|
||||
* It overrides the value of the `spacing` prop.
|
||||
*/
|
||||
rowSpacing: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
||||
/**
|
||||
* Defines the size of the the type `item` components.
|
||||
*/
|
||||
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number])), PropTypes.object]),
|
||||
/**
|
||||
* Defines the space between the type `item` components.
|
||||
* It can only be used on a type `container` component.
|
||||
* @default 0
|
||||
*/
|
||||
spacing: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
||||
/**
|
||||
* @internal
|
||||
* The level of the grid starts from `0` and increases when the grid nests
|
||||
* inside another grid. Nesting is defined as a container Grid being a direct
|
||||
* child of a container Grid.
|
||||
*
|
||||
* ```js
|
||||
* <Grid container> // level 0
|
||||
* <Grid container> // level 1
|
||||
* <Grid container> // level 2
|
||||
* ```
|
||||
*
|
||||
* Only consecutive grid is considered nesting. A grid container will start at
|
||||
* `0` if there are non-Grid container element above it.
|
||||
*
|
||||
* ```js
|
||||
* <Grid container> // level 0
|
||||
* <div>
|
||||
* <Grid container> // level 0
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* <Grid container> // level 0
|
||||
* <Grid>
|
||||
* <Grid container> // level 0
|
||||
* ```
|
||||
*/
|
||||
unstable_level: PropTypes.number,
|
||||
/**
|
||||
* Defines the `flex-wrap` style property.
|
||||
* It's applied for all screen sizes.
|
||||
* @default 'wrap'
|
||||
*/
|
||||
wrap: PropTypes.oneOf(['nowrap', 'wrap-reverse', 'wrap'])
|
||||
} : void 0;
|
||||
export default Grid;
|
||||
13
node_modules/@mui/system/esm/Grid/createGrid.d.ts
generated
vendored
Normal file
13
node_modules/@mui/system/esm/Grid/createGrid.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import * as React from 'react';
|
||||
import { OverridableComponent } from '@mui/types';
|
||||
import useThemeSystem from "../useTheme/index.js";
|
||||
import { GridTypeMap } from "./GridProps.js";
|
||||
declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../index.js").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
|
||||
declare function useThemePropsDefault<T extends {}>(props: T): T;
|
||||
export default function createGrid(options?: {
|
||||
createStyledComponent?: typeof defaultCreateStyledComponent | undefined;
|
||||
useThemeProps?: typeof useThemePropsDefault | undefined;
|
||||
useTheme?: typeof useThemeSystem | undefined;
|
||||
componentName?: string | undefined;
|
||||
}): OverridableComponent<GridTypeMap<{}, "div">>;
|
||||
export {};
|
||||
154
node_modules/@mui/system/esm/Grid/createGrid.js
generated
vendored
Normal file
154
node_modules/@mui/system/esm/Grid/createGrid.js
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import isMuiElement from '@mui/utils/isMuiElement';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import systemStyled from "../styled/index.js";
|
||||
import useThemePropsSystem from "../useThemeProps/index.js";
|
||||
import useThemeSystem from "../useTheme/index.js";
|
||||
import { extendSxProp } from "../styleFunctionSx/index.js";
|
||||
import createTheme from "../createTheme/index.js";
|
||||
import { generateGridStyles, generateGridSizeStyles, generateGridColumnsStyles, generateGridColumnSpacingStyles, generateGridRowSpacingStyles, generateGridDirectionStyles, generateGridOffsetStyles, generateSizeClassNames, generateSpacingClassNames, generateDirectionClasses } from "./gridGenerator.js";
|
||||
import deleteLegacyGridProps from "./deleteLegacyGridProps.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const defaultTheme = createTheme();
|
||||
|
||||
// widening Theme to any so that the consumer can own the theme structure.
|
||||
const defaultCreateStyledComponent = systemStyled('div', {
|
||||
name: 'MuiGrid',
|
||||
slot: 'Root'
|
||||
});
|
||||
function useThemePropsDefault(props) {
|
||||
return useThemePropsSystem({
|
||||
props,
|
||||
name: 'MuiGrid',
|
||||
defaultTheme
|
||||
});
|
||||
}
|
||||
export default function createGrid(options = {}) {
|
||||
const {
|
||||
// This will allow adding custom styled fn (for example for custom sx style function)
|
||||
createStyledComponent = defaultCreateStyledComponent,
|
||||
useThemeProps = useThemePropsDefault,
|
||||
useTheme = useThemeSystem,
|
||||
componentName = 'MuiGrid'
|
||||
} = options;
|
||||
const useUtilityClasses = (ownerState, theme) => {
|
||||
const {
|
||||
container,
|
||||
direction,
|
||||
spacing,
|
||||
wrap,
|
||||
size
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', container && 'container', wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, ...generateDirectionClasses(direction), ...generateSizeClassNames(size), ...(container ? generateSpacingClassNames(spacing, theme.breakpoints.keys[0]) : [])]
|
||||
};
|
||||
return composeClasses(slots, slot => generateUtilityClass(componentName, slot), {});
|
||||
};
|
||||
function parseResponsiveProp(propValue, breakpoints, shouldUseValue = () => true) {
|
||||
const parsedProp = {};
|
||||
if (propValue === null) {
|
||||
return parsedProp;
|
||||
}
|
||||
if (Array.isArray(propValue)) {
|
||||
propValue.forEach((value, index) => {
|
||||
if (value !== null && shouldUseValue(value) && breakpoints.keys[index]) {
|
||||
parsedProp[breakpoints.keys[index]] = value;
|
||||
}
|
||||
});
|
||||
} else if (typeof propValue === 'object') {
|
||||
Object.keys(propValue).forEach(key => {
|
||||
const value = propValue[key];
|
||||
if (value !== null && value !== undefined && shouldUseValue(value)) {
|
||||
parsedProp[key] = value;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
parsedProp[breakpoints.keys[0]] = propValue;
|
||||
}
|
||||
return parsedProp;
|
||||
}
|
||||
const GridRoot = createStyledComponent(generateGridColumnsStyles, generateGridColumnSpacingStyles, generateGridRowSpacingStyles, generateGridSizeStyles, generateGridDirectionStyles, generateGridStyles, generateGridOffsetStyles);
|
||||
const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
||||
const theme = useTheme();
|
||||
const themeProps = useThemeProps(inProps);
|
||||
const props = extendSxProp(themeProps); // `color` type conflicts with html color attribute.
|
||||
|
||||
// TODO v8: Remove when removing the legacy Grid component
|
||||
deleteLegacyGridProps(props, theme.breakpoints);
|
||||
const {
|
||||
className,
|
||||
children,
|
||||
columns: columnsProp = 12,
|
||||
container = false,
|
||||
component = 'div',
|
||||
direction = 'row',
|
||||
wrap = 'wrap',
|
||||
size: sizeProp = {},
|
||||
offset: offsetProp = {},
|
||||
spacing: spacingProp = 0,
|
||||
rowSpacing: rowSpacingProp = spacingProp,
|
||||
columnSpacing: columnSpacingProp = spacingProp,
|
||||
unstable_level: level = 0,
|
||||
...other
|
||||
} = props;
|
||||
const size = parseResponsiveProp(sizeProp, theme.breakpoints, val => val !== false);
|
||||
const offset = parseResponsiveProp(offsetProp, theme.breakpoints);
|
||||
const columns = inProps.columns ?? (level ? undefined : columnsProp);
|
||||
const spacing = inProps.spacing ?? (level ? undefined : spacingProp);
|
||||
const rowSpacing = inProps.rowSpacing ?? inProps.spacing ?? (level ? undefined : rowSpacingProp);
|
||||
const columnSpacing = inProps.columnSpacing ?? inProps.spacing ?? (level ? undefined : columnSpacingProp);
|
||||
const ownerState = {
|
||||
...props,
|
||||
level,
|
||||
columns,
|
||||
container,
|
||||
direction,
|
||||
wrap,
|
||||
spacing,
|
||||
rowSpacing,
|
||||
columnSpacing,
|
||||
size,
|
||||
offset
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState, theme);
|
||||
return /*#__PURE__*/_jsx(GridRoot, {
|
||||
ref: ref,
|
||||
as: component,
|
||||
ownerState: ownerState,
|
||||
className: clsx(classes.root, className),
|
||||
...other,
|
||||
children: React.Children.map(children, child => {
|
||||
if (/*#__PURE__*/React.isValidElement(child) && isMuiElement(child, ['Grid']) && container && child.props.container) {
|
||||
return /*#__PURE__*/React.cloneElement(child, {
|
||||
unstable_level: child.props?.unstable_level ?? level + 1
|
||||
});
|
||||
}
|
||||
return child;
|
||||
})
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ = {
|
||||
children: PropTypes.node,
|
||||
className: PropTypes.string,
|
||||
columns: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number, PropTypes.object]),
|
||||
columnSpacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
||||
component: PropTypes.elementType,
|
||||
container: PropTypes.bool,
|
||||
direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
||||
offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), PropTypes.object]),
|
||||
rowSpacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
||||
size: PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number])), PropTypes.object]),
|
||||
spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
||||
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
||||
wrap: PropTypes.oneOf(['nowrap', 'wrap-reverse', 'wrap'])
|
||||
} : void 0;
|
||||
|
||||
// @ts-ignore internal logic for nested grid
|
||||
Grid.muiName = 'Grid';
|
||||
return Grid;
|
||||
}
|
||||
20
node_modules/@mui/system/esm/Grid/gridClasses.d.ts
generated
vendored
Normal file
20
node_modules/@mui/system/esm/Grid/gridClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
export interface GridClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if `container={true}`. */
|
||||
container: string;
|
||||
/** Styles applied to the root element if `direction="column"`. */
|
||||
'direction-xs-column': string;
|
||||
/** Styles applied to the root element if `direction="column-reverse"`. */
|
||||
'direction-xs-column-reverse': string;
|
||||
/** Styles applied to the root element if `direction="row-reverse"`. */
|
||||
'direction-xs-row-reverse': string;
|
||||
/** Styles applied to the root element if `wrap="nowrap"`. */
|
||||
'wrap-xs-nowrap': string;
|
||||
/** Styles applied to the root element if `wrap="reverse"`. */
|
||||
'wrap-xs-wrap-reverse': string;
|
||||
}
|
||||
export type GridClassKey = keyof GridClasses;
|
||||
export declare function getGridUtilityClass(slot: string): string;
|
||||
declare const gridClasses: GridClasses;
|
||||
export default gridClasses;
|
||||
5
node_modules/@mui/system/esm/Stack/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/system/esm/Stack/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from "./Stack.js";
|
||||
export { default as createStack } from "./createStack.js";
|
||||
export * from "./StackProps.js";
|
||||
export { default as stackClasses } from "./stackClasses.js";
|
||||
export * from "./stackClasses.js";
|
||||
35
node_modules/@mui/system/esm/createBox/createBox.js
generated
vendored
Normal file
35
node_modules/@mui/system/esm/createBox/createBox.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import styled from '@mui/styled-engine';
|
||||
import styleFunctionSx, { extendSxProp } from "../styleFunctionSx/index.js";
|
||||
import useTheme from "../useTheme/index.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
export default function createBox(options = {}) {
|
||||
const {
|
||||
themeId,
|
||||
defaultTheme,
|
||||
defaultClassName = 'MuiBox-root',
|
||||
generateClassName
|
||||
} = options;
|
||||
const BoxRoot = styled('div', {
|
||||
shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
|
||||
})(styleFunctionSx);
|
||||
const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {
|
||||
const theme = useTheme(defaultTheme);
|
||||
const {
|
||||
className,
|
||||
component = 'div',
|
||||
...other
|
||||
} = extendSxProp(inProps);
|
||||
return /*#__PURE__*/_jsx(BoxRoot, {
|
||||
as: component,
|
||||
ref: ref,
|
||||
className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
|
||||
theme: themeId ? theme[themeId] || theme : theme,
|
||||
...other
|
||||
});
|
||||
});
|
||||
return Box;
|
||||
}
|
||||
3
node_modules/@mui/system/esm/createBreakpoints/index.js
generated
vendored
Normal file
3
node_modules/@mui/system/esm/createBreakpoints/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/** This export is intended for internal integration with Pigment CSS */
|
||||
/* eslint-disable import/prefer-default-export */
|
||||
export { default as unstable_createBreakpoints } from "./createBreakpoints.js";
|
||||
1
node_modules/@mui/system/esm/memoize/memoize.d.ts
generated
vendored
Normal file
1
node_modules/@mui/system/esm/memoize/memoize.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function memoize<ArgType = any, ReturnType = any>(fn: (arg: ArgType) => ReturnType): (arg: ArgType) => ReturnType;
|
||||
1
node_modules/@mui/system/esm/package.json
generated
vendored
Normal file
1
node_modules/@mui/system/esm/package.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"type":"module","sideEffects":false}
|
||||
2
node_modules/@mui/system/esm/palette/index.js
generated
vendored
Normal file
2
node_modules/@mui/system/esm/palette/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export { default } from "./palette.js";
|
||||
export * from "./palette.js";
|
||||
2
node_modules/@mui/system/esm/positions/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/system/esm/positions/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export { default } from "./positions.js";
|
||||
export * from "./positions.js";
|
||||
4
node_modules/@mui/system/esm/shadows/shadows.d.ts
generated
vendored
Normal file
4
node_modules/@mui/system/esm/shadows/shadows.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { PropsFor, SimpleStyleFunction } from "../style/index.js";
|
||||
declare const shadows: SimpleStyleFunction<'boxShadow'>;
|
||||
export type ShadowsProps = PropsFor<typeof shadows>;
|
||||
export default shadows;
|
||||
14
node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.d.ts
generated
vendored
Normal file
14
node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { StyleFunction, TransformFunction } from "../style/index.js";
|
||||
type SimpleStyleFunction<PropKey extends keyof any> = StyleFunction<Partial<Record<PropKey, any>>>;
|
||||
export interface SxConfigRecord {
|
||||
cssProperty?: keyof React.CSSProperties | false | undefined;
|
||||
/**
|
||||
* dot access in `Theme`
|
||||
*/
|
||||
themeKey?: string | undefined;
|
||||
transform?: TransformFunction | undefined;
|
||||
style?: SimpleStyleFunction<any> | undefined;
|
||||
}
|
||||
export type SxConfig = Record<string, SxConfigRecord>;
|
||||
declare const defaultSxConfig: SxConfig;
|
||||
export default defaultSxConfig;
|
||||
2
node_modules/@mui/system/esm/useTheme/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/system/esm/useTheme/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export { default } from "./useTheme.js";
|
||||
export * from "./useTheme.js";
|
||||
Reference in New Issue
Block a user