paradiego
This commit is contained in:
21
node_modules/@mui/core-downloads-tracker/LICENSE
generated
vendored
Normal file
21
node_modules/@mui/core-downloads-tracker/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Call-Em-All
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
5
node_modules/@mui/core-downloads-tracker/README.md
generated
vendored
Normal file
5
node_modules/@mui/core-downloads-tracker/README.md
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# @mui/core-downloads-tracker
|
||||
|
||||
This package does not contain any code.
|
||||
It is used solely to track number of downloads of @mui/material and @mui/joy (the only packages that depend on it) and help us determine the number of users of @mui/base.
|
||||
Counting downloads is done by npm (as for every other package).
|
||||
26
node_modules/@mui/core-downloads-tracker/package.json
generated
vendored
Normal file
26
node_modules/@mui/core-downloads-tracker/package.json
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "@mui/core-downloads-tracker",
|
||||
"version": "6.1.0",
|
||||
"private": false,
|
||||
"author": "MUI Team",
|
||||
"description": "Internal package to track number of downloads of our design system libraries",
|
||||
"files": [],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mui/material-ui.git",
|
||||
"directory": "packages/core-downloads-tracker"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mui/material-ui/issues"
|
||||
},
|
||||
"homepage": "https://mui.com/",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/mui-org"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"directory": "build"
|
||||
}
|
||||
}
|
||||
130
node_modules/@mui/material/Accordion/Accordion.d.ts
generated
vendored
Normal file
130
node_modules/@mui/material/Accordion/Accordion.d.ts
generated
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { Theme } from '..';
|
||||
import { TransitionProps } from '../transitions/transition';
|
||||
import { AccordionClasses } from './accordionClasses';
|
||||
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
||||
import { ExtendPaperTypeMap } from '../Paper/Paper';
|
||||
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
||||
|
||||
export interface AccordionSlots {
|
||||
/**
|
||||
* The component that renders the heading.
|
||||
* @default 'h3'
|
||||
*/
|
||||
heading: React.ElementType;
|
||||
/**
|
||||
* The component that renders the transition.
|
||||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
||||
* @default Collapse
|
||||
*/
|
||||
transition: React.JSXElementConstructor<
|
||||
TransitionProps & { children?: React.ReactElement<unknown, any> }
|
||||
>;
|
||||
}
|
||||
|
||||
export interface AccordionTransitionSlotPropsOverrides {}
|
||||
export interface AccordionHeadingSlotPropsOverrides {}
|
||||
|
||||
export type AccordionSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
||||
AccordionSlots,
|
||||
{
|
||||
heading: SlotProps<
|
||||
React.ElementType<React.HTMLProps<HTMLHeadingElement>>,
|
||||
AccordionHeadingSlotPropsOverrides,
|
||||
AccordionOwnerState
|
||||
>;
|
||||
transition: SlotProps<
|
||||
React.ElementType<TransitionProps>,
|
||||
AccordionTransitionSlotPropsOverrides,
|
||||
AccordionOwnerState
|
||||
>;
|
||||
}
|
||||
>;
|
||||
|
||||
export type AccordionTypeMap<
|
||||
AdditionalProps = {},
|
||||
RootComponent extends React.ElementType = 'div',
|
||||
> = ExtendPaperTypeMap<
|
||||
{
|
||||
props: AdditionalProps & {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children: NonNullable<React.ReactNode>;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AccordionClasses>;
|
||||
/**
|
||||
* If `true`, expands the accordion by default.
|
||||
* @default false
|
||||
*/
|
||||
defaultExpanded?: boolean;
|
||||
/**
|
||||
* If `true`, the component is disabled.
|
||||
* @default false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* If `true`, it removes the margin between two expanded accordion items and the increase of height.
|
||||
* @default false
|
||||
*/
|
||||
disableGutters?: boolean;
|
||||
/**
|
||||
* If `true`, expands the accordion, otherwise collapse it.
|
||||
* Setting this prop enables control over the accordion.
|
||||
*/
|
||||
expanded?: boolean;
|
||||
/**
|
||||
* Callback fired when the expand/collapse state is changed.
|
||||
*
|
||||
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
||||
* @param {boolean} expanded The `expanded` state of the accordion.
|
||||
*/
|
||||
onChange?: (event: React.SyntheticEvent, expanded: boolean) => void;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* The component used for the transition.
|
||||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
||||
*/
|
||||
TransitionComponent?: React.JSXElementConstructor<
|
||||
TransitionProps & { children?: React.ReactElement<unknown, any> }
|
||||
>;
|
||||
/**
|
||||
* Props applied to the transition element.
|
||||
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
||||
*/
|
||||
TransitionProps?: TransitionProps;
|
||||
} & AccordionSlotsAndSlotProps;
|
||||
defaultComponent: RootComponent;
|
||||
},
|
||||
'onChange' | 'classes'
|
||||
>;
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Accordion](https://mui.com/material-ui/react-accordion/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Accordion API](https://mui.com/material-ui/api/accordion/)
|
||||
* - inherits [Paper API](https://mui.com/material-ui/api/paper/)
|
||||
*/
|
||||
declare const Accordion: OverridableComponent<AccordionTypeMap>;
|
||||
|
||||
export type AccordionProps<
|
||||
RootComponent extends React.ElementType = AccordionTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<AccordionTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export interface AccordionOwnerState extends AccordionProps {}
|
||||
|
||||
export default Accordion;
|
||||
314
node_modules/@mui/material/Accordion/Accordion.js
generated
vendored
Normal file
314
node_modules/@mui/material/Accordion/Accordion.js
generated
vendored
Normal file
@@ -0,0 +1,314 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { isFragment } from 'react-is';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import chainPropTypes from '@mui/utils/chainPropTypes';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import Collapse from "../Collapse/index.js";
|
||||
import Paper from "../Paper/index.js";
|
||||
import AccordionContext from "./AccordionContext.js";
|
||||
import useControlled from "../utils/useControlled.js";
|
||||
import useSlot from "../utils/useSlot.js";
|
||||
import accordionClasses, { getAccordionUtilityClass } from "./accordionClasses.js";
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes,
|
||||
square,
|
||||
expanded,
|
||||
disabled,
|
||||
disableGutters
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', !square && 'rounded', expanded && 'expanded', disabled && 'disabled', !disableGutters && 'gutters'],
|
||||
heading: ['heading'],
|
||||
region: ['region']
|
||||
};
|
||||
return composeClasses(slots, getAccordionUtilityClass, classes);
|
||||
};
|
||||
const AccordionRoot = styled(Paper, {
|
||||
name: 'MuiAccordion',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [{
|
||||
[`& .${accordionClasses.region}`]: styles.region
|
||||
}, styles.root, !ownerState.square && styles.rounded, !ownerState.disableGutters && styles.gutters];
|
||||
}
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => {
|
||||
const transition = {
|
||||
duration: theme.transitions.duration.shortest
|
||||
};
|
||||
return {
|
||||
position: 'relative',
|
||||
transition: theme.transitions.create(['margin'], transition),
|
||||
overflowAnchor: 'none',
|
||||
// Keep the same scrolling position
|
||||
'&::before': {
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
top: -1,
|
||||
right: 0,
|
||||
height: 1,
|
||||
content: '""',
|
||||
opacity: 1,
|
||||
backgroundColor: (theme.vars || theme).palette.divider,
|
||||
transition: theme.transitions.create(['opacity', 'background-color'], transition)
|
||||
},
|
||||
'&:first-of-type': {
|
||||
'&::before': {
|
||||
display: 'none'
|
||||
}
|
||||
},
|
||||
[`&.${accordionClasses.expanded}`]: {
|
||||
'&::before': {
|
||||
opacity: 0
|
||||
},
|
||||
'&:first-of-type': {
|
||||
marginTop: 0
|
||||
},
|
||||
'&:last-of-type': {
|
||||
marginBottom: 0
|
||||
},
|
||||
'& + &': {
|
||||
'&::before': {
|
||||
display: 'none'
|
||||
}
|
||||
}
|
||||
},
|
||||
[`&.${accordionClasses.disabled}`]: {
|
||||
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
||||
}
|
||||
};
|
||||
}), memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
variants: [{
|
||||
props: props => !props.square,
|
||||
style: {
|
||||
borderRadius: 0,
|
||||
'&:first-of-type': {
|
||||
borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
|
||||
borderTopRightRadius: (theme.vars || theme).shape.borderRadius
|
||||
},
|
||||
'&:last-of-type': {
|
||||
borderBottomLeftRadius: (theme.vars || theme).shape.borderRadius,
|
||||
borderBottomRightRadius: (theme.vars || theme).shape.borderRadius,
|
||||
// Fix a rendering issue on Edge
|
||||
'@supports (-ms-ime-align: auto)': {
|
||||
borderBottomLeftRadius: 0,
|
||||
borderBottomRightRadius: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: props => !props.disableGutters,
|
||||
style: {
|
||||
[`&.${accordionClasses.expanded}`]: {
|
||||
margin: '16px 0'
|
||||
}
|
||||
}
|
||||
}]
|
||||
})));
|
||||
const AccordionHeading = styled('h3', {
|
||||
name: 'MuiAccordion',
|
||||
slot: 'Heading',
|
||||
overridesResolver: (props, styles) => styles.heading
|
||||
})({
|
||||
all: 'unset'
|
||||
});
|
||||
const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAccordion'
|
||||
});
|
||||
const {
|
||||
children: childrenProp,
|
||||
className,
|
||||
defaultExpanded = false,
|
||||
disabled = false,
|
||||
disableGutters = false,
|
||||
expanded: expandedProp,
|
||||
onChange,
|
||||
square = false,
|
||||
slots = {},
|
||||
slotProps = {},
|
||||
TransitionComponent: TransitionComponentProp,
|
||||
TransitionProps: TransitionPropsProp,
|
||||
...other
|
||||
} = props;
|
||||
const [expanded, setExpandedState] = useControlled({
|
||||
controlled: expandedProp,
|
||||
default: defaultExpanded,
|
||||
name: 'Accordion',
|
||||
state: 'expanded'
|
||||
});
|
||||
const handleChange = React.useCallback(event => {
|
||||
setExpandedState(!expanded);
|
||||
if (onChange) {
|
||||
onChange(event, !expanded);
|
||||
}
|
||||
}, [expanded, onChange, setExpandedState]);
|
||||
const [summary, ...children] = React.Children.toArray(childrenProp);
|
||||
const contextValue = React.useMemo(() => ({
|
||||
expanded,
|
||||
disabled,
|
||||
disableGutters,
|
||||
toggle: handleChange
|
||||
}), [expanded, disabled, disableGutters, handleChange]);
|
||||
const ownerState = {
|
||||
...props,
|
||||
square,
|
||||
disabled,
|
||||
disableGutters,
|
||||
expanded
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
const backwardCompatibleSlots = {
|
||||
transition: TransitionComponentProp,
|
||||
...slots
|
||||
};
|
||||
const backwardCompatibleSlotProps = {
|
||||
transition: TransitionPropsProp,
|
||||
...slotProps
|
||||
};
|
||||
const externalForwardedProps = {
|
||||
slots: backwardCompatibleSlots,
|
||||
slotProps: backwardCompatibleSlotProps
|
||||
};
|
||||
const [AccordionHeadingSlot, accordionProps] = useSlot('heading', {
|
||||
elementType: AccordionHeading,
|
||||
externalForwardedProps,
|
||||
className: classes.heading,
|
||||
ownerState
|
||||
});
|
||||
const [TransitionSlot, transitionProps] = useSlot('transition', {
|
||||
elementType: Collapse,
|
||||
externalForwardedProps,
|
||||
ownerState
|
||||
});
|
||||
return /*#__PURE__*/_jsxs(AccordionRoot, {
|
||||
className: clsx(classes.root, className),
|
||||
ref: ref,
|
||||
ownerState: ownerState,
|
||||
square: square,
|
||||
...other,
|
||||
children: [/*#__PURE__*/_jsx(AccordionHeadingSlot, {
|
||||
...accordionProps,
|
||||
children: /*#__PURE__*/_jsx(AccordionContext.Provider, {
|
||||
value: contextValue,
|
||||
children: summary
|
||||
})
|
||||
}), /*#__PURE__*/_jsx(TransitionSlot, {
|
||||
in: expanded,
|
||||
timeout: "auto",
|
||||
...transitionProps,
|
||||
children: /*#__PURE__*/_jsx("div", {
|
||||
"aria-labelledby": summary.props.id,
|
||||
id: summary.props['aria-controls'],
|
||||
role: "region",
|
||||
className: classes.region,
|
||||
children: children
|
||||
})
|
||||
})]
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Accordion.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 content of the component.
|
||||
*/
|
||||
children: chainPropTypes(PropTypes.node.isRequired, props => {
|
||||
const summary = React.Children.toArray(props.children)[0];
|
||||
if (isFragment(summary)) {
|
||||
return new Error("MUI: The Accordion doesn't accept a Fragment as a child. " + 'Consider providing an array instead.');
|
||||
}
|
||||
if (! /*#__PURE__*/React.isValidElement(summary)) {
|
||||
return new Error('MUI: Expected the first child of Accordion to be a valid element.');
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* If `true`, expands the accordion by default.
|
||||
* @default false
|
||||
*/
|
||||
defaultExpanded: PropTypes.bool,
|
||||
/**
|
||||
* If `true`, the component is disabled.
|
||||
* @default false
|
||||
*/
|
||||
disabled: PropTypes.bool,
|
||||
/**
|
||||
* If `true`, it removes the margin between two expanded accordion items and the increase of height.
|
||||
* @default false
|
||||
*/
|
||||
disableGutters: PropTypes.bool,
|
||||
/**
|
||||
* If `true`, expands the accordion, otherwise collapse it.
|
||||
* Setting this prop enables control over the accordion.
|
||||
*/
|
||||
expanded: PropTypes.bool,
|
||||
/**
|
||||
* Callback fired when the expand/collapse state is changed.
|
||||
*
|
||||
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
||||
* @param {boolean} expanded The `expanded` state of the accordion.
|
||||
*/
|
||||
onChange: PropTypes.func,
|
||||
/**
|
||||
* The props used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: PropTypes.shape({
|
||||
heading: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
||||
transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
||||
}),
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slots: PropTypes.shape({
|
||||
heading: PropTypes.elementType,
|
||||
transition: PropTypes.elementType
|
||||
}),
|
||||
/**
|
||||
* If `true`, rounded corners are disabled.
|
||||
* @default false
|
||||
*/
|
||||
square: PropTypes.bool,
|
||||
/**
|
||||
* 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 component used for the transition.
|
||||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
||||
*/
|
||||
TransitionComponent: PropTypes.elementType,
|
||||
/**
|
||||
* Props applied to the transition element.
|
||||
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
||||
*/
|
||||
TransitionProps: PropTypes.object
|
||||
} : void 0;
|
||||
export default Accordion;
|
||||
13
node_modules/@mui/material/Accordion/AccordionContext.js
generated
vendored
Normal file
13
node_modules/@mui/material/Accordion/AccordionContext.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
/**
|
||||
* @ignore - internal component.
|
||||
* @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}
|
||||
*/
|
||||
const AccordionContext = /*#__PURE__*/React.createContext({});
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
AccordionContext.displayName = 'AccordionContext';
|
||||
}
|
||||
export default AccordionContext;
|
||||
20
node_modules/@mui/material/Accordion/accordionClasses.d.ts
generated
vendored
Normal file
20
node_modules/@mui/material/Accordion/accordionClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
export interface AccordionClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the heading element. */
|
||||
heading: string;
|
||||
/** Styles applied to the root element unless `square={true}`. */
|
||||
rounded: string;
|
||||
/** State class applied to the root element if `expanded={true}`. */
|
||||
expanded: string;
|
||||
/** State class applied to the root element if `disabled={true}`. */
|
||||
disabled: string;
|
||||
/** Styles applied to the root element unless `disableGutters={true}`. */
|
||||
gutters: string;
|
||||
/** Styles applied to the region element, the container of the children. */
|
||||
region: string;
|
||||
}
|
||||
export type AccordionClassKey = keyof AccordionClasses;
|
||||
export declare function getAccordionUtilityClass(slot: string): string;
|
||||
declare const accordionClasses: AccordionClasses;
|
||||
export default accordionClasses;
|
||||
7
node_modules/@mui/material/Accordion/accordionClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/Accordion/accordionClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAccordionUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAccordion', slot);
|
||||
}
|
||||
const accordionClasses = generateUtilityClasses('MuiAccordion', ['root', 'heading', 'rounded', 'expanded', 'disabled', 'gutters', 'region']);
|
||||
export default accordionClasses;
|
||||
5
node_modules/@mui/material/Accordion/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/Accordion/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './Accordion';
|
||||
export * from './Accordion';
|
||||
|
||||
export { default as accordionClasses } from './accordionClasses';
|
||||
export * from './accordionClasses';
|
||||
3
node_modules/@mui/material/Accordion/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/Accordion/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./Accordion.js";
|
||||
export { default as accordionClasses } from "./accordionClasses.js";
|
||||
export * from "./accordionClasses.js";
|
||||
6
node_modules/@mui/material/Accordion/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/Accordion/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/Accordion/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
36
node_modules/@mui/material/AccordionActions/AccordionActions.d.ts
generated
vendored
Normal file
36
node_modules/@mui/material/AccordionActions/AccordionActions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { InternalStandardProps as StandardProps, Theme } from '..';
|
||||
import { AccordionActionsClasses } from './accordionActionsClasses';
|
||||
|
||||
export interface AccordionActionsProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AccordionActionsClasses>;
|
||||
/**
|
||||
* If `true`, the actions do not have additional margin.
|
||||
* @default false
|
||||
*/
|
||||
disableSpacing?: boolean;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Accordion](https://mui.com/material-ui/react-accordion/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [AccordionActions API](https://mui.com/material-ui/api/accordion-actions/)
|
||||
*/
|
||||
export default function AccordionActions(props: AccordionActionsProps): React.JSX.Element;
|
||||
93
node_modules/@mui/material/AccordionActions/AccordionActions.js
generated
vendored
Normal file
93
node_modules/@mui/material/AccordionActions/AccordionActions.js
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import { getAccordionActionsUtilityClass } from "./accordionActionsClasses.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes,
|
||||
disableSpacing
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', !disableSpacing && 'spacing']
|
||||
};
|
||||
return composeClasses(slots, getAccordionActionsUtilityClass, classes);
|
||||
};
|
||||
const AccordionActionsRoot = styled('div', {
|
||||
name: 'MuiAccordionActions',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.root, !ownerState.disableSpacing && styles.spacing];
|
||||
}
|
||||
})({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
padding: 8,
|
||||
justifyContent: 'flex-end',
|
||||
variants: [{
|
||||
props: props => !props.disableSpacing,
|
||||
style: {
|
||||
'& > :not(style) ~ :not(style)': {
|
||||
marginLeft: 8
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
||||
const AccordionActions = /*#__PURE__*/React.forwardRef(function AccordionActions(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAccordionActions'
|
||||
});
|
||||
const {
|
||||
className,
|
||||
disableSpacing = false,
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = {
|
||||
...props,
|
||||
disableSpacing
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
return /*#__PURE__*/_jsx(AccordionActionsRoot, {
|
||||
className: clsx(classes.root, className),
|
||||
ref: ref,
|
||||
ownerState: ownerState,
|
||||
...other
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? AccordionActions.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 content of the component.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* If `true`, the actions do not have additional margin.
|
||||
* @default false
|
||||
*/
|
||||
disableSpacing: PropTypes.bool,
|
||||
/**
|
||||
* 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])
|
||||
} : void 0;
|
||||
export default AccordionActions;
|
||||
10
node_modules/@mui/material/AccordionActions/accordionActionsClasses.d.ts
generated
vendored
Normal file
10
node_modules/@mui/material/AccordionActions/accordionActionsClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export interface AccordionActionsClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element unless `disableSpacing={true}`. */
|
||||
spacing: string;
|
||||
}
|
||||
export type AccordionActionsClassKey = keyof AccordionActionsClasses;
|
||||
export declare function getAccordionActionsUtilityClass(slot: string): string;
|
||||
declare const accordionActionsClasses: AccordionActionsClasses;
|
||||
export default accordionActionsClasses;
|
||||
7
node_modules/@mui/material/AccordionActions/accordionActionsClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/AccordionActions/accordionActionsClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAccordionActionsUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAccordionActions', slot);
|
||||
}
|
||||
const accordionActionsClasses = generateUtilityClasses('MuiAccordionActions', ['root', 'spacing']);
|
||||
export default accordionActionsClasses;
|
||||
5
node_modules/@mui/material/AccordionActions/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/AccordionActions/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './AccordionActions';
|
||||
export * from './AccordionActions';
|
||||
|
||||
export { default as accordionActionsClasses } from './accordionActionsClasses';
|
||||
export * from './accordionActionsClasses';
|
||||
3
node_modules/@mui/material/AccordionActions/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/AccordionActions/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./AccordionActions.js";
|
||||
export { default as accordionActionsClasses } from "./accordionActionsClasses.js";
|
||||
export * from "./accordionActionsClasses.js";
|
||||
6
node_modules/@mui/material/AccordionActions/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/AccordionActions/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/AccordionActions/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
31
node_modules/@mui/material/AccordionDetails/AccordionDetails.d.ts
generated
vendored
Normal file
31
node_modules/@mui/material/AccordionDetails/AccordionDetails.d.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { InternalStandardProps as StandardProps, Theme } from '..';
|
||||
import { AccordionDetailsClasses } from './accordionDetailsClasses';
|
||||
|
||||
export interface AccordionDetailsProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AccordionDetailsClasses>;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Accordion](https://mui.com/material-ui/react-accordion/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [AccordionDetails API](https://mui.com/material-ui/api/accordion-details/)
|
||||
*/
|
||||
export default function AccordionDetails(props: AccordionDetailsProps): React.JSX.Element;
|
||||
70
node_modules/@mui/material/AccordionDetails/AccordionDetails.js
generated
vendored
Normal file
70
node_modules/@mui/material/AccordionDetails/AccordionDetails.js
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import { getAccordionDetailsUtilityClass } from "./accordionDetailsClasses.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root']
|
||||
};
|
||||
return composeClasses(slots, getAccordionDetailsUtilityClass, classes);
|
||||
};
|
||||
const AccordionDetailsRoot = styled('div', {
|
||||
name: 'MuiAccordionDetails',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => styles.root
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
padding: theme.spacing(1, 2, 2)
|
||||
})));
|
||||
const AccordionDetails = /*#__PURE__*/React.forwardRef(function AccordionDetails(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAccordionDetails'
|
||||
});
|
||||
const {
|
||||
className,
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = props;
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
return /*#__PURE__*/_jsx(AccordionDetailsRoot, {
|
||||
className: clsx(classes.root, className),
|
||||
ref: ref,
|
||||
ownerState: ownerState,
|
||||
...other
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? AccordionDetails.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 content of the component.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* 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])
|
||||
} : void 0;
|
||||
export default AccordionDetails;
|
||||
8
node_modules/@mui/material/AccordionDetails/accordionDetailsClasses.d.ts
generated
vendored
Normal file
8
node_modules/@mui/material/AccordionDetails/accordionDetailsClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface AccordionDetailsClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
}
|
||||
export type AccordionDetailsClassKey = keyof AccordionDetailsClasses;
|
||||
export declare function getAccordionDetailsUtilityClass(slot: string): string;
|
||||
declare const accordionDetailsClasses: AccordionDetailsClasses;
|
||||
export default accordionDetailsClasses;
|
||||
7
node_modules/@mui/material/AccordionDetails/accordionDetailsClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/AccordionDetails/accordionDetailsClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAccordionDetailsUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAccordionDetails', slot);
|
||||
}
|
||||
const accordionDetailsClasses = generateUtilityClasses('MuiAccordionDetails', ['root']);
|
||||
export default accordionDetailsClasses;
|
||||
5
node_modules/@mui/material/AccordionDetails/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/AccordionDetails/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './AccordionDetails';
|
||||
export * from './AccordionDetails';
|
||||
|
||||
export { default as accordionDetailsClasses } from './accordionDetailsClasses';
|
||||
export * from './accordionDetailsClasses';
|
||||
3
node_modules/@mui/material/AccordionDetails/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/AccordionDetails/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./AccordionDetails.js";
|
||||
export { default as accordionDetailsClasses } from "./accordionDetailsClasses.js";
|
||||
export * from "./accordionDetailsClasses.js";
|
||||
6
node_modules/@mui/material/AccordionDetails/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/AccordionDetails/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/AccordionDetails/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
55
node_modules/@mui/material/AccordionSummary/AccordionSummary.d.ts
generated
vendored
Normal file
55
node_modules/@mui/material/AccordionSummary/AccordionSummary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
|
||||
import { OverrideProps } from '../OverridableComponent';
|
||||
import { Theme } from '..';
|
||||
import { AccordionSummaryClasses } from './accordionSummaryClasses';
|
||||
|
||||
export interface AccordionSummaryOwnProps {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AccordionSummaryClasses>;
|
||||
/**
|
||||
* The icon to display as the expand indicator.
|
||||
*/
|
||||
expandIcon?: React.ReactNode;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
|
||||
export type AccordionSummaryTypeMap<
|
||||
AdditionalProps = {},
|
||||
RootComponent extends React.ElementType = 'div',
|
||||
> = ExtendButtonBaseTypeMap<{
|
||||
props: AdditionalProps & AccordionSummaryOwnProps;
|
||||
defaultComponent: RootComponent;
|
||||
}>;
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Accordion](https://mui.com/material-ui/react-accordion/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [AccordionSummary API](https://mui.com/material-ui/api/accordion-summary/)
|
||||
* - inherits [ButtonBase API](https://mui.com/material-ui/api/button-base/)
|
||||
*/
|
||||
declare const AccordionSummary: ExtendButtonBase<AccordionSummaryTypeMap>;
|
||||
|
||||
export type AccordionSummaryProps<
|
||||
RootComponent extends React.ElementType = AccordionSummaryTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<AccordionSummaryTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export default AccordionSummary;
|
||||
198
node_modules/@mui/material/AccordionSummary/AccordionSummary.js
generated
vendored
Normal file
198
node_modules/@mui/material/AccordionSummary/AccordionSummary.js
generated
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import ButtonBase from "../ButtonBase/index.js";
|
||||
import AccordionContext from "../Accordion/AccordionContext.js";
|
||||
import accordionSummaryClasses, { getAccordionSummaryUtilityClass } from "./accordionSummaryClasses.js";
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes,
|
||||
expanded,
|
||||
disabled,
|
||||
disableGutters
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', expanded && 'expanded', disabled && 'disabled', !disableGutters && 'gutters'],
|
||||
focusVisible: ['focusVisible'],
|
||||
content: ['content', expanded && 'expanded', !disableGutters && 'contentGutters'],
|
||||
expandIconWrapper: ['expandIconWrapper', expanded && 'expanded']
|
||||
};
|
||||
return composeClasses(slots, getAccordionSummaryUtilityClass, classes);
|
||||
};
|
||||
const AccordionSummaryRoot = styled(ButtonBase, {
|
||||
name: 'MuiAccordionSummary',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => styles.root
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => {
|
||||
const transition = {
|
||||
duration: theme.transitions.duration.shortest
|
||||
};
|
||||
return {
|
||||
display: 'flex',
|
||||
minHeight: 48,
|
||||
padding: theme.spacing(0, 2),
|
||||
transition: theme.transitions.create(['min-height', 'background-color'], transition),
|
||||
[`&.${accordionSummaryClasses.focusVisible}`]: {
|
||||
backgroundColor: (theme.vars || theme).palette.action.focus
|
||||
},
|
||||
[`&.${accordionSummaryClasses.disabled}`]: {
|
||||
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
||||
},
|
||||
[`&:hover:not(.${accordionSummaryClasses.disabled})`]: {
|
||||
cursor: 'pointer'
|
||||
},
|
||||
variants: [{
|
||||
props: props => !props.disableGutters,
|
||||
style: {
|
||||
[`&.${accordionSummaryClasses.expanded}`]: {
|
||||
minHeight: 64
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
}));
|
||||
const AccordionSummaryContent = styled('div', {
|
||||
name: 'MuiAccordionSummary',
|
||||
slot: 'Content',
|
||||
overridesResolver: (props, styles) => styles.content
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
display: 'flex',
|
||||
flexGrow: 1,
|
||||
margin: '12px 0',
|
||||
variants: [{
|
||||
props: props => !props.disableGutters,
|
||||
style: {
|
||||
transition: theme.transitions.create(['margin'], {
|
||||
duration: theme.transitions.duration.shortest
|
||||
}),
|
||||
[`&.${accordionSummaryClasses.expanded}`]: {
|
||||
margin: '20px 0'
|
||||
}
|
||||
}
|
||||
}]
|
||||
})));
|
||||
const AccordionSummaryExpandIconWrapper = styled('div', {
|
||||
name: 'MuiAccordionSummary',
|
||||
slot: 'ExpandIconWrapper',
|
||||
overridesResolver: (props, styles) => styles.expandIconWrapper
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
display: 'flex',
|
||||
color: (theme.vars || theme).palette.action.active,
|
||||
transform: 'rotate(0deg)',
|
||||
transition: theme.transitions.create('transform', {
|
||||
duration: theme.transitions.duration.shortest
|
||||
}),
|
||||
[`&.${accordionSummaryClasses.expanded}`]: {
|
||||
transform: 'rotate(180deg)'
|
||||
}
|
||||
})));
|
||||
const AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAccordionSummary'
|
||||
});
|
||||
const {
|
||||
children,
|
||||
className,
|
||||
expandIcon,
|
||||
focusVisibleClassName,
|
||||
onClick,
|
||||
...other
|
||||
} = props;
|
||||
const {
|
||||
disabled = false,
|
||||
disableGutters,
|
||||
expanded,
|
||||
toggle
|
||||
} = React.useContext(AccordionContext);
|
||||
const handleChange = event => {
|
||||
if (toggle) {
|
||||
toggle(event);
|
||||
}
|
||||
if (onClick) {
|
||||
onClick(event);
|
||||
}
|
||||
};
|
||||
const ownerState = {
|
||||
...props,
|
||||
expanded,
|
||||
disabled,
|
||||
disableGutters
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
return /*#__PURE__*/_jsxs(AccordionSummaryRoot, {
|
||||
focusRipple: false,
|
||||
disableRipple: true,
|
||||
disabled: disabled,
|
||||
component: "div",
|
||||
"aria-expanded": expanded,
|
||||
className: clsx(classes.root, className),
|
||||
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
||||
onClick: handleChange,
|
||||
ref: ref,
|
||||
ownerState: ownerState,
|
||||
...other,
|
||||
children: [/*#__PURE__*/_jsx(AccordionSummaryContent, {
|
||||
className: classes.content,
|
||||
ownerState: ownerState,
|
||||
children: children
|
||||
}), expandIcon && /*#__PURE__*/_jsx(AccordionSummaryExpandIconWrapper, {
|
||||
className: classes.expandIconWrapper,
|
||||
ownerState: ownerState,
|
||||
children: expandIcon
|
||||
})]
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? AccordionSummary.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 content of the component.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* The icon to display as the expand indicator.
|
||||
*/
|
||||
expandIcon: PropTypes.node,
|
||||
/**
|
||||
* This prop can help identify which element has keyboard focus.
|
||||
* The class name will be applied when the element gains the focus through keyboard interaction.
|
||||
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
||||
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
||||
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
||||
* if needed.
|
||||
*/
|
||||
focusVisibleClassName: PropTypes.string,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
onClick: PropTypes.func,
|
||||
/**
|
||||
* 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])
|
||||
} : void 0;
|
||||
export default AccordionSummary;
|
||||
25
node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.d.ts
generated
vendored
Normal file
25
node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
export interface AccordionSummaryClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** State class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */
|
||||
expanded: string;
|
||||
/** State class applied to the ButtonBase root element if the button is keyboard focused. */
|
||||
focusVisible: string;
|
||||
/** State class applied to the root element if `disabled={true}`. */
|
||||
disabled: string;
|
||||
/** Styles applied to the root element unless `disableGutters={true}`. */
|
||||
gutters: string;
|
||||
/**
|
||||
* Styles applied to the children wrapper element unless `disableGutters={true}`.
|
||||
* @deprecated Combine the [.MuiAccordionSummary-gutters](/material-ui/api/accordion-summary/#AccordionSummary-classes-gutters) and [.MuiAccordionSummary-content](/material-ui/api/accordion-summary/#AccordionSummary-classes-content) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
contentGutters: string;
|
||||
/** Styles applied to the children wrapper element. */
|
||||
content: string;
|
||||
/** Styles applied to the `expandIcon`'s wrapper element. */
|
||||
expandIconWrapper: string;
|
||||
}
|
||||
export type AccordionSummaryClassKey = keyof AccordionSummaryClasses;
|
||||
export declare function getAccordionSummaryUtilityClass(slot: string): string;
|
||||
declare const accordionSummaryClasses: AccordionSummaryClasses;
|
||||
export default accordionSummaryClasses;
|
||||
7
node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAccordionSummaryUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAccordionSummary', slot);
|
||||
}
|
||||
const accordionSummaryClasses = generateUtilityClasses('MuiAccordionSummary', ['root', 'expanded', 'focusVisible', 'disabled', 'gutters', 'contentGutters', 'content', 'expandIconWrapper']);
|
||||
export default accordionSummaryClasses;
|
||||
5
node_modules/@mui/material/AccordionSummary/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/AccordionSummary/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './AccordionSummary';
|
||||
export * from './AccordionSummary';
|
||||
|
||||
export { default as accordionSummaryClasses } from './accordionSummaryClasses';
|
||||
export * from './accordionSummaryClasses';
|
||||
3
node_modules/@mui/material/AccordionSummary/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/AccordionSummary/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./AccordionSummary.js";
|
||||
export { default as accordionSummaryClasses } from "./accordionSummaryClasses.js";
|
||||
export * from "./accordionSummaryClasses.js";
|
||||
6
node_modules/@mui/material/AccordionSummary/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/AccordionSummary/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/AccordionSummary/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
145
node_modules/@mui/material/Alert/Alert.d.ts
generated
vendored
Normal file
145
node_modules/@mui/material/Alert/Alert.d.ts
generated
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
import * as React from 'react';
|
||||
import { OverridableStringUnion } from '@mui/types';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { IconButtonProps, InternalStandardProps as StandardProps, SvgIconProps, Theme } from '..';
|
||||
import { PaperProps } from '../Paper';
|
||||
import { AlertClasses } from './alertClasses';
|
||||
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
||||
|
||||
export type AlertColor = 'success' | 'info' | 'warning' | 'error';
|
||||
|
||||
export interface AlertPropsVariantOverrides {}
|
||||
export interface AlertPropsColorOverrides {}
|
||||
export interface AlertCloseButtonSlotPropsOverrides {}
|
||||
export interface AlertCloseIconSlotPropsOverrides {}
|
||||
|
||||
export interface AlertSlots {
|
||||
/**
|
||||
* The component that renders the close button.
|
||||
* @default IconButton
|
||||
*/
|
||||
closeButton: React.ElementType;
|
||||
/**
|
||||
* The component that renders the close icon.
|
||||
* @default svg
|
||||
*/
|
||||
closeIcon: React.ElementType;
|
||||
}
|
||||
|
||||
export type AlertSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
||||
AlertSlots,
|
||||
{
|
||||
closeButton: SlotProps<
|
||||
React.ElementType<IconButtonProps>,
|
||||
AlertCloseButtonSlotPropsOverrides,
|
||||
AlertOwnerState
|
||||
>;
|
||||
closeIcon: SlotProps<
|
||||
React.ElementType<SvgIconProps>,
|
||||
AlertCloseIconSlotPropsOverrides,
|
||||
AlertOwnerState
|
||||
>;
|
||||
}
|
||||
>;
|
||||
|
||||
export interface AlertProps extends StandardProps<PaperProps, 'variant'>, AlertSlotsAndSlotProps {
|
||||
/**
|
||||
* The action to display. It renders after the message, at the end of the alert.
|
||||
*/
|
||||
action?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AlertClasses>;
|
||||
/**
|
||||
* Override the default label for the *close popup* icon button.
|
||||
*
|
||||
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
||||
* @default 'Close'
|
||||
*/
|
||||
closeText?: string;
|
||||
/**
|
||||
* The color of the component. Unless provided, the value is taken from the `severity` prop.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
*/
|
||||
color?: OverridableStringUnion<AlertColor, AlertPropsColorOverrides>;
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
*
|
||||
* @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
components?: {
|
||||
CloseButton?: React.ElementType;
|
||||
CloseIcon?: React.ElementType;
|
||||
};
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
componentsProps?: {
|
||||
closeButton?: IconButtonProps;
|
||||
closeIcon?: SvgIconProps;
|
||||
};
|
||||
/**
|
||||
* The severity of the alert. This defines the color and icon used.
|
||||
* @default 'success'
|
||||
*/
|
||||
severity?: OverridableStringUnion<AlertColor, AlertPropsColorOverrides>;
|
||||
/**
|
||||
* Override the icon displayed before the children.
|
||||
* Unless provided, the icon is mapped to the value of the `severity` prop.
|
||||
* Set to `false` to remove the `icon`.
|
||||
*/
|
||||
icon?: React.ReactNode;
|
||||
/**
|
||||
* The ARIA role attribute of the element.
|
||||
* @default 'alert'
|
||||
*/
|
||||
role?: string;
|
||||
/**
|
||||
* The component maps the `severity` prop to a range of different icons,
|
||||
* for instance success to `<SuccessOutlined>`.
|
||||
* If you wish to change this mapping, you can provide your own.
|
||||
* Alternatively, you can use the `icon` prop to override the icon displayed.
|
||||
*/
|
||||
iconMapping?: Partial<
|
||||
Record<OverridableStringUnion<AlertColor, AlertPropsColorOverrides>, React.ReactNode>
|
||||
>;
|
||||
/**
|
||||
* Callback fired when the component requests to be closed.
|
||||
* When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.
|
||||
* @param {React.SyntheticEvent} event The event source of the callback.
|
||||
*/
|
||||
onClose?: (event: React.SyntheticEvent) => void;
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'standard'
|
||||
*/
|
||||
variant?: OverridableStringUnion<'standard' | 'filled' | 'outlined', AlertPropsVariantOverrides>;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
|
||||
export interface AlertOwnerState extends AlertProps {}
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Alert](https://mui.com/material-ui/react-alert/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Alert API](https://mui.com/material-ui/api/alert/)
|
||||
* - inherits [Paper API](https://mui.com/material-ui/api/paper/)
|
||||
*/
|
||||
export default function Alert(props: AlertProps): React.JSX.Element;
|
||||
354
node_modules/@mui/material/Alert/Alert.js
generated
vendored
Normal file
354
node_modules/@mui/material/Alert/Alert.js
generated
vendored
Normal file
@@ -0,0 +1,354 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { darken, lighten } from '@mui/system/colorManipulator';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import useSlot from "../utils/useSlot.js";
|
||||
import capitalize from "../utils/capitalize.js";
|
||||
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
||||
import Paper from "../Paper/index.js";
|
||||
import alertClasses, { getAlertUtilityClass } from "./alertClasses.js";
|
||||
import IconButton from "../IconButton/index.js";
|
||||
import SuccessOutlinedIcon from "../internal/svg-icons/SuccessOutlined.js";
|
||||
import ReportProblemOutlinedIcon from "../internal/svg-icons/ReportProblemOutlined.js";
|
||||
import ErrorOutlineIcon from "../internal/svg-icons/ErrorOutline.js";
|
||||
import InfoOutlinedIcon from "../internal/svg-icons/InfoOutlined.js";
|
||||
import CloseIcon from "../internal/svg-icons/Close.js";
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
variant,
|
||||
color,
|
||||
severity,
|
||||
classes
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', `color${capitalize(color || severity)}`, `${variant}${capitalize(color || severity)}`, `${variant}`],
|
||||
icon: ['icon'],
|
||||
message: ['message'],
|
||||
action: ['action']
|
||||
};
|
||||
return composeClasses(slots, getAlertUtilityClass, classes);
|
||||
};
|
||||
const AlertRoot = styled(Paper, {
|
||||
name: 'MuiAlert',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color || ownerState.severity)}`]];
|
||||
}
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => {
|
||||
const getColor = theme.palette.mode === 'light' ? darken : lighten;
|
||||
const getBackgroundColor = theme.palette.mode === 'light' ? lighten : darken;
|
||||
return {
|
||||
...theme.typography.body2,
|
||||
backgroundColor: 'transparent',
|
||||
display: 'flex',
|
||||
padding: '6px 16px',
|
||||
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['light'])).map(([color]) => ({
|
||||
props: {
|
||||
colorSeverity: color,
|
||||
variant: 'standard'
|
||||
},
|
||||
style: {
|
||||
color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
|
||||
backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color}StandardBg`] : getBackgroundColor(theme.palette[color].light, 0.9),
|
||||
[`& .${alertClasses.icon}`]: theme.vars ? {
|
||||
color: theme.vars.palette.Alert[`${color}IconColor`]
|
||||
} : {
|
||||
color: theme.palette[color].main
|
||||
}
|
||||
}
|
||||
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['light'])).map(([color]) => ({
|
||||
props: {
|
||||
colorSeverity: color,
|
||||
variant: 'outlined'
|
||||
},
|
||||
style: {
|
||||
color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
|
||||
border: `1px solid ${(theme.vars || theme).palette[color].light}`,
|
||||
[`& .${alertClasses.icon}`]: theme.vars ? {
|
||||
color: theme.vars.palette.Alert[`${color}IconColor`]
|
||||
} : {
|
||||
color: theme.palette[color].main
|
||||
}
|
||||
}
|
||||
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => ({
|
||||
props: {
|
||||
colorSeverity: color,
|
||||
variant: 'filled'
|
||||
},
|
||||
style: {
|
||||
fontWeight: theme.typography.fontWeightMedium,
|
||||
...(theme.vars ? {
|
||||
color: theme.vars.palette.Alert[`${color}FilledColor`],
|
||||
backgroundColor: theme.vars.palette.Alert[`${color}FilledBg`]
|
||||
} : {
|
||||
backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main,
|
||||
color: theme.palette.getContrastText(theme.palette[color].main)
|
||||
})
|
||||
}
|
||||
}))]
|
||||
};
|
||||
}));
|
||||
const AlertIcon = styled('div', {
|
||||
name: 'MuiAlert',
|
||||
slot: 'Icon',
|
||||
overridesResolver: (props, styles) => styles.icon
|
||||
})({
|
||||
marginRight: 12,
|
||||
padding: '7px 0',
|
||||
display: 'flex',
|
||||
fontSize: 22,
|
||||
opacity: 0.9
|
||||
});
|
||||
const AlertMessage = styled('div', {
|
||||
name: 'MuiAlert',
|
||||
slot: 'Message',
|
||||
overridesResolver: (props, styles) => styles.message
|
||||
})({
|
||||
padding: '8px 0',
|
||||
minWidth: 0,
|
||||
overflow: 'auto'
|
||||
});
|
||||
const AlertAction = styled('div', {
|
||||
name: 'MuiAlert',
|
||||
slot: 'Action',
|
||||
overridesResolver: (props, styles) => styles.action
|
||||
})({
|
||||
display: 'flex',
|
||||
alignItems: 'flex-start',
|
||||
padding: '4px 0 0 16px',
|
||||
marginLeft: 'auto',
|
||||
marginRight: -8
|
||||
});
|
||||
const defaultIconMapping = {
|
||||
success: /*#__PURE__*/_jsx(SuccessOutlinedIcon, {
|
||||
fontSize: "inherit"
|
||||
}),
|
||||
warning: /*#__PURE__*/_jsx(ReportProblemOutlinedIcon, {
|
||||
fontSize: "inherit"
|
||||
}),
|
||||
error: /*#__PURE__*/_jsx(ErrorOutlineIcon, {
|
||||
fontSize: "inherit"
|
||||
}),
|
||||
info: /*#__PURE__*/_jsx(InfoOutlinedIcon, {
|
||||
fontSize: "inherit"
|
||||
})
|
||||
};
|
||||
const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAlert'
|
||||
});
|
||||
const {
|
||||
action,
|
||||
children,
|
||||
className,
|
||||
closeText = 'Close',
|
||||
color,
|
||||
components = {},
|
||||
componentsProps = {},
|
||||
icon,
|
||||
iconMapping = defaultIconMapping,
|
||||
onClose,
|
||||
role = 'alert',
|
||||
severity = 'success',
|
||||
slotProps = {},
|
||||
slots = {},
|
||||
variant = 'standard',
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = {
|
||||
...props,
|
||||
color,
|
||||
severity,
|
||||
variant,
|
||||
colorSeverity: color || severity
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
const externalForwardedProps = {
|
||||
slots: {
|
||||
closeButton: components.CloseButton,
|
||||
closeIcon: components.CloseIcon,
|
||||
...slots
|
||||
},
|
||||
slotProps: {
|
||||
...componentsProps,
|
||||
...slotProps
|
||||
}
|
||||
};
|
||||
const [CloseButtonSlot, closeButtonProps] = useSlot('closeButton', {
|
||||
elementType: IconButton,
|
||||
externalForwardedProps,
|
||||
ownerState
|
||||
});
|
||||
const [CloseIconSlot, closeIconProps] = useSlot('closeIcon', {
|
||||
elementType: CloseIcon,
|
||||
externalForwardedProps,
|
||||
ownerState
|
||||
});
|
||||
return /*#__PURE__*/_jsxs(AlertRoot, {
|
||||
role: role,
|
||||
elevation: 0,
|
||||
ownerState: ownerState,
|
||||
className: clsx(classes.root, className),
|
||||
ref: ref,
|
||||
...other,
|
||||
children: [icon !== false ? /*#__PURE__*/_jsx(AlertIcon, {
|
||||
ownerState: ownerState,
|
||||
className: classes.icon,
|
||||
children: icon || iconMapping[severity] || defaultIconMapping[severity]
|
||||
}) : null, /*#__PURE__*/_jsx(AlertMessage, {
|
||||
ownerState: ownerState,
|
||||
className: classes.message,
|
||||
children: children
|
||||
}), action != null ? /*#__PURE__*/_jsx(AlertAction, {
|
||||
ownerState: ownerState,
|
||||
className: classes.action,
|
||||
children: action
|
||||
}) : null, action == null && onClose ? /*#__PURE__*/_jsx(AlertAction, {
|
||||
ownerState: ownerState,
|
||||
className: classes.action,
|
||||
children: /*#__PURE__*/_jsx(CloseButtonSlot, {
|
||||
size: "small",
|
||||
"aria-label": closeText,
|
||||
title: closeText,
|
||||
color: "inherit",
|
||||
onClick: onClose,
|
||||
...closeButtonProps,
|
||||
children: /*#__PURE__*/_jsx(CloseIconSlot, {
|
||||
fontSize: "small",
|
||||
...closeIconProps
|
||||
})
|
||||
})
|
||||
}) : null]
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Alert.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 action to display. It renders after the message, at the end of the alert.
|
||||
*/
|
||||
action: PropTypes.node,
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* Override the default label for the *close popup* icon button.
|
||||
*
|
||||
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
||||
* @default 'Close'
|
||||
*/
|
||||
closeText: PropTypes.string,
|
||||
/**
|
||||
* The color of the component. Unless provided, the value is taken from the `severity` prop.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
*/
|
||||
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'success', 'warning']), PropTypes.string]),
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
*
|
||||
* @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
components: PropTypes.shape({
|
||||
CloseButton: PropTypes.elementType,
|
||||
CloseIcon: PropTypes.elementType
|
||||
}),
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
componentsProps: PropTypes.shape({
|
||||
closeButton: PropTypes.object,
|
||||
closeIcon: PropTypes.object
|
||||
}),
|
||||
/**
|
||||
* Override the icon displayed before the children.
|
||||
* Unless provided, the icon is mapped to the value of the `severity` prop.
|
||||
* Set to `false` to remove the `icon`.
|
||||
*/
|
||||
icon: PropTypes.node,
|
||||
/**
|
||||
* The component maps the `severity` prop to a range of different icons,
|
||||
* for instance success to `<SuccessOutlined>`.
|
||||
* If you wish to change this mapping, you can provide your own.
|
||||
* Alternatively, you can use the `icon` prop to override the icon displayed.
|
||||
*/
|
||||
iconMapping: PropTypes.shape({
|
||||
error: PropTypes.node,
|
||||
info: PropTypes.node,
|
||||
success: PropTypes.node,
|
||||
warning: PropTypes.node
|
||||
}),
|
||||
/**
|
||||
* Callback fired when the component requests to be closed.
|
||||
* When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.
|
||||
* @param {React.SyntheticEvent} event The event source of the callback.
|
||||
*/
|
||||
onClose: PropTypes.func,
|
||||
/**
|
||||
* The ARIA role attribute of the element.
|
||||
* @default 'alert'
|
||||
*/
|
||||
role: PropTypes.string,
|
||||
/**
|
||||
* The severity of the alert. This defines the color and icon used.
|
||||
* @default 'success'
|
||||
*/
|
||||
severity: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'success', 'warning']), PropTypes.string]),
|
||||
/**
|
||||
* The props used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: PropTypes.shape({
|
||||
closeButton: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
||||
closeIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
||||
}),
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slots: PropTypes.shape({
|
||||
closeButton: PropTypes.elementType,
|
||||
closeIcon: PropTypes.elementType
|
||||
}),
|
||||
/**
|
||||
* 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 variant to use.
|
||||
* @default 'standard'
|
||||
*/
|
||||
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])
|
||||
} : void 0;
|
||||
export default Alert;
|
||||
100
node_modules/@mui/material/Alert/alertClasses.d.ts
generated
vendored
Normal file
100
node_modules/@mui/material/Alert/alertClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
export interface AlertClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if `variant="filled"`. */
|
||||
filled: string;
|
||||
/** Styles applied to the root element if `variant="outlined"`. */
|
||||
outlined: string;
|
||||
/** Styles applied to the root element if `variant="standard"`. */
|
||||
standard: string;
|
||||
/** Styles applied to the root element if `color="success"`. */
|
||||
colorSuccess: string;
|
||||
/** Styles applied to the root element if `color="info"`. */
|
||||
colorInfo: string;
|
||||
/** Styles applied to the root element if `color="warning"`. */
|
||||
colorWarning: string;
|
||||
/** Styles applied to the root element if `color="error"`. */
|
||||
colorError: string;
|
||||
/** Styles applied to the root element if `variant="standard"` and `color="success"`.
|
||||
* @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
|
||||
* and [.MuiAlert-colorSuccess](/material-ui/api/alert/#alert-classes-colorSuccess) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
standardSuccess: string;
|
||||
/** Styles applied to the root element if `variant="standard"` and `color="info"`.
|
||||
* @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
|
||||
* and [.MuiAlert-colorInfo](/material-ui/api/alert/#alert-classes-colorInfo) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
standardInfo: string;
|
||||
/** Styles applied to the root element if `variant="standard"` and `color="warning"`.
|
||||
* @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
|
||||
* and [.MuiAlert-colorWarning](/material-ui/api/alert/#alert-classes-colorWarning) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
standardWarning: string;
|
||||
/** Styles applied to the root element if `variant="standard"` and `color="error"`.
|
||||
* @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
|
||||
* and [.MuiAlert-colorError](/material-ui/api/alert/#alert-classes-colorError) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
standardError: string;
|
||||
/** Styles applied to the root element if `variant="outlined"` and `color="success"`.
|
||||
* @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
|
||||
* and [.MuiAlert-colorSuccess](/material-ui/api/alert/#alert-classes-colorSuccess) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
outlinedSuccess: string;
|
||||
/** Styles applied to the root element if `variant="outlined"` and `color="info"`.
|
||||
* @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
|
||||
* and [.MuiAlert-colorInfo](/material-ui/api/alert/#alert-classes-colorInfo) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
outlinedInfo: string;
|
||||
/** Styles applied to the root element if `variant="outlined"` and `color="warning"`.
|
||||
* @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
|
||||
* and [.MuiAlert-colorWarning](/material-ui/api/alert/#alert-classes-colorWarning) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
outlinedWarning: string;
|
||||
/** Styles applied to the root element if `variant="outlined"` and `color="error"`.
|
||||
* @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
|
||||
* and [.MuiAlert-colorError](/material-ui/api/alert/#alert-classes-colorError) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
outlinedError: string;
|
||||
/** Styles applied to the root element if `variant="filled"` and `color="success"`.
|
||||
* @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
|
||||
* and [.MuiAlert-colorSuccess](/material-ui/api/alert/#alert-classes-colorSuccess) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
filledSuccess: string;
|
||||
/** Styles applied to the root element if `variant="filled"` and `color="info"`.
|
||||
* @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
|
||||
* and [.MuiAlert-colorInfo](/material-ui/api/alert/#alert-classes-colorInfo) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
filledInfo: string;
|
||||
/** Styles applied to the root element if `variant="filled"` and `color="warning"`
|
||||
* @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
|
||||
* and [.MuiAlert-colorWarning](/material-ui/api/alert/#alert-classes-colorWarning) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
filledWarning: string;
|
||||
/** Styles applied to the root element if `variant="filled"` and `color="error"`.
|
||||
* @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
|
||||
* and [.MuiAlert-colorError](/material-ui/api/alert/#alert-classes-colorError) classes instead.
|
||||
* See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
filledError: string;
|
||||
/** Styles applied to the icon wrapper element. */
|
||||
icon: string;
|
||||
/** Styles applied to the message wrapper element. */
|
||||
message: string;
|
||||
/** Styles applied to the action wrapper element if `action` is provided. */
|
||||
action: string;
|
||||
}
|
||||
export type AlertClassKey = keyof AlertClasses;
|
||||
export declare function getAlertUtilityClass(slot: string): string;
|
||||
declare const alertClasses: AlertClasses;
|
||||
export default alertClasses;
|
||||
7
node_modules/@mui/material/Alert/alertClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/Alert/alertClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAlertUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAlert', slot);
|
||||
}
|
||||
const alertClasses = generateUtilityClasses('MuiAlert', ['root', 'action', 'icon', 'message', 'filled', 'colorSuccess', 'colorInfo', 'colorWarning', 'colorError', 'filledSuccess', 'filledInfo', 'filledWarning', 'filledError', 'outlined', 'outlinedSuccess', 'outlinedInfo', 'outlinedWarning', 'outlinedError', 'standard', 'standardSuccess', 'standardInfo', 'standardWarning', 'standardError']);
|
||||
export default alertClasses;
|
||||
5
node_modules/@mui/material/Alert/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/Alert/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './Alert';
|
||||
export * from './Alert';
|
||||
|
||||
export { default as alertClasses } from './alertClasses';
|
||||
export * from './alertClasses';
|
||||
3
node_modules/@mui/material/Alert/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/Alert/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./Alert.js";
|
||||
export { default as alertClasses } from "./alertClasses.js";
|
||||
export * from "./alertClasses.js";
|
||||
6
node_modules/@mui/material/Alert/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/Alert/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/Alert/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
32
node_modules/@mui/material/AlertTitle/AlertTitle.d.ts
generated
vendored
Normal file
32
node_modules/@mui/material/AlertTitle/AlertTitle.d.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { Theme, TypographyProps } from '..';
|
||||
import { AlertTitleClasses } from './alertTitleClasses';
|
||||
|
||||
export interface AlertTitleProps extends TypographyProps<'div'> {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AlertTitleClasses>;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Alert](https://mui.com/material-ui/react-alert/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [AlertTitle API](https://mui.com/material-ui/api/alert-title/)
|
||||
* - inherits [Typography API](https://mui.com/material-ui/api/typography/)
|
||||
*/
|
||||
export default function AlertTitle(props: AlertTitleProps): React.JSX.Element;
|
||||
76
node_modules/@mui/material/AlertTitle/AlertTitle.js
generated
vendored
Normal file
76
node_modules/@mui/material/AlertTitle/AlertTitle.js
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import Typography from "../Typography/index.js";
|
||||
import { getAlertTitleUtilityClass } from "./alertTitleClasses.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root']
|
||||
};
|
||||
return composeClasses(slots, getAlertTitleUtilityClass, classes);
|
||||
};
|
||||
const AlertTitleRoot = styled(Typography, {
|
||||
name: 'MuiAlertTitle',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => styles.root
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => {
|
||||
return {
|
||||
fontWeight: theme.typography.fontWeightMedium,
|
||||
marginTop: -2
|
||||
};
|
||||
}));
|
||||
const AlertTitle = /*#__PURE__*/React.forwardRef(function AlertTitle(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAlertTitle'
|
||||
});
|
||||
const {
|
||||
className,
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = props;
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
return /*#__PURE__*/_jsx(AlertTitleRoot, {
|
||||
gutterBottom: true,
|
||||
component: "div",
|
||||
ownerState: ownerState,
|
||||
ref: ref,
|
||||
className: clsx(classes.root, className),
|
||||
...other
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? AlertTitle.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 content of the component.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* 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])
|
||||
} : void 0;
|
||||
export default AlertTitle;
|
||||
8
node_modules/@mui/material/AlertTitle/alertTitleClasses.d.ts
generated
vendored
Normal file
8
node_modules/@mui/material/AlertTitle/alertTitleClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface AlertTitleClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
}
|
||||
export type AlertTitleClassKey = keyof AlertTitleClasses;
|
||||
export declare function getAlertTitleUtilityClass(slot: string): string;
|
||||
declare const alertTitleClasses: AlertTitleClasses;
|
||||
export default alertTitleClasses;
|
||||
7
node_modules/@mui/material/AlertTitle/alertTitleClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/AlertTitle/alertTitleClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAlertTitleUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAlertTitle', slot);
|
||||
}
|
||||
const alertTitleClasses = generateUtilityClasses('MuiAlertTitle', ['root']);
|
||||
export default alertTitleClasses;
|
||||
5
node_modules/@mui/material/AlertTitle/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/AlertTitle/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './AlertTitle';
|
||||
export * from './AlertTitle';
|
||||
|
||||
export { default as alertTitleClasses } from './alertTitleClasses';
|
||||
export * from './alertTitleClasses';
|
||||
3
node_modules/@mui/material/AlertTitle/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/AlertTitle/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./AlertTitle.js";
|
||||
export { default as alertTitleClasses } from "./alertTitleClasses.js";
|
||||
export * from "./alertTitleClasses.js";
|
||||
6
node_modules/@mui/material/AlertTitle/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/AlertTitle/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/AlertTitle/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
76
node_modules/@mui/material/AppBar/AppBar.d.ts
generated
vendored
Normal file
76
node_modules/@mui/material/AppBar/AppBar.d.ts
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { OverridableStringUnion } from '@mui/types';
|
||||
import { OverridableComponent, OverrideProps } from '@mui/material/OverridableComponent';
|
||||
import { PropTypes, Theme } from '..';
|
||||
import { AppBarClasses } from './appBarClasses';
|
||||
import { ExtendPaperTypeMap } from '../Paper/Paper';
|
||||
|
||||
export interface AppBarPropsColorOverrides {}
|
||||
|
||||
export interface AppBarOwnProps {
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AppBarClasses>;
|
||||
/**
|
||||
* The color of the component.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
* @default 'primary'
|
||||
*/
|
||||
color?: OverridableStringUnion<
|
||||
PropTypes.Color | 'transparent' | 'error' | 'info' | 'success' | 'warning',
|
||||
AppBarPropsColorOverrides
|
||||
>;
|
||||
/**
|
||||
* If true, the `color` prop is applied in dark mode.
|
||||
* @default false
|
||||
*/
|
||||
enableColorOnDark?: boolean;
|
||||
/**
|
||||
* The positioning type. The behavior of the different options is described
|
||||
* [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
|
||||
* Note: `sticky` is not universally supported and will fall back to `static` when unavailable.
|
||||
* @default 'fixed'
|
||||
*/
|
||||
position?: 'fixed' | 'absolute' | 'sticky' | 'static' | 'relative';
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
|
||||
export type AppBarTypeMap<
|
||||
AdditionalProps = {},
|
||||
RootComponent extends React.ElementType = 'header',
|
||||
> = ExtendPaperTypeMap<
|
||||
{
|
||||
props: AdditionalProps & AppBarOwnProps;
|
||||
defaultComponent: RootComponent;
|
||||
},
|
||||
'position' | 'color' | 'classes'
|
||||
>;
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [App Bar](https://mui.com/material-ui/react-app-bar/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [AppBar API](https://mui.com/material-ui/api/app-bar/)
|
||||
* - inherits [Paper API](https://mui.com/material-ui/api/paper/)
|
||||
*/
|
||||
|
||||
declare const AppBar: OverridableComponent<AppBarTypeMap>;
|
||||
|
||||
export type AppBarProps<
|
||||
RootComponent extends React.ElementType = AppBarTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<AppBarTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export default AppBar;
|
||||
227
node_modules/@mui/material/AppBar/AppBar.js
generated
vendored
Normal file
227
node_modules/@mui/material/AppBar/AppBar.js
generated
vendored
Normal file
@@ -0,0 +1,227 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import capitalize from "../utils/capitalize.js";
|
||||
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
||||
import Paper from "../Paper/index.js";
|
||||
import { getAppBarUtilityClass } from "./appBarClasses.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
color,
|
||||
position,
|
||||
classes
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', `color${capitalize(color)}`, `position${capitalize(position)}`]
|
||||
};
|
||||
return composeClasses(slots, getAppBarUtilityClass, classes);
|
||||
};
|
||||
|
||||
// var2 is the fallback.
|
||||
// Ex. var1: 'var(--a)', var2: 'var(--b)'; return: 'var(--a, var(--b))'
|
||||
const joinVars = (var1, var2) => var1 ? `${var1?.replace(')', '')}, ${var2})` : var2;
|
||||
const AppBarRoot = styled(Paper, {
|
||||
name: 'MuiAppBar',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.root, styles[`position${capitalize(ownerState.position)}`], styles[`color${capitalize(ownerState.color)}`]];
|
||||
}
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box',
|
||||
// Prevent padding issue with the Modal and fixed positioned AppBar.
|
||||
flexShrink: 0,
|
||||
variants: [{
|
||||
props: {
|
||||
position: 'fixed'
|
||||
},
|
||||
style: {
|
||||
position: 'fixed',
|
||||
zIndex: (theme.vars || theme).zIndex.appBar,
|
||||
top: 0,
|
||||
left: 'auto',
|
||||
right: 0,
|
||||
'@media print': {
|
||||
// Prevent the app bar to be visible on each printed page.
|
||||
position: 'absolute'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
position: 'absolute'
|
||||
},
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: (theme.vars || theme).zIndex.appBar,
|
||||
top: 0,
|
||||
left: 'auto',
|
||||
right: 0
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
position: 'sticky'
|
||||
},
|
||||
style: {
|
||||
position: 'sticky',
|
||||
zIndex: (theme.vars || theme).zIndex.appBar,
|
||||
top: 0,
|
||||
left: 'auto',
|
||||
right: 0
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
position: 'static'
|
||||
},
|
||||
style: {
|
||||
position: 'static'
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
position: 'relative'
|
||||
},
|
||||
style: {
|
||||
position: 'relative'
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
color: 'inherit'
|
||||
},
|
||||
style: {
|
||||
'--AppBar-color': 'inherit'
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
color: 'default'
|
||||
},
|
||||
style: {
|
||||
'--AppBar-background': theme.vars ? theme.vars.palette.AppBar.defaultBg : theme.palette.grey[100],
|
||||
'--AppBar-color': theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(theme.palette.grey[100]),
|
||||
...theme.applyStyles('dark', {
|
||||
'--AppBar-background': theme.vars ? theme.vars.palette.AppBar.defaultBg : theme.palette.grey[900],
|
||||
'--AppBar-color': theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(theme.palette.grey[900])
|
||||
})
|
||||
}
|
||||
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => ({
|
||||
props: {
|
||||
color
|
||||
},
|
||||
style: {
|
||||
'--AppBar-background': (theme.vars ?? theme).palette[color].main,
|
||||
'--AppBar-color': (theme.vars ?? theme).palette[color].contrastText
|
||||
}
|
||||
})), {
|
||||
props: props => props.enableColorOnDark === true && !['inherit', 'transparent'].includes(props.color),
|
||||
style: {
|
||||
backgroundColor: 'var(--AppBar-background)',
|
||||
color: 'var(--AppBar-color)'
|
||||
}
|
||||
}, {
|
||||
props: props => props.enableColorOnDark === false && !['inherit', 'transparent'].includes(props.color),
|
||||
style: {
|
||||
backgroundColor: 'var(--AppBar-background)',
|
||||
color: 'var(--AppBar-color)',
|
||||
...theme.applyStyles('dark', {
|
||||
backgroundColor: theme.vars ? joinVars(theme.vars.palette.AppBar.darkBg, 'var(--AppBar-background)') : null,
|
||||
color: theme.vars ? joinVars(theme.vars.palette.AppBar.darkColor, 'var(--AppBar-color)') : null
|
||||
})
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
color: 'transparent'
|
||||
},
|
||||
style: {
|
||||
'--AppBar-background': 'transparent',
|
||||
'--AppBar-color': 'inherit',
|
||||
backgroundColor: 'var(--AppBar-background)',
|
||||
color: 'var(--AppBar-color)',
|
||||
...theme.applyStyles('dark', {
|
||||
backgroundImage: 'none'
|
||||
})
|
||||
}
|
||||
}]
|
||||
})));
|
||||
const AppBar = /*#__PURE__*/React.forwardRef(function AppBar(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAppBar'
|
||||
});
|
||||
const {
|
||||
className,
|
||||
color = 'primary',
|
||||
enableColorOnDark = false,
|
||||
position = 'fixed',
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = {
|
||||
...props,
|
||||
color,
|
||||
position,
|
||||
enableColorOnDark
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
return /*#__PURE__*/_jsx(AppBarRoot, {
|
||||
square: true,
|
||||
component: "header",
|
||||
ownerState: ownerState,
|
||||
elevation: 4,
|
||||
className: clsx(classes.root, className, position === 'fixed' && 'mui-fixed'),
|
||||
ref: ref,
|
||||
...other
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? AppBar.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 content of the component.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* The color of the component.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
* @default 'primary'
|
||||
*/
|
||||
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent', 'error', 'info', 'success', 'warning']), PropTypes.string]),
|
||||
/**
|
||||
* If true, the `color` prop is applied in dark mode.
|
||||
* @default false
|
||||
*/
|
||||
enableColorOnDark: PropTypes.bool,
|
||||
/**
|
||||
* The positioning type. The behavior of the different options is described
|
||||
* [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
|
||||
* Note: `sticky` is not universally supported and will fall back to `static` when unavailable.
|
||||
* @default 'fixed'
|
||||
*/
|
||||
position: PropTypes.oneOf(['absolute', 'fixed', 'relative', 'static', 'sticky']),
|
||||
/**
|
||||
* 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])
|
||||
} : void 0;
|
||||
export default AppBar;
|
||||
36
node_modules/@mui/material/AppBar/appBarClasses.d.ts
generated
vendored
Normal file
36
node_modules/@mui/material/AppBar/appBarClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
export interface AppBarClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if `position="fixed"`. */
|
||||
positionFixed: string;
|
||||
/** Styles applied to the root element if `position="absolute"`. */
|
||||
positionAbsolute: string;
|
||||
/** Styles applied to the root element if `position="sticky"`. */
|
||||
positionSticky: string;
|
||||
/** Styles applied to the root element if `position="static"`. */
|
||||
positionStatic: string;
|
||||
/** Styles applied to the root element if `position="relative"`. */
|
||||
positionRelative: string;
|
||||
/** Styles applied to the root element if `color="default"`. */
|
||||
colorDefault: string;
|
||||
/** Styles applied to the root element if `color="primary"`. */
|
||||
colorPrimary: string;
|
||||
/** Styles applied to the root element if `color="secondary"`. */
|
||||
colorSecondary: string;
|
||||
/** Styles applied to the root element if `color="inherit"`. */
|
||||
colorInherit: string;
|
||||
/** Styles applied to the root element if `color="transparent"`. */
|
||||
colorTransparent: string;
|
||||
/** Styles applied to the root element if `color="error"`. */
|
||||
colorError: string;
|
||||
/** Styles applied to the root element if `color="info"`. */
|
||||
colorInfo: string;
|
||||
/** Styles applied to the root element if `color="success"`. */
|
||||
colorSuccess: string;
|
||||
/** Styles applied to the root element if `color="warning"`. */
|
||||
colorWarning: string;
|
||||
}
|
||||
export type AppBarClassKey = keyof AppBarClasses;
|
||||
export declare function getAppBarUtilityClass(slot: string): string;
|
||||
declare const appBarClasses: AppBarClasses;
|
||||
export default appBarClasses;
|
||||
7
node_modules/@mui/material/AppBar/appBarClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/AppBar/appBarClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAppBarUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAppBar', slot);
|
||||
}
|
||||
const appBarClasses = generateUtilityClasses('MuiAppBar', ['root', 'positionFixed', 'positionAbsolute', 'positionSticky', 'positionStatic', 'positionRelative', 'colorDefault', 'colorPrimary', 'colorSecondary', 'colorInherit', 'colorTransparent', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning']);
|
||||
export default appBarClasses;
|
||||
5
node_modules/@mui/material/AppBar/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/AppBar/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './AppBar';
|
||||
export * from './AppBar';
|
||||
|
||||
export { default as appBarClasses } from './appBarClasses';
|
||||
export * from './appBarClasses';
|
||||
3
node_modules/@mui/material/AppBar/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/AppBar/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./AppBar.js";
|
||||
export { default as appBarClasses } from "./appBarClasses.js";
|
||||
export * from "./appBarClasses.js";
|
||||
6
node_modules/@mui/material/AppBar/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/AppBar/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/AppBar/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
371
node_modules/@mui/material/Autocomplete/Autocomplete.d.ts
generated
vendored
Normal file
371
node_modules/@mui/material/Autocomplete/Autocomplete.d.ts
generated
vendored
Normal file
@@ -0,0 +1,371 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { OverridableStringUnion } from '@mui/types';
|
||||
import { IconButtonProps, InternalStandardProps as StandardProps, Theme } from '@mui/material';
|
||||
import { ChipProps, ChipTypeMap } from '@mui/material/Chip';
|
||||
import { PaperProps } from '@mui/material/Paper';
|
||||
import { PopperProps } from '@mui/material/Popper';
|
||||
import useAutocomplete, {
|
||||
AutocompleteChangeDetails,
|
||||
AutocompleteChangeReason,
|
||||
AutocompleteCloseReason,
|
||||
AutocompleteInputChangeReason,
|
||||
AutocompleteValue,
|
||||
createFilterOptions,
|
||||
UseAutocompleteProps,
|
||||
AutocompleteFreeSoloValueMapping,
|
||||
} from '../useAutocomplete';
|
||||
import { AutocompleteClasses } from './autocompleteClasses';
|
||||
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
||||
|
||||
export interface AutocompletePaperSlotPropsOverrides {}
|
||||
export interface AutocompletePopperSlotPropsOverrides {}
|
||||
|
||||
export {
|
||||
AutocompleteChangeDetails,
|
||||
AutocompleteChangeReason,
|
||||
AutocompleteCloseReason,
|
||||
AutocompleteInputChangeReason,
|
||||
AutocompleteValue,
|
||||
createFilterOptions,
|
||||
};
|
||||
|
||||
export type AutocompleteOwnerState<
|
||||
Value,
|
||||
Multiple extends boolean | undefined,
|
||||
DisableClearable extends boolean | undefined,
|
||||
FreeSolo extends boolean | undefined,
|
||||
ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent'],
|
||||
> = AutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent> & {
|
||||
disablePortal: boolean;
|
||||
expanded: boolean;
|
||||
focused: boolean;
|
||||
fullWidth: boolean;
|
||||
getOptionLabel: (option: Value | AutocompleteFreeSoloValueMapping<FreeSolo>) => string;
|
||||
hasClearIcon: boolean;
|
||||
hasPopupIcon: boolean;
|
||||
inputFocused: boolean;
|
||||
popupOpen: boolean;
|
||||
size: OverridableStringUnion<'small' | 'medium', AutocompletePropsSizeOverrides>;
|
||||
};
|
||||
|
||||
export type AutocompleteRenderGetTagProps = ({ index }: { index: number }) => {
|
||||
key: number;
|
||||
className: string;
|
||||
disabled: boolean;
|
||||
'data-tag-index': number;
|
||||
tabIndex: -1;
|
||||
onDelete: (event: any) => void;
|
||||
};
|
||||
|
||||
export interface AutocompleteRenderOptionState {
|
||||
inputValue: string;
|
||||
index: number;
|
||||
selected: boolean;
|
||||
}
|
||||
|
||||
export interface AutocompleteRenderGroupParams {
|
||||
key: string;
|
||||
group: string;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export interface AutocompleteRenderInputParams {
|
||||
id: string;
|
||||
disabled: boolean;
|
||||
fullWidth: boolean;
|
||||
size: 'small' | undefined;
|
||||
InputLabelProps: ReturnType<ReturnType<typeof useAutocomplete>['getInputLabelProps']>;
|
||||
InputProps: {
|
||||
ref: React.Ref<any>;
|
||||
className: string;
|
||||
startAdornment: React.ReactNode;
|
||||
endAdornment: React.ReactNode;
|
||||
};
|
||||
inputProps: ReturnType<ReturnType<typeof useAutocomplete>['getInputProps']>;
|
||||
}
|
||||
|
||||
export interface AutocompletePropsSizeOverrides {}
|
||||
|
||||
export interface AutocompleteSlots {
|
||||
/**
|
||||
* The component used to render the listbox.
|
||||
* @default 'ul'
|
||||
*/
|
||||
listbox: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>>;
|
||||
/**
|
||||
* The component used to render the body of the popup.
|
||||
* @default Paper
|
||||
*/
|
||||
paper: React.JSXElementConstructor<PaperProps & AutocompletePaperSlotPropsOverrides>;
|
||||
/**
|
||||
* The component used to position the popup.
|
||||
* @default Popper
|
||||
*/
|
||||
popper: React.JSXElementConstructor<PopperProps & AutocompletePopperSlotPropsOverrides>;
|
||||
}
|
||||
|
||||
export type AutocompleteSlotsAndSlotProps<
|
||||
Value,
|
||||
Multiple extends boolean | undefined,
|
||||
DisableClearable extends boolean | undefined,
|
||||
FreeSolo extends boolean | undefined,
|
||||
ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent'],
|
||||
> = CreateSlotsAndSlotProps<
|
||||
AutocompleteSlots,
|
||||
{
|
||||
chip: SlotProps<
|
||||
React.ElementType<Partial<ChipProps<ChipComponent>>>,
|
||||
{},
|
||||
AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>
|
||||
>;
|
||||
clearIndicator: SlotProps<
|
||||
React.ElementType<Partial<IconButtonProps>>,
|
||||
{},
|
||||
AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>
|
||||
>;
|
||||
/**
|
||||
* Props applied to the Listbox element.
|
||||
*/
|
||||
listbox: SlotProps<
|
||||
React.ElementType<
|
||||
ReturnType<ReturnType<typeof useAutocomplete>['getListboxProps']> & {
|
||||
sx?: SxProps<Theme>;
|
||||
ref?: React.Ref<Element>;
|
||||
}
|
||||
>,
|
||||
{},
|
||||
AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>
|
||||
>;
|
||||
paper: SlotProps<
|
||||
React.ElementType<Partial<PaperProps>>,
|
||||
AutocompletePaperSlotPropsOverrides,
|
||||
AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>
|
||||
>;
|
||||
popper: SlotProps<
|
||||
React.ElementType<Partial<PopperProps>>,
|
||||
AutocompletePopperSlotPropsOverrides,
|
||||
AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>
|
||||
>;
|
||||
popupIndicator: SlotProps<
|
||||
React.ElementType<Partial<IconButtonProps>>,
|
||||
{},
|
||||
AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>
|
||||
>;
|
||||
}
|
||||
>;
|
||||
|
||||
export interface AutocompleteProps<
|
||||
Value,
|
||||
Multiple extends boolean | undefined,
|
||||
DisableClearable extends boolean | undefined,
|
||||
FreeSolo extends boolean | undefined,
|
||||
ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent'],
|
||||
> extends UseAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo>,
|
||||
StandardProps<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange' | 'children'>,
|
||||
AutocompleteSlotsAndSlotProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent> {
|
||||
/**
|
||||
* Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
|
||||
*/
|
||||
ChipProps?: ChipProps<ChipComponent>;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AutocompleteClasses>;
|
||||
/**
|
||||
* The icon to display in place of the default clear icon.
|
||||
* @default <ClearIcon fontSize="small" />
|
||||
*/
|
||||
clearIcon?: React.ReactNode;
|
||||
/**
|
||||
* Override the default text for the *clear* icon button.
|
||||
*
|
||||
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
||||
* @default 'Clear'
|
||||
*/
|
||||
clearText?: string;
|
||||
/**
|
||||
* Override the default text for the *close popup* icon button.
|
||||
*
|
||||
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
||||
* @default 'Close'
|
||||
*/
|
||||
closeText?: string;
|
||||
/**
|
||||
* The props used for each slot inside.
|
||||
* @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
componentsProps?: {
|
||||
clearIndicator?: Partial<IconButtonProps>;
|
||||
paper?: PaperProps;
|
||||
popper?: Partial<PopperProps>;
|
||||
popupIndicator?: Partial<IconButtonProps>;
|
||||
};
|
||||
/**
|
||||
* If `true`, the component is disabled.
|
||||
* @default false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* If `true`, the `Popper` content will be under the DOM hierarchy of the parent component.
|
||||
* @default false
|
||||
*/
|
||||
disablePortal?: boolean;
|
||||
/**
|
||||
* Force the visibility display of the popup icon.
|
||||
* @default 'auto'
|
||||
*/
|
||||
forcePopupIcon?: true | false | 'auto';
|
||||
/**
|
||||
* If `true`, the input will take up the full width of its container.
|
||||
* @default false
|
||||
*/
|
||||
fullWidth?: boolean;
|
||||
/**
|
||||
* The label to display when the tags are truncated (`limitTags`).
|
||||
*
|
||||
* @param {number} more The number of truncated tags.
|
||||
* @returns {ReactNode}
|
||||
* @default (more) => `+${more}`
|
||||
*/
|
||||
getLimitTagsText?: (more: number) => React.ReactNode;
|
||||
/**
|
||||
* The component used to render the listbox.
|
||||
* @default 'ul'
|
||||
*/
|
||||
ListboxComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>>;
|
||||
/**
|
||||
* Props applied to the Listbox element.
|
||||
*/
|
||||
ListboxProps?: ReturnType<ReturnType<typeof useAutocomplete>['getListboxProps']> & {
|
||||
sx?: SxProps<Theme>;
|
||||
ref?: React.Ref<Element>;
|
||||
};
|
||||
/**
|
||||
* If `true`, the component is in a loading state.
|
||||
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
|
||||
* @default false
|
||||
*/
|
||||
loading?: boolean;
|
||||
/**
|
||||
* Text to display when in a loading state.
|
||||
*
|
||||
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
||||
* @default 'Loading…'
|
||||
*/
|
||||
loadingText?: React.ReactNode;
|
||||
/**
|
||||
* The maximum number of tags that will be visible when not focused.
|
||||
* Set `-1` to disable the limit.
|
||||
* @default -1
|
||||
*/
|
||||
limitTags?: number;
|
||||
/**
|
||||
* Text to display when there are no options.
|
||||
*
|
||||
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
||||
* @default 'No options'
|
||||
*/
|
||||
noOptionsText?: React.ReactNode;
|
||||
onKeyDown?: (
|
||||
event: React.KeyboardEvent<HTMLDivElement> & { defaultMuiPrevented?: boolean },
|
||||
) => void;
|
||||
/**
|
||||
* Override the default text for the *open popup* icon button.
|
||||
*
|
||||
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
||||
* @default 'Open'
|
||||
*/
|
||||
openText?: string;
|
||||
/**
|
||||
* The component used to render the body of the popup.
|
||||
* @default Paper
|
||||
*/
|
||||
PaperComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>>;
|
||||
/**
|
||||
* The component used to position the popup.
|
||||
* @default Popper
|
||||
*/
|
||||
PopperComponent?: React.JSXElementConstructor<PopperProps>;
|
||||
/**
|
||||
* The icon to display in place of the default popup icon.
|
||||
* @default <ArrowDropDownIcon />
|
||||
*/
|
||||
popupIcon?: React.ReactNode;
|
||||
/**
|
||||
* If `true`, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.
|
||||
* @default false
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
/**
|
||||
* Render the group.
|
||||
*
|
||||
* @param {AutocompleteRenderGroupParams} params The group to render.
|
||||
* @returns {ReactNode}
|
||||
*/
|
||||
renderGroup?: (params: AutocompleteRenderGroupParams) => React.ReactNode;
|
||||
/**
|
||||
* Render the input.
|
||||
*
|
||||
* @param {object} params
|
||||
* @returns {ReactNode}
|
||||
*/
|
||||
renderInput: (params: AutocompleteRenderInputParams) => React.ReactNode;
|
||||
/**
|
||||
* Render the option, use `getOptionLabel` by default.
|
||||
*
|
||||
* @param {object} props The props to apply on the li element.
|
||||
* @param {Value} option The option to render.
|
||||
* @param {object} state The state of each option.
|
||||
* @param {object} ownerState The state of the Autocomplete component.
|
||||
* @returns {ReactNode}
|
||||
*/
|
||||
renderOption?: (
|
||||
props: React.HTMLAttributes<HTMLLIElement> & { key: any },
|
||||
option: Value,
|
||||
state: AutocompleteRenderOptionState,
|
||||
ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>,
|
||||
) => React.ReactNode;
|
||||
/**
|
||||
* Render the selected value.
|
||||
*
|
||||
* @param {Value[]} value The `value` provided to the component.
|
||||
* @param {function} getTagProps A tag props getter.
|
||||
* @param {object} ownerState The state of the Autocomplete component.
|
||||
* @returns {ReactNode}
|
||||
*/
|
||||
renderTags?: (
|
||||
value: Value[],
|
||||
getTagProps: AutocompleteRenderGetTagProps,
|
||||
ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>,
|
||||
) => React.ReactNode;
|
||||
/**
|
||||
* The size of the component.
|
||||
* @default 'medium'
|
||||
*/
|
||||
size?: OverridableStringUnion<'small' | 'medium', AutocompletePropsSizeOverrides>;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Autocomplete API](https://mui.com/material-ui/api/autocomplete/)
|
||||
*/
|
||||
export default function Autocomplete<
|
||||
Value,
|
||||
Multiple extends boolean | undefined = false,
|
||||
DisableClearable extends boolean | undefined = false,
|
||||
FreeSolo extends boolean | undefined = false,
|
||||
ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent'],
|
||||
>(
|
||||
props: AutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>,
|
||||
): React.JSX.Element;
|
||||
1191
node_modules/@mui/material/Autocomplete/Autocomplete.js
generated
vendored
Normal file
1191
node_modules/@mui/material/Autocomplete/Autocomplete.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
58
node_modules/@mui/material/Autocomplete/autocompleteClasses.d.ts
generated
vendored
Normal file
58
node_modules/@mui/material/Autocomplete/autocompleteClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
export interface AutocompleteClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if `fullWidth={true}`. */
|
||||
fullWidth: string;
|
||||
/** State class applied to the root element if the listbox is displayed. */
|
||||
expanded: string;
|
||||
/** State class applied to the root element if focused. */
|
||||
focused: string;
|
||||
/** Styles applied to the option elements if they are keyboard focused. */
|
||||
focusVisible: string;
|
||||
/** Styles applied to the tag elements, for example the chips. */
|
||||
tag: string;
|
||||
/** Styles applied to the tag elements, for example the chips if `size="small"`. */
|
||||
tagSizeSmall: string;
|
||||
/** Styles applied to the tag elements, for example the chips if `size="medium"`. */
|
||||
tagSizeMedium: string;
|
||||
/** Styles applied when the popup icon is rendered. */
|
||||
hasPopupIcon: string;
|
||||
/** Styles applied when the clear icon is rendered. */
|
||||
hasClearIcon: string;
|
||||
/** Styles applied to the Input element. */
|
||||
inputRoot: string;
|
||||
/** Styles applied to the input element. */
|
||||
input: string;
|
||||
/** Styles applied to the input element if the input is focused. */
|
||||
inputFocused: string;
|
||||
/** Styles applied to the endAdornment element. */
|
||||
endAdornment: string;
|
||||
/** Styles applied to the clear indicator. */
|
||||
clearIndicator: string;
|
||||
/** Styles applied to the popup indicator. */
|
||||
popupIndicator: string;
|
||||
/** Styles applied to the popup indicator if the popup is open. */
|
||||
popupIndicatorOpen: string;
|
||||
/** Styles applied to the popper element. */
|
||||
popper: string;
|
||||
/** Styles applied to the popper element if `disablePortal={true}`. */
|
||||
popperDisablePortal: string;
|
||||
/** Styles applied to the Paper component. */
|
||||
paper: string;
|
||||
/** Styles applied to the listbox component. */
|
||||
listbox: string;
|
||||
/** Styles applied to the loading wrapper. */
|
||||
loading: string;
|
||||
/** Styles applied to the no option wrapper. */
|
||||
noOptions: string;
|
||||
/** Styles applied to the option elements. */
|
||||
option: string;
|
||||
/** Styles applied to the group's label elements. */
|
||||
groupLabel: string;
|
||||
/** Styles applied to the group's ul elements. */
|
||||
groupUl: string;
|
||||
}
|
||||
export type AutocompleteClassKey = keyof AutocompleteClasses;
|
||||
export declare function getAutocompleteUtilityClass(slot: string): string;
|
||||
declare const autocompleteClasses: AutocompleteClasses;
|
||||
export default autocompleteClasses;
|
||||
7
node_modules/@mui/material/Autocomplete/autocompleteClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/Autocomplete/autocompleteClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAutocompleteUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAutocomplete', slot);
|
||||
}
|
||||
const autocompleteClasses = generateUtilityClasses('MuiAutocomplete', ['root', 'expanded', 'fullWidth', 'focused', 'focusVisible', 'tag', 'tagSizeSmall', 'tagSizeMedium', 'hasPopupIcon', 'hasClearIcon', 'inputRoot', 'input', 'inputFocused', 'endAdornment', 'clearIndicator', 'popupIndicator', 'popupIndicatorOpen', 'popper', 'popperDisablePortal', 'paper', 'listbox', 'loading', 'noOptions', 'option', 'groupLabel', 'groupUl']);
|
||||
export default autocompleteClasses;
|
||||
5
node_modules/@mui/material/Autocomplete/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/Autocomplete/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './Autocomplete';
|
||||
export * from './Autocomplete';
|
||||
|
||||
export { default as autocompleteClasses } from './autocompleteClasses';
|
||||
export * from './autocompleteClasses';
|
||||
3
node_modules/@mui/material/Autocomplete/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/Autocomplete/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default, createFilterOptions } from "./Autocomplete.js";
|
||||
export { default as autocompleteClasses } from "./autocompleteClasses.js";
|
||||
export * from "./autocompleteClasses.js";
|
||||
6
node_modules/@mui/material/Autocomplete/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/Autocomplete/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/Autocomplete/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
104
node_modules/@mui/material/Avatar/Avatar.d.ts
generated
vendored
Normal file
104
node_modules/@mui/material/Avatar/Avatar.d.ts
generated
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { OverridableStringUnion } from '@mui/types';
|
||||
import { Theme } from '../styles';
|
||||
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
||||
import { AvatarClasses } from './avatarClasses';
|
||||
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
||||
|
||||
export interface AvatarSlots {
|
||||
/**
|
||||
* The component that renders the transition.
|
||||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
||||
* @default Collapse
|
||||
*/
|
||||
img: React.JSXElementConstructor<React.ImgHTMLAttributes<HTMLImageElement>>;
|
||||
}
|
||||
|
||||
export interface AvatarPropsVariantOverrides {}
|
||||
|
||||
export type AvatarSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
||||
AvatarSlots,
|
||||
{
|
||||
img: SlotProps<
|
||||
React.ElementType<React.ImgHTMLAttributes<HTMLImageElement>>,
|
||||
{},
|
||||
AvatarOwnProps
|
||||
>;
|
||||
}
|
||||
>;
|
||||
|
||||
export interface AvatarOwnProps {
|
||||
/**
|
||||
* Used in combination with `src` or `srcSet` to
|
||||
* provide an alt attribute for the rendered `img` element.
|
||||
*/
|
||||
alt?: string;
|
||||
/**
|
||||
* Used to render icon or text elements inside the Avatar if `src` is not set.
|
||||
* This can be an element, or just a string.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AvatarClasses>;
|
||||
/**
|
||||
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.
|
||||
* It can be used to listen for the loading error event.
|
||||
*/
|
||||
imgProps?: React.ImgHTMLAttributes<HTMLImageElement> & {
|
||||
sx?: SxProps<Theme>;
|
||||
};
|
||||
/**
|
||||
* The `sizes` attribute for the `img` element.
|
||||
*/
|
||||
sizes?: string;
|
||||
/**
|
||||
* The `src` attribute for the `img` element.
|
||||
*/
|
||||
src?: string;
|
||||
/**
|
||||
* The `srcSet` attribute for the `img` element.
|
||||
* Use this attribute for responsive image display.
|
||||
*/
|
||||
srcSet?: string;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* The shape of the avatar.
|
||||
* @default 'circular'
|
||||
*/
|
||||
variant?: OverridableStringUnion<'circular' | 'rounded' | 'square', AvatarPropsVariantOverrides>;
|
||||
}
|
||||
|
||||
export interface AvatarTypeMap<
|
||||
AdditionalProps = {},
|
||||
RootComponent extends React.ElementType = 'div',
|
||||
> {
|
||||
props: AdditionalProps & AvatarOwnProps & AvatarSlotsAndSlotProps;
|
||||
defaultComponent: RootComponent;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Avatar](https://mui.com/material-ui/react-avatar/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Avatar API](https://mui.com/material-ui/api/avatar/)
|
||||
*/
|
||||
declare const Avatar: OverridableComponent<AvatarTypeMap>;
|
||||
|
||||
export type AvatarProps<
|
||||
RootComponent extends React.ElementType = AvatarTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<AvatarTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export default Avatar;
|
||||
297
node_modules/@mui/material/Avatar/Avatar.js
generated
vendored
Normal file
297
node_modules/@mui/material/Avatar/Avatar.js
generated
vendored
Normal file
@@ -0,0 +1,297 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import Person from "../internal/svg-icons/Person.js";
|
||||
import { getAvatarUtilityClass } from "./avatarClasses.js";
|
||||
import useSlot from "../utils/useSlot.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes,
|
||||
variant,
|
||||
colorDefault
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', variant, colorDefault && 'colorDefault'],
|
||||
img: ['img'],
|
||||
fallback: ['fallback']
|
||||
};
|
||||
return composeClasses(slots, getAvatarUtilityClass, classes);
|
||||
};
|
||||
const AvatarRoot = styled('div', {
|
||||
name: 'MuiAvatar',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.root, styles[ownerState.variant], ownerState.colorDefault && styles.colorDefault];
|
||||
}
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
position: 'relative',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
flexShrink: 0,
|
||||
width: 40,
|
||||
height: 40,
|
||||
fontFamily: theme.typography.fontFamily,
|
||||
fontSize: theme.typography.pxToRem(20),
|
||||
lineHeight: 1,
|
||||
borderRadius: '50%',
|
||||
overflow: 'hidden',
|
||||
userSelect: 'none',
|
||||
variants: [{
|
||||
props: {
|
||||
variant: 'rounded'
|
||||
},
|
||||
style: {
|
||||
borderRadius: (theme.vars || theme).shape.borderRadius
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
variant: 'square'
|
||||
},
|
||||
style: {
|
||||
borderRadius: 0
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
colorDefault: true
|
||||
},
|
||||
style: {
|
||||
color: (theme.vars || theme).palette.background.default,
|
||||
...(theme.vars ? {
|
||||
backgroundColor: theme.vars.palette.Avatar.defaultBg
|
||||
} : {
|
||||
backgroundColor: theme.palette.grey[400],
|
||||
...theme.applyStyles('dark', {
|
||||
backgroundColor: theme.palette.grey[600]
|
||||
})
|
||||
})
|
||||
}
|
||||
}]
|
||||
})));
|
||||
const AvatarImg = styled('img', {
|
||||
name: 'MuiAvatar',
|
||||
slot: 'Img',
|
||||
overridesResolver: (props, styles) => styles.img
|
||||
})({
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
textAlign: 'center',
|
||||
// Handle non-square image.
|
||||
objectFit: 'cover',
|
||||
// Hide alt text.
|
||||
color: 'transparent',
|
||||
// Hide the image broken icon, only works on Chrome.
|
||||
textIndent: 10000
|
||||
});
|
||||
const AvatarFallback = styled(Person, {
|
||||
name: 'MuiAvatar',
|
||||
slot: 'Fallback',
|
||||
overridesResolver: (props, styles) => styles.fallback
|
||||
})({
|
||||
width: '75%',
|
||||
height: '75%'
|
||||
});
|
||||
function useLoaded({
|
||||
crossOrigin,
|
||||
referrerPolicy,
|
||||
src,
|
||||
srcSet
|
||||
}) {
|
||||
const [loaded, setLoaded] = React.useState(false);
|
||||
React.useEffect(() => {
|
||||
if (!src && !srcSet) {
|
||||
return undefined;
|
||||
}
|
||||
setLoaded(false);
|
||||
let active = true;
|
||||
const image = new Image();
|
||||
image.onload = () => {
|
||||
if (!active) {
|
||||
return;
|
||||
}
|
||||
setLoaded('loaded');
|
||||
};
|
||||
image.onerror = () => {
|
||||
if (!active) {
|
||||
return;
|
||||
}
|
||||
setLoaded('error');
|
||||
};
|
||||
image.crossOrigin = crossOrigin;
|
||||
image.referrerPolicy = referrerPolicy;
|
||||
image.src = src;
|
||||
if (srcSet) {
|
||||
image.srcset = srcSet;
|
||||
}
|
||||
return () => {
|
||||
active = false;
|
||||
};
|
||||
}, [crossOrigin, referrerPolicy, src, srcSet]);
|
||||
return loaded;
|
||||
}
|
||||
const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAvatar'
|
||||
});
|
||||
const {
|
||||
alt,
|
||||
children: childrenProp,
|
||||
className,
|
||||
component = 'div',
|
||||
slots = {},
|
||||
slotProps = {},
|
||||
imgProps,
|
||||
sizes,
|
||||
src,
|
||||
srcSet,
|
||||
variant = 'circular',
|
||||
...other
|
||||
} = props;
|
||||
let children = null;
|
||||
|
||||
// Use a hook instead of onError on the img element to support server-side rendering.
|
||||
const loaded = useLoaded({
|
||||
...imgProps,
|
||||
src,
|
||||
srcSet
|
||||
});
|
||||
const hasImg = src || srcSet;
|
||||
const hasImgNotFailing = hasImg && loaded !== 'error';
|
||||
const ownerState = {
|
||||
...props,
|
||||
colorDefault: !hasImgNotFailing,
|
||||
component,
|
||||
variant
|
||||
};
|
||||
// This issue explains why this is required: https://github.com/mui/material-ui/issues/42184
|
||||
delete ownerState.ownerState;
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
const [ImgSlot, imgSlotProps] = useSlot('img', {
|
||||
className: classes.img,
|
||||
elementType: AvatarImg,
|
||||
externalForwardedProps: {
|
||||
slots,
|
||||
slotProps: {
|
||||
img: {
|
||||
...imgProps,
|
||||
...slotProps.img
|
||||
}
|
||||
}
|
||||
},
|
||||
additionalProps: {
|
||||
alt,
|
||||
src,
|
||||
srcSet,
|
||||
sizes
|
||||
},
|
||||
ownerState
|
||||
});
|
||||
if (hasImgNotFailing) {
|
||||
children = /*#__PURE__*/_jsx(ImgSlot, {
|
||||
...imgSlotProps
|
||||
});
|
||||
// We only render valid children, non valid children are rendered with a fallback
|
||||
// We consider that invalid children are all falsy values, except 0, which is valid.
|
||||
} else if (!!childrenProp || childrenProp === 0) {
|
||||
children = childrenProp;
|
||||
} else if (hasImg && alt) {
|
||||
children = alt[0];
|
||||
} else {
|
||||
children = /*#__PURE__*/_jsx(AvatarFallback, {
|
||||
ownerState: ownerState,
|
||||
className: classes.fallback
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/_jsx(AvatarRoot, {
|
||||
as: component,
|
||||
className: clsx(classes.root, className),
|
||||
ref: ref,
|
||||
...other,
|
||||
ownerState: ownerState,
|
||||
children: children
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Avatar.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`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* Used in combination with `src` or `srcSet` to
|
||||
* provide an alt attribute for the rendered `img` element.
|
||||
*/
|
||||
alt: PropTypes.string,
|
||||
/**
|
||||
* Used to render icon or text elements inside the Avatar if `src` is not set.
|
||||
* This can be an element, or just a string.
|
||||
*/
|
||||
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,
|
||||
/**
|
||||
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.
|
||||
* It can be used to listen for the loading error event.
|
||||
*/
|
||||
imgProps: PropTypes.object,
|
||||
/**
|
||||
* The `sizes` attribute for the `img` element.
|
||||
*/
|
||||
sizes: PropTypes.string,
|
||||
/**
|
||||
* The props used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: PropTypes.shape({
|
||||
img: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
||||
}),
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slots: PropTypes.shape({
|
||||
img: PropTypes.elementType
|
||||
}),
|
||||
/**
|
||||
* The `src` attribute for the `img` element.
|
||||
*/
|
||||
src: PropTypes.string,
|
||||
/**
|
||||
* The `srcSet` attribute for the `img` element.
|
||||
* Use this attribute for responsive image display.
|
||||
*/
|
||||
srcSet: PropTypes.string,
|
||||
/**
|
||||
* 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 shape of the avatar.
|
||||
* @default 'circular'
|
||||
*/
|
||||
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['circular', 'rounded', 'square']), PropTypes.string])
|
||||
} : void 0;
|
||||
export default Avatar;
|
||||
20
node_modules/@mui/material/Avatar/avatarClasses.d.ts
generated
vendored
Normal file
20
node_modules/@mui/material/Avatar/avatarClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
export interface AvatarClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if not `src` or `srcSet`. */
|
||||
colorDefault: string;
|
||||
/** Styles applied to the root element if `variant="circular"`. */
|
||||
circular: string;
|
||||
/** Styles applied to the root element if `variant="rounded"`. */
|
||||
rounded: string;
|
||||
/** Styles applied to the root element if `variant="square"`. */
|
||||
square: string;
|
||||
/** Styles applied to the img element if either `src` or `srcSet` is defined. */
|
||||
img: string;
|
||||
/** Styles applied to the fallback icon */
|
||||
fallback: string;
|
||||
}
|
||||
export type AvatarClassKey = keyof AvatarClasses;
|
||||
export declare function getAvatarUtilityClass(slot: string): string;
|
||||
declare const avatarClasses: AvatarClasses;
|
||||
export default avatarClasses;
|
||||
7
node_modules/@mui/material/Avatar/avatarClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/Avatar/avatarClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAvatarUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAvatar', slot);
|
||||
}
|
||||
const avatarClasses = generateUtilityClasses('MuiAvatar', ['root', 'colorDefault', 'circular', 'rounded', 'square', 'img', 'fallback']);
|
||||
export default avatarClasses;
|
||||
5
node_modules/@mui/material/Avatar/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/Avatar/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './Avatar';
|
||||
export * from './Avatar';
|
||||
|
||||
export { default as avatarClasses } from './avatarClasses';
|
||||
export * from './avatarClasses';
|
||||
3
node_modules/@mui/material/Avatar/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/Avatar/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./Avatar.js";
|
||||
export { default as avatarClasses } from "./avatarClasses.js";
|
||||
export * from "./avatarClasses.js";
|
||||
6
node_modules/@mui/material/Avatar/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/Avatar/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/Avatar/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
128
node_modules/@mui/material/AvatarGroup/AvatarGroup.d.ts
generated
vendored
Normal file
128
node_modules/@mui/material/AvatarGroup/AvatarGroup.d.ts
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
import * as React from 'react';
|
||||
import {
|
||||
OverridableComponent,
|
||||
OverridableStringUnion,
|
||||
OverrideProps,
|
||||
PartiallyRequired,
|
||||
} from '@mui/types';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { Theme } from '@mui/material';
|
||||
import { AvatarGroupClasses } from './avatarGroupClasses';
|
||||
import Avatar from '../Avatar';
|
||||
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
||||
|
||||
export interface AvatarGroupPropsVariantOverrides {}
|
||||
|
||||
export interface AvatarGroupComponentsPropsOverrides {}
|
||||
|
||||
export interface AvatarGroupSlots {
|
||||
surplus: React.ElementType;
|
||||
}
|
||||
|
||||
export type AvatarGroupSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
||||
AvatarGroupSlots,
|
||||
{
|
||||
/**
|
||||
* @deprecated use `slotProps.surplus` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
* */
|
||||
additionalAvatar: React.ComponentPropsWithRef<typeof Avatar> &
|
||||
AvatarGroupComponentsPropsOverrides;
|
||||
surplus: SlotProps<
|
||||
React.ElementType<React.ComponentPropsWithRef<typeof Avatar>>,
|
||||
AvatarGroupComponentsPropsOverrides,
|
||||
AvatarGroupOwnerState
|
||||
>;
|
||||
}
|
||||
>;
|
||||
export interface AvatarGroupOwnProps extends AvatarGroupSlotsAndSlotProps {
|
||||
/**
|
||||
* The avatars to stack.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<AvatarGroupClasses>;
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component?: React.ElementType;
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* This prop is an alias for the `slotProps` prop.
|
||||
*
|
||||
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
componentsProps?: {
|
||||
additionalAvatar?: React.ComponentPropsWithRef<typeof Avatar> &
|
||||
AvatarGroupComponentsPropsOverrides;
|
||||
};
|
||||
/**
|
||||
* Max avatars to show before +x.
|
||||
* @default 5
|
||||
*/
|
||||
max?: number;
|
||||
/**
|
||||
* custom renderer of extraAvatars
|
||||
* @param {number} surplus number of extra avatars
|
||||
* @returns {React.ReactNode} custom element to display
|
||||
*/
|
||||
renderSurplus?: (surplus: number) => React.ReactNode;
|
||||
/**
|
||||
* Spacing between avatars.
|
||||
* @default 'medium'
|
||||
*/
|
||||
spacing?: 'small' | 'medium' | number;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* The total number of avatars. Used for calculating the number of extra avatars.
|
||||
* @default children.length
|
||||
*/
|
||||
total?: number;
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'circular'
|
||||
*/
|
||||
variant?: OverridableStringUnion<
|
||||
'circular' | 'rounded' | 'square',
|
||||
AvatarGroupPropsVariantOverrides
|
||||
>;
|
||||
}
|
||||
|
||||
export interface AvatarGroupTypeMap<
|
||||
AdditionalProps = {},
|
||||
RootComponent extends React.ElementType = 'div',
|
||||
> {
|
||||
props: AdditionalProps & AvatarGroupOwnProps;
|
||||
defaultComponent: RootComponent;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Avatar](https://mui.com/material-ui/react-avatar/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [AvatarGroup API](https://mui.com/material-ui/api/avatar-group/)
|
||||
*/
|
||||
declare const AvatarGroup: OverridableComponent<AvatarGroupTypeMap>;
|
||||
|
||||
export type AvatarGroupProps<
|
||||
RootComponent extends React.ElementType = AvatarGroupTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<AvatarGroupTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export interface AvatarGroupOwnerState
|
||||
extends PartiallyRequired<AvatarGroupProps, 'max' | 'spacing' | 'component' | 'variant'> {}
|
||||
|
||||
export default AvatarGroup;
|
||||
222
node_modules/@mui/material/AvatarGroup/AvatarGroup.js
generated
vendored
Normal file
222
node_modules/@mui/material/AvatarGroup/AvatarGroup.js
generated
vendored
Normal file
@@ -0,0 +1,222 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { isFragment } from 'react-is';
|
||||
import clsx from 'clsx';
|
||||
import chainPropTypes from '@mui/utils/chainPropTypes';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import Avatar, { avatarClasses } from "../Avatar/index.js";
|
||||
import avatarGroupClasses, { getAvatarGroupUtilityClass } from "./avatarGroupClasses.js";
|
||||
import useSlot from "../utils/useSlot.js";
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
const SPACINGS = {
|
||||
small: -16,
|
||||
medium: -8
|
||||
};
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root'],
|
||||
avatar: ['avatar']
|
||||
};
|
||||
return composeClasses(slots, getAvatarGroupUtilityClass, classes);
|
||||
};
|
||||
const AvatarGroupRoot = styled('div', {
|
||||
name: 'MuiAvatarGroup',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => ({
|
||||
[`& .${avatarGroupClasses.avatar}`]: styles.avatar,
|
||||
...styles.root
|
||||
})
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
display: 'flex',
|
||||
flexDirection: 'row-reverse',
|
||||
[`& .${avatarClasses.root}`]: {
|
||||
border: `2px solid ${(theme.vars || theme).palette.background.default}`,
|
||||
boxSizing: 'content-box',
|
||||
marginLeft: 'var(--AvatarGroup-spacing, -8px)',
|
||||
'&:last-child': {
|
||||
marginLeft: 0
|
||||
}
|
||||
}
|
||||
})));
|
||||
const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiAvatarGroup'
|
||||
});
|
||||
const {
|
||||
children: childrenProp,
|
||||
className,
|
||||
component = 'div',
|
||||
componentsProps,
|
||||
max = 5,
|
||||
renderSurplus,
|
||||
slotProps = {},
|
||||
slots = {},
|
||||
spacing = 'medium',
|
||||
total,
|
||||
variant = 'circular',
|
||||
...other
|
||||
} = props;
|
||||
let clampedMax = max < 2 ? 2 : max;
|
||||
const ownerState = {
|
||||
...props,
|
||||
max,
|
||||
spacing,
|
||||
component,
|
||||
variant
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
const children = React.Children.toArray(childrenProp).filter(child => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (isFragment(child)) {
|
||||
console.error(["MUI: The AvatarGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
||||
}
|
||||
}
|
||||
return /*#__PURE__*/React.isValidElement(child);
|
||||
});
|
||||
const totalAvatars = total || children.length;
|
||||
if (totalAvatars === clampedMax) {
|
||||
clampedMax += 1;
|
||||
}
|
||||
clampedMax = Math.min(totalAvatars + 1, clampedMax);
|
||||
const maxAvatars = Math.min(children.length, clampedMax - 1);
|
||||
const extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
|
||||
const extraAvatarsElement = renderSurplus ? renderSurplus(extraAvatars) : `+${extraAvatars}`;
|
||||
const marginValue = ownerState.spacing && SPACINGS[ownerState.spacing] !== undefined ? SPACINGS[ownerState.spacing] : -ownerState.spacing || -8;
|
||||
const externalForwardedProps = {
|
||||
slots,
|
||||
slotProps: {
|
||||
surplus: slotProps.additionalAvatar ?? componentsProps?.additionalAvatar,
|
||||
...componentsProps,
|
||||
...slotProps
|
||||
}
|
||||
};
|
||||
const [SurplusSlot, surplusProps] = useSlot('surplus', {
|
||||
elementType: Avatar,
|
||||
externalForwardedProps,
|
||||
className: classes.avatar,
|
||||
ownerState,
|
||||
additionalProps: {
|
||||
variant,
|
||||
style: {
|
||||
'--AvatarRoot-spacing': marginValue ? `${marginValue}px` : undefined,
|
||||
...other.style
|
||||
}
|
||||
}
|
||||
});
|
||||
return /*#__PURE__*/_jsxs(AvatarGroupRoot, {
|
||||
as: component,
|
||||
ownerState: ownerState,
|
||||
className: clsx(classes.root, className),
|
||||
ref: ref,
|
||||
...other,
|
||||
children: [extraAvatars ? /*#__PURE__*/_jsx(SurplusSlot, {
|
||||
...surplusProps,
|
||||
children: extraAvatarsElement
|
||||
}) : null, children.slice(0, maxAvatars).reverse().map(child => {
|
||||
return /*#__PURE__*/React.cloneElement(child, {
|
||||
className: clsx(child.props.className, classes.avatar),
|
||||
variant: child.props.variant || variant
|
||||
});
|
||||
})]
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? AvatarGroup.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 avatars to stack.
|
||||
*/
|
||||
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,
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* This prop is an alias for the `slotProps` prop.
|
||||
*
|
||||
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
componentsProps: PropTypes.shape({
|
||||
additionalAvatar: PropTypes.object
|
||||
}),
|
||||
/**
|
||||
* Max avatars to show before +x.
|
||||
* @default 5
|
||||
*/
|
||||
max: chainPropTypes(PropTypes.number, props => {
|
||||
if (props.max < 2) {
|
||||
return new Error(['MUI: The prop `max` should be equal to 2 or above.', 'A value below is clamped to 2.'].join('\n'));
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
/**
|
||||
* custom renderer of extraAvatars
|
||||
* @param {number} surplus number of extra avatars
|
||||
* @returns {React.ReactNode} custom element to display
|
||||
*/
|
||||
renderSurplus: PropTypes.func,
|
||||
/**
|
||||
* The props used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: PropTypes.shape({
|
||||
additionalAvatar: PropTypes.object,
|
||||
surplus: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
||||
}),
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slots: PropTypes.shape({
|
||||
surplus: PropTypes.elementType
|
||||
}),
|
||||
/**
|
||||
* Spacing between avatars.
|
||||
* @default 'medium'
|
||||
*/
|
||||
spacing: PropTypes.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.number]),
|
||||
/**
|
||||
* @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 total number of avatars. Used for calculating the number of extra avatars.
|
||||
* @default children.length
|
||||
*/
|
||||
total: PropTypes.number,
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'circular'
|
||||
*/
|
||||
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['circular', 'rounded', 'square']), PropTypes.string])
|
||||
} : void 0;
|
||||
export default AvatarGroup;
|
||||
10
node_modules/@mui/material/AvatarGroup/avatarGroupClasses.d.ts
generated
vendored
Normal file
10
node_modules/@mui/material/AvatarGroup/avatarGroupClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export interface AvatarGroupClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the avatar elements. */
|
||||
avatar: string;
|
||||
}
|
||||
export type AvatarGroupClassKey = keyof AvatarGroupClasses;
|
||||
export declare function getAvatarGroupUtilityClass(slot: string): string;
|
||||
declare const avatarGroupClasses: AvatarGroupClasses;
|
||||
export default avatarGroupClasses;
|
||||
7
node_modules/@mui/material/AvatarGroup/avatarGroupClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/AvatarGroup/avatarGroupClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getAvatarGroupUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiAvatarGroup', slot);
|
||||
}
|
||||
const avatarGroupClasses = generateUtilityClasses('MuiAvatarGroup', ['root', 'avatar']);
|
||||
export default avatarGroupClasses;
|
||||
4
node_modules/@mui/material/AvatarGroup/index.d.ts
generated
vendored
Normal file
4
node_modules/@mui/material/AvatarGroup/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export { default } from './AvatarGroup';
|
||||
export * from './AvatarGroup';
|
||||
export { default as avatarGroupClasses } from './avatarGroupClasses';
|
||||
export * from './avatarGroupClasses';
|
||||
3
node_modules/@mui/material/AvatarGroup/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/AvatarGroup/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./AvatarGroup.js";
|
||||
export { default as avatarGroupClasses } from "./avatarGroupClasses.js";
|
||||
export * from "./avatarGroupClasses.js";
|
||||
6
node_modules/@mui/material/AvatarGroup/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/AvatarGroup/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/AvatarGroup/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
142
node_modules/@mui/material/Backdrop/Backdrop.d.ts
generated
vendored
Normal file
142
node_modules/@mui/material/Backdrop/Backdrop.d.ts
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { FadeProps } from '../Fade';
|
||||
import { TransitionProps } from '../transitions/transition';
|
||||
import { Theme } from '../styles';
|
||||
import { BackdropClasses } from './backdropClasses';
|
||||
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
||||
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
||||
|
||||
export interface BackdropSlots {
|
||||
/**
|
||||
* The component that renders the root.
|
||||
* @default 'div'
|
||||
*/
|
||||
root: React.ElementType;
|
||||
/**
|
||||
* The component that renders the transition.
|
||||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
||||
* @default Fade
|
||||
*/
|
||||
transition: React.JSXElementConstructor<
|
||||
TransitionProps & { children: React.ReactElement<unknown, any> }
|
||||
>;
|
||||
}
|
||||
export interface BackdropComponentsPropsOverrides {}
|
||||
|
||||
export interface BackdropTransitionSlotPropsOverrides {}
|
||||
|
||||
export type BackdropSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
||||
BackdropSlots,
|
||||
{
|
||||
root: SlotProps<
|
||||
React.ElementType<HTMLDivElement>,
|
||||
BackdropComponentsPropsOverrides,
|
||||
BackdropOwnerState
|
||||
>;
|
||||
transition: SlotProps<
|
||||
React.JSXElementConstructor<TransitionProps>,
|
||||
BackdropTransitionSlotPropsOverrides,
|
||||
BackdropOwnerState
|
||||
>;
|
||||
}
|
||||
>;
|
||||
|
||||
export interface BackdropOwnProps
|
||||
extends Partial<Omit<FadeProps, 'children'>>,
|
||||
BackdropSlotsAndSlotProps {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
*
|
||||
* @deprecated Use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
components?: {
|
||||
Root?: React.ElementType;
|
||||
};
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
componentsProps?: {
|
||||
root?: React.HTMLAttributes<HTMLDivElement> & BackdropComponentsPropsOverrides;
|
||||
};
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<BackdropClasses>;
|
||||
/**
|
||||
* If `true`, the backdrop is invisible.
|
||||
* It can be used when rendering a popover or a custom select component.
|
||||
* @default false
|
||||
*/
|
||||
invisible?: boolean;
|
||||
/**
|
||||
* If `true`, the component is shown.
|
||||
*/
|
||||
open: boolean;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* The duration for the transition, in milliseconds.
|
||||
* You may specify a single timeout for all transitions, or individually with an object.
|
||||
*/
|
||||
transitionDuration?: TransitionProps['timeout'];
|
||||
/**
|
||||
* The component used for the transition.
|
||||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
||||
* @default Fade
|
||||
*/
|
||||
TransitionComponent?: React.JSXElementConstructor<
|
||||
TransitionProps & {
|
||||
children: React.ReactElement<unknown, any>;
|
||||
}
|
||||
>;
|
||||
}
|
||||
|
||||
export interface BackdropTypeMap<
|
||||
AdditionalProps = {},
|
||||
RootComponent extends React.ElementType = 'div',
|
||||
> {
|
||||
props: AdditionalProps & BackdropOwnProps;
|
||||
defaultComponent: RootComponent;
|
||||
}
|
||||
|
||||
type BackdropRootProps = NonNullable<BackdropTypeMap['props']['componentsProps']>['root'];
|
||||
|
||||
export declare const BackdropRoot: React.FC<BackdropRootProps>;
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Backdrop](https://mui.com/material-ui/react-backdrop/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Backdrop API](https://mui.com/material-ui/api/backdrop/)
|
||||
* - inherits [Fade API](https://mui.com/material-ui/api/fade/)
|
||||
*/
|
||||
declare const Backdrop: OverridableComponent<BackdropTypeMap>;
|
||||
|
||||
export type BackdropProps<
|
||||
RootComponent extends React.ElementType = BackdropTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<BackdropTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export interface BackdropOwnerState extends BackdropProps {}
|
||||
|
||||
export default Backdrop;
|
||||
205
node_modules/@mui/material/Backdrop/Backdrop.js
generated
vendored
Normal file
205
node_modules/@mui/material/Backdrop/Backdrop.js
generated
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import useSlot from "../utils/useSlot.js";
|
||||
import Fade from "../Fade/index.js";
|
||||
import { getBackdropUtilityClass } from "./backdropClasses.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes,
|
||||
invisible
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', invisible && 'invisible']
|
||||
};
|
||||
return composeClasses(slots, getBackdropUtilityClass, classes);
|
||||
};
|
||||
const BackdropRoot = styled('div', {
|
||||
name: 'MuiBackdrop',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.root, ownerState.invisible && styles.invisible];
|
||||
}
|
||||
})({
|
||||
position: 'fixed',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
top: 0,
|
||||
left: 0,
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
||||
WebkitTapHighlightColor: 'transparent',
|
||||
variants: [{
|
||||
props: {
|
||||
invisible: true
|
||||
},
|
||||
style: {
|
||||
backgroundColor: 'transparent'
|
||||
}
|
||||
}]
|
||||
});
|
||||
const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiBackdrop'
|
||||
});
|
||||
const {
|
||||
children,
|
||||
className,
|
||||
component = 'div',
|
||||
invisible = false,
|
||||
open,
|
||||
components = {},
|
||||
componentsProps = {},
|
||||
slotProps = {},
|
||||
slots = {},
|
||||
TransitionComponent: TransitionComponentProp,
|
||||
transitionDuration,
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = {
|
||||
...props,
|
||||
component,
|
||||
invisible
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
const backwardCompatibleSlots = {
|
||||
transition: TransitionComponentProp,
|
||||
root: components.Root,
|
||||
...slots
|
||||
};
|
||||
const backwardCompatibleSlotProps = {
|
||||
...componentsProps,
|
||||
...slotProps
|
||||
};
|
||||
const externalForwardedProps = {
|
||||
slots: backwardCompatibleSlots,
|
||||
slotProps: backwardCompatibleSlotProps
|
||||
};
|
||||
const [RootSlot, rootProps] = useSlot('root', {
|
||||
elementType: BackdropRoot,
|
||||
externalForwardedProps,
|
||||
className: clsx(classes.root, className),
|
||||
ownerState
|
||||
});
|
||||
const [TransitionSlot, transitionProps] = useSlot('transition', {
|
||||
elementType: Fade,
|
||||
externalForwardedProps,
|
||||
ownerState
|
||||
});
|
||||
delete transitionProps.ownerState;
|
||||
return /*#__PURE__*/_jsx(TransitionSlot, {
|
||||
in: open,
|
||||
timeout: transitionDuration,
|
||||
...other,
|
||||
...transitionProps,
|
||||
children: /*#__PURE__*/_jsx(RootSlot, {
|
||||
"aria-hidden": true,
|
||||
...rootProps,
|
||||
classes: classes,
|
||||
ref: ref,
|
||||
children: children
|
||||
})
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Backdrop.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 content of the component.
|
||||
*/
|
||||
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,
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
*
|
||||
* @deprecated Use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
components: PropTypes.shape({
|
||||
Root: PropTypes.elementType
|
||||
}),
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
componentsProps: PropTypes.shape({
|
||||
root: PropTypes.object
|
||||
}),
|
||||
/**
|
||||
* If `true`, the backdrop is invisible.
|
||||
* It can be used when rendering a popover or a custom select component.
|
||||
* @default false
|
||||
*/
|
||||
invisible: PropTypes.bool,
|
||||
/**
|
||||
* If `true`, the component is shown.
|
||||
*/
|
||||
open: PropTypes.bool.isRequired,
|
||||
/**
|
||||
* The props used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: PropTypes.shape({
|
||||
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
||||
transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
||||
}),
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
* @default {}
|
||||
*/
|
||||
slots: PropTypes.shape({
|
||||
root: PropTypes.elementType,
|
||||
transition: PropTypes.elementType
|
||||
}),
|
||||
/**
|
||||
* 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 component used for the transition.
|
||||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
||||
* @default Fade
|
||||
*/
|
||||
TransitionComponent: PropTypes.elementType,
|
||||
/**
|
||||
* The duration for the transition, in milliseconds.
|
||||
* You may specify a single timeout for all transitions, or individually with an object.
|
||||
*/
|
||||
transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
||||
appear: PropTypes.number,
|
||||
enter: PropTypes.number,
|
||||
exit: PropTypes.number
|
||||
})])
|
||||
} : void 0;
|
||||
export default Backdrop;
|
||||
10
node_modules/@mui/material/Backdrop/backdropClasses.d.ts
generated
vendored
Normal file
10
node_modules/@mui/material/Backdrop/backdropClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export interface BackdropClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if `invisible={true}`. */
|
||||
invisible: string;
|
||||
}
|
||||
export type BackdropClassKey = keyof BackdropClasses;
|
||||
export declare function getBackdropUtilityClass(slot: string): string;
|
||||
declare const backdropClasses: BackdropClasses;
|
||||
export default backdropClasses;
|
||||
7
node_modules/@mui/material/Backdrop/backdropClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/Backdrop/backdropClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getBackdropUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiBackdrop', slot);
|
||||
}
|
||||
const backdropClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);
|
||||
export default backdropClasses;
|
||||
5
node_modules/@mui/material/Backdrop/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/Backdrop/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './Backdrop';
|
||||
export * from './Backdrop';
|
||||
|
||||
export { default as backdropClasses } from './backdropClasses';
|
||||
export * from './backdropClasses';
|
||||
3
node_modules/@mui/material/Backdrop/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/Backdrop/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./Backdrop.js";
|
||||
export { default as backdropClasses } from "./backdropClasses.js";
|
||||
export * from "./backdropClasses.js";
|
||||
6
node_modules/@mui/material/Backdrop/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/Backdrop/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/Backdrop/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
181
node_modules/@mui/material/Badge/Badge.d.ts
generated
vendored
Normal file
181
node_modules/@mui/material/Badge/Badge.d.ts
generated
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { OverridableStringUnion, Simplify } from '@mui/types';
|
||||
import { SlotComponentProps } from '../utils/types';
|
||||
import { Theme } from '../styles';
|
||||
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
||||
import { BadgeClasses } from './badgeClasses';
|
||||
|
||||
export interface BadgePropsVariantOverrides {}
|
||||
export interface BadgePropsColorOverrides {}
|
||||
export interface BadgeRootSlotPropsOverrides {}
|
||||
export interface BadgeBadgeSlotPropsOverrides {}
|
||||
|
||||
export type BadgeOwnerState = Simplify<
|
||||
BadgeOwnProps & {
|
||||
badgeContent: React.ReactNode;
|
||||
invisible: boolean;
|
||||
max: number;
|
||||
displayValue: React.ReactNode;
|
||||
showZero: boolean;
|
||||
anchorOrigin: BadgeOrigin;
|
||||
color: OverridableStringUnion<
|
||||
'primary' | 'secondary' | 'default' | 'error' | 'info' | 'success' | 'warning',
|
||||
BadgePropsColorOverrides
|
||||
>;
|
||||
overlap: 'rectangular' | 'circular';
|
||||
variant: OverridableStringUnion<'standard' | 'dot', BadgePropsVariantOverrides>;
|
||||
}
|
||||
>;
|
||||
|
||||
export interface BadgeOrigin {
|
||||
vertical: 'top' | 'bottom';
|
||||
horizontal: 'left' | 'right';
|
||||
}
|
||||
|
||||
export interface BadgeOwnProps {
|
||||
/**
|
||||
* The anchor of the badge.
|
||||
* @default {
|
||||
* vertical: 'top',
|
||||
* horizontal: 'right',
|
||||
* }
|
||||
*/
|
||||
anchorOrigin?: BadgeOrigin;
|
||||
/**
|
||||
* The content rendered within the badge.
|
||||
*/
|
||||
badgeContent?: React.ReactNode;
|
||||
/**
|
||||
* The badge will be added relative to this node.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<BadgeClasses>;
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className?: string;
|
||||
/**
|
||||
* The color of the component.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
* @default 'default'
|
||||
*/
|
||||
color?: OverridableStringUnion<
|
||||
'primary' | 'secondary' | 'default' | 'error' | 'info' | 'success' | 'warning',
|
||||
BadgePropsColorOverrides
|
||||
>;
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
componentsProps?: BadgeOwnProps['slotProps'];
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
*
|
||||
* @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
components?: {
|
||||
Root?: React.ElementType;
|
||||
Badge?: React.ElementType;
|
||||
};
|
||||
/**
|
||||
* If `true`, the badge is invisible.
|
||||
* @default false
|
||||
*/
|
||||
invisible?: boolean;
|
||||
/**
|
||||
* Max count to show.
|
||||
* @default 99
|
||||
*/
|
||||
max?: number;
|
||||
/**
|
||||
* Wrapped shape the badge should overlap.
|
||||
* @default 'rectangular'
|
||||
*/
|
||||
overlap?: 'rectangular' | 'circular';
|
||||
/**
|
||||
* The props used for each slot inside the Badge.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps?: {
|
||||
root?: SlotComponentProps<'span', BadgeRootSlotPropsOverrides, BadgeOwnerState>;
|
||||
badge?: SlotComponentProps<'span', BadgeBadgeSlotPropsOverrides, BadgeOwnerState>;
|
||||
};
|
||||
/**
|
||||
* The components used for each slot inside the Badge.
|
||||
* Either a string to use a HTML element or a component.
|
||||
* @default {}
|
||||
*/
|
||||
slots?: {
|
||||
/**
|
||||
* The component that renders the root.
|
||||
* @default 'span'
|
||||
*/
|
||||
root?: React.ElementType;
|
||||
/**
|
||||
* The component that renders the badge.
|
||||
* @default 'span'
|
||||
*/
|
||||
badge?: React.ElementType;
|
||||
};
|
||||
/**
|
||||
* Controls whether the badge is hidden when `badgeContent` is zero.
|
||||
* @default false
|
||||
*/
|
||||
showZero?: boolean;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'standard'
|
||||
*/
|
||||
variant?: OverridableStringUnion<'standard' | 'dot', BadgePropsVariantOverrides>;
|
||||
}
|
||||
|
||||
export interface BadgeTypeMap<
|
||||
RootComponent extends React.ElementType = 'span',
|
||||
AdditionalProps = {},
|
||||
> {
|
||||
props: AdditionalProps & BadgeOwnProps;
|
||||
defaultComponent: RootComponent;
|
||||
}
|
||||
|
||||
type BadgeRootProps = NonNullable<BadgeTypeMap['props']['slotProps']>['root'];
|
||||
type BadgeBadgeProps = NonNullable<BadgeTypeMap['props']['slotProps']>['badge'];
|
||||
|
||||
export declare const BadgeRoot: React.FC<BadgeRootProps>;
|
||||
export declare const BadgeMark: React.FC<BadgeBadgeProps>;
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Avatar](https://mui.com/material-ui/react-avatar/)
|
||||
* - [Badge](https://mui.com/material-ui/react-badge/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Badge API](https://mui.com/material-ui/api/badge/)
|
||||
*/
|
||||
declare const Badge: OverridableComponent<BadgeTypeMap>;
|
||||
|
||||
export type BadgeProps<
|
||||
RootComponent extends React.ElementType = BadgeTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<BadgeTypeMap<RootComponent, AdditionalProps>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export default Badge;
|
||||
424
node_modules/@mui/material/Badge/Badge.js
generated
vendored
Normal file
424
node_modules/@mui/material/Badge/Badge.js
generated
vendored
Normal file
@@ -0,0 +1,424 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import usePreviousProps from '@mui/utils/usePreviousProps';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import useSlotProps from '@mui/utils/useSlotProps';
|
||||
import useBadge from "./useBadge.js";
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import capitalize from "../utils/capitalize.js";
|
||||
import badgeClasses, { getBadgeUtilityClass } from "./badgeClasses.js";
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
const RADIUS_STANDARD = 10;
|
||||
const RADIUS_DOT = 4;
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
color,
|
||||
anchorOrigin,
|
||||
invisible,
|
||||
overlap,
|
||||
variant,
|
||||
classes = {}
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root'],
|
||||
badge: ['badge', variant, invisible && 'invisible', `anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}`, `anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}${capitalize(overlap)}`, `overlap${capitalize(overlap)}`, color !== 'default' && `color${capitalize(color)}`]
|
||||
};
|
||||
return composeClasses(slots, getBadgeUtilityClass, classes);
|
||||
};
|
||||
const BadgeRoot = styled('span', {
|
||||
name: 'MuiBadge',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => styles.root
|
||||
})({
|
||||
position: 'relative',
|
||||
display: 'inline-flex',
|
||||
// For correct alignment with the text.
|
||||
verticalAlign: 'middle',
|
||||
flexShrink: 0
|
||||
});
|
||||
const BadgeBadge = styled('span', {
|
||||
name: 'MuiBadge',
|
||||
slot: 'Badge',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.badge, styles[ownerState.variant], styles[`anchorOrigin${capitalize(ownerState.anchorOrigin.vertical)}${capitalize(ownerState.anchorOrigin.horizontal)}${capitalize(ownerState.overlap)}`], ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], ownerState.invisible && styles.invisible];
|
||||
}
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'center',
|
||||
alignContent: 'center',
|
||||
alignItems: 'center',
|
||||
position: 'absolute',
|
||||
boxSizing: 'border-box',
|
||||
fontFamily: theme.typography.fontFamily,
|
||||
fontWeight: theme.typography.fontWeightMedium,
|
||||
fontSize: theme.typography.pxToRem(12),
|
||||
minWidth: RADIUS_STANDARD * 2,
|
||||
lineHeight: 1,
|
||||
padding: '0 6px',
|
||||
height: RADIUS_STANDARD * 2,
|
||||
borderRadius: RADIUS_STANDARD,
|
||||
zIndex: 1,
|
||||
// Render the badge on top of potential ripples.
|
||||
transition: theme.transitions.create('transform', {
|
||||
easing: theme.transitions.easing.easeInOut,
|
||||
duration: theme.transitions.duration.enteringScreen
|
||||
}),
|
||||
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => ({
|
||||
props: {
|
||||
color
|
||||
},
|
||||
style: {
|
||||
backgroundColor: (theme.vars || theme).palette[color].main,
|
||||
color: (theme.vars || theme).palette[color].contrastText
|
||||
}
|
||||
})), {
|
||||
props: {
|
||||
variant: 'dot'
|
||||
},
|
||||
style: {
|
||||
borderRadius: RADIUS_DOT,
|
||||
height: RADIUS_DOT * 2,
|
||||
minWidth: RADIUS_DOT * 2,
|
||||
padding: 0
|
||||
}
|
||||
}, {
|
||||
props: ({
|
||||
ownerState
|
||||
}) => ownerState.anchorOrigin.vertical === 'top' && ownerState.anchorOrigin.horizontal === 'right' && ownerState.overlap === 'rectangular',
|
||||
style: {
|
||||
top: 0,
|
||||
right: 0,
|
||||
transform: 'scale(1) translate(50%, -50%)',
|
||||
transformOrigin: '100% 0%',
|
||||
[`&.${badgeClasses.invisible}`]: {
|
||||
transform: 'scale(0) translate(50%, -50%)'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: ({
|
||||
ownerState
|
||||
}) => ownerState.anchorOrigin.vertical === 'bottom' && ownerState.anchorOrigin.horizontal === 'right' && ownerState.overlap === 'rectangular',
|
||||
style: {
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
transform: 'scale(1) translate(50%, 50%)',
|
||||
transformOrigin: '100% 100%',
|
||||
[`&.${badgeClasses.invisible}`]: {
|
||||
transform: 'scale(0) translate(50%, 50%)'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: ({
|
||||
ownerState
|
||||
}) => ownerState.anchorOrigin.vertical === 'top' && ownerState.anchorOrigin.horizontal === 'left' && ownerState.overlap === 'rectangular',
|
||||
style: {
|
||||
top: 0,
|
||||
left: 0,
|
||||
transform: 'scale(1) translate(-50%, -50%)',
|
||||
transformOrigin: '0% 0%',
|
||||
[`&.${badgeClasses.invisible}`]: {
|
||||
transform: 'scale(0) translate(-50%, -50%)'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: ({
|
||||
ownerState
|
||||
}) => ownerState.anchorOrigin.vertical === 'bottom' && ownerState.anchorOrigin.horizontal === 'left' && ownerState.overlap === 'rectangular',
|
||||
style: {
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
transform: 'scale(1) translate(-50%, 50%)',
|
||||
transformOrigin: '0% 100%',
|
||||
[`&.${badgeClasses.invisible}`]: {
|
||||
transform: 'scale(0) translate(-50%, 50%)'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: ({
|
||||
ownerState
|
||||
}) => ownerState.anchorOrigin.vertical === 'top' && ownerState.anchorOrigin.horizontal === 'right' && ownerState.overlap === 'circular',
|
||||
style: {
|
||||
top: '14%',
|
||||
right: '14%',
|
||||
transform: 'scale(1) translate(50%, -50%)',
|
||||
transformOrigin: '100% 0%',
|
||||
[`&.${badgeClasses.invisible}`]: {
|
||||
transform: 'scale(0) translate(50%, -50%)'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: ({
|
||||
ownerState
|
||||
}) => ownerState.anchorOrigin.vertical === 'bottom' && ownerState.anchorOrigin.horizontal === 'right' && ownerState.overlap === 'circular',
|
||||
style: {
|
||||
bottom: '14%',
|
||||
right: '14%',
|
||||
transform: 'scale(1) translate(50%, 50%)',
|
||||
transformOrigin: '100% 100%',
|
||||
[`&.${badgeClasses.invisible}`]: {
|
||||
transform: 'scale(0) translate(50%, 50%)'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: ({
|
||||
ownerState
|
||||
}) => ownerState.anchorOrigin.vertical === 'top' && ownerState.anchorOrigin.horizontal === 'left' && ownerState.overlap === 'circular',
|
||||
style: {
|
||||
top: '14%',
|
||||
left: '14%',
|
||||
transform: 'scale(1) translate(-50%, -50%)',
|
||||
transformOrigin: '0% 0%',
|
||||
[`&.${badgeClasses.invisible}`]: {
|
||||
transform: 'scale(0) translate(-50%, -50%)'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: ({
|
||||
ownerState
|
||||
}) => ownerState.anchorOrigin.vertical === 'bottom' && ownerState.anchorOrigin.horizontal === 'left' && ownerState.overlap === 'circular',
|
||||
style: {
|
||||
bottom: '14%',
|
||||
left: '14%',
|
||||
transform: 'scale(1) translate(-50%, 50%)',
|
||||
transformOrigin: '0% 100%',
|
||||
[`&.${badgeClasses.invisible}`]: {
|
||||
transform: 'scale(0) translate(-50%, 50%)'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
props: {
|
||||
invisible: true
|
||||
},
|
||||
style: {
|
||||
transition: theme.transitions.create('transform', {
|
||||
easing: theme.transitions.easing.easeInOut,
|
||||
duration: theme.transitions.duration.leavingScreen
|
||||
})
|
||||
}
|
||||
}]
|
||||
})));
|
||||
const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiBadge'
|
||||
});
|
||||
const {
|
||||
anchorOrigin: anchorOriginProp = {
|
||||
vertical: 'top',
|
||||
horizontal: 'right'
|
||||
},
|
||||
className,
|
||||
classes: classesProp,
|
||||
component,
|
||||
components = {},
|
||||
componentsProps = {},
|
||||
children,
|
||||
overlap: overlapProp = 'rectangular',
|
||||
color: colorProp = 'default',
|
||||
invisible: invisibleProp = false,
|
||||
max: maxProp = 99,
|
||||
badgeContent: badgeContentProp,
|
||||
slots,
|
||||
slotProps,
|
||||
showZero = false,
|
||||
variant: variantProp = 'standard',
|
||||
...other
|
||||
} = props;
|
||||
const {
|
||||
badgeContent,
|
||||
invisible: invisibleFromHook,
|
||||
max,
|
||||
displayValue: displayValueFromHook
|
||||
} = useBadge({
|
||||
max: maxProp,
|
||||
invisible: invisibleProp,
|
||||
badgeContent: badgeContentProp,
|
||||
showZero
|
||||
});
|
||||
const prevProps = usePreviousProps({
|
||||
anchorOrigin: anchorOriginProp,
|
||||
color: colorProp,
|
||||
overlap: overlapProp,
|
||||
variant: variantProp,
|
||||
badgeContent: badgeContentProp
|
||||
});
|
||||
const invisible = invisibleFromHook || badgeContent == null && variantProp !== 'dot';
|
||||
const {
|
||||
color = colorProp,
|
||||
overlap = overlapProp,
|
||||
anchorOrigin = anchorOriginProp,
|
||||
variant = variantProp
|
||||
} = invisible ? prevProps : props;
|
||||
const displayValue = variant !== 'dot' ? displayValueFromHook : undefined;
|
||||
const ownerState = {
|
||||
...props,
|
||||
badgeContent,
|
||||
invisible,
|
||||
max,
|
||||
displayValue,
|
||||
showZero,
|
||||
anchorOrigin,
|
||||
color,
|
||||
overlap,
|
||||
variant
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
|
||||
// support both `slots` and `components` for backward compatibility
|
||||
const RootSlot = slots?.root ?? components.Root ?? BadgeRoot;
|
||||
const BadgeSlot = slots?.badge ?? components.Badge ?? BadgeBadge;
|
||||
const rootSlotProps = slotProps?.root ?? componentsProps.root;
|
||||
const badgeSlotProps = slotProps?.badge ?? componentsProps.badge;
|
||||
const rootProps = useSlotProps({
|
||||
elementType: RootSlot,
|
||||
externalSlotProps: rootSlotProps,
|
||||
externalForwardedProps: other,
|
||||
additionalProps: {
|
||||
ref,
|
||||
as: component
|
||||
},
|
||||
ownerState,
|
||||
className: clsx(rootSlotProps?.className, classes.root, className)
|
||||
});
|
||||
const badgeProps = useSlotProps({
|
||||
elementType: BadgeSlot,
|
||||
externalSlotProps: badgeSlotProps,
|
||||
ownerState,
|
||||
className: clsx(classes.badge, badgeSlotProps?.className)
|
||||
});
|
||||
return /*#__PURE__*/_jsxs(RootSlot, {
|
||||
...rootProps,
|
||||
children: [children, /*#__PURE__*/_jsx(BadgeSlot, {
|
||||
...badgeProps,
|
||||
children: displayValue
|
||||
})]
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Badge.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 anchor of the badge.
|
||||
* @default {
|
||||
* vertical: 'top',
|
||||
* horizontal: 'right',
|
||||
* }
|
||||
*/
|
||||
anchorOrigin: PropTypes.shape({
|
||||
horizontal: PropTypes.oneOf(['left', 'right']).isRequired,
|
||||
vertical: PropTypes.oneOf(['bottom', 'top']).isRequired
|
||||
}),
|
||||
/**
|
||||
* The content rendered within the badge.
|
||||
*/
|
||||
badgeContent: PropTypes.node,
|
||||
/**
|
||||
* The badge will be added relative to this node.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* The color of the component.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
* @default 'default'
|
||||
*/
|
||||
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component: PropTypes.elementType,
|
||||
/**
|
||||
* The components used for each slot inside.
|
||||
*
|
||||
* @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
components: PropTypes.shape({
|
||||
Badge: PropTypes.elementType,
|
||||
Root: PropTypes.elementType
|
||||
}),
|
||||
/**
|
||||
* The extra props for the slot components.
|
||||
* You can override the existing props or add new ones.
|
||||
*
|
||||
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
componentsProps: PropTypes.shape({
|
||||
badge: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
||||
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
||||
}),
|
||||
/**
|
||||
* If `true`, the badge is invisible.
|
||||
* @default false
|
||||
*/
|
||||
invisible: PropTypes.bool,
|
||||
/**
|
||||
* Max count to show.
|
||||
* @default 99
|
||||
*/
|
||||
max: PropTypes.number,
|
||||
/**
|
||||
* Wrapped shape the badge should overlap.
|
||||
* @default 'rectangular'
|
||||
*/
|
||||
overlap: PropTypes.oneOf(['circular', 'rectangular']),
|
||||
/**
|
||||
* Controls whether the badge is hidden when `badgeContent` is zero.
|
||||
* @default false
|
||||
*/
|
||||
showZero: PropTypes.bool,
|
||||
/**
|
||||
* The props used for each slot inside the Badge.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: PropTypes.shape({
|
||||
badge: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
||||
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
||||
}),
|
||||
/**
|
||||
* The components used for each slot inside the Badge.
|
||||
* Either a string to use a HTML element or a component.
|
||||
* @default {}
|
||||
*/
|
||||
slots: PropTypes.shape({
|
||||
badge: PropTypes.elementType,
|
||||
root: PropTypes.elementType
|
||||
}),
|
||||
/**
|
||||
* 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 variant to use.
|
||||
* @default 'standard'
|
||||
*/
|
||||
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['dot', 'standard']), PropTypes.string])
|
||||
} : void 0;
|
||||
export default Badge;
|
||||
56
node_modules/@mui/material/Badge/badgeClasses.d.ts
generated
vendored
Normal file
56
node_modules/@mui/material/Badge/badgeClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
export interface BadgeClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the badge `span` element. */
|
||||
badge: string;
|
||||
/** Styles applied to the badge `span` element if `variant="dot"`. */
|
||||
dot: string;
|
||||
/** Styles applied to the badge `span` element if `variant="standard"`. */
|
||||
standard: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }}`. */
|
||||
anchorOriginTopRight: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }}`. */
|
||||
anchorOriginBottomRight: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }}`. */
|
||||
anchorOriginTopLeft: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }}`. */
|
||||
anchorOriginBottomLeft: string;
|
||||
/** State class applied to the badge `span` element if `invisible={true}`. */
|
||||
invisible: string;
|
||||
/** Styles applied to the badge `span` element if `color="primary"`. */
|
||||
colorPrimary: string;
|
||||
/** Styles applied to the badge `span` element if `color="secondary"`. */
|
||||
colorSecondary: string;
|
||||
/** Styles applied to the badge `span` element if `color="error"`. */
|
||||
colorError: string;
|
||||
/** Styles applied to the badge `span` element if `color="info"`. */
|
||||
colorInfo: string;
|
||||
/** Styles applied to the badge `span` element if `color="success"`. */
|
||||
colorSuccess: string;
|
||||
/** Styles applied to the badge `span` element if `color="warning"`. */
|
||||
colorWarning: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }} overlap="rectangular"`. */
|
||||
anchorOriginTopRightRectangular: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }} overlap="rectangular"`. */
|
||||
anchorOriginBottomRightRectangular: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }} overlap="rectangular"`. */
|
||||
anchorOriginTopLeftRectangular: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }} overlap="rectangular"`. */
|
||||
anchorOriginBottomLeftRectangular: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }} overlap="circular"`. */
|
||||
anchorOriginTopRightCircular: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }} overlap="circular"`. */
|
||||
anchorOriginBottomRightCircular: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }} overlap="circular"`. */
|
||||
anchorOriginTopLeftCircular: string;
|
||||
/** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }} overlap="circular"`. */
|
||||
anchorOriginBottomLeftCircular: string;
|
||||
/** Styles applied to the badge `span` element if `overlap="rectangular"`. */
|
||||
overlapRectangular: string;
|
||||
/** Styles applied to the badge `span` element if `overlap="circular"`. */
|
||||
overlapCircular: string;
|
||||
}
|
||||
export type BadgeClassKey = keyof BadgeClasses;
|
||||
export declare function getBadgeUtilityClass(slot: string): string;
|
||||
declare const badgeClasses: BadgeClasses;
|
||||
export default badgeClasses;
|
||||
9
node_modules/@mui/material/Badge/badgeClasses.js
generated
vendored
Normal file
9
node_modules/@mui/material/Badge/badgeClasses.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getBadgeUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiBadge', slot);
|
||||
}
|
||||
const badgeClasses = generateUtilityClasses('MuiBadge', ['root', 'badge', 'dot', 'standard', 'anchorOriginTopRight', 'anchorOriginBottomRight', 'anchorOriginTopLeft', 'anchorOriginBottomLeft', 'invisible', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'overlapRectangular', 'overlapCircular',
|
||||
// TODO: v6 remove the overlap value from these class keys
|
||||
'anchorOriginTopLeftCircular', 'anchorOriginTopLeftRectangular', 'anchorOriginTopRightCircular', 'anchorOriginTopRightRectangular', 'anchorOriginBottomLeftCircular', 'anchorOriginBottomLeftRectangular', 'anchorOriginBottomRightCircular', 'anchorOriginBottomRightRectangular']);
|
||||
export default badgeClasses;
|
||||
5
node_modules/@mui/material/Badge/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/Badge/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './Badge';
|
||||
export * from './Badge';
|
||||
|
||||
export { default as badgeClasses } from './badgeClasses';
|
||||
export * from './badgeClasses';
|
||||
3
node_modules/@mui/material/Badge/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/Badge/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./Badge.js";
|
||||
export { default as badgeClasses } from "./badgeClasses.js";
|
||||
export * from "./badgeClasses.js";
|
||||
6
node_modules/@mui/material/Badge/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/Badge/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/Badge/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
13
node_modules/@mui/material/Badge/useBadge.d.ts
generated
vendored
Normal file
13
node_modules/@mui/material/Badge/useBadge.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { UseBadgeParameters, UseBadgeReturnValue } from './useBadge.types';
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Badge](https://mui.com/base-ui/react-badge/#hook)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [useBadge API](https://mui.com/base-ui/react-badge/hooks-api/#use-badge)
|
||||
*/
|
||||
declare function useBadge(parameters: UseBadgeParameters): UseBadgeReturnValue;
|
||||
export default useBadge;
|
||||
41
node_modules/@mui/material/Badge/useBadge.js
generated
vendored
Normal file
41
node_modules/@mui/material/Badge/useBadge.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
'use client';
|
||||
|
||||
import { usePreviousProps } from '@mui/utils';
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Badge](https://mui.com/base-ui/react-badge/#hook)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [useBadge API](https://mui.com/base-ui/react-badge/hooks-api/#use-badge)
|
||||
*/
|
||||
function useBadge(parameters) {
|
||||
const {
|
||||
badgeContent: badgeContentProp,
|
||||
invisible: invisibleProp = false,
|
||||
max: maxProp = 99,
|
||||
showZero = false
|
||||
} = parameters;
|
||||
const prevProps = usePreviousProps({
|
||||
badgeContent: badgeContentProp,
|
||||
max: maxProp
|
||||
});
|
||||
let invisible = invisibleProp;
|
||||
if (invisibleProp === false && badgeContentProp === 0 && !showZero) {
|
||||
invisible = true;
|
||||
}
|
||||
const {
|
||||
badgeContent,
|
||||
max = maxProp
|
||||
} = invisible ? prevProps : parameters;
|
||||
const displayValue = badgeContent && Number(badgeContent) > max ? `${max}+` : badgeContent;
|
||||
return {
|
||||
badgeContent,
|
||||
invisible,
|
||||
max,
|
||||
displayValue
|
||||
};
|
||||
}
|
||||
export default useBadge;
|
||||
39
node_modules/@mui/material/Badge/useBadge.types.d.ts
generated
vendored
Normal file
39
node_modules/@mui/material/Badge/useBadge.types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
export interface UseBadgeParameters {
|
||||
/**
|
||||
* The content rendered within the badge.
|
||||
*/
|
||||
badgeContent?: React.ReactNode;
|
||||
/**
|
||||
* If `true`, the badge is invisible.
|
||||
* @default false
|
||||
*/
|
||||
invisible?: boolean;
|
||||
/**
|
||||
* Max count to show.
|
||||
* @default 99
|
||||
*/
|
||||
max?: number;
|
||||
/**
|
||||
* Controls whether the badge is hidden when `badgeContent` is zero.
|
||||
* @default false
|
||||
*/
|
||||
showZero?: boolean;
|
||||
}
|
||||
export interface UseBadgeReturnValue {
|
||||
/**
|
||||
* Defines the content that's displayed inside the badge.
|
||||
*/
|
||||
badgeContent: React.ReactNode;
|
||||
/**
|
||||
* If `true`, the component will not be visible.
|
||||
*/
|
||||
invisible: boolean;
|
||||
/**
|
||||
* Maximum number to be displayed in the badge.
|
||||
*/
|
||||
max: number;
|
||||
/**
|
||||
* Value to be displayed in the badge. If `badgeContent` is greater than `max`, it will return `max+`.
|
||||
*/
|
||||
displayValue: React.ReactNode;
|
||||
}
|
||||
1
node_modules/@mui/material/Badge/useBadge.types.js
generated
vendored
Normal file
1
node_modules/@mui/material/Badge/useBadge.types.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
65
node_modules/@mui/material/BottomNavigation/BottomNavigation.d.ts
generated
vendored
Normal file
65
node_modules/@mui/material/BottomNavigation/BottomNavigation.d.ts
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { Theme } from '..';
|
||||
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
||||
import { BottomNavigationClasses } from './bottomNavigationClasses';
|
||||
|
||||
export interface BottomNavigationOwnProps {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<BottomNavigationClasses>;
|
||||
/**
|
||||
* Callback fired when the value changes.
|
||||
*
|
||||
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
||||
* @param {any} value We default to the index of the child.
|
||||
*/
|
||||
onChange?: (event: React.SyntheticEvent, value: any) => void;
|
||||
/**
|
||||
* If `true`, all `BottomNavigationAction`s will show their labels.
|
||||
* By default, only the selected `BottomNavigationAction` will show its label.
|
||||
* @default false
|
||||
*/
|
||||
showLabels?: boolean;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* The value of the currently selected `BottomNavigationAction`.
|
||||
*/
|
||||
value?: any;
|
||||
}
|
||||
|
||||
export interface BottomNavigationTypeMap<
|
||||
AdditionalProps = {},
|
||||
RootComponent extends React.ElementType = 'div',
|
||||
> {
|
||||
props: AdditionalProps & BottomNavigationOwnProps;
|
||||
defaultComponent: RootComponent;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Bottom Navigation](https://mui.com/material-ui/react-bottom-navigation/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [BottomNavigation API](https://mui.com/material-ui/api/bottom-navigation/)
|
||||
*/
|
||||
declare const BottomNavigation: OverridableComponent<BottomNavigationTypeMap>;
|
||||
|
||||
export type BottomNavigationProps<
|
||||
RootComponent extends React.ElementType = BottomNavigationTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<BottomNavigationTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export default BottomNavigation;
|
||||
123
node_modules/@mui/material/BottomNavigation/BottomNavigation.js
generated
vendored
Normal file
123
node_modules/@mui/material/BottomNavigation/BottomNavigation.js
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { isFragment } from 'react-is';
|
||||
import PropTypes from 'prop-types';
|
||||
import clsx from 'clsx';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import { styled } from "../zero-styled/index.js";
|
||||
import memoTheme from "../utils/memoTheme.js";
|
||||
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
||||
import { getBottomNavigationUtilityClass } from "./bottomNavigationClasses.js";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
const useUtilityClasses = ownerState => {
|
||||
const {
|
||||
classes
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root']
|
||||
};
|
||||
return composeClasses(slots, getBottomNavigationUtilityClass, classes);
|
||||
};
|
||||
const BottomNavigationRoot = styled('div', {
|
||||
name: 'MuiBottomNavigation',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => styles.root
|
||||
})(memoTheme(({
|
||||
theme
|
||||
}) => ({
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
height: 56,
|
||||
backgroundColor: (theme.vars || theme).palette.background.paper
|
||||
})));
|
||||
const BottomNavigation = /*#__PURE__*/React.forwardRef(function BottomNavigation(inProps, ref) {
|
||||
const props = useDefaultProps({
|
||||
props: inProps,
|
||||
name: 'MuiBottomNavigation'
|
||||
});
|
||||
const {
|
||||
children,
|
||||
className,
|
||||
component = 'div',
|
||||
onChange,
|
||||
showLabels = false,
|
||||
value,
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = {
|
||||
...props,
|
||||
component,
|
||||
showLabels
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState);
|
||||
return /*#__PURE__*/_jsx(BottomNavigationRoot, {
|
||||
as: component,
|
||||
className: clsx(classes.root, className),
|
||||
ref: ref,
|
||||
ownerState: ownerState,
|
||||
...other,
|
||||
children: React.Children.map(children, (child, childIndex) => {
|
||||
if (! /*#__PURE__*/React.isValidElement(child)) {
|
||||
return null;
|
||||
}
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (isFragment(child)) {
|
||||
console.error(["MUI: The BottomNavigation component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
||||
}
|
||||
}
|
||||
const childValue = child.props.value === undefined ? childIndex : child.props.value;
|
||||
return /*#__PURE__*/React.cloneElement(child, {
|
||||
selected: childValue === value,
|
||||
showLabel: child.props.showLabel !== undefined ? child.props.showLabel : showLabels,
|
||||
value: childValue,
|
||||
onChange
|
||||
});
|
||||
})
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? BottomNavigation.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 content of the component.
|
||||
*/
|
||||
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,
|
||||
/**
|
||||
* Callback fired when the value changes.
|
||||
*
|
||||
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
||||
* @param {any} value We default to the index of the child.
|
||||
*/
|
||||
onChange: PropTypes.func,
|
||||
/**
|
||||
* If `true`, all `BottomNavigationAction`s will show their labels.
|
||||
* By default, only the selected `BottomNavigationAction` will show its label.
|
||||
* @default false
|
||||
*/
|
||||
showLabels: PropTypes.bool,
|
||||
/**
|
||||
* 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 value of the currently selected `BottomNavigationAction`.
|
||||
*/
|
||||
value: PropTypes.any
|
||||
} : void 0;
|
||||
export default BottomNavigation;
|
||||
8
node_modules/@mui/material/BottomNavigation/bottomNavigationClasses.d.ts
generated
vendored
Normal file
8
node_modules/@mui/material/BottomNavigation/bottomNavigationClasses.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface BottomNavigationClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
}
|
||||
export type BottomNavigationClassKey = keyof BottomNavigationClasses;
|
||||
export declare function getBottomNavigationUtilityClass(slot: string): string;
|
||||
declare const bottomNavigationClasses: BottomNavigationClasses;
|
||||
export default bottomNavigationClasses;
|
||||
7
node_modules/@mui/material/BottomNavigation/bottomNavigationClasses.js
generated
vendored
Normal file
7
node_modules/@mui/material/BottomNavigation/bottomNavigationClasses.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
export function getBottomNavigationUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiBottomNavigation', slot);
|
||||
}
|
||||
const bottomNavigationClasses = generateUtilityClasses('MuiBottomNavigation', ['root']);
|
||||
export default bottomNavigationClasses;
|
||||
5
node_modules/@mui/material/BottomNavigation/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/material/BottomNavigation/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default } from './BottomNavigation';
|
||||
export * from './BottomNavigation';
|
||||
|
||||
export { default as bottomNavigationClasses } from './bottomNavigationClasses';
|
||||
export * from './bottomNavigationClasses';
|
||||
3
node_modules/@mui/material/BottomNavigation/index.js
generated
vendored
Normal file
3
node_modules/@mui/material/BottomNavigation/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { default } from "./BottomNavigation.js";
|
||||
export { default as bottomNavigationClasses } from "./bottomNavigationClasses.js";
|
||||
export * from "./bottomNavigationClasses.js";
|
||||
6
node_modules/@mui/material/BottomNavigation/package.json
generated
vendored
Normal file
6
node_modules/@mui/material/BottomNavigation/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/BottomNavigation/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
74
node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.d.ts
generated
vendored
Normal file
74
node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import * as React from 'react';
|
||||
import { SxProps } from '@mui/system';
|
||||
import { Theme } from '..';
|
||||
import { ButtonBaseTypeMap, ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
|
||||
import { OverrideProps } from '../OverridableComponent';
|
||||
import { BottomNavigationActionClasses } from './bottomNavigationActionClasses';
|
||||
|
||||
export interface BottomNavigationActionOwnProps {
|
||||
/**
|
||||
* This prop isn't supported.
|
||||
* Use the `component` prop if you need to change the children structure.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<BottomNavigationActionClasses>;
|
||||
/**
|
||||
* The icon to display.
|
||||
*/
|
||||
icon?: React.ReactNode;
|
||||
/**
|
||||
* The label element.
|
||||
*/
|
||||
label?: React.ReactNode;
|
||||
/**
|
||||
* If `true`, the `BottomNavigationAction` will show its label.
|
||||
* By default, only the selected `BottomNavigationAction`
|
||||
* inside `BottomNavigation` will show its label.
|
||||
*
|
||||
* The prop defaults to the value (`false`) inherited from the parent BottomNavigation component.
|
||||
*/
|
||||
showLabel?: boolean;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
/**
|
||||
* You can provide your own value. Otherwise, we fallback to the child position index.
|
||||
*/
|
||||
value?: any;
|
||||
}
|
||||
|
||||
export type BottomNavigationActionTypeMap<
|
||||
AdditionalProps,
|
||||
RootComponent extends React.ElementType,
|
||||
> = ExtendButtonBaseTypeMap<{
|
||||
props: AdditionalProps & BottomNavigationActionOwnProps;
|
||||
defaultComponent: RootComponent;
|
||||
}>;
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Bottom Navigation](https://mui.com/material-ui/react-bottom-navigation/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [BottomNavigationAction API](https://mui.com/material-ui/api/bottom-navigation-action/)
|
||||
* - inherits [ButtonBase API](https://mui.com/material-ui/api/button-base/)
|
||||
*/
|
||||
declare const BottomNavigationAction: ExtendButtonBase<
|
||||
BottomNavigationActionTypeMap<{}, ButtonBaseTypeMap['defaultComponent']>
|
||||
>;
|
||||
|
||||
export type BottomNavigationActionProps<
|
||||
RootComponent extends React.ElementType = ButtonBaseTypeMap['defaultComponent'],
|
||||
AdditionalProps = {},
|
||||
> = OverrideProps<BottomNavigationActionTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
|
||||
export default BottomNavigationAction;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user