tp-react-elements-dev 1.12.5 → 1.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +2 -2
- package/dist/App.test.d.ts +1 -1
- package/dist/Utilities/Constants/FormConstants.d.ts +10 -10
- package/dist/Utilities/Constants/FunctionConstants.d.ts +61 -0
- package/dist/Utilities/Interface/FormInterface.d.ts +69 -70
- package/dist/components/DeleteComponent/Delete.stories.d.ts +5 -4
- package/dist/components/DeleteComponent/DeleteField.d.ts +7 -7
- package/dist/components/Form/Form.stories.d.ts +5 -4
- package/dist/components/Form/Form.styles.d.ts +43 -40
- package/dist/components/Form/FormActiveSwitch.d.ts +3 -3
- package/dist/components/Form/FormConstants.d.ts +13 -13
- package/dist/components/Form/FormContainer.d.ts +2 -2
- package/dist/components/Form/FormRender.d.ts +3 -3
- package/dist/components/Form/FormRenderConstants.d.ts +15 -15
- package/dist/components/Form/FormRenderWrapper.d.ts +18 -18
- package/dist/components/FormComponents/DatePicker/DateRangePicker.d.ts +7 -7
- package/dist/components/FormComponents/DatePicker/DatepickerWrapperV2.d.ts +6 -6
- package/dist/components/FormComponents/DatePicker/MonthPicker.d.ts +2 -2
- package/dist/components/FormComponents/DatePicker/Monthpickerrender.d.ts +6 -6
- package/dist/components/FormComponents/FileUpload/FormRenderFileUpload.d.ts +6 -6
- package/dist/components/FormComponents/FileUpload/FormRenderMultiFileUpload.d.ts +6 -6
- package/dist/components/FormComponents/FormBottomField/FormBottomField.d.ts +3 -3
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.d.ts +6 -6
- package/dist/components/FormComponents/FormCheckBoxGroup/FormCheckBoxGroup.d.ts +6 -6
- package/dist/components/FormComponents/FormErrorField/FormErrorField.d.ts +3 -3
- package/dist/components/FormComponents/FormNumberField/FormNumberField.d.ts +6 -6
- package/dist/components/FormComponents/FormNumberField/FormNumberFieldDecimal.d.ts +6 -6
- package/dist/components/FormComponents/FormRadioGroup/FormRadioGroup.d.ts +6 -6
- package/dist/components/FormComponents/FormTextAreaField/FormTextAreaField.d.ts +6 -6
- package/dist/components/FormComponents/FormTextAreaField/FormTextAreaField.styles.d.ts +3 -3
- package/dist/components/FormComponents/FormTextField/FormTextField.d.ts +6 -6
- package/dist/components/FormComponents/FormTextField/FormTextField.styles.d.ts +5 -5
- package/dist/components/FormComponents/HelperText/HelperText.d.ts +3 -3
- package/dist/components/FormComponents/PasswordField/PasswordField.d.ts +6 -6
- package/dist/components/FormComponents/RichTextEditor/RichTextEditor.d.ts +5 -5
- package/dist/components/FormComponents/RichTextEditor/RichTextEditorWrapper.d.ts +6 -6
- package/dist/components/FormComponents/RichTextEditor/jodit.index.d.ts +17 -17
- package/dist/components/FormComponents/Select/MultiSelect.d.ts +2 -2
- package/dist/components/FormComponents/Select/MultiSelectv1.d.ts +5 -5
- package/dist/components/FormComponents/Select/SingleSelect.d.ts +6 -6
- package/dist/components/FormComponents/Select/SingleSelectNonAutoComplete.d.ts +6 -6
- package/dist/components/FormComponents/Select/SingleSelectSearchApi.d.ts +2 -2
- package/dist/components/FormComponents/TimePicker/TimePicker.d.ts +5 -5
- package/dist/components/FormComponents/YearPickerField/YearPickerField.d.ts +2 -2
- package/dist/components/Global.styles.d.ts +34 -35
- package/dist/components/ModalField/ConfirmationDialog.d.ts +11 -11
- package/dist/components/ModalField/ModalField.d.ts +17 -18
- package/dist/components/SelectField/MultiSelectFieldComponent.d.ts +11 -11
- package/dist/components/SessionTimeOut/SessionTimeOut.d.ts +10 -10
- package/dist/components/SessionTimeOut/SessionTimeOut.stories.d.ts +5 -4
- package/dist/components/TimePickerField/TimePickerField.d.ts +1 -1
- package/dist/components/index.d.ts +10 -10
- package/dist/index.d.ts +36 -22
- package/dist/index.esm.js +37 -1574
- package/dist/index.js +34 -1617
- package/dist/material-ui.css +1 -0
- package/dist/material-ui.d.ts +2 -0
- package/dist/material-ui.esm.css +1 -0
- package/dist/material-ui.esm.js +3 -0
- package/dist/material-ui.js +20 -0
- package/dist/mui-x-date-datepicker.d.ts +1 -0
- package/dist/redux-toolkit.d.ts +1 -0
- package/dist/reportWebVitals.d.ts +3 -3
- package/dist/setupTests.d.ts +1 -1
- package/dist/styles/theme.d.ts +9 -9
- package/dist/tanstack-react-query.d.ts +1 -0
- package/dist/theme.d.ts +10 -10
- package/package.json +12 -25
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { forwardRef, useContext, Children, isValidElement, cloneElement, useRef, useEffect, useState, useCallback, createContext, useMemo, Component as Component$1, useId as useId$
|
|
2
|
+
import React__default, { forwardRef, useContext, Children, isValidElement, cloneElement, useRef, useEffect, useState, useCallback, createContext, useMemo, Component as Component$1, useId as useId$8, useReducer, memo as memo$2, Fragment, useLayoutEffect, createElement, createRef } from 'react';
|
|
3
3
|
import * as ReactDOM from 'react-dom';
|
|
4
4
|
import ReactDOM__default, { flushSync } from 'react-dom';
|
|
5
5
|
import require$$1$1 from 'fs';
|
|
@@ -5881,10 +5881,10 @@ if (!isBrowser$3) {
|
|
|
5881
5881
|
};
|
|
5882
5882
|
}
|
|
5883
5883
|
|
|
5884
|
-
var ThemeContext$
|
|
5884
|
+
var ThemeContext$2 = /* #__PURE__ */React.createContext({});
|
|
5885
5885
|
|
|
5886
|
-
var useTheme$
|
|
5887
|
-
return React.useContext(ThemeContext$
|
|
5886
|
+
var useTheme$a = function useTheme() {
|
|
5887
|
+
return React.useContext(ThemeContext$2);
|
|
5888
5888
|
};
|
|
5889
5889
|
|
|
5890
5890
|
var getTheme = function getTheme(outerTheme, theme) {
|
|
@@ -5902,21 +5902,21 @@ var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
|
|
|
5902
5902
|
return getTheme(outerTheme, theme);
|
|
5903
5903
|
});
|
|
5904
5904
|
});
|
|
5905
|
-
var ThemeProvider$
|
|
5906
|
-
var theme = React.useContext(ThemeContext$
|
|
5905
|
+
var ThemeProvider$4 = function ThemeProvider(props) {
|
|
5906
|
+
var theme = React.useContext(ThemeContext$2);
|
|
5907
5907
|
|
|
5908
5908
|
if (props.theme !== theme) {
|
|
5909
5909
|
theme = createCacheWithTheme(theme)(props.theme);
|
|
5910
5910
|
}
|
|
5911
5911
|
|
|
5912
|
-
return /*#__PURE__*/React.createElement(ThemeContext$
|
|
5912
|
+
return /*#__PURE__*/React.createElement(ThemeContext$2.Provider, {
|
|
5913
5913
|
value: theme
|
|
5914
5914
|
}, props.children);
|
|
5915
5915
|
};
|
|
5916
|
-
function withTheme
|
|
5916
|
+
function withTheme(Component) {
|
|
5917
5917
|
var componentName = Component.displayName || Component.name || 'Component';
|
|
5918
5918
|
var WithTheme = /*#__PURE__*/React.forwardRef(function render(props, ref) {
|
|
5919
|
-
var theme = React.useContext(ThemeContext$
|
|
5919
|
+
var theme = React.useContext(ThemeContext$2);
|
|
5920
5920
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
5921
5921
|
theme: theme,
|
|
5922
5922
|
ref: ref
|
|
@@ -5991,7 +5991,7 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
|
5991
5991
|
className = props.className + " ";
|
|
5992
5992
|
}
|
|
5993
5993
|
|
|
5994
|
-
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext$
|
|
5994
|
+
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext$2));
|
|
5995
5995
|
|
|
5996
5996
|
className += cache.key + "-" + serialized.name;
|
|
5997
5997
|
var newProps = {};
|
|
@@ -6049,7 +6049,7 @@ var jsx = function jsx(type, props) {
|
|
|
6049
6049
|
var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
6050
6050
|
|
|
6051
6051
|
var styles = props.styles;
|
|
6052
|
-
var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext$
|
|
6052
|
+
var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext$2));
|
|
6053
6053
|
|
|
6054
6054
|
if (!isBrowser$3) {
|
|
6055
6055
|
var _ref;
|
|
@@ -6286,7 +6286,7 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
6286
6286
|
var content = {
|
|
6287
6287
|
css: css,
|
|
6288
6288
|
cx: cx,
|
|
6289
|
-
theme: React.useContext(ThemeContext$
|
|
6289
|
+
theme: React.useContext(ThemeContext$2)
|
|
6290
6290
|
};
|
|
6291
6291
|
var ele = props.children(content);
|
|
6292
6292
|
hasRendered = true;
|
|
@@ -6301,16 +6301,16 @@ var emotionReact_esm = /*#__PURE__*/Object.freeze({
|
|
|
6301
6301
|
CacheProvider: CacheProvider,
|
|
6302
6302
|
ClassNames: ClassNames,
|
|
6303
6303
|
Global: Global,
|
|
6304
|
-
ThemeContext: ThemeContext$
|
|
6305
|
-
ThemeProvider: ThemeProvider$
|
|
6304
|
+
ThemeContext: ThemeContext$2,
|
|
6305
|
+
ThemeProvider: ThemeProvider$4,
|
|
6306
6306
|
__unsafe_useEmotionCache: __unsafe_useEmotionCache,
|
|
6307
6307
|
get createElement () { return jsx; },
|
|
6308
6308
|
css: css$2,
|
|
6309
6309
|
get jsx () { return jsx; },
|
|
6310
6310
|
keyframes: keyframes,
|
|
6311
|
-
useTheme: useTheme$
|
|
6311
|
+
useTheme: useTheme$a,
|
|
6312
6312
|
get withEmotionCache () { return withEmotionCache; },
|
|
6313
|
-
withTheme: withTheme
|
|
6313
|
+
withTheme: withTheme
|
|
6314
6314
|
});
|
|
6315
6315
|
|
|
6316
6316
|
// eslint-disable-next-line no-undef
|
|
@@ -6440,7 +6440,7 @@ var createStyled$3 = function createStyled(tag, options) {
|
|
|
6440
6440
|
mergedProps[key] = props[key];
|
|
6441
6441
|
}
|
|
6442
6442
|
|
|
6443
|
-
mergedProps.theme = React.useContext(ThemeContext$
|
|
6443
|
+
mergedProps.theme = React.useContext(ThemeContext$2);
|
|
6444
6444
|
}
|
|
6445
6445
|
|
|
6446
6446
|
if (typeof props.className === 'string') {
|
|
@@ -7697,110 +7697,6 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
7697
7697
|
var propTypesExports = propTypes.exports;
|
|
7698
7698
|
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
7699
7699
|
|
|
7700
|
-
const cacheMap = new Map();
|
|
7701
|
-
|
|
7702
|
-
// We might be able to remove this when this issue is fixed:
|
|
7703
|
-
// https://github.com/emotion-js/emotion/issues/2790
|
|
7704
|
-
const createEmotionCache = (options, CustomSheet) => {
|
|
7705
|
-
const cache = createCache(options);
|
|
7706
|
-
|
|
7707
|
-
// Do the same as https://github.com/emotion-js/emotion/blob/main/packages/cache/src/index.js#L238-L245
|
|
7708
|
-
cache.sheet = new CustomSheet({
|
|
7709
|
-
key: cache.key,
|
|
7710
|
-
nonce: cache.sheet.nonce,
|
|
7711
|
-
container: cache.sheet.container,
|
|
7712
|
-
speedy: cache.sheet.isSpeedy,
|
|
7713
|
-
prepend: cache.sheet.prepend,
|
|
7714
|
-
insertionPoint: cache.sheet.insertionPoint
|
|
7715
|
-
});
|
|
7716
|
-
return cache;
|
|
7717
|
-
};
|
|
7718
|
-
let insertionPoint;
|
|
7719
|
-
if (typeof document === 'object') {
|
|
7720
|
-
// Use `insertionPoint` over `prepend`(deprecated) because it can be controlled for GlobalStyles injection order
|
|
7721
|
-
// For more information, see https://github.com/mui/material-ui/issues/44597
|
|
7722
|
-
insertionPoint = document.querySelector('[name="emotion-insertion-point"]');
|
|
7723
|
-
if (!insertionPoint) {
|
|
7724
|
-
insertionPoint = document.createElement('meta');
|
|
7725
|
-
insertionPoint.setAttribute('name', 'emotion-insertion-point');
|
|
7726
|
-
insertionPoint.setAttribute('content', '');
|
|
7727
|
-
const head = document.querySelector('head');
|
|
7728
|
-
if (head) {
|
|
7729
|
-
head.prepend(insertionPoint);
|
|
7730
|
-
}
|
|
7731
|
-
}
|
|
7732
|
-
}
|
|
7733
|
-
function getCache$1(injectFirst, enableCssLayer) {
|
|
7734
|
-
if (injectFirst || enableCssLayer) {
|
|
7735
|
-
/**
|
|
7736
|
-
* This is for client-side apps only.
|
|
7737
|
-
* A custom sheet is required to make the GlobalStyles API injected above the insertion point.
|
|
7738
|
-
* This is because the [sheet](https://github.com/emotion-js/emotion/blob/main/packages/react/src/global.js#L94-L99) does not consume the options.
|
|
7739
|
-
*/
|
|
7740
|
-
class MyStyleSheet extends StyleSheet$1 {
|
|
7741
|
-
insert(rule, options) {
|
|
7742
|
-
if (this.key && this.key.endsWith('global')) {
|
|
7743
|
-
this.before = insertionPoint;
|
|
7744
|
-
}
|
|
7745
|
-
return super.insert(rule, options);
|
|
7746
|
-
}
|
|
7747
|
-
}
|
|
7748
|
-
const emotionCache = createEmotionCache({
|
|
7749
|
-
key: 'css',
|
|
7750
|
-
insertionPoint: injectFirst ? insertionPoint : undefined
|
|
7751
|
-
}, MyStyleSheet);
|
|
7752
|
-
if (enableCssLayer) {
|
|
7753
|
-
const prevInsert = emotionCache.insert;
|
|
7754
|
-
emotionCache.insert = (...args) => {
|
|
7755
|
-
if (!args[1].styles.match(/^@layer\s+[^{]*$/)) {
|
|
7756
|
-
// avoid nested @layer
|
|
7757
|
-
args[1].styles = `@layer mui {${args[1].styles}}`;
|
|
7758
|
-
}
|
|
7759
|
-
return prevInsert(...args);
|
|
7760
|
-
};
|
|
7761
|
-
}
|
|
7762
|
-
return emotionCache;
|
|
7763
|
-
}
|
|
7764
|
-
return undefined;
|
|
7765
|
-
}
|
|
7766
|
-
function StyledEngineProvider$2(props) {
|
|
7767
|
-
const {
|
|
7768
|
-
injectFirst,
|
|
7769
|
-
enableCssLayer,
|
|
7770
|
-
children
|
|
7771
|
-
} = props;
|
|
7772
|
-
const cache = React.useMemo(() => {
|
|
7773
|
-
const cacheKey = `${injectFirst}-${enableCssLayer}`;
|
|
7774
|
-
if (typeof document === 'object' && cacheMap.has(cacheKey)) {
|
|
7775
|
-
return cacheMap.get(cacheKey);
|
|
7776
|
-
}
|
|
7777
|
-
const fresh = getCache$1(injectFirst, enableCssLayer);
|
|
7778
|
-
cacheMap.set(cacheKey, fresh);
|
|
7779
|
-
return fresh;
|
|
7780
|
-
}, [injectFirst, enableCssLayer]);
|
|
7781
|
-
return cache ? /*#__PURE__*/jsxRuntimeExports.jsx(CacheProvider, {
|
|
7782
|
-
value: cache,
|
|
7783
|
-
children: children
|
|
7784
|
-
}) : children;
|
|
7785
|
-
}
|
|
7786
|
-
process.env.NODE_ENV !== "production" ? StyledEngineProvider$2.propTypes = {
|
|
7787
|
-
/**
|
|
7788
|
-
* Your component tree.
|
|
7789
|
-
*/
|
|
7790
|
-
children: PropTypes.node,
|
|
7791
|
-
/**
|
|
7792
|
-
* If `true`, the styles are wrapped in `@layer mui`.
|
|
7793
|
-
* Learn more about [Cascade layers](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Cascade_layers).
|
|
7794
|
-
*/
|
|
7795
|
-
enableCssLayer: PropTypes.bool,
|
|
7796
|
-
/**
|
|
7797
|
-
* By default, the styles are injected last in the <head> element of the page.
|
|
7798
|
-
* As a result, they gain more specificity than any other style sheet.
|
|
7799
|
-
* If you want to override MUI's styles, set this prop.
|
|
7800
|
-
*/
|
|
7801
|
-
injectFirst: PropTypes.bool
|
|
7802
|
-
} : void 0;
|
|
7803
|
-
|
|
7804
7700
|
function isEmpty$3(obj) {
|
|
7805
7701
|
return obj === undefined || obj === null || Object.keys(obj).length === 0;
|
|
7806
7702
|
}
|
|
@@ -9545,14 +9441,14 @@ function createTheme$4(options = {}, ...args) {
|
|
|
9545
9441
|
function isObjectEmpty$2(obj) {
|
|
9546
9442
|
return Object.keys(obj).length === 0;
|
|
9547
9443
|
}
|
|
9548
|
-
function useTheme$
|
|
9549
|
-
const contextTheme = React.useContext(ThemeContext$
|
|
9444
|
+
function useTheme$9(defaultTheme = null) {
|
|
9445
|
+
const contextTheme = React.useContext(ThemeContext$2);
|
|
9550
9446
|
return !contextTheme || isObjectEmpty$2(contextTheme) ? defaultTheme : contextTheme;
|
|
9551
9447
|
}
|
|
9552
9448
|
|
|
9553
9449
|
const systemDefaultTheme$1 = createTheme$4();
|
|
9554
|
-
function useTheme$
|
|
9555
|
-
return useTheme$
|
|
9450
|
+
function useTheme$8(defaultTheme = systemDefaultTheme$1) {
|
|
9451
|
+
return useTheme$9(defaultTheme);
|
|
9556
9452
|
}
|
|
9557
9453
|
|
|
9558
9454
|
function wrapGlobalLayer(styles) {
|
|
@@ -9571,7 +9467,7 @@ function GlobalStyles$7({
|
|
|
9571
9467
|
themeId,
|
|
9572
9468
|
defaultTheme = {}
|
|
9573
9469
|
}) {
|
|
9574
|
-
const upperTheme = useTheme$
|
|
9470
|
+
const upperTheme = useTheme$8(defaultTheme);
|
|
9575
9471
|
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
|
9576
9472
|
let globalStyles = typeof styles === 'function' ? styles(resolvedTheme) : styles;
|
|
9577
9473
|
if (resolvedTheme.modularCssLayers) {
|
|
@@ -9689,7 +9585,7 @@ function createBox$2(options = {}) {
|
|
|
9689
9585
|
shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
|
|
9690
9586
|
})(styleFunctionSx$2);
|
|
9691
9587
|
const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {
|
|
9692
|
-
const theme = useTheme$
|
|
9588
|
+
const theme = useTheme$8(defaultTheme);
|
|
9693
9589
|
const {
|
|
9694
9590
|
className,
|
|
9695
9591
|
component = 'div',
|
|
@@ -10144,7 +10040,7 @@ function useThemeProps$3({
|
|
|
10144
10040
|
defaultTheme,
|
|
10145
10041
|
themeId
|
|
10146
10042
|
}) {
|
|
10147
|
-
let theme = useTheme$
|
|
10043
|
+
let theme = useTheme$8(defaultTheme);
|
|
10148
10044
|
if (themeId) {
|
|
10149
10045
|
theme = theme[themeId] || theme;
|
|
10150
10046
|
}
|
|
@@ -10196,10 +10092,10 @@ function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSs
|
|
|
10196
10092
|
}
|
|
10197
10093
|
|
|
10198
10094
|
// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why
|
|
10199
|
-
const safeReact$
|
|
10095
|
+
const safeReact$1 = {
|
|
10200
10096
|
...React
|
|
10201
10097
|
};
|
|
10202
|
-
const maybeReactUseSyncExternalStore = safeReact$
|
|
10098
|
+
const maybeReactUseSyncExternalStore = safeReact$1.useSyncExternalStore;
|
|
10203
10099
|
function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
|
|
10204
10100
|
const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);
|
|
10205
10101
|
const getServerSnapshot = React.useMemo(() => {
|
|
@@ -10236,7 +10132,7 @@ function unstable_createUseMediaQuery(params = {}) {
|
|
|
10236
10132
|
themeId
|
|
10237
10133
|
} = params;
|
|
10238
10134
|
return function useMediaQuery(queryInput, options = {}) {
|
|
10239
|
-
let theme = useTheme$
|
|
10135
|
+
let theme = useTheme$9();
|
|
10240
10136
|
if (theme && themeId) {
|
|
10241
10137
|
theme = theme[themeId] || theme;
|
|
10242
10138
|
}
|
|
@@ -10307,10 +10203,6 @@ function hexToRgb(color) {
|
|
|
10307
10203
|
return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;
|
|
10308
10204
|
}).join(', ')})` : '';
|
|
10309
10205
|
}
|
|
10310
|
-
function intToHex(int) {
|
|
10311
|
-
const hex = int.toString(16);
|
|
10312
|
-
return hex.length === 1 ? `0${hex}` : hex;
|
|
10313
|
-
}
|
|
10314
10206
|
|
|
10315
10207
|
/**
|
|
10316
10208
|
* Returns an object with the type and values of a color.
|
|
@@ -10403,22 +10295,6 @@ function recomposeColor(color) {
|
|
|
10403
10295
|
return `${type}(${values})`;
|
|
10404
10296
|
}
|
|
10405
10297
|
|
|
10406
|
-
/**
|
|
10407
|
-
* Converts a color from CSS rgb format to CSS hex format.
|
|
10408
|
-
* @param {string} color - RGB color, i.e. rgb(n, n, n)
|
|
10409
|
-
* @returns {string} A CSS rgb color string, i.e. #nnnnnn
|
|
10410
|
-
*/
|
|
10411
|
-
function rgbToHex(color) {
|
|
10412
|
-
// Idempotent
|
|
10413
|
-
if (color.startsWith('#')) {
|
|
10414
|
-
return color;
|
|
10415
|
-
}
|
|
10416
|
-
const {
|
|
10417
|
-
values
|
|
10418
|
-
} = decomposeColor(color);
|
|
10419
|
-
return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;
|
|
10420
|
-
}
|
|
10421
|
-
|
|
10422
10298
|
/**
|
|
10423
10299
|
* Converts a color from hsl format to rgb format.
|
|
10424
10300
|
* @param {string} color - HSL color values
|
|
@@ -10586,108 +10462,8 @@ function private_safeEmphasize(color, coefficient, warning) {
|
|
|
10586
10462
|
}
|
|
10587
10463
|
}
|
|
10588
10464
|
|
|
10589
|
-
// This module is based on https://github.com/airbnb/prop-types-exact repository.
|
|
10590
|
-
// However, in order to reduce the number of dependencies and to remove some extra safe checks
|
|
10591
|
-
// the module was forked.
|
|
10592
|
-
|
|
10593
|
-
const specialProperty$2 = 'exact-prop: \u200b';
|
|
10594
|
-
function exactProp$4(propTypes) {
|
|
10595
|
-
if (process.env.NODE_ENV === 'production') {
|
|
10596
|
-
return propTypes;
|
|
10597
|
-
}
|
|
10598
|
-
return {
|
|
10599
|
-
...propTypes,
|
|
10600
|
-
[specialProperty$2]: props => {
|
|
10601
|
-
const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));
|
|
10602
|
-
if (unsupportedProps.length > 0) {
|
|
10603
|
-
return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\`${prop}\``).join(', ')}. Please remove them.`);
|
|
10604
|
-
}
|
|
10605
|
-
return null;
|
|
10606
|
-
}
|
|
10607
|
-
};
|
|
10608
|
-
}
|
|
10609
|
-
|
|
10610
|
-
const ThemeContext$2 = /*#__PURE__*/React.createContext(null);
|
|
10611
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
10612
|
-
ThemeContext$2.displayName = 'ThemeContext';
|
|
10613
|
-
}
|
|
10614
|
-
|
|
10615
|
-
function useTheme$8() {
|
|
10616
|
-
const theme = React.useContext(ThemeContext$2);
|
|
10617
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
10618
|
-
// TODO: uncomment once we enable eslint-plugin-react-compiler eslint-disable-next-line react-compiler/react-compiler
|
|
10619
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- It's not required to run React.useDebugValue in production
|
|
10620
|
-
React.useDebugValue(theme);
|
|
10621
|
-
}
|
|
10622
|
-
return theme;
|
|
10623
|
-
}
|
|
10624
|
-
|
|
10625
|
-
const hasSymbol$1 = typeof Symbol === 'function' && Symbol.for;
|
|
10626
|
-
var nested$2 = hasSymbol$1 ? Symbol.for('mui.nested') : '__THEME_NESTED__';
|
|
10627
|
-
|
|
10628
|
-
function mergeOuterLocalTheme(outerTheme, localTheme) {
|
|
10629
|
-
if (typeof localTheme === 'function') {
|
|
10630
|
-
const mergedTheme = localTheme(outerTheme);
|
|
10631
|
-
if (process.env.NODE_ENV !== 'production') ;
|
|
10632
|
-
return mergedTheme;
|
|
10633
|
-
}
|
|
10634
|
-
return {
|
|
10635
|
-
...outerTheme,
|
|
10636
|
-
...localTheme
|
|
10637
|
-
};
|
|
10638
|
-
}
|
|
10639
|
-
|
|
10640
|
-
/**
|
|
10641
|
-
* This component takes a `theme` prop.
|
|
10642
|
-
* It makes the `theme` available down the React tree thanks to React context.
|
|
10643
|
-
* This component should preferably be used at **the root of your component tree**.
|
|
10644
|
-
*/
|
|
10645
|
-
function ThemeProvider$6(props) {
|
|
10646
|
-
const {
|
|
10647
|
-
children,
|
|
10648
|
-
theme: localTheme
|
|
10649
|
-
} = props;
|
|
10650
|
-
const outerTheme = useTheme$8();
|
|
10651
|
-
if (process.env.NODE_ENV !== 'production') ;
|
|
10652
|
-
const theme = React.useMemo(() => {
|
|
10653
|
-
const output = outerTheme === null ? {
|
|
10654
|
-
...localTheme
|
|
10655
|
-
} : mergeOuterLocalTheme(outerTheme, localTheme);
|
|
10656
|
-
if (output != null) {
|
|
10657
|
-
output[nested$2] = outerTheme !== null;
|
|
10658
|
-
}
|
|
10659
|
-
return output;
|
|
10660
|
-
}, [localTheme, outerTheme]);
|
|
10661
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeContext$2.Provider, {
|
|
10662
|
-
value: theme,
|
|
10663
|
-
children: children
|
|
10664
|
-
});
|
|
10665
|
-
}
|
|
10666
|
-
process.env.NODE_ENV !== "production" ? ThemeProvider$6.propTypes = {
|
|
10667
|
-
/**
|
|
10668
|
-
* Your component tree.
|
|
10669
|
-
*/
|
|
10670
|
-
children: PropTypes.node,
|
|
10671
|
-
/**
|
|
10672
|
-
* A theme object. You can provide a function to extend the outer theme.
|
|
10673
|
-
*/
|
|
10674
|
-
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
|
|
10675
|
-
} : void 0;
|
|
10676
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
10677
|
-
process.env.NODE_ENV !== "production" ? ThemeProvider$6.propTypes = exactProp$4(ThemeProvider$6.propTypes) : void 0;
|
|
10678
|
-
}
|
|
10679
|
-
|
|
10680
10465
|
const RtlContext = /*#__PURE__*/React.createContext();
|
|
10681
|
-
|
|
10682
|
-
value,
|
|
10683
|
-
...props
|
|
10684
|
-
}) {
|
|
10685
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(RtlContext.Provider, {
|
|
10686
|
-
value: value ?? true,
|
|
10687
|
-
...props
|
|
10688
|
-
});
|
|
10689
|
-
}
|
|
10690
|
-
process.env.NODE_ENV !== "production" ? RtlProvider$1.propTypes = {
|
|
10466
|
+
process.env.NODE_ENV !== "production" ? {
|
|
10691
10467
|
children: PropTypes.node,
|
|
10692
10468
|
value: PropTypes.bool
|
|
10693
10469
|
} : void 0;
|
|
@@ -10697,16 +10473,7 @@ const useRtl = () => {
|
|
|
10697
10473
|
};
|
|
10698
10474
|
|
|
10699
10475
|
const PropsContext = /*#__PURE__*/React.createContext(undefined);
|
|
10700
|
-
|
|
10701
|
-
value,
|
|
10702
|
-
children
|
|
10703
|
-
}) {
|
|
10704
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(PropsContext.Provider, {
|
|
10705
|
-
value: value,
|
|
10706
|
-
children: children
|
|
10707
|
-
});
|
|
10708
|
-
}
|
|
10709
|
-
process.env.NODE_ENV !== "production" ? DefaultPropsProvider$4.propTypes /* remove-proptypes */ = {
|
|
10476
|
+
process.env.NODE_ENV !== "production" ? {
|
|
10710
10477
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
10711
10478
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
10712
10479
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -10754,176 +10521,6 @@ function useDefaultProps$1({
|
|
|
10754
10521
|
});
|
|
10755
10522
|
}
|
|
10756
10523
|
|
|
10757
|
-
let globalId$2 = 0;
|
|
10758
|
-
|
|
10759
|
-
// TODO React 17: Remove `useGlobalId` once React 17 support is removed
|
|
10760
|
-
function useGlobalId$2(idOverride) {
|
|
10761
|
-
const [defaultId, setDefaultId] = React.useState(idOverride);
|
|
10762
|
-
const id = idOverride || defaultId;
|
|
10763
|
-
React.useEffect(() => {
|
|
10764
|
-
if (defaultId == null) {
|
|
10765
|
-
// Fallback to this default id when possible.
|
|
10766
|
-
// Use the incrementing value for client-side rendering only.
|
|
10767
|
-
// We can't use it server-side.
|
|
10768
|
-
// If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
|
|
10769
|
-
globalId$2 += 1;
|
|
10770
|
-
setDefaultId(`mui-${globalId$2}`);
|
|
10771
|
-
}
|
|
10772
|
-
}, [defaultId]);
|
|
10773
|
-
return id;
|
|
10774
|
-
}
|
|
10775
|
-
|
|
10776
|
-
// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why
|
|
10777
|
-
const safeReact$1 = {
|
|
10778
|
-
...React
|
|
10779
|
-
};
|
|
10780
|
-
const maybeReactUseId$2 = safeReact$1.useId;
|
|
10781
|
-
|
|
10782
|
-
/**
|
|
10783
|
-
*
|
|
10784
|
-
* @example <div id={useId()} />
|
|
10785
|
-
* @param idOverride
|
|
10786
|
-
* @returns {string}
|
|
10787
|
-
*/
|
|
10788
|
-
function useId$8(idOverride) {
|
|
10789
|
-
// React.useId() is only available from React 17.0.0.
|
|
10790
|
-
if (maybeReactUseId$2 !== undefined) {
|
|
10791
|
-
const reactId = maybeReactUseId$2();
|
|
10792
|
-
return reactId;
|
|
10793
|
-
}
|
|
10794
|
-
|
|
10795
|
-
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
|
|
10796
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
|
|
10797
|
-
return useGlobalId$2(idOverride);
|
|
10798
|
-
}
|
|
10799
|
-
|
|
10800
|
-
function useLayerOrder$1(theme) {
|
|
10801
|
-
const upperTheme = useTheme$a();
|
|
10802
|
-
const id = useId$8() || '';
|
|
10803
|
-
const {
|
|
10804
|
-
modularCssLayers
|
|
10805
|
-
} = theme;
|
|
10806
|
-
let layerOrder = 'mui.global, mui.components, mui.theme, mui.custom, mui.sx';
|
|
10807
|
-
if (!modularCssLayers || upperTheme !== null) {
|
|
10808
|
-
// skip this hook if upper theme exists.
|
|
10809
|
-
layerOrder = '';
|
|
10810
|
-
} else if (typeof modularCssLayers === 'string') {
|
|
10811
|
-
layerOrder = modularCssLayers.replace(/mui(?!\.)/g, layerOrder);
|
|
10812
|
-
} else {
|
|
10813
|
-
layerOrder = `@layer ${layerOrder};`;
|
|
10814
|
-
}
|
|
10815
|
-
useEnhancedEffect$7(() => {
|
|
10816
|
-
const head = document.querySelector('head');
|
|
10817
|
-
if (!head) {
|
|
10818
|
-
return;
|
|
10819
|
-
}
|
|
10820
|
-
const firstChild = head.firstChild;
|
|
10821
|
-
if (layerOrder) {
|
|
10822
|
-
// Only insert if first child doesn't have data-mui-layer-order attribute
|
|
10823
|
-
if (firstChild && firstChild.hasAttribute?.('data-mui-layer-order') && firstChild.getAttribute('data-mui-layer-order') === id) {
|
|
10824
|
-
return;
|
|
10825
|
-
}
|
|
10826
|
-
const styleElement = document.createElement('style');
|
|
10827
|
-
styleElement.setAttribute('data-mui-layer-order', id);
|
|
10828
|
-
styleElement.textContent = layerOrder;
|
|
10829
|
-
head.prepend(styleElement);
|
|
10830
|
-
} else {
|
|
10831
|
-
head.querySelector(`style[data-mui-layer-order="${id}"]`)?.remove();
|
|
10832
|
-
}
|
|
10833
|
-
}, [layerOrder, id]);
|
|
10834
|
-
if (!layerOrder) {
|
|
10835
|
-
return null;
|
|
10836
|
-
}
|
|
10837
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(GlobalStyles$7, {
|
|
10838
|
-
styles: layerOrder
|
|
10839
|
-
});
|
|
10840
|
-
}
|
|
10841
|
-
|
|
10842
|
-
const EMPTY_THEME = {};
|
|
10843
|
-
function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
10844
|
-
return React.useMemo(() => {
|
|
10845
|
-
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
|
10846
|
-
if (typeof localTheme === 'function') {
|
|
10847
|
-
const mergedTheme = localTheme(resolvedTheme);
|
|
10848
|
-
const result = themeId ? {
|
|
10849
|
-
...upperTheme,
|
|
10850
|
-
[themeId]: mergedTheme
|
|
10851
|
-
} : mergedTheme;
|
|
10852
|
-
// must return a function for the private theme to NOT merge with the upper theme.
|
|
10853
|
-
// see the test case "use provided theme from a callback" in ThemeProvider.test.js
|
|
10854
|
-
if (isPrivate) {
|
|
10855
|
-
return () => result;
|
|
10856
|
-
}
|
|
10857
|
-
return result;
|
|
10858
|
-
}
|
|
10859
|
-
return themeId ? {
|
|
10860
|
-
...upperTheme,
|
|
10861
|
-
[themeId]: localTheme
|
|
10862
|
-
} : {
|
|
10863
|
-
...upperTheme,
|
|
10864
|
-
...localTheme
|
|
10865
|
-
};
|
|
10866
|
-
}, [themeId, upperTheme, localTheme, isPrivate]);
|
|
10867
|
-
}
|
|
10868
|
-
|
|
10869
|
-
/**
|
|
10870
|
-
* This component makes the `theme` available down the React tree.
|
|
10871
|
-
* It should preferably be used at **the root of your component tree**.
|
|
10872
|
-
*
|
|
10873
|
-
* <ThemeProvider theme={theme}> // existing use case
|
|
10874
|
-
* <ThemeProvider theme={{ id: theme }}> // theme scoping
|
|
10875
|
-
*/
|
|
10876
|
-
function ThemeProvider$5(props) {
|
|
10877
|
-
const {
|
|
10878
|
-
children,
|
|
10879
|
-
theme: localTheme,
|
|
10880
|
-
themeId
|
|
10881
|
-
} = props;
|
|
10882
|
-
const upperTheme = useTheme$a(EMPTY_THEME);
|
|
10883
|
-
const upperPrivateTheme = useTheme$8() || EMPTY_THEME;
|
|
10884
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
10885
|
-
if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') ;
|
|
10886
|
-
}
|
|
10887
|
-
const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
|
10888
|
-
const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
|
10889
|
-
const rtlValue = (themeId ? engineTheme[themeId] : engineTheme).direction === 'rtl';
|
|
10890
|
-
const layerOrder = useLayerOrder$1(engineTheme);
|
|
10891
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$6, {
|
|
10892
|
-
theme: privateTheme,
|
|
10893
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(ThemeContext$3.Provider, {
|
|
10894
|
-
value: engineTheme,
|
|
10895
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(RtlProvider$1, {
|
|
10896
|
-
value: rtlValue,
|
|
10897
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsxs(DefaultPropsProvider$4, {
|
|
10898
|
-
value: themeId ? engineTheme[themeId].components : engineTheme.components,
|
|
10899
|
-
children: [layerOrder, children]
|
|
10900
|
-
})
|
|
10901
|
-
})
|
|
10902
|
-
})
|
|
10903
|
-
});
|
|
10904
|
-
}
|
|
10905
|
-
process.env.NODE_ENV !== "production" ? ThemeProvider$5.propTypes /* remove-proptypes */ = {
|
|
10906
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
10907
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
10908
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
10909
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
10910
|
-
/**
|
|
10911
|
-
* Your component tree.
|
|
10912
|
-
*/
|
|
10913
|
-
children: PropTypes.node,
|
|
10914
|
-
/**
|
|
10915
|
-
* A theme object. You can provide a function to extend the outer theme.
|
|
10916
|
-
*/
|
|
10917
|
-
theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,
|
|
10918
|
-
/**
|
|
10919
|
-
* The design system's unique id for getting the corresponded theme when there are multiple design systems.
|
|
10920
|
-
*/
|
|
10921
|
-
themeId: PropTypes.string
|
|
10922
|
-
} : void 0;
|
|
10923
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
10924
|
-
process.env.NODE_ENV !== "production" ? ThemeProvider$5.propTypes = exactProp$4(ThemeProvider$5.propTypes) : void 0;
|
|
10925
|
-
}
|
|
10926
|
-
|
|
10927
10524
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
10928
10525
|
|
|
10929
10526
|
// We need to pass an argument as `{ theme }` for PigmentCSS, but we don't want to
|
|
@@ -10951,676 +10548,6 @@ function unstable_memoTheme(styleFn) {
|
|
|
10951
10548
|
};
|
|
10952
10549
|
}
|
|
10953
10550
|
|
|
10954
|
-
/**
|
|
10955
|
-
* Split this component for RSC import
|
|
10956
|
-
*/
|
|
10957
|
-
const DEFAULT_MODE_STORAGE_KEY = 'mode';
|
|
10958
|
-
const DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';
|
|
10959
|
-
const DEFAULT_ATTRIBUTE = 'data-color-scheme';
|
|
10960
|
-
function InitColorSchemeScript$1(options) {
|
|
10961
|
-
const {
|
|
10962
|
-
defaultMode = 'system',
|
|
10963
|
-
defaultLightColorScheme = 'light',
|
|
10964
|
-
defaultDarkColorScheme = 'dark',
|
|
10965
|
-
modeStorageKey = DEFAULT_MODE_STORAGE_KEY,
|
|
10966
|
-
colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,
|
|
10967
|
-
attribute: initialAttribute = DEFAULT_ATTRIBUTE,
|
|
10968
|
-
colorSchemeNode = 'document.documentElement',
|
|
10969
|
-
nonce
|
|
10970
|
-
} = options || {};
|
|
10971
|
-
let setter = '';
|
|
10972
|
-
let attribute = initialAttribute;
|
|
10973
|
-
if (initialAttribute === 'class') {
|
|
10974
|
-
attribute = '.%s';
|
|
10975
|
-
}
|
|
10976
|
-
if (initialAttribute === 'data') {
|
|
10977
|
-
attribute = '[data-%s]';
|
|
10978
|
-
}
|
|
10979
|
-
if (attribute.startsWith('.')) {
|
|
10980
|
-
const selector = attribute.substring(1);
|
|
10981
|
-
setter += `${colorSchemeNode}.classList.remove('${selector}'.replace('%s', light), '${selector}'.replace('%s', dark));
|
|
10982
|
-
${colorSchemeNode}.classList.add('${selector}'.replace('%s', colorScheme));`;
|
|
10983
|
-
}
|
|
10984
|
-
const matches = attribute.match(/\[([^\]]+)\]/); // case [data-color-scheme='%s'] or [data-color-scheme]
|
|
10985
|
-
if (matches) {
|
|
10986
|
-
const [attr, value] = matches[1].split('=');
|
|
10987
|
-
if (!value) {
|
|
10988
|
-
setter += `${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', light));
|
|
10989
|
-
${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', dark));`;
|
|
10990
|
-
}
|
|
10991
|
-
setter += `
|
|
10992
|
-
${colorSchemeNode}.setAttribute('${attr}'.replace('%s', colorScheme), ${value ? `${value}.replace('%s', colorScheme)` : '""'});`;
|
|
10993
|
-
} else {
|
|
10994
|
-
setter += `${colorSchemeNode}.setAttribute('${attribute}', colorScheme);`;
|
|
10995
|
-
}
|
|
10996
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx("script", {
|
|
10997
|
-
suppressHydrationWarning: true,
|
|
10998
|
-
nonce: typeof window === 'undefined' ? nonce : ''
|
|
10999
|
-
// eslint-disable-next-line react/no-danger
|
|
11000
|
-
,
|
|
11001
|
-
dangerouslySetInnerHTML: {
|
|
11002
|
-
__html: `(function() {
|
|
11003
|
-
try {
|
|
11004
|
-
let colorScheme = '';
|
|
11005
|
-
const mode = localStorage.getItem('${modeStorageKey}') || '${defaultMode}';
|
|
11006
|
-
const dark = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';
|
|
11007
|
-
const light = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';
|
|
11008
|
-
if (mode === 'system') {
|
|
11009
|
-
// handle system mode
|
|
11010
|
-
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
11011
|
-
if (mql.matches) {
|
|
11012
|
-
colorScheme = dark
|
|
11013
|
-
} else {
|
|
11014
|
-
colorScheme = light
|
|
11015
|
-
}
|
|
11016
|
-
}
|
|
11017
|
-
if (mode === 'light') {
|
|
11018
|
-
colorScheme = light;
|
|
11019
|
-
}
|
|
11020
|
-
if (mode === 'dark') {
|
|
11021
|
-
colorScheme = dark;
|
|
11022
|
-
}
|
|
11023
|
-
if (colorScheme) {
|
|
11024
|
-
${setter}
|
|
11025
|
-
}
|
|
11026
|
-
} catch(e){}})();`
|
|
11027
|
-
}
|
|
11028
|
-
}, "mui-color-scheme-init");
|
|
11029
|
-
}
|
|
11030
|
-
|
|
11031
|
-
function noop$6() {}
|
|
11032
|
-
const localStorageManager$1 = ({
|
|
11033
|
-
key,
|
|
11034
|
-
storageWindow
|
|
11035
|
-
}) => {
|
|
11036
|
-
if (!storageWindow && typeof window !== 'undefined') {
|
|
11037
|
-
storageWindow = window;
|
|
11038
|
-
}
|
|
11039
|
-
return {
|
|
11040
|
-
get(defaultValue) {
|
|
11041
|
-
if (typeof window === 'undefined') {
|
|
11042
|
-
return undefined;
|
|
11043
|
-
}
|
|
11044
|
-
if (!storageWindow) {
|
|
11045
|
-
return defaultValue;
|
|
11046
|
-
}
|
|
11047
|
-
let value;
|
|
11048
|
-
try {
|
|
11049
|
-
value = storageWindow.localStorage.getItem(key);
|
|
11050
|
-
} catch {
|
|
11051
|
-
// Unsupported
|
|
11052
|
-
}
|
|
11053
|
-
return value || defaultValue;
|
|
11054
|
-
},
|
|
11055
|
-
set: value => {
|
|
11056
|
-
if (storageWindow) {
|
|
11057
|
-
try {
|
|
11058
|
-
storageWindow.localStorage.setItem(key, value);
|
|
11059
|
-
} catch {
|
|
11060
|
-
// Unsupported
|
|
11061
|
-
}
|
|
11062
|
-
}
|
|
11063
|
-
},
|
|
11064
|
-
subscribe: handler => {
|
|
11065
|
-
if (!storageWindow) {
|
|
11066
|
-
return noop$6;
|
|
11067
|
-
}
|
|
11068
|
-
const listener = event => {
|
|
11069
|
-
const value = event.newValue;
|
|
11070
|
-
if (event.key === key) {
|
|
11071
|
-
handler(value);
|
|
11072
|
-
}
|
|
11073
|
-
};
|
|
11074
|
-
storageWindow.addEventListener('storage', listener);
|
|
11075
|
-
return () => {
|
|
11076
|
-
storageWindow.removeEventListener('storage', listener);
|
|
11077
|
-
};
|
|
11078
|
-
}
|
|
11079
|
-
};
|
|
11080
|
-
};
|
|
11081
|
-
|
|
11082
|
-
function noop$5() {}
|
|
11083
|
-
function getSystemMode(mode) {
|
|
11084
|
-
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function' && mode === 'system') {
|
|
11085
|
-
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
11086
|
-
if (mql.matches) {
|
|
11087
|
-
return 'dark';
|
|
11088
|
-
}
|
|
11089
|
-
return 'light';
|
|
11090
|
-
}
|
|
11091
|
-
return undefined;
|
|
11092
|
-
}
|
|
11093
|
-
function processState(state, callback) {
|
|
11094
|
-
if (state.mode === 'light' || state.mode === 'system' && state.systemMode === 'light') {
|
|
11095
|
-
return callback('light');
|
|
11096
|
-
}
|
|
11097
|
-
if (state.mode === 'dark' || state.mode === 'system' && state.systemMode === 'dark') {
|
|
11098
|
-
return callback('dark');
|
|
11099
|
-
}
|
|
11100
|
-
return undefined;
|
|
11101
|
-
}
|
|
11102
|
-
function getColorScheme(state) {
|
|
11103
|
-
return processState(state, mode => {
|
|
11104
|
-
if (mode === 'light') {
|
|
11105
|
-
return state.lightColorScheme;
|
|
11106
|
-
}
|
|
11107
|
-
if (mode === 'dark') {
|
|
11108
|
-
return state.darkColorScheme;
|
|
11109
|
-
}
|
|
11110
|
-
return undefined;
|
|
11111
|
-
});
|
|
11112
|
-
}
|
|
11113
|
-
function useCurrentColorScheme$1(options) {
|
|
11114
|
-
const {
|
|
11115
|
-
defaultMode = 'light',
|
|
11116
|
-
defaultLightColorScheme,
|
|
11117
|
-
defaultDarkColorScheme,
|
|
11118
|
-
supportedColorSchemes = [],
|
|
11119
|
-
modeStorageKey = DEFAULT_MODE_STORAGE_KEY,
|
|
11120
|
-
colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,
|
|
11121
|
-
storageWindow = typeof window === 'undefined' ? undefined : window,
|
|
11122
|
-
storageManager = localStorageManager$1,
|
|
11123
|
-
noSsr = false
|
|
11124
|
-
} = options;
|
|
11125
|
-
const joinedColorSchemes = supportedColorSchemes.join(',');
|
|
11126
|
-
const isMultiSchemes = supportedColorSchemes.length > 1;
|
|
11127
|
-
const modeStorage = React.useMemo(() => storageManager?.({
|
|
11128
|
-
key: modeStorageKey,
|
|
11129
|
-
storageWindow
|
|
11130
|
-
}), [storageManager, modeStorageKey, storageWindow]);
|
|
11131
|
-
const lightStorage = React.useMemo(() => storageManager?.({
|
|
11132
|
-
key: `${colorSchemeStorageKey}-light`,
|
|
11133
|
-
storageWindow
|
|
11134
|
-
}), [storageManager, colorSchemeStorageKey, storageWindow]);
|
|
11135
|
-
const darkStorage = React.useMemo(() => storageManager?.({
|
|
11136
|
-
key: `${colorSchemeStorageKey}-dark`,
|
|
11137
|
-
storageWindow
|
|
11138
|
-
}), [storageManager, colorSchemeStorageKey, storageWindow]);
|
|
11139
|
-
const [state, setState] = React.useState(() => {
|
|
11140
|
-
const initialMode = modeStorage?.get(defaultMode) || defaultMode;
|
|
11141
|
-
const lightColorScheme = lightStorage?.get(defaultLightColorScheme) || defaultLightColorScheme;
|
|
11142
|
-
const darkColorScheme = darkStorage?.get(defaultDarkColorScheme) || defaultDarkColorScheme;
|
|
11143
|
-
return {
|
|
11144
|
-
mode: initialMode,
|
|
11145
|
-
systemMode: getSystemMode(initialMode),
|
|
11146
|
-
lightColorScheme,
|
|
11147
|
-
darkColorScheme
|
|
11148
|
-
};
|
|
11149
|
-
});
|
|
11150
|
-
const [isClient, setIsClient] = React.useState(noSsr || !isMultiSchemes);
|
|
11151
|
-
React.useEffect(() => {
|
|
11152
|
-
setIsClient(true); // to rerender the component after hydration
|
|
11153
|
-
}, []);
|
|
11154
|
-
const colorScheme = getColorScheme(state);
|
|
11155
|
-
const setMode = React.useCallback(mode => {
|
|
11156
|
-
setState(currentState => {
|
|
11157
|
-
if (mode === currentState.mode) {
|
|
11158
|
-
// do nothing if mode does not change
|
|
11159
|
-
return currentState;
|
|
11160
|
-
}
|
|
11161
|
-
const newMode = mode ?? defaultMode;
|
|
11162
|
-
modeStorage?.set(newMode);
|
|
11163
|
-
return {
|
|
11164
|
-
...currentState,
|
|
11165
|
-
mode: newMode,
|
|
11166
|
-
systemMode: getSystemMode(newMode)
|
|
11167
|
-
};
|
|
11168
|
-
});
|
|
11169
|
-
}, [modeStorage, defaultMode]);
|
|
11170
|
-
const setColorScheme = React.useCallback(value => {
|
|
11171
|
-
if (!value) {
|
|
11172
|
-
setState(currentState => {
|
|
11173
|
-
lightStorage?.set(defaultLightColorScheme);
|
|
11174
|
-
darkStorage?.set(defaultDarkColorScheme);
|
|
11175
|
-
return {
|
|
11176
|
-
...currentState,
|
|
11177
|
-
lightColorScheme: defaultLightColorScheme,
|
|
11178
|
-
darkColorScheme: defaultDarkColorScheme
|
|
11179
|
-
};
|
|
11180
|
-
});
|
|
11181
|
-
} else if (typeof value === 'string') {
|
|
11182
|
-
if (value && !joinedColorSchemes.includes(value)) ; else {
|
|
11183
|
-
setState(currentState => {
|
|
11184
|
-
const newState = {
|
|
11185
|
-
...currentState
|
|
11186
|
-
};
|
|
11187
|
-
processState(currentState, mode => {
|
|
11188
|
-
if (mode === 'light') {
|
|
11189
|
-
lightStorage?.set(value);
|
|
11190
|
-
newState.lightColorScheme = value;
|
|
11191
|
-
}
|
|
11192
|
-
if (mode === 'dark') {
|
|
11193
|
-
darkStorage?.set(value);
|
|
11194
|
-
newState.darkColorScheme = value;
|
|
11195
|
-
}
|
|
11196
|
-
});
|
|
11197
|
-
return newState;
|
|
11198
|
-
});
|
|
11199
|
-
}
|
|
11200
|
-
} else {
|
|
11201
|
-
setState(currentState => {
|
|
11202
|
-
const newState = {
|
|
11203
|
-
...currentState
|
|
11204
|
-
};
|
|
11205
|
-
const newLightColorScheme = value.light === null ? defaultLightColorScheme : value.light;
|
|
11206
|
-
const newDarkColorScheme = value.dark === null ? defaultDarkColorScheme : value.dark;
|
|
11207
|
-
if (newLightColorScheme) {
|
|
11208
|
-
if (!joinedColorSchemes.includes(newLightColorScheme)) ; else {
|
|
11209
|
-
newState.lightColorScheme = newLightColorScheme;
|
|
11210
|
-
lightStorage?.set(newLightColorScheme);
|
|
11211
|
-
}
|
|
11212
|
-
}
|
|
11213
|
-
if (newDarkColorScheme) {
|
|
11214
|
-
if (!joinedColorSchemes.includes(newDarkColorScheme)) ; else {
|
|
11215
|
-
newState.darkColorScheme = newDarkColorScheme;
|
|
11216
|
-
darkStorage?.set(newDarkColorScheme);
|
|
11217
|
-
}
|
|
11218
|
-
}
|
|
11219
|
-
return newState;
|
|
11220
|
-
});
|
|
11221
|
-
}
|
|
11222
|
-
}, [joinedColorSchemes, lightStorage, darkStorage, defaultLightColorScheme, defaultDarkColorScheme]);
|
|
11223
|
-
const handleMediaQuery = React.useCallback(event => {
|
|
11224
|
-
if (state.mode === 'system') {
|
|
11225
|
-
setState(currentState => {
|
|
11226
|
-
const systemMode = event?.matches ? 'dark' : 'light';
|
|
11227
|
-
|
|
11228
|
-
// Early exit, nothing changed.
|
|
11229
|
-
if (currentState.systemMode === systemMode) {
|
|
11230
|
-
return currentState;
|
|
11231
|
-
}
|
|
11232
|
-
return {
|
|
11233
|
-
...currentState,
|
|
11234
|
-
systemMode
|
|
11235
|
-
};
|
|
11236
|
-
});
|
|
11237
|
-
}
|
|
11238
|
-
}, [state.mode]);
|
|
11239
|
-
|
|
11240
|
-
// Ref hack to avoid adding handleMediaQuery as a dep
|
|
11241
|
-
const mediaListener = React.useRef(handleMediaQuery);
|
|
11242
|
-
mediaListener.current = handleMediaQuery;
|
|
11243
|
-
React.useEffect(() => {
|
|
11244
|
-
if (typeof window.matchMedia !== 'function' || !isMultiSchemes) {
|
|
11245
|
-
return undefined;
|
|
11246
|
-
}
|
|
11247
|
-
const handler = (...args) => mediaListener.current(...args);
|
|
11248
|
-
|
|
11249
|
-
// Always listen to System preference
|
|
11250
|
-
const media = window.matchMedia('(prefers-color-scheme: dark)');
|
|
11251
|
-
|
|
11252
|
-
// Intentionally use deprecated listener methods to support iOS & old browsers
|
|
11253
|
-
media.addListener(handler);
|
|
11254
|
-
handler(media);
|
|
11255
|
-
return () => {
|
|
11256
|
-
media.removeListener(handler);
|
|
11257
|
-
};
|
|
11258
|
-
}, [isMultiSchemes]);
|
|
11259
|
-
|
|
11260
|
-
// Handle when localStorage has changed
|
|
11261
|
-
React.useEffect(() => {
|
|
11262
|
-
if (isMultiSchemes) {
|
|
11263
|
-
const unsubscribeMode = modeStorage?.subscribe(value => {
|
|
11264
|
-
if (!value || ['light', 'dark', 'system'].includes(value)) {
|
|
11265
|
-
setMode(value || defaultMode);
|
|
11266
|
-
}
|
|
11267
|
-
}) || noop$5;
|
|
11268
|
-
const unsubscribeLight = lightStorage?.subscribe(value => {
|
|
11269
|
-
if (!value || joinedColorSchemes.match(value)) {
|
|
11270
|
-
setColorScheme({
|
|
11271
|
-
light: value
|
|
11272
|
-
});
|
|
11273
|
-
}
|
|
11274
|
-
}) || noop$5;
|
|
11275
|
-
const unsubscribeDark = darkStorage?.subscribe(value => {
|
|
11276
|
-
if (!value || joinedColorSchemes.match(value)) {
|
|
11277
|
-
setColorScheme({
|
|
11278
|
-
dark: value
|
|
11279
|
-
});
|
|
11280
|
-
}
|
|
11281
|
-
}) || noop$5;
|
|
11282
|
-
return () => {
|
|
11283
|
-
unsubscribeMode();
|
|
11284
|
-
unsubscribeLight();
|
|
11285
|
-
unsubscribeDark();
|
|
11286
|
-
};
|
|
11287
|
-
}
|
|
11288
|
-
return undefined;
|
|
11289
|
-
}, [setColorScheme, setMode, joinedColorSchemes, defaultMode, storageWindow, isMultiSchemes, modeStorage, lightStorage, darkStorage]);
|
|
11290
|
-
return {
|
|
11291
|
-
...state,
|
|
11292
|
-
mode: isClient ? state.mode : undefined,
|
|
11293
|
-
systemMode: isClient ? state.systemMode : undefined,
|
|
11294
|
-
colorScheme: isClient ? colorScheme : undefined,
|
|
11295
|
-
setMode,
|
|
11296
|
-
setColorScheme
|
|
11297
|
-
};
|
|
11298
|
-
}
|
|
11299
|
-
|
|
11300
|
-
const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
|
|
11301
|
-
function createCssVarsProvider$1(options) {
|
|
11302
|
-
const {
|
|
11303
|
-
themeId,
|
|
11304
|
-
/**
|
|
11305
|
-
* This `theme` object needs to follow a certain structure to
|
|
11306
|
-
* be used correctly by the finel `CssVarsProvider`. It should have a
|
|
11307
|
-
* `colorSchemes` key with the light and dark (and any other) palette.
|
|
11308
|
-
* It should also ideally have a vars object created using `prepareCssVars`.
|
|
11309
|
-
*/
|
|
11310
|
-
theme: defaultTheme = {},
|
|
11311
|
-
modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,
|
|
11312
|
-
colorSchemeStorageKey: defaultColorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,
|
|
11313
|
-
disableTransitionOnChange: designSystemTransitionOnChange = false,
|
|
11314
|
-
defaultColorScheme,
|
|
11315
|
-
resolveTheme
|
|
11316
|
-
} = options;
|
|
11317
|
-
const defaultContext = {
|
|
11318
|
-
allColorSchemes: [],
|
|
11319
|
-
colorScheme: undefined,
|
|
11320
|
-
darkColorScheme: undefined,
|
|
11321
|
-
lightColorScheme: undefined,
|
|
11322
|
-
mode: undefined,
|
|
11323
|
-
setColorScheme: () => {},
|
|
11324
|
-
setMode: () => {},
|
|
11325
|
-
systemMode: undefined
|
|
11326
|
-
};
|
|
11327
|
-
const ColorSchemeContext = /*#__PURE__*/React.createContext(undefined);
|
|
11328
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
11329
|
-
ColorSchemeContext.displayName = 'ColorSchemeContext';
|
|
11330
|
-
}
|
|
11331
|
-
const useColorScheme = () => React.useContext(ColorSchemeContext) || defaultContext;
|
|
11332
|
-
const defaultColorSchemes = {};
|
|
11333
|
-
const defaultComponents = {};
|
|
11334
|
-
function CssVarsProvider(props) {
|
|
11335
|
-
const {
|
|
11336
|
-
children,
|
|
11337
|
-
theme: themeProp,
|
|
11338
|
-
modeStorageKey = defaultModeStorageKey,
|
|
11339
|
-
colorSchemeStorageKey = defaultColorSchemeStorageKey,
|
|
11340
|
-
disableTransitionOnChange = designSystemTransitionOnChange,
|
|
11341
|
-
storageManager,
|
|
11342
|
-
storageWindow = typeof window === 'undefined' ? undefined : window,
|
|
11343
|
-
documentNode = typeof document === 'undefined' ? undefined : document,
|
|
11344
|
-
colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,
|
|
11345
|
-
disableNestedContext = false,
|
|
11346
|
-
disableStyleSheetGeneration = false,
|
|
11347
|
-
defaultMode: initialMode = 'system',
|
|
11348
|
-
forceThemeRerender = false,
|
|
11349
|
-
noSsr
|
|
11350
|
-
} = props;
|
|
11351
|
-
const hasMounted = React.useRef(false);
|
|
11352
|
-
const upperTheme = useTheme$8();
|
|
11353
|
-
const ctx = React.useContext(ColorSchemeContext);
|
|
11354
|
-
const nested = !!ctx && !disableNestedContext;
|
|
11355
|
-
const initialTheme = React.useMemo(() => {
|
|
11356
|
-
if (themeProp) {
|
|
11357
|
-
return themeProp;
|
|
11358
|
-
}
|
|
11359
|
-
return typeof defaultTheme === 'function' ? defaultTheme() : defaultTheme;
|
|
11360
|
-
}, [themeProp]);
|
|
11361
|
-
const scopedTheme = initialTheme[themeId];
|
|
11362
|
-
const restThemeProp = scopedTheme || initialTheme;
|
|
11363
|
-
const {
|
|
11364
|
-
colorSchemes = defaultColorSchemes,
|
|
11365
|
-
components = defaultComponents,
|
|
11366
|
-
cssVarPrefix
|
|
11367
|
-
} = restThemeProp;
|
|
11368
|
-
const joinedColorSchemes = Object.keys(colorSchemes).filter(k => !!colorSchemes[k]).join(',');
|
|
11369
|
-
const allColorSchemes = React.useMemo(() => joinedColorSchemes.split(','), [joinedColorSchemes]);
|
|
11370
|
-
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
11371
|
-
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
11372
|
-
const defaultMode = colorSchemes[defaultLightColorScheme] && colorSchemes[defaultDarkColorScheme] ? initialMode : colorSchemes[restThemeProp.defaultColorScheme]?.palette?.mode || restThemeProp.palette?.mode;
|
|
11373
|
-
|
|
11374
|
-
// 1. Get the data about the `mode`, `colorScheme`, and setter functions.
|
|
11375
|
-
const {
|
|
11376
|
-
mode: stateMode,
|
|
11377
|
-
setMode,
|
|
11378
|
-
systemMode,
|
|
11379
|
-
lightColorScheme,
|
|
11380
|
-
darkColorScheme,
|
|
11381
|
-
colorScheme: stateColorScheme,
|
|
11382
|
-
setColorScheme
|
|
11383
|
-
} = useCurrentColorScheme$1({
|
|
11384
|
-
supportedColorSchemes: allColorSchemes,
|
|
11385
|
-
defaultLightColorScheme,
|
|
11386
|
-
defaultDarkColorScheme,
|
|
11387
|
-
modeStorageKey,
|
|
11388
|
-
colorSchemeStorageKey,
|
|
11389
|
-
defaultMode,
|
|
11390
|
-
storageManager,
|
|
11391
|
-
storageWindow,
|
|
11392
|
-
noSsr
|
|
11393
|
-
});
|
|
11394
|
-
let mode = stateMode;
|
|
11395
|
-
let colorScheme = stateColorScheme;
|
|
11396
|
-
if (nested) {
|
|
11397
|
-
mode = ctx.mode;
|
|
11398
|
-
colorScheme = ctx.colorScheme;
|
|
11399
|
-
}
|
|
11400
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
11401
|
-
if (forceThemeRerender && !restThemeProp.vars) ;
|
|
11402
|
-
}
|
|
11403
|
-
|
|
11404
|
-
// `colorScheme` is undefined on the server and hydration phase
|
|
11405
|
-
let calculatedColorScheme = colorScheme || restThemeProp.defaultColorScheme;
|
|
11406
|
-
if (restThemeProp.vars && !forceThemeRerender) {
|
|
11407
|
-
calculatedColorScheme = restThemeProp.defaultColorScheme;
|
|
11408
|
-
}
|
|
11409
|
-
const memoTheme = React.useMemo(() => {
|
|
11410
|
-
// 2. get the `vars` object that refers to the CSS custom properties
|
|
11411
|
-
const themeVars = restThemeProp.generateThemeVars?.() || restThemeProp.vars;
|
|
11412
|
-
|
|
11413
|
-
// 3. Start composing the theme object
|
|
11414
|
-
const theme = {
|
|
11415
|
-
...restThemeProp,
|
|
11416
|
-
components,
|
|
11417
|
-
colorSchemes,
|
|
11418
|
-
cssVarPrefix,
|
|
11419
|
-
vars: themeVars
|
|
11420
|
-
};
|
|
11421
|
-
if (typeof theme.generateSpacing === 'function') {
|
|
11422
|
-
theme.spacing = theme.generateSpacing();
|
|
11423
|
-
}
|
|
11424
|
-
|
|
11425
|
-
// 4. Resolve the color scheme and merge it to the theme
|
|
11426
|
-
if (calculatedColorScheme) {
|
|
11427
|
-
const scheme = colorSchemes[calculatedColorScheme];
|
|
11428
|
-
if (scheme && typeof scheme === 'object') {
|
|
11429
|
-
// 4.1 Merge the selected color scheme to the theme
|
|
11430
|
-
Object.keys(scheme).forEach(schemeKey => {
|
|
11431
|
-
if (scheme[schemeKey] && typeof scheme[schemeKey] === 'object') {
|
|
11432
|
-
// shallow merge the 1st level structure of the theme.
|
|
11433
|
-
theme[schemeKey] = {
|
|
11434
|
-
...theme[schemeKey],
|
|
11435
|
-
...scheme[schemeKey]
|
|
11436
|
-
};
|
|
11437
|
-
} else {
|
|
11438
|
-
theme[schemeKey] = scheme[schemeKey];
|
|
11439
|
-
}
|
|
11440
|
-
});
|
|
11441
|
-
}
|
|
11442
|
-
}
|
|
11443
|
-
return resolveTheme ? resolveTheme(theme) : theme;
|
|
11444
|
-
}, [restThemeProp, calculatedColorScheme, components, colorSchemes, cssVarPrefix]);
|
|
11445
|
-
|
|
11446
|
-
// 5. Declaring effects
|
|
11447
|
-
// 5.1 Updates the selector value to use the current color scheme which tells CSS to use the proper stylesheet.
|
|
11448
|
-
const colorSchemeSelector = restThemeProp.colorSchemeSelector;
|
|
11449
|
-
useEnhancedEffect$7(() => {
|
|
11450
|
-
if (colorScheme && colorSchemeNode && colorSchemeSelector && colorSchemeSelector !== 'media') {
|
|
11451
|
-
const selector = colorSchemeSelector;
|
|
11452
|
-
let rule = colorSchemeSelector;
|
|
11453
|
-
if (selector === 'class') {
|
|
11454
|
-
rule = `.%s`;
|
|
11455
|
-
}
|
|
11456
|
-
if (selector === 'data') {
|
|
11457
|
-
rule = `[data-%s]`;
|
|
11458
|
-
}
|
|
11459
|
-
if (selector?.startsWith('data-') && !selector.includes('%s')) {
|
|
11460
|
-
// 'data-mui-color-scheme' -> '[data-mui-color-scheme="%s"]'
|
|
11461
|
-
rule = `[${selector}="%s"]`;
|
|
11462
|
-
}
|
|
11463
|
-
if (rule.startsWith('.')) {
|
|
11464
|
-
colorSchemeNode.classList.remove(...allColorSchemes.map(scheme => rule.substring(1).replace('%s', scheme)));
|
|
11465
|
-
colorSchemeNode.classList.add(rule.substring(1).replace('%s', colorScheme));
|
|
11466
|
-
} else {
|
|
11467
|
-
const matches = rule.replace('%s', colorScheme).match(/\[([^\]]+)\]/);
|
|
11468
|
-
if (matches) {
|
|
11469
|
-
const [attr, value] = matches[1].split('=');
|
|
11470
|
-
if (!value) {
|
|
11471
|
-
// for attributes like `data-theme-dark`, `data-theme-light`
|
|
11472
|
-
// remove all the existing data attributes before setting the new one
|
|
11473
|
-
allColorSchemes.forEach(scheme => {
|
|
11474
|
-
colorSchemeNode.removeAttribute(attr.replace(colorScheme, scheme));
|
|
11475
|
-
});
|
|
11476
|
-
}
|
|
11477
|
-
colorSchemeNode.setAttribute(attr, value ? value.replace(/"|'/g, '') : '');
|
|
11478
|
-
} else {
|
|
11479
|
-
colorSchemeNode.setAttribute(rule, colorScheme);
|
|
11480
|
-
}
|
|
11481
|
-
}
|
|
11482
|
-
}
|
|
11483
|
-
}, [colorScheme, colorSchemeSelector, colorSchemeNode, allColorSchemes]);
|
|
11484
|
-
|
|
11485
|
-
// 5.2 Remove the CSS transition when color scheme changes to create instant experience.
|
|
11486
|
-
// credit: https://github.com/pacocoursey/next-themes/blob/b5c2bad50de2d61ad7b52a9c5cdc801a78507d7a/index.tsx#L313
|
|
11487
|
-
React.useEffect(() => {
|
|
11488
|
-
let timer;
|
|
11489
|
-
if (disableTransitionOnChange && hasMounted.current && documentNode) {
|
|
11490
|
-
const css = documentNode.createElement('style');
|
|
11491
|
-
css.appendChild(documentNode.createTextNode(DISABLE_CSS_TRANSITION));
|
|
11492
|
-
documentNode.head.appendChild(css);
|
|
11493
|
-
|
|
11494
|
-
// Force browser repaint
|
|
11495
|
-
(() => window.getComputedStyle(documentNode.body))();
|
|
11496
|
-
timer = setTimeout(() => {
|
|
11497
|
-
documentNode.head.removeChild(css);
|
|
11498
|
-
}, 1);
|
|
11499
|
-
}
|
|
11500
|
-
return () => {
|
|
11501
|
-
clearTimeout(timer);
|
|
11502
|
-
};
|
|
11503
|
-
}, [colorScheme, disableTransitionOnChange, documentNode]);
|
|
11504
|
-
React.useEffect(() => {
|
|
11505
|
-
hasMounted.current = true;
|
|
11506
|
-
return () => {
|
|
11507
|
-
hasMounted.current = false;
|
|
11508
|
-
};
|
|
11509
|
-
}, []);
|
|
11510
|
-
const contextValue = React.useMemo(() => ({
|
|
11511
|
-
allColorSchemes,
|
|
11512
|
-
colorScheme,
|
|
11513
|
-
darkColorScheme,
|
|
11514
|
-
lightColorScheme,
|
|
11515
|
-
mode,
|
|
11516
|
-
setColorScheme,
|
|
11517
|
-
setMode: process.env.NODE_ENV === 'production' ? setMode : newMode => {
|
|
11518
|
-
if (memoTheme.colorSchemeSelector === 'media') ;
|
|
11519
|
-
setMode(newMode);
|
|
11520
|
-
},
|
|
11521
|
-
systemMode
|
|
11522
|
-
}), [allColorSchemes, colorScheme, darkColorScheme, lightColorScheme, mode, setColorScheme, setMode, systemMode, memoTheme.colorSchemeSelector]);
|
|
11523
|
-
let shouldGenerateStyleSheet = true;
|
|
11524
|
-
if (disableStyleSheetGeneration || restThemeProp.cssVariables === false || nested && upperTheme?.cssVarPrefix === cssVarPrefix) {
|
|
11525
|
-
shouldGenerateStyleSheet = false;
|
|
11526
|
-
}
|
|
11527
|
-
const element = /*#__PURE__*/jsxRuntimeExports.jsxs(React.Fragment, {
|
|
11528
|
-
children: [/*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$5, {
|
|
11529
|
-
themeId: scopedTheme ? themeId : undefined,
|
|
11530
|
-
theme: memoTheme,
|
|
11531
|
-
children: children
|
|
11532
|
-
}), shouldGenerateStyleSheet && /*#__PURE__*/jsxRuntimeExports.jsx(GlobalStyles$8, {
|
|
11533
|
-
styles: memoTheme.generateStyleSheets?.() || []
|
|
11534
|
-
})]
|
|
11535
|
-
});
|
|
11536
|
-
if (nested) {
|
|
11537
|
-
return element;
|
|
11538
|
-
}
|
|
11539
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(ColorSchemeContext.Provider, {
|
|
11540
|
-
value: contextValue,
|
|
11541
|
-
children: element
|
|
11542
|
-
});
|
|
11543
|
-
}
|
|
11544
|
-
process.env.NODE_ENV !== "production" ? CssVarsProvider.propTypes = {
|
|
11545
|
-
/**
|
|
11546
|
-
* The component tree.
|
|
11547
|
-
*/
|
|
11548
|
-
children: PropTypes.node,
|
|
11549
|
-
/**
|
|
11550
|
-
* The node used to attach the color-scheme attribute
|
|
11551
|
-
*/
|
|
11552
|
-
colorSchemeNode: PropTypes.any,
|
|
11553
|
-
/**
|
|
11554
|
-
* localStorage key used to store `colorScheme`
|
|
11555
|
-
*/
|
|
11556
|
-
colorSchemeStorageKey: PropTypes.string,
|
|
11557
|
-
/**
|
|
11558
|
-
* The default mode when the storage is empty,
|
|
11559
|
-
* require the theme to have `colorSchemes` with light and dark.
|
|
11560
|
-
*/
|
|
11561
|
-
defaultMode: PropTypes.string,
|
|
11562
|
-
/**
|
|
11563
|
-
* If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`.
|
|
11564
|
-
*/
|
|
11565
|
-
disableNestedContext: PropTypes.bool,
|
|
11566
|
-
/**
|
|
11567
|
-
* If `true`, the style sheet won't be generated.
|
|
11568
|
-
*
|
|
11569
|
-
* This is useful for controlling nested CssVarsProvider behavior.
|
|
11570
|
-
*/
|
|
11571
|
-
disableStyleSheetGeneration: PropTypes.bool,
|
|
11572
|
-
/**
|
|
11573
|
-
* Disable CSS transitions when switching between modes or color schemes.
|
|
11574
|
-
*/
|
|
11575
|
-
disableTransitionOnChange: PropTypes.bool,
|
|
11576
|
-
/**
|
|
11577
|
-
* The document to attach the attribute to.
|
|
11578
|
-
*/
|
|
11579
|
-
documentNode: PropTypes.any,
|
|
11580
|
-
/**
|
|
11581
|
-
* If `true`, theme values are recalculated when the mode changes.
|
|
11582
|
-
*/
|
|
11583
|
-
forceThemeRerender: PropTypes.bool,
|
|
11584
|
-
/**
|
|
11585
|
-
* The key in the local storage used to store current color scheme.
|
|
11586
|
-
*/
|
|
11587
|
-
modeStorageKey: PropTypes.string,
|
|
11588
|
-
/**
|
|
11589
|
-
* If `true`, the mode will be the same value as the storage without an extra rerendering after the hydration.
|
|
11590
|
-
* You should use this option in conjuction with `InitColorSchemeScript` component.
|
|
11591
|
-
*/
|
|
11592
|
-
noSsr: PropTypes.bool,
|
|
11593
|
-
/**
|
|
11594
|
-
* The storage manager to be used for storing the mode and color scheme
|
|
11595
|
-
* @default using `window.localStorage`
|
|
11596
|
-
*/
|
|
11597
|
-
storageManager: PropTypes.func,
|
|
11598
|
-
/**
|
|
11599
|
-
* The window that attaches the 'storage' event listener.
|
|
11600
|
-
* @default window
|
|
11601
|
-
*/
|
|
11602
|
-
storageWindow: PropTypes.any,
|
|
11603
|
-
/**
|
|
11604
|
-
* The calculated theme object that will be passed through context.
|
|
11605
|
-
*/
|
|
11606
|
-
theme: PropTypes.object
|
|
11607
|
-
} : void 0;
|
|
11608
|
-
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
11609
|
-
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
11610
|
-
const getInitColorSchemeScript = params => InitColorSchemeScript$1({
|
|
11611
|
-
colorSchemeStorageKey: defaultColorSchemeStorageKey,
|
|
11612
|
-
defaultLightColorScheme,
|
|
11613
|
-
defaultDarkColorScheme,
|
|
11614
|
-
modeStorageKey: defaultModeStorageKey,
|
|
11615
|
-
...params
|
|
11616
|
-
});
|
|
11617
|
-
return {
|
|
11618
|
-
CssVarsProvider,
|
|
11619
|
-
useColorScheme,
|
|
11620
|
-
getInitColorSchemeScript
|
|
11621
|
-
};
|
|
11622
|
-
}
|
|
11623
|
-
|
|
11624
10551
|
/**
|
|
11625
10552
|
* The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
|
|
11626
10553
|
* and they does not need to remember the prefix (defined once).
|
|
@@ -12447,7 +11374,7 @@ function createGrid$1(options = {}) {
|
|
|
12447
11374
|
// This will allow adding custom styled fn (for example for custom sx style function)
|
|
12448
11375
|
createStyledComponent = defaultCreateStyledComponent$1,
|
|
12449
11376
|
useThemeProps = useThemePropsDefault$1,
|
|
12450
|
-
useTheme = useTheme$
|
|
11377
|
+
useTheme = useTheme$8,
|
|
12451
11378
|
componentName = 'MuiGrid'
|
|
12452
11379
|
} = options;
|
|
12453
11380
|
const useUtilityClasses = (ownerState, theme) => {
|
|
@@ -12725,85 +11652,6 @@ function createStack$1(options = {}) {
|
|
|
12725
11652
|
return Stack;
|
|
12726
11653
|
}
|
|
12727
11654
|
|
|
12728
|
-
function adaptV4Theme(inputTheme) {
|
|
12729
|
-
if (process.env.NODE_ENV !== 'production') ;
|
|
12730
|
-
const {
|
|
12731
|
-
defaultProps = {},
|
|
12732
|
-
mixins = {},
|
|
12733
|
-
overrides = {},
|
|
12734
|
-
palette = {},
|
|
12735
|
-
props = {},
|
|
12736
|
-
styleOverrides = {},
|
|
12737
|
-
...other
|
|
12738
|
-
} = inputTheme;
|
|
12739
|
-
const theme = {
|
|
12740
|
-
...other,
|
|
12741
|
-
components: {}
|
|
12742
|
-
};
|
|
12743
|
-
|
|
12744
|
-
// default props
|
|
12745
|
-
Object.keys(defaultProps).forEach(component => {
|
|
12746
|
-
const componentValue = theme.components[component] || {};
|
|
12747
|
-
componentValue.defaultProps = defaultProps[component];
|
|
12748
|
-
theme.components[component] = componentValue;
|
|
12749
|
-
});
|
|
12750
|
-
Object.keys(props).forEach(component => {
|
|
12751
|
-
const componentValue = theme.components[component] || {};
|
|
12752
|
-
componentValue.defaultProps = props[component];
|
|
12753
|
-
theme.components[component] = componentValue;
|
|
12754
|
-
});
|
|
12755
|
-
|
|
12756
|
-
// CSS overrides
|
|
12757
|
-
Object.keys(styleOverrides).forEach(component => {
|
|
12758
|
-
const componentValue = theme.components[component] || {};
|
|
12759
|
-
componentValue.styleOverrides = styleOverrides[component];
|
|
12760
|
-
theme.components[component] = componentValue;
|
|
12761
|
-
});
|
|
12762
|
-
Object.keys(overrides).forEach(component => {
|
|
12763
|
-
const componentValue = theme.components[component] || {};
|
|
12764
|
-
componentValue.styleOverrides = overrides[component];
|
|
12765
|
-
theme.components[component] = componentValue;
|
|
12766
|
-
});
|
|
12767
|
-
|
|
12768
|
-
// theme.spacing
|
|
12769
|
-
theme.spacing = createSpacing$1(inputTheme.spacing);
|
|
12770
|
-
|
|
12771
|
-
// theme.mixins.gutters
|
|
12772
|
-
const breakpoints = createBreakpoints$1(inputTheme.breakpoints || {});
|
|
12773
|
-
const spacing = theme.spacing;
|
|
12774
|
-
theme.mixins = {
|
|
12775
|
-
gutters: (styles = {}) => {
|
|
12776
|
-
return {
|
|
12777
|
-
paddingLeft: spacing(2),
|
|
12778
|
-
paddingRight: spacing(2),
|
|
12779
|
-
...styles,
|
|
12780
|
-
[breakpoints.up('sm')]: {
|
|
12781
|
-
paddingLeft: spacing(3),
|
|
12782
|
-
paddingRight: spacing(3),
|
|
12783
|
-
...styles[breakpoints.up('sm')]
|
|
12784
|
-
}
|
|
12785
|
-
};
|
|
12786
|
-
},
|
|
12787
|
-
...mixins
|
|
12788
|
-
};
|
|
12789
|
-
const {
|
|
12790
|
-
type: typeInput,
|
|
12791
|
-
mode: modeInput,
|
|
12792
|
-
...paletteRest
|
|
12793
|
-
} = palette;
|
|
12794
|
-
const finalMode = modeInput || typeInput || 'light';
|
|
12795
|
-
theme.palette = {
|
|
12796
|
-
// theme.palette.text.hint
|
|
12797
|
-
text: {
|
|
12798
|
-
hint: finalMode === 'dark' ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.38)'
|
|
12799
|
-
},
|
|
12800
|
-
mode: finalMode,
|
|
12801
|
-
type: finalMode,
|
|
12802
|
-
...paletteRest
|
|
12803
|
-
};
|
|
12804
|
-
return theme;
|
|
12805
|
-
}
|
|
12806
|
-
|
|
12807
11655
|
var reactIs = {exports: {}};
|
|
12808
11656
|
|
|
12809
11657
|
var reactIs_production = {};
|
|
@@ -13962,7 +12810,6 @@ function shouldSkipGeneratingVar$1(keys) {
|
|
|
13962
12810
|
* @internal These variables should not appear in the :root stylesheet when the `defaultColorScheme="dark"`
|
|
13963
12811
|
*/
|
|
13964
12812
|
const excludeVariablesFromRoot$1 = cssVarPrefix => [...[...Array(25)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}overlays-${index}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkColor`];
|
|
13965
|
-
var excludeVariablesFromRoot$2 = excludeVariablesFromRoot$1;
|
|
13966
12813
|
|
|
13967
12814
|
var defaultGetSelector = theme => (colorScheme, css) => {
|
|
13968
12815
|
const root = theme.rootSelector || ':root';
|
|
@@ -13981,7 +12828,7 @@ var defaultGetSelector = theme => (colorScheme, css) => {
|
|
|
13981
12828
|
if (theme.defaultColorScheme === colorScheme) {
|
|
13982
12829
|
if (colorScheme === 'dark') {
|
|
13983
12830
|
const excludedVariables = {};
|
|
13984
|
-
excludeVariablesFromRoot$
|
|
12831
|
+
excludeVariablesFromRoot$1(theme.cssVarPrefix).forEach(cssVar => {
|
|
13985
12832
|
excludedVariables[cssVar] = css[cssVar];
|
|
13986
12833
|
delete css[cssVar];
|
|
13987
12834
|
});
|
|
@@ -14523,21 +13370,6 @@ function createTheme$3(options = {},
|
|
|
14523
13370
|
}, ...args);
|
|
14524
13371
|
}
|
|
14525
13372
|
|
|
14526
|
-
function createMuiStrictModeTheme(options, ...args) {
|
|
14527
|
-
return createTheme$3(deepmerge$5({
|
|
14528
|
-
unstable_strictMode: true
|
|
14529
|
-
}, options), ...args);
|
|
14530
|
-
}
|
|
14531
|
-
|
|
14532
|
-
// To remove in v6
|
|
14533
|
-
function createStyles(styles) {
|
|
14534
|
-
return styles;
|
|
14535
|
-
}
|
|
14536
|
-
|
|
14537
|
-
function isUnitless(value) {
|
|
14538
|
-
return String(parseFloat(value)).length === String(value).length;
|
|
14539
|
-
}
|
|
14540
|
-
|
|
14541
13373
|
// Ported from Compass
|
|
14542
13374
|
// https://github.com/Compass/compass/blob/master/core/stylesheets/compass/typography/_units.scss
|
|
14543
13375
|
// Emulate the sass function "unit"
|
|
@@ -14550,186 +13382,10 @@ function toUnitless(length) {
|
|
|
14550
13382
|
return parseFloat(length);
|
|
14551
13383
|
}
|
|
14552
13384
|
|
|
14553
|
-
// Convert any CSS <length> or <percentage> value to any another.
|
|
14554
|
-
// From https://github.com/KyleAMathews/convert-css-length
|
|
14555
|
-
function convertLength(baseFontSize) {
|
|
14556
|
-
return (length, toUnit) => {
|
|
14557
|
-
const fromUnit = getUnit(length);
|
|
14558
|
-
|
|
14559
|
-
// Optimize for cases where `from` and `to` units are accidentally the same.
|
|
14560
|
-
if (fromUnit === toUnit) {
|
|
14561
|
-
return length;
|
|
14562
|
-
}
|
|
14563
|
-
|
|
14564
|
-
// Convert input length to pixels.
|
|
14565
|
-
let pxLength = toUnitless(length);
|
|
14566
|
-
if (fromUnit !== 'px') {
|
|
14567
|
-
if (fromUnit === 'em') {
|
|
14568
|
-
pxLength = toUnitless(length) * toUnitless(baseFontSize);
|
|
14569
|
-
} else if (fromUnit === 'rem') {
|
|
14570
|
-
pxLength = toUnitless(length) * toUnitless(baseFontSize);
|
|
14571
|
-
}
|
|
14572
|
-
}
|
|
14573
|
-
|
|
14574
|
-
// Convert length in pixels to the output unit
|
|
14575
|
-
let outputLength = pxLength;
|
|
14576
|
-
if (toUnit !== 'px') {
|
|
14577
|
-
if (toUnit === 'em') {
|
|
14578
|
-
outputLength = pxLength / toUnitless(baseFontSize);
|
|
14579
|
-
} else if (toUnit === 'rem') {
|
|
14580
|
-
outputLength = pxLength / toUnitless(baseFontSize);
|
|
14581
|
-
} else {
|
|
14582
|
-
return length;
|
|
14583
|
-
}
|
|
14584
|
-
}
|
|
14585
|
-
return parseFloat(outputLength.toFixed(5)) + toUnit;
|
|
14586
|
-
};
|
|
14587
|
-
}
|
|
14588
|
-
function alignProperty({
|
|
14589
|
-
size,
|
|
14590
|
-
grid
|
|
14591
|
-
}) {
|
|
14592
|
-
const sizeBelow = size - size % grid;
|
|
14593
|
-
const sizeAbove = sizeBelow + grid;
|
|
14594
|
-
return size - sizeBelow < sizeAbove - size ? sizeBelow : sizeAbove;
|
|
14595
|
-
}
|
|
14596
|
-
|
|
14597
|
-
// fontGrid finds a minimal grid (in rem) for the fontSize values so that the
|
|
14598
|
-
// lineHeight falls under a x pixels grid, 4px in the case of Material Design,
|
|
14599
|
-
// without changing the relative line height
|
|
14600
|
-
function fontGrid({
|
|
14601
|
-
lineHeight,
|
|
14602
|
-
pixels,
|
|
14603
|
-
htmlFontSize
|
|
14604
|
-
}) {
|
|
14605
|
-
return pixels / (lineHeight * htmlFontSize);
|
|
14606
|
-
}
|
|
14607
|
-
|
|
14608
|
-
/**
|
|
14609
|
-
* generate a responsive version of a given CSS property
|
|
14610
|
-
* @example
|
|
14611
|
-
* responsiveProperty({
|
|
14612
|
-
* cssProperty: 'fontSize',
|
|
14613
|
-
* min: 15,
|
|
14614
|
-
* max: 20,
|
|
14615
|
-
* unit: 'px',
|
|
14616
|
-
* breakpoints: [300, 600],
|
|
14617
|
-
* })
|
|
14618
|
-
*
|
|
14619
|
-
* // this returns
|
|
14620
|
-
*
|
|
14621
|
-
* {
|
|
14622
|
-
* fontSize: '15px',
|
|
14623
|
-
* '@media (min-width:300px)': {
|
|
14624
|
-
* fontSize: '17.5px',
|
|
14625
|
-
* },
|
|
14626
|
-
* '@media (min-width:600px)': {
|
|
14627
|
-
* fontSize: '20px',
|
|
14628
|
-
* },
|
|
14629
|
-
* }
|
|
14630
|
-
* @param {Object} params
|
|
14631
|
-
* @param {string} params.cssProperty - The CSS property to be made responsive
|
|
14632
|
-
* @param {number} params.min - The smallest value of the CSS property
|
|
14633
|
-
* @param {number} params.max - The largest value of the CSS property
|
|
14634
|
-
* @param {string} [params.unit] - The unit to be used for the CSS property
|
|
14635
|
-
* @param {Array.number} [params.breakpoints] - An array of breakpoints
|
|
14636
|
-
* @param {number} [params.alignStep] - Round scaled value to fall under this grid
|
|
14637
|
-
* @returns {Object} responsive styles for {params.cssProperty}
|
|
14638
|
-
*/
|
|
14639
|
-
function responsiveProperty({
|
|
14640
|
-
cssProperty,
|
|
14641
|
-
min,
|
|
14642
|
-
max,
|
|
14643
|
-
unit = 'rem',
|
|
14644
|
-
breakpoints = [600, 900, 1200],
|
|
14645
|
-
transform = null
|
|
14646
|
-
}) {
|
|
14647
|
-
const output = {
|
|
14648
|
-
[cssProperty]: `${min}${unit}`
|
|
14649
|
-
};
|
|
14650
|
-
const factor = (max - min) / breakpoints[breakpoints.length - 1];
|
|
14651
|
-
breakpoints.forEach(breakpoint => {
|
|
14652
|
-
let value = min + factor * breakpoint;
|
|
14653
|
-
if (transform !== null) {
|
|
14654
|
-
value = transform(value);
|
|
14655
|
-
}
|
|
14656
|
-
output[`@media (min-width:${breakpoint}px)`] = {
|
|
14657
|
-
[cssProperty]: `${Math.round(value * 10000) / 10000}${unit}`
|
|
14658
|
-
};
|
|
14659
|
-
});
|
|
14660
|
-
return output;
|
|
14661
|
-
}
|
|
14662
|
-
|
|
14663
|
-
function responsiveFontSizes(themeInput, options = {}) {
|
|
14664
|
-
const {
|
|
14665
|
-
breakpoints = ['sm', 'md', 'lg'],
|
|
14666
|
-
disableAlign = false,
|
|
14667
|
-
factor = 2,
|
|
14668
|
-
variants = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'caption', 'button', 'overline']
|
|
14669
|
-
} = options;
|
|
14670
|
-
const theme = {
|
|
14671
|
-
...themeInput
|
|
14672
|
-
};
|
|
14673
|
-
theme.typography = {
|
|
14674
|
-
...theme.typography
|
|
14675
|
-
};
|
|
14676
|
-
const typography = theme.typography;
|
|
14677
|
-
|
|
14678
|
-
// Convert between CSS lengths e.g. em->px or px->rem
|
|
14679
|
-
// Set the baseFontSize for your project. Defaults to 16px (also the browser default).
|
|
14680
|
-
const convert = convertLength(typography.htmlFontSize);
|
|
14681
|
-
const breakpointValues = breakpoints.map(x => theme.breakpoints.values[x]);
|
|
14682
|
-
variants.forEach(variant => {
|
|
14683
|
-
const style = typography[variant];
|
|
14684
|
-
if (!style) {
|
|
14685
|
-
return;
|
|
14686
|
-
}
|
|
14687
|
-
const remFontSize = parseFloat(convert(style.fontSize, 'rem'));
|
|
14688
|
-
if (remFontSize <= 1) {
|
|
14689
|
-
return;
|
|
14690
|
-
}
|
|
14691
|
-
const maxFontSize = remFontSize;
|
|
14692
|
-
const minFontSize = 1 + (maxFontSize - 1) / factor;
|
|
14693
|
-
let {
|
|
14694
|
-
lineHeight
|
|
14695
|
-
} = style;
|
|
14696
|
-
if (!isUnitless(lineHeight) && !disableAlign) {
|
|
14697
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: Unsupported non-unitless line height with grid alignment.\n' + 'Use unitless line heights instead.' : formatMuiErrorMessage$6(6));
|
|
14698
|
-
}
|
|
14699
|
-
if (!isUnitless(lineHeight)) {
|
|
14700
|
-
// make it unitless
|
|
14701
|
-
lineHeight = parseFloat(convert(lineHeight, 'rem')) / parseFloat(remFontSize);
|
|
14702
|
-
}
|
|
14703
|
-
let transform = null;
|
|
14704
|
-
if (!disableAlign) {
|
|
14705
|
-
transform = value => alignProperty({
|
|
14706
|
-
size: value,
|
|
14707
|
-
grid: fontGrid({
|
|
14708
|
-
pixels: 4,
|
|
14709
|
-
lineHeight,
|
|
14710
|
-
htmlFontSize: typography.htmlFontSize
|
|
14711
|
-
})
|
|
14712
|
-
});
|
|
14713
|
-
}
|
|
14714
|
-
typography[variant] = {
|
|
14715
|
-
...style,
|
|
14716
|
-
...responsiveProperty({
|
|
14717
|
-
cssProperty: 'fontSize',
|
|
14718
|
-
min: minFontSize,
|
|
14719
|
-
max: maxFontSize,
|
|
14720
|
-
unit: 'rem',
|
|
14721
|
-
breakpoints: breakpointValues,
|
|
14722
|
-
transform
|
|
14723
|
-
})
|
|
14724
|
-
};
|
|
14725
|
-
});
|
|
14726
|
-
return theme;
|
|
14727
|
-
}
|
|
14728
|
-
|
|
14729
13385
|
const defaultTheme$2 = createTheme$3();
|
|
14730
13386
|
|
|
14731
13387
|
function useTheme$7() {
|
|
14732
|
-
const theme = useTheme$
|
|
13388
|
+
const theme = useTheme$8(defaultTheme$2);
|
|
14733
13389
|
if (process.env.NODE_ENV !== 'production') {
|
|
14734
13390
|
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
|
|
14735
13391
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -14763,199 +13419,6 @@ const styled$3 = createStyled$2({
|
|
|
14763
13419
|
rootShouldForwardProp: rootShouldForwardProp$1
|
|
14764
13420
|
});
|
|
14765
13421
|
|
|
14766
|
-
function ThemeProviderNoVars({
|
|
14767
|
-
theme: themeInput,
|
|
14768
|
-
...props
|
|
14769
|
-
}) {
|
|
14770
|
-
const scopedTheme = THEME_ID in themeInput ? themeInput[THEME_ID] : undefined;
|
|
14771
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$5, {
|
|
14772
|
-
...props,
|
|
14773
|
-
themeId: scopedTheme ? THEME_ID : undefined,
|
|
14774
|
-
theme: scopedTheme || themeInput
|
|
14775
|
-
});
|
|
14776
|
-
}
|
|
14777
|
-
|
|
14778
|
-
const defaultConfig = {
|
|
14779
|
-
attribute: 'data-mui-color-scheme',
|
|
14780
|
-
colorSchemeStorageKey: 'mui-color-scheme',
|
|
14781
|
-
defaultLightColorScheme: 'light',
|
|
14782
|
-
defaultDarkColorScheme: 'dark',
|
|
14783
|
-
modeStorageKey: 'mui-mode'
|
|
14784
|
-
};
|
|
14785
|
-
process.env.NODE_ENV !== "production" ? {
|
|
14786
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
14787
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
14788
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
14789
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
14790
|
-
/**
|
|
14791
|
-
* DOM attribute for applying a color scheme.
|
|
14792
|
-
* @default 'data-mui-color-scheme'
|
|
14793
|
-
* @example '.mode-%s' // for class based color scheme
|
|
14794
|
-
* @example '[data-mode-%s]' // for data-attribute without '='
|
|
14795
|
-
*/
|
|
14796
|
-
attribute: PropTypes.string,
|
|
14797
|
-
/**
|
|
14798
|
-
* The node (provided as string) used to attach the color-scheme attribute.
|
|
14799
|
-
* @default 'document.documentElement'
|
|
14800
|
-
*/
|
|
14801
|
-
colorSchemeNode: PropTypes.string,
|
|
14802
|
-
/**
|
|
14803
|
-
* localStorage key used to store `colorScheme`.
|
|
14804
|
-
* @default 'mui-color-scheme'
|
|
14805
|
-
*/
|
|
14806
|
-
colorSchemeStorageKey: PropTypes.string,
|
|
14807
|
-
/**
|
|
14808
|
-
* The default color scheme to be used in dark mode.
|
|
14809
|
-
* @default 'dark'
|
|
14810
|
-
*/
|
|
14811
|
-
defaultDarkColorScheme: PropTypes.string,
|
|
14812
|
-
/**
|
|
14813
|
-
* The default color scheme to be used in light mode.
|
|
14814
|
-
* @default 'light'
|
|
14815
|
-
*/
|
|
14816
|
-
defaultLightColorScheme: PropTypes.string,
|
|
14817
|
-
/**
|
|
14818
|
-
* The default mode when the storage is empty (user's first visit).
|
|
14819
|
-
* @default 'system'
|
|
14820
|
-
*/
|
|
14821
|
-
defaultMode: PropTypes.oneOf(['dark', 'light', 'system']),
|
|
14822
|
-
/**
|
|
14823
|
-
* localStorage key used to store `mode`.
|
|
14824
|
-
* @default 'mui-mode'
|
|
14825
|
-
*/
|
|
14826
|
-
modeStorageKey: PropTypes.string,
|
|
14827
|
-
/**
|
|
14828
|
-
* Nonce string to pass to the inline script for CSP headers.
|
|
14829
|
-
*/
|
|
14830
|
-
nonce: PropTypes.string
|
|
14831
|
-
} : void 0;
|
|
14832
|
-
|
|
14833
|
-
const {
|
|
14834
|
-
CssVarsProvider: InternalCssVarsProvider,
|
|
14835
|
-
useColorScheme,
|
|
14836
|
-
getInitColorSchemeScript: deprecatedGetInitColorSchemeScript
|
|
14837
|
-
} = createCssVarsProvider$1({
|
|
14838
|
-
themeId: THEME_ID,
|
|
14839
|
-
// @ts-ignore ignore module augmentation tests
|
|
14840
|
-
theme: () => createTheme$3({
|
|
14841
|
-
cssVariables: true
|
|
14842
|
-
}),
|
|
14843
|
-
colorSchemeStorageKey: defaultConfig.colorSchemeStorageKey,
|
|
14844
|
-
modeStorageKey: defaultConfig.modeStorageKey,
|
|
14845
|
-
defaultColorScheme: {
|
|
14846
|
-
light: defaultConfig.defaultLightColorScheme,
|
|
14847
|
-
dark: defaultConfig.defaultDarkColorScheme
|
|
14848
|
-
},
|
|
14849
|
-
resolveTheme: theme => {
|
|
14850
|
-
const newTheme = {
|
|
14851
|
-
...theme,
|
|
14852
|
-
typography: createTypography$1(theme.palette, theme.typography)
|
|
14853
|
-
};
|
|
14854
|
-
newTheme.unstable_sx = function sx(props) {
|
|
14855
|
-
return styleFunctionSx$2({
|
|
14856
|
-
sx: props,
|
|
14857
|
-
theme: this
|
|
14858
|
-
});
|
|
14859
|
-
};
|
|
14860
|
-
return newTheme;
|
|
14861
|
-
}
|
|
14862
|
-
});
|
|
14863
|
-
|
|
14864
|
-
// TODO: remove in v7
|
|
14865
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
14866
|
-
function Experimental_CssVarsProvider(props) {
|
|
14867
|
-
if (process.env.NODE_ENV !== 'production') ;
|
|
14868
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(InternalCssVarsProvider, {
|
|
14869
|
-
...props
|
|
14870
|
-
});
|
|
14871
|
-
}
|
|
14872
|
-
|
|
14873
|
-
// TODO: remove in v7
|
|
14874
|
-
const getInitColorSchemeScript = params => {
|
|
14875
|
-
return deprecatedGetInitColorSchemeScript(params);
|
|
14876
|
-
};
|
|
14877
|
-
|
|
14878
|
-
/**
|
|
14879
|
-
* TODO: remove this export in v7
|
|
14880
|
-
* @deprecated
|
|
14881
|
-
* The `CssVarsProvider` component has been deprecated and ported into `ThemeProvider`.
|
|
14882
|
-
*
|
|
14883
|
-
* You should use `ThemeProvider` and `createTheme()` instead:
|
|
14884
|
-
*
|
|
14885
|
-
* ```diff
|
|
14886
|
-
* - import { CssVarsProvider, extendTheme } from '@mui/material/styles';
|
|
14887
|
-
* + import { ThemeProvider, createTheme } from '@mui/material/styles';
|
|
14888
|
-
*
|
|
14889
|
-
* - const theme = extendTheme();
|
|
14890
|
-
* + const theme = createTheme({
|
|
14891
|
-
* + cssVariables: true,
|
|
14892
|
-
* + colorSchemes: { light: true, dark: true },
|
|
14893
|
-
* + });
|
|
14894
|
-
*
|
|
14895
|
-
* - <CssVarsProvider theme={theme}>
|
|
14896
|
-
* + <ThemeProvider theme={theme}>
|
|
14897
|
-
* ```
|
|
14898
|
-
*
|
|
14899
|
-
* To see the full documentation, check out https://mui.com/material-ui/customization/css-theme-variables/usage/.
|
|
14900
|
-
*/
|
|
14901
|
-
const CssVarsProvider = InternalCssVarsProvider;
|
|
14902
|
-
|
|
14903
|
-
function ThemeProvider$4({
|
|
14904
|
-
theme,
|
|
14905
|
-
...props
|
|
14906
|
-
}) {
|
|
14907
|
-
const noVarsTheme = React.useMemo(() => {
|
|
14908
|
-
if (typeof theme === 'function') {
|
|
14909
|
-
return theme;
|
|
14910
|
-
}
|
|
14911
|
-
const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;
|
|
14912
|
-
if (!('colorSchemes' in muiTheme)) {
|
|
14913
|
-
if (!('vars' in muiTheme)) {
|
|
14914
|
-
// For non-CSS variables themes, set `vars` to null to prevent theme inheritance from the upper theme.
|
|
14915
|
-
// The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.
|
|
14916
|
-
return {
|
|
14917
|
-
...theme,
|
|
14918
|
-
vars: null
|
|
14919
|
-
};
|
|
14920
|
-
}
|
|
14921
|
-
return theme;
|
|
14922
|
-
}
|
|
14923
|
-
return null;
|
|
14924
|
-
}, [theme]);
|
|
14925
|
-
if (noVarsTheme) {
|
|
14926
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProviderNoVars, {
|
|
14927
|
-
theme: noVarsTheme,
|
|
14928
|
-
...props
|
|
14929
|
-
});
|
|
14930
|
-
}
|
|
14931
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(CssVarsProvider, {
|
|
14932
|
-
theme: theme,
|
|
14933
|
-
...props
|
|
14934
|
-
});
|
|
14935
|
-
}
|
|
14936
|
-
|
|
14937
|
-
function makeStyles$1() {
|
|
14938
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: makeStyles is no longer exported from @mui/material/styles.\n' + 'You have to import it from @mui/styles.\n' + 'See https://mui.com/r/migration-v4/#mui-material-styles for more details.' : formatMuiErrorMessage$6(14));
|
|
14939
|
-
}
|
|
14940
|
-
|
|
14941
|
-
function withStyles() {
|
|
14942
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: withStyles is no longer exported from @mui/material/styles.\n' + 'You have to import it from @mui/styles.\n' + 'See https://mui.com/r/migration-v4/#mui-material-styles for more details.' : formatMuiErrorMessage$6(15));
|
|
14943
|
-
}
|
|
14944
|
-
|
|
14945
|
-
function withTheme() {
|
|
14946
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: withTheme is no longer exported from @mui/material/styles.\n' + 'You have to import it from @mui/styles.\n' + 'See https://mui.com/r/migration-v4/#mui-material-styles for more details.' : formatMuiErrorMessage$6(16));
|
|
14947
|
-
}
|
|
14948
|
-
|
|
14949
|
-
function deprecatedExtendTheme(...args) {
|
|
14950
|
-
return createThemeWithVars$1(...args);
|
|
14951
|
-
}
|
|
14952
|
-
|
|
14953
|
-
// TODO: Remove this function in v6.
|
|
14954
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
14955
|
-
function experimental_sx() {
|
|
14956
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.' + 'For more details, see https://github.com/mui/material-ui/pull/35150.' : formatMuiErrorMessage$6(19));
|
|
14957
|
-
}
|
|
14958
|
-
|
|
14959
13422
|
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
|
14960
13423
|
//
|
|
14961
13424
|
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
@@ -85853,7 +84316,7 @@ const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalendar(inPro
|
|
|
85853
84316
|
valueManager: singleItemValueManager
|
|
85854
84317
|
});
|
|
85855
84318
|
const now = useNow(timezone);
|
|
85856
|
-
const theme = useTheme$
|
|
84319
|
+
const theme = useTheme$8();
|
|
85857
84320
|
const utils = useUtils();
|
|
85858
84321
|
const referenceDate = React.useMemo(() => singleItemValueManager.getInitialReferenceValue({
|
|
85859
84322
|
value,
|
|
@@ -86307,7 +84770,7 @@ const YearCalendar = /*#__PURE__*/React.forwardRef(function YearCalendar(inProps
|
|
|
86307
84770
|
valueManager: singleItemValueManager
|
|
86308
84771
|
});
|
|
86309
84772
|
const now = useNow(timezone);
|
|
86310
|
-
const theme = useTheme$
|
|
84773
|
+
const theme = useTheme$8();
|
|
86311
84774
|
const utils = useUtils();
|
|
86312
84775
|
const referenceDate = React.useMemo(() => singleItemValueManager.getInitialReferenceValue({
|
|
86313
84776
|
value,
|
|
@@ -128201,7 +126664,7 @@ const customTheme = createTheme$3({
|
|
|
128201
126664
|
});
|
|
128202
126665
|
|
|
128203
126666
|
const FormRenderWrapper = ({ formArray, name, numberOfColumns = 3, form, variant = "", fieldError, }) => {
|
|
128204
|
-
return (jsxRuntimeExports.jsx(ThemeProvider$
|
|
126667
|
+
return (jsxRuntimeExports.jsx(ThemeProvider$4, { theme: customTheme, children: jsxRuntimeExports.jsx(FormComponent, { container: true, margin: "auto", children: formArray.map((item, i) => {
|
|
128205
126668
|
return (item.inputType && (jsxRuntimeExports.jsx(Formitem, { container: true, sx: item.CustomProps, noOfColumn: item.numberOfColumns || numberOfColumns, children: jsxRuntimeExports.jsx(RenderForm, { item: item, register: form.register, control: form.control, errors: form.formState.errors, getValues: form.getValues, clearErrors: form.clearErrors, setValue: form.setValue, variant: variant, fieldError: fieldError }) }, i)));
|
|
128206
126669
|
}) }) }));
|
|
128207
126670
|
};
|
|
@@ -138451,7 +136914,7 @@ const MRT_DefaultDisplayColumn = {
|
|
|
138451
136914
|
};
|
|
138452
136915
|
const useMRT_TableOptions = (_a) => {
|
|
138453
136916
|
var _b;
|
|
138454
|
-
var { aggregationFns, autoResetExpanded = false, columnFilterDisplayMode = 'subheader', columnResizeDirection, columnResizeMode = 'onChange', createDisplayMode = 'modal', defaultColumn, defaultDisplayColumn, editDisplayMode = 'modal', enableBatchRowSelection = true, enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnPinning = false, enableColumnResizing = false, enableColumnVirtualization, enableDensityToggle = true, enableExpandAll = true, enableExpanding, enableFacetedValues = false, enableFilterMatchHighlighting = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableKeyboardShortcuts = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enableRowPinning = false, enableRowSelection = false, enableRowVirtualization, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, id = useId$
|
|
136917
|
+
var { aggregationFns, autoResetExpanded = false, columnFilterDisplayMode = 'subheader', columnResizeDirection, columnResizeMode = 'onChange', createDisplayMode = 'modal', defaultColumn, defaultDisplayColumn, editDisplayMode = 'modal', enableBatchRowSelection = true, enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnPinning = false, enableColumnResizing = false, enableColumnVirtualization, enableDensityToggle = true, enableExpandAll = true, enableExpanding, enableFacetedValues = false, enableFilterMatchHighlighting = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableKeyboardShortcuts = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enableRowPinning = false, enableRowSelection = false, enableRowVirtualization, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, id = useId$8(), layoutMode, localization, manualFiltering, manualGrouping, manualPagination, manualSorting, mrtTheme, paginationDisplayMode = 'default', positionActionsColumn = 'first', positionCreatingRow = 'top', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberDisplayMode = 'static', rowPinningDisplayMode = 'sticky', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnFilterDisplayMode", "columnResizeDirection", "columnResizeMode", "createDisplayMode", "defaultColumn", "defaultDisplayColumn", "editDisplayMode", "enableBatchRowSelection", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnPinning", "enableColumnResizing", "enableColumnVirtualization", "enableDensityToggle", "enableExpandAll", "enableExpanding", "enableFacetedValues", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableKeyboardShortcuts", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enableRowPinning", "enableRowSelection", "enableRowVirtualization", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "id", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "mrtTheme", "paginationDisplayMode", "positionActionsColumn", "positionCreatingRow", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberDisplayMode", "rowPinningDisplayMode", "selectAllMode", "sortingFns"]);
|
|
138455
136918
|
const theme = useTheme$7();
|
|
138456
136919
|
icons = useMemo(() => (Object.assign(Object.assign({}, MRT_Default_Icons), icons)), [icons]);
|
|
138457
136920
|
localization = useMemo(() => (Object.assign(Object.assign({}, MRT_Localization_EN), localization)), [localization]);
|
|
@@ -205055,5 +203518,5 @@ const decryptText = (ciphertext, SECRET_KEY) => {
|
|
|
205055
203518
|
return bytes.toString(CryptoJS.enc.Utf8);
|
|
205056
203519
|
};
|
|
205057
203520
|
|
|
205058
|
-
export { Await, Box$2 as BoxTP, BrowserRouter, Button$1 as ButtonTP, CacheBuster, index$2 as CryptoJS,
|
|
203521
|
+
export { Await, Box$2 as BoxTP, BrowserRouter, Button$1 as ButtonTP, CacheBuster, index$2 as CryptoJS, DEFAULT_VERSION, DatePicker, DeleteField, DeleteField as DeleteFieldTP, FLUSH, FileSaver_min as FileSaver, Form, Grid$2 as GridTP, HashRouter, HydratedRouter, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, index_esm as IdleTimer, JoditEditor, KEY_PREFIX, Link, Links, MRT_ActionMenuItem, MRT_AggregationFns, MRT_BottomToolbar, MRT_ColumnActionMenu, MRT_ColumnPinningButtons, MRT_CopyButton, MRT_DefaultColumn, MRT_DefaultDisplayColumn, MRT_EditActionButtons, MRT_EditCellTextField, MRT_EditRowModal, MRT_ExpandAllButton, MRT_ExpandButton, MRT_FilterCheckbox, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FilterRangeFields, MRT_FilterRangeSlider, MRT_FilterTextField, MRT_GlobalFilterTextField, MRT_GrabHandleButton, MRT_LinearProgressBar, MRT_RowActionMenu, MRT_RowPinButton, MRT_SelectCheckbox, MRT_ShowHideColumnsButton, MRT_ShowHideColumnsMenu, MRT_ShowHideColumnsMenuItems, MRT_SortingFns, MRT_Table, MRT_TableBody, MRT_TableBodyCell, MRT_TableBodyCellValue, MRT_TableBodyRow, MRT_TableBodyRowGrabHandle, MRT_TableBodyRowPinButton, MRT_TableContainer, MRT_TableDetailPanel, MRT_TableFooter, MRT_TableFooterCell, MRT_TableFooterRow, MRT_TableHead, MRT_TableHeadCell, MRT_TableHeadCellColumnActionsButton, MRT_TableHeadCellFilterContainer, MRT_TableHeadCellFilterLabel, MRT_TableHeadCellGrabHandle, MRT_TableHeadCellResizeHandle, MRT_TableHeadCellSortLabel, MRT_TableHeadRow, MRT_TableLoadingOverlay, MRT_TablePagination, MRT_TablePaper, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleFullScreenButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable, Memo_MRT_TableBody, Memo_MRT_TableBodyCell, Memo_MRT_TableBodyRow, MemoryRouter, Meta, MultiSelectFieldComponent, NavLink, Navigate, Action as NavigationType, Outlet, PAUSE, PERSIST, PURGE, PrefetchPageLinks, Provider_default as Provider, REGISTER, REHYDRATE, FormRenderWrapper as RenderForm, FormRenderWrapper as RenderFormTP, Route, Router, RouterProvider2 as RouterProvider, Routes, Scripts, ScrollRestoration, ServerRouter, SessionTimeOut as SessionTimeoutField, SessionTimeOut as SessionTimeoutFieldTP, StaticRouter, StaticRouterProvider, Typography as TypographyTP, DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, FetchersContext as UNSAFE_FetchersContext, FrameworkContext as UNSAFE_FrameworkContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteContext as UNSAFE_RouteContext, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, ViewTransitionContext as UNSAFE_ViewTransitionContext, WithComponentProps as UNSAFE_WithComponentProps, WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps, WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps, createBrowserHistory as UNSAFE_createBrowserHistory, createClientRoutes as UNSAFE_createClientRoutes, createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, createRouter as UNSAFE_createRouter, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, hydrationRouteProperties as UNSAFE_hydrationRouteProperties, invariant as UNSAFE_invariant, mapRouteProperties as UNSAFE_mapRouteProperties, shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, useScrollRestoration as UNSAFE_useScrollRestoration, withComponentProps as UNSAFE_withComponentProps, withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps, withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps, xlsx as XLSX, xlsx_min$1 as XLSXStyle, calculateTotalArrayValueTotal, cellKeyboardShortcuts, checkIsDateIsBefore, createBrowserRouter, createCookie, createCookieSessionStorage, createHashRouter, createMRTColumnHelper, createMemoryRouter, createMemorySessionStorage, createMigrate, createPath, createPersistoid, createRequestHandler, createRoutesFromChildren, createRoutesFromElements, createRoutesStub, createRow, createSearchParams, createSession, createSessionStorage, createStaticHandler2 as createStaticHandler, createStaticRouter, createTransform, data, index$4 as dateFns, dayjs as dayjsLib, decryptText, defaultDisplayColumnProps, encryptText, findMenuHierarchy, flexRender, generatePath, getAllLeafColumnDefs, getCanRankRows, getColumnFilterInfo, getColumnId, getDefaultColumnFilterFn, getDefaultColumnOrderIds, getDesiredDate, getFormattedDate, getInitials, getIsRankingRows, getIsRowSelected, getLeadingDisplayColumnIds, getMRT_RowSelectionHandler, getMRT_Rows, getMRT_SelectAllHandler, getStoredState, getTrailingDisplayColumnIds, getUsernameFromEmail, handleDownloadReactTableDataExcel, href, isCellEditable, isCookie, isRouteErrorResponse, isSession, lightenColor, matchPath, matchRoutes, mrtFilterOptions, openEditingCell, parsePath, persistCombineReducers, persistReducer, persistStore, prepareColumns, purgeStoredState, rankGlobalFuzzy, redirect, redirectDocument, renderMatches, reorderColumn, replace, resolvePath, showRowActionsColumn, showRowDragColumn, showRowExpandColumn, showRowNumbersColumn, showRowPinningColumn, showRowSelectionColumn, showRowSpacerColumn, HistoryRouter as unstable_HistoryRouter, RSCHydratedRouter as unstable_RSCHydratedRouter, RSCStaticRouter as unstable_RSCStaticRouter, unstable_RouterContextProvider, createCallServer as unstable_createCallServer, unstable_createContext, getRSCStream as unstable_getRSCStream, routeRSCServerRequest as unstable_routeRSCServerRequest, setDevServerHooks as unstable_setDevServerHooks, usePrompt as unstable_usePrompt, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useBlocker, useDispatch, useDropdownOptions, useFetcher, useFetchers, useFormAction, useForm as useFormElement, useForm as useFormElementTP, useFormValidatingContext, useFormValidatingContext as useFormValidatingContextTP, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMRT_ColumnVirtualizer, useMRT_Effects, useMRT_RowVirtualizer, useMRT_Rows, useMRT_TableInstance, useMRT_TableOptions, useMatch, useMatches, useMaterialReactTable, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSelector, useStore, useSubmit, useViewTransitionState, index_esm$1 as yup, o as yupResolverTP };
|
|
205059
203522
|
//# sourceMappingURL=index.esm.js.map
|