worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
53
node_modules/@mui/system/Box/Box.d.ts
generated
vendored
Normal file
53
node_modules/@mui/system/Box/Box.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import * as React from 'react';
|
||||
import { OverridableComponent, OverrideProps } from '@mui/types';
|
||||
import { Theme as SystemTheme } from "../createTheme/index.js";
|
||||
import { SxProps, AllSystemCSSProperties, ResponsiveStyleValue, OverwriteCSSProperties, AliasesCSSProperties } from "../styleFunctionSx/index.js";
|
||||
import { PropsFor } from "../style/index.js";
|
||||
import { ComposedStyleFunction } from "../compose/index.js";
|
||||
import borders from "../borders/index.js";
|
||||
import display from "../display/index.js";
|
||||
import flexbox from "../flexbox/index.js";
|
||||
import grid from "../cssGrid/index.js";
|
||||
import palette from "../palette/index.js";
|
||||
import positions from "../positions/index.js";
|
||||
import shadows from "../shadows/index.js";
|
||||
import sizing from "../sizing/index.js";
|
||||
import spacing from "../spacing/index.js";
|
||||
import typography from "../typography/index.js";
|
||||
export interface CustomSystemProps extends AliasesCSSProperties, OverwriteCSSProperties {}
|
||||
export type SimpleSystemKeys = keyof PropsFor<ComposedStyleFunction<[typeof borders, typeof display, typeof flexbox, typeof grid, typeof palette, typeof positions, typeof shadows, typeof sizing, typeof spacing, typeof typography]>>;
|
||||
|
||||
// The SimpleSystemKeys are subset of the AllSystemCSSProperties, so this should be ok
|
||||
// This is needed as these are used as keys inside AllSystemCSSProperties
|
||||
type StandardSystemKeys = Extract<SimpleSystemKeys, keyof AllSystemCSSProperties>;
|
||||
export type SystemProps<Theme extends object = {}> = { [K in StandardSystemKeys]?: ResponsiveStyleValue<AllSystemCSSProperties[K]> | ((theme: Theme) => ResponsiveStyleValue<AllSystemCSSProperties[K]>) };
|
||||
export interface BoxOwnProps<Theme extends object = SystemTheme> extends SystemProps<Theme> {
|
||||
children?: React.ReactNode;
|
||||
ref?: React.Ref<unknown>;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
export interface BoxTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'div', Theme extends object = SystemTheme> {
|
||||
props: AdditionalProps & BoxOwnProps<Theme>;
|
||||
defaultComponent: RootComponent;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Box (Joy UI)](https://mui.com/joy-ui/react-box/)
|
||||
* - [Box (Material UI)](https://mui.com/material-ui/react-box/)
|
||||
* - [Box (MUI System)](https://mui.com/system/react-box/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Box API](https://mui.com/system/api/box/)
|
||||
*/
|
||||
declare const Box: OverridableComponent<BoxTypeMap>;
|
||||
export type BoxProps<RootComponent extends React.ElementType = BoxTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<BoxTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
export default Box;
|
||||
36
node_modules/@mui/system/Box/Box.js
generated
vendored
Normal file
36
node_modules/@mui/system/Box/Box.js
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _ClassNameGenerator = _interopRequireDefault(require("@mui/utils/ClassNameGenerator"));
|
||||
var _createBox = _interopRequireDefault(require("../createBox"));
|
||||
var _boxClasses = _interopRequireDefault(require("./boxClasses"));
|
||||
const Box = (0, _createBox.default)({
|
||||
defaultClassName: _boxClasses.default.root,
|
||||
generateClassName: _ClassNameGenerator.default.generate
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Box.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`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
children: _propTypes.default.node,
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component: _propTypes.default.elementType,
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
||||
} : void 0;
|
||||
var _default = exports.default = Box;
|
||||
7
node_modules/@mui/system/Box/boxClasses.d.ts
generated
vendored
Normal file
7
node_modules/@mui/system/Box/boxClasses.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export interface BoxClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
}
|
||||
export type BoxClassKey = keyof BoxClasses;
|
||||
declare const boxClasses: BoxClasses;
|
||||
export default boxClasses;
|
||||
10
node_modules/@mui/system/Box/boxClasses.js
generated
vendored
Normal file
10
node_modules/@mui/system/Box/boxClasses.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
||||
const boxClasses = (0, _generateUtilityClasses.default)('MuiBox', ['root']);
|
||||
var _default = exports.default = boxClasses;
|
||||
4
node_modules/@mui/system/Box/index.d.ts
generated
vendored
Normal file
4
node_modules/@mui/system/Box/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export { default } from "./Box.js";
|
||||
export * from "./Box.js";
|
||||
export { default as boxClasses } from "./boxClasses.js";
|
||||
export * from "./boxClasses.js";
|
||||
35
node_modules/@mui/system/Box/index.js
generated
vendored
Normal file
35
node_modules/@mui/system/Box/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
boxClasses: true
|
||||
};
|
||||
Object.defineProperty(exports, "boxClasses", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _boxClasses.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _Box.default;
|
||||
}
|
||||
});
|
||||
var _Box = _interopRequireDefault(require("./Box"));
|
||||
var _boxClasses = _interopRequireWildcard(require("./boxClasses"));
|
||||
Object.keys(_boxClasses).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _boxClasses[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _boxClasses[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
809
node_modules/@mui/system/CHANGELOG.md
generated
vendored
Normal file
809
node_modules/@mui/system/CHANGELOG.md
generated
vendored
Normal file
|
|
@ -0,0 +1,809 @@
|
|||
# [Versions](https://mui.com/versions/)
|
||||
|
||||
## 7.3.1
|
||||
|
||||
<!-- generated comparing v7.3.0..master -->
|
||||
|
||||
_Aug 6, 2025_
|
||||
|
||||
A big thanks to the 2 contributors who made this release possible.
|
||||
|
||||
### `@mui/material@7.3.1`
|
||||
|
||||
- [PaginationItem] Fix inheritance of component (#46666) @sai6855
|
||||
- [Select] Revert - Implement pointer cancellation PR 45789 (#46672) @ZeeshanTamboli
|
||||
|
||||
All contributors of this release in alphabetical order: @sai6855, @ZeeshanTamboli
|
||||
|
||||
## 7.3.0
|
||||
|
||||
<!-- generated comparing v7.2.0..master -->
|
||||
|
||||
_Aug 5, 2025_
|
||||
|
||||
A big thanks to the 24 contributors who made this release possible. Here are some highlights ✨:
|
||||
|
||||
- 🚀 Shipped `nativeColor` feature that eliminates JS color manipulation and unlocks support for all modern color spaces (#43942) @siriwatknp!
|
||||
|
||||
To learn more, check out the [Native Color](https://mui.com/material-ui/customization/css-theme-variables/native-color/) guide.
|
||||
|
||||
### `@mui/material@7.3.0`
|
||||
|
||||
- Support native color without JS manipulation (#43942) @siriwatknp
|
||||
- [Accordion] Add `region` slot (#46659) @sai6855
|
||||
- [SpeedDial] Fix navigation with arrow keys when slotProps.fab is defined (#46508) @sai6855
|
||||
- [Select] Improve `MenuProps.slotProps` implementation (#46612) @ZeeshanTamboli
|
||||
- [Select] Implement pointer cancellation (#45789) @Kartik-Murthy
|
||||
- [Switch] Add role="switch" (#46482) @ZeeshanTamboli
|
||||
- [Autocomplete] Fix auto highlight when options change but not the length (#46489) @yafeng-c
|
||||
|
||||
### `@mui/codemod@7.3.0`
|
||||
|
||||
- Fix `v5.0.0/top-level-imports` codemod changing color imports (#46405) @AidanLDev
|
||||
|
||||
### Docs
|
||||
|
||||
- Add JetBrains IDEs MCP configuration (#46470) @bernardobelchior
|
||||
- Add warning to array spacing section (#46542) @cherniavskii
|
||||
- Add MCP server installation details for Claude Code (#46621) @saschabratton
|
||||
- Fix incorrect command for MCP Inspector in mcp.md (#46630) @EndiM
|
||||
- Fix incorrect Typography override example for responsive styles (#46558) @aditi291soni
|
||||
- Improve MCP docs (#46557) @siriwatknp
|
||||
- Fix displaying of components in dark mode (#46544) @sai6855
|
||||
- Generate `template` entries about documented generics (#46540) @LukasTy
|
||||
- Use fixed dates for stable CRUD dashboard screenshots (#46546) @apedroferreira
|
||||
- Add "Edit in Mui Chat" button on demos (#46480) @siriwatknp
|
||||
- Fix Menu customization demo (#46535) @siriwatknp
|
||||
- Add dashboard with CRUD template based on Toolpad Core (#46376) @apedroferreira
|
||||
- Clarify `createTheme` warning for future compatibility (#46476) @satendra03
|
||||
- Remove typo in `_redirects` (#46463) @bharatkashyap
|
||||
- Change API docs to stay inside Material UI (#46414) @bharatkashyap
|
||||
- [Dialog] Fix Form dialog demo's actions button padding (#46506) @frontman-git
|
||||
- [SpeedDial] Remove deprecated props from demos (#46485) @sai6855
|
||||
- [Switch] Use `slotProps.input` instead of deprecated `inputProps` for accessible controlled switch (#46625) @adiitxa
|
||||
|
||||
### Core
|
||||
|
||||
- Fix ESLint reference name (80d32a2) @oliviertassinari
|
||||
- Fix ESLint reference name (5fc166e) @oliviertassinari
|
||||
- Add `@base-ui-components/*` to env info (#46539) @Janpot
|
||||
- Remove dead property from routes (#46534) @oliviertassinari
|
||||
- Fix unpinned version regression (#46438) @oliviertassinari
|
||||
- [code-infra] Accomodate build requirements from mui-x (#46551) @brijeshb42
|
||||
- [code-infra] Extend renovate preset from infra repo (#46483) @brijeshb42
|
||||
- [code-infra] Use flat eslint config (#46258) @brijeshb42
|
||||
- [docs-infra] Remove comment saving in G-sheet option (#46617) @alexfauquette
|
||||
- [docs-infra] Move `Open in MUI Chat` to Demo toolbar and adjust styles (#46579) @siriwatknp
|
||||
- [docs-infra] Fix codeblock issues (#46323) @atharva3333
|
||||
- [docs-infra] Handle white spaces and generate either TS or JS demo for llms files (#46494) @siriwatknp
|
||||
- [examples] Rename PopOverMenu.tsx file to match its usage (#46532) @rjray
|
||||
- [infra] Fix `test_types_next`, `test_react_18`, `test_react_next` jobs (#46182) @Janpot
|
||||
- [infra] Remove package.json `module` field (#46620) @Janpot
|
||||
- [infra] Upgrade form-data to >4.0.4 (#46618) @Janpot
|
||||
- [infra] Use cpu option only in CI (#46588) @Janpot
|
||||
- [infra] Update scripts to delete publishConfig.directory (#46563) @brijeshb42
|
||||
- [infra] Remove `transform-runtime` from `next/babel` (#46552) @Janpot
|
||||
- [infra] Revert nx update (#46538) @Janpot
|
||||
- [infra] Replace Argos script with code-infra CLI and update deps (#46475) @Janpot
|
||||
- [infra] Update node group in renovate config (#46474) @Janpot
|
||||
- [infra] Move @playwright/test to peer deps in @mui/internal-test-utils (#46459) @Janpot
|
||||
- [infra] Add instructions for patch release (#46382) @mnajdova
|
||||
|
||||
All contributors of this release in alphabetical order: @adiitxa, @aditi291soni, @AidanLDev, @alexfauquette, @apedroferreira, @atharva3333, @bernardobelchior, @bharatkashyap, @brijeshb42, @cherniavskii, @EndiM, @frontman-git, @Janpot, @Kartik-Murthy, @LukasTy, @mnajdova, @oliviertassinari, @rjray, @sai6855, @saschabratton, @satendra03, @siriwatknp, @yafeng-c, @ZeeshanTamboli
|
||||
|
||||
## 7.2.0
|
||||
|
||||
<!-- generated comparing v7.1.1..master -->
|
||||
|
||||
_Jun 26, 2025_
|
||||
|
||||
A big thanks to the 17 contributors who made this release possible. Here are the highlights ✨:
|
||||
|
||||
- ⚡️ Added `modularCssLayers` theme option for splitting styles into multiple CSS layers (#46001) @siriwatknp.
|
||||
- 📖 Added example for using Material UI with React Router v7 (#46406) @siriwatknp.
|
||||
|
||||
### `@mui/material@7.2.0`
|
||||
|
||||
- [Backdrop] Fix handling of `component` prop (#46269) @sai6855
|
||||
- [Chip] Explicitly define line-height (#46260) @DiegoAndai
|
||||
- [Chip] Fix handling on event handlers (#46263) @sai6855
|
||||
- [OutlinedInput][Input] Deprecate composed classes (#46316) @sai6855
|
||||
- [Select] Pass MenuProps.slotProps.list alongside MenuListProps (#46274) @scousino
|
||||
- [l10] Enable `labelDisplayedRows` translation for Romanian (#46377) @dhu-redwoodtech
|
||||
- Skip generating `modularCssLayers` CSS var (#46329) @siriwatknp
|
||||
|
||||
### `@mui/system@7.2.0`
|
||||
|
||||
- Add `modularCssLayers` theme flag to split styles into multiple CSS layers (#46001) @siriwatknp
|
||||
|
||||
### `@mui/styled-engine@7.2.0`
|
||||
|
||||
- Do not reuse the emotion cache across SSR requests (#46276) @robbtraister
|
||||
|
||||
### `@mui/codemod@7.2.0`
|
||||
|
||||
- [Dialog] Add codemod for deprecated props (#46328) @sai6855
|
||||
|
||||
### Docs
|
||||
|
||||
- Don't forward `hasAiSuggestion` (#46415) @bharatkashyap
|
||||
- Add introduction to MCP (#46224) @bharatkashyap
|
||||
- Fallback for searchbar during SSR (#46364) @Janpot
|
||||
- Update InitColorSchemeScript options to match colorSchemeSelector (#46302) @humble-barnacle001
|
||||
- Add `ListItemButton` to make the deprecation clear (#46356) @siriwatknp
|
||||
- Remove "Unstyled" section from component docs (#46272) @mapache-salvaje
|
||||
- Add Testing section to Rating component doc (#46268) @0210shivam
|
||||
- Fix fade modal demo (#46271) @brijeshb42
|
||||
- [ai] Add suggestions to edit with MUI Chat (#46309) @bharatkashyap
|
||||
- [Dialog] Fix form dialog uses ARIA roles on incompatible elements (#46307) @ZeeshanTamboli
|
||||
- [Menu] Fix dark mode styling of grouped header demo (#46317) @sai6855
|
||||
- [TextField] Removed type="number" demos (#46314) @KirankumarAmbati
|
||||
- [examples] Add `material-ui-react-router-ts` example (#46406) @siriwatknp
|
||||
|
||||
### Core
|
||||
|
||||
- pnpm docs:sync-team (3641a0b) @oliviertassinari
|
||||
- Add cross-env to eslint script (#46358) @ZeeshanTamboli
|
||||
- Support merging of className and style from theme (#45975) @sai6855
|
||||
- [code-infra] Create bundle size package (#45911) @Janpot
|
||||
- [docs-infra] Add a script to generate Material UI `llms.txt` and docs markdown. (#46308) @siriwatknp
|
||||
- [docs-infra] Fix stackblitz for js projects (#46220) @Janpot
|
||||
- [infra] Add emotion as external for bundle monitor (#46372) @Janpot
|
||||
- [infra] Create update PR on every canary publish for internal packages (#46367) @Janpot
|
||||
- [infra] Remove deprecated esmExternals (#46365) @Janpot
|
||||
- [infra] Support project-specific changelog in build scripts (#46425) @michaldudak
|
||||
- [toolpad][website] Remove references to Toolpad (#46311) @prakhargupta1
|
||||
|
||||
All contributors of this release in alphabetical order: @0210shivam, @bharatkashyap, @brijeshb42, @dhu-redwoodtech, @DiegoAndai, @humble-barnacle001, @Janpot, @KirankumarAmbati, @mapache-salvaje, @michaldudak, @oliviertassinari, @prakhargupta1, @robbtraister, @sai6855, @scousino, @siriwatknp, @ZeeshanTamboli
|
||||
|
||||
## 7.1.2
|
||||
|
||||
_Jun 18, 2025_
|
||||
|
||||
A big thanks to the 2 contributors who made this release possible.
|
||||
|
||||
### `@mui/material@7.1.2`
|
||||
|
||||
- [Chip] Fix handling on event handlers (#46263) @sai6855
|
||||
|
||||
### Docs
|
||||
|
||||
- Fix fade modal demo (#46271) @brijeshb42
|
||||
|
||||
All contributors of this release in alphabetical order: @brijeshb42, @sai6855
|
||||
|
||||
## 7.1.1
|
||||
|
||||
<!-- generated comparing v7.1.0..master -->
|
||||
|
||||
_May 30, 2025_
|
||||
|
||||
A big thanks to the 15 contributors who made this release possible.
|
||||
|
||||
### `@mui/material@7.1.1`
|
||||
|
||||
- [Autocomplete] Fix label shrink issue when `renderValue` is used with empty array in multiple mode (#46047) @ZeeshanTamboli
|
||||
- [Autocomplete] Prevent `renderValue` from being skipped when value is 0 (#46145) @LakshitAgarwal
|
||||
- [Autocomplete] Add note in JSDoc for non-TextField components in `renderInput` (#46141) @khllbnomrn
|
||||
- [Chip] Add slots and slotProps (#46098) @sai6855
|
||||
- [Menu] Remove depreacted `MenuListProps` from demos (#46144) @sai6855
|
||||
- [TablePaginationActions] Export TablePaginationActions as new component (#46149) @sai6855
|
||||
- [SnackbarContent] Fix `square` prop not working (#46196) @0210shivam
|
||||
- [SnackbarContent] Fix error when theme value is CSS variable (#46198) @0210shivam
|
||||
|
||||
### `@mui/codemod@7.1.1`
|
||||
|
||||
- Add package name option (#45977) @siriwatknp
|
||||
|
||||
### `@mui/system@7.1.1`
|
||||
|
||||
- Skip styled component from being transformed (#46129) @siriwatknp
|
||||
- Update the type for borderRadius (#46154) @codiini
|
||||
|
||||
### `@mui/styled-engine@7.1.1`
|
||||
|
||||
- Fix variant props callback type to spread `ownerState` (#46187) @siriwatknp
|
||||
|
||||
### `@mui/stylis-plugin-rtl@7.1.1`
|
||||
|
||||
- Fix RTL does not work with CSS layer with a new package (#46230) @siriwatknp
|
||||
|
||||
### Docs
|
||||
|
||||
- [Dialog] Remove deprecated TransitionComponent from demo (#46185) @sai6855
|
||||
- [Grid] Remove direction `column` and `column-reverse` from the demo (#46127) @0210shivam
|
||||
- [Grid] Update grid migration guide (#46057) @sai6855
|
||||
- [templates] Fix rendering of logos in dark mode (#46221) @sai6855
|
||||
- [ToggleButtonGroup] Add spacing demo (#46058) @sai6855
|
||||
- Fix typo in dark mode docs (#46229) @ZeeshanTamboli
|
||||
- Clarify Next.js + Tailwind CSS v3 integration requirements (#46176) @chaitanyasharma1011
|
||||
- Fix GridLegacy docs order (#46135) @oliviertassinari
|
||||
- Update upgrade guide for resolution of `react-is` (#46002) @siriwatknp
|
||||
- Remove oudated scaffoldhub ad (#46090) @oliviertassinari
|
||||
- Show how to target global state classes with CSS Modules (#45992) @RubemMazzetto
|
||||
|
||||
### Core
|
||||
|
||||
- [code-infra] Add plugin to check for index file access (#46178) @Janpot
|
||||
- [code-infra] Bump eslint to v9 (#46222) @brijeshb42
|
||||
- [code-infra] Move packages to mui/mui-public (#46155) @Janpot
|
||||
- [code-infra] Move `chai` to peerDep (#46227) @JCQuintas
|
||||
- [code-infra] Avoid loading barrel file during type checking (#46177) @Janpot
|
||||
- [code-infra] Remove unnecessary ref from `HighlightedCode` component (#46151) @ZeeshanTamboli
|
||||
- [code-infra] Import mocha type instead of global (#46108) @JCQuintas
|
||||
- [code-infra] Dependabot also create branches (795a481) @oliviertassinari
|
||||
- [code-infra] Avoid running continuous release on forks (#46103) @Janpot
|
||||
- [code-infra] Remove checkout job altogether (#46100) @Janpot
|
||||
- [code-infra] Remove required checkout workflows in circleci (#46099) @Janpot
|
||||
- Run pnpm docs:sync-team (c8f1da5) @oliviertassinari
|
||||
- Upgrade MUI X packages to v8 (#45990) @KenanYusuf
|
||||
- Minor detail to reduce confusion (4c64b72) @oliviertassinari
|
||||
- Update security.md (#45839) @DiegoAndai
|
||||
- Apply yml convention, blank line only at top level (f273220) @oliviertassinari
|
||||
- Add comment that lab should be in alpha (#45999) @oliviertassinari
|
||||
|
||||
All contributors of this release in alphabetical order: @0210shivam, @brijeshb42, @chaitanyasharma1011, @codiini, @DiegoAndai, @Janpot, @JCQuintas, @KenanYusuf, @khllbnomrn, @LakshitAgarwal, @oliviertassinari, @RubemMazzetto, @sai6855, @siriwatknp, @ZeeshanTamboli
|
||||
|
||||
## 7.1.0
|
||||
|
||||
<!-- generated comparing v7.0.2..master -->
|
||||
|
||||
_May 6, 2025_
|
||||
|
||||
A big thanks to the 21 contributors who made this release possible. Here are some highlights ✨:
|
||||
|
||||
- 🎉 Material UI now works with **Tailwind CSS v4**! Check out the [setup guide](https://mui.com/material-ui/integrations/tailwindcss/tailwindcss-v4/).
|
||||
|
||||
### `@mui/material@7.1.0`
|
||||
|
||||
- [InputBase] Text cursor jumps several lines up when inserting text fragment with new line at the end (#45246) @yermartee
|
||||
- [OutlinedInput] Add missing `notchedOutline` slot (#45917) @siriwatknp
|
||||
- [Snackbar] Skip default `onClickAway` behavior when `defaultMuiPrevented` is provided (#45629) @sai6855
|
||||
- [Avatar] Fix img slot types and add missing slots (#45483) @siriwatknp
|
||||
- [Badge] Replace useSlotProps with useSlot hook (#45871) @sai6855
|
||||
- [BottomNavigationAction] Add slots and slotProps (#45776) @sai6855
|
||||
- [CardActionArea] Add slots and slotProps (#45866) @sai6855
|
||||
- [useMediaQuery] Add warning and docs for using `useMediaQuery('print')` (#44790) @good-jinu
|
||||
- Remove unnecessary clsx usages (#46084) @sai6855
|
||||
- Corrected generic type definition in `SelectChangeEvent` (#45941) @SuyashShukla0007
|
||||
- Fix theme object changes between renders (#45863) @siriwatknp
|
||||
|
||||
### `@mui/material-nextjs@7.1.0`
|
||||
|
||||
- Add option to enable CSS layers for pages router (#45596) @siriwatknp
|
||||
- Do not wrap `@layer` order rules in App Router (#45864) @Nayeem-XTREME
|
||||
|
||||
### `@mui/system@7.1.0`
|
||||
|
||||
- Fix `@mui/system` types organization (#45860) @Janpot
|
||||
|
||||
### `@mui/styled-engine@7.1.0`
|
||||
|
||||
- Infer `ownerState` from props in `styled` (#46083) @siriwatknp
|
||||
- Fix style overrides variants type (#45478) @siriwatknp
|
||||
|
||||
### Docs
|
||||
|
||||
- [Avatar] Add avatar upload demo (#45986) @Demianeen
|
||||
- [Dialog] Remove deprecated props usage in demos (#45923) @sai6855
|
||||
- [Menu] Update `paper` slot JSDoc default from `Paper` to `PopoverPaper` (#45722) @andreachiera
|
||||
- [examples] Remove create-react-app usages (#45426) @CodeLeom
|
||||
- Add `AccordionSummary` to the v5 breaking change migration (#45947) @siriwatknp
|
||||
- Update CSS variable usage in migration guide for Pigment CSS (#46033) @sai6855
|
||||
- Fix docs API dark mode color (#46086) @alexfauquette
|
||||
- Add a guide for extending Material UI classes in Tailwind CSS (#46039) @siriwatknp
|
||||
- Add `InitColorSchemeScript` docs and API (#45927) @siriwatknp
|
||||
- Add Tailwind CSS v4 integration guide (#45906) @siriwatknp
|
||||
- Fix 301 links to the system v6 (#45931) @oliviertassinari
|
||||
- Add notification for MUI X v8 announcement (#45942) @joserodolfofreitas
|
||||
- Fix som 301 redirections (ae84b35) @oliviertassinari
|
||||
- Fix some 301 redirections (057384e) @oliviertassinari
|
||||
- Fix logo is not centered on small screens (#45920) @crabsim
|
||||
- Fix line break typo (a2a62d5) @oliviertassinari
|
||||
- Fix markdown typo in templates.md (#45914) @scyzoryck
|
||||
- Add Next.js App Router guide for custom classnames (#45852) @siriwatknp
|
||||
|
||||
### Core
|
||||
|
||||
- [code-infra] Give a stable name to dev tool app (3889ded) @oliviertassinari
|
||||
- [code-infra] Normalize author package in org (8135638) @oliviertassinari
|
||||
- [code-infra] Correct some manually curated .d.ts files (#46054) @Janpot
|
||||
- [code-infra] Align deps versions (#46048) @Janpot
|
||||
- [code-infra] Fix dynamic import in imports resolver (#46046) @Janpot
|
||||
- [code-infra] Eliminate `@mui/utils` deep imports (#46004) @Janpot
|
||||
- [code-infra] Expand renovate.json for react types (#45935) @Janpot
|
||||
- [code-infra] Make Argos upload script reusable (#45883) @Janpot
|
||||
- [code-infra] Disallow redundant window prefixes for globals (#45880) @Janpot
|
||||
- [code-infra] Remove type generation of modern build (#45912) @Janpot
|
||||
- [code-infra] Clean up bundle size checker (#45622) @Janpot
|
||||
- [code-infra] Fix `StrictMode` effects not being called twice in React 19 tests (#45812) @bernardobelchior
|
||||
- [code-infra] Convert `@mui/utils` to typescript (#45671) @Janpot
|
||||
- [docs-infra] Improve export into sandbox package.json (#46044) @oliviertassinari
|
||||
- [docs-infra] Update feedback Node.js to v22 (#46064) @oliviertassinari
|
||||
- [docs-infra] Normalize netlify.toml in org (b101d5c) @oliviertassinari
|
||||
- [docs-infra] Uniformize Vale between repositories (0f79796) @oliviertassinari
|
||||
- [docs-infra] Fix Vale no longer working (#46029) @oliviertassinari
|
||||
- [docs-infra] Remove demo styling switch (#45926) @Janpot
|
||||
- [docs-infra] StackBlitz WebContainer demos (#45924) @Janpot
|
||||
- [docs-infra] Fix feedback management (#45872) @alexfauquette
|
||||
- [test] Replace `playwright` with `@playwright/test` (#45998) @ZeeshanTamboli
|
||||
- Fix internal version duplication (#46051) @oliviertassinari
|
||||
- Avoid the need for `@mui/material/themeCssVarsAugmentation` (#46053) @Janpot
|
||||
- Add security label to dependabot PRs (0a5c027) @oliviertassinari
|
||||
- Remove unecessary versions (#46034) @oliviertassinari
|
||||
- Remove redundant overrides resolver (#45970) @romgrk
|
||||
- Fix duplicate branch reference (#45915) @oliviertassinari
|
||||
- Fix outdated <link rel="shortcut icon" (#45916) @oliviertassinari
|
||||
- Fix redirection chains (#45930) @oliviertassinari
|
||||
- Run pnpm docs:sync-team (beee09f) @oliviertassinari
|
||||
- Add `pkg.pr.new` publishing (#42984) @Aslemammad
|
||||
- Remove @mui/base from the master branch (#45857) @mnajdova
|
||||
|
||||
All contributors of this release in alphabetical order: @alexfauquette, @andreachiera, @Aslemammad, @bernardobelchior, @CodeLeom, @crabsim, @Demianeen, @good-jinu, @Janpot, @joserodolfofreitas, @mnajdova, @Nayeem-XTREME, @oliviertassinari, @renovate[bot], @romgrk, @sai6855, @scyzoryck, @siriwatknp, @SuyashShukla0007, @yermartee, @ZeeshanTamboli
|
||||
|
||||
## 7.0.2
|
||||
|
||||
_Apr 9, 2025_
|
||||
|
||||
A big thanks to the 12 contributors who made this release possible.
|
||||
|
||||
### `@mui/material@7.0.2`
|
||||
|
||||
- [Autocomplete] Add ability to render custom single value (#45387) @ZeeshanTamboli
|
||||
- [Autocomplete] Prevent shrink animation in controlled Autocomplete when initial `value` is provided (#45734) @imadx
|
||||
- [AvatarGroup] Fix `spacing` prop ignoring value `0` (#45799) @Kartik-Murthy
|
||||
- [Dialog] Deprecate composed classes (#45418) @sai6855
|
||||
|
||||
### `@mui/material-nextjs@7.0.2`
|
||||
|
||||
- Fix nonce issues (#45794) @Janpot
|
||||
- Add warnings to nextjs router integration (#45778) @Janpot
|
||||
|
||||
### `@mui/styled-engine@7.0.2`
|
||||
|
||||
- Added caching to `StyledEngineProvider` to improve performance for running tests with Jest (#45846) @siriwatknp
|
||||
|
||||
### Core
|
||||
|
||||
- [blog] Improve upvote video (0646444) @oliviertassinari
|
||||
- [code-infra] Remove webpack aliases (#45841) @Janpot
|
||||
- [code-infra] Remove .tsbuildinfo from build folder (#45727) @Janpot
|
||||
- [code-infra] Stabilize theme viewer screenshot tests (#45768) @Janpot
|
||||
- [code-infra] Remove modern bundles (#45808) @Janpot
|
||||
- Update buildTypes script to optionally remove css imports (#45835) @brijeshb42
|
||||
- Allow repo to be accepted as an argument for releaseTag (#45801) @brijeshb42
|
||||
- Update scripts to support base-ui (#45784) @brijeshb42
|
||||
- Sync scorecards.yml across codebase (4de5076) @oliviertassinari
|
||||
- Remove baseUrl and skipLibCheck (#45806) @Janpot
|
||||
- [docs-infra] Fix redirect styles pages (#45848) @siriwatknp
|
||||
- [docs-infra] Remove false-positive Vale rules (#45843) @oliviertassinari
|
||||
- [docs-infra] Make sure Next.js can find package.json through its aliases (#45840) @Janpot
|
||||
- [docs-infra] Fix Next.js brand name coverage (6915f8d) @oliviertassinari
|
||||
- [docs-infra] Fix layout shift between MIT and commercial pages (#45760) @oliviertassinari
|
||||
- [docs-infra] Non breaking space for ESM (#45758) @oliviertassinari
|
||||
- [support-infra] Remove dead 'workflow_call:' (#45736) @oliviertassinari
|
||||
- [utils] Support cleanup callbacks in useForkRef (#45621) @DiegoAndai
|
||||
|
||||
### Docs
|
||||
|
||||
- Fix pigment vite integration example (#44746) @brijeshb42
|
||||
- Update migration instructions and codemod references for deprecated APIs (#45793) @sai6855
|
||||
- Add TanStack Router routing example (#44930) @vetledv
|
||||
- Fix layout shifting in icons page (#45779) @sai6855
|
||||
- Fix migration instructions (#45762) @oliviertassinari
|
||||
- Fix wrong TypeScript support version (#45761) @oliviertassinari
|
||||
- Fix link to mui-joy/src/styles/components.d.ts (#45763) @oliviertassinari
|
||||
- Fix 301 link (ae94c40) @oliviertassinari
|
||||
- Fix 301 links (abd8f63) @oliviertassinari
|
||||
- Fix 301 redirection (c7658de) @oliviertassinari
|
||||
- [nextjs] Migrate from deprecated "legacyBehavior" prop (#44871) @oliviertassinari
|
||||
- [nextjs] Document CSP for Next.js Pages Router (#45798) @Grohden
|
||||
|
||||
All contributors of this release in alphabetical order: @brijeshb42, @DiegoAndai, @Grohden, @imadx, @Janpot, @Kartik-Murthy, @oliviertassinari, @renovate[bot], @sai6855, @siriwatknp, @vetledv, @ZeeshanTamboli
|
||||
|
||||
## 7.0.1
|
||||
|
||||
<!-- generated comparing v7.0.0..master -->
|
||||
|
||||
_Mar 28, 2025_
|
||||
|
||||
A big thanks to the 7 contributors who made this release possible.
|
||||
|
||||
### `@mui/material@7.0.1`
|
||||
|
||||
- Export ThemeProviderProps (#45701) @aarongarciah
|
||||
- [Fab] Fix default variant text color when using CSS vars (#45714) @aarongarciah
|
||||
- Remove mention of v7 in deprecation messages (#45708) @DiegoAndai
|
||||
- [Popover] Allow `null` in `anchorEl` function return type (#45045) @eduter
|
||||
- Fix missing CSSProperties/MixinOptions types (#45706) @Janpot
|
||||
|
||||
### `@mui/icons-material@7.0.1`
|
||||
|
||||
- [code-infra] Fix icon-material type resolution under `moduleResolution: "node"` (#45704) @Janpot
|
||||
- Bring back individual icon dts (#45711) @Janpot
|
||||
|
||||
### Core
|
||||
|
||||
- Improve the release instructions (#45688) @mnajdova
|
||||
|
||||
### Docs
|
||||
|
||||
- Fix Masonry and Toolpad dark mode demos (#45721) @siriwatknp
|
||||
- Update v7 related copy (#45716) @aarongarciah
|
||||
- Avoid unwanted undefined in page title (#45718) @aarongarciah
|
||||
- Fix joy templates error (#45715) @siriwatknp
|
||||
- Rename GitHub icon import (#45709) @micttyoid
|
||||
- Fix Safari issue in dark mode (#45696) @mnajdova
|
||||
- Fix `Grid`, `GridLegacy`, `Stack`, `Badge`, `Select`, `Autocomplete` demos CSS variables (#45693) @DiegoAndai
|
||||
- Add "Material UI v7 is here" to the notifications (#45694) @DiegoAndai
|
||||
- Fix `Breadcrumbs`, `List`, `Divider`, and `Typography` dark mode demos (#45692) @siriwatknp
|
||||
- Fix Material Icons page in dark mode (#45691) @mnajdova
|
||||
|
||||
All contributors of this release in alphabetical order: @aarongarciah, @DiegoAndai, @eduter, @Janpot, @micttyoid, @mnajdova, @siriwatknp
|
||||
|
||||
## 7.0.0
|
||||
|
||||
<!-- generated comparing v7.0.0-rc.0..master -->
|
||||
|
||||
_Mar 26, 2025_
|
||||
|
||||
🎉 We're happy to announce the stable release of v7.
|
||||
|
||||
- Read the [blog post](https://mui.com/blog/material-ui-v7-is-here/) about the announcement.
|
||||
- Check out the [v7 upgrade guide](https://mui.com/material-ui/migration/upgrade-to-v7/).
|
||||
|
||||
### `@mui/material@7.0.0`
|
||||
|
||||
- [Autocomplete] Fix when `onHighlightChange` is called (#45438) @ZeeshanTamboli
|
||||
- [Tabs] Fix modifier keys + Left/Right Arrow key from being consumed by tab navigation (#45345) @mushfiqbh
|
||||
- Update minimum TypeScript support to 4.9 (#45535) @siriwatknp
|
||||
|
||||
### `@mui/system@7.0.0`
|
||||
|
||||
- [system] Fix palette mode does not change when not using CSS vars (#45660) @siriwatknp
|
||||
|
||||
### `@mui/lab@7.0.0-beta.9`
|
||||
|
||||
- [lab] Remove @mui/base dependency (#45602) @mnajdova
|
||||
|
||||
### Docs
|
||||
|
||||
- [docs] Fix unnecessary redirects for v7 (#45677) @Janpot
|
||||
- [docs] Fix new React project link, CRA deprecated (#45362) @oliviertassinari
|
||||
- [docs] Prepare the v7 upgrade guide for stable release (#45624) @DiegoAndai
|
||||
- [docs] Fix grammatical errors in support.md (#45631) @letianpailove
|
||||
- [docs] Update nextjs font optimization guide (#45600) @IshfaqAhmedProg
|
||||
- [docs] Deprecate Toolpad Studio (#45613) @Janpot
|
||||
- [docs] Sync the mode from page to demos #45661 @siriwatknp
|
||||
|
||||
### Core
|
||||
|
||||
- [blog] v7 stable release (#45623) @DiegoAndai
|
||||
- [code-infra] Disable flaky masonry screenshot (#45678) @Janpot
|
||||
- [code-infra] Migrate regression tests to vite (#44964) @Janpot
|
||||
- [code-infra] Update rollup (#45666) @Janpot
|
||||
- [code-infra] Support `React.ComponentType` in proptypes generation (#45664) @Janpot
|
||||
- [code-infra] Ensure `translations.json` is present in all `@mui/docs` package builds (#45626) @LukasTy
|
||||
- [code-infra] Improve Argos script debuggability (#45619) @Janpot
|
||||
- [code-infra] Reconfigure `react-remove-properties` babel plugin (#45218) @Janpot
|
||||
- [core] Prepare master for v7 stable (#45674) @DiegoAndai
|
||||
- [core] Improve instructions on changing domain (#45637) @mnajdova
|
||||
- [core] Deprecate `ponyfillGlobal` (#45606) @Janpot
|
||||
- [docs-infra] Restructure docs theme context to CSS variables (#45386) @siriwatknp
|
||||
- [styles] Remove code & docs (#45633) @mnajdova
|
||||
|
||||
All contributors of this release in alphabetical order: @DiegoAndai, @IshfaqAhmedProg, @Janpot, @letianpailove, @LukasTy, @mnajdova, @mushfiqbh, @oliviertassinari, @siriwatknp, @ZeeshanTamboli
|
||||
|
||||
## 7.0.0-rc.0
|
||||
|
||||
<!-- generated comparing v7.0.0-beta.4..master -->
|
||||
|
||||
_Mar 18, 2025_
|
||||
|
||||
A big thanks to the 4 contributors who made this release possible.
|
||||
|
||||
### `@mui/material@7.0.0-rc.0`
|
||||
|
||||
- [StepLabel] Add missing root slot (#45603) @sai6855
|
||||
- [Switch] Add slots and slotProps (#45595) @siriwatknp
|
||||
- [utils] Add merging function to `mergeSlotProps` utility (#45543) @siriwatknp
|
||||
|
||||
### Core
|
||||
|
||||
- [blog] Clarify the difference between the two Pro plans (#45266) @oliviertassinari
|
||||
- [code-infra] Allow specifying a custom error formatter module for error minifcation (#45291) @Janpot
|
||||
- [code-infra] Make `getVersionEnvVariables` reusable for other repos (#45562) @Janpot
|
||||
- [code-infra] Update peer dependency of `@mui/utils` in `@mui/docs` (#45561) @Janpot
|
||||
- Add StackBlitz template to issue template (#45504) @Janpot
|
||||
|
||||
All contributors of this release in alphabetical order: @Janpot, @oliviertassinari, @sai6855, @siriwatknp
|
||||
|
||||
## 7.0.0-beta.4
|
||||
|
||||
<!-- generated comparing v7.0.0-beta.3..master -->
|
||||
|
||||
_Mar 13, 2025_
|
||||
|
||||
A big thanks to the 10 contributors who made this release possible.
|
||||
This release contains bug fixes 🐛 and improvements to the new package layout 🏗️.
|
||||
|
||||
### `@mui/material@7.0.0-beta.4`
|
||||
|
||||
- [Accordion] Add missing `root` slot (#45532) @sai6855
|
||||
- [AccordionSummary] Add slots and slotProps (#45559) @sai6855
|
||||
- [ListItemText] Add missing `root` slot (#45540) @sai6855
|
||||
- [SpeedDial] Add missing `root` slot (#45541) @sai6855
|
||||
- [Tooltip] Allow auto placement on tooltip (#45399) @Jtaks
|
||||
- [useScrollTrigger] Do nothing if target is null (#45441) @vipierozan99
|
||||
- [TextareaAutosize] Fix ResizeObserver causing infinite `selectionchange` loop (#45351) @mj12albert
|
||||
- Fix negative input for CSS variables spacing array (#45550) @siriwatknp
|
||||
- Add missing deprecations in deprecations-all file (#45505) @sai6855
|
||||
- Rename some `@mui/material/styles/createTypography` exports (#45558) @Janpot
|
||||
|
||||
### `@mui/icons-material@7.0.0-beta.4`
|
||||
|
||||
- Remove unused icon names from the download script (#45453) @yermartee
|
||||
|
||||
### `@mui/system@7.0.0-beta.4`
|
||||
|
||||
- Prevent nested non-vars theme inheritance (#45545) @siriwatknp
|
||||
- Disable theme recalculation as default behavior (#45405) @siriwatknp
|
||||
- Fix package layout inconsistencies (#45491) @DiegoAndai
|
||||
|
||||
### `@mui/styled-engine@7.0.0-beta.4`
|
||||
|
||||
- Add `enableCssLayer` prop to StyledEngineProvider (#45428) @siriwatknp
|
||||
|
||||
### `@mui/types@7.3.0`
|
||||
|
||||
- [code-infra] Fix type resolution for @mui/types (#45513) @Janpot
|
||||
|
||||
### `@mui/utils@7.0.0-beta.4`
|
||||
|
||||
- Fix package layout inconsistencies (#45491) @DiegoAndai
|
||||
- Use correct iri-reference homepage format (#45472) @dahiro
|
||||
|
||||
### Docs
|
||||
|
||||
- [Backdrop] Fix component name in migration guide (#45506) @sai6855
|
||||
- [TextField] Add HTML input section to TextField page (#45439) @siriwatknp
|
||||
|
||||
### Core
|
||||
|
||||
- [code-infra] Convert a few docs modules to ts (#45548) @Janpot
|
||||
- [code-infra] Remove more CJS modules from the docs (#45557) @Janpot
|
||||
- [code-infra] Remove nested imports from theme augmentation (#45514) @Janpot
|
||||
- [docs-infra] Add @ts-ignore to avoid type checking for MUI X (#45555) @siriwatknp
|
||||
- [blog] Fix author end-of-year updates (#45533) @oliviertassinari
|
||||
|
||||
All contributors of this release in alphabetical order: @dahiro, @DiegoAndai, @Janpot, @Jtaks, @mj12albert, @oliviertassinari, @sai6855, @siriwatknp, @vipierozan99, @yermartee
|
||||
|
||||
## 7.0.0-beta.3
|
||||
|
||||
<!-- generated comparing v7.0.0-beta.2..master -->
|
||||
|
||||
_Mar 5, 2025_
|
||||
|
||||
A big thanks to the 3 contributors who made this release possible.
|
||||
|
||||
### `@mui/material@7.0.0-beta.3`
|
||||
|
||||
- Fix moduleResolution:node for icons (#45444) @Janpot
|
||||
- [ThemeProvider] Add `storageManager` prop to `ThemeProvider` (#45136) @siriwatknp
|
||||
- [Radio] Fix `inputProps` not forwarded (#45471) @siriwatknp
|
||||
|
||||
### `@mui/codemod@7.0.0-beta.3`
|
||||
|
||||
- [codemod] Fix codemods not found (#45473) @DiegoAndai
|
||||
|
||||
All contributors of this release in alphabetical order: @DiegoAndai, @Janpot, @siriwatknp
|
||||
|
||||
## 7.0.0-beta.2
|
||||
|
||||
<!-- generated comparing v7.0.0-beta.1..master -->
|
||||
|
||||
_Feb 27, 2025_
|
||||
|
||||
A big thanks to the 2 contributors who made this release possible.
|
||||
|
||||
### Core
|
||||
|
||||
- [code-infra] Add package.json export (#45433) @Janpot
|
||||
- [blog] React 19 migration for MUI X (#45348) @arminmeh
|
||||
|
||||
All contributors of this release in alphabetical order: @arminmeh, @Janpot
|
||||
|
||||
## 7.0.0-beta.1
|
||||
|
||||
<!-- generated comparing v7.0.0-beta.0..master -->
|
||||
|
||||
_Feb 27, 2025_
|
||||
|
||||
This release fixes incorrect build output from the previous release (`beta.0`).
|
||||
|
||||
### Core
|
||||
|
||||
- [code-infra] Fix build:types script omitting folders with a dot in their name (#45422) @Janpot
|
||||
- [release] Fix versions (#45420) @mj12albert
|
||||
|
||||
All contributors of this release in alphabetical order: @Janpot, @mj12albert
|
||||
|
||||
## 7.0.0-beta.0
|
||||
|
||||
<!-- generated comparing v7.0.0-alpha.2..master -->
|
||||
|
||||
_Feb 26, 2025_
|
||||
|
||||
A big thanks to the 8 contributors who made this release possible.
|
||||
|
||||
### `@mui/material@7.0.0-beta.0`
|
||||
|
||||
- [Modal][Dialog] Remove deprecated `onBackdropClick` (#45395) @DiegoAndai
|
||||
- [Grid] Improve Grid2 upgrade experience (#45304) @DiegoAndai
|
||||
- [Grid] Rename to GridLegacy (#45363) @DiegoAndai
|
||||
- [Grid2] Rename to Grid (#45381) @DiegoAndai
|
||||
- Remove SvgIcon data-testid in production (#45333) @Janpot
|
||||
- Allow nested theme creation with `vars` (#45335) @siriwatknp
|
||||
- [Rating] Deprecate \*Props and complete `slots`, `slotProps` (#45295) @harry-whorlow
|
||||
- [Slider] Fix css class selector in migration guide (#45402) @sai6855
|
||||
- [Slider] Fix spacings in .md files (#45388) @sai6855
|
||||
- [styles] Remove deprecated exports (#45397) @DiegoAndai
|
||||
- [Menu] Deprecate \*Props and complete `slots`, `slotProps` (#44913) @siriwatknp
|
||||
- [StepButton] Remove StepIconButton type (#45396) @DiegoAndai
|
||||
|
||||
### Docs
|
||||
|
||||
- [Autocomplete] Remove unnecessary renderTags prop from Sizes demo (#45401) @ZeeshanTamboli
|
||||
- Add `overriding-component-structure` doc to Material UI (#45186) @siriwatknp
|
||||
- Fix typo in slider docs (#45390) @sai6855
|
||||
- Fix Context Menu selection lost on Safari (#44903) @NooBat
|
||||
|
||||
### Core
|
||||
|
||||
- [code-infra] Fix types for @mui/styled-engine (#45413) @Janpot
|
||||
- [docs-infra] Fix theme toggle call (#45400) @siriwatknp
|
||||
- [docs-infra] Add `color-scheme` to document in iframe demos (#45406) @KenanYusuf
|
||||
- [docs-infra] Revert to use deprecated `CssVarsProvider` for MUI X (#45371) @siriwatknp
|
||||
- [docs-infra] Fix dark mode flicker for API pages (#45354) @siriwatknp
|
||||
- [examples] Remove unnecessary comma in Material UI Vite JS example (#45370) @ZeeshanTamboli
|
||||
- [test] Remove unused renderTags prop and fix key warning in Autocomplete regression test (#45410) @ZeeshanTamboli
|
||||
|
||||
All contributors of this release in alphabetical order: @DiegoAndai, @harry-whorlow, @Janpot, @KenanYusuf, @NooBat, @sai6855, @siriwatknp, @ZeeshanTamboli
|
||||
|
||||
## 7.0.0-alpha.2
|
||||
|
||||
<!-- generated comparing v7.0.0-alpha.1..master -->
|
||||
|
||||
_Feb 18, 2025_
|
||||
|
||||
A big thanks to the 9 contributors who made this release possible.
|
||||
|
||||
### `@mui/material@7.0.0-alpha.2`
|
||||
|
||||
- [Autocomplete] Remove legacy `aria-owns` attribute for combobox (#45302) @ZeeshanTamboli
|
||||
- [Button] Apply id only if loading indicator is present (#45296) @aarongarciah
|
||||
- [Hidden] Remove deprecated Hidden component (#45283) @DiegoAndai
|
||||
- [InputBase] Deprecate composed classes (#45234) @sai6855
|
||||
- [InputLabel] Changed size prop value from `normal` to `medium` (#45235) @perkrlsn
|
||||
- Fix `slotProps.transition` types (#45214) @siriwatknp
|
||||
|
||||
### Docs
|
||||
|
||||
- Fix broken links to MUI X docs (#45145) @mapache-salvaje
|
||||
- Add migration guide for package layout changes (#45222) @Janpot
|
||||
- [icons] Fix typo in material-icons.md (#45334) @a-s-russo
|
||||
|
||||
### Core
|
||||
|
||||
- Disallow access to esm/modern barrel files (#45332) @Janpot
|
||||
- [code-infra] Update `elliptic` (#45311) @Janpot
|
||||
- Update release guide to specify package bumping rules (#45294) @DiegoAndai
|
||||
|
||||
All contributors of this release in alphabetical order: @a-s-russo, @aarongarciah, @DiegoAndai, @Janpot, @mapache-salvaje, @perkrlsn, @sai6855, @siriwatknp, @ZeeshanTamboli
|
||||
|
||||
## 7.0.0-alpha.1
|
||||
|
||||
<!-- generated comparing v7.0.0-alpha.0..master -->
|
||||
|
||||
_Feb 11, 2025_
|
||||
|
||||
A big thanks to the 11 contributors who made this release possible.
|
||||
|
||||
### `@mui/material@7.0.0-alpha.1`
|
||||
|
||||
- [Checkbox] Add slots and slotProps (#44974) @sai6855
|
||||
- [LinearProgress][CircularProgress] Add variant overrides for module augumentation (#45163) @kingflamez
|
||||
- [Drawer] Deprecate \*Props and complete `slots`, `slotProps` (#44960) @siriwatknp
|
||||
- Fix wrong `slotProps` of `DetailsHTMLAttributes` types (#45215) @siriwatknp
|
||||
- [MobileStepper] deprecate `LinearProgressProps` and complete `slots`, `slotProps` (#45033) @siriwatknp
|
||||
- [Radio] Add slots and slotProps (#44972) @sai6855
|
||||
- [Radio] Remove empty line (#45184) @sai6855
|
||||
- [Slider] Deprecate composed classes (#45201) @sai6855
|
||||
- [Snackbar] Fix generated proptypes (#45156) @siriwatknp
|
||||
- [SpeedDialAction] Add slots and slotProps (#45065) @sai6855
|
||||
- [SwitchBase] Fix spreading of `handlers` in getSlotProps (#45197) @sai6855
|
||||
- [Tabs] Deprecate \*Props and complete `slots`, `slotProps` (#45012) @siriwatknp
|
||||
- [TextField] Remove deprecated props from documentation (#45199) @sai6855
|
||||
|
||||
### `@mui/icons-material@7.0.0-alpha.1`
|
||||
|
||||
- Change icon source URL and add overrides (#45020) @siriwatknp
|
||||
|
||||
### `@mui/lab@7.0.0-beta.1`
|
||||
|
||||
- Remove components which were moved from lab to material (#45232) @DiegoAndai
|
||||
|
||||
### Docs
|
||||
|
||||
- [Autocomplete] Improve Google Maps search example (#44708) @oliviertassinari
|
||||
- [Dialog] Removes deprecated PaperProps from docs (#45195) @sai6855
|
||||
- [Menu] Add Grouped Menu demo (#45241) @noobDev31
|
||||
- [material] Add disableInteractive on colorTool grid Tooltips (#37800) @Janpot
|
||||
- [blog] Consistent Base UI terminology (#45264) @oliviertassinari
|
||||
- A quick first step to update docs for Tailwind v4 (#45147) @oliviertassinari
|
||||
- Fix `element.ref` accessing warning on docs (#45155) @DiegoAndai
|
||||
- Mention Toolpad as experimental (#45273) @prakhargupta1
|
||||
- [joy-ui] Update "Set up providers" section of integration with Material UI (#45183) @mateuseap
|
||||
|
||||
### Core
|
||||
|
||||
- Update branch switch tags (#45198) @DiegoAndai
|
||||
- Fix double redirection to Base UI (#45146) @oliviertassinari
|
||||
- Fix corepack and pnpm installation in CircleCI (#45185) @mj12albert
|
||||
- Fix typo on Netlify script (#45278) @maximevtush
|
||||
- [code-infra] Fix testing library resolution with custom react (#44061) @Janpot
|
||||
- [code-infra] Update package layout for better ESM support (#43264) @Janpot
|
||||
- Update `@typescript-eslint/*` packages and remove deprecated `eslint-config-airbnb-typescript` package (#45245) @ZeeshanTamboli
|
||||
- [docs] Restore utility component docs from MUI Base to Material UI (#45213) @mapache-salvaje
|
||||
- [docs] Sync active sponsors (#45204) @oliviertassinari
|
||||
- [docs] Fix links in CONTRIBUTING.md (#45202) @bernardobelchior
|
||||
- [docs-infra] Point to MUI X next docs (#45207) @cherniavskii
|
||||
- [test] Fix React 18 tests (#45161) @DiegoAndai
|
||||
|
||||
All contributors of this release in alphabetical order: @bernardobelchior, @cherniavskii, @DiegoAndai, @Janpot, @kingflamez, @mapache-salvaje, @mateuseap, @maximevtush, @mj12albert, @noobDev31, @oliviertassinari, @prakhargupta1, @sai6855, @siriwatknp, @ZeeshanTamboli
|
||||
|
||||
## 7.0.0-alpha.0
|
||||
|
||||
<!-- generated comparing v6.4.1..master -->
|
||||
|
||||
_Jan 31, 2025_
|
||||
|
||||
A big thanks to the 9 contributors who made this release possible.
|
||||
This is the first alpha release of Material UI v7 🎉.
|
||||
|
||||
### `@mui/material@7.0.0-alpha.0`
|
||||
|
||||
- [Autocomplete] Prevent shrink animation in uncontrolled Autocomplete when default value is set (#44873) @ZeeshanTamboli
|
||||
- [Popover] Deprecate \*Props and complete `slots`, `slotProps` (#45035) @siriwatknp
|
||||
- [Slider] Fix arrow keys past the end for Slider with custom marks (#45050) @joshkel
|
||||
- [SwitchBase] Deprecate `inputProps` and complete slots, slotProps (#45076) @siriwatknp
|
||||
- [TextareaAutosize] Temporarily disconnect ResizeObserver to avoid loop error (#44540) @mj12albert
|
||||
- [Slider] Narrow onChange value type (#44777) @good-jinu
|
||||
- [Snackbar] Add Slots and SlotProps (#45103) @harry-whorlow
|
||||
|
||||
### `@mui/utils@7.0.0-alpha.0`
|
||||
|
||||
- Merge `sx` instead of override when using `mergeSlotProps` (#45062) @siriwatknp
|
||||
|
||||
### Core
|
||||
|
||||
- [code-infra] a few fixes uncovered during ESM updates (#45031) @Janpot
|
||||
- [code-infra] Remove rsc-builder (#45079) @Janpot
|
||||
- [code-infra] Remove commonjs imports in docs (#44976) @Janpot
|
||||
- [docs-infra] Move Ukraine banner to the bottom (#45135) @oliviertassinari
|
||||
- Fix MUI Base vale rule (#45140) @oliviertassinari
|
||||
- Fix missing store contributor renaming (b3d1be0) @oliviertassinari
|
||||
- Fix 404 errors (#45137) @oliviertassinari
|
||||
- Prepare libraries for first v7 alpha release (#45132) @DiegoAndai
|
||||
- Fix CHANGELOG vale failure (#45151) @DiegoAndai
|
||||
|
||||
### Docs
|
||||
|
||||
- Fix `/base-ui` redirect and prune links (#45083) @mj12albert
|
||||
- Add v6 to v7 migration guide (#45143) @DiegoAndai
|
||||
|
||||
All contributors of this release in alphabetical order: @DiegoAndai, @good-jinu, @harry-whorlow, @Janpot, @joshkel, @mj12albert, @oliviertassinari, @siriwatknp, @ZeeshanTamboli
|
||||
|
||||
## Older versions
|
||||
|
||||
Changes before 7.x are listed in our [changelog for older versions](https://github.com/mui/material-ui/blob/HEAD/CHANGELOG.old.md).
|
||||
7
node_modules/@mui/system/CSSProperties.d.ts
generated
vendored
Normal file
7
node_modules/@mui/system/CSSProperties.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import * as CSS from 'csstype';
|
||||
|
||||
/**
|
||||
* All non-vendor-prefixed CSS properties. (Also allows `number` in order to support CSS-in-JS libs,
|
||||
* since they are converted to `px`.)
|
||||
*/
|
||||
export interface CSSProperties extends CSS.StandardProperties<number | string>, CSS.SvgProperties<number | string> {}
|
||||
13
node_modules/@mui/system/Container/Container.d.ts
generated
vendored
Normal file
13
node_modules/@mui/system/Container/Container.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Container (Material UI)](https://mui.com/material-ui/react-container/)
|
||||
* - [Container (MUI System)](https://mui.com/system/react-container/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Container API](https://mui.com/system/api/container/)
|
||||
*/
|
||||
declare const Container: import("@mui/types").OverridableComponent<import("./ContainerProps.js").ContainerTypeMap<{}, "div">>;
|
||||
export default Container;
|
||||
66
node_modules/@mui/system/Container/Container.js
generated
vendored
Normal file
66
node_modules/@mui/system/Container/Container.js
generated
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _createContainer = _interopRequireDefault(require("./createContainer"));
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Container (Material UI)](https://mui.com/material-ui/react-container/)
|
||||
* - [Container (MUI System)](https://mui.com/system/react-container/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Container API](https://mui.com/system/api/container/)
|
||||
*/
|
||||
const Container = (0, _createContainer.default)();
|
||||
process.env.NODE_ENV !== "production" ? Container.propTypes /* remove-proptypes */ = {
|
||||
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
||||
// │ These PropTypes are generated from the TypeScript type definitions. │
|
||||
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
children: _propTypes.default.node,
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: _propTypes.default.object,
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component: _propTypes.default.elementType,
|
||||
/**
|
||||
* If `true`, the left and right padding is removed.
|
||||
* @default false
|
||||
*/
|
||||
disableGutters: _propTypes.default.bool,
|
||||
/**
|
||||
* Set the max-width to match the min-width of the current breakpoint.
|
||||
* This is useful if you'd prefer to design for a fixed set of sizes
|
||||
* instead of trying to accommodate a fully fluid viewport.
|
||||
* It's fluid by default.
|
||||
* @default false
|
||||
*/
|
||||
fixed: _propTypes.default.bool,
|
||||
/**
|
||||
* Determine the max-width of the container.
|
||||
* The container width grows with the size of the screen.
|
||||
* Set to `false` to disable `maxWidth`.
|
||||
* @default 'lg'
|
||||
*/
|
||||
maxWidth: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), _propTypes.default.string]),
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
||||
} : void 0;
|
||||
var _default = exports.default = Container;
|
||||
40
node_modules/@mui/system/Container/ContainerProps.d.ts
generated
vendored
Normal file
40
node_modules/@mui/system/Container/ContainerProps.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import * as React from 'react';
|
||||
import { OverrideProps } from '@mui/types';
|
||||
import { SxProps } from "../styleFunctionSx/index.js";
|
||||
import { Theme, Breakpoint } from "../createTheme/index.js";
|
||||
import { ContainerClasses } from "./containerClasses.js";
|
||||
export interface ContainerTypeMap<AdditionalProps = {}, DefaultComponent extends React.ElementType = 'div'> {
|
||||
props: AdditionalProps & {
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<ContainerClasses>;
|
||||
/**
|
||||
* If `true`, the left and right padding is removed.
|
||||
* @default false
|
||||
*/
|
||||
disableGutters?: boolean;
|
||||
/**
|
||||
* Set the max-width to match the min-width of the current breakpoint.
|
||||
* This is useful if you'd prefer to design for a fixed set of sizes
|
||||
* instead of trying to accommodate a fully fluid viewport.
|
||||
* It's fluid by default.
|
||||
* @default false
|
||||
*/
|
||||
fixed?: boolean;
|
||||
/**
|
||||
* Determine the max-width of the container.
|
||||
* The container width grows with the size of the screen.
|
||||
* Set to `false` to disable `maxWidth`.
|
||||
* @default 'lg'
|
||||
*/
|
||||
maxWidth?: Breakpoint | false;
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
};
|
||||
defaultComponent: DefaultComponent;
|
||||
}
|
||||
export type ContainerProps<RootComponent extends React.ElementType = ContainerTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<ContainerTypeMap<AdditionalProps, RootComponent>, RootComponent>;
|
||||
5
node_modules/@mui/system/Container/ContainerProps.js
generated
vendored
Normal file
5
node_modules/@mui/system/Container/ContainerProps.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
22
node_modules/@mui/system/Container/containerClasses.d.ts
generated
vendored
Normal file
22
node_modules/@mui/system/Container/containerClasses.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
export interface ContainerClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if `disableGutters={true}`. */
|
||||
disableGutters: string;
|
||||
/** Styles applied to the root element if `fixed={true}`. */
|
||||
fixed: string;
|
||||
/** Styles applied to the root element if `maxWidth="xs"`. */
|
||||
maxWidthXs: string;
|
||||
/** Styles applied to the root element if `maxWidth="sm"`. */
|
||||
maxWidthSm: string;
|
||||
/** Styles applied to the root element if `maxWidth="md"`. */
|
||||
maxWidthMd: string;
|
||||
/** Styles applied to the root element if `maxWidth="lg"`. */
|
||||
maxWidthLg: string;
|
||||
/** Styles applied to the root element if `maxWidth="xl"`. */
|
||||
maxWidthXl: string;
|
||||
}
|
||||
export type ContainerClassKey = keyof ContainerClasses;
|
||||
export declare function getContainerUtilityClass(slot: string): string;
|
||||
declare const containerClasses: ContainerClasses;
|
||||
export default containerClasses;
|
||||
15
node_modules/@mui/system/Container/containerClasses.js
generated
vendored
Normal file
15
node_modules/@mui/system/Container/containerClasses.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
exports.getContainerUtilityClass = getContainerUtilityClass;
|
||||
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
||||
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
||||
function getContainerUtilityClass(slot) {
|
||||
return (0, _generateUtilityClass.default)('MuiContainer', slot);
|
||||
}
|
||||
const containerClasses = (0, _generateUtilityClasses.default)('MuiContainer', ['root', 'disableGutters', 'fixed', 'maxWidthXs', 'maxWidthSm', 'maxWidthMd', 'maxWidthLg', 'maxWidthXl']);
|
||||
var _default = exports.default = containerClasses;
|
||||
18
node_modules/@mui/system/Container/createContainer.d.ts
generated
vendored
Normal file
18
node_modules/@mui/system/Container/createContainer.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import * as React from 'react';
|
||||
import { Interpolation, MUIStyledComponent as StyledComponent } from '@mui/styled-engine';
|
||||
import { OverridableComponent } from '@mui/types';
|
||||
import { ContainerProps, ContainerTypeMap } from "./ContainerProps.js";
|
||||
import { Theme as DefaultTheme } from "../createTheme/index.js";
|
||||
interface StyleFnProps<Theme> extends ContainerProps {
|
||||
theme: Theme;
|
||||
ownerState: ContainerProps;
|
||||
}
|
||||
type RequiredThemeStructure = Pick<DefaultTheme, 'breakpoints' | 'spacing'>;
|
||||
export default function createContainer<Theme extends RequiredThemeStructure = DefaultTheme>(options?: {
|
||||
createStyledComponent?: (...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>;
|
||||
useThemeProps?: (inProps: ContainerProps) => ContainerProps & {
|
||||
component?: React.ElementType;
|
||||
};
|
||||
componentName?: string;
|
||||
}): OverridableComponent<ContainerTypeMap<{}, "div">>;
|
||||
export {};
|
||||
156
node_modules/@mui/system/Container/createContainer.js
generated
vendored
Normal file
156
node_modules/@mui/system/Container/createContainer.js
generated
vendored
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createContainer;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _clsx = _interopRequireDefault(require("clsx"));
|
||||
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
||||
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
||||
var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
|
||||
var _useThemeProps = _interopRequireDefault(require("../useThemeProps"));
|
||||
var _styled = _interopRequireDefault(require("../styled"));
|
||||
var _createTheme = _interopRequireDefault(require("../createTheme"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
const defaultTheme = (0, _createTheme.default)();
|
||||
const defaultCreateStyledComponent = (0, _styled.default)('div', {
|
||||
name: 'MuiContainer',
|
||||
slot: 'Root',
|
||||
overridesResolver: (props, styles) => {
|
||||
const {
|
||||
ownerState
|
||||
} = props;
|
||||
return [styles.root, styles[`maxWidth${(0, _capitalize.default)(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
|
||||
}
|
||||
});
|
||||
const useThemePropsDefault = inProps => (0, _useThemeProps.default)({
|
||||
props: inProps,
|
||||
name: 'MuiContainer',
|
||||
defaultTheme
|
||||
});
|
||||
const useUtilityClasses = (ownerState, componentName) => {
|
||||
const getContainerUtilityClass = slot => {
|
||||
return (0, _generateUtilityClass.default)(componentName, slot);
|
||||
};
|
||||
const {
|
||||
classes,
|
||||
fixed,
|
||||
disableGutters,
|
||||
maxWidth
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', maxWidth && `maxWidth${(0, _capitalize.default)(String(maxWidth))}`, fixed && 'fixed', disableGutters && 'disableGutters']
|
||||
};
|
||||
return (0, _composeClasses.default)(slots, getContainerUtilityClass, classes);
|
||||
};
|
||||
function createContainer(options = {}) {
|
||||
const {
|
||||
// This will allow adding custom styled fn (for example for custom sx style function)
|
||||
createStyledComponent = defaultCreateStyledComponent,
|
||||
useThemeProps = useThemePropsDefault,
|
||||
componentName = 'MuiContainer'
|
||||
} = options;
|
||||
const ContainerRoot = createStyledComponent(({
|
||||
theme,
|
||||
ownerState
|
||||
}) => ({
|
||||
width: '100%',
|
||||
marginLeft: 'auto',
|
||||
boxSizing: 'border-box',
|
||||
marginRight: 'auto',
|
||||
...(!ownerState.disableGutters && {
|
||||
paddingLeft: theme.spacing(2),
|
||||
paddingRight: theme.spacing(2),
|
||||
// @ts-ignore module augmentation fails if custom breakpoints are used
|
||||
[theme.breakpoints.up('sm')]: {
|
||||
paddingLeft: theme.spacing(3),
|
||||
paddingRight: theme.spacing(3)
|
||||
}
|
||||
})
|
||||
}), ({
|
||||
theme,
|
||||
ownerState
|
||||
}) => ownerState.fixed && Object.keys(theme.breakpoints.values).reduce((acc, breakpointValueKey) => {
|
||||
const breakpoint = breakpointValueKey;
|
||||
const value = theme.breakpoints.values[breakpoint];
|
||||
if (value !== 0) {
|
||||
// @ts-ignore
|
||||
acc[theme.breakpoints.up(breakpoint)] = {
|
||||
maxWidth: `${value}${theme.breakpoints.unit}`
|
||||
};
|
||||
}
|
||||
return acc;
|
||||
}, {}), ({
|
||||
theme,
|
||||
ownerState
|
||||
}) => ({
|
||||
// @ts-ignore module augmentation fails if custom breakpoints are used
|
||||
...(ownerState.maxWidth === 'xs' && {
|
||||
// @ts-ignore module augmentation fails if custom breakpoints are used
|
||||
[theme.breakpoints.up('xs')]: {
|
||||
// @ts-ignore module augmentation fails if custom breakpoints are used
|
||||
maxWidth: Math.max(theme.breakpoints.values.xs, 444)
|
||||
}
|
||||
}),
|
||||
...(ownerState.maxWidth &&
|
||||
// @ts-ignore module augmentation fails if custom breakpoints are used
|
||||
ownerState.maxWidth !== 'xs' && {
|
||||
// @ts-ignore module augmentation fails if custom breakpoints are used
|
||||
[theme.breakpoints.up(ownerState.maxWidth)]: {
|
||||
// @ts-ignore module augmentation fails if custom breakpoints are used
|
||||
maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`
|
||||
}
|
||||
})
|
||||
}));
|
||||
const Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {
|
||||
const props = useThemeProps(inProps);
|
||||
const {
|
||||
className,
|
||||
component = 'div',
|
||||
disableGutters = false,
|
||||
fixed = false,
|
||||
maxWidth = 'lg',
|
||||
classes: classesProp,
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = {
|
||||
...props,
|
||||
component,
|
||||
disableGutters,
|
||||
fixed,
|
||||
maxWidth
|
||||
};
|
||||
|
||||
// @ts-ignore module augmentation fails if custom breakpoints are used
|
||||
const classes = useUtilityClasses(ownerState, componentName);
|
||||
return (
|
||||
/*#__PURE__*/
|
||||
// @ts-ignore theme is injected by the styled util
|
||||
(0, _jsxRuntime.jsx)(ContainerRoot, {
|
||||
as: component
|
||||
// @ts-ignore module augmentation fails if custom breakpoints are used
|
||||
,
|
||||
ownerState: ownerState,
|
||||
className: (0, _clsx.default)(classes.root, className),
|
||||
ref: ref,
|
||||
...other
|
||||
})
|
||||
);
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Container.propTypes /* remove-proptypes */ = {
|
||||
children: _propTypes.default.node,
|
||||
classes: _propTypes.default.object,
|
||||
className: _propTypes.default.string,
|
||||
component: _propTypes.default.elementType,
|
||||
disableGutters: _propTypes.default.bool,
|
||||
fixed: _propTypes.default.bool,
|
||||
maxWidth: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), _propTypes.default.string]),
|
||||
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
||||
} : void 0;
|
||||
return Container;
|
||||
}
|
||||
4
node_modules/@mui/system/Container/index.d.ts
generated
vendored
Normal file
4
node_modules/@mui/system/Container/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export { default } from "./Container.js";
|
||||
export * from "./ContainerProps.js";
|
||||
export { default as containerClasses } from "./containerClasses.js";
|
||||
export * from "./containerClasses.js";
|
||||
35
node_modules/@mui/system/Container/index.js
generated
vendored
Normal file
35
node_modules/@mui/system/Container/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
containerClasses: true
|
||||
};
|
||||
Object.defineProperty(exports, "containerClasses", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _containerClasses.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _Container.default;
|
||||
}
|
||||
});
|
||||
var _Container = _interopRequireDefault(require("./Container"));
|
||||
var _containerClasses = _interopRequireWildcard(require("./containerClasses"));
|
||||
Object.keys(_containerClasses).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _containerClasses[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _containerClasses[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
18
node_modules/@mui/system/DefaultPropsProvider/DefaultPropsProvider.d.ts
generated
vendored
Normal file
18
node_modules/@mui/system/DefaultPropsProvider/DefaultPropsProvider.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import * as React from 'react';
|
||||
declare function DefaultPropsProvider({
|
||||
value,
|
||||
children
|
||||
}: React.PropsWithChildren<{
|
||||
value: Record<string, any> | undefined;
|
||||
}>): React.JSX.Element;
|
||||
declare namespace DefaultPropsProvider {
|
||||
var propTypes: any;
|
||||
}
|
||||
export declare function useDefaultProps<Props>({
|
||||
props,
|
||||
name
|
||||
}: {
|
||||
props: Props;
|
||||
name: string;
|
||||
}): Props;
|
||||
export default DefaultPropsProvider;
|
||||
72
node_modules/@mui/system/DefaultPropsProvider/DefaultPropsProvider.js
generated
vendored
Normal file
72
node_modules/@mui/system/DefaultPropsProvider/DefaultPropsProvider.js
generated
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
exports.useDefaultProps = useDefaultProps;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _resolveProps = _interopRequireDefault(require("@mui/utils/resolveProps"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
const PropsContext = /*#__PURE__*/React.createContext(undefined);
|
||||
function DefaultPropsProvider({
|
||||
value,
|
||||
children
|
||||
}) {
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PropsContext.Provider, {
|
||||
value: value,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
process.env.NODE_ENV !== "production" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {
|
||||
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
||||
// │ These PropTypes are generated from the TypeScript type definitions. │
|
||||
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
children: _propTypes.default.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
value: _propTypes.default.object
|
||||
} : void 0;
|
||||
function getThemeProps(params) {
|
||||
const {
|
||||
theme,
|
||||
name,
|
||||
props
|
||||
} = params;
|
||||
if (!theme || !theme.components || !theme.components[name]) {
|
||||
return props;
|
||||
}
|
||||
const config = theme.components[name];
|
||||
if (config.defaultProps) {
|
||||
// compatible with v5 signature
|
||||
return (0, _resolveProps.default)(config.defaultProps, props, theme.components.mergeClassNameAndStyle);
|
||||
}
|
||||
if (!config.styleOverrides && !config.variants) {
|
||||
// v6 signature, no property 'defaultProps'
|
||||
return (0, _resolveProps.default)(config, props, theme.components.mergeClassNameAndStyle);
|
||||
}
|
||||
return props;
|
||||
}
|
||||
function useDefaultProps({
|
||||
props,
|
||||
name
|
||||
}) {
|
||||
const ctx = React.useContext(PropsContext);
|
||||
return getThemeProps({
|
||||
props,
|
||||
name,
|
||||
theme: {
|
||||
components: ctx
|
||||
}
|
||||
});
|
||||
}
|
||||
var _default = exports.default = DefaultPropsProvider;
|
||||
1
node_modules/@mui/system/DefaultPropsProvider/index.d.ts
generated
vendored
Normal file
1
node_modules/@mui/system/DefaultPropsProvider/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export { default, useDefaultProps } from "./DefaultPropsProvider.js";
|
||||
19
node_modules/@mui/system/DefaultPropsProvider/index.js
generated
vendored
Normal file
19
node_modules/@mui/system/DefaultPropsProvider/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _DefaultPropsProvider.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "useDefaultProps", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _DefaultPropsProvider.useDefaultProps;
|
||||
}
|
||||
});
|
||||
var _DefaultPropsProvider = _interopRequireWildcard(require("./DefaultPropsProvider"));
|
||||
17
node_modules/@mui/system/GlobalStyles/GlobalStyles.d.ts
generated
vendored
Normal file
17
node_modules/@mui/system/GlobalStyles/GlobalStyles.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import * as React from 'react';
|
||||
import { Interpolation } from '@mui/styled-engine';
|
||||
import { Theme as SystemTheme } from "../createTheme/index.js";
|
||||
export interface GlobalStylesProps<Theme = SystemTheme> {
|
||||
styles: Interpolation<Theme>;
|
||||
defaultTheme?: object;
|
||||
themeId?: string;
|
||||
}
|
||||
declare function GlobalStyles<Theme = SystemTheme>({
|
||||
styles,
|
||||
themeId,
|
||||
defaultTheme
|
||||
}: GlobalStylesProps<Theme>): React.JSX.Element;
|
||||
declare namespace GlobalStyles {
|
||||
var propTypes: any;
|
||||
}
|
||||
export default GlobalStyles;
|
||||
68
node_modules/@mui/system/GlobalStyles/GlobalStyles.js
generated
vendored
Normal file
68
node_modules/@mui/system/GlobalStyles/GlobalStyles.js
generated
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _styledEngine = require("@mui/styled-engine");
|
||||
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
function wrapGlobalLayer(styles) {
|
||||
const serialized = (0, _styledEngine.internal_serializeStyles)(styles);
|
||||
if (styles !== serialized && serialized.styles) {
|
||||
if (!serialized.styles.match(/^@layer\s+[^{]*$/)) {
|
||||
// If the styles are not already wrapped in a layer, wrap them in a global layer.
|
||||
serialized.styles = `@layer global{${serialized.styles}}`;
|
||||
}
|
||||
return serialized;
|
||||
}
|
||||
return styles;
|
||||
}
|
||||
function GlobalStyles({
|
||||
styles,
|
||||
themeId,
|
||||
defaultTheme = {}
|
||||
}) {
|
||||
const upperTheme = (0, _useTheme.default)(defaultTheme);
|
||||
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
||||
let globalStyles = typeof styles === 'function' ? styles(resolvedTheme) : styles;
|
||||
if (resolvedTheme.modularCssLayers) {
|
||||
if (Array.isArray(globalStyles)) {
|
||||
globalStyles = globalStyles.map(styleArg => {
|
||||
if (typeof styleArg === 'function') {
|
||||
return wrapGlobalLayer(styleArg(resolvedTheme));
|
||||
}
|
||||
return wrapGlobalLayer(styleArg);
|
||||
});
|
||||
} else {
|
||||
globalStyles = wrapGlobalLayer(globalStyles);
|
||||
}
|
||||
}
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledEngine.GlobalStyles, {
|
||||
styles: globalStyles
|
||||
});
|
||||
}
|
||||
process.env.NODE_ENV !== "production" ? GlobalStyles.propTypes /* remove-proptypes */ = {
|
||||
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
||||
// │ These PropTypes are generated from the TypeScript type definitions. │
|
||||
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
defaultTheme: _propTypes.default.object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
styles: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.array, _propTypes.default.func, _propTypes.default.number, _propTypes.default.object, _propTypes.default.string, _propTypes.default.bool]),
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
themeId: _propTypes.default.string
|
||||
} : void 0;
|
||||
var _default = exports.default = GlobalStyles;
|
||||
2
node_modules/@mui/system/GlobalStyles/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/system/GlobalStyles/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export { default } from "./GlobalStyles.js";
|
||||
export * from "./GlobalStyles.js";
|
||||
25
node_modules/@mui/system/GlobalStyles/index.js
generated
vendored
Normal file
25
node_modules/@mui/system/GlobalStyles/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {};
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _GlobalStyles.default;
|
||||
}
|
||||
});
|
||||
var _GlobalStyles = _interopRequireWildcard(require("./GlobalStyles"));
|
||||
Object.keys(_GlobalStyles).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _GlobalStyles[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _GlobalStyles[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
13
node_modules/@mui/system/Grid/Grid.d.ts
generated
vendored
Normal file
13
node_modules/@mui/system/Grid/Grid.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Grid (Joy UI)](https://mui.com/joy-ui/react-grid/)
|
||||
* - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Grid API](https://mui.com/system/api/grid/)
|
||||
*/
|
||||
declare const Grid: import("@mui/types").OverridableComponent<import("./GridProps.js").GridTypeMap<{}, "div">>;
|
||||
export default Grid;
|
||||
112
node_modules/@mui/system/Grid/Grid.js
generated
vendored
Normal file
112
node_modules/@mui/system/Grid/Grid.js
generated
vendored
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _createGrid = _interopRequireDefault(require("./createGrid"));
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Grid (Joy UI)](https://mui.com/joy-ui/react-grid/)
|
||||
* - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Grid API](https://mui.com/system/api/grid/)
|
||||
*/
|
||||
const Grid = (0, _createGrid.default)();
|
||||
process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ = {
|
||||
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
||||
// │ These PropTypes are generated from the TypeScript type definitions. │
|
||||
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children: _propTypes.default.node,
|
||||
/**
|
||||
* The number of columns.
|
||||
* @default 12
|
||||
*/
|
||||
columns: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number, _propTypes.default.object]),
|
||||
/**
|
||||
* Defines the horizontal space between the type `item` components.
|
||||
* It overrides the value of the `spacing` prop.
|
||||
*/
|
||||
columnSpacing: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
||||
/**
|
||||
* If `true`, the component will have the flex *container* behavior.
|
||||
* You should be wrapping *items* with a *container*.
|
||||
* @default false
|
||||
*/
|
||||
container: _propTypes.default.bool,
|
||||
/**
|
||||
* Defines the `flex-direction` style property.
|
||||
* It is applied for all screen sizes.
|
||||
* @default 'row'
|
||||
*/
|
||||
direction: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), _propTypes.default.object]),
|
||||
/**
|
||||
* Defines the offset value for the type `item` components.
|
||||
*/
|
||||
offset: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])), _propTypes.default.object]),
|
||||
/**
|
||||
* Defines the vertical space between the type `item` components.
|
||||
* It overrides the value of the `spacing` prop.
|
||||
*/
|
||||
rowSpacing: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
||||
/**
|
||||
* Defines the size of the the type `item` components.
|
||||
*/
|
||||
size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.string, _propTypes.default.bool, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool, _propTypes.default.number])), _propTypes.default.object]),
|
||||
/**
|
||||
* Defines the space between the type `item` components.
|
||||
* It can only be used on a type `container` component.
|
||||
* @default 0
|
||||
*/
|
||||
spacing: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
||||
/**
|
||||
* @internal
|
||||
* The level of the grid starts from `0` and increases when the grid nests
|
||||
* inside another grid. Nesting is defined as a container Grid being a direct
|
||||
* child of a container Grid.
|
||||
*
|
||||
* ```js
|
||||
* <Grid container> // level 0
|
||||
* <Grid container> // level 1
|
||||
* <Grid container> // level 2
|
||||
* ```
|
||||
*
|
||||
* Only consecutive grid is considered nesting. A grid container will start at
|
||||
* `0` if there are non-Grid container element above it.
|
||||
*
|
||||
* ```js
|
||||
* <Grid container> // level 0
|
||||
* <div>
|
||||
* <Grid container> // level 0
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* <Grid container> // level 0
|
||||
* <Grid>
|
||||
* <Grid container> // level 0
|
||||
* ```
|
||||
*/
|
||||
unstable_level: _propTypes.default.number,
|
||||
/**
|
||||
* Defines the `flex-wrap` style property.
|
||||
* It's applied for all screen sizes.
|
||||
* @default 'wrap'
|
||||
*/
|
||||
wrap: _propTypes.default.oneOf(['nowrap', 'wrap-reverse', 'wrap'])
|
||||
} : void 0;
|
||||
var _default = exports.default = Grid;
|
||||
103
node_modules/@mui/system/Grid/GridProps.d.ts
generated
vendored
Normal file
103
node_modules/@mui/system/Grid/GridProps.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
import * as React from 'react';
|
||||
import { OverrideProps, PartiallyRequired } from '@mui/types';
|
||||
import { SxProps } from "../styleFunctionSx/index.js";
|
||||
import { Theme, Breakpoint } from "../createTheme/index.js";
|
||||
import { SystemProps } from "../Box/index.js";
|
||||
type ResponsiveStyleValue<T> = T | Array<T | null> | { [key in Breakpoint]?: T | null };
|
||||
export type GridDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
||||
export type GridSpacing = number | string;
|
||||
export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
||||
export type GridSize = 'auto' | 'grow' | number | false;
|
||||
export type GridOffset = 'auto' | number;
|
||||
export interface GridBaseProps {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* The number of columns.
|
||||
* @default 12
|
||||
*/
|
||||
columns?: ResponsiveStyleValue<number>;
|
||||
/**
|
||||
* Defines the horizontal space between the type `item` components.
|
||||
* It overrides the value of the `spacing` prop.
|
||||
*/
|
||||
columnSpacing?: ResponsiveStyleValue<GridSpacing>;
|
||||
/**
|
||||
* If `true`, the component will have the flex *container* behavior.
|
||||
* You should be wrapping *items* with a *container*.
|
||||
* @default false
|
||||
*/
|
||||
container?: boolean;
|
||||
/**
|
||||
* Defines the `flex-direction` style property.
|
||||
* It is applied for all screen sizes.
|
||||
* @default 'row'
|
||||
*/
|
||||
direction?: ResponsiveStyleValue<GridDirection>;
|
||||
/**
|
||||
* Defines the offset value for the type `item` components.
|
||||
*/
|
||||
offset?: ResponsiveStyleValue<GridOffset>;
|
||||
/**
|
||||
* @internal
|
||||
* The level of the grid starts from `0` and increases when the grid nests
|
||||
* inside another grid. Nesting is defined as a container Grid being a direct
|
||||
* child of a container Grid.
|
||||
*
|
||||
* ```js
|
||||
* <Grid container> // level 0
|
||||
* <Grid container> // level 1
|
||||
* <Grid container> // level 2
|
||||
* ```
|
||||
*
|
||||
* Only consecutive grid is considered nesting. A grid container will start at
|
||||
* `0` if there are non-Grid container element above it.
|
||||
*
|
||||
* ```js
|
||||
* <Grid container> // level 0
|
||||
* <div>
|
||||
* <Grid container> // level 0
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* <Grid container> // level 0
|
||||
* <Grid>
|
||||
* <Grid container> // level 0
|
||||
* ```
|
||||
*/
|
||||
unstable_level?: number;
|
||||
/**
|
||||
* Defines the vertical space between the type `item` components.
|
||||
* It overrides the value of the `spacing` prop.
|
||||
*/
|
||||
rowSpacing?: ResponsiveStyleValue<GridSpacing>;
|
||||
/**
|
||||
* Defines the size of the the type `item` components.
|
||||
*/
|
||||
size?: ResponsiveStyleValue<GridSize>;
|
||||
/**
|
||||
* Defines the space between the type `item` components.
|
||||
* It can only be used on a type `container` component.
|
||||
* @default 0
|
||||
*/
|
||||
spacing?: ResponsiveStyleValue<GridSpacing> | undefined;
|
||||
/**
|
||||
* Defines the `flex-wrap` style property.
|
||||
* It's applied for all screen sizes.
|
||||
* @default 'wrap'
|
||||
*/
|
||||
wrap?: GridWrap;
|
||||
}
|
||||
export type GridOwnerState = PartiallyRequired<GridBaseProps, 'size' | 'offset' | 'unstable_level'>;
|
||||
export interface GridTypeMap<AdditionalProps = {}, DefaultComponent extends React.ElementType = 'div'> {
|
||||
props: AdditionalProps & GridBaseProps & {
|
||||
sx?: SxProps<Theme>;
|
||||
} & SystemProps<Theme>;
|
||||
defaultComponent: DefaultComponent;
|
||||
}
|
||||
export type GridProps<RootComponent extends React.ElementType = GridTypeMap['defaultComponent'], AdditionalProps = {
|
||||
component?: React.ElementType;
|
||||
}> = OverrideProps<GridTypeMap<AdditionalProps, RootComponent>, RootComponent>;
|
||||
export {};
|
||||
5
node_modules/@mui/system/Grid/GridProps.js
generated
vendored
Normal file
5
node_modules/@mui/system/Grid/GridProps.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
13
node_modules/@mui/system/Grid/createGrid.d.ts
generated
vendored
Normal file
13
node_modules/@mui/system/Grid/createGrid.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import * as React from 'react';
|
||||
import { OverridableComponent } from '@mui/types';
|
||||
import useThemeSystem from "../useTheme/index.js";
|
||||
import { GridTypeMap } from "./GridProps.js";
|
||||
declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled/index.js").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
|
||||
declare function useThemePropsDefault<T extends {}>(props: T): T;
|
||||
export default function createGrid(options?: {
|
||||
createStyledComponent?: typeof defaultCreateStyledComponent;
|
||||
useThemeProps?: typeof useThemePropsDefault;
|
||||
useTheme?: typeof useThemeSystem;
|
||||
componentName?: string;
|
||||
}): OverridableComponent<GridTypeMap<{}, "div">>;
|
||||
export {};
|
||||
161
node_modules/@mui/system/Grid/createGrid.js
generated
vendored
Normal file
161
node_modules/@mui/system/Grid/createGrid.js
generated
vendored
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createGrid;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _clsx = _interopRequireDefault(require("clsx"));
|
||||
var _isMuiElement = _interopRequireDefault(require("@mui/utils/isMuiElement"));
|
||||
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
||||
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
||||
var _styled = _interopRequireDefault(require("../styled"));
|
||||
var _useThemeProps = _interopRequireDefault(require("../useThemeProps"));
|
||||
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
||||
var _styleFunctionSx = require("../styleFunctionSx");
|
||||
var _createTheme = _interopRequireDefault(require("../createTheme"));
|
||||
var _gridGenerator = require("./gridGenerator");
|
||||
var _deleteLegacyGridProps = _interopRequireDefault(require("./deleteLegacyGridProps"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
const defaultTheme = (0, _createTheme.default)();
|
||||
|
||||
// widening Theme to any so that the consumer can own the theme structure.
|
||||
const defaultCreateStyledComponent = (0, _styled.default)('div', {
|
||||
name: 'MuiGrid',
|
||||
slot: 'Root'
|
||||
});
|
||||
function useThemePropsDefault(props) {
|
||||
return (0, _useThemeProps.default)({
|
||||
props,
|
||||
name: 'MuiGrid',
|
||||
defaultTheme
|
||||
});
|
||||
}
|
||||
function createGrid(options = {}) {
|
||||
const {
|
||||
// This will allow adding custom styled fn (for example for custom sx style function)
|
||||
createStyledComponent = defaultCreateStyledComponent,
|
||||
useThemeProps = useThemePropsDefault,
|
||||
useTheme = _useTheme.default,
|
||||
componentName = 'MuiGrid'
|
||||
} = options;
|
||||
const useUtilityClasses = (ownerState, theme) => {
|
||||
const {
|
||||
container,
|
||||
direction,
|
||||
spacing,
|
||||
wrap,
|
||||
size
|
||||
} = ownerState;
|
||||
const slots = {
|
||||
root: ['root', container && 'container', wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, ...(0, _gridGenerator.generateDirectionClasses)(direction), ...(0, _gridGenerator.generateSizeClassNames)(size), ...(container ? (0, _gridGenerator.generateSpacingClassNames)(spacing, theme.breakpoints.keys[0]) : [])]
|
||||
};
|
||||
return (0, _composeClasses.default)(slots, slot => (0, _generateUtilityClass.default)(componentName, slot), {});
|
||||
};
|
||||
function parseResponsiveProp(propValue, breakpoints, shouldUseValue = () => true) {
|
||||
const parsedProp = {};
|
||||
if (propValue === null) {
|
||||
return parsedProp;
|
||||
}
|
||||
if (Array.isArray(propValue)) {
|
||||
propValue.forEach((value, index) => {
|
||||
if (value !== null && shouldUseValue(value) && breakpoints.keys[index]) {
|
||||
parsedProp[breakpoints.keys[index]] = value;
|
||||
}
|
||||
});
|
||||
} else if (typeof propValue === 'object') {
|
||||
Object.keys(propValue).forEach(key => {
|
||||
const value = propValue[key];
|
||||
if (value !== null && value !== undefined && shouldUseValue(value)) {
|
||||
parsedProp[key] = value;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
parsedProp[breakpoints.keys[0]] = propValue;
|
||||
}
|
||||
return parsedProp;
|
||||
}
|
||||
const GridRoot = createStyledComponent(_gridGenerator.generateGridColumnsStyles, _gridGenerator.generateGridColumnSpacingStyles, _gridGenerator.generateGridRowSpacingStyles, _gridGenerator.generateGridSizeStyles, _gridGenerator.generateGridDirectionStyles, _gridGenerator.generateGridStyles, _gridGenerator.generateGridOffsetStyles);
|
||||
const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
||||
const theme = useTheme();
|
||||
const themeProps = useThemeProps(inProps);
|
||||
const props = (0, _styleFunctionSx.extendSxProp)(themeProps); // `color` type conflicts with html color attribute.
|
||||
|
||||
// TODO v8: Remove when removing the legacy Grid component
|
||||
(0, _deleteLegacyGridProps.default)(props, theme.breakpoints);
|
||||
const {
|
||||
className,
|
||||
children,
|
||||
columns: columnsProp = 12,
|
||||
container = false,
|
||||
component = 'div',
|
||||
direction = 'row',
|
||||
wrap = 'wrap',
|
||||
size: sizeProp = {},
|
||||
offset: offsetProp = {},
|
||||
spacing: spacingProp = 0,
|
||||
rowSpacing: rowSpacingProp = spacingProp,
|
||||
columnSpacing: columnSpacingProp = spacingProp,
|
||||
unstable_level: level = 0,
|
||||
...other
|
||||
} = props;
|
||||
const size = parseResponsiveProp(sizeProp, theme.breakpoints, val => val !== false);
|
||||
const offset = parseResponsiveProp(offsetProp, theme.breakpoints);
|
||||
const columns = inProps.columns ?? (level ? undefined : columnsProp);
|
||||
const spacing = inProps.spacing ?? (level ? undefined : spacingProp);
|
||||
const rowSpacing = inProps.rowSpacing ?? inProps.spacing ?? (level ? undefined : rowSpacingProp);
|
||||
const columnSpacing = inProps.columnSpacing ?? inProps.spacing ?? (level ? undefined : columnSpacingProp);
|
||||
const ownerState = {
|
||||
...props,
|
||||
level,
|
||||
columns,
|
||||
container,
|
||||
direction,
|
||||
wrap,
|
||||
spacing,
|
||||
rowSpacing,
|
||||
columnSpacing,
|
||||
size,
|
||||
offset
|
||||
};
|
||||
const classes = useUtilityClasses(ownerState, theme);
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridRoot, {
|
||||
ref: ref,
|
||||
as: component,
|
||||
ownerState: ownerState,
|
||||
className: (0, _clsx.default)(classes.root, className),
|
||||
...other,
|
||||
children: React.Children.map(children, child => {
|
||||
if (/*#__PURE__*/React.isValidElement(child) && (0, _isMuiElement.default)(child, ['Grid']) && container && child.props.container) {
|
||||
return /*#__PURE__*/React.cloneElement(child, {
|
||||
unstable_level: child.props?.unstable_level ?? level + 1
|
||||
});
|
||||
}
|
||||
return child;
|
||||
})
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ = {
|
||||
children: _propTypes.default.node,
|
||||
className: _propTypes.default.string,
|
||||
columns: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number, _propTypes.default.object]),
|
||||
columnSpacing: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
||||
component: _propTypes.default.elementType,
|
||||
container: _propTypes.default.bool,
|
||||
direction: _propTypes.default.oneOfType([_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), _propTypes.default.object]),
|
||||
offset: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])), _propTypes.default.object]),
|
||||
rowSpacing: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
||||
size: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool, _propTypes.default.number])), _propTypes.default.object]),
|
||||
spacing: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
||||
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
||||
wrap: _propTypes.default.oneOf(['nowrap', 'wrap-reverse', 'wrap'])
|
||||
} : void 0;
|
||||
|
||||
// @ts-ignore internal logic for nested grid
|
||||
Grid.muiName = 'Grid';
|
||||
return Grid;
|
||||
}
|
||||
11
node_modules/@mui/system/Grid/deleteLegacyGridProps.d.ts
generated
vendored
Normal file
11
node_modules/@mui/system/Grid/deleteLegacyGridProps.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { Breakpoint, Breakpoints } from "../createTheme/index.js";
|
||||
/**
|
||||
* Deletes the legacy Grid component props from the `props` object and warns once about them if found.
|
||||
*
|
||||
* @param {object} props The props object to remove the legacy Grid props from.
|
||||
* @param {Breakpoints} breakpoints The breakpoints object.
|
||||
*/
|
||||
export default function deleteLegacyGridProps(props: {
|
||||
item?: boolean;
|
||||
zeroMinWidth?: boolean;
|
||||
} & Partial<Record<Breakpoint, 'auto' | number | boolean>> & Record<string, any>, breakpoints: Breakpoints): void;
|
||||
47
node_modules/@mui/system/Grid/deleteLegacyGridProps.js
generated
vendored
Normal file
47
node_modules/@mui/system/Grid/deleteLegacyGridProps.js
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = deleteLegacyGridProps;
|
||||
const getLegacyGridWarning = propName => {
|
||||
if (['item', 'zeroMinWidth'].includes(propName)) {
|
||||
return `The \`${propName}\` prop has been removed and is no longer necessary. You can safely remove it.`;
|
||||
}
|
||||
|
||||
// #host-reference
|
||||
return `The \`${propName}\` prop has been removed. See https://mui.com/material-ui/migration/upgrade-to-grid-v2/ for migration instructions.`;
|
||||
};
|
||||
const warnedAboutProps = [];
|
||||
|
||||
/**
|
||||
* Deletes the legacy Grid component props from the `props` object and warns once about them if found.
|
||||
*
|
||||
* @param {object} props The props object to remove the legacy Grid props from.
|
||||
* @param {Breakpoints} breakpoints The breakpoints object.
|
||||
*/
|
||||
function deleteLegacyGridProps(props, breakpoints) {
|
||||
const propsToWarn = [];
|
||||
if (props.item !== undefined) {
|
||||
delete props.item;
|
||||
propsToWarn.push('item');
|
||||
}
|
||||
if (props.zeroMinWidth !== undefined) {
|
||||
delete props.zeroMinWidth;
|
||||
propsToWarn.push('zeroMinWidth');
|
||||
}
|
||||
breakpoints.keys.forEach(breakpoint => {
|
||||
if (props[breakpoint] !== undefined) {
|
||||
propsToWarn.push(breakpoint);
|
||||
delete props[breakpoint];
|
||||
}
|
||||
});
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
propsToWarn.forEach(prop => {
|
||||
if (!warnedAboutProps.includes(prop)) {
|
||||
warnedAboutProps.push(prop);
|
||||
console.warn(`MUI Grid: ${getLegacyGridWarning(prop)}\n`);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
20
node_modules/@mui/system/Grid/gridClasses.d.ts
generated
vendored
Normal file
20
node_modules/@mui/system/Grid/gridClasses.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
export interface GridClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the root element if `container={true}`. */
|
||||
container: string;
|
||||
/** Styles applied to the root element if `direction="column"`. */
|
||||
'direction-xs-column': string;
|
||||
/** Styles applied to the root element if `direction="column-reverse"`. */
|
||||
'direction-xs-column-reverse': string;
|
||||
/** Styles applied to the root element if `direction="row-reverse"`. */
|
||||
'direction-xs-row-reverse': string;
|
||||
/** Styles applied to the root element if `wrap="nowrap"`. */
|
||||
'wrap-xs-nowrap': string;
|
||||
/** Styles applied to the root element if `wrap="reverse"`. */
|
||||
'wrap-xs-wrap-reverse': string;
|
||||
}
|
||||
export type GridClassKey = keyof GridClasses;
|
||||
export declare function getGridUtilityClass(slot: string): string;
|
||||
declare const gridClasses: GridClasses;
|
||||
export default gridClasses;
|
||||
27
node_modules/@mui/system/Grid/gridClasses.js
generated
vendored
Normal file
27
node_modules/@mui/system/Grid/gridClasses.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
exports.getGridUtilityClass = getGridUtilityClass;
|
||||
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
||||
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
||||
function getGridUtilityClass(slot) {
|
||||
return (0, _generateUtilityClass.default)('MuiGrid', slot);
|
||||
}
|
||||
const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
const DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
|
||||
const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
|
||||
const GRID_SIZES = ['auto', 'grow', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
const gridClasses = (0, _generateUtilityClasses.default)('MuiGrid', ['root', 'container', 'item',
|
||||
// spacings
|
||||
...SPACINGS.map(spacing => `spacing-xs-${spacing}`),
|
||||
// direction values
|
||||
...DIRECTIONS.map(direction => `direction-xs-${direction}`),
|
||||
// wrap values
|
||||
...WRAPS.map(wrap => `wrap-xs-${wrap}`),
|
||||
// grid sizes for all breakpoints
|
||||
...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);
|
||||
var _default = exports.default = gridClasses;
|
||||
42
node_modules/@mui/system/Grid/gridGenerator.d.ts
generated
vendored
Normal file
42
node_modules/@mui/system/Grid/gridGenerator.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import { Breakpoints } from "../createBreakpoints/createBreakpoints.js";
|
||||
import { Spacing } from "../createTheme/createSpacing.js";
|
||||
import { ResponsiveStyleValue } from "../styleFunctionSx/index.js";
|
||||
import { GridDirection, GridOwnerState } from "./GridProps.js";
|
||||
interface Props {
|
||||
theme: {
|
||||
breakpoints: Breakpoints;
|
||||
spacing?: Spacing;
|
||||
};
|
||||
ownerState: GridOwnerState;
|
||||
}
|
||||
export declare const generateGridSizeStyles: ({
|
||||
theme,
|
||||
ownerState
|
||||
}: Props) => {};
|
||||
export declare const generateGridOffsetStyles: ({
|
||||
theme,
|
||||
ownerState
|
||||
}: Props) => {};
|
||||
export declare const generateGridColumnsStyles: ({
|
||||
theme,
|
||||
ownerState
|
||||
}: Props) => {};
|
||||
export declare const generateGridRowSpacingStyles: ({
|
||||
theme,
|
||||
ownerState
|
||||
}: Props) => {};
|
||||
export declare const generateGridColumnSpacingStyles: ({
|
||||
theme,
|
||||
ownerState
|
||||
}: Props) => {};
|
||||
export declare const generateGridDirectionStyles: ({
|
||||
theme,
|
||||
ownerState
|
||||
}: Props) => {};
|
||||
export declare const generateGridStyles: ({
|
||||
ownerState
|
||||
}: Props) => {};
|
||||
export declare const generateSizeClassNames: (size: GridOwnerState["size"]) => string[];
|
||||
export declare const generateSpacingClassNames: (spacing: GridOwnerState["spacing"], smallestBreakpoint?: string) => string[];
|
||||
export declare const generateDirectionClasses: (direction: ResponsiveStyleValue<GridDirection> | undefined) => string[];
|
||||
export {};
|
||||
209
node_modules/@mui/system/Grid/gridGenerator.js
generated
vendored
Normal file
209
node_modules/@mui/system/Grid/gridGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.generateSpacingClassNames = exports.generateSizeClassNames = exports.generateGridStyles = exports.generateGridSizeStyles = exports.generateGridRowSpacingStyles = exports.generateGridOffsetStyles = exports.generateGridDirectionStyles = exports.generateGridColumnsStyles = exports.generateGridColumnSpacingStyles = exports.generateDirectionClasses = void 0;
|
||||
var _traverseBreakpoints = require("./traverseBreakpoints");
|
||||
function getSelfSpacingVar(axis) {
|
||||
return `--Grid-${axis}Spacing`;
|
||||
}
|
||||
function getParentSpacingVar(axis) {
|
||||
return `--Grid-parent-${axis}Spacing`;
|
||||
}
|
||||
const selfColumnsVar = '--Grid-columns';
|
||||
const parentColumnsVar = '--Grid-parent-columns';
|
||||
const generateGridSizeStyles = ({
|
||||
theme,
|
||||
ownerState
|
||||
}) => {
|
||||
const styles = {};
|
||||
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.size, (appendStyle, value) => {
|
||||
let style = {};
|
||||
if (value === 'grow') {
|
||||
style = {
|
||||
flexBasis: 0,
|
||||
flexGrow: 1,
|
||||
maxWidth: '100%'
|
||||
};
|
||||
}
|
||||
if (value === 'auto') {
|
||||
style = {
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 0,
|
||||
flexShrink: 0,
|
||||
maxWidth: 'none',
|
||||
width: 'auto'
|
||||
};
|
||||
}
|
||||
if (typeof value === 'number') {
|
||||
style = {
|
||||
flexGrow: 0,
|
||||
flexBasis: 'auto',
|
||||
width: `calc(100% * ${value} / var(${parentColumnsVar}) - (var(${parentColumnsVar}) - ${value}) * (var(${getParentSpacingVar('column')}) / var(${parentColumnsVar})))`
|
||||
};
|
||||
}
|
||||
appendStyle(styles, style);
|
||||
});
|
||||
return styles;
|
||||
};
|
||||
exports.generateGridSizeStyles = generateGridSizeStyles;
|
||||
const generateGridOffsetStyles = ({
|
||||
theme,
|
||||
ownerState
|
||||
}) => {
|
||||
const styles = {};
|
||||
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.offset, (appendStyle, value) => {
|
||||
let style = {};
|
||||
if (value === 'auto') {
|
||||
style = {
|
||||
marginLeft: 'auto'
|
||||
};
|
||||
}
|
||||
if (typeof value === 'number') {
|
||||
style = {
|
||||
marginLeft: value === 0 ? '0px' : `calc(100% * ${value} / var(${parentColumnsVar}) + var(${getParentSpacingVar('column')}) * ${value} / var(${parentColumnsVar}))`
|
||||
};
|
||||
}
|
||||
appendStyle(styles, style);
|
||||
});
|
||||
return styles;
|
||||
};
|
||||
exports.generateGridOffsetStyles = generateGridOffsetStyles;
|
||||
const generateGridColumnsStyles = ({
|
||||
theme,
|
||||
ownerState
|
||||
}) => {
|
||||
if (!ownerState.container) {
|
||||
return {};
|
||||
}
|
||||
const styles = {
|
||||
[selfColumnsVar]: 12
|
||||
};
|
||||
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.columns, (appendStyle, value) => {
|
||||
const columns = value ?? 12;
|
||||
appendStyle(styles, {
|
||||
[selfColumnsVar]: columns,
|
||||
'> *': {
|
||||
[parentColumnsVar]: columns
|
||||
}
|
||||
});
|
||||
});
|
||||
return styles;
|
||||
};
|
||||
exports.generateGridColumnsStyles = generateGridColumnsStyles;
|
||||
const generateGridRowSpacingStyles = ({
|
||||
theme,
|
||||
ownerState
|
||||
}) => {
|
||||
if (!ownerState.container) {
|
||||
return {};
|
||||
}
|
||||
const styles = {};
|
||||
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.rowSpacing, (appendStyle, value) => {
|
||||
const spacing = typeof value === 'string' ? value : theme.spacing?.(value);
|
||||
appendStyle(styles, {
|
||||
[getSelfSpacingVar('row')]: spacing,
|
||||
'> *': {
|
||||
[getParentSpacingVar('row')]: spacing
|
||||
}
|
||||
});
|
||||
});
|
||||
return styles;
|
||||
};
|
||||
exports.generateGridRowSpacingStyles = generateGridRowSpacingStyles;
|
||||
const generateGridColumnSpacingStyles = ({
|
||||
theme,
|
||||
ownerState
|
||||
}) => {
|
||||
if (!ownerState.container) {
|
||||
return {};
|
||||
}
|
||||
const styles = {};
|
||||
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.columnSpacing, (appendStyle, value) => {
|
||||
const spacing = typeof value === 'string' ? value : theme.spacing?.(value);
|
||||
appendStyle(styles, {
|
||||
[getSelfSpacingVar('column')]: spacing,
|
||||
'> *': {
|
||||
[getParentSpacingVar('column')]: spacing
|
||||
}
|
||||
});
|
||||
});
|
||||
return styles;
|
||||
};
|
||||
exports.generateGridColumnSpacingStyles = generateGridColumnSpacingStyles;
|
||||
const generateGridDirectionStyles = ({
|
||||
theme,
|
||||
ownerState
|
||||
}) => {
|
||||
if (!ownerState.container) {
|
||||
return {};
|
||||
}
|
||||
const styles = {};
|
||||
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.direction, (appendStyle, value) => {
|
||||
appendStyle(styles, {
|
||||
flexDirection: value
|
||||
});
|
||||
});
|
||||
return styles;
|
||||
};
|
||||
exports.generateGridDirectionStyles = generateGridDirectionStyles;
|
||||
const generateGridStyles = ({
|
||||
ownerState
|
||||
}) => {
|
||||
return {
|
||||
minWidth: 0,
|
||||
boxSizing: 'border-box',
|
||||
...(ownerState.container && {
|
||||
display: 'flex',
|
||||
flexWrap: 'wrap',
|
||||
...(ownerState.wrap && ownerState.wrap !== 'wrap' && {
|
||||
flexWrap: ownerState.wrap
|
||||
}),
|
||||
gap: `var(${getSelfSpacingVar('row')}) var(${getSelfSpacingVar('column')})`
|
||||
})
|
||||
};
|
||||
};
|
||||
exports.generateGridStyles = generateGridStyles;
|
||||
const generateSizeClassNames = size => {
|
||||
const classNames = [];
|
||||
Object.entries(size).forEach(([key, value]) => {
|
||||
if (value !== false && value !== undefined) {
|
||||
classNames.push(`grid-${key}-${String(value)}`);
|
||||
}
|
||||
});
|
||||
return classNames;
|
||||
};
|
||||
exports.generateSizeClassNames = generateSizeClassNames;
|
||||
const generateSpacingClassNames = (spacing, smallestBreakpoint = 'xs') => {
|
||||
function isValidSpacing(val) {
|
||||
if (val === undefined) {
|
||||
return false;
|
||||
}
|
||||
return typeof val === 'string' && !Number.isNaN(Number(val)) || typeof val === 'number' && val > 0;
|
||||
}
|
||||
if (isValidSpacing(spacing)) {
|
||||
return [`spacing-${smallestBreakpoint}-${String(spacing)}`];
|
||||
}
|
||||
if (typeof spacing === 'object' && !Array.isArray(spacing)) {
|
||||
const classNames = [];
|
||||
Object.entries(spacing).forEach(([key, value]) => {
|
||||
if (isValidSpacing(value)) {
|
||||
classNames.push(`spacing-${key}-${String(value)}`);
|
||||
}
|
||||
});
|
||||
return classNames;
|
||||
}
|
||||
return [];
|
||||
};
|
||||
exports.generateSpacingClassNames = generateSpacingClassNames;
|
||||
const generateDirectionClasses = direction => {
|
||||
if (direction === undefined) {
|
||||
return [];
|
||||
}
|
||||
if (typeof direction === 'object') {
|
||||
return Object.entries(direction).map(([key, value]) => `direction-${key}-${value}`);
|
||||
}
|
||||
return [`direction-xs-${String(direction)}`];
|
||||
};
|
||||
exports.generateDirectionClasses = generateDirectionClasses;
|
||||
7
node_modules/@mui/system/Grid/index.d.ts
generated
vendored
Normal file
7
node_modules/@mui/system/Grid/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export { default } from "./Grid.js";
|
||||
export { default as createGrid } from "./createGrid.js";
|
||||
export * from "./GridProps.js";
|
||||
export { default as gridClasses } from "./gridClasses.js";
|
||||
export * from "./gridClasses.js";
|
||||
export { traverseBreakpoints as unstable_traverseBreakpoints } from "./traverseBreakpoints.js";
|
||||
export { generateDirectionClasses as unstable_generateDirectionClasses, generateSizeClassNames as unstable_generateSizeClassNames, generateSpacingClassNames as unstable_generateSpacingClassNames } from "./gridGenerator.js";
|
||||
85
node_modules/@mui/system/Grid/index.js
generated
vendored
Normal file
85
node_modules/@mui/system/Grid/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
createGrid: true,
|
||||
gridClasses: true,
|
||||
unstable_traverseBreakpoints: true,
|
||||
unstable_generateDirectionClasses: true,
|
||||
unstable_generateSizeClassNames: true,
|
||||
unstable_generateSpacingClassNames: true
|
||||
};
|
||||
Object.defineProperty(exports, "createGrid", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _createGrid.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _Grid.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "gridClasses", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _gridClasses.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "unstable_generateDirectionClasses", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _gridGenerator.generateDirectionClasses;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "unstable_generateSizeClassNames", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _gridGenerator.generateSizeClassNames;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "unstable_generateSpacingClassNames", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _gridGenerator.generateSpacingClassNames;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "unstable_traverseBreakpoints", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _traverseBreakpoints.traverseBreakpoints;
|
||||
}
|
||||
});
|
||||
var _Grid = _interopRequireDefault(require("./Grid"));
|
||||
var _createGrid = _interopRequireDefault(require("./createGrid"));
|
||||
var _GridProps = require("./GridProps");
|
||||
Object.keys(_GridProps).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _GridProps[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _GridProps[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _gridClasses = _interopRequireWildcard(require("./gridClasses"));
|
||||
Object.keys(_gridClasses).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _gridClasses[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _gridClasses[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _traverseBreakpoints = require("./traverseBreakpoints");
|
||||
var _gridGenerator = require("./gridGenerator");
|
||||
7
node_modules/@mui/system/Grid/traverseBreakpoints.d.ts
generated
vendored
Normal file
7
node_modules/@mui/system/Grid/traverseBreakpoints.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { Breakpoints, Breakpoint } from "../createBreakpoints/createBreakpoints.js";
|
||||
export declare const filterBreakpointKeys: (breakpointsKeys: Breakpoint[], responsiveKeys: string[]) => Breakpoint[];
|
||||
interface Iterator<T> {
|
||||
(appendStyle: (responsiveStyles: Record<string, any>, style: object) => void, value: T): void;
|
||||
}
|
||||
export declare const traverseBreakpoints: <T = unknown>(breakpoints: Breakpoints, responsive: T | T[] | Record<string, any> | undefined, iterator: Iterator<T>) => void;
|
||||
export {};
|
||||
50
node_modules/@mui/system/Grid/traverseBreakpoints.js
generated
vendored
Normal file
50
node_modules/@mui/system/Grid/traverseBreakpoints.js
generated
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.traverseBreakpoints = exports.filterBreakpointKeys = void 0;
|
||||
const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter(key => responsiveKeys.includes(key));
|
||||
exports.filterBreakpointKeys = filterBreakpointKeys;
|
||||
const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
||||
const smallestBreakpoint = breakpoints.keys[0]; // the keys is sorted from smallest to largest by `createBreakpoints`.
|
||||
|
||||
if (Array.isArray(responsive)) {
|
||||
responsive.forEach((breakpointValue, index) => {
|
||||
iterator((responsiveStyles, style) => {
|
||||
if (index <= breakpoints.keys.length - 1) {
|
||||
if (index === 0) {
|
||||
Object.assign(responsiveStyles, style);
|
||||
} else {
|
||||
responsiveStyles[breakpoints.up(breakpoints.keys[index])] = style;
|
||||
}
|
||||
}
|
||||
}, breakpointValue);
|
||||
});
|
||||
} else if (responsive && typeof responsive === 'object') {
|
||||
// prevent null
|
||||
// responsive could be a very big object, pick the smallest responsive values
|
||||
|
||||
const keys = Object.keys(responsive).length > breakpoints.keys.length ? breakpoints.keys : filterBreakpointKeys(breakpoints.keys, Object.keys(responsive));
|
||||
keys.forEach(key => {
|
||||
if (breakpoints.keys.includes(key)) {
|
||||
// @ts-ignore already checked that responsive is an object
|
||||
const breakpointValue = responsive[key];
|
||||
if (breakpointValue !== undefined) {
|
||||
iterator((responsiveStyles, style) => {
|
||||
if (smallestBreakpoint === key) {
|
||||
Object.assign(responsiveStyles, style);
|
||||
} else {
|
||||
responsiveStyles[breakpoints.up(key)] = style;
|
||||
}
|
||||
}, breakpointValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (typeof responsive === 'number' || typeof responsive === 'string') {
|
||||
iterator((responsiveStyles, style) => {
|
||||
Object.assign(responsiveStyles, style);
|
||||
}, responsive);
|
||||
}
|
||||
};
|
||||
exports.traverseBreakpoints = traverseBreakpoints;
|
||||
51
node_modules/@mui/system/InitColorSchemeScript/InitColorSchemeScript.d.ts
generated
vendored
Normal file
51
node_modules/@mui/system/InitColorSchemeScript/InitColorSchemeScript.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Split this component for RSC import
|
||||
*/
|
||||
import * as React from 'react';
|
||||
export declare const DEFAULT_MODE_STORAGE_KEY = "mode";
|
||||
export declare const DEFAULT_COLOR_SCHEME_STORAGE_KEY = "color-scheme";
|
||||
export declare const DEFAULT_ATTRIBUTE = "data-color-scheme";
|
||||
export interface InitColorSchemeScriptProps {
|
||||
/**
|
||||
* The default mode when the storage is empty (user's first visit).
|
||||
* @default 'system'
|
||||
*/
|
||||
defaultMode?: 'system' | 'light' | 'dark';
|
||||
/**
|
||||
* The default color scheme to be used on the light mode.
|
||||
* @default 'light'
|
||||
*/
|
||||
defaultLightColorScheme?: string;
|
||||
/**
|
||||
* The default color scheme to be used on the dark mode.
|
||||
* * @default 'dark'
|
||||
*/
|
||||
defaultDarkColorScheme?: string;
|
||||
/**
|
||||
* The node (provided as string) used to attach the color-scheme attribute.
|
||||
* @default 'document.documentElement'
|
||||
*/
|
||||
colorSchemeNode?: string;
|
||||
/**
|
||||
* localStorage key used to store `mode`.
|
||||
* @default 'mode'
|
||||
*/
|
||||
modeStorageKey?: string;
|
||||
/**
|
||||
* localStorage key used to store `colorScheme`.
|
||||
* @default 'color-scheme'
|
||||
*/
|
||||
colorSchemeStorageKey?: string;
|
||||
/**
|
||||
* DOM attribute for applying color scheme.
|
||||
* @default 'data-color-scheme'
|
||||
* @example '.mode-%s' // for class based color scheme
|
||||
* @example '[data-mode-%s]' // for data-attribute without '='
|
||||
*/
|
||||
attribute?: 'class' | 'data' | string;
|
||||
/**
|
||||
* Nonce string to pass to the inline script for CSP headers.
|
||||
*/
|
||||
nonce?: string | undefined;
|
||||
}
|
||||
export default function InitColorSchemeScript(options?: InitColorSchemeScriptProps): React.JSX.Element;
|
||||
87
node_modules/@mui/system/InitColorSchemeScript/InitColorSchemeScript.js
generated
vendored
Normal file
87
node_modules/@mui/system/InitColorSchemeScript/InitColorSchemeScript.js
generated
vendored
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.DEFAULT_MODE_STORAGE_KEY = exports.DEFAULT_COLOR_SCHEME_STORAGE_KEY = exports.DEFAULT_ATTRIBUTE = void 0;
|
||||
exports.default = InitColorSchemeScript;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
/**
|
||||
* Split this component for RSC import
|
||||
*/
|
||||
|
||||
const DEFAULT_MODE_STORAGE_KEY = exports.DEFAULT_MODE_STORAGE_KEY = 'mode';
|
||||
const DEFAULT_COLOR_SCHEME_STORAGE_KEY = exports.DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';
|
||||
const DEFAULT_ATTRIBUTE = exports.DEFAULT_ATTRIBUTE = 'data-color-scheme';
|
||||
function InitColorSchemeScript(options) {
|
||||
const {
|
||||
defaultMode = 'system',
|
||||
defaultLightColorScheme = 'light',
|
||||
defaultDarkColorScheme = 'dark',
|
||||
modeStorageKey = DEFAULT_MODE_STORAGE_KEY,
|
||||
colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,
|
||||
attribute: initialAttribute = DEFAULT_ATTRIBUTE,
|
||||
colorSchemeNode = 'document.documentElement',
|
||||
nonce
|
||||
} = options || {};
|
||||
let setter = '';
|
||||
let attribute = initialAttribute;
|
||||
if (initialAttribute === 'class') {
|
||||
attribute = '.%s';
|
||||
}
|
||||
if (initialAttribute === 'data') {
|
||||
attribute = '[data-%s]';
|
||||
}
|
||||
if (attribute.startsWith('.')) {
|
||||
const selector = attribute.substring(1);
|
||||
setter += `${colorSchemeNode}.classList.remove('${selector}'.replace('%s', light), '${selector}'.replace('%s', dark));
|
||||
${colorSchemeNode}.classList.add('${selector}'.replace('%s', colorScheme));`;
|
||||
}
|
||||
const matches = attribute.match(/\[([^\]]+)\]/); // case [data-color-scheme='%s'] or [data-color-scheme]
|
||||
if (matches) {
|
||||
const [attr, value] = matches[1].split('=');
|
||||
if (!value) {
|
||||
setter += `${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', light));
|
||||
${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', dark));`;
|
||||
}
|
||||
setter += `
|
||||
${colorSchemeNode}.setAttribute('${attr}'.replace('%s', colorScheme), ${value ? `${value}.replace('%s', colorScheme)` : '""'});`;
|
||||
} else {
|
||||
setter += `${colorSchemeNode}.setAttribute('${attribute}', colorScheme);`;
|
||||
}
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsx)("script", {
|
||||
suppressHydrationWarning: true,
|
||||
nonce: typeof window === 'undefined' ? nonce : ''
|
||||
// eslint-disable-next-line react/no-danger
|
||||
,
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: `(function() {
|
||||
try {
|
||||
let colorScheme = '';
|
||||
const mode = localStorage.getItem('${modeStorageKey}') || '${defaultMode}';
|
||||
const dark = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';
|
||||
const light = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';
|
||||
if (mode === 'system') {
|
||||
// handle system mode
|
||||
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
if (mql.matches) {
|
||||
colorScheme = dark
|
||||
} else {
|
||||
colorScheme = light
|
||||
}
|
||||
}
|
||||
if (mode === 'light') {
|
||||
colorScheme = light;
|
||||
}
|
||||
if (mode === 'dark') {
|
||||
colorScheme = dark;
|
||||
}
|
||||
if (colorScheme) {
|
||||
${setter}
|
||||
}
|
||||
} catch(e){}})();`
|
||||
}
|
||||
}, "mui-color-scheme-init");
|
||||
}
|
||||
2
node_modules/@mui/system/InitColorSchemeScript/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/system/InitColorSchemeScript/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export { default } from "./InitColorSchemeScript.js";
|
||||
export type { InitColorSchemeScriptProps } from "./InitColorSchemeScript.js";
|
||||
13
node_modules/@mui/system/InitColorSchemeScript/index.js
generated
vendored
Normal file
13
node_modules/@mui/system/InitColorSchemeScript/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _InitColorSchemeScript.default;
|
||||
}
|
||||
});
|
||||
var _InitColorSchemeScript = _interopRequireDefault(require("./InitColorSchemeScript"));
|
||||
21
node_modules/@mui/system/LICENSE
generated
vendored
Normal file
21
node_modules/@mui/system/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.
|
||||
19
node_modules/@mui/system/README.md
generated
vendored
Normal file
19
node_modules/@mui/system/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# MUI System
|
||||
|
||||
MUI System is a set of CSS utilities to help you build custom designs more efficiently. It makes it possible to rapidly lay out custom designs.
|
||||
|
||||
## Installation
|
||||
|
||||
Install the package in your project directory with:
|
||||
|
||||
<!-- #npm-tag-reference -->
|
||||
|
||||
```bash
|
||||
npm install @mui/system @emotion/react @emotion/styled
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
<!-- #host-reference -->
|
||||
|
||||
Visit [https://mui.com/system/getting-started/](https://mui.com/system/getting-started/) to view the full documentation.
|
||||
8
node_modules/@mui/system/RtlProvider/index.d.ts
generated
vendored
Normal file
8
node_modules/@mui/system/RtlProvider/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import * as React from 'react';
|
||||
interface RtlProviderProps {
|
||||
children?: React.ReactNode;
|
||||
value?: boolean;
|
||||
}
|
||||
declare const RtlProvider: React.FC<RtlProviderProps>;
|
||||
export const useRtl: () => boolean;
|
||||
export default RtlProvider;
|
||||
32
node_modules/@mui/system/RtlProvider/index.js
generated
vendored
Normal file
32
node_modules/@mui/system/RtlProvider/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.useRtl = exports.default = void 0;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
const RtlContext = /*#__PURE__*/React.createContext();
|
||||
function RtlProvider({
|
||||
value,
|
||||
...props
|
||||
}) {
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RtlContext.Provider, {
|
||||
value: value ?? true,
|
||||
...props
|
||||
});
|
||||
}
|
||||
process.env.NODE_ENV !== "production" ? RtlProvider.propTypes = {
|
||||
children: _propTypes.default.node,
|
||||
value: _propTypes.default.bool
|
||||
} : void 0;
|
||||
const useRtl = () => {
|
||||
const value = React.useContext(RtlContext);
|
||||
return value ?? false;
|
||||
};
|
||||
exports.useRtl = useRtl;
|
||||
var _default = exports.default = RtlProvider;
|
||||
14
node_modules/@mui/system/Stack/Stack.d.ts
generated
vendored
Normal file
14
node_modules/@mui/system/Stack/Stack.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/)
|
||||
* - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
|
||||
* - [Stack (MUI System)](https://mui.com/system/react-stack/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Stack API](https://mui.com/system/api/stack/)
|
||||
*/
|
||||
declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps.js").StackTypeMap<{}, "div">>;
|
||||
export default Stack;
|
||||
68
node_modules/@mui/system/Stack/Stack.js
generated
vendored
Normal file
68
node_modules/@mui/system/Stack/Stack.js
generated
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _createStack = _interopRequireDefault(require("./createStack"));
|
||||
/**
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/)
|
||||
* - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
|
||||
* - [Stack (MUI System)](https://mui.com/system/react-stack/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Stack API](https://mui.com/system/api/stack/)
|
||||
*/
|
||||
const Stack = (0, _createStack.default)();
|
||||
process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
|
||||
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
||||
// │ These PropTypes are generated from the TypeScript type definitions. │
|
||||
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children: _propTypes.default.node,
|
||||
/**
|
||||
* The component used for the root node.
|
||||
* Either a string to use a HTML element or a component.
|
||||
*/
|
||||
component: _propTypes.default.elementType,
|
||||
/**
|
||||
* Defines the `flex-direction` style property.
|
||||
* It is applied for all screen sizes.
|
||||
* @default 'column'
|
||||
*/
|
||||
direction: _propTypes.default.oneOfType([_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), _propTypes.default.object]),
|
||||
/**
|
||||
* Add an element between each child.
|
||||
*/
|
||||
divider: _propTypes.default.node,
|
||||
/**
|
||||
* Defines the space between immediate children.
|
||||
* @default 0
|
||||
*/
|
||||
spacing: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
||||
/**
|
||||
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
||||
/**
|
||||
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
||||
*
|
||||
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
||||
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
||||
*
|
||||
* To enable this flag globally, follow the theme's default props configuration.
|
||||
* @default false
|
||||
*/
|
||||
useFlexGap: _propTypes.default.bool
|
||||
} : void 0;
|
||||
var _default = exports.default = Stack;
|
||||
53
node_modules/@mui/system/Stack/StackProps.d.ts
generated
vendored
Normal file
53
node_modules/@mui/system/Stack/StackProps.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import * as React from 'react';
|
||||
import { OverrideProps } from '@mui/types';
|
||||
import { ResponsiveStyleValue, SxProps } from "../styleFunctionSx/index.js";
|
||||
import { SystemProps } from "../Box/index.js";
|
||||
import { Theme } from "../createTheme/index.js";
|
||||
export interface StackBaseProps {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* Defines the `flex-direction` style property.
|
||||
* It is applied for all screen sizes.
|
||||
* @default 'column'
|
||||
*/
|
||||
direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
|
||||
/**
|
||||
* Defines the space between immediate children.
|
||||
* @default 0
|
||||
*/
|
||||
spacing?: ResponsiveStyleValue<number | string>;
|
||||
/**
|
||||
* Add an element between each child.
|
||||
*/
|
||||
divider?: React.ReactNode;
|
||||
/**
|
||||
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
||||
*
|
||||
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
||||
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
||||
*
|
||||
* To enable this flag globally, follow the theme's default props configuration.
|
||||
* @default false
|
||||
*/
|
||||
useFlexGap?: boolean;
|
||||
}
|
||||
export interface StackTypeMap<AdditionalProps = {}, DefaultComponent extends React.ElementType = 'div'> {
|
||||
props: AdditionalProps & StackBaseProps & {
|
||||
/**
|
||||
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx?: SxProps<Theme>;
|
||||
} & SystemProps<Theme>;
|
||||
defaultComponent: DefaultComponent;
|
||||
}
|
||||
export type StackProps<RootComponent extends React.ElementType = StackTypeMap['defaultComponent'], AdditionalProps = {
|
||||
component?: React.ElementType;
|
||||
}> = OverrideProps<StackTypeMap<AdditionalProps, RootComponent>, RootComponent>;
|
||||
export interface StackOwnerState {
|
||||
direction: StackProps['direction'];
|
||||
spacing: StackProps['spacing'];
|
||||
useFlexGap: boolean;
|
||||
}
|
||||
5
node_modules/@mui/system/Stack/StackProps.js
generated
vendored
Normal file
5
node_modules/@mui/system/Stack/StackProps.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
24
node_modules/@mui/system/Stack/createStack.d.ts
generated
vendored
Normal file
24
node_modules/@mui/system/Stack/createStack.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import * as React from 'react';
|
||||
import { OverridableComponent } from '@mui/types';
|
||||
import { StackTypeMap, StackOwnerState } from "./StackProps.js";
|
||||
import { Breakpoints } from "../createBreakpoints/createBreakpoints.js";
|
||||
import { Spacing } from "../createTheme/createSpacing.js";
|
||||
interface StyleFunctionProps {
|
||||
theme: {
|
||||
breakpoints: Breakpoints;
|
||||
spacing: Spacing;
|
||||
};
|
||||
ownerState: StackOwnerState;
|
||||
}
|
||||
declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled/index.js").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
|
||||
declare function useThemePropsDefault<T extends {}>(props: T): T;
|
||||
export declare const style: ({
|
||||
ownerState,
|
||||
theme
|
||||
}: StyleFunctionProps) => any;
|
||||
export default function createStack(options?: {
|
||||
createStyledComponent?: typeof defaultCreateStyledComponent;
|
||||
useThemeProps?: typeof useThemePropsDefault;
|
||||
componentName?: string;
|
||||
}): OverridableComponent<StackTypeMap<{}, "div">>;
|
||||
export {};
|
||||
181
node_modules/@mui/system/Stack/createStack.js
generated
vendored
Normal file
181
node_modules/@mui/system/Stack/createStack.js
generated
vendored
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createStack;
|
||||
exports.style = void 0;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _clsx = _interopRequireDefault(require("clsx"));
|
||||
var _deepmerge = _interopRequireDefault(require("@mui/utils/deepmerge"));
|
||||
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
||||
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
||||
var _styled = _interopRequireDefault(require("../styled"));
|
||||
var _useThemeProps = _interopRequireDefault(require("../useThemeProps"));
|
||||
var _styleFunctionSx = require("../styleFunctionSx");
|
||||
var _createTheme = _interopRequireDefault(require("../createTheme"));
|
||||
var _breakpoints = require("../breakpoints");
|
||||
var _spacing = require("../spacing");
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
const defaultTheme = (0, _createTheme.default)();
|
||||
// widening Theme to any so that the consumer can own the theme structure.
|
||||
const defaultCreateStyledComponent = (0, _styled.default)('div', {
|
||||
name: 'MuiStack',
|
||||
slot: 'Root'
|
||||
});
|
||||
function useThemePropsDefault(props) {
|
||||
return (0, _useThemeProps.default)({
|
||||
props,
|
||||
name: 'MuiStack',
|
||||
defaultTheme
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array with the separator React element interspersed between
|
||||
* each React node of the input children.
|
||||
*
|
||||
* > joinChildren([1,2,3], 0)
|
||||
* [1,0,2,0,3]
|
||||
*/
|
||||
function joinChildren(children, separator) {
|
||||
const childrenArray = React.Children.toArray(children).filter(Boolean);
|
||||
return childrenArray.reduce((output, child, index) => {
|
||||
output.push(child);
|
||||
if (index < childrenArray.length - 1) {
|
||||
output.push(/*#__PURE__*/React.cloneElement(separator, {
|
||||
key: `separator-${index}`
|
||||
}));
|
||||
}
|
||||
return output;
|
||||
}, []);
|
||||
}
|
||||
const getSideFromDirection = direction => {
|
||||
return {
|
||||
row: 'Left',
|
||||
'row-reverse': 'Right',
|
||||
column: 'Top',
|
||||
'column-reverse': 'Bottom'
|
||||
}[direction];
|
||||
};
|
||||
const style = ({
|
||||
ownerState,
|
||||
theme
|
||||
}) => {
|
||||
let styles = {
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
...(0, _breakpoints.handleBreakpoints)({
|
||||
theme
|
||||
}, (0, _breakpoints.resolveBreakpointValues)({
|
||||
values: ownerState.direction,
|
||||
breakpoints: theme.breakpoints.values
|
||||
}), propValue => ({
|
||||
flexDirection: propValue
|
||||
}))
|
||||
};
|
||||
if (ownerState.spacing) {
|
||||
const transformer = (0, _spacing.createUnarySpacing)(theme);
|
||||
const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
|
||||
if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {
|
||||
acc[breakpoint] = true;
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
const directionValues = (0, _breakpoints.resolveBreakpointValues)({
|
||||
values: ownerState.direction,
|
||||
base
|
||||
});
|
||||
const spacingValues = (0, _breakpoints.resolveBreakpointValues)({
|
||||
values: ownerState.spacing,
|
||||
base
|
||||
});
|
||||
if (typeof directionValues === 'object') {
|
||||
Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {
|
||||
const directionValue = directionValues[breakpoint];
|
||||
if (!directionValue) {
|
||||
const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
|
||||
directionValues[breakpoint] = previousDirectionValue;
|
||||
}
|
||||
});
|
||||
}
|
||||
const styleFromPropValue = (propValue, breakpoint) => {
|
||||
if (ownerState.useFlexGap) {
|
||||
return {
|
||||
gap: (0, _spacing.getValue)(transformer, propValue)
|
||||
};
|
||||
}
|
||||
return {
|
||||
// The useFlexGap={false} implement relies on each child to give up control of the margin.
|
||||
// We need to reset the margin to avoid double spacing.
|
||||
'& > :not(style):not(style)': {
|
||||
margin: 0
|
||||
},
|
||||
'& > :not(style) ~ :not(style)': {
|
||||
[`margin${getSideFromDirection(breakpoint ? directionValues[breakpoint] : ownerState.direction)}`]: (0, _spacing.getValue)(transformer, propValue)
|
||||
}
|
||||
};
|
||||
};
|
||||
styles = (0, _deepmerge.default)(styles, (0, _breakpoints.handleBreakpoints)({
|
||||
theme
|
||||
}, spacingValues, styleFromPropValue));
|
||||
}
|
||||
styles = (0, _breakpoints.mergeBreakpointsInOrder)(theme.breakpoints, styles);
|
||||
return styles;
|
||||
};
|
||||
exports.style = style;
|
||||
function createStack(options = {}) {
|
||||
const {
|
||||
// This will allow adding custom styled fn (for example for custom sx style function)
|
||||
createStyledComponent = defaultCreateStyledComponent,
|
||||
useThemeProps = useThemePropsDefault,
|
||||
componentName = 'MuiStack'
|
||||
} = options;
|
||||
const useUtilityClasses = () => {
|
||||
const slots = {
|
||||
root: ['root']
|
||||
};
|
||||
return (0, _composeClasses.default)(slots, slot => (0, _generateUtilityClass.default)(componentName, slot), {});
|
||||
};
|
||||
const StackRoot = createStyledComponent(style);
|
||||
const Stack = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
||||
const themeProps = useThemeProps(inProps);
|
||||
const props = (0, _styleFunctionSx.extendSxProp)(themeProps); // `color` type conflicts with html color attribute.
|
||||
const {
|
||||
component = 'div',
|
||||
direction = 'column',
|
||||
spacing = 0,
|
||||
divider,
|
||||
children,
|
||||
className,
|
||||
useFlexGap = false,
|
||||
...other
|
||||
} = props;
|
||||
const ownerState = {
|
||||
direction,
|
||||
spacing,
|
||||
useFlexGap
|
||||
};
|
||||
const classes = useUtilityClasses();
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StackRoot, {
|
||||
as: component,
|
||||
ownerState: ownerState,
|
||||
ref: ref,
|
||||
className: (0, _clsx.default)(classes.root, className),
|
||||
...other,
|
||||
children: divider ? joinChildren(children, divider) : children
|
||||
});
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
|
||||
children: _propTypes.default.node,
|
||||
direction: _propTypes.default.oneOfType([_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), _propTypes.default.object]),
|
||||
divider: _propTypes.default.node,
|
||||
spacing: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
||||
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
||||
} : void 0;
|
||||
return Stack;
|
||||
}
|
||||
5
node_modules/@mui/system/Stack/index.d.ts
generated
vendored
Normal file
5
node_modules/@mui/system/Stack/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export { default } from "./Stack.js";
|
||||
export { default as createStack } from "./createStack.js";
|
||||
export * from "./StackProps.js";
|
||||
export { default as stackClasses } from "./stackClasses.js";
|
||||
export * from "./stackClasses.js";
|
||||
55
node_modules/@mui/system/Stack/index.js
generated
vendored
Normal file
55
node_modules/@mui/system/Stack/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
createStack: true,
|
||||
stackClasses: true
|
||||
};
|
||||
Object.defineProperty(exports, "createStack", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _createStack.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _Stack.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "stackClasses", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _stackClasses.default;
|
||||
}
|
||||
});
|
||||
var _Stack = _interopRequireDefault(require("./Stack"));
|
||||
var _createStack = _interopRequireDefault(require("./createStack"));
|
||||
var _StackProps = require("./StackProps");
|
||||
Object.keys(_StackProps).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _StackProps[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _StackProps[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _stackClasses = _interopRequireWildcard(require("./stackClasses"));
|
||||
Object.keys(_stackClasses).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _stackClasses[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _stackClasses[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
8
node_modules/@mui/system/Stack/stackClasses.d.ts
generated
vendored
Normal file
8
node_modules/@mui/system/Stack/stackClasses.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export interface StackClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
}
|
||||
export type StackClassKey = keyof StackClasses;
|
||||
export declare function getStackUtilityClass(slot: string): string;
|
||||
declare const stackClasses: StackClasses;
|
||||
export default stackClasses;
|
||||
15
node_modules/@mui/system/Stack/stackClasses.js
generated
vendored
Normal file
15
node_modules/@mui/system/Stack/stackClasses.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
exports.getStackUtilityClass = getStackUtilityClass;
|
||||
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
||||
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
||||
function getStackUtilityClass(slot) {
|
||||
return (0, _generateUtilityClass.default)('MuiStack', slot);
|
||||
}
|
||||
const stackClasses = (0, _generateUtilityClasses.default)('MuiStack', ['root']);
|
||||
var _default = exports.default = stackClasses;
|
||||
24
node_modules/@mui/system/ThemeProvider/ThemeProvider.d.ts
generated
vendored
Normal file
24
node_modules/@mui/system/ThemeProvider/ThemeProvider.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { DefaultTheme } from '@mui/private-theming';
|
||||
export interface ThemeProviderProps<Theme = DefaultTheme> {
|
||||
/**
|
||||
* Your component tree.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* The design system's unique id for getting the corresponded theme when there are multiple design systems.
|
||||
*/
|
||||
themeId?: string;
|
||||
/**
|
||||
* A theme object. You can provide a function to extend the outer theme.
|
||||
*/
|
||||
theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
|
||||
}
|
||||
|
||||
/**
|
||||
* This component makes the `theme` available down the React tree.
|
||||
* It should preferably be used at **the root of your component tree**.
|
||||
* API:
|
||||
*
|
||||
* - [ThemeProvider API](https://mui.com/material-ui/customization/theming/#themeprovider)
|
||||
*/
|
||||
export default function ThemeProvider<T = DefaultTheme>(props: ThemeProviderProps<T>): React.ReactElement<ThemeProviderProps<T>>;
|
||||
106
node_modules/@mui/system/ThemeProvider/ThemeProvider.js
generated
vendored
Normal file
106
node_modules/@mui/system/ThemeProvider/ThemeProvider.js
generated
vendored
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _privateTheming = require("@mui/private-theming");
|
||||
var _exactProp = _interopRequireDefault(require("@mui/utils/exactProp"));
|
||||
var _styledEngine = require("@mui/styled-engine");
|
||||
var _useThemeWithoutDefault = _interopRequireDefault(require("../useThemeWithoutDefault"));
|
||||
var _RtlProvider = _interopRequireDefault(require("../RtlProvider"));
|
||||
var _DefaultPropsProvider = _interopRequireDefault(require("../DefaultPropsProvider"));
|
||||
var _useLayerOrder = _interopRequireDefault(require("./useLayerOrder"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
const EMPTY_THEME = {};
|
||||
function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
||||
return React.useMemo(() => {
|
||||
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
||||
if (typeof localTheme === 'function') {
|
||||
const mergedTheme = localTheme(resolvedTheme);
|
||||
const result = themeId ? {
|
||||
...upperTheme,
|
||||
[themeId]: mergedTheme
|
||||
} : mergedTheme;
|
||||
// must return a function for the private theme to NOT merge with the upper theme.
|
||||
// see the test case "use provided theme from a callback" in ThemeProvider.test.js
|
||||
if (isPrivate) {
|
||||
return () => result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return themeId ? {
|
||||
...upperTheme,
|
||||
[themeId]: localTheme
|
||||
} : {
|
||||
...upperTheme,
|
||||
...localTheme
|
||||
};
|
||||
}, [themeId, upperTheme, localTheme, isPrivate]);
|
||||
}
|
||||
|
||||
/**
|
||||
* This component makes the `theme` available down the React tree.
|
||||
* It should preferably be used at **the root of your component tree**.
|
||||
*
|
||||
* <ThemeProvider theme={theme}> // existing use case
|
||||
* <ThemeProvider theme={{ id: theme }}> // theme scoping
|
||||
*/
|
||||
function ThemeProvider(props) {
|
||||
const {
|
||||
children,
|
||||
theme: localTheme,
|
||||
themeId
|
||||
} = props;
|
||||
const upperTheme = (0, _useThemeWithoutDefault.default)(EMPTY_THEME);
|
||||
const upperPrivateTheme = (0, _privateTheming.useTheme)() || EMPTY_THEME;
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {
|
||||
console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
|
||||
}
|
||||
}
|
||||
const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
||||
const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
||||
const rtlValue = (themeId ? engineTheme[themeId] : engineTheme).direction === 'rtl';
|
||||
const layerOrder = (0, _useLayerOrder.default)(engineTheme);
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_privateTheming.ThemeProvider, {
|
||||
theme: privateTheme,
|
||||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledEngine.ThemeContext.Provider, {
|
||||
value: engineTheme,
|
||||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RtlProvider.default, {
|
||||
value: rtlValue,
|
||||
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_DefaultPropsProvider.default, {
|
||||
value: themeId ? engineTheme[themeId].components : engineTheme.components,
|
||||
children: [layerOrder, children]
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
}
|
||||
process.env.NODE_ENV !== "production" ? ThemeProvider.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`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* Your component tree.
|
||||
*/
|
||||
children: _propTypes.default.node,
|
||||
/**
|
||||
* A theme object. You can provide a function to extend the outer theme.
|
||||
*/
|
||||
theme: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]).isRequired,
|
||||
/**
|
||||
* The design system's unique id for getting the corresponded theme when there are multiple design systems.
|
||||
*/
|
||||
themeId: _propTypes.default.string
|
||||
} : void 0;
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = (0, _exactProp.default)(ThemeProvider.propTypes) : void 0;
|
||||
}
|
||||
var _default = exports.default = ThemeProvider;
|
||||
2
node_modules/@mui/system/ThemeProvider/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/system/ThemeProvider/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export { default } from "./ThemeProvider.js";
|
||||
export * from "./ThemeProvider.js";
|
||||
13
node_modules/@mui/system/ThemeProvider/index.js
generated
vendored
Normal file
13
node_modules/@mui/system/ThemeProvider/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _ThemeProvider.default;
|
||||
}
|
||||
});
|
||||
var _ThemeProvider = _interopRequireDefault(require("./ThemeProvider"));
|
||||
8
node_modules/@mui/system/ThemeProvider/useLayerOrder.d.ts
generated
vendored
Normal file
8
node_modules/@mui/system/ThemeProvider/useLayerOrder.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import * as React from 'react';
|
||||
/**
|
||||
* This hook returns a `GlobalStyles` component that sets the CSS layer order (for server-side rendering).
|
||||
* Then on client-side, it injects the CSS layer order into the document head to ensure that the layer order is always present first before other Emotion styles.
|
||||
*/
|
||||
export default function useLayerOrder(theme: {
|
||||
modularCssLayers?: boolean | string;
|
||||
}): React.JSX.Element | null;
|
||||
58
node_modules/@mui/system/ThemeProvider/useLayerOrder.js
generated
vendored
Normal file
58
node_modules/@mui/system/ThemeProvider/useLayerOrder.js
generated
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = useLayerOrder;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
||||
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
||||
var _GlobalStyles = _interopRequireDefault(require("../GlobalStyles"));
|
||||
var _useThemeWithoutDefault = _interopRequireDefault(require("../useThemeWithoutDefault"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
/**
|
||||
* This hook returns a `GlobalStyles` component that sets the CSS layer order (for server-side rendering).
|
||||
* Then on client-side, it injects the CSS layer order into the document head to ensure that the layer order is always present first before other Emotion styles.
|
||||
*/function useLayerOrder(theme) {
|
||||
const upperTheme = (0, _useThemeWithoutDefault.default)();
|
||||
const id = (0, _useId.default)() || '';
|
||||
const {
|
||||
modularCssLayers
|
||||
} = theme;
|
||||
let layerOrder = 'mui.global, mui.components, mui.theme, mui.custom, mui.sx';
|
||||
if (!modularCssLayers || upperTheme !== null) {
|
||||
// skip this hook if upper theme exists.
|
||||
layerOrder = '';
|
||||
} else if (typeof modularCssLayers === 'string') {
|
||||
layerOrder = modularCssLayers.replace(/mui(?!\.)/g, layerOrder);
|
||||
} else {
|
||||
layerOrder = `@layer ${layerOrder};`;
|
||||
}
|
||||
(0, _useEnhancedEffect.default)(() => {
|
||||
const head = document.querySelector('head');
|
||||
if (!head) {
|
||||
return;
|
||||
}
|
||||
const firstChild = head.firstChild;
|
||||
if (layerOrder) {
|
||||
// Only insert if first child doesn't have data-mui-layer-order attribute
|
||||
if (firstChild && firstChild.hasAttribute?.('data-mui-layer-order') && firstChild.getAttribute('data-mui-layer-order') === id) {
|
||||
return;
|
||||
}
|
||||
const styleElement = document.createElement('style');
|
||||
styleElement.setAttribute('data-mui-layer-order', id);
|
||||
styleElement.textContent = layerOrder;
|
||||
head.prepend(styleElement);
|
||||
} else {
|
||||
head.querySelector(`style[data-mui-layer-order="${id}"]`)?.remove();
|
||||
}
|
||||
}, [layerOrder, id]);
|
||||
if (!layerOrder) {
|
||||
return null;
|
||||
}
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GlobalStyles.default, {
|
||||
styles: layerOrder
|
||||
});
|
||||
}
|
||||
15
node_modules/@mui/system/borders/borders.d.ts
generated
vendored
Normal file
15
node_modules/@mui/system/borders/borders.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { PropsFor, SimpleStyleFunction } from "../style/index.js";
|
||||
export const border: SimpleStyleFunction<'border'>;
|
||||
export const borderTop: SimpleStyleFunction<'borderTop'>;
|
||||
export const borderRight: SimpleStyleFunction<'borderRight'>;
|
||||
export const borderBottom: SimpleStyleFunction<'borderBottom'>;
|
||||
export const borderLeft: SimpleStyleFunction<'borderLeft'>;
|
||||
export const borderColor: SimpleStyleFunction<'borderColor'>;
|
||||
export const borderTopColor: SimpleStyleFunction<'borderTopColor'>;
|
||||
export const borderRightColor: SimpleStyleFunction<'borderRightColor'>;
|
||||
export const borderBottomColor: SimpleStyleFunction<'borderBottomColor'>;
|
||||
export const borderLeftColor: SimpleStyleFunction<'borderLeftColor'>;
|
||||
export const borderRadius: SimpleStyleFunction<'borderRadius'>;
|
||||
declare const borders: SimpleStyleFunction<'border' | 'borderTop' | 'borderRight' | 'borderBottom' | 'borderLeft' | 'borderColor' | 'borderRadius'>;
|
||||
export type BordersProps = PropsFor<typeof borders>;
|
||||
export default borders;
|
||||
59
node_modules/@mui/system/borders/borders.js
generated
vendored
Normal file
59
node_modules/@mui/system/borders/borders.js
generated
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.borderTopColor = exports.borderTop = exports.borderRightColor = exports.borderRight = exports.borderRadius = exports.borderLeftColor = exports.borderLeft = exports.borderColor = exports.borderBottomColor = exports.borderBottom = exports.border = void 0;
|
||||
exports.borderTransform = borderTransform;
|
||||
exports.outlineColor = exports.outline = exports.default = void 0;
|
||||
var _responsivePropType = _interopRequireDefault(require("../responsivePropType"));
|
||||
var _style = _interopRequireDefault(require("../style"));
|
||||
var _compose = _interopRequireDefault(require("../compose"));
|
||||
var _spacing = require("../spacing");
|
||||
var _breakpoints = require("../breakpoints");
|
||||
function borderTransform(value) {
|
||||
if (typeof value !== 'number') {
|
||||
return value;
|
||||
}
|
||||
return `${value}px solid`;
|
||||
}
|
||||
function createBorderStyle(prop, transform) {
|
||||
return (0, _style.default)({
|
||||
prop,
|
||||
themeKey: 'borders',
|
||||
transform
|
||||
});
|
||||
}
|
||||
const border = exports.border = createBorderStyle('border', borderTransform);
|
||||
const borderTop = exports.borderTop = createBorderStyle('borderTop', borderTransform);
|
||||
const borderRight = exports.borderRight = createBorderStyle('borderRight', borderTransform);
|
||||
const borderBottom = exports.borderBottom = createBorderStyle('borderBottom', borderTransform);
|
||||
const borderLeft = exports.borderLeft = createBorderStyle('borderLeft', borderTransform);
|
||||
const borderColor = exports.borderColor = createBorderStyle('borderColor');
|
||||
const borderTopColor = exports.borderTopColor = createBorderStyle('borderTopColor');
|
||||
const borderRightColor = exports.borderRightColor = createBorderStyle('borderRightColor');
|
||||
const borderBottomColor = exports.borderBottomColor = createBorderStyle('borderBottomColor');
|
||||
const borderLeftColor = exports.borderLeftColor = createBorderStyle('borderLeftColor');
|
||||
const outline = exports.outline = createBorderStyle('outline', borderTransform);
|
||||
const outlineColor = exports.outlineColor = createBorderStyle('outlineColor');
|
||||
|
||||
// false positive
|
||||
// eslint-disable-next-line react/function-component-definition
|
||||
const borderRadius = props => {
|
||||
if (props.borderRadius !== undefined && props.borderRadius !== null) {
|
||||
const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'shape.borderRadius', 4, 'borderRadius');
|
||||
const styleFromPropValue = propValue => ({
|
||||
borderRadius: (0, _spacing.getValue)(transformer, propValue)
|
||||
});
|
||||
return (0, _breakpoints.handleBreakpoints)(props, props.borderRadius, styleFromPropValue);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
exports.borderRadius = borderRadius;
|
||||
borderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {
|
||||
borderRadius: _responsivePropType.default
|
||||
} : {};
|
||||
borderRadius.filterProps = ['borderRadius'];
|
||||
const borders = (0, _compose.default)(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);
|
||||
var _default = exports.default = borders;
|
||||
2
node_modules/@mui/system/borders/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/system/borders/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export { default } from "./borders.js";
|
||||
export * from "./borders.js";
|
||||
25
node_modules/@mui/system/borders/index.js
generated
vendored
Normal file
25
node_modules/@mui/system/borders/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {};
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _borders.default;
|
||||
}
|
||||
});
|
||||
var _borders = _interopRequireWildcard(require("./borders"));
|
||||
Object.keys(_borders).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _borders[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _borders[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
19
node_modules/@mui/system/breakpoints/breakpoints.d.ts
generated
vendored
Normal file
19
node_modules/@mui/system/breakpoints/breakpoints.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { CSSObject } from '@mui/styled-engine';
|
||||
import { Breakpoints } from "../createBreakpoints/createBreakpoints.js";
|
||||
import type { Breakpoint } from "../createTheme/index.js";
|
||||
import { ResponsiveStyleValue } from "../styleFunctionSx/index.js";
|
||||
import { StyleFunction } from "../style/index.js";
|
||||
export interface ResolveBreakpointValuesOptions<T> {
|
||||
values: ResponsiveStyleValue<T>;
|
||||
breakpoints?: Breakpoints['values'];
|
||||
base?: Record<string, boolean>;
|
||||
}
|
||||
export function resolveBreakpointValues<T>(options: ResolveBreakpointValuesOptions<T>): Record<string, T>;
|
||||
export function mergeBreakpointsInOrder(breakpoints: Breakpoints, styles: CSSObject[]): CSSObject;
|
||||
export function handleBreakpoints<Props>(props: Props, propValue: any, styleFromPropValue: (value: any, breakpoint?: Breakpoint) => any): any;
|
||||
type DefaultBreakPoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
||||
|
||||
/**
|
||||
* @returns An enhanced stylefunction that considers breakpoints
|
||||
*/
|
||||
export default function breakpoints<Props, Breakpoints extends string = DefaultBreakPoints>(styleFunction: StyleFunction<Props>): StyleFunction<Partial<Record<Breakpoints, Props>> & Props>;
|
||||
184
node_modules/@mui/system/breakpoints/breakpoints.js
generated
vendored
Normal file
184
node_modules/@mui/system/breakpoints/breakpoints.js
generated
vendored
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.computeBreakpointsBase = computeBreakpointsBase;
|
||||
exports.createEmptyBreakpointObject = createEmptyBreakpointObject;
|
||||
exports.default = void 0;
|
||||
exports.handleBreakpoints = handleBreakpoints;
|
||||
exports.mergeBreakpointsInOrder = mergeBreakpointsInOrder;
|
||||
exports.removeUnusedBreakpoints = removeUnusedBreakpoints;
|
||||
exports.resolveBreakpointValues = resolveBreakpointValues;
|
||||
exports.values = void 0;
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _deepmerge = _interopRequireDefault(require("@mui/utils/deepmerge"));
|
||||
var _merge = _interopRequireDefault(require("../merge"));
|
||||
var _cssContainerQueries = require("../cssContainerQueries");
|
||||
// The breakpoint **start** at this value.
|
||||
// For instance with the first breakpoint xs: [xs, sm[.
|
||||
const values = exports.values = {
|
||||
xs: 0,
|
||||
// phone
|
||||
sm: 600,
|
||||
// tablet
|
||||
md: 900,
|
||||
// small laptop
|
||||
lg: 1200,
|
||||
// desktop
|
||||
xl: 1536 // large screen
|
||||
};
|
||||
const defaultBreakpoints = {
|
||||
// Sorted ASC by size. That's important.
|
||||
// It can't be configured as it's used statically for propTypes.
|
||||
keys: ['xs', 'sm', 'md', 'lg', 'xl'],
|
||||
up: key => `@media (min-width:${values[key]}px)`
|
||||
};
|
||||
const defaultContainerQueries = {
|
||||
containerQueries: containerName => ({
|
||||
up: key => {
|
||||
let result = typeof key === 'number' ? key : values[key] || key;
|
||||
if (typeof result === 'number') {
|
||||
result = `${result}px`;
|
||||
}
|
||||
return containerName ? `@container ${containerName} (min-width:${result})` : `@container (min-width:${result})`;
|
||||
}
|
||||
})
|
||||
};
|
||||
function handleBreakpoints(props, propValue, styleFromPropValue) {
|
||||
const theme = props.theme || {};
|
||||
if (Array.isArray(propValue)) {
|
||||
const themeBreakpoints = theme.breakpoints || defaultBreakpoints;
|
||||
return propValue.reduce((acc, item, index) => {
|
||||
acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
if (typeof propValue === 'object') {
|
||||
const themeBreakpoints = theme.breakpoints || defaultBreakpoints;
|
||||
return Object.keys(propValue).reduce((acc, breakpoint) => {
|
||||
if ((0, _cssContainerQueries.isCqShorthand)(themeBreakpoints.keys, breakpoint)) {
|
||||
const containerKey = (0, _cssContainerQueries.getContainerQuery)(theme.containerQueries ? theme : defaultContainerQueries, breakpoint);
|
||||
if (containerKey) {
|
||||
acc[containerKey] = styleFromPropValue(propValue[breakpoint], breakpoint);
|
||||
}
|
||||
}
|
||||
// key is breakpoint
|
||||
else if (Object.keys(themeBreakpoints.values || values).includes(breakpoint)) {
|
||||
const mediaKey = themeBreakpoints.up(breakpoint);
|
||||
acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);
|
||||
} else {
|
||||
const cssKey = breakpoint;
|
||||
acc[cssKey] = propValue[cssKey];
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
const output = styleFromPropValue(propValue);
|
||||
return output;
|
||||
}
|
||||
function breakpoints(styleFunction) {
|
||||
// false positive
|
||||
// eslint-disable-next-line react/function-component-definition
|
||||
const newStyleFunction = props => {
|
||||
const theme = props.theme || {};
|
||||
const base = styleFunction(props);
|
||||
const themeBreakpoints = theme.breakpoints || defaultBreakpoints;
|
||||
const extended = themeBreakpoints.keys.reduce((acc, key) => {
|
||||
if (props[key]) {
|
||||
acc = acc || {};
|
||||
acc[themeBreakpoints.up(key)] = styleFunction({
|
||||
theme,
|
||||
...props[key]
|
||||
});
|
||||
}
|
||||
return acc;
|
||||
}, null);
|
||||
return (0, _merge.default)(base, extended);
|
||||
};
|
||||
newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? {
|
||||
...styleFunction.propTypes,
|
||||
xs: _propTypes.default.object,
|
||||
sm: _propTypes.default.object,
|
||||
md: _propTypes.default.object,
|
||||
lg: _propTypes.default.object,
|
||||
xl: _propTypes.default.object
|
||||
} : {};
|
||||
newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];
|
||||
return newStyleFunction;
|
||||
}
|
||||
function createEmptyBreakpointObject(breakpointsInput = {}) {
|
||||
const breakpointsInOrder = breakpointsInput.keys?.reduce((acc, key) => {
|
||||
const breakpointStyleKey = breakpointsInput.up(key);
|
||||
acc[breakpointStyleKey] = {};
|
||||
return acc;
|
||||
}, {});
|
||||
return breakpointsInOrder || {};
|
||||
}
|
||||
function removeUnusedBreakpoints(breakpointKeys, style) {
|
||||
return breakpointKeys.reduce((acc, key) => {
|
||||
const breakpointOutput = acc[key];
|
||||
const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;
|
||||
if (isBreakpointUnused) {
|
||||
delete acc[key];
|
||||
}
|
||||
return acc;
|
||||
}, style);
|
||||
}
|
||||
function mergeBreakpointsInOrder(breakpointsInput, ...styles) {
|
||||
const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);
|
||||
const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => (0, _deepmerge.default)(prev, next), {});
|
||||
return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);
|
||||
}
|
||||
|
||||
// compute base for responsive values; e.g.,
|
||||
// [1,2,3] => {xs: true, sm: true, md: true}
|
||||
// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}
|
||||
function computeBreakpointsBase(breakpointValues, themeBreakpoints) {
|
||||
// fixed value
|
||||
if (typeof breakpointValues !== 'object') {
|
||||
return {};
|
||||
}
|
||||
const base = {};
|
||||
const breakpointsKeys = Object.keys(themeBreakpoints);
|
||||
if (Array.isArray(breakpointValues)) {
|
||||
breakpointsKeys.forEach((breakpoint, i) => {
|
||||
if (i < breakpointValues.length) {
|
||||
base[breakpoint] = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
breakpointsKeys.forEach(breakpoint => {
|
||||
if (breakpointValues[breakpoint] != null) {
|
||||
base[breakpoint] = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
return base;
|
||||
}
|
||||
function resolveBreakpointValues({
|
||||
values: breakpointValues,
|
||||
breakpoints: themeBreakpoints,
|
||||
base: customBase
|
||||
}) {
|
||||
const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);
|
||||
const keys = Object.keys(base);
|
||||
if (keys.length === 0) {
|
||||
return breakpointValues;
|
||||
}
|
||||
let previous;
|
||||
return keys.reduce((acc, breakpoint, i) => {
|
||||
if (Array.isArray(breakpointValues)) {
|
||||
acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];
|
||||
previous = i;
|
||||
} else if (typeof breakpointValues === 'object') {
|
||||
acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];
|
||||
previous = breakpoint;
|
||||
} else {
|
||||
acc[breakpoint] = breakpointValues;
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
var _default = exports.default = breakpoints;
|
||||
2
node_modules/@mui/system/breakpoints/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/system/breakpoints/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export { default } from "./breakpoints.js";
|
||||
export * from "./breakpoints.js";
|
||||
25
node_modules/@mui/system/breakpoints/index.js
generated
vendored
Normal file
25
node_modules/@mui/system/breakpoints/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {};
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _breakpoints.default;
|
||||
}
|
||||
});
|
||||
var _breakpoints = _interopRequireWildcard(require("./breakpoints"));
|
||||
Object.keys(_breakpoints).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _breakpoints[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _breakpoints[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
25
node_modules/@mui/system/colorManipulator/colorManipulator.d.ts
generated
vendored
Normal file
25
node_modules/@mui/system/colorManipulator/colorManipulator.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
export type ColorFormat = 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'color';
|
||||
export interface ColorObject {
|
||||
type: ColorFormat;
|
||||
values: [number, number, number] | [number, number, number, number];
|
||||
colorSpace?: 'srgb' | 'display-p3' | 'a98-rgb' | 'prophoto-rgb' | 'rec-2020';
|
||||
}
|
||||
export function hexToRgb(hex: string): string;
|
||||
export function rgbToHex(color: string): string;
|
||||
export function hslToRgb(color: string): string;
|
||||
export function decomposeColor(color: string): ColorObject;
|
||||
export function colorChannel(color: string): string;
|
||||
export function private_safeColorChannel(color: string, warning?: string): string;
|
||||
export function recomposeColor(color: ColorObject): string;
|
||||
export function getContrastRatio(foreground: string, background: string): number;
|
||||
export function getLuminance(color: string): number;
|
||||
export function emphasize(color: string, coefficient?: number): string;
|
||||
export function private_safeEmphasize(color: string, coefficient?: number, warning?: string): string;
|
||||
export function alpha(color: string, value: number): string;
|
||||
export function private_safeAlpha(color: string, value: number, warning?: string): string;
|
||||
export function darken(color: string, coefficient: number): string;
|
||||
export function private_safeDarken(color: string, coefficient: number, warning?: string): string;
|
||||
export function lighten(color: string, coefficient: number): string;
|
||||
export function private_safeLighten(color: string, coefficient: number, warning?: string): string;
|
||||
export function blend(background: string, overlay: string, opacity: number, gamma?: number): string;
|
||||
375
node_modules/@mui/system/colorManipulator/colorManipulator.js
generated
vendored
Normal file
375
node_modules/@mui/system/colorManipulator/colorManipulator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,375 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.alpha = alpha;
|
||||
exports.blend = blend;
|
||||
exports.colorChannel = void 0;
|
||||
exports.darken = darken;
|
||||
exports.decomposeColor = decomposeColor;
|
||||
exports.emphasize = emphasize;
|
||||
exports.getContrastRatio = getContrastRatio;
|
||||
exports.getLuminance = getLuminance;
|
||||
exports.hexToRgb = hexToRgb;
|
||||
exports.hslToRgb = hslToRgb;
|
||||
exports.lighten = lighten;
|
||||
exports.private_safeAlpha = private_safeAlpha;
|
||||
exports.private_safeColorChannel = void 0;
|
||||
exports.private_safeDarken = private_safeDarken;
|
||||
exports.private_safeEmphasize = private_safeEmphasize;
|
||||
exports.private_safeLighten = private_safeLighten;
|
||||
exports.recomposeColor = recomposeColor;
|
||||
exports.rgbToHex = rgbToHex;
|
||||
var _formatMuiErrorMessage = _interopRequireDefault(require("@mui/utils/formatMuiErrorMessage"));
|
||||
var _clamp = _interopRequireDefault(require("@mui/utils/clamp"));
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
|
||||
/**
|
||||
* Returns a number whose value is limited to the given range.
|
||||
* @param {number} value The value to be clamped
|
||||
* @param {number} min The lower boundary of the output range
|
||||
* @param {number} max The upper boundary of the output range
|
||||
* @returns {number} A number in the range [min, max]
|
||||
*/
|
||||
function clampWrapper(value, min = 0, max = 1) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (value < min || value > max) {
|
||||
console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);
|
||||
}
|
||||
}
|
||||
return (0, _clamp.default)(value, min, max);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a color from CSS hex format to CSS rgb format.
|
||||
* @param {string} color - Hex color, i.e. #nnn or #nnnnnn
|
||||
* @returns {string} A CSS rgb color string
|
||||
*/
|
||||
function hexToRgb(color) {
|
||||
color = color.slice(1);
|
||||
const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');
|
||||
let colors = color.match(re);
|
||||
if (colors && colors[0].length === 1) {
|
||||
colors = colors.map(n => n + n);
|
||||
}
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (color.length !== color.trim().length) {
|
||||
console.error(`MUI: The color: "${color}" is invalid. Make sure the color input doesn't contain leading/trailing space.`);
|
||||
}
|
||||
}
|
||||
return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {
|
||||
return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;
|
||||
}).join(', ')})` : '';
|
||||
}
|
||||
function intToHex(int) {
|
||||
const hex = int.toString(16);
|
||||
return hex.length === 1 ? `0${hex}` : hex;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an object with the type and values of a color.
|
||||
*
|
||||
* Note: Does not support rgb % values.
|
||||
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
|
||||
* @returns {object} - A MUI color object: {type: string, values: number[]}
|
||||
*/
|
||||
function decomposeColor(color) {
|
||||
// Idempotent
|
||||
if (color.type) {
|
||||
return color;
|
||||
}
|
||||
if (color.charAt(0) === '#') {
|
||||
return decomposeColor(hexToRgb(color));
|
||||
}
|
||||
const marker = color.indexOf('(');
|
||||
const type = color.substring(0, marker);
|
||||
if (!['rgb', 'rgba', 'hsl', 'hsla', 'color'].includes(type)) {
|
||||
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported \`${color}\` color.\n` + 'The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().' : (0, _formatMuiErrorMessage.default)(9, color));
|
||||
}
|
||||
let values = color.substring(marker + 1, color.length - 1);
|
||||
let colorSpace;
|
||||
if (type === 'color') {
|
||||
values = values.split(' ');
|
||||
colorSpace = values.shift();
|
||||
if (values.length === 4 && values[3].charAt(0) === '/') {
|
||||
values[3] = values[3].slice(1);
|
||||
}
|
||||
if (!['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].includes(colorSpace)) {
|
||||
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: unsupported \`${colorSpace}\` color space.\n` + 'The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.' : (0, _formatMuiErrorMessage.default)(10, colorSpace));
|
||||
}
|
||||
} else {
|
||||
values = values.split(',');
|
||||
}
|
||||
values = values.map(value => parseFloat(value));
|
||||
return {
|
||||
type,
|
||||
values,
|
||||
colorSpace
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a channel created from the input color.
|
||||
*
|
||||
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
|
||||
* @returns {string} - The channel for the color, that can be used in rgba or hsla colors
|
||||
*/
|
||||
const colorChannel = color => {
|
||||
const decomposedColor = decomposeColor(color);
|
||||
return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.includes('hsl') && idx !== 0 ? `${val}%` : val).join(' ');
|
||||
};
|
||||
exports.colorChannel = colorChannel;
|
||||
const private_safeColorChannel = (color, warning) => {
|
||||
try {
|
||||
return colorChannel(color);
|
||||
} catch (error) {
|
||||
if (warning && process.env.NODE_ENV !== 'production') {
|
||||
console.warn(warning);
|
||||
}
|
||||
return color;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a color object with type and values to a string.
|
||||
* @param {object} color - Decomposed color
|
||||
* @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'
|
||||
* @param {array} color.values - [n,n,n] or [n,n,n,n]
|
||||
* @returns {string} A CSS color string
|
||||
*/
|
||||
exports.private_safeColorChannel = private_safeColorChannel;
|
||||
function recomposeColor(color) {
|
||||
const {
|
||||
type,
|
||||
colorSpace
|
||||
} = color;
|
||||
let {
|
||||
values
|
||||
} = color;
|
||||
if (type.includes('rgb')) {
|
||||
// Only convert the first 3 values to int (i.e. not alpha)
|
||||
values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);
|
||||
} else if (type.includes('hsl')) {
|
||||
values[1] = `${values[1]}%`;
|
||||
values[2] = `${values[2]}%`;
|
||||
}
|
||||
if (type.includes('color')) {
|
||||
values = `${colorSpace} ${values.join(' ')}`;
|
||||
} else {
|
||||
values = `${values.join(', ')}`;
|
||||
}
|
||||
return `${type}(${values})`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a color from CSS rgb format to CSS hex format.
|
||||
* @param {string} color - RGB color, i.e. rgb(n, n, n)
|
||||
* @returns {string} A CSS rgb color string, i.e. #nnnnnn
|
||||
*/
|
||||
function rgbToHex(color) {
|
||||
// Idempotent
|
||||
if (color.startsWith('#')) {
|
||||
return color;
|
||||
}
|
||||
const {
|
||||
values
|
||||
} = decomposeColor(color);
|
||||
return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a color from hsl format to rgb format.
|
||||
* @param {string} color - HSL color values
|
||||
* @returns {string} rgb color values
|
||||
*/
|
||||
function hslToRgb(color) {
|
||||
color = decomposeColor(color);
|
||||
const {
|
||||
values
|
||||
} = color;
|
||||
const h = values[0];
|
||||
const s = values[1] / 100;
|
||||
const l = values[2] / 100;
|
||||
const a = s * Math.min(l, 1 - l);
|
||||
const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
||||
let type = 'rgb';
|
||||
const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];
|
||||
if (color.type === 'hsla') {
|
||||
type += 'a';
|
||||
rgb.push(values[3]);
|
||||
}
|
||||
return recomposeColor({
|
||||
type,
|
||||
values: rgb
|
||||
});
|
||||
}
|
||||
/**
|
||||
* The relative brightness of any point in a color space,
|
||||
* normalized to 0 for darkest black and 1 for lightest white.
|
||||
*
|
||||
* Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
|
||||
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
|
||||
* @returns {number} The relative brightness of the color in the range 0 - 1
|
||||
*/
|
||||
function getLuminance(color) {
|
||||
color = decomposeColor(color);
|
||||
let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;
|
||||
rgb = rgb.map(val => {
|
||||
if (color.type !== 'color') {
|
||||
val /= 255; // normalized
|
||||
}
|
||||
return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;
|
||||
});
|
||||
|
||||
// Truncate at 3 digits
|
||||
return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the contrast ratio between two colors.
|
||||
*
|
||||
* Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
|
||||
* @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
|
||||
* @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
|
||||
* @returns {number} A contrast ratio value in the range 0 - 21.
|
||||
*/
|
||||
function getContrastRatio(foreground, background) {
|
||||
const lumA = getLuminance(foreground);
|
||||
const lumB = getLuminance(background);
|
||||
return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the absolute transparency of a color.
|
||||
* Any existing alpha values are overwritten.
|
||||
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
|
||||
* @param {number} value - value to set the alpha channel to in the range 0 - 1
|
||||
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
||||
*/
|
||||
function alpha(color, value) {
|
||||
color = decomposeColor(color);
|
||||
value = clampWrapper(value);
|
||||
if (color.type === 'rgb' || color.type === 'hsl') {
|
||||
color.type += 'a';
|
||||
}
|
||||
if (color.type === 'color') {
|
||||
color.values[3] = `/${value}`;
|
||||
} else {
|
||||
color.values[3] = value;
|
||||
}
|
||||
return recomposeColor(color);
|
||||
}
|
||||
function private_safeAlpha(color, value, warning) {
|
||||
try {
|
||||
return alpha(color, value);
|
||||
} catch (error) {
|
||||
if (warning && process.env.NODE_ENV !== 'production') {
|
||||
console.warn(warning);
|
||||
}
|
||||
return color;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Darkens a color.
|
||||
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
|
||||
* @param {number} coefficient - multiplier in the range 0 - 1
|
||||
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
||||
*/
|
||||
function darken(color, coefficient) {
|
||||
color = decomposeColor(color);
|
||||
coefficient = clampWrapper(coefficient);
|
||||
if (color.type.includes('hsl')) {
|
||||
color.values[2] *= 1 - coefficient;
|
||||
} else if (color.type.includes('rgb') || color.type.includes('color')) {
|
||||
for (let i = 0; i < 3; i += 1) {
|
||||
color.values[i] *= 1 - coefficient;
|
||||
}
|
||||
}
|
||||
return recomposeColor(color);
|
||||
}
|
||||
function private_safeDarken(color, coefficient, warning) {
|
||||
try {
|
||||
return darken(color, coefficient);
|
||||
} catch (error) {
|
||||
if (warning && process.env.NODE_ENV !== 'production') {
|
||||
console.warn(warning);
|
||||
}
|
||||
return color;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lightens a color.
|
||||
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
|
||||
* @param {number} coefficient - multiplier in the range 0 - 1
|
||||
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
||||
*/
|
||||
function lighten(color, coefficient) {
|
||||
color = decomposeColor(color);
|
||||
coefficient = clampWrapper(coefficient);
|
||||
if (color.type.includes('hsl')) {
|
||||
color.values[2] += (100 - color.values[2]) * coefficient;
|
||||
} else if (color.type.includes('rgb')) {
|
||||
for (let i = 0; i < 3; i += 1) {
|
||||
color.values[i] += (255 - color.values[i]) * coefficient;
|
||||
}
|
||||
} else if (color.type.includes('color')) {
|
||||
for (let i = 0; i < 3; i += 1) {
|
||||
color.values[i] += (1 - color.values[i]) * coefficient;
|
||||
}
|
||||
}
|
||||
return recomposeColor(color);
|
||||
}
|
||||
function private_safeLighten(color, coefficient, warning) {
|
||||
try {
|
||||
return lighten(color, coefficient);
|
||||
} catch (error) {
|
||||
if (warning && process.env.NODE_ENV !== 'production') {
|
||||
console.warn(warning);
|
||||
}
|
||||
return color;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Darken or lighten a color, depending on its luminance.
|
||||
* Light colors are darkened, dark colors are lightened.
|
||||
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
|
||||
* @param {number} coefficient=0.15 - multiplier in the range 0 - 1
|
||||
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
||||
*/
|
||||
function emphasize(color, coefficient = 0.15) {
|
||||
return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
|
||||
}
|
||||
function private_safeEmphasize(color, coefficient, warning) {
|
||||
try {
|
||||
return emphasize(color, coefficient);
|
||||
} catch (error) {
|
||||
if (warning && process.env.NODE_ENV !== 'production') {
|
||||
console.warn(warning);
|
||||
}
|
||||
return color;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Blend a transparent overlay color with a background color, resulting in a single
|
||||
* RGB color.
|
||||
* @param {string} background - CSS color
|
||||
* @param {string} overlay - CSS color
|
||||
* @param {number} opacity - Opacity multiplier in the range 0 - 1
|
||||
* @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.
|
||||
*/
|
||||
function blend(background, overlay, opacity, gamma = 1.0) {
|
||||
const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);
|
||||
const backgroundColor = decomposeColor(background);
|
||||
const overlayColor = decomposeColor(overlay);
|
||||
const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];
|
||||
return recomposeColor({
|
||||
type: 'rgb',
|
||||
values: rgb
|
||||
});
|
||||
}
|
||||
1
node_modules/@mui/system/colorManipulator/index.d.ts
generated
vendored
Normal file
1
node_modules/@mui/system/colorManipulator/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./colorManipulator.js";
|
||||
16
node_modules/@mui/system/colorManipulator/index.js
generated
vendored
Normal file
16
node_modules/@mui/system/colorManipulator/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _colorManipulator = require("./colorManipulator");
|
||||
Object.keys(_colorManipulator).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _colorManipulator[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _colorManipulator[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
15
node_modules/@mui/system/compose/compose.d.ts
generated
vendored
Normal file
15
node_modules/@mui/system/compose/compose.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { StyleFunction } from "../style/index.js";
|
||||
|
||||
/**
|
||||
* given a list of StyleFunction return the intersection of the props each individual
|
||||
* StyleFunction requires.
|
||||
*
|
||||
* If `firstFn` requires { color: string } and `secondFn` requires { spacing: number }
|
||||
* their composed function requires { color: string, spacing: number }
|
||||
*/
|
||||
type ComposedArg<T> = T extends Array<(arg: infer P) => any> ? P : never;
|
||||
type ComposedOwnerState<T> = ComposedArg<T>;
|
||||
export type ComposedStyleFunction<T extends Array<StyleFunction<any>>> = StyleFunction<ComposedOwnerState<T>> & {
|
||||
filterProps: string[];
|
||||
};
|
||||
export default function compose<T extends Array<StyleFunction<any>>>(...args: T): ComposedStyleFunction<T>;
|
||||
31
node_modules/@mui/system/compose/compose.js
generated
vendored
Normal file
31
node_modules/@mui/system/compose/compose.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _merge = _interopRequireDefault(require("../merge"));
|
||||
function compose(...styles) {
|
||||
const handlers = styles.reduce((acc, style) => {
|
||||
style.filterProps.forEach(prop => {
|
||||
acc[prop] = style;
|
||||
});
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
// false positive
|
||||
// eslint-disable-next-line react/function-component-definition
|
||||
const fn = props => {
|
||||
return Object.keys(props).reduce((acc, prop) => {
|
||||
if (handlers[prop]) {
|
||||
return (0, _merge.default)(acc, handlers[prop](props));
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
};
|
||||
fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};
|
||||
fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);
|
||||
return fn;
|
||||
}
|
||||
var _default = exports.default = compose;
|
||||
1
node_modules/@mui/system/compose/index.d.ts
generated
vendored
Normal file
1
node_modules/@mui/system/compose/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export { default, type ComposedStyleFunction } from "./compose.js";
|
||||
13
node_modules/@mui/system/compose/index.js
generated
vendored
Normal file
13
node_modules/@mui/system/compose/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _compose.default;
|
||||
}
|
||||
});
|
||||
var _compose = _interopRequireDefault(require("./compose"));
|
||||
9
node_modules/@mui/system/createBox/createBox.d.ts
generated
vendored
Normal file
9
node_modules/@mui/system/createBox/createBox.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { OverridableComponent } from '@mui/types';
|
||||
import { BoxTypeMap } from "../Box/index.js";
|
||||
import { Theme as SystemTheme } from "../createTheme/index.js";
|
||||
export default function createBox<T extends object = SystemTheme, AdditionalProps extends Record<string, unknown> = {}>(options?: {
|
||||
themeId?: string;
|
||||
defaultTheme: T;
|
||||
defaultClassName?: string;
|
||||
generateClassName?: (componentName: string) => string;
|
||||
}): OverridableComponent<BoxTypeMap<AdditionalProps, 'div', T>>;
|
||||
42
node_modules/@mui/system/createBox/createBox.js
generated
vendored
Normal file
42
node_modules/@mui/system/createBox/createBox.js
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createBox;
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _clsx = _interopRequireDefault(require("clsx"));
|
||||
var _styledEngine = _interopRequireDefault(require("@mui/styled-engine"));
|
||||
var _styleFunctionSx = _interopRequireWildcard(require("../styleFunctionSx"));
|
||||
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
function createBox(options = {}) {
|
||||
const {
|
||||
themeId,
|
||||
defaultTheme,
|
||||
defaultClassName = 'MuiBox-root',
|
||||
generateClassName
|
||||
} = options;
|
||||
const BoxRoot = (0, _styledEngine.default)('div', {
|
||||
shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
|
||||
})(_styleFunctionSx.default);
|
||||
const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {
|
||||
const theme = (0, _useTheme.default)(defaultTheme);
|
||||
const {
|
||||
className,
|
||||
component = 'div',
|
||||
...other
|
||||
} = (0, _styleFunctionSx.extendSxProp)(inProps);
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(BoxRoot, {
|
||||
as: component,
|
||||
ref: ref,
|
||||
className: (0, _clsx.default)(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
|
||||
theme: themeId ? theme[themeId] || theme : theme,
|
||||
...other
|
||||
});
|
||||
});
|
||||
return Box;
|
||||
}
|
||||
1
node_modules/@mui/system/createBox/index.d.ts
generated
vendored
Normal file
1
node_modules/@mui/system/createBox/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export { default } from "./createBox.js";
|
||||
13
node_modules/@mui/system/createBox/index.js
generated
vendored
Normal file
13
node_modules/@mui/system/createBox/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _createBox.default;
|
||||
}
|
||||
});
|
||||
var _createBox = _interopRequireDefault(require("./createBox"));
|
||||
78
node_modules/@mui/system/createBreakpoints/createBreakpoints.d.ts
generated
vendored
Normal file
78
node_modules/@mui/system/createBreakpoints/createBreakpoints.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
import { OverridableStringUnion } from '@mui/types';
|
||||
export interface BreakpointOverrides {}
|
||||
export type Breakpoint = OverridableStringUnion<'xs' | 'sm' | 'md' | 'lg' | 'xl', BreakpointOverrides>;
|
||||
export const keys: Breakpoint[];
|
||||
|
||||
// Keep in sync with docs/src/pages/customization/breakpoints/breakpoints.md
|
||||
// #host-reference
|
||||
export interface Breakpoints {
|
||||
keys: Breakpoint[];
|
||||
/**
|
||||
* Each breakpoint (a key) matches with a fixed screen width (a value).
|
||||
* @default {
|
||||
* // extra-small
|
||||
* xs: 0,
|
||||
* // small
|
||||
* sm: 600,
|
||||
* // medium
|
||||
* md: 900,
|
||||
* // large
|
||||
* lg: 1200,
|
||||
* // extra-large
|
||||
* xl: 1536,
|
||||
* }
|
||||
*/
|
||||
values: { [key in Breakpoint]: number };
|
||||
/**
|
||||
* @param key - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
|
||||
* @returns A media query string ready to be used with most styling solutions, which matches screen widths greater than the screen size given by the breakpoint key (inclusive).
|
||||
* @see [API documentation](https://mui.com/material-ui/customization/breakpoints/#theme-breakpoints-up-key-media-query)
|
||||
*/
|
||||
up: (key: Breakpoint | number) => string;
|
||||
/**
|
||||
* @param key - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
|
||||
* @returns A media query string ready to be used with most styling solutions, which matches screen widths less than the screen size given by the breakpoint key (exclusive).
|
||||
* @see [API documentation](https://mui.com/material-ui/customization/breakpoints/#theme-breakpoints-down-key-media-query)
|
||||
*/
|
||||
down: (key: Breakpoint | number) => string;
|
||||
/**
|
||||
* @param start - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
|
||||
* @param end - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
|
||||
* @returns A media query string ready to be used with most styling solutions, which matches screen widths greater than
|
||||
* the screen size given by the breakpoint key in the first argument (inclusive) and less than the screen size given by the breakpoint key in the second argument (exclusive).
|
||||
* @see [API documentation](https://mui.com/material-ui/customization/breakpoints/#theme-breakpoints-between-start-end-media-query)
|
||||
*/
|
||||
between: (start: Breakpoint | number, end: Breakpoint | number) => string;
|
||||
/**
|
||||
* @param key - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
|
||||
* @returns A media query string ready to be used with most styling solutions, which matches screen widths starting from
|
||||
* the screen size given by the breakpoint key (inclusive) and stopping at the screen size given by the next breakpoint key (exclusive).
|
||||
* @see [API documentation](https://mui.com/material-ui/customization/breakpoints/#theme-breakpoints-only-key-media-query)
|
||||
*/
|
||||
only: (key: Breakpoint) => string;
|
||||
/**
|
||||
* @param key - A breakpoint key (`xs`, `sm`, etc.).
|
||||
* @returns A media query string ready to be used with most styling solutions, which matches screen widths stopping at
|
||||
* the screen size given by the breakpoint key (exclusive) and starting at the screen size given by the next breakpoint key (inclusive).
|
||||
*/
|
||||
not: (key: Breakpoint) => string;
|
||||
/**
|
||||
* The unit used for the breakpoint's values.
|
||||
* @default 'px'
|
||||
*/
|
||||
unit?: string | undefined;
|
||||
}
|
||||
export interface BreakpointsOptions extends Partial<Breakpoints> {
|
||||
/**
|
||||
* The increment divided by 100 used to implement exclusive breakpoints.
|
||||
* For example, `step: 5` means that `down(500)` will result in `'(max-width: 499.95px)'`.
|
||||
* @default 5
|
||||
*/
|
||||
step?: number | undefined;
|
||||
/**
|
||||
* The unit used for the breakpoint's values.
|
||||
* @default 'px'
|
||||
*/
|
||||
unit?: string | undefined;
|
||||
}
|
||||
export default function createBreakpoints(options: BreakpointsOptions): Breakpoints;
|
||||
88
node_modules/@mui/system/createBreakpoints/createBreakpoints.js
generated
vendored
Normal file
88
node_modules/@mui/system/createBreakpoints/createBreakpoints.js
generated
vendored
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.breakpointKeys = void 0;
|
||||
exports.default = createBreakpoints;
|
||||
// Sorted ASC by size. That's important.
|
||||
// It can't be configured as it's used statically for propTypes.
|
||||
const breakpointKeys = exports.breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];
|
||||
const sortBreakpointsValues = values => {
|
||||
const breakpointsAsArray = Object.keys(values).map(key => ({
|
||||
key,
|
||||
val: values[key]
|
||||
})) || [];
|
||||
// Sort in ascending order
|
||||
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
||||
return breakpointsAsArray.reduce((acc, obj) => {
|
||||
return {
|
||||
...acc,
|
||||
[obj.key]: obj.val
|
||||
};
|
||||
}, {});
|
||||
};
|
||||
|
||||
// Keep in mind that @media is inclusive by the CSS specification.
|
||||
function createBreakpoints(breakpoints) {
|
||||
const {
|
||||
// The breakpoint **start** at this value.
|
||||
// For instance with the first breakpoint xs: [xs, sm).
|
||||
values = {
|
||||
xs: 0,
|
||||
// phone
|
||||
sm: 600,
|
||||
// tablet
|
||||
md: 900,
|
||||
// small laptop
|
||||
lg: 1200,
|
||||
// desktop
|
||||
xl: 1536 // large screen
|
||||
},
|
||||
unit = 'px',
|
||||
step = 5,
|
||||
...other
|
||||
} = breakpoints;
|
||||
const sortedValues = sortBreakpointsValues(values);
|
||||
const keys = Object.keys(sortedValues);
|
||||
function up(key) {
|
||||
const value = typeof values[key] === 'number' ? values[key] : key;
|
||||
return `@media (min-width:${value}${unit})`;
|
||||
}
|
||||
function down(key) {
|
||||
const value = typeof values[key] === 'number' ? values[key] : key;
|
||||
return `@media (max-width:${value - step / 100}${unit})`;
|
||||
}
|
||||
function between(start, end) {
|
||||
const endIndex = keys.indexOf(end);
|
||||
return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;
|
||||
}
|
||||
function only(key) {
|
||||
if (keys.indexOf(key) + 1 < keys.length) {
|
||||
return between(key, keys[keys.indexOf(key) + 1]);
|
||||
}
|
||||
return up(key);
|
||||
}
|
||||
function not(key) {
|
||||
// handle first and last key separately, for better readability
|
||||
const keyIndex = keys.indexOf(key);
|
||||
if (keyIndex === 0) {
|
||||
return up(keys[1]);
|
||||
}
|
||||
if (keyIndex === keys.length - 1) {
|
||||
return down(keys[keyIndex]);
|
||||
}
|
||||
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
||||
}
|
||||
return {
|
||||
keys,
|
||||
values: sortedValues,
|
||||
up,
|
||||
down,
|
||||
between,
|
||||
only,
|
||||
not,
|
||||
unit,
|
||||
...other
|
||||
};
|
||||
}
|
||||
3
node_modules/@mui/system/createBreakpoints/index.d.ts
generated
vendored
Normal file
3
node_modules/@mui/system/createBreakpoints/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
/** This export is intended for internal integration with Pigment CSS */
|
||||
/* eslint-disable import/prefer-default-export */
|
||||
export { default as unstable_createBreakpoints } from "./createBreakpoints.js";
|
||||
13
node_modules/@mui/system/createBreakpoints/index.js
generated
vendored
Normal file
13
node_modules/@mui/system/createBreakpoints/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "unstable_createBreakpoints", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _createBreakpoints.default;
|
||||
}
|
||||
});
|
||||
var _createBreakpoints = _interopRequireDefault(require("./createBreakpoints"));
|
||||
27
node_modules/@mui/system/createStyled/createStyled.d.ts
generated
vendored
Normal file
27
node_modules/@mui/system/createStyled/createStyled.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import * as React from 'react';
|
||||
import { CreateMUIStyled as CreateMUIStyledStyledEngine, CSSInterpolation } from '@mui/styled-engine';
|
||||
import styleFunctionSx, { SxProps } from "../styleFunctionSx/index.js";
|
||||
import { Theme as DefaultTheme } from "../createTheme/index.js";
|
||||
export function shouldForwardProp(propName: PropertyKey): boolean;
|
||||
export interface MUIStyledCommonProps<Theme extends object = DefaultTheme> {
|
||||
theme?: Theme;
|
||||
as?: React.ElementType;
|
||||
sx?: SxProps<Theme>;
|
||||
}
|
||||
export interface MuiStyledOptions {
|
||||
name?: string;
|
||||
slot?: string;
|
||||
// The difference between Interpolation and CSSInterpolation is that the former supports functions based on props
|
||||
// If we want to support props in the overrides, we will need to change the CSSInterpolation to Interpolation<Props>
|
||||
overridesResolver?: (props: any, styles: Record<string, CSSInterpolation>) => CSSInterpolation;
|
||||
skipVariantsResolver?: boolean;
|
||||
skipSx?: boolean;
|
||||
}
|
||||
export type CreateMUIStyled<Theme extends object = DefaultTheme> = CreateMUIStyledStyledEngine<MUIStyledCommonProps<Theme>, MuiStyledOptions, Theme>;
|
||||
export default function createStyled<Theme extends object = DefaultTheme>(options?: {
|
||||
themeId?: string;
|
||||
defaultTheme?: Theme;
|
||||
rootShouldForwardProp?: (prop: PropertyKey) => boolean;
|
||||
slotShouldForwardProp?: (prop: PropertyKey) => boolean;
|
||||
styleFunctionSx?: typeof styleFunctionSx;
|
||||
}): CreateMUIStyled<Theme>;
|
||||
298
node_modules/@mui/system/createStyled/createStyled.js
generated
vendored
Normal file
298
node_modules/@mui/system/createStyled/createStyled.js
generated
vendored
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createStyled;
|
||||
exports.shouldForwardProp = shouldForwardProp;
|
||||
exports.systemDefaultTheme = void 0;
|
||||
var _styledEngine = _interopRequireWildcard(require("@mui/styled-engine"));
|
||||
var _deepmerge = require("@mui/utils/deepmerge");
|
||||
var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
|
||||
var _getDisplayName = _interopRequireDefault(require("@mui/utils/getDisplayName"));
|
||||
var _createTheme = _interopRequireDefault(require("../createTheme"));
|
||||
var _styleFunctionSx = _interopRequireDefault(require("../styleFunctionSx"));
|
||||
var _preprocessStyles = _interopRequireDefault(require("../preprocessStyles"));
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
/* eslint-disable no-labels */
|
||||
/* eslint-disable no-lone-blocks */
|
||||
|
||||
const systemDefaultTheme = exports.systemDefaultTheme = (0, _createTheme.default)();
|
||||
|
||||
// Update /system/styled/#api in case if this changes
|
||||
function shouldForwardProp(prop) {
|
||||
return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
|
||||
}
|
||||
function shallowLayer(serialized, layerName) {
|
||||
if (layerName && serialized && typeof serialized === 'object' && serialized.styles && !serialized.styles.startsWith('@layer') // only add the layer if it is not already there.
|
||||
) {
|
||||
serialized.styles = `@layer ${layerName}{${String(serialized.styles)}}`;
|
||||
}
|
||||
return serialized;
|
||||
}
|
||||
function defaultOverridesResolver(slot) {
|
||||
if (!slot) {
|
||||
return null;
|
||||
}
|
||||
return (_props, styles) => styles[slot];
|
||||
}
|
||||
function attachTheme(props, themeId, defaultTheme) {
|
||||
props.theme = isObjectEmpty(props.theme) ? defaultTheme : props.theme[themeId] || props.theme;
|
||||
}
|
||||
function processStyle(props, style, layerName) {
|
||||
/*
|
||||
* Style types:
|
||||
* - null/undefined
|
||||
* - string
|
||||
* - CSS style object: { [cssKey]: [cssValue], variants }
|
||||
* - Processed style object: { style, variants, isProcessed: true }
|
||||
* - Array of any of the above
|
||||
*/
|
||||
|
||||
const resolvedStyle = typeof style === 'function' ? style(props) : style;
|
||||
if (Array.isArray(resolvedStyle)) {
|
||||
return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle, layerName));
|
||||
}
|
||||
if (Array.isArray(resolvedStyle?.variants)) {
|
||||
let rootStyle;
|
||||
if (resolvedStyle.isProcessed) {
|
||||
rootStyle = layerName ? shallowLayer(resolvedStyle.style, layerName) : resolvedStyle.style;
|
||||
} else {
|
||||
const {
|
||||
variants,
|
||||
...otherStyles
|
||||
} = resolvedStyle;
|
||||
rootStyle = layerName ? shallowLayer((0, _styledEngine.internal_serializeStyles)(otherStyles), layerName) : otherStyles;
|
||||
}
|
||||
return processStyleVariants(props, resolvedStyle.variants, [rootStyle], layerName);
|
||||
}
|
||||
if (resolvedStyle?.isProcessed) {
|
||||
return layerName ? shallowLayer((0, _styledEngine.internal_serializeStyles)(resolvedStyle.style), layerName) : resolvedStyle.style;
|
||||
}
|
||||
return layerName ? shallowLayer((0, _styledEngine.internal_serializeStyles)(resolvedStyle), layerName) : resolvedStyle;
|
||||
}
|
||||
function processStyleVariants(props, variants, results = [], layerName = undefined) {
|
||||
let mergedState; // We might not need it, initialized lazily
|
||||
|
||||
variantLoop: for (let i = 0; i < variants.length; i += 1) {
|
||||
const variant = variants[i];
|
||||
if (typeof variant.props === 'function') {
|
||||
mergedState ?? (mergedState = {
|
||||
...props,
|
||||
...props.ownerState,
|
||||
ownerState: props.ownerState
|
||||
});
|
||||
if (!variant.props(mergedState)) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
for (const key in variant.props) {
|
||||
if (props[key] !== variant.props[key] && props.ownerState?.[key] !== variant.props[key]) {
|
||||
continue variantLoop;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (typeof variant.style === 'function') {
|
||||
mergedState ?? (mergedState = {
|
||||
...props,
|
||||
...props.ownerState,
|
||||
ownerState: props.ownerState
|
||||
});
|
||||
results.push(layerName ? shallowLayer((0, _styledEngine.internal_serializeStyles)(variant.style(mergedState)), layerName) : variant.style(mergedState));
|
||||
} else {
|
||||
results.push(layerName ? shallowLayer((0, _styledEngine.internal_serializeStyles)(variant.style), layerName) : variant.style);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
function createStyled(input = {}) {
|
||||
const {
|
||||
themeId,
|
||||
defaultTheme = systemDefaultTheme,
|
||||
rootShouldForwardProp = shouldForwardProp,
|
||||
slotShouldForwardProp = shouldForwardProp
|
||||
} = input;
|
||||
function styleAttachTheme(props) {
|
||||
attachTheme(props, themeId, defaultTheme);
|
||||
}
|
||||
const styled = (tag, inputOptions = {}) => {
|
||||
// If `tag` is already a styled component, filter out the `sx` style function
|
||||
// to prevent unnecessary styles generated by the composite components.
|
||||
(0, _styledEngine.internal_mutateStyles)(tag, styles => styles.filter(style => style !== _styleFunctionSx.default));
|
||||
const {
|
||||
name: componentName,
|
||||
slot: componentSlot,
|
||||
skipVariantsResolver: inputSkipVariantsResolver,
|
||||
skipSx: inputSkipSx,
|
||||
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
||||
// For more details: https://github.com/mui/material-ui/pull/37908
|
||||
overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),
|
||||
...options
|
||||
} = inputOptions;
|
||||
const layerName = componentName && componentName.startsWith('Mui') || !!componentSlot ? 'components' : 'custom';
|
||||
|
||||
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
||||
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :
|
||||
// TODO v6: remove `Root` in the next major release
|
||||
// For more details: https://github.com/mui/material-ui/pull/37908
|
||||
componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;
|
||||
const skipSx = inputSkipSx || false;
|
||||
let shouldForwardPropOption = shouldForwardProp;
|
||||
|
||||
// TODO v6: remove `Root` in the next major release
|
||||
// For more details: https://github.com/mui/material-ui/pull/37908
|
||||
if (componentSlot === 'Root' || componentSlot === 'root') {
|
||||
shouldForwardPropOption = rootShouldForwardProp;
|
||||
} else if (componentSlot) {
|
||||
// any other slot specified
|
||||
shouldForwardPropOption = slotShouldForwardProp;
|
||||
} else if (isStringTag(tag)) {
|
||||
// for string (html) tag, preserve the behavior in emotion & styled-components.
|
||||
shouldForwardPropOption = undefined;
|
||||
}
|
||||
const defaultStyledResolver = (0, _styledEngine.default)(tag, {
|
||||
shouldForwardProp: shouldForwardPropOption,
|
||||
label: generateStyledLabel(componentName, componentSlot),
|
||||
...options
|
||||
});
|
||||
const transformStyle = style => {
|
||||
// - On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
||||
// component stays as a function. This condition makes sure that we do not interpolate functions
|
||||
// which are basically components used as a selectors.
|
||||
// - `style` could be a styled component from a babel plugin for component selectors, This condition
|
||||
// makes sure that we do not interpolate them.
|
||||
if (style.__emotion_real === style) {
|
||||
return style;
|
||||
}
|
||||
if (typeof style === 'function') {
|
||||
return function styleFunctionProcessor(props) {
|
||||
return processStyle(props, style, props.theme.modularCssLayers ? layerName : undefined);
|
||||
};
|
||||
}
|
||||
if ((0, _deepmerge.isPlainObject)(style)) {
|
||||
const serialized = (0, _preprocessStyles.default)(style);
|
||||
return function styleObjectProcessor(props) {
|
||||
if (!serialized.variants) {
|
||||
return props.theme.modularCssLayers ? shallowLayer(serialized.style, layerName) : serialized.style;
|
||||
}
|
||||
return processStyle(props, serialized, props.theme.modularCssLayers ? layerName : undefined);
|
||||
};
|
||||
}
|
||||
return style;
|
||||
};
|
||||
const muiStyledResolver = (...expressionsInput) => {
|
||||
const expressionsHead = [];
|
||||
const expressionsBody = expressionsInput.map(transformStyle);
|
||||
const expressionsTail = [];
|
||||
|
||||
// Preprocess `props` to set the scoped theme value.
|
||||
// This must run before any other expression.
|
||||
expressionsHead.push(styleAttachTheme);
|
||||
if (componentName && overridesResolver) {
|
||||
expressionsTail.push(function styleThemeOverrides(props) {
|
||||
const theme = props.theme;
|
||||
const styleOverrides = theme.components?.[componentName]?.styleOverrides;
|
||||
if (!styleOverrides) {
|
||||
return null;
|
||||
}
|
||||
const resolvedStyleOverrides = {};
|
||||
|
||||
// TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly
|
||||
// eslint-disable-next-line guard-for-in
|
||||
for (const slotKey in styleOverrides) {
|
||||
resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey], props.theme.modularCssLayers ? 'theme' : undefined);
|
||||
}
|
||||
return overridesResolver(props, resolvedStyleOverrides);
|
||||
});
|
||||
}
|
||||
if (componentName && !skipVariantsResolver) {
|
||||
expressionsTail.push(function styleThemeVariants(props) {
|
||||
const theme = props.theme;
|
||||
const themeVariants = theme?.components?.[componentName]?.variants;
|
||||
if (!themeVariants) {
|
||||
return null;
|
||||
}
|
||||
return processStyleVariants(props, themeVariants, [], props.theme.modularCssLayers ? 'theme' : undefined);
|
||||
});
|
||||
}
|
||||
if (!skipSx) {
|
||||
expressionsTail.push(_styleFunctionSx.default);
|
||||
}
|
||||
|
||||
// This function can be called as a tagged template, so the first argument would contain
|
||||
// CSS `string[]` values.
|
||||
if (Array.isArray(expressionsBody[0])) {
|
||||
const inputStrings = expressionsBody.shift();
|
||||
|
||||
// We need to add placeholders in the tagged template for the custom functions we have
|
||||
// possibly added (attachTheme, overrides, variants, and sx).
|
||||
const placeholdersHead = new Array(expressionsHead.length).fill('');
|
||||
const placeholdersTail = new Array(expressionsTail.length).fill('');
|
||||
let outputStrings;
|
||||
// prettier-ignore
|
||||
{
|
||||
outputStrings = [...placeholdersHead, ...inputStrings, ...placeholdersTail];
|
||||
outputStrings.raw = [...placeholdersHead, ...inputStrings.raw, ...placeholdersTail];
|
||||
}
|
||||
|
||||
// The only case where we put something before `attachTheme`
|
||||
expressionsHead.unshift(outputStrings);
|
||||
}
|
||||
const expressions = [...expressionsHead, ...expressionsBody, ...expressionsTail];
|
||||
const Component = defaultStyledResolver(...expressions);
|
||||
if (tag.muiName) {
|
||||
Component.muiName = tag.muiName;
|
||||
}
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
Component.displayName = generateDisplayName(componentName, componentSlot, tag);
|
||||
}
|
||||
return Component;
|
||||
};
|
||||
if (defaultStyledResolver.withConfig) {
|
||||
muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
|
||||
}
|
||||
return muiStyledResolver;
|
||||
};
|
||||
return styled;
|
||||
}
|
||||
function generateDisplayName(componentName, componentSlot, tag) {
|
||||
if (componentName) {
|
||||
return `${componentName}${(0, _capitalize.default)(componentSlot || '')}`;
|
||||
}
|
||||
return `Styled(${(0, _getDisplayName.default)(tag)})`;
|
||||
}
|
||||
function generateStyledLabel(componentName, componentSlot) {
|
||||
let label;
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (componentName) {
|
||||
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
||||
// For more details: https://github.com/mui/material-ui/pull/37908
|
||||
label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;
|
||||
}
|
||||
}
|
||||
return label;
|
||||
}
|
||||
function isObjectEmpty(object) {
|
||||
// eslint-disable-next-line
|
||||
for (const _ in object) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40
|
||||
function isStringTag(tag) {
|
||||
return typeof tag === 'string' &&
|
||||
// 96 is one less than the char code
|
||||
// for "a" so this is checking that
|
||||
// it's a lowercase character
|
||||
tag.charCodeAt(0) > 96;
|
||||
}
|
||||
function lowercaseFirstLetter(string) {
|
||||
if (!string) {
|
||||
return string;
|
||||
}
|
||||
return string.charAt(0).toLowerCase() + string.slice(1);
|
||||
}
|
||||
2
node_modules/@mui/system/createStyled/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/system/createStyled/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export { default } from "./createStyled.js";
|
||||
export * from "./createStyled.js";
|
||||
25
node_modules/@mui/system/createStyled/index.js
generated
vendored
Normal file
25
node_modules/@mui/system/createStyled/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {};
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _createStyled.default;
|
||||
}
|
||||
});
|
||||
var _createStyled = _interopRequireWildcard(require("./createStyled"));
|
||||
Object.keys(_createStyled).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _createStyled[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _createStyled[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
67
node_modules/@mui/system/createTheme/applyStyles.d.ts
generated
vendored
Normal file
67
node_modules/@mui/system/createTheme/applyStyles.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
import { CSSObject } from '@mui/styled-engine';
|
||||
export interface ApplyStyles<K extends string> {
|
||||
(key: K, styles: CSSObject): CSSObject;
|
||||
}
|
||||
/**
|
||||
* A universal utility to style components with multiple color modes. Always use it from the theme object.
|
||||
* It works with:
|
||||
* - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)
|
||||
* - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)
|
||||
* - Zero-runtime engine
|
||||
*
|
||||
* Tips: Use an array over object spread and place `theme.applyStyles()` last.
|
||||
*
|
||||
* With the styled function:
|
||||
* ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]
|
||||
* 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}
|
||||
*
|
||||
* With the sx prop:
|
||||
* ✅ [{ background: '#e5e5e5' }, theme => theme.applyStyles('dark', { background: '#1c1c1c' })]
|
||||
* 🚫 { background: '#e5e5e5', ...theme => theme.applyStyles('dark', { background: '#1c1c1c' })}
|
||||
*
|
||||
* @example
|
||||
* 1. using with `styled`:
|
||||
* ```jsx
|
||||
* const Component = styled('div')(({ theme }) => [
|
||||
* { background: '#e5e5e5' },
|
||||
* theme.applyStyles('dark', {
|
||||
* background: '#1c1c1c',
|
||||
* color: '#fff',
|
||||
* }),
|
||||
* ]);
|
||||
* ```
|
||||
*
|
||||
* @example
|
||||
* 2. using with `sx` prop:
|
||||
* ```jsx
|
||||
* <Box sx={[
|
||||
* { background: '#e5e5e5' },
|
||||
* theme => theme.applyStyles('dark', {
|
||||
* background: '#1c1c1c',
|
||||
* color: '#fff',
|
||||
* }),
|
||||
* ]}
|
||||
* />
|
||||
* ```
|
||||
*
|
||||
* @example
|
||||
* 3. theming a component:
|
||||
* ```jsx
|
||||
* extendTheme({
|
||||
* components: {
|
||||
* MuiButton: {
|
||||
* styleOverrides: {
|
||||
* root: ({ theme }) => [
|
||||
* { background: '#e5e5e5' },
|
||||
* theme.applyStyles('dark', {
|
||||
* background: '#1c1c1c',
|
||||
* color: '#fff',
|
||||
* }),
|
||||
* ],
|
||||
* },
|
||||
* }
|
||||
* }
|
||||
* })
|
||||
*```
|
||||
*/
|
||||
export default function applyStyles<K extends string>(key: K, styles: CSSObject): CSSObject;
|
||||
93
node_modules/@mui/system/createTheme/applyStyles.js
generated
vendored
Normal file
93
node_modules/@mui/system/createTheme/applyStyles.js
generated
vendored
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = applyStyles;
|
||||
/**
|
||||
* A universal utility to style components with multiple color modes. Always use it from the theme object.
|
||||
* It works with:
|
||||
* - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)
|
||||
* - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)
|
||||
* - Zero-runtime engine
|
||||
*
|
||||
* Tips: Use an array over object spread and place `theme.applyStyles()` last.
|
||||
*
|
||||
* With the styled function:
|
||||
* ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]
|
||||
* 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}
|
||||
*
|
||||
* With the sx prop:
|
||||
* ✅ [{ background: '#e5e5e5' }, theme => theme.applyStyles('dark', { background: '#1c1c1c' })]
|
||||
* 🚫 { background: '#e5e5e5', ...theme => theme.applyStyles('dark', { background: '#1c1c1c' })}
|
||||
*
|
||||
* @example
|
||||
* 1. using with `styled`:
|
||||
* ```jsx
|
||||
* const Component = styled('div')(({ theme }) => [
|
||||
* { background: '#e5e5e5' },
|
||||
* theme.applyStyles('dark', {
|
||||
* background: '#1c1c1c',
|
||||
* color: '#fff',
|
||||
* }),
|
||||
* ]);
|
||||
* ```
|
||||
*
|
||||
* @example
|
||||
* 2. using with `sx` prop:
|
||||
* ```jsx
|
||||
* <Box sx={[
|
||||
* { background: '#e5e5e5' },
|
||||
* theme => theme.applyStyles('dark', {
|
||||
* background: '#1c1c1c',
|
||||
* color: '#fff',
|
||||
* }),
|
||||
* ]}
|
||||
* />
|
||||
* ```
|
||||
*
|
||||
* @example
|
||||
* 3. theming a component:
|
||||
* ```jsx
|
||||
* extendTheme({
|
||||
* components: {
|
||||
* MuiButton: {
|
||||
* styleOverrides: {
|
||||
* root: ({ theme }) => [
|
||||
* { background: '#e5e5e5' },
|
||||
* theme.applyStyles('dark', {
|
||||
* background: '#1c1c1c',
|
||||
* color: '#fff',
|
||||
* }),
|
||||
* ],
|
||||
* },
|
||||
* }
|
||||
* }
|
||||
* })
|
||||
*```
|
||||
*/
|
||||
function applyStyles(key, styles) {
|
||||
// @ts-expect-error this is 'any' type
|
||||
const theme = this;
|
||||
if (theme.vars) {
|
||||
if (!theme.colorSchemes?.[key] || typeof theme.getColorSchemeSelector !== 'function') {
|
||||
return {};
|
||||
}
|
||||
// If CssVarsProvider is used as a provider, returns '*:where({selector}) &'
|
||||
let selector = theme.getColorSchemeSelector(key);
|
||||
if (selector === '&') {
|
||||
return styles;
|
||||
}
|
||||
if (selector.includes('data-') || selector.includes('.')) {
|
||||
// '*' is required as a workaround for Emotion issue (https://github.com/emotion-js/emotion/issues/2836)
|
||||
selector = `*:where(${selector.replace(/\s*&$/, '')}) &`;
|
||||
}
|
||||
return {
|
||||
[selector]: styles
|
||||
};
|
||||
}
|
||||
if (theme.palette.mode === key) {
|
||||
return styles;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
10
node_modules/@mui/system/createTheme/createSpacing.d.ts
generated
vendored
Normal file
10
node_modules/@mui/system/createTheme/createSpacing.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
export type SpacingOptions = number | string | Spacing | ((abs: number) => number | string) | ((abs: number | string) => number | string) | ReadonlyArray<string | number>;
|
||||
export type SpacingArgument = number | string;
|
||||
export interface Spacing {
|
||||
(): string;
|
||||
(value: SpacingArgument): string;
|
||||
(topBottom: SpacingArgument, rightLeft: SpacingArgument): string;
|
||||
(top: SpacingArgument, rightLeft: SpacingArgument, bottom: SpacingArgument): string;
|
||||
(top: SpacingArgument, right: SpacingArgument, bottom: SpacingArgument, left: SpacingArgument): string;
|
||||
}
|
||||
export default function createSpacing(spacingInput?: SpacingOptions, transform?: Spacing | (() => undefined) | ((abs: number | string) => number | number)): Spacing;
|
||||
36
node_modules/@mui/system/createTheme/createSpacing.js
generated
vendored
Normal file
36
node_modules/@mui/system/createTheme/createSpacing.js
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createSpacing;
|
||||
var _spacing = require("../spacing");
|
||||
// The different signatures imply different meaning for their arguments that can't be expressed structurally.
|
||||
// We express the difference with variable names.
|
||||
|
||||
function createSpacing(spacingInput = 8,
|
||||
// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
|
||||
// Smaller components, such as icons, can align to a 4dp grid.
|
||||
// https://m2.material.io/design/layout/understanding-layout.html
|
||||
transform = (0, _spacing.createUnarySpacing)({
|
||||
spacing: spacingInput
|
||||
})) {
|
||||
// Already transformed.
|
||||
if (spacingInput.mui) {
|
||||
return spacingInput;
|
||||
}
|
||||
const spacing = (...argsInput) => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (!(argsInput.length <= 4)) {
|
||||
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
||||
}
|
||||
}
|
||||
const args = argsInput.length === 0 ? [1] : argsInput;
|
||||
return args.map(argument => {
|
||||
const output = transform(argument);
|
||||
return typeof output === 'number' ? `${output}px` : output;
|
||||
}).join(' ');
|
||||
};
|
||||
spacing.mui = true;
|
||||
return spacing;
|
||||
}
|
||||
54
node_modules/@mui/system/createTheme/createTheme.d.ts
generated
vendored
Normal file
54
node_modules/@mui/system/createTheme/createTheme.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import { CSSObject } from '@mui/styled-engine';
|
||||
import { Breakpoints, BreakpointsOptions } from "../createBreakpoints/createBreakpoints.js";
|
||||
import { Shape, ShapeOptions } from "./shape.js";
|
||||
import { Spacing, SpacingOptions } from "./createSpacing.js";
|
||||
import { SxConfig, SxProps } from "../styleFunctionSx/index.js";
|
||||
import { ApplyStyles } from "./applyStyles.js";
|
||||
import { CssContainerQueries } from "../cssContainerQueries/index.js";
|
||||
export { Breakpoint, Breakpoints, BreakpointOverrides } from "../createBreakpoints/createBreakpoints.js";
|
||||
export type Direction = 'ltr' | 'rtl';
|
||||
export interface Typography {}
|
||||
export interface Mixins {}
|
||||
export interface Shadows {}
|
||||
export interface Transitions {}
|
||||
export interface ZIndex {}
|
||||
export interface ThemeOptions {
|
||||
shape?: ShapeOptions;
|
||||
breakpoints?: BreakpointsOptions;
|
||||
direction?: Direction;
|
||||
mixins?: Mixins;
|
||||
palette?: Record<string, any>;
|
||||
shadows?: Shadows;
|
||||
spacing?: SpacingOptions;
|
||||
transitions?: Transitions;
|
||||
components?: Record<string, any>;
|
||||
typography?: Typography;
|
||||
zIndex?: ZIndex;
|
||||
unstable_sxConfig?: SxConfig;
|
||||
}
|
||||
export interface Theme extends CssContainerQueries {
|
||||
shape: Shape;
|
||||
breakpoints: Breakpoints;
|
||||
direction: Direction;
|
||||
palette: Record<string, any> & {
|
||||
mode: 'light' | 'dark';
|
||||
};
|
||||
shadows?: Shadows;
|
||||
spacing: Spacing;
|
||||
transitions?: Transitions;
|
||||
components?: Record<string, any>;
|
||||
mixins?: Mixins;
|
||||
typography?: Typography;
|
||||
zIndex?: ZIndex;
|
||||
applyStyles: ApplyStyles<'light' | 'dark'>;
|
||||
unstable_sxConfig: SxConfig;
|
||||
unstable_sx: (props: SxProps<Theme>) => CSSObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a theme base on the options received.
|
||||
* @param options Takes an incomplete theme object and adds the missing parts.
|
||||
* @param args Deep merge the arguments with the about to be returned theme.
|
||||
* @returns A complete, ready-to-use theme object.
|
||||
*/
|
||||
export default function createTheme(options?: ThemeOptions, ...args: object[]): Theme;
|
||||
56
node_modules/@mui/system/createTheme/createTheme.js
generated
vendored
Normal file
56
node_modules/@mui/system/createTheme/createTheme.js
generated
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _deepmerge = _interopRequireDefault(require("@mui/utils/deepmerge"));
|
||||
var _createBreakpoints = _interopRequireDefault(require("../createBreakpoints/createBreakpoints"));
|
||||
var _cssContainerQueries = _interopRequireDefault(require("../cssContainerQueries"));
|
||||
var _shape = _interopRequireDefault(require("./shape"));
|
||||
var _createSpacing = _interopRequireDefault(require("./createSpacing"));
|
||||
var _styleFunctionSx = _interopRequireDefault(require("../styleFunctionSx/styleFunctionSx"));
|
||||
var _defaultSxConfig = _interopRequireDefault(require("../styleFunctionSx/defaultSxConfig"));
|
||||
var _applyStyles = _interopRequireDefault(require("./applyStyles"));
|
||||
function createTheme(options = {}, ...args) {
|
||||
const {
|
||||
breakpoints: breakpointsInput = {},
|
||||
palette: paletteInput = {},
|
||||
spacing: spacingInput,
|
||||
shape: shapeInput = {},
|
||||
...other
|
||||
} = options;
|
||||
const breakpoints = (0, _createBreakpoints.default)(breakpointsInput);
|
||||
const spacing = (0, _createSpacing.default)(spacingInput);
|
||||
let muiTheme = (0, _deepmerge.default)({
|
||||
breakpoints,
|
||||
direction: 'ltr',
|
||||
components: {},
|
||||
// Inject component definitions.
|
||||
palette: {
|
||||
mode: 'light',
|
||||
...paletteInput
|
||||
},
|
||||
spacing,
|
||||
shape: {
|
||||
..._shape.default,
|
||||
...shapeInput
|
||||
}
|
||||
}, other);
|
||||
muiTheme = (0, _cssContainerQueries.default)(muiTheme);
|
||||
muiTheme.applyStyles = _applyStyles.default;
|
||||
muiTheme = args.reduce((acc, argument) => (0, _deepmerge.default)(acc, argument), muiTheme);
|
||||
muiTheme.unstable_sxConfig = {
|
||||
..._defaultSxConfig.default,
|
||||
...other?.unstable_sxConfig
|
||||
};
|
||||
muiTheme.unstable_sx = function sx(props) {
|
||||
return (0, _styleFunctionSx.default)({
|
||||
sx: props,
|
||||
theme: this
|
||||
});
|
||||
};
|
||||
return muiTheme;
|
||||
}
|
||||
var _default = exports.default = createTheme;
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue