azeriand-library 1.4.2 → 1.4.3
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/index.d.ts +12 -1
- package/dist/index.esm.js +3110 -239
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +3106 -235
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document != "undefined") {
|
|
5
5
|
var elementStyle = document.createElement("style");
|
|
6
|
-
elementStyle.appendChild(document.createTextNode(
|
|
6
|
+
elementStyle.appendChild(document.createTextNode('.card{\n /* border-radius: 20px; */\n color: var(--card-text-color, white);\n}\n\n.card.glass{\n background-color: color-mix(in oklch, var(--glass-color), transparent 80%);\n border: 1px solid color-mix(in oklch, var(--glass-color), transparent 40%);\n -webkit-backface-visibility: hidden;\n -webkit-perspective: 1000;\n -webkit-transform: translate3d(0,0,0);\n -webkit-transform: translateZ(0);\n backface-visibility: hidden;\n perspective: 1000;\n transform: translate3d(0,0,0);\n transform: translateZ(0);\n}\n\n.card.mate{\n background-color: var(--glass-color);\n}\n\n.card.outlined{\n border: solid white 2px;\n}\n\nbutton .card.ghost:hover, button .card.outlined:hover{\n background: color-mix(in oklch, var(--glass-color), transparent 80%);\n}\n\nbutton .card.glass:hover{\n box-shadow: 0 4px 10px color-mix(in oklch, var(--glass-color), transparent 85%);\n}\n\nbutton .card.mate:hover{\n background-color: color-mix(in oklch, var(--glass-color), white 10%) \n}\nbutton{\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n font-weight: bold;\n}\n\nbutton:focus {\n outline: revert;\n}\n.section-name{\n color: hsla(0, 0%, 100%, 0.7);\n}input:disabled{\n color: hsla(0, 0%, 100%, 0.5);\n font-weight: bold;\n}\n\ninput::-moz-placeholder{\n color: hsla(0, 0%, 100%, 0.5);\n \n}\n\ninput::placeholder{\n color: hsla(0, 0%, 100%, 0.5);\n \n}\n\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput:focus{\n outline: none;\n}.MuiDateCalendar-root{\n color: white;\n}.dropdown-content{\n box-shadow: rgba(149, 157, 165, 0.2)\n 0px 8px 24px;\n max-height: 40%vh;\n scrollbar-width: none;\n -ms-overflow-style: none;\n z-index: 10;\n}\n\n.dropdown-content::-webkit-scrollbar{\n width: 0;\n height: 0;\n}\n\n.dropdown-item:hover{\n background-color: rgb(240, 249, 255);\n}.button-open{\n border: rgb(147, 197, 253) 2px solid;\n}.vertical-line::before {\n content: "";\n position: absolute;\n width: 1.5px;\n height: 100%;\n background-color: white;\n left: 0;\n top: 0;\n transform: translateX(5.1px);\n}'));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
var __defProp = Object.defineProperty;
|
|
14
14
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
15
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16
|
-
import { jsx as jsx$1, jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { jsx as jsx$1, jsxs, Fragment } from "react/jsx-runtime";
|
|
17
17
|
import * as React from "react";
|
|
18
18
|
import React__default, { forwardRef, useContext, isValidElement, cloneElement, Children, createContext, useState, useEffect } from "react";
|
|
19
19
|
import ReactDOM from "react-dom";
|
|
@@ -27,16 +27,16 @@ function Avatar({ src, className = "", style: style2 }) {
|
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
|
-
function _extends() {
|
|
31
|
-
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
30
|
+
function _extends$1() {
|
|
31
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function(n) {
|
|
32
32
|
for (var e = 1; e < arguments.length; e++) {
|
|
33
33
|
var t = arguments[e];
|
|
34
34
|
for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
|
|
35
35
|
}
|
|
36
36
|
return n;
|
|
37
|
-
}, _extends.apply(null, arguments);
|
|
37
|
+
}, _extends$1.apply(null, arguments);
|
|
38
38
|
}
|
|
39
|
-
function _objectWithoutPropertiesLoose(r2, e) {
|
|
39
|
+
function _objectWithoutPropertiesLoose$1(r2, e) {
|
|
40
40
|
if (null == r2) return {};
|
|
41
41
|
var t = {};
|
|
42
42
|
for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
|
|
@@ -244,7 +244,7 @@ function requireReactIs_development$1() {
|
|
|
244
244
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
245
245
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
246
246
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
247
|
-
var
|
|
247
|
+
var Fragment2 = REACT_FRAGMENT_TYPE;
|
|
248
248
|
var Lazy = REACT_LAZY_TYPE;
|
|
249
249
|
var Memo = REACT_MEMO_TYPE;
|
|
250
250
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -303,7 +303,7 @@ function requireReactIs_development$1() {
|
|
|
303
303
|
reactIs_development$1.ContextProvider = ContextProvider;
|
|
304
304
|
reactIs_development$1.Element = Element2;
|
|
305
305
|
reactIs_development$1.ForwardRef = ForwardRef;
|
|
306
|
-
reactIs_development$1.Fragment =
|
|
306
|
+
reactIs_development$1.Fragment = Fragment2;
|
|
307
307
|
reactIs_development$1.Lazy = Lazy;
|
|
308
308
|
reactIs_development$1.Memo = Memo;
|
|
309
309
|
reactIs_development$1.Portal = Portal;
|
|
@@ -2317,7 +2317,7 @@ var createStyled$1 = function createStyled(tag, options) {
|
|
|
2317
2317
|
}
|
|
2318
2318
|
});
|
|
2319
2319
|
Styled.withComponent = function(nextTag, nextOptions) {
|
|
2320
|
-
var newStyled = createStyled(nextTag, _extends({}, options, nextOptions, {
|
|
2320
|
+
var newStyled = createStyled(nextTag, _extends$1({}, options, nextOptions, {
|
|
2321
2321
|
shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
|
|
2322
2322
|
}));
|
|
2323
2323
|
return newStyled.apply(void 0, styles2);
|
|
@@ -4041,6 +4041,33 @@ const createClassNameGenerator = () => {
|
|
|
4041
4041
|
};
|
|
4042
4042
|
};
|
|
4043
4043
|
const ClassNameGenerator = createClassNameGenerator();
|
|
4044
|
+
function createBox(options = {}) {
|
|
4045
|
+
const {
|
|
4046
|
+
themeId,
|
|
4047
|
+
defaultTheme: defaultTheme2,
|
|
4048
|
+
defaultClassName = "MuiBox-root",
|
|
4049
|
+
generateClassName
|
|
4050
|
+
} = options;
|
|
4051
|
+
const BoxRoot = styled$1("div", {
|
|
4052
|
+
shouldForwardProp: (prop) => prop !== "theme" && prop !== "sx" && prop !== "as"
|
|
4053
|
+
})(styleFunctionSx);
|
|
4054
|
+
const Box2 = /* @__PURE__ */ React.forwardRef(function Box3(inProps, ref) {
|
|
4055
|
+
const theme = useTheme$2(defaultTheme2);
|
|
4056
|
+
const {
|
|
4057
|
+
className,
|
|
4058
|
+
component = "div",
|
|
4059
|
+
...other
|
|
4060
|
+
} = extendSxProp$1(inProps);
|
|
4061
|
+
return /* @__PURE__ */ jsx$1(BoxRoot, {
|
|
4062
|
+
as: component,
|
|
4063
|
+
ref,
|
|
4064
|
+
className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
|
|
4065
|
+
theme: themeId ? theme[themeId] || theme : theme,
|
|
4066
|
+
...other
|
|
4067
|
+
});
|
|
4068
|
+
});
|
|
4069
|
+
return Box2;
|
|
4070
|
+
}
|
|
4044
4071
|
const globalStateClasses = {
|
|
4045
4072
|
active: "active",
|
|
4046
4073
|
checked: "checked",
|
|
@@ -7317,9 +7344,9 @@ function createTheme(options = {}, ...args) {
|
|
|
7317
7344
|
...typeof cssVariables !== "boolean" && cssVariables
|
|
7318
7345
|
}, ...args);
|
|
7319
7346
|
}
|
|
7320
|
-
const defaultTheme = createTheme();
|
|
7347
|
+
const defaultTheme$1 = createTheme();
|
|
7321
7348
|
function useTheme() {
|
|
7322
|
-
const theme = useTheme$2(defaultTheme);
|
|
7349
|
+
const theme = useTheme$2(defaultTheme$1);
|
|
7323
7350
|
if (process.env.NODE_ENV !== "production") {
|
|
7324
7351
|
React.useDebugValue(theme);
|
|
7325
7352
|
}
|
|
@@ -7332,7 +7359,7 @@ function useThemeProps({
|
|
|
7332
7359
|
return useThemeProps$1({
|
|
7333
7360
|
props,
|
|
7334
7361
|
name,
|
|
7335
|
-
defaultTheme,
|
|
7362
|
+
defaultTheme: defaultTheme$1,
|
|
7336
7363
|
themeId: THEME_ID
|
|
7337
7364
|
});
|
|
7338
7365
|
}
|
|
@@ -7342,7 +7369,7 @@ function slotShouldForwardProp(prop) {
|
|
|
7342
7369
|
const rootShouldForwardProp = (prop) => slotShouldForwardProp(prop) && prop !== "classes";
|
|
7343
7370
|
const styled = createStyled2({
|
|
7344
7371
|
themeId: THEME_ID,
|
|
7345
|
-
defaultTheme,
|
|
7372
|
+
defaultTheme: defaultTheme$1,
|
|
7346
7373
|
rootShouldForwardProp
|
|
7347
7374
|
});
|
|
7348
7375
|
function ThemeProviderNoVars({
|
|
@@ -7474,7 +7501,7 @@ const getPickersLocalization = (pickersTranslations) => {
|
|
|
7474
7501
|
components: {
|
|
7475
7502
|
MuiLocalizationProvider: {
|
|
7476
7503
|
defaultProps: {
|
|
7477
|
-
localeText: _extends({}, pickersTranslations)
|
|
7504
|
+
localeText: _extends$1({}, pickersTranslations)
|
|
7478
7505
|
}
|
|
7479
7506
|
}
|
|
7480
7507
|
}
|
|
@@ -7550,10 +7577,77 @@ const enUSPickers = {
|
|
|
7550
7577
|
};
|
|
7551
7578
|
const DEFAULT_LOCALE = enUSPickers;
|
|
7552
7579
|
getPickersLocalization(enUSPickers);
|
|
7580
|
+
const _excluded$d = ["localeText"];
|
|
7553
7581
|
const PickerAdapterContext = /* @__PURE__ */ React.createContext(null);
|
|
7554
7582
|
if (process.env.NODE_ENV !== "production") PickerAdapterContext.displayName = "PickerAdapterContext";
|
|
7555
|
-
|
|
7556
|
-
|
|
7583
|
+
const LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
7584
|
+
const {
|
|
7585
|
+
localeText: inLocaleText
|
|
7586
|
+
} = inProps, otherInProps = _objectWithoutPropertiesLoose$1(inProps, _excluded$d);
|
|
7587
|
+
const {
|
|
7588
|
+
adapter: parentAdapter,
|
|
7589
|
+
localeText: parentLocaleText
|
|
7590
|
+
} = React.useContext(PickerAdapterContext) ?? {
|
|
7591
|
+
adapter: void 0,
|
|
7592
|
+
localeText: void 0
|
|
7593
|
+
};
|
|
7594
|
+
const props = useThemeProps({
|
|
7595
|
+
// We don't want to pass the `localeText` prop to the theme, that way it will always return the theme value,
|
|
7596
|
+
// We will then merge this theme value with our value manually
|
|
7597
|
+
props: otherInProps,
|
|
7598
|
+
name: "MuiLocalizationProvider"
|
|
7599
|
+
});
|
|
7600
|
+
const {
|
|
7601
|
+
children,
|
|
7602
|
+
dateAdapter: DateAdapter,
|
|
7603
|
+
dateFormats,
|
|
7604
|
+
dateLibInstance,
|
|
7605
|
+
adapterLocale,
|
|
7606
|
+
localeText: themeLocaleText
|
|
7607
|
+
} = props;
|
|
7608
|
+
const localeText = React.useMemo(() => _extends$1({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);
|
|
7609
|
+
const adapter = React.useMemo(() => {
|
|
7610
|
+
if (!DateAdapter) {
|
|
7611
|
+
if (parentAdapter) {
|
|
7612
|
+
return parentAdapter;
|
|
7613
|
+
}
|
|
7614
|
+
return null;
|
|
7615
|
+
}
|
|
7616
|
+
const dateAdapter = new DateAdapter({
|
|
7617
|
+
locale: adapterLocale,
|
|
7618
|
+
formats: dateFormats,
|
|
7619
|
+
instance: dateLibInstance
|
|
7620
|
+
});
|
|
7621
|
+
if (!dateAdapter.isMUIAdapter) {
|
|
7622
|
+
throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`", "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", "More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation"].join(`
|
|
7623
|
+
`));
|
|
7624
|
+
}
|
|
7625
|
+
return dateAdapter;
|
|
7626
|
+
}, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentAdapter]);
|
|
7627
|
+
const defaultDates = React.useMemo(() => {
|
|
7628
|
+
if (!adapter) {
|
|
7629
|
+
return null;
|
|
7630
|
+
}
|
|
7631
|
+
return {
|
|
7632
|
+
minDate: adapter.date("1900-01-01T00:00:00.000"),
|
|
7633
|
+
maxDate: adapter.date("2099-12-31T00:00:00.000")
|
|
7634
|
+
};
|
|
7635
|
+
}, [adapter]);
|
|
7636
|
+
const contextValue = React.useMemo(() => {
|
|
7637
|
+
return {
|
|
7638
|
+
utils: adapter,
|
|
7639
|
+
adapter,
|
|
7640
|
+
defaultDates,
|
|
7641
|
+
localeText
|
|
7642
|
+
};
|
|
7643
|
+
}, [defaultDates, adapter, localeText]);
|
|
7644
|
+
return /* @__PURE__ */ jsx$1(PickerAdapterContext.Provider, {
|
|
7645
|
+
value: contextValue,
|
|
7646
|
+
children
|
|
7647
|
+
});
|
|
7648
|
+
};
|
|
7649
|
+
if (process.env.NODE_ENV !== "production") LocalizationProvider.displayName = "LocalizationProvider";
|
|
7650
|
+
process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
7557
7651
|
// ----------------------------- Warning --------------------------------
|
|
7558
7652
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
7559
7653
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -7614,8 +7708,8 @@ const useLocalizationContext = () => {
|
|
|
7614
7708
|
if (localization.adapter === null) {
|
|
7615
7709
|
throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.", "It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));
|
|
7616
7710
|
}
|
|
7617
|
-
const localeText = React.useMemo(() => _extends({}, DEFAULT_LOCALE, localization.localeText), [localization.localeText]);
|
|
7618
|
-
return React.useMemo(() => _extends({}, localization, {
|
|
7711
|
+
const localeText = React.useMemo(() => _extends$1({}, DEFAULT_LOCALE, localization.localeText), [localization.localeText]);
|
|
7712
|
+
return React.useMemo(() => _extends$1({}, localization, {
|
|
7619
7713
|
localeText
|
|
7620
7714
|
}), [localization, localeText]);
|
|
7621
7715
|
};
|
|
@@ -7795,7 +7889,7 @@ const v6Colors = {
|
|
|
7795
7889
|
textDisabled: true
|
|
7796
7890
|
};
|
|
7797
7891
|
const extendSxProp = internal_createExtendSxProp();
|
|
7798
|
-
const useUtilityClasses$
|
|
7892
|
+
const useUtilityClasses$g = (ownerState) => {
|
|
7799
7893
|
const {
|
|
7800
7894
|
align,
|
|
7801
7895
|
gutterBottom,
|
|
@@ -7938,7 +8032,7 @@ const Typography = /* @__PURE__ */ React.forwardRef(function Typography2(inProps
|
|
|
7938
8032
|
variantMapping
|
|
7939
8033
|
};
|
|
7940
8034
|
const Component = component || (paragraph ? "p" : variantMapping[variant] || defaultVariantMapping[variant]) || "span";
|
|
7941
|
-
const classes = useUtilityClasses$
|
|
8035
|
+
const classes = useUtilityClasses$g(ownerState);
|
|
7942
8036
|
return /* @__PURE__ */ jsx$1(TypographyRoot, {
|
|
7943
8037
|
as: Component,
|
|
7944
8038
|
ref,
|
|
@@ -8216,7 +8310,7 @@ function getSvgIconUtilityClass(slot) {
|
|
|
8216
8310
|
return generateUtilityClass("MuiSvgIcon", slot);
|
|
8217
8311
|
}
|
|
8218
8312
|
generateUtilityClasses("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
8219
|
-
const useUtilityClasses$
|
|
8313
|
+
const useUtilityClasses$f = (ownerState) => {
|
|
8220
8314
|
const {
|
|
8221
8315
|
color: color2,
|
|
8222
8316
|
fontSize,
|
|
@@ -8361,7 +8455,7 @@ const SvgIcon = /* @__PURE__ */ React.forwardRef(function SvgIcon2(inProps, ref)
|
|
|
8361
8455
|
if (!inheritViewBox) {
|
|
8362
8456
|
more.viewBox = viewBox;
|
|
8363
8457
|
}
|
|
8364
|
-
const classes = useUtilityClasses$
|
|
8458
|
+
const classes = useUtilityClasses$f(ownerState);
|
|
8365
8459
|
return /* @__PURE__ */ jsxs(SvgIconRoot, {
|
|
8366
8460
|
as: component,
|
|
8367
8461
|
className: clsx(classes.root, className),
|
|
@@ -8467,6 +8561,9 @@ function createSvgIcon(path, displayName) {
|
|
|
8467
8561
|
Component.muiName = SvgIcon.muiName;
|
|
8468
8562
|
return /* @__PURE__ */ React.memo(/* @__PURE__ */ React.forwardRef(Component));
|
|
8469
8563
|
}
|
|
8564
|
+
function ownerDocument(node2) {
|
|
8565
|
+
return node2 && node2.ownerDocument || document;
|
|
8566
|
+
}
|
|
8470
8567
|
function useControlled(props) {
|
|
8471
8568
|
const {
|
|
8472
8569
|
controlled,
|
|
@@ -8905,7 +9002,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
8905
9002
|
_this$props.onExiting;
|
|
8906
9003
|
_this$props.onExited;
|
|
8907
9004
|
_this$props.nodeRef;
|
|
8908
|
-
var childProps = _objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
9005
|
+
var childProps = _objectWithoutPropertiesLoose$1(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
8909
9006
|
return (
|
|
8910
9007
|
// allows for nested Transitions
|
|
8911
9008
|
/* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
|
|
@@ -9228,8 +9325,8 @@ var CSSTransition = /* @__PURE__ */ function(_React$Component) {
|
|
|
9228
9325
|
_proto.render = function render() {
|
|
9229
9326
|
var _this$props = this.props;
|
|
9230
9327
|
_this$props.classNames;
|
|
9231
|
-
var props = _objectWithoutPropertiesLoose(_this$props, ["classNames"]);
|
|
9232
|
-
return /* @__PURE__ */ React__default.createElement(Transition, _extends({}, props, {
|
|
9328
|
+
var props = _objectWithoutPropertiesLoose$1(_this$props, ["classNames"]);
|
|
9329
|
+
return /* @__PURE__ */ React__default.createElement(Transition, _extends$1({}, props, {
|
|
9233
9330
|
onEnter: this.onEnter,
|
|
9234
9331
|
onEntered: this.onEntered,
|
|
9235
9332
|
onEntering: this.onEntering,
|
|
@@ -9243,7 +9340,7 @@ var CSSTransition = /* @__PURE__ */ function(_React$Component) {
|
|
|
9243
9340
|
CSSTransition.defaultProps = {
|
|
9244
9341
|
classNames: ""
|
|
9245
9342
|
};
|
|
9246
|
-
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, Transition.propTypes, {
|
|
9343
|
+
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({}, Transition.propTypes, {
|
|
9247
9344
|
/**
|
|
9248
9345
|
* The animation classNames applied to the component as it appears, enters,
|
|
9249
9346
|
* exits or has finished the transition. A single name can be provided, which
|
|
@@ -9516,7 +9613,7 @@ var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
|
|
|
9516
9613
|
}
|
|
9517
9614
|
if (this.mounted) {
|
|
9518
9615
|
this.setState(function(state) {
|
|
9519
|
-
var children = _extends({}, state.children);
|
|
9616
|
+
var children = _extends$1({}, state.children);
|
|
9520
9617
|
delete children[child.key];
|
|
9521
9618
|
return {
|
|
9522
9619
|
children
|
|
@@ -9525,7 +9622,7 @@ var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
|
|
|
9525
9622
|
}
|
|
9526
9623
|
};
|
|
9527
9624
|
_proto.render = function render() {
|
|
9528
|
-
var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
|
|
9625
|
+
var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose$1(_this$props, ["component", "childFactory"]);
|
|
9529
9626
|
var contextValue = this.state.contextValue;
|
|
9530
9627
|
var children = values(this.state.children).map(childFactory2);
|
|
9531
9628
|
delete props.appear;
|
|
@@ -9996,7 +10093,7 @@ function getButtonBaseUtilityClass(slot) {
|
|
|
9996
10093
|
return generateUtilityClass("MuiButtonBase", slot);
|
|
9997
10094
|
}
|
|
9998
10095
|
const buttonBaseClasses = generateUtilityClasses("MuiButtonBase", ["root", "disabled", "focusVisible"]);
|
|
9999
|
-
const useUtilityClasses$
|
|
10096
|
+
const useUtilityClasses$e = (ownerState) => {
|
|
10000
10097
|
const {
|
|
10001
10098
|
disabled,
|
|
10002
10099
|
focusVisible,
|
|
@@ -10212,7 +10309,7 @@ const ButtonBase = /* @__PURE__ */ React.forwardRef(function ButtonBase2(inProps
|
|
|
10212
10309
|
tabIndex,
|
|
10213
10310
|
focusVisible
|
|
10214
10311
|
};
|
|
10215
|
-
const classes = useUtilityClasses$
|
|
10312
|
+
const classes = useUtilityClasses$e(ownerState);
|
|
10216
10313
|
return /* @__PURE__ */ jsxs(ButtonBaseRoot, {
|
|
10217
10314
|
as: ComponentProp,
|
|
10218
10315
|
className: clsx(classes.root, className),
|
|
@@ -10447,7 +10544,7 @@ const rotateAnimation = typeof circularRotateKeyframe !== "string" ? css`
|
|
|
10447
10544
|
const dashAnimation = typeof circularDashKeyframe !== "string" ? css`
|
|
10448
10545
|
animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
|
|
10449
10546
|
` : null;
|
|
10450
|
-
const useUtilityClasses$
|
|
10547
|
+
const useUtilityClasses$d = (ownerState) => {
|
|
10451
10548
|
const {
|
|
10452
10549
|
classes,
|
|
10453
10550
|
variant,
|
|
@@ -10581,7 +10678,7 @@ const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgr
|
|
|
10581
10678
|
variant,
|
|
10582
10679
|
enableTrackSlot
|
|
10583
10680
|
};
|
|
10584
|
-
const classes = useUtilityClasses$
|
|
10681
|
+
const classes = useUtilityClasses$d(ownerState);
|
|
10585
10682
|
const circleStyle = {};
|
|
10586
10683
|
const rootStyle = {};
|
|
10587
10684
|
const rootProps = {};
|
|
@@ -10705,7 +10802,7 @@ function getIconButtonUtilityClass(slot) {
|
|
|
10705
10802
|
return generateUtilityClass("MuiIconButton", slot);
|
|
10706
10803
|
}
|
|
10707
10804
|
const iconButtonClasses = generateUtilityClasses("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]);
|
|
10708
|
-
const useUtilityClasses$
|
|
10805
|
+
const useUtilityClasses$c = (ownerState) => {
|
|
10709
10806
|
const {
|
|
10710
10807
|
classes,
|
|
10711
10808
|
disabled,
|
|
@@ -10890,7 +10987,7 @@ const IconButton = /* @__PURE__ */ React.forwardRef(function IconButton2(inProps
|
|
|
10890
10987
|
loadingIndicator,
|
|
10891
10988
|
size
|
|
10892
10989
|
};
|
|
10893
|
-
const classes = useUtilityClasses$
|
|
10990
|
+
const classes = useUtilityClasses$c(ownerState);
|
|
10894
10991
|
return /* @__PURE__ */ jsxs(IconButtonRoot, {
|
|
10895
10992
|
id: loading ? loadingId : idProp,
|
|
10896
10993
|
className: clsx(classes.root, className),
|
|
@@ -11035,7 +11132,7 @@ function getPickersArrowSwitcherUtilityClass(slot) {
|
|
|
11035
11132
|
}
|
|
11036
11133
|
generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button", "previousIconButton", "nextIconButton", "leftArrowIcon", "rightArrowIcon"]);
|
|
11037
11134
|
const usePickerPrivateContext = () => React.useContext(PickerPrivateContext);
|
|
11038
|
-
const _excluded$
|
|
11135
|
+
const _excluded$c = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel", "labelId", "classes"], _excluded2$2 = ["ownerState"], _excluded3 = ["ownerState"];
|
|
11039
11136
|
const PickersArrowSwitcherRoot = styled("div", {
|
|
11040
11137
|
name: "MuiPickersArrowSwitcher",
|
|
11041
11138
|
slot: "Root"
|
|
@@ -11063,7 +11160,7 @@ const PickersArrowSwitcherButton = styled(IconButton, {
|
|
|
11063
11160
|
}
|
|
11064
11161
|
}]
|
|
11065
11162
|
});
|
|
11066
|
-
const useUtilityClasses$
|
|
11163
|
+
const useUtilityClasses$b = (classes) => {
|
|
11067
11164
|
const slots = {
|
|
11068
11165
|
root: ["root"],
|
|
11069
11166
|
spacer: ["spacer"],
|
|
@@ -11096,11 +11193,11 @@ const PickersArrowSwitcher = /* @__PURE__ */ React.forwardRef(function PickersAr
|
|
|
11096
11193
|
previousLabel,
|
|
11097
11194
|
labelId,
|
|
11098
11195
|
classes: classesProp
|
|
11099
|
-
} = props, other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
11196
|
+
} = props, other = _objectWithoutPropertiesLoose$1(props, _excluded$c);
|
|
11100
11197
|
const {
|
|
11101
11198
|
ownerState
|
|
11102
11199
|
} = usePickerPrivateContext();
|
|
11103
|
-
const classes = useUtilityClasses$
|
|
11200
|
+
const classes = useUtilityClasses$b(classesProp);
|
|
11104
11201
|
const nextProps = {
|
|
11105
11202
|
isDisabled: isNextDisabled,
|
|
11106
11203
|
isHidden: isNextHidden,
|
|
@@ -11125,7 +11222,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React.forwardRef(function PickersAr
|
|
|
11125
11222
|
edge: "end",
|
|
11126
11223
|
onClick: previousProps.goTo
|
|
11127
11224
|
},
|
|
11128
|
-
ownerState: _extends({}, ownerState, {
|
|
11225
|
+
ownerState: _extends$1({}, ownerState, {
|
|
11129
11226
|
isButtonHidden: previousProps.isHidden ?? false
|
|
11130
11227
|
}),
|
|
11131
11228
|
className: clsx(classes.button, classes.previousIconButton)
|
|
@@ -11142,7 +11239,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React.forwardRef(function PickersAr
|
|
|
11142
11239
|
edge: "start",
|
|
11143
11240
|
onClick: nextProps.goTo
|
|
11144
11241
|
},
|
|
11145
|
-
ownerState: _extends({}, ownerState, {
|
|
11242
|
+
ownerState: _extends$1({}, ownerState, {
|
|
11146
11243
|
isButtonHidden: nextProps.isHidden ?? false
|
|
11147
11244
|
}),
|
|
11148
11245
|
className: clsx(classes.button, classes.nextIconButton)
|
|
@@ -11156,7 +11253,7 @@ const PickersArrowSwitcher = /* @__PURE__ */ React.forwardRef(function PickersAr
|
|
|
11156
11253
|
},
|
|
11157
11254
|
ownerState,
|
|
11158
11255
|
className: classes.leftArrowIcon
|
|
11159
|
-
}), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2);
|
|
11256
|
+
}), leftArrowIconProps = _objectWithoutPropertiesLoose$1(_useSlotProps, _excluded2$2);
|
|
11160
11257
|
const RightArrowIcon = (slots == null ? void 0 : slots.rightArrowIcon) ?? ArrowRightIcon;
|
|
11161
11258
|
const _useSlotProps2 = useSlotProps({
|
|
11162
11259
|
elementType: RightArrowIcon,
|
|
@@ -11166,14 +11263,14 @@ const PickersArrowSwitcher = /* @__PURE__ */ React.forwardRef(function PickersAr
|
|
|
11166
11263
|
},
|
|
11167
11264
|
ownerState,
|
|
11168
11265
|
className: classes.rightArrowIcon
|
|
11169
|
-
}), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);
|
|
11170
|
-
return /* @__PURE__ */ jsxs(PickersArrowSwitcherRoot, _extends({
|
|
11266
|
+
}), rightArrowIconProps = _objectWithoutPropertiesLoose$1(_useSlotProps2, _excluded3);
|
|
11267
|
+
return /* @__PURE__ */ jsxs(PickersArrowSwitcherRoot, _extends$1({
|
|
11171
11268
|
ref,
|
|
11172
11269
|
className: clsx(classes.root, className),
|
|
11173
11270
|
ownerState
|
|
11174
11271
|
}, other, {
|
|
11175
|
-
children: [/* @__PURE__ */ jsx$1(PreviousIconButton, _extends({}, previousIconButtonProps, {
|
|
11176
|
-
children: isRtl ? /* @__PURE__ */ jsx$1(RightArrowIcon, _extends({}, rightArrowIconProps)) : /* @__PURE__ */ jsx$1(LeftArrowIcon, _extends({}, leftArrowIconProps))
|
|
11272
|
+
children: [/* @__PURE__ */ jsx$1(PreviousIconButton, _extends$1({}, previousIconButtonProps, {
|
|
11273
|
+
children: isRtl ? /* @__PURE__ */ jsx$1(RightArrowIcon, _extends$1({}, rightArrowIconProps)) : /* @__PURE__ */ jsx$1(LeftArrowIcon, _extends$1({}, leftArrowIconProps))
|
|
11177
11274
|
})), children ? /* @__PURE__ */ jsx$1(Typography, {
|
|
11178
11275
|
variant: "subtitle1",
|
|
11179
11276
|
component: "span",
|
|
@@ -11182,8 +11279,8 @@ const PickersArrowSwitcher = /* @__PURE__ */ React.forwardRef(function PickersAr
|
|
|
11182
11279
|
}) : /* @__PURE__ */ jsx$1(PickersArrowSwitcherSpacer, {
|
|
11183
11280
|
className: classes.spacer,
|
|
11184
11281
|
ownerState
|
|
11185
|
-
}), /* @__PURE__ */ jsx$1(NextIconButton, _extends({}, nextIconButtonProps, {
|
|
11186
|
-
children: isRtl ? /* @__PURE__ */ jsx$1(LeftArrowIcon, _extends({}, leftArrowIconProps)) : /* @__PURE__ */ jsx$1(RightArrowIcon, _extends({}, rightArrowIconProps))
|
|
11282
|
+
}), /* @__PURE__ */ jsx$1(NextIconButton, _extends$1({}, nextIconButtonProps, {
|
|
11283
|
+
children: isRtl ? /* @__PURE__ */ jsx$1(LeftArrowIcon, _extends$1({}, leftArrowIconProps)) : /* @__PURE__ */ jsx$1(RightArrowIcon, _extends$1({}, rightArrowIconProps))
|
|
11187
11284
|
}))]
|
|
11188
11285
|
}));
|
|
11189
11286
|
});
|
|
@@ -11310,7 +11407,7 @@ function useViews({
|
|
|
11310
11407
|
}
|
|
11311
11408
|
handleChangeView(viewToNavigateTo);
|
|
11312
11409
|
});
|
|
11313
|
-
return _extends({}, stepNavigation, {
|
|
11410
|
+
return _extends$1({}, stepNavigation, {
|
|
11314
11411
|
view,
|
|
11315
11412
|
setView: handleChangeView,
|
|
11316
11413
|
focusedView,
|
|
@@ -11460,7 +11557,7 @@ const getDefaultReferenceDate = ({
|
|
|
11460
11557
|
}
|
|
11461
11558
|
return referenceDate;
|
|
11462
11559
|
};
|
|
11463
|
-
const _excluded$
|
|
11560
|
+
const _excluded$b = ["value", "referenceDate"];
|
|
11464
11561
|
const singleItemValueManager = {
|
|
11465
11562
|
emptyValue: null,
|
|
11466
11563
|
getTodayValue: getTodayDate,
|
|
@@ -11468,7 +11565,7 @@ const singleItemValueManager = {
|
|
|
11468
11565
|
let {
|
|
11469
11566
|
value,
|
|
11470
11567
|
referenceDate
|
|
11471
|
-
} = _ref, params = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11568
|
+
} = _ref, params = _objectWithoutPropertiesLoose$1(_ref, _excluded$b);
|
|
11472
11569
|
if (params.adapter.isValid(value)) {
|
|
11473
11570
|
return value;
|
|
11474
11571
|
}
|
|
@@ -11504,7 +11601,7 @@ function usePickerDayOwnerState(parameters) {
|
|
|
11504
11601
|
const {
|
|
11505
11602
|
ownerState: pickerOwnerState
|
|
11506
11603
|
} = usePickerPrivateContext();
|
|
11507
|
-
return React.useMemo(() => _extends({}, pickerOwnerState, {
|
|
11604
|
+
return React.useMemo(() => _extends$1({}, pickerOwnerState, {
|
|
11508
11605
|
day,
|
|
11509
11606
|
isDaySelected: selected ?? false,
|
|
11510
11607
|
isDayDisabled: disabled ?? false,
|
|
@@ -11517,8 +11614,8 @@ function usePickerDayOwnerState(parameters) {
|
|
|
11517
11614
|
showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth ?? false
|
|
11518
11615
|
}), [adapter, pickerOwnerState, day, selected, disabled, today, outsideCurrentMonth, disableMargin, disableHighlightToday, showDaysOutsideCurrentMonth]);
|
|
11519
11616
|
}
|
|
11520
|
-
const _excluded$
|
|
11521
|
-
const useUtilityClasses$
|
|
11617
|
+
const _excluded$a = ["autoFocus", "className", "classes", "hidden", "isAnimating", "onClick", "onDaySelect", "onFocus", "onBlur", "onKeyDown", "onMouseDown", "onMouseEnter", "children", "isFirstVisibleCell", "isLastVisibleCell", "day", "selected", "disabled", "today", "outsideCurrentMonth", "disableMargin", "disableHighlightToday", "showDaysOutsideCurrentMonth"];
|
|
11618
|
+
const useUtilityClasses$a = (classes, ownerState) => {
|
|
11522
11619
|
const {
|
|
11523
11620
|
isDaySelected,
|
|
11524
11621
|
isDayDisabled,
|
|
@@ -11537,7 +11634,7 @@ const useUtilityClasses$9 = (classes, ownerState) => {
|
|
|
11537
11634
|
};
|
|
11538
11635
|
const styleArg = ({
|
|
11539
11636
|
theme
|
|
11540
|
-
}) => _extends({}, theme.typography.caption, {
|
|
11637
|
+
}) => _extends$1({}, theme.typography.caption, {
|
|
11541
11638
|
width: DAY_SIZE,
|
|
11542
11639
|
height: DAY_SIZE,
|
|
11543
11640
|
borderRadius: "50%",
|
|
@@ -11619,7 +11716,7 @@ const PickersDayFiller = styled("div", {
|
|
|
11619
11716
|
overridesResolver
|
|
11620
11717
|
})(({
|
|
11621
11718
|
theme
|
|
11622
|
-
}) => _extends({}, styleArg({
|
|
11719
|
+
}) => _extends$1({}, styleArg({
|
|
11623
11720
|
theme
|
|
11624
11721
|
}), {
|
|
11625
11722
|
// visibility: 'hidden' does not work here as it hides the element from screen readers as well
|
|
@@ -11654,7 +11751,7 @@ const PickersDayRaw = /* @__PURE__ */ React.forwardRef(function PickersDay(inPro
|
|
|
11654
11751
|
disableMargin,
|
|
11655
11752
|
disableHighlightToday,
|
|
11656
11753
|
showDaysOutsideCurrentMonth
|
|
11657
|
-
} = props, other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
11754
|
+
} = props, other = _objectWithoutPropertiesLoose$1(props, _excluded$a);
|
|
11658
11755
|
const ownerState = usePickerDayOwnerState({
|
|
11659
11756
|
day,
|
|
11660
11757
|
selected,
|
|
@@ -11665,7 +11762,7 @@ const PickersDayRaw = /* @__PURE__ */ React.forwardRef(function PickersDay(inPro
|
|
|
11665
11762
|
disableHighlightToday,
|
|
11666
11763
|
showDaysOutsideCurrentMonth
|
|
11667
11764
|
});
|
|
11668
|
-
const classes = useUtilityClasses$
|
|
11765
|
+
const classes = useUtilityClasses$a(classesProp, ownerState);
|
|
11669
11766
|
const adapter = usePickerAdapter();
|
|
11670
11767
|
const ref = React.useRef(null);
|
|
11671
11768
|
const handleRef = useForkRef(ref, forwardedRef);
|
|
@@ -11699,7 +11796,7 @@ const PickersDayRaw = /* @__PURE__ */ React.forwardRef(function PickersDay(inPro
|
|
|
11699
11796
|
role: other.role
|
|
11700
11797
|
});
|
|
11701
11798
|
}
|
|
11702
|
-
return /* @__PURE__ */ jsx$1(PickersDayRoot, _extends({
|
|
11799
|
+
return /* @__PURE__ */ jsx$1(PickersDayRoot, _extends$1({
|
|
11703
11800
|
className: clsx(classes.root, className),
|
|
11704
11801
|
ref: handleRef,
|
|
11705
11802
|
centerRipple: true,
|
|
@@ -12148,6 +12245,17 @@ process.env.NODE_ENV !== "production" ? Fade.propTypes = {
|
|
|
12148
12245
|
exit: PropTypes.number
|
|
12149
12246
|
})])
|
|
12150
12247
|
} : void 0;
|
|
12248
|
+
const visuallyHidden = {
|
|
12249
|
+
border: 0,
|
|
12250
|
+
clip: "rect(0 0 0 0)",
|
|
12251
|
+
height: "1px",
|
|
12252
|
+
margin: "-1px",
|
|
12253
|
+
overflow: "hidden",
|
|
12254
|
+
padding: 0,
|
|
12255
|
+
position: "absolute",
|
|
12256
|
+
whiteSpace: "nowrap",
|
|
12257
|
+
width: "1px"
|
|
12258
|
+
};
|
|
12151
12259
|
const useIsDateDisabled = ({
|
|
12152
12260
|
shouldDisableDate,
|
|
12153
12261
|
shouldDisableMonth,
|
|
@@ -12177,7 +12285,7 @@ const useIsDateDisabled = ({
|
|
|
12177
12285
|
const createCalendarStateReducer = (reduceAnimations, adapter) => (state, action) => {
|
|
12178
12286
|
switch (action.type) {
|
|
12179
12287
|
case "setVisibleDate":
|
|
12180
|
-
return _extends({}, state, {
|
|
12288
|
+
return _extends$1({}, state, {
|
|
12181
12289
|
slideDirection: action.direction,
|
|
12182
12290
|
currentMonth: action.month,
|
|
12183
12291
|
isMonthSwitchingAnimating: !adapter.isSameMonth(action.month, state.currentMonth) && !reduceAnimations && !action.skipAnimation,
|
|
@@ -12192,12 +12300,12 @@ const createCalendarStateReducer = (reduceAnimations, adapter) => (state, action
|
|
|
12192
12300
|
if (adapter.getMonth(newCurrentMonth) !== adapter.getMonth(state.currentMonth)) {
|
|
12193
12301
|
newCurrentMonth = adapter.setMonth(newCurrentMonth, adapter.getMonth(state.currentMonth));
|
|
12194
12302
|
}
|
|
12195
|
-
return _extends({}, state, {
|
|
12303
|
+
return _extends$1({}, state, {
|
|
12196
12304
|
currentMonth: newCurrentMonth
|
|
12197
12305
|
});
|
|
12198
12306
|
}
|
|
12199
12307
|
case "finishMonthSwitchingAnimation":
|
|
12200
|
-
return _extends({}, state, {
|
|
12308
|
+
return _extends$1({}, state, {
|
|
12201
12309
|
isMonthSwitchingAnimating: false
|
|
12202
12310
|
});
|
|
12203
12311
|
default:
|
|
@@ -12318,8 +12426,8 @@ const useCalendarState = (params) => {
|
|
|
12318
12426
|
};
|
|
12319
12427
|
const getPickersFadeTransitionGroupUtilityClass = (slot) => generateUtilityClass("MuiPickersFadeTransitionGroup", slot);
|
|
12320
12428
|
generateUtilityClasses("MuiPickersFadeTransitionGroup", ["root"]);
|
|
12321
|
-
const _excluded$
|
|
12322
|
-
const useUtilityClasses$
|
|
12429
|
+
const _excluded$9 = ["children"];
|
|
12430
|
+
const useUtilityClasses$9 = (classes) => {
|
|
12323
12431
|
const slots = {
|
|
12324
12432
|
root: ["root"]
|
|
12325
12433
|
};
|
|
@@ -12345,8 +12453,8 @@ function PickersFadeTransitionGroup(inProps) {
|
|
|
12345
12453
|
} = props;
|
|
12346
12454
|
const {
|
|
12347
12455
|
children
|
|
12348
|
-
} = props, other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
12349
|
-
const classes = useUtilityClasses$
|
|
12456
|
+
} = props, other = _objectWithoutPropertiesLoose$1(props, _excluded$9);
|
|
12457
|
+
const classes = useUtilityClasses$9(classesProp);
|
|
12350
12458
|
const theme = useTheme();
|
|
12351
12459
|
if (reduceAnimations) {
|
|
12352
12460
|
return children;
|
|
@@ -12369,8 +12477,8 @@ function PickersFadeTransitionGroup(inProps) {
|
|
|
12369
12477
|
}
|
|
12370
12478
|
const getPickersSlideTransitionUtilityClass = (slot) => generateUtilityClass("MuiPickersSlideTransition", slot);
|
|
12371
12479
|
const pickersSlideTransitionClasses = generateUtilityClasses("MuiPickersSlideTransition", ["root", "slideEnter-left", "slideEnter-right", "slideEnterActive", "slideExit", "slideExitActiveLeft-left", "slideExitActiveLeft-right"]);
|
|
12372
|
-
const _excluded$
|
|
12373
|
-
const useUtilityClasses$
|
|
12480
|
+
const _excluded$8 = ["children", "className", "reduceAnimations", "slideDirection", "transKey", "classes"];
|
|
12481
|
+
const useUtilityClasses$8 = (classes, ownerState) => {
|
|
12374
12482
|
const {
|
|
12375
12483
|
slideDirection
|
|
12376
12484
|
} = ownerState;
|
|
@@ -12459,14 +12567,14 @@ function PickersSlideTransition(inProps) {
|
|
|
12459
12567
|
slideDirection,
|
|
12460
12568
|
transKey,
|
|
12461
12569
|
classes: classesProp
|
|
12462
|
-
} = props, other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
12570
|
+
} = props, other = _objectWithoutPropertiesLoose$1(props, _excluded$8);
|
|
12463
12571
|
const {
|
|
12464
12572
|
ownerState: pickerOwnerState
|
|
12465
12573
|
} = usePickerPrivateContext();
|
|
12466
|
-
const ownerState = _extends({}, pickerOwnerState, {
|
|
12574
|
+
const ownerState = _extends$1({}, pickerOwnerState, {
|
|
12467
12575
|
slideDirection
|
|
12468
12576
|
});
|
|
12469
|
-
const classes = useUtilityClasses$
|
|
12577
|
+
const classes = useUtilityClasses$8(classesProp, ownerState);
|
|
12470
12578
|
const theme = useTheme();
|
|
12471
12579
|
if (reduceAnimations) {
|
|
12472
12580
|
return /* @__PURE__ */ jsx$1("div", {
|
|
@@ -12487,7 +12595,7 @@ function PickersSlideTransition(inProps) {
|
|
|
12487
12595
|
}),
|
|
12488
12596
|
role: "presentation",
|
|
12489
12597
|
ownerState,
|
|
12490
|
-
children: /* @__PURE__ */ jsx$1(CSSTransition, _extends({
|
|
12598
|
+
children: /* @__PURE__ */ jsx$1(CSSTransition, _extends$1({
|
|
12491
12599
|
mountOnEnter: true,
|
|
12492
12600
|
unmountOnExit: true,
|
|
12493
12601
|
timeout: theme.transitions.duration.complex,
|
|
@@ -12499,8 +12607,8 @@ function PickersSlideTransition(inProps) {
|
|
|
12499
12607
|
}
|
|
12500
12608
|
const getDayCalendarUtilityClass = (slot) => generateUtilityClass("MuiDayCalendar", slot);
|
|
12501
12609
|
generateUtilityClasses("MuiDayCalendar", ["root", "header", "weekDayLabel", "loadingContainer", "slideTransition", "monthContainer", "weekContainer", "weekNumberLabel", "weekNumber"]);
|
|
12502
|
-
const _excluded$
|
|
12503
|
-
const useUtilityClasses$
|
|
12610
|
+
const _excluded$7 = ["parentProps", "day", "focusedDay", "selectedDays", "isDateDisabled", "currentMonthNumber", "isViewFocused"], _excluded2$1 = ["ownerState"];
|
|
12611
|
+
const useUtilityClasses$7 = (classes) => {
|
|
12504
12612
|
const slots = {
|
|
12505
12613
|
root: ["root"],
|
|
12506
12614
|
header: ["header"],
|
|
@@ -12562,7 +12670,7 @@ const PickersCalendarWeekNumber = styled(Typography, {
|
|
|
12562
12670
|
slot: "WeekNumber"
|
|
12563
12671
|
})(({
|
|
12564
12672
|
theme
|
|
12565
|
-
}) => _extends({}, theme.typography.caption, {
|
|
12673
|
+
}) => _extends$1({}, theme.typography.caption, {
|
|
12566
12674
|
width: DAY_SIZE,
|
|
12567
12675
|
height: DAY_SIZE,
|
|
12568
12676
|
padding: 0,
|
|
@@ -12611,7 +12719,7 @@ function WrappedDay(_ref) {
|
|
|
12611
12719
|
isDateDisabled,
|
|
12612
12720
|
currentMonthNumber,
|
|
12613
12721
|
isViewFocused
|
|
12614
|
-
} = _ref, other = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12722
|
+
} = _ref, other = _objectWithoutPropertiesLoose$1(_ref, _excluded$7);
|
|
12615
12723
|
const {
|
|
12616
12724
|
disabled,
|
|
12617
12725
|
disableHighlightToday,
|
|
@@ -12644,7 +12752,7 @@ function WrappedDay(_ref) {
|
|
|
12644
12752
|
const _useSlotProps = useSlotProps({
|
|
12645
12753
|
elementType: Day,
|
|
12646
12754
|
externalSlotProps: slotProps == null ? void 0 : slotProps.day,
|
|
12647
|
-
additionalProps: _extends({
|
|
12755
|
+
additionalProps: _extends$1({
|
|
12648
12756
|
disableHighlightToday,
|
|
12649
12757
|
showDaysOutsideCurrentMonth,
|
|
12650
12758
|
role: "gridcell",
|
|
@@ -12652,12 +12760,12 @@ function WrappedDay(_ref) {
|
|
|
12652
12760
|
// it is used in date range dragging logic by accessing `dataset.timestamp`
|
|
12653
12761
|
"data-timestamp": adapter.toJsDate(day).valueOf()
|
|
12654
12762
|
}, other),
|
|
12655
|
-
ownerState: _extends({}, ownerState, {
|
|
12763
|
+
ownerState: _extends$1({}, ownerState, {
|
|
12656
12764
|
day,
|
|
12657
12765
|
isDayDisabled: isDisabled,
|
|
12658
12766
|
isDaySelected: isSelected
|
|
12659
12767
|
})
|
|
12660
|
-
}), dayProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$1);
|
|
12768
|
+
}), dayProps = _objectWithoutPropertiesLoose$1(_useSlotProps, _excluded2$1);
|
|
12661
12769
|
const isFirstVisibleCell = React.useMemo(() => {
|
|
12662
12770
|
const startOfMonth = adapter.startOfMonth(adapter.setMonth(day, currentMonthNumber));
|
|
12663
12771
|
if (!showDaysOutsideCurrentMonth) {
|
|
@@ -12672,7 +12780,7 @@ function WrappedDay(_ref) {
|
|
|
12672
12780
|
}
|
|
12673
12781
|
return adapter.isSameDay(day, adapter.endOfWeek(endOfMonth));
|
|
12674
12782
|
}, [currentMonthNumber, day, showDaysOutsideCurrentMonth, adapter]);
|
|
12675
|
-
return /* @__PURE__ */ jsx$1(Day, _extends({}, dayProps, {
|
|
12783
|
+
return /* @__PURE__ */ jsx$1(Day, _extends$1({}, dayProps, {
|
|
12676
12784
|
day,
|
|
12677
12785
|
disabled: isDisabled,
|
|
12678
12786
|
autoFocus: !isOutsideCurrentMonth && isFocusedDay,
|
|
@@ -12725,7 +12833,7 @@ function DayCalendar(inProps) {
|
|
|
12725
12833
|
timezone
|
|
12726
12834
|
} = props;
|
|
12727
12835
|
const now = useNow(timezone);
|
|
12728
|
-
const classes = useUtilityClasses$
|
|
12836
|
+
const classes = useUtilityClasses$7(classesProp);
|
|
12729
12837
|
const isRtl = useRtl();
|
|
12730
12838
|
const isDateDisabled = useIsDateDisabled({
|
|
12731
12839
|
shouldDisableDate,
|
|
@@ -12857,7 +12965,7 @@ function DayCalendar(inProps) {
|
|
|
12857
12965
|
}), loading ? /* @__PURE__ */ jsx$1(PickersCalendarLoadingContainer, {
|
|
12858
12966
|
className: classes.loadingContainer,
|
|
12859
12967
|
children: renderLoading()
|
|
12860
|
-
}) : /* @__PURE__ */ jsx$1(PickersCalendarSlideTransition, _extends({
|
|
12968
|
+
}) : /* @__PURE__ */ jsx$1(PickersCalendarSlideTransition, _extends$1({
|
|
12861
12969
|
transKey: transitionKey,
|
|
12862
12970
|
onExited: onMonthSwitchingAnimationEnd,
|
|
12863
12971
|
reduceAnimations,
|
|
@@ -12901,8 +13009,8 @@ function getMonthCalendarUtilityClass(slot) {
|
|
|
12901
13009
|
return generateUtilityClass("MuiMonthCalendar", slot);
|
|
12902
13010
|
}
|
|
12903
13011
|
const monthCalendarClasses = generateUtilityClasses("MuiMonthCalendar", ["root", "button", "disabled", "selected"]);
|
|
12904
|
-
const _excluded$
|
|
12905
|
-
const useUtilityClasses$
|
|
13012
|
+
const _excluded$6 = ["autoFocus", "classes", "disabled", "selected", "value", "onClick", "onKeyDown", "onFocus", "onBlur", "slots", "slotProps"];
|
|
13013
|
+
const useUtilityClasses$6 = (classes, ownerState) => {
|
|
12906
13014
|
const slots = {
|
|
12907
13015
|
button: ["button", ownerState.isMonthDisabled && "disabled", ownerState.isMonthSelected && "selected"]
|
|
12908
13016
|
};
|
|
@@ -12918,7 +13026,7 @@ const DefaultMonthButton = styled("button", {
|
|
|
12918
13026
|
}]
|
|
12919
13027
|
})(({
|
|
12920
13028
|
theme
|
|
12921
|
-
}) => _extends({
|
|
13029
|
+
}) => _extends$1({
|
|
12922
13030
|
color: "unset",
|
|
12923
13031
|
backgroundColor: "transparent",
|
|
12924
13032
|
border: 0,
|
|
@@ -12962,16 +13070,16 @@ const MonthCalendarButton = /* @__PURE__ */ React.memo(function MonthCalendarBut
|
|
|
12962
13070
|
onBlur,
|
|
12963
13071
|
slots,
|
|
12964
13072
|
slotProps
|
|
12965
|
-
} = props, other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
13073
|
+
} = props, other = _objectWithoutPropertiesLoose$1(props, _excluded$6);
|
|
12966
13074
|
const ref = React.useRef(null);
|
|
12967
13075
|
const {
|
|
12968
13076
|
ownerState: pickerOwnerState
|
|
12969
13077
|
} = usePickerPrivateContext();
|
|
12970
|
-
const ownerState = _extends({}, pickerOwnerState, {
|
|
13078
|
+
const ownerState = _extends$1({}, pickerOwnerState, {
|
|
12971
13079
|
isMonthDisabled: disabled,
|
|
12972
13080
|
isMonthSelected: selected
|
|
12973
13081
|
});
|
|
12974
|
-
const classes = useUtilityClasses$
|
|
13082
|
+
const classes = useUtilityClasses$6(classesProp, ownerState);
|
|
12975
13083
|
useEnhancedEffect(() => {
|
|
12976
13084
|
var _a;
|
|
12977
13085
|
if (autoFocus) {
|
|
@@ -12997,11 +13105,11 @@ const MonthCalendarButton = /* @__PURE__ */ React.memo(function MonthCalendarBut
|
|
|
12997
13105
|
ownerState,
|
|
12998
13106
|
className: classes.button
|
|
12999
13107
|
});
|
|
13000
|
-
return /* @__PURE__ */ jsx$1(MonthButton, _extends({}, monthButtonProps));
|
|
13108
|
+
return /* @__PURE__ */ jsx$1(MonthButton, _extends$1({}, monthButtonProps));
|
|
13001
13109
|
});
|
|
13002
13110
|
if (process.env.NODE_ENV !== "production") MonthCalendarButton.displayName = "MonthCalendarButton";
|
|
13003
|
-
const _excluded$
|
|
13004
|
-
const useUtilityClasses$
|
|
13111
|
+
const _excluded$5 = ["autoFocus", "className", "currentMonth", "classes", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "shouldDisableMonth", "readOnly", "disableHighlightToday", "onMonthFocus", "hasFocus", "onFocusedViewChange", "monthsPerRow", "timezone", "gridLabelId", "slots", "slotProps"];
|
|
13112
|
+
const useUtilityClasses$5 = (classes) => {
|
|
13005
13113
|
const slots = {
|
|
13006
13114
|
root: ["root"]
|
|
13007
13115
|
};
|
|
@@ -13013,7 +13121,7 @@ function useMonthCalendarDefaultizedProps(props, name) {
|
|
|
13013
13121
|
name
|
|
13014
13122
|
});
|
|
13015
13123
|
const validationProps = useApplyDefaultValuesToDateValidationProps(themeProps);
|
|
13016
|
-
return _extends({}, themeProps, validationProps, {
|
|
13124
|
+
return _extends$1({}, themeProps, validationProps, {
|
|
13017
13125
|
monthsPerRow: themeProps.monthsPerRow ?? 3
|
|
13018
13126
|
});
|
|
13019
13127
|
}
|
|
@@ -13073,7 +13181,7 @@ const MonthCalendar = /* @__PURE__ */ React.forwardRef(function MonthCalendar2(i
|
|
|
13073
13181
|
gridLabelId,
|
|
13074
13182
|
slots,
|
|
13075
13183
|
slotProps
|
|
13076
|
-
} = props, other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
13184
|
+
} = props, other = _objectWithoutPropertiesLoose$1(props, _excluded$5);
|
|
13077
13185
|
const {
|
|
13078
13186
|
value,
|
|
13079
13187
|
handleValueChange,
|
|
@@ -13105,7 +13213,7 @@ const MonthCalendar = /* @__PURE__ */ React.forwardRef(function MonthCalendar2(i
|
|
|
13105
13213
|
[]
|
|
13106
13214
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
13107
13215
|
);
|
|
13108
|
-
const classes = useUtilityClasses$
|
|
13216
|
+
const classes = useUtilityClasses$5(classesProp);
|
|
13109
13217
|
const todayMonth = React.useMemo(() => adapter.getMonth(now), [adapter, now]);
|
|
13110
13218
|
const selectedMonth = React.useMemo(() => {
|
|
13111
13219
|
if (value != null) {
|
|
@@ -13191,7 +13299,7 @@ const MonthCalendar = /* @__PURE__ */ React.forwardRef(function MonthCalendar2(i
|
|
|
13191
13299
|
changeHasFocus(false);
|
|
13192
13300
|
}
|
|
13193
13301
|
});
|
|
13194
|
-
return /* @__PURE__ */ jsx$1(MonthCalendarRoot, _extends({
|
|
13302
|
+
return /* @__PURE__ */ jsx$1(MonthCalendarRoot, _extends$1({
|
|
13195
13303
|
ref,
|
|
13196
13304
|
className: clsx(classes.root, className),
|
|
13197
13305
|
ownerState,
|
|
@@ -13337,8 +13445,8 @@ function getYearCalendarUtilityClass(slot) {
|
|
|
13337
13445
|
return generateUtilityClass("MuiYearCalendar", slot);
|
|
13338
13446
|
}
|
|
13339
13447
|
const yearCalendarClasses = generateUtilityClasses("MuiYearCalendar", ["root", "button", "disabled", "selected"]);
|
|
13340
|
-
const _excluded$
|
|
13341
|
-
const useUtilityClasses$
|
|
13448
|
+
const _excluded$4 = ["autoFocus", "classes", "disabled", "selected", "value", "onClick", "onKeyDown", "onFocus", "onBlur", "slots", "slotProps"];
|
|
13449
|
+
const useUtilityClasses$4 = (classes, ownerState) => {
|
|
13342
13450
|
const slots = {
|
|
13343
13451
|
button: ["button", ownerState.isYearDisabled && "disabled", ownerState.isYearSelected && "selected"]
|
|
13344
13452
|
};
|
|
@@ -13354,7 +13462,7 @@ const DefaultYearButton = styled("button", {
|
|
|
13354
13462
|
}]
|
|
13355
13463
|
})(({
|
|
13356
13464
|
theme
|
|
13357
|
-
}) => _extends({
|
|
13465
|
+
}) => _extends$1({
|
|
13358
13466
|
color: "unset",
|
|
13359
13467
|
backgroundColor: "transparent",
|
|
13360
13468
|
border: 0,
|
|
@@ -13398,16 +13506,16 @@ const YearCalendarButton = /* @__PURE__ */ React.memo(function YearCalendarButto
|
|
|
13398
13506
|
onBlur,
|
|
13399
13507
|
slots,
|
|
13400
13508
|
slotProps
|
|
13401
|
-
} = props, other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
13509
|
+
} = props, other = _objectWithoutPropertiesLoose$1(props, _excluded$4);
|
|
13402
13510
|
const ref = React.useRef(null);
|
|
13403
13511
|
const {
|
|
13404
13512
|
ownerState: pickerOwnerState
|
|
13405
13513
|
} = usePickerPrivateContext();
|
|
13406
|
-
const ownerState = _extends({}, pickerOwnerState, {
|
|
13514
|
+
const ownerState = _extends$1({}, pickerOwnerState, {
|
|
13407
13515
|
isYearDisabled: disabled,
|
|
13408
13516
|
isYearSelected: selected
|
|
13409
13517
|
});
|
|
13410
|
-
const classes = useUtilityClasses$
|
|
13518
|
+
const classes = useUtilityClasses$4(classesProp, ownerState);
|
|
13411
13519
|
useEnhancedEffect(() => {
|
|
13412
13520
|
var _a;
|
|
13413
13521
|
if (autoFocus) {
|
|
@@ -13433,11 +13541,11 @@ const YearCalendarButton = /* @__PURE__ */ React.memo(function YearCalendarButto
|
|
|
13433
13541
|
ownerState,
|
|
13434
13542
|
className: classes.button
|
|
13435
13543
|
});
|
|
13436
|
-
return /* @__PURE__ */ jsx$1(YearButton, _extends({}, yearButtonProps));
|
|
13544
|
+
return /* @__PURE__ */ jsx$1(YearButton, _extends$1({}, yearButtonProps));
|
|
13437
13545
|
});
|
|
13438
13546
|
if (process.env.NODE_ENV !== "production") YearCalendarButton.displayName = "YearCalendarButton";
|
|
13439
|
-
const _excluded$
|
|
13440
|
-
const useUtilityClasses$
|
|
13547
|
+
const _excluded$3 = ["autoFocus", "className", "classes", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "readOnly", "shouldDisableYear", "disableHighlightToday", "onYearFocus", "hasFocus", "onFocusedViewChange", "yearsOrder", "yearsPerRow", "timezone", "gridLabelId", "slots", "slotProps"];
|
|
13548
|
+
const useUtilityClasses$3 = (classes) => {
|
|
13441
13549
|
const slots = {
|
|
13442
13550
|
root: ["root"]
|
|
13443
13551
|
};
|
|
@@ -13449,7 +13557,7 @@ function useYearCalendarDefaultizedProps(props, name) {
|
|
|
13449
13557
|
name
|
|
13450
13558
|
});
|
|
13451
13559
|
const validationProps = useApplyDefaultValuesToDateValidationProps(themeProps);
|
|
13452
|
-
return _extends({}, themeProps, validationProps, {
|
|
13560
|
+
return _extends$1({}, themeProps, validationProps, {
|
|
13453
13561
|
yearsPerRow: themeProps.yearsPerRow ?? 3,
|
|
13454
13562
|
yearsOrder: themeProps.yearsOrder ?? "asc"
|
|
13455
13563
|
});
|
|
@@ -13521,7 +13629,7 @@ const YearCalendar = /* @__PURE__ */ React.forwardRef(function YearCalendar2(inP
|
|
|
13521
13629
|
gridLabelId,
|
|
13522
13630
|
slots,
|
|
13523
13631
|
slotProps
|
|
13524
|
-
} = props, other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
13632
|
+
} = props, other = _objectWithoutPropertiesLoose$1(props, _excluded$3);
|
|
13525
13633
|
const {
|
|
13526
13634
|
value,
|
|
13527
13635
|
handleValueChange,
|
|
@@ -13553,7 +13661,7 @@ const YearCalendar = /* @__PURE__ */ React.forwardRef(function YearCalendar2(inP
|
|
|
13553
13661
|
[]
|
|
13554
13662
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
13555
13663
|
);
|
|
13556
|
-
const classes = useUtilityClasses$
|
|
13664
|
+
const classes = useUtilityClasses$3(classesProp);
|
|
13557
13665
|
const todayYear = React.useMemo(() => adapter.getYear(now), [adapter, now]);
|
|
13558
13666
|
const selectedYear = React.useMemo(() => {
|
|
13559
13667
|
if (value != null) {
|
|
@@ -13668,7 +13776,7 @@ const YearCalendar = /* @__PURE__ */ React.forwardRef(function YearCalendar2(inP
|
|
|
13668
13776
|
if (fillerAmount === yearsPerRow) {
|
|
13669
13777
|
fillerAmount = 0;
|
|
13670
13778
|
}
|
|
13671
|
-
return /* @__PURE__ */ jsxs(YearCalendarRoot, _extends({
|
|
13779
|
+
return /* @__PURE__ */ jsxs(YearCalendarRoot, _extends$1({
|
|
13672
13780
|
ref: handleRef,
|
|
13673
13781
|
className: clsx(classes.root, className),
|
|
13674
13782
|
ownerState,
|
|
@@ -13816,8 +13924,8 @@ process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
|
|
|
13816
13924
|
} : void 0;
|
|
13817
13925
|
const getPickersCalendarHeaderUtilityClass = (slot) => generateUtilityClass("MuiPickersCalendarHeader", slot);
|
|
13818
13926
|
const pickersCalendarHeaderClasses = generateUtilityClasses("MuiPickersCalendarHeader", ["root", "labelContainer", "label", "switchViewButton", "switchViewIcon"]);
|
|
13819
|
-
const _excluded$
|
|
13820
|
-
const useUtilityClasses$
|
|
13927
|
+
const _excluded$2 = ["slots", "slotProps", "currentMonth", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onMonthChange", "onViewChange", "view", "reduceAnimations", "views", "labelId", "className", "classes", "timezone", "format"], _excluded2 = ["ownerState"];
|
|
13928
|
+
const useUtilityClasses$2 = (classes) => {
|
|
13821
13929
|
const slots = {
|
|
13822
13930
|
root: ["root"],
|
|
13823
13931
|
labelContainer: ["labelContainer"],
|
|
@@ -13846,7 +13954,7 @@ const PickersCalendarHeaderLabelContainer = styled("div", {
|
|
|
13846
13954
|
slot: "LabelContainer"
|
|
13847
13955
|
})(({
|
|
13848
13956
|
theme
|
|
13849
|
-
}) => _extends({
|
|
13957
|
+
}) => _extends$1({
|
|
13850
13958
|
display: "flex",
|
|
13851
13959
|
overflow: "hidden",
|
|
13852
13960
|
alignItems: "center",
|
|
@@ -13913,11 +14021,11 @@ const PickersCalendarHeader = /* @__PURE__ */ React.forwardRef(function PickersC
|
|
|
13913
14021
|
classes: classesProp,
|
|
13914
14022
|
timezone,
|
|
13915
14023
|
format = `${adapter.formats.month} ${adapter.formats.year}`
|
|
13916
|
-
} = props, other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
14024
|
+
} = props, other = _objectWithoutPropertiesLoose$1(props, _excluded$2);
|
|
13917
14025
|
const {
|
|
13918
14026
|
ownerState
|
|
13919
14027
|
} = usePickerPrivateContext();
|
|
13920
|
-
const classes = useUtilityClasses$
|
|
14028
|
+
const classes = useUtilityClasses$2(classesProp);
|
|
13921
14029
|
const SwitchViewButton = (slots == null ? void 0 : slots.switchViewButton) ?? PickersCalendarHeaderSwitchViewButton;
|
|
13922
14030
|
const switchViewButtonProps = useSlotProps({
|
|
13923
14031
|
elementType: SwitchViewButton,
|
|
@@ -13926,7 +14034,7 @@ const PickersCalendarHeader = /* @__PURE__ */ React.forwardRef(function PickersC
|
|
|
13926
14034
|
size: "small",
|
|
13927
14035
|
"aria-label": translations.calendarViewSwitchingButtonAriaLabel(view)
|
|
13928
14036
|
},
|
|
13929
|
-
ownerState: _extends({}, ownerState, {
|
|
14037
|
+
ownerState: _extends$1({}, ownerState, {
|
|
13930
14038
|
view
|
|
13931
14039
|
}),
|
|
13932
14040
|
className: classes.switchViewButton
|
|
@@ -13937,7 +14045,7 @@ const PickersCalendarHeader = /* @__PURE__ */ React.forwardRef(function PickersC
|
|
|
13937
14045
|
externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon,
|
|
13938
14046
|
ownerState,
|
|
13939
14047
|
className: classes.switchViewIcon
|
|
13940
|
-
}), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
|
|
14048
|
+
}), switchViewIconProps = _objectWithoutPropertiesLoose$1(_useSlotProps, _excluded2);
|
|
13941
14049
|
const selectNextMonth = () => onMonthChange(adapter.addMonths(month, 1));
|
|
13942
14050
|
const selectPreviousMonth = () => onMonthChange(adapter.addMonths(month, -1));
|
|
13943
14051
|
const isNextMonthDisabled = useNextMonthDisabled(month, {
|
|
@@ -13965,7 +14073,7 @@ const PickersCalendarHeader = /* @__PURE__ */ React.forwardRef(function PickersC
|
|
|
13965
14073
|
return null;
|
|
13966
14074
|
}
|
|
13967
14075
|
const label = adapter.formatByString(month, format);
|
|
13968
|
-
return /* @__PURE__ */ jsxs(PickersCalendarHeaderRoot, _extends({}, other, {
|
|
14076
|
+
return /* @__PURE__ */ jsxs(PickersCalendarHeaderRoot, _extends$1({}, other, {
|
|
13969
14077
|
ownerState,
|
|
13970
14078
|
className: clsx(classes.root, className),
|
|
13971
14079
|
ref,
|
|
@@ -13984,8 +14092,8 @@ const PickersCalendarHeader = /* @__PURE__ */ React.forwardRef(function PickersC
|
|
|
13984
14092
|
className: classes.label,
|
|
13985
14093
|
children: label
|
|
13986
14094
|
})
|
|
13987
|
-
}), views.length > 1 && !disabled && /* @__PURE__ */ jsx$1(SwitchViewButton, _extends({}, switchViewButtonProps, {
|
|
13988
|
-
children: /* @__PURE__ */ jsx$1(SwitchViewIcon, _extends({}, switchViewIconProps))
|
|
14095
|
+
}), views.length > 1 && !disabled && /* @__PURE__ */ jsx$1(SwitchViewButton, _extends$1({}, switchViewButtonProps, {
|
|
14096
|
+
children: /* @__PURE__ */ jsx$1(SwitchViewIcon, _extends$1({}, switchViewIconProps))
|
|
13989
14097
|
}))]
|
|
13990
14098
|
}), /* @__PURE__ */ jsx$1(Fade, {
|
|
13991
14099
|
in: view === "day",
|
|
@@ -14071,8 +14179,8 @@ function useReduceAnimations(customReduceAnimations) {
|
|
|
14071
14179
|
}
|
|
14072
14180
|
const getDateCalendarUtilityClass = (slot) => generateUtilityClass("MuiDateCalendar", slot);
|
|
14073
14181
|
generateUtilityClasses("MuiDateCalendar", ["root", "viewTransitionContainer"]);
|
|
14074
|
-
const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "classes", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsOrder", "yearsPerRow", "monthsPerRow", "timezone"];
|
|
14075
|
-
const useUtilityClasses = (classes) => {
|
|
14182
|
+
const _excluded$1 = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "classes", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsOrder", "yearsPerRow", "monthsPerRow", "timezone"];
|
|
14183
|
+
const useUtilityClasses$1 = (classes) => {
|
|
14076
14184
|
const slots = {
|
|
14077
14185
|
root: ["root"],
|
|
14078
14186
|
viewTransitionContainer: ["viewTransitionContainer"]
|
|
@@ -14086,7 +14194,7 @@ function useDateCalendarDefaultizedProps(props, name) {
|
|
|
14086
14194
|
});
|
|
14087
14195
|
const reduceAnimations = useReduceAnimations(themeProps.reduceAnimations);
|
|
14088
14196
|
const validationProps = useApplyDefaultValuesToDateValidationProps(themeProps);
|
|
14089
|
-
return _extends({}, themeProps, validationProps, {
|
|
14197
|
+
return _extends$1({}, themeProps, validationProps, {
|
|
14090
14198
|
loading: themeProps.loading ?? false,
|
|
14091
14199
|
openTo: themeProps.openTo ?? "day",
|
|
14092
14200
|
views: themeProps.views ?? ["year", "day"],
|
|
@@ -14153,7 +14261,7 @@ const DateCalendar = /* @__PURE__ */ React.forwardRef(function DateCalendar2(inP
|
|
|
14153
14261
|
yearsPerRow,
|
|
14154
14262
|
monthsPerRow,
|
|
14155
14263
|
timezone: timezoneProp
|
|
14156
|
-
} = props, other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
14264
|
+
} = props, other = _objectWithoutPropertiesLoose$1(props, _excluded$1);
|
|
14157
14265
|
const {
|
|
14158
14266
|
value,
|
|
14159
14267
|
handleValueChange,
|
|
@@ -14304,7 +14412,7 @@ const DateCalendar = /* @__PURE__ */ React.forwardRef(function DateCalendar2(inP
|
|
|
14304
14412
|
});
|
|
14305
14413
|
}
|
|
14306
14414
|
}, [value]);
|
|
14307
|
-
const classes = useUtilityClasses(classesProp);
|
|
14415
|
+
const classes = useUtilityClasses$1(classesProp);
|
|
14308
14416
|
const baseDateValidationProps = {
|
|
14309
14417
|
disablePast,
|
|
14310
14418
|
disableFuture,
|
|
@@ -14331,12 +14439,12 @@ const DateCalendar = /* @__PURE__ */ React.forwardRef(function DateCalendar2(inP
|
|
|
14331
14439
|
prevOpenViewRef.current = view;
|
|
14332
14440
|
}, [focusedView, setFocusedView, view]);
|
|
14333
14441
|
const selectedDays = React.useMemo(() => [value], [value]);
|
|
14334
|
-
return /* @__PURE__ */ jsxs(DateCalendarRoot, _extends({
|
|
14442
|
+
return /* @__PURE__ */ jsxs(DateCalendarRoot, _extends$1({
|
|
14335
14443
|
ref,
|
|
14336
14444
|
className: clsx(classes.root, className),
|
|
14337
14445
|
ownerState
|
|
14338
14446
|
}, other, {
|
|
14339
|
-
children: [/* @__PURE__ */ jsx$1(CalendarHeader, _extends({}, calendarHeaderProps, {
|
|
14447
|
+
children: [/* @__PURE__ */ jsx$1(CalendarHeader, _extends$1({}, calendarHeaderProps, {
|
|
14340
14448
|
slots,
|
|
14341
14449
|
slotProps
|
|
14342
14450
|
})), /* @__PURE__ */ jsx$1(DateCalendarViewTransitionContainer, {
|
|
@@ -14345,7 +14453,7 @@ const DateCalendar = /* @__PURE__ */ React.forwardRef(function DateCalendar2(inP
|
|
|
14345
14453
|
transKey: view,
|
|
14346
14454
|
ownerState,
|
|
14347
14455
|
children: /* @__PURE__ */ jsxs("div", {
|
|
14348
|
-
children: [view === "year" && /* @__PURE__ */ jsx$1(YearCalendar, _extends({}, baseDateValidationProps, commonViewProps, {
|
|
14456
|
+
children: [view === "year" && /* @__PURE__ */ jsx$1(YearCalendar, _extends$1({}, baseDateValidationProps, commonViewProps, {
|
|
14349
14457
|
value,
|
|
14350
14458
|
onChange: handleDateYearChange,
|
|
14351
14459
|
shouldDisableYear,
|
|
@@ -14354,7 +14462,7 @@ const DateCalendar = /* @__PURE__ */ React.forwardRef(function DateCalendar2(inP
|
|
|
14354
14462
|
yearsOrder,
|
|
14355
14463
|
yearsPerRow,
|
|
14356
14464
|
referenceDate
|
|
14357
|
-
})), view === "month" && /* @__PURE__ */ jsx$1(MonthCalendar, _extends({}, baseDateValidationProps, commonViewProps, {
|
|
14465
|
+
})), view === "month" && /* @__PURE__ */ jsx$1(MonthCalendar, _extends$1({}, baseDateValidationProps, commonViewProps, {
|
|
14358
14466
|
currentMonth: calendarState.currentMonth,
|
|
14359
14467
|
hasFocus,
|
|
14360
14468
|
className,
|
|
@@ -14364,7 +14472,7 @@ const DateCalendar = /* @__PURE__ */ React.forwardRef(function DateCalendar2(inP
|
|
|
14364
14472
|
onFocusedViewChange: (isViewFocused) => setFocusedView("month", isViewFocused),
|
|
14365
14473
|
monthsPerRow,
|
|
14366
14474
|
referenceDate
|
|
14367
|
-
})), view === "day" && /* @__PURE__ */ jsx$1(DayCalendar, _extends({}, calendarState, baseDateValidationProps, commonViewProps, {
|
|
14475
|
+
})), view === "day" && /* @__PURE__ */ jsx$1(DayCalendar, _extends$1({}, calendarState, baseDateValidationProps, commonViewProps, {
|
|
14368
14476
|
onMonthSwitchingAnimationEnd,
|
|
14369
14477
|
hasFocus,
|
|
14370
14478
|
onFocusedDayChange: (focusedDate) => setVisibleDate({
|
|
@@ -14615,6 +14723,21 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
|
|
|
14615
14723
|
*/
|
|
14616
14724
|
yearsPerRow: PropTypes.oneOf([3, 4])
|
|
14617
14725
|
} : void 0;
|
|
14726
|
+
const warnedOnceCache = /* @__PURE__ */ new Set();
|
|
14727
|
+
function warnOnce(message, gravity = "warning") {
|
|
14728
|
+
if (process.env.NODE_ENV === "production") {
|
|
14729
|
+
return;
|
|
14730
|
+
}
|
|
14731
|
+
const cleanMessage = Array.isArray(message) ? message.join("\n") : message;
|
|
14732
|
+
if (!warnedOnceCache.has(cleanMessage)) {
|
|
14733
|
+
warnedOnceCache.add(cleanMessage);
|
|
14734
|
+
if (gravity === "error") {
|
|
14735
|
+
console.error(cleanMessage);
|
|
14736
|
+
} else {
|
|
14737
|
+
console.warn(cleanMessage);
|
|
14738
|
+
}
|
|
14739
|
+
}
|
|
14740
|
+
}
|
|
14618
14741
|
var dayjs_min = { exports: {} };
|
|
14619
14742
|
(function(module, exports) {
|
|
14620
14743
|
!function(t, e) {
|
|
@@ -14893,124 +15016,1019 @@ var dayjs_min = { exports: {} };
|
|
|
14893
15016
|
})(dayjs_min);
|
|
14894
15017
|
var dayjs_minExports = dayjs_min.exports;
|
|
14895
15018
|
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14905
|
-
|
|
14906
|
-
|
|
15019
|
+
var weekOfYear = { exports: {} };
|
|
15020
|
+
(function(module, exports) {
|
|
15021
|
+
!function(e, t) {
|
|
15022
|
+
module.exports = t();
|
|
15023
|
+
}(commonjsGlobal, function() {
|
|
15024
|
+
var e = "week", t = "year";
|
|
15025
|
+
return function(i, n, r2) {
|
|
15026
|
+
var f = n.prototype;
|
|
15027
|
+
f.week = function(i2) {
|
|
15028
|
+
if (void 0 === i2 && (i2 = null), null !== i2) return this.add(7 * (i2 - this.week()), "day");
|
|
15029
|
+
var n2 = this.$locale().yearStart || 1;
|
|
15030
|
+
if (11 === this.month() && this.date() > 25) {
|
|
15031
|
+
var f2 = r2(this).startOf(t).add(1, t).date(n2), s = r2(this).endOf(e);
|
|
15032
|
+
if (f2.isBefore(s)) return 1;
|
|
15033
|
+
}
|
|
15034
|
+
var a = r2(this).startOf(t).date(n2).startOf(e).subtract(1, "millisecond"), o = this.diff(a, e, true);
|
|
15035
|
+
return o < 0 ? r2(this).startOf("week").week() : Math.ceil(o);
|
|
15036
|
+
}, f.weeks = function(e2) {
|
|
15037
|
+
return void 0 === e2 && (e2 = null), this.week(e2);
|
|
15038
|
+
};
|
|
15039
|
+
};
|
|
15040
|
+
});
|
|
15041
|
+
})(weekOfYear);
|
|
15042
|
+
var weekOfYearExports = weekOfYear.exports;
|
|
15043
|
+
const weekOfYearPlugin = /* @__PURE__ */ getDefaultExportFromCjs(weekOfYearExports);
|
|
15044
|
+
var customParseFormat = { exports: {} };
|
|
15045
|
+
(function(module, exports) {
|
|
15046
|
+
!function(e, t) {
|
|
15047
|
+
module.exports = t();
|
|
15048
|
+
}(commonjsGlobal, function() {
|
|
15049
|
+
var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r2 = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) {
|
|
15050
|
+
return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
|
|
15051
|
+
};
|
|
15052
|
+
var f = function(e2) {
|
|
15053
|
+
return function(t2) {
|
|
15054
|
+
this[e2] = +t2;
|
|
15055
|
+
};
|
|
15056
|
+
}, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
|
|
15057
|
+
(this.zone || (this.zone = {})).offset = function(e3) {
|
|
15058
|
+
if (!e3) return 0;
|
|
15059
|
+
if ("Z" === e3) return 0;
|
|
15060
|
+
var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
|
|
15061
|
+
return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
|
|
15062
|
+
}(e2);
|
|
15063
|
+
}], u = function(e2) {
|
|
15064
|
+
var t2 = s[e2];
|
|
15065
|
+
return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
|
|
15066
|
+
}, d = function(e2, t2) {
|
|
15067
|
+
var n2, r3 = s.meridiem;
|
|
15068
|
+
if (r3) {
|
|
15069
|
+
for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r3(i2, 0, t2)) > -1) {
|
|
15070
|
+
n2 = i2 > 12;
|
|
15071
|
+
break;
|
|
15072
|
+
}
|
|
15073
|
+
} else n2 = e2 === (t2 ? "pm" : "PM");
|
|
15074
|
+
return n2;
|
|
15075
|
+
}, c = { A: [o, function(e2) {
|
|
15076
|
+
this.afternoon = d(e2, false);
|
|
15077
|
+
}], a: [o, function(e2) {
|
|
15078
|
+
this.afternoon = d(e2, true);
|
|
15079
|
+
}], Q: [n, function(e2) {
|
|
15080
|
+
this.month = 3 * (e2 - 1) + 1;
|
|
15081
|
+
}], S: [n, function(e2) {
|
|
15082
|
+
this.milliseconds = 100 * +e2;
|
|
15083
|
+
}], SS: [r2, function(e2) {
|
|
15084
|
+
this.milliseconds = 10 * +e2;
|
|
15085
|
+
}], SSS: [/\d{3}/, function(e2) {
|
|
15086
|
+
this.milliseconds = +e2;
|
|
15087
|
+
}], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r2, f("day")], Do: [o, function(e2) {
|
|
15088
|
+
var t2 = s.ordinal, n2 = e2.match(/\d+/);
|
|
15089
|
+
if (this.day = n2[0], t2) for (var r3 = 1; r3 <= 31; r3 += 1) t2(r3).replace(/\[|\]/g, "") === e2 && (this.day = r3);
|
|
15090
|
+
}], w: [i, f("week")], ww: [r2, f("week")], M: [i, f("month")], MM: [r2, f("month")], MMM: [o, function(e2) {
|
|
15091
|
+
var t2 = u("months"), n2 = (u("monthsShort") || t2.map(function(e3) {
|
|
15092
|
+
return e3.slice(0, 3);
|
|
15093
|
+
})).indexOf(e2) + 1;
|
|
15094
|
+
if (n2 < 1) throw new Error();
|
|
15095
|
+
this.month = n2 % 12 || n2;
|
|
15096
|
+
}], MMMM: [o, function(e2) {
|
|
15097
|
+
var t2 = u("months").indexOf(e2) + 1;
|
|
15098
|
+
if (t2 < 1) throw new Error();
|
|
15099
|
+
this.month = t2 % 12 || t2;
|
|
15100
|
+
}], Y: [/[+-]?\d+/, f("year")], YY: [r2, function(e2) {
|
|
15101
|
+
this.year = a(e2);
|
|
15102
|
+
}], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
|
|
15103
|
+
function l(n2) {
|
|
15104
|
+
var r3, i2;
|
|
15105
|
+
r3 = n2, i2 = s && s.formats;
|
|
15106
|
+
for (var o2 = (n2 = r3.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r4) {
|
|
15107
|
+
var o3 = r4 && r4.toUpperCase();
|
|
15108
|
+
return n3 || i2[r4] || e[r4] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t3, n4) {
|
|
15109
|
+
return t3 || n4.slice(1);
|
|
15110
|
+
});
|
|
15111
|
+
})).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
|
|
15112
|
+
var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
|
|
15113
|
+
o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
|
|
15114
|
+
}
|
|
15115
|
+
return function(e2) {
|
|
15116
|
+
for (var t2 = {}, n3 = 0, r4 = 0; n3 < a2; n3 += 1) {
|
|
15117
|
+
var i3 = o2[n3];
|
|
15118
|
+
if ("string" == typeof i3) r4 += i3.length;
|
|
15119
|
+
else {
|
|
15120
|
+
var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r4), u3 = s2.exec(h3)[0];
|
|
15121
|
+
f3.call(t2, u3), e2 = e2.replace(u3, "");
|
|
15122
|
+
}
|
|
15123
|
+
}
|
|
15124
|
+
return function(e3) {
|
|
15125
|
+
var t3 = e3.afternoon;
|
|
15126
|
+
if (void 0 !== t3) {
|
|
15127
|
+
var n4 = e3.hours;
|
|
15128
|
+
t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
|
|
15129
|
+
}
|
|
15130
|
+
}(t2), t2;
|
|
15131
|
+
};
|
|
14907
15132
|
}
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
15133
|
+
return function(e2, t2, n2) {
|
|
15134
|
+
n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
|
|
15135
|
+
var r3 = t2.prototype, i2 = r3.parse;
|
|
15136
|
+
r3.parse = function(e3) {
|
|
15137
|
+
var t3 = e3.date, r4 = e3.utc, o2 = e3.args;
|
|
15138
|
+
this.$u = r4;
|
|
15139
|
+
var a2 = o2[1];
|
|
15140
|
+
if ("string" == typeof a2) {
|
|
15141
|
+
var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2];
|
|
15142
|
+
h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = function(e4, t4, n3, r5) {
|
|
15143
|
+
try {
|
|
15144
|
+
if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4);
|
|
15145
|
+
var i3 = l(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
|
|
15146
|
+
o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
|
|
15147
|
+
var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
|
|
15148
|
+
return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r5(D).week(m2).toDate()), D);
|
|
15149
|
+
} catch (e5) {
|
|
15150
|
+
return /* @__PURE__ */ new Date("");
|
|
15151
|
+
}
|
|
15152
|
+
}(t3, a2, r4, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
|
|
15153
|
+
} else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
|
|
15154
|
+
o2[1] = a2[m - 1];
|
|
15155
|
+
var M = n2.apply(this, o2);
|
|
15156
|
+
if (M.isValid()) {
|
|
15157
|
+
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
15158
|
+
break;
|
|
15159
|
+
}
|
|
15160
|
+
m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
|
|
15161
|
+
}
|
|
15162
|
+
else i2.call(this, e3);
|
|
15163
|
+
};
|
|
15164
|
+
};
|
|
15165
|
+
});
|
|
15166
|
+
})(customParseFormat);
|
|
15167
|
+
var customParseFormatExports = customParseFormat.exports;
|
|
15168
|
+
const customParseFormatPlugin = /* @__PURE__ */ getDefaultExportFromCjs(customParseFormatExports);
|
|
15169
|
+
var localizedFormat = { exports: {} };
|
|
15170
|
+
(function(module, exports) {
|
|
15171
|
+
!function(e, t) {
|
|
15172
|
+
module.exports = t();
|
|
15173
|
+
}(commonjsGlobal, function() {
|
|
15174
|
+
var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
|
|
15175
|
+
return function(t, o, n) {
|
|
15176
|
+
var r2 = o.prototype, i = r2.format;
|
|
15177
|
+
n.en.formats = e, r2.format = function(t2) {
|
|
15178
|
+
void 0 === t2 && (t2 = "YYYY-MM-DDTHH:mm:ssZ");
|
|
15179
|
+
var o2 = this.$locale().formats, n2 = function(t3, o3) {
|
|
15180
|
+
return t3.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t4, n3, r3) {
|
|
15181
|
+
var i2 = r3 && r3.toUpperCase();
|
|
15182
|
+
return n3 || o3[r3] || e[r3] || o3[i2].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t5, o4) {
|
|
15183
|
+
return t5 || o4.slice(1);
|
|
15184
|
+
});
|
|
15185
|
+
});
|
|
15186
|
+
}(t2, void 0 === o2 ? {} : o2);
|
|
15187
|
+
return i.call(this, n2);
|
|
15188
|
+
};
|
|
15189
|
+
};
|
|
15190
|
+
});
|
|
15191
|
+
})(localizedFormat);
|
|
15192
|
+
var localizedFormatExports = localizedFormat.exports;
|
|
15193
|
+
const localizedFormatPlugin = /* @__PURE__ */ getDefaultExportFromCjs(localizedFormatExports);
|
|
15194
|
+
var isBetween = { exports: {} };
|
|
15195
|
+
(function(module, exports) {
|
|
15196
|
+
!function(e, i) {
|
|
15197
|
+
module.exports = i();
|
|
15198
|
+
}(commonjsGlobal, function() {
|
|
15199
|
+
return function(e, i, t) {
|
|
15200
|
+
i.prototype.isBetween = function(e2, i2, s, f) {
|
|
15201
|
+
var n = t(e2), o = t(i2), r2 = "(" === (f = f || "()")[0], u = ")" === f[1];
|
|
15202
|
+
return (r2 ? this.isAfter(n, s) : !this.isBefore(n, s)) && (u ? this.isBefore(o, s) : !this.isAfter(o, s)) || (r2 ? this.isBefore(n, s) : !this.isAfter(n, s)) && (u ? this.isAfter(o, s) : !this.isBefore(o, s));
|
|
15203
|
+
};
|
|
15204
|
+
};
|
|
15205
|
+
});
|
|
15206
|
+
})(isBetween);
|
|
15207
|
+
var isBetweenExports = isBetween.exports;
|
|
15208
|
+
const isBetweenPlugin = /* @__PURE__ */ getDefaultExportFromCjs(isBetweenExports);
|
|
15209
|
+
var advancedFormat = { exports: {} };
|
|
15210
|
+
(function(module, exports) {
|
|
15211
|
+
!function(e, t) {
|
|
15212
|
+
module.exports = t();
|
|
15213
|
+
}(commonjsGlobal, function() {
|
|
15214
|
+
return function(e, t) {
|
|
15215
|
+
var r2 = t.prototype, n = r2.format;
|
|
15216
|
+
r2.format = function(e2) {
|
|
15217
|
+
var t2 = this, r3 = this.$locale();
|
|
15218
|
+
if (!this.isValid()) return n.bind(this)(e2);
|
|
15219
|
+
var s = this.$utils(), a = (e2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(e3) {
|
|
15220
|
+
switch (e3) {
|
|
15221
|
+
case "Q":
|
|
15222
|
+
return Math.ceil((t2.$M + 1) / 3);
|
|
15223
|
+
case "Do":
|
|
15224
|
+
return r3.ordinal(t2.$D);
|
|
15225
|
+
case "gggg":
|
|
15226
|
+
return t2.weekYear();
|
|
15227
|
+
case "GGGG":
|
|
15228
|
+
return t2.isoWeekYear();
|
|
15229
|
+
case "wo":
|
|
15230
|
+
return r3.ordinal(t2.week(), "W");
|
|
15231
|
+
case "w":
|
|
15232
|
+
case "ww":
|
|
15233
|
+
return s.s(t2.week(), "w" === e3 ? 1 : 2, "0");
|
|
15234
|
+
case "W":
|
|
15235
|
+
case "WW":
|
|
15236
|
+
return s.s(t2.isoWeek(), "W" === e3 ? 1 : 2, "0");
|
|
15237
|
+
case "k":
|
|
15238
|
+
case "kk":
|
|
15239
|
+
return s.s(String(0 === t2.$H ? 24 : t2.$H), "k" === e3 ? 1 : 2, "0");
|
|
15240
|
+
case "X":
|
|
15241
|
+
return Math.floor(t2.$d.getTime() / 1e3);
|
|
15242
|
+
case "x":
|
|
15243
|
+
return t2.$d.getTime();
|
|
15244
|
+
case "z":
|
|
15245
|
+
return "[" + t2.offsetName() + "]";
|
|
15246
|
+
case "zzz":
|
|
15247
|
+
return "[" + t2.offsetName("long") + "]";
|
|
15248
|
+
default:
|
|
15249
|
+
return e3;
|
|
15250
|
+
}
|
|
15251
|
+
});
|
|
15252
|
+
return n.bind(this)(a);
|
|
15253
|
+
};
|
|
15254
|
+
};
|
|
15255
|
+
});
|
|
15256
|
+
})(advancedFormat);
|
|
15257
|
+
var advancedFormatExports = advancedFormat.exports;
|
|
15258
|
+
const advancedFormatPlugin = /* @__PURE__ */ getDefaultExportFromCjs(advancedFormatExports);
|
|
15259
|
+
dayjs.extend(localizedFormatPlugin);
|
|
15260
|
+
dayjs.extend(weekOfYearPlugin);
|
|
15261
|
+
dayjs.extend(isBetweenPlugin);
|
|
15262
|
+
dayjs.extend(advancedFormatPlugin);
|
|
15263
|
+
const formatTokenMap = {
|
|
15264
|
+
// Year
|
|
15265
|
+
YY: "year",
|
|
15266
|
+
YYYY: {
|
|
15267
|
+
sectionType: "year",
|
|
15268
|
+
contentType: "digit",
|
|
15269
|
+
maxLength: 4
|
|
15270
|
+
},
|
|
15271
|
+
// Month
|
|
15272
|
+
M: {
|
|
15273
|
+
sectionType: "month",
|
|
15274
|
+
contentType: "digit",
|
|
15275
|
+
maxLength: 2
|
|
15276
|
+
},
|
|
15277
|
+
MM: "month",
|
|
15278
|
+
MMM: {
|
|
15279
|
+
sectionType: "month",
|
|
15280
|
+
contentType: "letter"
|
|
15281
|
+
},
|
|
15282
|
+
MMMM: {
|
|
15283
|
+
sectionType: "month",
|
|
15284
|
+
contentType: "letter"
|
|
15285
|
+
},
|
|
15286
|
+
// Day of the month
|
|
15287
|
+
D: {
|
|
15288
|
+
sectionType: "day",
|
|
15289
|
+
contentType: "digit",
|
|
15290
|
+
maxLength: 2
|
|
15291
|
+
},
|
|
15292
|
+
DD: "day",
|
|
15293
|
+
Do: {
|
|
15294
|
+
sectionType: "day",
|
|
15295
|
+
contentType: "digit-with-letter"
|
|
15296
|
+
},
|
|
15297
|
+
// Day of the week
|
|
15298
|
+
d: {
|
|
15299
|
+
sectionType: "weekDay",
|
|
15300
|
+
contentType: "digit",
|
|
15301
|
+
maxLength: 2
|
|
15302
|
+
},
|
|
15303
|
+
dd: {
|
|
15304
|
+
sectionType: "weekDay",
|
|
15305
|
+
contentType: "letter"
|
|
15306
|
+
},
|
|
15307
|
+
ddd: {
|
|
15308
|
+
sectionType: "weekDay",
|
|
15309
|
+
contentType: "letter"
|
|
15310
|
+
},
|
|
15311
|
+
dddd: {
|
|
15312
|
+
sectionType: "weekDay",
|
|
15313
|
+
contentType: "letter"
|
|
15314
|
+
},
|
|
15315
|
+
// Meridiem
|
|
15316
|
+
A: "meridiem",
|
|
15317
|
+
a: "meridiem",
|
|
15318
|
+
// Hours
|
|
15319
|
+
H: {
|
|
15320
|
+
sectionType: "hours",
|
|
15321
|
+
contentType: "digit",
|
|
15322
|
+
maxLength: 2
|
|
15323
|
+
},
|
|
15324
|
+
HH: "hours",
|
|
15325
|
+
h: {
|
|
15326
|
+
sectionType: "hours",
|
|
15327
|
+
contentType: "digit",
|
|
15328
|
+
maxLength: 2
|
|
15329
|
+
},
|
|
15330
|
+
hh: "hours",
|
|
15331
|
+
// Minutes
|
|
15332
|
+
m: {
|
|
15333
|
+
sectionType: "minutes",
|
|
15334
|
+
contentType: "digit",
|
|
15335
|
+
maxLength: 2
|
|
15336
|
+
},
|
|
15337
|
+
mm: "minutes",
|
|
15338
|
+
// Seconds
|
|
15339
|
+
s: {
|
|
15340
|
+
sectionType: "seconds",
|
|
15341
|
+
contentType: "digit",
|
|
15342
|
+
maxLength: 2
|
|
15343
|
+
},
|
|
15344
|
+
ss: "seconds"
|
|
15345
|
+
};
|
|
15346
|
+
const defaultFormats = {
|
|
15347
|
+
year: "YYYY",
|
|
15348
|
+
month: "MMMM",
|
|
15349
|
+
monthShort: "MMM",
|
|
15350
|
+
dayOfMonth: "D",
|
|
15351
|
+
dayOfMonthFull: "Do",
|
|
15352
|
+
weekday: "dddd",
|
|
15353
|
+
weekdayShort: "dd",
|
|
15354
|
+
hours24h: "HH",
|
|
15355
|
+
hours12h: "hh",
|
|
15356
|
+
meridiem: "A",
|
|
15357
|
+
minutes: "mm",
|
|
15358
|
+
seconds: "ss",
|
|
15359
|
+
fullDate: "ll",
|
|
15360
|
+
keyboardDate: "L",
|
|
15361
|
+
shortDate: "MMM D",
|
|
15362
|
+
normalDate: "D MMMM",
|
|
15363
|
+
normalDateWithWeekday: "ddd, MMM D",
|
|
15364
|
+
fullTime12h: "hh:mm A",
|
|
15365
|
+
fullTime24h: "HH:mm",
|
|
15366
|
+
keyboardDateTime12h: "L hh:mm A",
|
|
15367
|
+
keyboardDateTime24h: "L HH:mm"
|
|
15368
|
+
};
|
|
15369
|
+
const MISSING_UTC_PLUGIN = ["Missing UTC plugin", "To be able to use UTC or timezones, you have to enable the `utc` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n");
|
|
15370
|
+
const MISSING_TIMEZONE_PLUGIN = ["Missing timezone plugin", "To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");
|
|
15371
|
+
class AdapterDayjs {
|
|
15372
|
+
constructor({
|
|
15373
|
+
locale,
|
|
15374
|
+
formats
|
|
15375
|
+
} = {}) {
|
|
15376
|
+
__publicField(this, "isMUIAdapter", true);
|
|
15377
|
+
__publicField(this, "isTimezoneCompatible", true);
|
|
15378
|
+
__publicField(this, "lib", "dayjs");
|
|
15379
|
+
__publicField(this, "escapedCharacters", {
|
|
15380
|
+
start: "[",
|
|
15381
|
+
end: "]"
|
|
14913
15382
|
});
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
const
|
|
14917
|
-
if (
|
|
14918
|
-
|
|
15383
|
+
__publicField(this, "formatTokenMap", /* @__PURE__ */ (() => formatTokenMap)());
|
|
15384
|
+
__publicField(this, "setLocaleToValue", (value) => {
|
|
15385
|
+
const expectedLocale = this.getCurrentLocaleCode();
|
|
15386
|
+
if (expectedLocale === value.locale()) {
|
|
15387
|
+
return value;
|
|
14919
15388
|
}
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
onClick(ev);
|
|
14942
|
-
}
|
|
14943
|
-
};
|
|
14944
|
-
return /* @__PURE__ */ jsx$1("button", { className, onClick: buttonClick, children: /* @__PURE__ */ jsxs(Card, { noBlur: true, noPadding: true, className: cardClassNames, ...cardProps, children: [
|
|
14945
|
-
position2 === "left" && icon,
|
|
14946
|
-
label,
|
|
14947
|
-
children,
|
|
14948
|
-
position2 === "right" && icon
|
|
14949
|
-
] }) });
|
|
14950
|
-
}
|
|
14951
|
-
function CustomDay(props) {
|
|
14952
|
-
const { highlightedDays = [], day, outsideCurrentMonth, ...other } = props;
|
|
14953
|
-
const isSelected = highlightedDays.some((date) => day.isSame(date, "day"));
|
|
14954
|
-
return /* @__PURE__ */ jsx$1(
|
|
14955
|
-
PickersDay2,
|
|
14956
|
-
{
|
|
14957
|
-
...other,
|
|
14958
|
-
day,
|
|
14959
|
-
selected: isSelected,
|
|
14960
|
-
outsideCurrentMonth,
|
|
14961
|
-
sx: {
|
|
14962
|
-
...isSelected && {
|
|
14963
|
-
backgroundColor: "white !important",
|
|
14964
|
-
// Make selected day white
|
|
14965
|
-
color: "black !important"
|
|
14966
|
-
// Text color to black for contrast
|
|
15389
|
+
return value.locale(expectedLocale);
|
|
15390
|
+
});
|
|
15391
|
+
__publicField(this, "hasUTCPlugin", () => typeof dayjs.utc !== "undefined");
|
|
15392
|
+
__publicField(this, "hasTimezonePlugin", () => typeof dayjs.tz !== "undefined");
|
|
15393
|
+
__publicField(this, "isSame", (value, comparing, comparisonTemplate) => {
|
|
15394
|
+
const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));
|
|
15395
|
+
return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);
|
|
15396
|
+
});
|
|
15397
|
+
/**
|
|
15398
|
+
* Replaces "default" by undefined and "system" by the system timezone before passing it to `dayjs`.
|
|
15399
|
+
*/
|
|
15400
|
+
__publicField(this, "cleanTimezone", (timezone) => {
|
|
15401
|
+
switch (timezone) {
|
|
15402
|
+
case "default": {
|
|
15403
|
+
return void 0;
|
|
15404
|
+
}
|
|
15405
|
+
case "system": {
|
|
15406
|
+
return dayjs.tz.guess();
|
|
15407
|
+
}
|
|
15408
|
+
default: {
|
|
15409
|
+
return timezone;
|
|
14967
15410
|
}
|
|
14968
15411
|
}
|
|
14969
|
-
}
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
onChange,
|
|
14982
|
-
defaultValue,
|
|
14983
|
-
...cardProps
|
|
14984
|
-
}) {
|
|
14985
|
-
const theme = createTheme({
|
|
14986
|
-
palette: {
|
|
14987
|
-
mode: "dark"
|
|
14988
|
-
}
|
|
14989
|
-
});
|
|
14990
|
-
const convertSelectedDates = (dates) => {
|
|
14991
|
-
if (!dates) return [];
|
|
14992
|
-
return dates.map((date) => {
|
|
14993
|
-
if (typeof date === "string") {
|
|
14994
|
-
return dayjs(date);
|
|
15412
|
+
});
|
|
15413
|
+
__publicField(this, "createSystemDate", (value) => {
|
|
15414
|
+
let date;
|
|
15415
|
+
if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
|
|
15416
|
+
const timezone = dayjs.tz.guess();
|
|
15417
|
+
if (timezone === "UTC") {
|
|
15418
|
+
date = dayjs(value);
|
|
15419
|
+
} else {
|
|
15420
|
+
date = dayjs.tz(value, timezone);
|
|
15421
|
+
}
|
|
15422
|
+
} else {
|
|
15423
|
+
date = dayjs(value);
|
|
14995
15424
|
}
|
|
14996
|
-
return
|
|
15425
|
+
return this.setLocaleToValue(date);
|
|
14997
15426
|
});
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
|
|
15002
|
-
|
|
15003
|
-
}
|
|
15004
|
-
|
|
15005
|
-
|
|
15006
|
-
|
|
15007
|
-
|
|
15008
|
-
|
|
15009
|
-
|
|
15010
|
-
|
|
15011
|
-
|
|
15012
|
-
|
|
15013
|
-
}
|
|
15427
|
+
__publicField(this, "createUTCDate", (value) => {
|
|
15428
|
+
if (!this.hasUTCPlugin()) {
|
|
15429
|
+
throw new Error(MISSING_UTC_PLUGIN);
|
|
15430
|
+
}
|
|
15431
|
+
return this.setLocaleToValue(dayjs.utc(value));
|
|
15432
|
+
});
|
|
15433
|
+
__publicField(this, "createTZDate", (value, timezone) => {
|
|
15434
|
+
if (!this.hasUTCPlugin()) {
|
|
15435
|
+
throw new Error(MISSING_UTC_PLUGIN);
|
|
15436
|
+
}
|
|
15437
|
+
if (!this.hasTimezonePlugin()) {
|
|
15438
|
+
throw new Error(MISSING_TIMEZONE_PLUGIN);
|
|
15439
|
+
}
|
|
15440
|
+
const keepLocalTime = value !== void 0 && !value.endsWith("Z");
|
|
15441
|
+
return this.setLocaleToValue(dayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime));
|
|
15442
|
+
});
|
|
15443
|
+
__publicField(this, "getLocaleFormats", () => {
|
|
15444
|
+
const locales = dayjs.Ls;
|
|
15445
|
+
const locale = this.locale || "en";
|
|
15446
|
+
let localeObject = locales[locale];
|
|
15447
|
+
if (localeObject === void 0) {
|
|
15448
|
+
if (process.env.NODE_ENV !== "production") {
|
|
15449
|
+
warnOnce(["MUI X: Your locale has not been found.", "Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.", "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", "fallback on English locale."]);
|
|
15450
|
+
}
|
|
15451
|
+
localeObject = locales.en;
|
|
15452
|
+
}
|
|
15453
|
+
return localeObject.formats;
|
|
15454
|
+
});
|
|
15455
|
+
/**
|
|
15456
|
+
* If the new day does not have the same offset as the old one (when switching to summer day time for example),
|
|
15457
|
+
* Then dayjs will not automatically adjust the offset (moment does).
|
|
15458
|
+
* We have to parse again the value to make sure the `fixOffset` method is applied.
|
|
15459
|
+
* See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72
|
|
15460
|
+
*/
|
|
15461
|
+
__publicField(this, "adjustOffset", (value) => {
|
|
15462
|
+
if (!this.hasTimezonePlugin()) {
|
|
15463
|
+
return value;
|
|
15464
|
+
}
|
|
15465
|
+
const timezone = this.getTimezone(value);
|
|
15466
|
+
if (timezone !== "UTC") {
|
|
15467
|
+
const fixedValue = value.tz(this.cleanTimezone(timezone), true);
|
|
15468
|
+
if (fixedValue.$offset === (value.$offset ?? 0)) {
|
|
15469
|
+
return value;
|
|
15470
|
+
}
|
|
15471
|
+
value.$offset = fixedValue.$offset;
|
|
15472
|
+
}
|
|
15473
|
+
return value;
|
|
15474
|
+
});
|
|
15475
|
+
__publicField(this, "date", (value, timezone = "default") => {
|
|
15476
|
+
if (value === null) {
|
|
15477
|
+
return null;
|
|
15478
|
+
}
|
|
15479
|
+
if (timezone === "UTC") {
|
|
15480
|
+
return this.createUTCDate(value);
|
|
15481
|
+
}
|
|
15482
|
+
if (timezone === "system" || timezone === "default" && !this.hasTimezonePlugin()) {
|
|
15483
|
+
return this.createSystemDate(value);
|
|
15484
|
+
}
|
|
15485
|
+
return this.createTZDate(value, timezone);
|
|
15486
|
+
});
|
|
15487
|
+
__publicField(this, "getInvalidDate", () => dayjs(/* @__PURE__ */ new Date("Invalid date")));
|
|
15488
|
+
__publicField(this, "getTimezone", (value) => {
|
|
15489
|
+
var _a;
|
|
15490
|
+
if (this.hasTimezonePlugin()) {
|
|
15491
|
+
const zone = (_a = value.$x) == null ? void 0 : _a.$timezone;
|
|
15492
|
+
if (zone) {
|
|
15493
|
+
return zone;
|
|
15494
|
+
}
|
|
15495
|
+
}
|
|
15496
|
+
if (this.hasUTCPlugin() && value.isUTC()) {
|
|
15497
|
+
return "UTC";
|
|
15498
|
+
}
|
|
15499
|
+
return "system";
|
|
15500
|
+
});
|
|
15501
|
+
__publicField(this, "setTimezone", (value, timezone) => {
|
|
15502
|
+
if (this.getTimezone(value) === timezone) {
|
|
15503
|
+
return value;
|
|
15504
|
+
}
|
|
15505
|
+
if (timezone === "UTC") {
|
|
15506
|
+
if (!this.hasUTCPlugin()) {
|
|
15507
|
+
throw new Error(MISSING_UTC_PLUGIN);
|
|
15508
|
+
}
|
|
15509
|
+
return value.utc();
|
|
15510
|
+
}
|
|
15511
|
+
if (timezone === "system") {
|
|
15512
|
+
return value.local();
|
|
15513
|
+
}
|
|
15514
|
+
if (!this.hasTimezonePlugin()) {
|
|
15515
|
+
if (timezone === "default") {
|
|
15516
|
+
return value;
|
|
15517
|
+
}
|
|
15518
|
+
throw new Error(MISSING_TIMEZONE_PLUGIN);
|
|
15519
|
+
}
|
|
15520
|
+
return this.setLocaleToValue(dayjs.tz(value, this.cleanTimezone(timezone)));
|
|
15521
|
+
});
|
|
15522
|
+
__publicField(this, "toJsDate", (value) => {
|
|
15523
|
+
return value.toDate();
|
|
15524
|
+
});
|
|
15525
|
+
__publicField(this, "parse", (value, format) => {
|
|
15526
|
+
if (value === "") {
|
|
15527
|
+
return null;
|
|
15528
|
+
}
|
|
15529
|
+
return dayjs(value, format, this.locale, true);
|
|
15530
|
+
});
|
|
15531
|
+
__publicField(this, "getCurrentLocaleCode", () => {
|
|
15532
|
+
return this.locale || "en";
|
|
15533
|
+
});
|
|
15534
|
+
__publicField(this, "is12HourCycleInCurrentLocale", () => {
|
|
15535
|
+
return /A|a/.test(this.getLocaleFormats().LT || "");
|
|
15536
|
+
});
|
|
15537
|
+
__publicField(this, "expandFormat", (format) => {
|
|
15538
|
+
const localeFormats = this.getLocaleFormats();
|
|
15539
|
+
const t = (formatBis) => formatBis.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (_, a, b) => a || b.slice(1));
|
|
15540
|
+
return format.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {
|
|
15541
|
+
const B = b && b.toUpperCase();
|
|
15542
|
+
return a || localeFormats[b] || t(localeFormats[B]);
|
|
15543
|
+
});
|
|
15544
|
+
});
|
|
15545
|
+
__publicField(this, "isValid", (value) => {
|
|
15546
|
+
if (value == null) {
|
|
15547
|
+
return false;
|
|
15548
|
+
}
|
|
15549
|
+
return value.isValid();
|
|
15550
|
+
});
|
|
15551
|
+
__publicField(this, "format", (value, formatKey) => {
|
|
15552
|
+
return this.formatByString(value, this.formats[formatKey]);
|
|
15553
|
+
});
|
|
15554
|
+
__publicField(this, "formatByString", (value, formatString) => {
|
|
15555
|
+
return this.setLocaleToValue(value).format(formatString);
|
|
15556
|
+
});
|
|
15557
|
+
__publicField(this, "formatNumber", (numberToFormat) => {
|
|
15558
|
+
return numberToFormat;
|
|
15559
|
+
});
|
|
15560
|
+
__publicField(this, "isEqual", (value, comparing) => {
|
|
15561
|
+
if (value === null && comparing === null) {
|
|
15562
|
+
return true;
|
|
15563
|
+
}
|
|
15564
|
+
if (value === null || comparing === null) {
|
|
15565
|
+
return false;
|
|
15566
|
+
}
|
|
15567
|
+
return value.toDate().getTime() === comparing.toDate().getTime();
|
|
15568
|
+
});
|
|
15569
|
+
__publicField(this, "isSameYear", (value, comparing) => {
|
|
15570
|
+
return this.isSame(value, comparing, "YYYY");
|
|
15571
|
+
});
|
|
15572
|
+
__publicField(this, "isSameMonth", (value, comparing) => {
|
|
15573
|
+
return this.isSame(value, comparing, "YYYY-MM");
|
|
15574
|
+
});
|
|
15575
|
+
__publicField(this, "isSameDay", (value, comparing) => {
|
|
15576
|
+
return this.isSame(value, comparing, "YYYY-MM-DD");
|
|
15577
|
+
});
|
|
15578
|
+
__publicField(this, "isSameHour", (value, comparing) => {
|
|
15579
|
+
return value.isSame(comparing, "hour");
|
|
15580
|
+
});
|
|
15581
|
+
__publicField(this, "isAfter", (value, comparing) => {
|
|
15582
|
+
return value > comparing;
|
|
15583
|
+
});
|
|
15584
|
+
__publicField(this, "isAfterYear", (value, comparing) => {
|
|
15585
|
+
if (!this.hasUTCPlugin()) {
|
|
15586
|
+
return value.isAfter(comparing, "year");
|
|
15587
|
+
}
|
|
15588
|
+
return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();
|
|
15589
|
+
});
|
|
15590
|
+
__publicField(this, "isAfterDay", (value, comparing) => {
|
|
15591
|
+
if (!this.hasUTCPlugin()) {
|
|
15592
|
+
return value.isAfter(comparing, "day");
|
|
15593
|
+
}
|
|
15594
|
+
return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();
|
|
15595
|
+
});
|
|
15596
|
+
__publicField(this, "isBefore", (value, comparing) => {
|
|
15597
|
+
return value < comparing;
|
|
15598
|
+
});
|
|
15599
|
+
__publicField(this, "isBeforeYear", (value, comparing) => {
|
|
15600
|
+
if (!this.hasUTCPlugin()) {
|
|
15601
|
+
return value.isBefore(comparing, "year");
|
|
15602
|
+
}
|
|
15603
|
+
return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();
|
|
15604
|
+
});
|
|
15605
|
+
__publicField(this, "isBeforeDay", (value, comparing) => {
|
|
15606
|
+
if (!this.hasUTCPlugin()) {
|
|
15607
|
+
return value.isBefore(comparing, "day");
|
|
15608
|
+
}
|
|
15609
|
+
return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();
|
|
15610
|
+
});
|
|
15611
|
+
__publicField(this, "isWithinRange", (value, [start, end]) => {
|
|
15612
|
+
return value >= start && value <= end;
|
|
15613
|
+
});
|
|
15614
|
+
__publicField(this, "startOfYear", (value) => {
|
|
15615
|
+
return this.adjustOffset(value.startOf("year"));
|
|
15616
|
+
});
|
|
15617
|
+
__publicField(this, "startOfMonth", (value) => {
|
|
15618
|
+
return this.adjustOffset(value.startOf("month"));
|
|
15619
|
+
});
|
|
15620
|
+
__publicField(this, "startOfWeek", (value) => {
|
|
15621
|
+
return this.adjustOffset(this.setLocaleToValue(value).startOf("week"));
|
|
15622
|
+
});
|
|
15623
|
+
__publicField(this, "startOfDay", (value) => {
|
|
15624
|
+
return this.adjustOffset(value.startOf("day"));
|
|
15625
|
+
});
|
|
15626
|
+
__publicField(this, "endOfYear", (value) => {
|
|
15627
|
+
return this.adjustOffset(value.endOf("year"));
|
|
15628
|
+
});
|
|
15629
|
+
__publicField(this, "endOfMonth", (value) => {
|
|
15630
|
+
return this.adjustOffset(value.endOf("month"));
|
|
15631
|
+
});
|
|
15632
|
+
__publicField(this, "endOfWeek", (value) => {
|
|
15633
|
+
return this.adjustOffset(this.setLocaleToValue(value).endOf("week"));
|
|
15634
|
+
});
|
|
15635
|
+
__publicField(this, "endOfDay", (value) => {
|
|
15636
|
+
return this.adjustOffset(value.endOf("day"));
|
|
15637
|
+
});
|
|
15638
|
+
__publicField(this, "addYears", (value, amount) => {
|
|
15639
|
+
return this.adjustOffset(value.add(amount, "year"));
|
|
15640
|
+
});
|
|
15641
|
+
__publicField(this, "addMonths", (value, amount) => {
|
|
15642
|
+
return this.adjustOffset(value.add(amount, "month"));
|
|
15643
|
+
});
|
|
15644
|
+
__publicField(this, "addWeeks", (value, amount) => {
|
|
15645
|
+
return this.adjustOffset(value.add(amount, "week"));
|
|
15646
|
+
});
|
|
15647
|
+
__publicField(this, "addDays", (value, amount) => {
|
|
15648
|
+
return this.adjustOffset(value.add(amount, "day"));
|
|
15649
|
+
});
|
|
15650
|
+
__publicField(this, "addHours", (value, amount) => {
|
|
15651
|
+
return this.adjustOffset(value.add(amount, "hour"));
|
|
15652
|
+
});
|
|
15653
|
+
__publicField(this, "addMinutes", (value, amount) => {
|
|
15654
|
+
return this.adjustOffset(value.add(amount, "minute"));
|
|
15655
|
+
});
|
|
15656
|
+
__publicField(this, "addSeconds", (value, amount) => {
|
|
15657
|
+
return this.adjustOffset(value.add(amount, "second"));
|
|
15658
|
+
});
|
|
15659
|
+
__publicField(this, "getYear", (value) => {
|
|
15660
|
+
return value.year();
|
|
15661
|
+
});
|
|
15662
|
+
__publicField(this, "getMonth", (value) => {
|
|
15663
|
+
return value.month();
|
|
15664
|
+
});
|
|
15665
|
+
__publicField(this, "getDate", (value) => {
|
|
15666
|
+
return value.date();
|
|
15667
|
+
});
|
|
15668
|
+
__publicField(this, "getHours", (value) => {
|
|
15669
|
+
return value.hour();
|
|
15670
|
+
});
|
|
15671
|
+
__publicField(this, "getMinutes", (value) => {
|
|
15672
|
+
return value.minute();
|
|
15673
|
+
});
|
|
15674
|
+
__publicField(this, "getSeconds", (value) => {
|
|
15675
|
+
return value.second();
|
|
15676
|
+
});
|
|
15677
|
+
__publicField(this, "getMilliseconds", (value) => {
|
|
15678
|
+
return value.millisecond();
|
|
15679
|
+
});
|
|
15680
|
+
__publicField(this, "setYear", (value, year) => {
|
|
15681
|
+
return this.adjustOffset(value.set("year", year));
|
|
15682
|
+
});
|
|
15683
|
+
__publicField(this, "setMonth", (value, month) => {
|
|
15684
|
+
return this.adjustOffset(value.set("month", month));
|
|
15685
|
+
});
|
|
15686
|
+
__publicField(this, "setDate", (value, date) => {
|
|
15687
|
+
return this.adjustOffset(value.set("date", date));
|
|
15688
|
+
});
|
|
15689
|
+
__publicField(this, "setHours", (value, hours) => {
|
|
15690
|
+
return this.adjustOffset(value.set("hour", hours));
|
|
15691
|
+
});
|
|
15692
|
+
__publicField(this, "setMinutes", (value, minutes) => {
|
|
15693
|
+
return this.adjustOffset(value.set("minute", minutes));
|
|
15694
|
+
});
|
|
15695
|
+
__publicField(this, "setSeconds", (value, seconds) => {
|
|
15696
|
+
return this.adjustOffset(value.set("second", seconds));
|
|
15697
|
+
});
|
|
15698
|
+
__publicField(this, "setMilliseconds", (value, milliseconds) => {
|
|
15699
|
+
return this.adjustOffset(value.set("millisecond", milliseconds));
|
|
15700
|
+
});
|
|
15701
|
+
__publicField(this, "getDaysInMonth", (value) => {
|
|
15702
|
+
return value.daysInMonth();
|
|
15703
|
+
});
|
|
15704
|
+
__publicField(this, "getWeekArray", (value) => {
|
|
15705
|
+
const start = this.startOfWeek(this.startOfMonth(value));
|
|
15706
|
+
const end = this.endOfWeek(this.endOfMonth(value));
|
|
15707
|
+
let count = 0;
|
|
15708
|
+
let current = start;
|
|
15709
|
+
const nestedWeeks = [];
|
|
15710
|
+
while (current < end) {
|
|
15711
|
+
const weekNumber = Math.floor(count / 7);
|
|
15712
|
+
nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
|
|
15713
|
+
nestedWeeks[weekNumber].push(current);
|
|
15714
|
+
current = this.addDays(current, 1);
|
|
15715
|
+
count += 1;
|
|
15716
|
+
}
|
|
15717
|
+
return nestedWeeks;
|
|
15718
|
+
});
|
|
15719
|
+
__publicField(this, "getWeekNumber", (value) => {
|
|
15720
|
+
return value.week();
|
|
15721
|
+
});
|
|
15722
|
+
__publicField(this, "getYearRange", ([start, end]) => {
|
|
15723
|
+
const startDate = this.startOfYear(start);
|
|
15724
|
+
const endDate = this.endOfYear(end);
|
|
15725
|
+
const years = [];
|
|
15726
|
+
let current = startDate;
|
|
15727
|
+
while (this.isBefore(current, endDate)) {
|
|
15728
|
+
years.push(current);
|
|
15729
|
+
current = this.addYears(current, 1);
|
|
15730
|
+
}
|
|
15731
|
+
return years;
|
|
15732
|
+
});
|
|
15733
|
+
this.locale = locale;
|
|
15734
|
+
this.formats = _extends$1({}, defaultFormats, formats);
|
|
15735
|
+
dayjs.extend(customParseFormatPlugin);
|
|
15736
|
+
}
|
|
15737
|
+
getDayOfWeek(value) {
|
|
15738
|
+
return value.day() + 1;
|
|
15739
|
+
}
|
|
15740
|
+
}
|
|
15741
|
+
const DEFAULT_THEME = "dark";
|
|
15742
|
+
const ThemeContext = createContext({ theme: DEFAULT_THEME, setTheme: () => {
|
|
15743
|
+
} });
|
|
15744
|
+
function ThemeContextComponent({ children }) {
|
|
15745
|
+
const [theme, setTheme] = useState(DEFAULT_THEME);
|
|
15746
|
+
return /* @__PURE__ */ jsx$1(ThemeContext.Provider, { value: { theme, setTheme }, children: /* @__PURE__ */ jsx$1(LocalizationProvider, { dateAdapter: AdapterDayjs, children }) });
|
|
15747
|
+
}
|
|
15748
|
+
function Card({ children, noPadding, noBlur = false, appearance = "glass", color: color2 = "neutral", intensity, dark: dark2 = true, onClick, className, style: style2 }) {
|
|
15749
|
+
let [classNames, setClassNames] = useState("");
|
|
15750
|
+
let [cardStyle, setCardStyle] = useState({});
|
|
15751
|
+
const { theme } = useContext(ThemeContext);
|
|
15752
|
+
useEffect(() => {
|
|
15753
|
+
let intensityValue = intensity;
|
|
15754
|
+
if (intensityValue === void 0) {
|
|
15755
|
+
intensityValue = theme === "dark" ? 600 : 300;
|
|
15756
|
+
}
|
|
15757
|
+
setCardStyle({
|
|
15758
|
+
"--glass-color": `var(--color-${color2}-${intensityValue})`,
|
|
15759
|
+
"--card-text-color": `var(--color-${color2}-${dark2 ? "100" : "800"})`,
|
|
15760
|
+
backdropFilter: appearance === "glass" && !noBlur ? "blur(10px)" : void 0,
|
|
15761
|
+
...style2
|
|
15762
|
+
});
|
|
15763
|
+
let rounded = "rounded-md";
|
|
15764
|
+
if (className) {
|
|
15765
|
+
const roundedMatch = className.match(/rounded\-[a-z0-9]+/g);
|
|
15766
|
+
if (roundedMatch) {
|
|
15767
|
+
rounded = roundedMatch[roundedMatch.length - 1];
|
|
15768
|
+
}
|
|
15769
|
+
}
|
|
15770
|
+
setClassNames(`card ${rounded} ${appearance} ${className} ${noPadding ? "" : "p-[2rem]"}`);
|
|
15771
|
+
}, [color2, intensity, dark2, appearance, noBlur, className, theme]);
|
|
15772
|
+
return /* @__PURE__ */ jsx$1("article", { className: classNames, style: cardStyle, onClick, children });
|
|
15773
|
+
}
|
|
15774
|
+
function Button({ children, label, icon, position: position2 = "left", onClick, size, className, ...cardProps }) {
|
|
15775
|
+
let cardClassNames = "flex justify-center items-center gap-x-[0.40rem] h-[2.5rem] min-w-[2.5rem] box-border p-0";
|
|
15776
|
+
if (label) {
|
|
15777
|
+
cardClassNames += " px-0 py-1";
|
|
15778
|
+
}
|
|
15779
|
+
if (className) {
|
|
15780
|
+
const roundedMatch = className.match(/rounded\-[a-z0-9]+/g);
|
|
15781
|
+
if (roundedMatch) {
|
|
15782
|
+
cardClassNames += " " + roundedMatch[roundedMatch.length - 1];
|
|
15783
|
+
}
|
|
15784
|
+
}
|
|
15785
|
+
if (size === "sm") {
|
|
15786
|
+
cardClassNames += " h-[2rem] w-[2rem] min-w-auto";
|
|
15787
|
+
}
|
|
15788
|
+
const buttonClick = (ev) => {
|
|
15789
|
+
if (typeof onClick === "function") {
|
|
15790
|
+
onClick(ev);
|
|
15791
|
+
}
|
|
15792
|
+
};
|
|
15793
|
+
return /* @__PURE__ */ jsx$1("button", { className, onClick: buttonClick, children: /* @__PURE__ */ jsxs(Card, { noBlur: true, noPadding: true, className: cardClassNames, ...cardProps, children: [
|
|
15794
|
+
position2 === "left" && icon,
|
|
15795
|
+
label,
|
|
15796
|
+
children,
|
|
15797
|
+
position2 === "right" && icon
|
|
15798
|
+
] }) });
|
|
15799
|
+
}
|
|
15800
|
+
function Badge({ label, ...cardProps }) {
|
|
15801
|
+
return /* @__PURE__ */ jsx$1(Card, { noBlur: true, noPadding: true, className: "rounded-sm w-fit", ...cardProps, children: /* @__PURE__ */ jsx$1("div", { className: "px-0.5 py-0.10 text-[0.5rem] font-bold", children: label }) });
|
|
15802
|
+
}
|
|
15803
|
+
var DefaultContext = {
|
|
15804
|
+
color: void 0,
|
|
15805
|
+
size: void 0,
|
|
15806
|
+
className: void 0,
|
|
15807
|
+
style: void 0,
|
|
15808
|
+
attr: void 0
|
|
15809
|
+
};
|
|
15810
|
+
var IconContext = React__default.createContext && /* @__PURE__ */ React__default.createContext(DefaultContext);
|
|
15811
|
+
var _excluded = ["attr", "size", "title"];
|
|
15812
|
+
function _objectWithoutProperties(source, excluded) {
|
|
15813
|
+
if (source == null) return {};
|
|
15814
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
15815
|
+
var key, i;
|
|
15816
|
+
if (Object.getOwnPropertySymbols) {
|
|
15817
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
15818
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
15819
|
+
key = sourceSymbolKeys[i];
|
|
15820
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
15821
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
15822
|
+
target[key] = source[key];
|
|
15823
|
+
}
|
|
15824
|
+
}
|
|
15825
|
+
return target;
|
|
15826
|
+
}
|
|
15827
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
15828
|
+
if (source == null) return {};
|
|
15829
|
+
var target = {};
|
|
15830
|
+
for (var key in source) {
|
|
15831
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
15832
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
15833
|
+
target[key] = source[key];
|
|
15834
|
+
}
|
|
15835
|
+
}
|
|
15836
|
+
return target;
|
|
15837
|
+
}
|
|
15838
|
+
function _extends() {
|
|
15839
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
15840
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
15841
|
+
var source = arguments[i];
|
|
15842
|
+
for (var key in source) {
|
|
15843
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
15844
|
+
target[key] = source[key];
|
|
15845
|
+
}
|
|
15846
|
+
}
|
|
15847
|
+
}
|
|
15848
|
+
return target;
|
|
15849
|
+
};
|
|
15850
|
+
return _extends.apply(this, arguments);
|
|
15851
|
+
}
|
|
15852
|
+
function ownKeys(e, r2) {
|
|
15853
|
+
var t = Object.keys(e);
|
|
15854
|
+
if (Object.getOwnPropertySymbols) {
|
|
15855
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
15856
|
+
r2 && (o = o.filter(function(r3) {
|
|
15857
|
+
return Object.getOwnPropertyDescriptor(e, r3).enumerable;
|
|
15858
|
+
})), t.push.apply(t, o);
|
|
15859
|
+
}
|
|
15860
|
+
return t;
|
|
15861
|
+
}
|
|
15862
|
+
function _objectSpread(e) {
|
|
15863
|
+
for (var r2 = 1; r2 < arguments.length; r2++) {
|
|
15864
|
+
var t = null != arguments[r2] ? arguments[r2] : {};
|
|
15865
|
+
r2 % 2 ? ownKeys(Object(t), true).forEach(function(r3) {
|
|
15866
|
+
_defineProperty(e, r3, t[r3]);
|
|
15867
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r3) {
|
|
15868
|
+
Object.defineProperty(e, r3, Object.getOwnPropertyDescriptor(t, r3));
|
|
15869
|
+
});
|
|
15870
|
+
}
|
|
15871
|
+
return e;
|
|
15872
|
+
}
|
|
15873
|
+
function _defineProperty(obj, key, value) {
|
|
15874
|
+
key = _toPropertyKey(key);
|
|
15875
|
+
if (key in obj) {
|
|
15876
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
15877
|
+
} else {
|
|
15878
|
+
obj[key] = value;
|
|
15879
|
+
}
|
|
15880
|
+
return obj;
|
|
15881
|
+
}
|
|
15882
|
+
function _toPropertyKey(t) {
|
|
15883
|
+
var i = _toPrimitive(t, "string");
|
|
15884
|
+
return "symbol" == typeof i ? i : i + "";
|
|
15885
|
+
}
|
|
15886
|
+
function _toPrimitive(t, r2) {
|
|
15887
|
+
if ("object" != typeof t || !t) return t;
|
|
15888
|
+
var e = t[Symbol.toPrimitive];
|
|
15889
|
+
if (void 0 !== e) {
|
|
15890
|
+
var i = e.call(t, r2);
|
|
15891
|
+
if ("object" != typeof i) return i;
|
|
15892
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
15893
|
+
}
|
|
15894
|
+
return ("string" === r2 ? String : Number)(t);
|
|
15895
|
+
}
|
|
15896
|
+
function Tree2Element(tree) {
|
|
15897
|
+
return tree && tree.map((node2, i) => /* @__PURE__ */ React__default.createElement(node2.tag, _objectSpread({
|
|
15898
|
+
key: i
|
|
15899
|
+
}, node2.attr), Tree2Element(node2.child)));
|
|
15900
|
+
}
|
|
15901
|
+
function GenIcon(data) {
|
|
15902
|
+
return (props) => /* @__PURE__ */ React__default.createElement(IconBase, _extends({
|
|
15903
|
+
attr: _objectSpread({}, data.attr)
|
|
15904
|
+
}, props), Tree2Element(data.child));
|
|
15905
|
+
}
|
|
15906
|
+
function IconBase(props) {
|
|
15907
|
+
var elem = (conf) => {
|
|
15908
|
+
var {
|
|
15909
|
+
attr,
|
|
15910
|
+
size,
|
|
15911
|
+
title
|
|
15912
|
+
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
|
15913
|
+
var computedSize = size || conf.size || "1em";
|
|
15914
|
+
var className;
|
|
15915
|
+
if (conf.className) className = conf.className;
|
|
15916
|
+
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
15917
|
+
return /* @__PURE__ */ React__default.createElement("svg", _extends({
|
|
15918
|
+
stroke: "currentColor",
|
|
15919
|
+
fill: "currentColor",
|
|
15920
|
+
strokeWidth: "0"
|
|
15921
|
+
}, conf.attr, attr, svgProps, {
|
|
15922
|
+
className,
|
|
15923
|
+
style: _objectSpread(_objectSpread({
|
|
15924
|
+
color: props.color || conf.color
|
|
15925
|
+
}, conf.style), props.style),
|
|
15926
|
+
height: computedSize,
|
|
15927
|
+
width: computedSize,
|
|
15928
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
15929
|
+
}), title && /* @__PURE__ */ React__default.createElement("title", null, title), props.children);
|
|
15930
|
+
};
|
|
15931
|
+
return IconContext !== void 0 ? /* @__PURE__ */ React__default.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
15932
|
+
}
|
|
15933
|
+
function FaCheck(props) {
|
|
15934
|
+
return GenIcon({ "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" }, "child": [] }] })(props);
|
|
15935
|
+
}
|
|
15936
|
+
function FaChevronDown(props) {
|
|
15937
|
+
return GenIcon({ "attr": { "viewBox": "0 0 448 512" }, "child": [{ "tag": "path", "attr": { "d": "M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z" }, "child": [] }] })(props);
|
|
15938
|
+
}
|
|
15939
|
+
function FaChevronUp(props) {
|
|
15940
|
+
return GenIcon({ "attr": { "viewBox": "0 0 448 512" }, "child": [{ "tag": "path", "attr": { "d": "M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z" }, "child": [] }] })(props);
|
|
15941
|
+
}
|
|
15942
|
+
function Checkbox({ label, checkedDefault = false, onChange }) {
|
|
15943
|
+
const [checked, setChecked] = useState(checkedDefault);
|
|
15944
|
+
function checkboxClicked() {
|
|
15945
|
+
const newValue = !checked;
|
|
15946
|
+
setChecked(newValue);
|
|
15947
|
+
onChange(newValue);
|
|
15948
|
+
}
|
|
15949
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 w-fit", onClick: checkboxClicked, children: [
|
|
15950
|
+
/* @__PURE__ */ jsx$1(Button, { icon: checked ? /* @__PURE__ */ jsx$1(FaCheck, {}) : null }),
|
|
15951
|
+
label
|
|
15952
|
+
] });
|
|
15953
|
+
}
|
|
15954
|
+
function SectionName({ section, className }) {
|
|
15955
|
+
return /* @__PURE__ */ jsx$1("div", { className: `uppercase font-bold tracking-[0.15rem] w-fit section-name ${className}`, children: section });
|
|
15956
|
+
}
|
|
15957
|
+
function Input({ type, value, disabled, placeholder, size, maxLength, onChange, iconPosition = "left", centerText = false, icon, className, ...cardProps }) {
|
|
15958
|
+
function inputUpdated(ev) {
|
|
15959
|
+
onChange == null ? void 0 : onChange(ev.target.value);
|
|
15960
|
+
}
|
|
15961
|
+
const classnames = `flex`;
|
|
15962
|
+
const inputClassName = `flex justify-center items-center border-none bg-none py-[0.5rem] px-[1rem] m-0 w-full ${centerText ? "text-center" : ""}`;
|
|
15963
|
+
const directionClassName = iconPosition === "left" ? "pl-2" : "flex-row-reverse pr-2";
|
|
15964
|
+
return /* @__PURE__ */ jsx$1("div", { className: classnames, children: /* @__PURE__ */ jsxs(Card, { className: `flex justify-center items-center rounded-md ${className} ${icon ? directionClassName : ""}`, noBlur: true, noPadding: true, ...cardProps, style: cardProps.style, children: [
|
|
15965
|
+
icon && /* @__PURE__ */ jsx$1("div", { className: "flex items-center", children: icon }),
|
|
15966
|
+
/* @__PURE__ */ jsx$1("input", { className: inputClassName, onChange: inputUpdated, placeholder, value, disabled, type, size, maxLength, style: cardProps.style })
|
|
15967
|
+
] }) });
|
|
15968
|
+
}
|
|
15969
|
+
function CustomDay(props) {
|
|
15970
|
+
const { highlightedDays = [], day, outsideCurrentMonth, ...other } = props;
|
|
15971
|
+
const isSelected = highlightedDays.some((date) => day.isSame(date, "day"));
|
|
15972
|
+
return /* @__PURE__ */ jsx$1(
|
|
15973
|
+
PickersDay2,
|
|
15974
|
+
{
|
|
15975
|
+
...other,
|
|
15976
|
+
day,
|
|
15977
|
+
selected: isSelected,
|
|
15978
|
+
outsideCurrentMonth,
|
|
15979
|
+
sx: {
|
|
15980
|
+
...isSelected && {
|
|
15981
|
+
backgroundColor: "white !important",
|
|
15982
|
+
// Make selected day white
|
|
15983
|
+
color: "black !important"
|
|
15984
|
+
// Text color to black for contrast
|
|
15985
|
+
}
|
|
15986
|
+
}
|
|
15987
|
+
}
|
|
15988
|
+
);
|
|
15989
|
+
}
|
|
15990
|
+
function Calendar({
|
|
15991
|
+
selectedDates,
|
|
15992
|
+
onMonthChange,
|
|
15993
|
+
onYearChange,
|
|
15994
|
+
referenceDate,
|
|
15995
|
+
view,
|
|
15996
|
+
views,
|
|
15997
|
+
openTo,
|
|
15998
|
+
value,
|
|
15999
|
+
onChange,
|
|
16000
|
+
defaultValue,
|
|
16001
|
+
...cardProps
|
|
16002
|
+
}) {
|
|
16003
|
+
const theme = createTheme({
|
|
16004
|
+
palette: {
|
|
16005
|
+
mode: "dark"
|
|
16006
|
+
}
|
|
16007
|
+
});
|
|
16008
|
+
const convertSelectedDates = (dates) => {
|
|
16009
|
+
if (!dates) return [];
|
|
16010
|
+
return dates.map((date) => {
|
|
16011
|
+
if (typeof date === "string") {
|
|
16012
|
+
return dayjs(date);
|
|
16013
|
+
}
|
|
16014
|
+
return dayjs(date);
|
|
16015
|
+
});
|
|
16016
|
+
};
|
|
16017
|
+
const convertDateToDayjs = (date) => date ? dayjs(date) : void 0;
|
|
16018
|
+
const handleMonthChange = (month) => {
|
|
16019
|
+
if (onMonthChange) {
|
|
16020
|
+
onMonthChange(month.toDate());
|
|
16021
|
+
}
|
|
16022
|
+
};
|
|
16023
|
+
const handleYearChange = (year) => {
|
|
16024
|
+
if (onYearChange) {
|
|
16025
|
+
onYearChange(year.toDate());
|
|
16026
|
+
}
|
|
16027
|
+
};
|
|
16028
|
+
const handleChange = (newValue) => {
|
|
16029
|
+
if (onChange) {
|
|
16030
|
+
onChange(newValue ? newValue.toDate() : null);
|
|
16031
|
+
}
|
|
15014
16032
|
};
|
|
15015
16033
|
return /* @__PURE__ */ jsx$1(Card, { appearance: cardProps.appearance ?? "ghost", noPadding: true, ...cardProps, children: /* @__PURE__ */ jsx$1(ThemeProvider, { theme, children: /* @__PURE__ */ jsx$1(
|
|
15016
16034
|
DateCalendar,
|
|
@@ -15031,10 +16049,1863 @@ function Calendar({
|
|
|
15031
16049
|
}
|
|
15032
16050
|
) }) });
|
|
15033
16051
|
}
|
|
16052
|
+
function DropdownButton({ children, open, toggle }) {
|
|
16053
|
+
return /* @__PURE__ */ jsxs(Button, { onClick: toggle, className: `cursor-pointer ${open ? "button-open" : null}`, children: [
|
|
16054
|
+
children,
|
|
16055
|
+
/* @__PURE__ */ jsx$1("span", { className: "flex items-center content-center ml-[1rem]", children: open ? /* @__PURE__ */ jsx$1(FaChevronUp, {}) : /* @__PURE__ */ jsx$1(FaChevronDown, {}) })
|
|
16056
|
+
] });
|
|
16057
|
+
}
|
|
16058
|
+
function Dropdown({ buttonText, options = [], onSelected }) {
|
|
16059
|
+
const [open, setOpen] = useState(false);
|
|
16060
|
+
const [optionSelected, setOptionSelected] = useState(buttonText);
|
|
16061
|
+
const toggleDropdown = () => {
|
|
16062
|
+
setOpen((open2) => !open2);
|
|
16063
|
+
};
|
|
16064
|
+
const itemClicked = (option) => {
|
|
16065
|
+
setOptionSelected(option);
|
|
16066
|
+
onSelected == null ? void 0 : onSelected(option);
|
|
16067
|
+
setOpen(false);
|
|
16068
|
+
};
|
|
16069
|
+
return /* @__PURE__ */ jsxs("div", { tabIndex: 0, className: "relative w-fit", onBlur: () => setOpen(false), children: [
|
|
16070
|
+
/* @__PURE__ */ jsx$1(DropdownButton, { toggle: toggleDropdown, open, children: optionSelected }),
|
|
16071
|
+
open && /* @__PURE__ */ jsx$1(Card, { noBlur: true, appearance: "mate", className: "absolute flex flex-col items-center p-[1rem] mt-[0.5rem] bg-white rounded-lg overflow-y-scroll dropdown-content", children: options.map((option) => /* @__PURE__ */ jsx$1("div", { className: "p-[0.5rem] m-[0.1rem] w-full rounded-lg cursor-pointer", onMouseDown: () => itemClicked(option), children: option }, option)) })
|
|
16072
|
+
] });
|
|
16073
|
+
}
|
|
16074
|
+
function areArraysEqual(array1, array2, itemComparer = (a, b) => a === b) {
|
|
16075
|
+
return array1.length === array2.length && array1.every((value, index) => itemComparer(value, array2[index]));
|
|
16076
|
+
}
|
|
16077
|
+
const INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;
|
|
16078
|
+
function getNewValue(currentValue, step, direction, min, max) {
|
|
16079
|
+
return direction === 1 ? Math.min(currentValue + step, max) : Math.max(currentValue - step, min);
|
|
16080
|
+
}
|
|
16081
|
+
function asc(a, b) {
|
|
16082
|
+
return a - b;
|
|
16083
|
+
}
|
|
16084
|
+
function findClosest(values2, currentValue) {
|
|
16085
|
+
const {
|
|
16086
|
+
index: closestIndex
|
|
16087
|
+
} = values2.reduce((acc, value, index) => {
|
|
16088
|
+
const distance = Math.abs(currentValue - value);
|
|
16089
|
+
if (acc === null || distance < acc.distance || distance === acc.distance) {
|
|
16090
|
+
return {
|
|
16091
|
+
distance,
|
|
16092
|
+
index
|
|
16093
|
+
};
|
|
16094
|
+
}
|
|
16095
|
+
return acc;
|
|
16096
|
+
}, null) ?? {};
|
|
16097
|
+
return closestIndex;
|
|
16098
|
+
}
|
|
16099
|
+
function trackFinger(event, touchId) {
|
|
16100
|
+
if (touchId.current !== void 0 && event.changedTouches) {
|
|
16101
|
+
const touchEvent = event;
|
|
16102
|
+
for (let i = 0; i < touchEvent.changedTouches.length; i += 1) {
|
|
16103
|
+
const touch = touchEvent.changedTouches[i];
|
|
16104
|
+
if (touch.identifier === touchId.current) {
|
|
16105
|
+
return {
|
|
16106
|
+
x: touch.clientX,
|
|
16107
|
+
y: touch.clientY
|
|
16108
|
+
};
|
|
16109
|
+
}
|
|
16110
|
+
}
|
|
16111
|
+
return false;
|
|
16112
|
+
}
|
|
16113
|
+
return {
|
|
16114
|
+
x: event.clientX,
|
|
16115
|
+
y: event.clientY
|
|
16116
|
+
};
|
|
16117
|
+
}
|
|
16118
|
+
function valueToPercent(value, min, max) {
|
|
16119
|
+
return (value - min) * 100 / (max - min);
|
|
16120
|
+
}
|
|
16121
|
+
function percentToValue(percent, min, max) {
|
|
16122
|
+
return (max - min) * percent + min;
|
|
16123
|
+
}
|
|
16124
|
+
function getDecimalPrecision(num) {
|
|
16125
|
+
if (Math.abs(num) < 1) {
|
|
16126
|
+
const parts = num.toExponential().split("e-");
|
|
16127
|
+
const matissaDecimalPart = parts[0].split(".")[1];
|
|
16128
|
+
return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);
|
|
16129
|
+
}
|
|
16130
|
+
const decimalPart = num.toString().split(".")[1];
|
|
16131
|
+
return decimalPart ? decimalPart.length : 0;
|
|
16132
|
+
}
|
|
16133
|
+
function roundValueToStep(value, step, min) {
|
|
16134
|
+
const nearest = Math.round((value - min) / step) * step + min;
|
|
16135
|
+
return Number(nearest.toFixed(getDecimalPrecision(step)));
|
|
16136
|
+
}
|
|
16137
|
+
function setValueIndex({
|
|
16138
|
+
values: values2,
|
|
16139
|
+
newValue,
|
|
16140
|
+
index
|
|
16141
|
+
}) {
|
|
16142
|
+
const output = values2.slice();
|
|
16143
|
+
output[index] = newValue;
|
|
16144
|
+
return output.sort(asc);
|
|
16145
|
+
}
|
|
16146
|
+
function focusThumb({
|
|
16147
|
+
sliderRef,
|
|
16148
|
+
activeIndex,
|
|
16149
|
+
setActive
|
|
16150
|
+
}) {
|
|
16151
|
+
var _a, _b, _c;
|
|
16152
|
+
const doc = ownerDocument(sliderRef.current);
|
|
16153
|
+
if (!((_a = sliderRef.current) == null ? void 0 : _a.contains(doc.activeElement)) || Number((_b = doc == null ? void 0 : doc.activeElement) == null ? void 0 : _b.getAttribute("data-index")) !== activeIndex) {
|
|
16154
|
+
(_c = sliderRef.current) == null ? void 0 : _c.querySelector(`[type="range"][data-index="${activeIndex}"]`).focus();
|
|
16155
|
+
}
|
|
16156
|
+
if (setActive) {
|
|
16157
|
+
setActive(activeIndex);
|
|
16158
|
+
}
|
|
16159
|
+
}
|
|
16160
|
+
function areValuesEqual(newValue, oldValue) {
|
|
16161
|
+
if (typeof newValue === "number" && typeof oldValue === "number") {
|
|
16162
|
+
return newValue === oldValue;
|
|
16163
|
+
}
|
|
16164
|
+
if (typeof newValue === "object" && typeof oldValue === "object") {
|
|
16165
|
+
return areArraysEqual(newValue, oldValue);
|
|
16166
|
+
}
|
|
16167
|
+
return false;
|
|
16168
|
+
}
|
|
16169
|
+
const axisProps = {
|
|
16170
|
+
horizontal: {
|
|
16171
|
+
offset: (percent) => ({
|
|
16172
|
+
left: `${percent}%`
|
|
16173
|
+
}),
|
|
16174
|
+
leap: (percent) => ({
|
|
16175
|
+
width: `${percent}%`
|
|
16176
|
+
})
|
|
16177
|
+
},
|
|
16178
|
+
"horizontal-reverse": {
|
|
16179
|
+
offset: (percent) => ({
|
|
16180
|
+
right: `${percent}%`
|
|
16181
|
+
}),
|
|
16182
|
+
leap: (percent) => ({
|
|
16183
|
+
width: `${percent}%`
|
|
16184
|
+
})
|
|
16185
|
+
},
|
|
16186
|
+
vertical: {
|
|
16187
|
+
offset: (percent) => ({
|
|
16188
|
+
bottom: `${percent}%`
|
|
16189
|
+
}),
|
|
16190
|
+
leap: (percent) => ({
|
|
16191
|
+
height: `${percent}%`
|
|
16192
|
+
})
|
|
16193
|
+
}
|
|
16194
|
+
};
|
|
16195
|
+
const Identity$1 = (x) => x;
|
|
16196
|
+
let cachedSupportsTouchActionNone;
|
|
16197
|
+
function doesSupportTouchActionNone() {
|
|
16198
|
+
if (cachedSupportsTouchActionNone === void 0) {
|
|
16199
|
+
if (typeof CSS !== "undefined" && typeof CSS.supports === "function") {
|
|
16200
|
+
cachedSupportsTouchActionNone = CSS.supports("touch-action", "none");
|
|
16201
|
+
} else {
|
|
16202
|
+
cachedSupportsTouchActionNone = true;
|
|
16203
|
+
}
|
|
16204
|
+
}
|
|
16205
|
+
return cachedSupportsTouchActionNone;
|
|
16206
|
+
}
|
|
16207
|
+
function useSlider(parameters) {
|
|
16208
|
+
const {
|
|
16209
|
+
"aria-labelledby": ariaLabelledby,
|
|
16210
|
+
defaultValue,
|
|
16211
|
+
disabled = false,
|
|
16212
|
+
disableSwap = false,
|
|
16213
|
+
isRtl = false,
|
|
16214
|
+
marks: marksProp = false,
|
|
16215
|
+
max = 100,
|
|
16216
|
+
min = 0,
|
|
16217
|
+
name,
|
|
16218
|
+
onChange,
|
|
16219
|
+
onChangeCommitted,
|
|
16220
|
+
orientation = "horizontal",
|
|
16221
|
+
rootRef: ref,
|
|
16222
|
+
scale = Identity$1,
|
|
16223
|
+
step = 1,
|
|
16224
|
+
shiftStep = 10,
|
|
16225
|
+
tabIndex,
|
|
16226
|
+
value: valueProp
|
|
16227
|
+
} = parameters;
|
|
16228
|
+
const touchId = React.useRef(void 0);
|
|
16229
|
+
const [active, setActive] = React.useState(-1);
|
|
16230
|
+
const [open, setOpen] = React.useState(-1);
|
|
16231
|
+
const [dragging, setDragging] = React.useState(false);
|
|
16232
|
+
const moveCount = React.useRef(0);
|
|
16233
|
+
const lastChangedValue = React.useRef(null);
|
|
16234
|
+
const [valueDerived, setValueState] = useControlled({
|
|
16235
|
+
controlled: valueProp,
|
|
16236
|
+
default: defaultValue ?? min,
|
|
16237
|
+
name: "Slider"
|
|
16238
|
+
});
|
|
16239
|
+
const handleChange = onChange && ((event, value, thumbIndex) => {
|
|
16240
|
+
const nativeEvent = event.nativeEvent || event;
|
|
16241
|
+
const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
16242
|
+
Object.defineProperty(clonedEvent, "target", {
|
|
16243
|
+
writable: true,
|
|
16244
|
+
value: {
|
|
16245
|
+
value,
|
|
16246
|
+
name
|
|
16247
|
+
}
|
|
16248
|
+
});
|
|
16249
|
+
lastChangedValue.current = value;
|
|
16250
|
+
onChange(clonedEvent, value, thumbIndex);
|
|
16251
|
+
});
|
|
16252
|
+
const range = Array.isArray(valueDerived);
|
|
16253
|
+
let values2 = range ? valueDerived.slice().sort(asc) : [valueDerived];
|
|
16254
|
+
values2 = values2.map((value) => value == null ? min : clamp(value, min, max));
|
|
16255
|
+
const marks = marksProp === true && step !== null ? [...Array(Math.floor((max - min) / step) + 1)].map((_, index) => ({
|
|
16256
|
+
value: min + step * index
|
|
16257
|
+
})) : marksProp || [];
|
|
16258
|
+
const marksValues = marks.map((mark) => mark.value);
|
|
16259
|
+
const [focusedThumbIndex, setFocusedThumbIndex] = React.useState(-1);
|
|
16260
|
+
const sliderRef = React.useRef(null);
|
|
16261
|
+
const handleRef = useForkRef(ref, sliderRef);
|
|
16262
|
+
const createHandleHiddenInputFocus = (otherHandlers) => (event) => {
|
|
16263
|
+
var _a;
|
|
16264
|
+
const index = Number(event.currentTarget.getAttribute("data-index"));
|
|
16265
|
+
if (isFocusVisible(event.target)) {
|
|
16266
|
+
setFocusedThumbIndex(index);
|
|
16267
|
+
}
|
|
16268
|
+
setOpen(index);
|
|
16269
|
+
(_a = otherHandlers == null ? void 0 : otherHandlers.onFocus) == null ? void 0 : _a.call(otherHandlers, event);
|
|
16270
|
+
};
|
|
16271
|
+
const createHandleHiddenInputBlur = (otherHandlers) => (event) => {
|
|
16272
|
+
var _a;
|
|
16273
|
+
if (!isFocusVisible(event.target)) {
|
|
16274
|
+
setFocusedThumbIndex(-1);
|
|
16275
|
+
}
|
|
16276
|
+
setOpen(-1);
|
|
16277
|
+
(_a = otherHandlers == null ? void 0 : otherHandlers.onBlur) == null ? void 0 : _a.call(otherHandlers, event);
|
|
16278
|
+
};
|
|
16279
|
+
const changeValue = (event, valueInput) => {
|
|
16280
|
+
const index = Number(event.currentTarget.getAttribute("data-index"));
|
|
16281
|
+
const value = values2[index];
|
|
16282
|
+
const marksIndex = marksValues.indexOf(value);
|
|
16283
|
+
let newValue = valueInput;
|
|
16284
|
+
if (marks && step == null) {
|
|
16285
|
+
const maxMarksValue = marksValues[marksValues.length - 1];
|
|
16286
|
+
if (newValue >= maxMarksValue) {
|
|
16287
|
+
newValue = maxMarksValue;
|
|
16288
|
+
} else if (newValue <= marksValues[0]) {
|
|
16289
|
+
newValue = marksValues[0];
|
|
16290
|
+
} else {
|
|
16291
|
+
newValue = newValue < value ? marksValues[marksIndex - 1] : marksValues[marksIndex + 1];
|
|
16292
|
+
}
|
|
16293
|
+
}
|
|
16294
|
+
newValue = clamp(newValue, min, max);
|
|
16295
|
+
if (range) {
|
|
16296
|
+
if (disableSwap) {
|
|
16297
|
+
newValue = clamp(newValue, values2[index - 1] || -Infinity, values2[index + 1] || Infinity);
|
|
16298
|
+
}
|
|
16299
|
+
const previousValue = newValue;
|
|
16300
|
+
newValue = setValueIndex({
|
|
16301
|
+
values: values2,
|
|
16302
|
+
newValue,
|
|
16303
|
+
index
|
|
16304
|
+
});
|
|
16305
|
+
let activeIndex = index;
|
|
16306
|
+
if (!disableSwap) {
|
|
16307
|
+
activeIndex = newValue.indexOf(previousValue);
|
|
16308
|
+
}
|
|
16309
|
+
focusThumb({
|
|
16310
|
+
sliderRef,
|
|
16311
|
+
activeIndex
|
|
16312
|
+
});
|
|
16313
|
+
}
|
|
16314
|
+
setValueState(newValue);
|
|
16315
|
+
setFocusedThumbIndex(index);
|
|
16316
|
+
if (handleChange && !areValuesEqual(newValue, valueDerived)) {
|
|
16317
|
+
handleChange(event, newValue, index);
|
|
16318
|
+
}
|
|
16319
|
+
if (onChangeCommitted) {
|
|
16320
|
+
onChangeCommitted(event, lastChangedValue.current ?? newValue);
|
|
16321
|
+
}
|
|
16322
|
+
};
|
|
16323
|
+
const createHandleHiddenInputKeyDown = (otherHandlers) => (event) => {
|
|
16324
|
+
var _a;
|
|
16325
|
+
if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Home", "End"].includes(event.key)) {
|
|
16326
|
+
event.preventDefault();
|
|
16327
|
+
const index = Number(event.currentTarget.getAttribute("data-index"));
|
|
16328
|
+
const value = values2[index];
|
|
16329
|
+
let newValue = null;
|
|
16330
|
+
if (step != null) {
|
|
16331
|
+
const stepSize = event.shiftKey ? shiftStep : step;
|
|
16332
|
+
switch (event.key) {
|
|
16333
|
+
case "ArrowUp":
|
|
16334
|
+
newValue = getNewValue(value, stepSize, 1, min, max);
|
|
16335
|
+
break;
|
|
16336
|
+
case "ArrowRight":
|
|
16337
|
+
newValue = getNewValue(value, stepSize, isRtl ? -1 : 1, min, max);
|
|
16338
|
+
break;
|
|
16339
|
+
case "ArrowDown":
|
|
16340
|
+
newValue = getNewValue(value, stepSize, -1, min, max);
|
|
16341
|
+
break;
|
|
16342
|
+
case "ArrowLeft":
|
|
16343
|
+
newValue = getNewValue(value, stepSize, isRtl ? 1 : -1, min, max);
|
|
16344
|
+
break;
|
|
16345
|
+
case "PageUp":
|
|
16346
|
+
newValue = getNewValue(value, shiftStep, 1, min, max);
|
|
16347
|
+
break;
|
|
16348
|
+
case "PageDown":
|
|
16349
|
+
newValue = getNewValue(value, shiftStep, -1, min, max);
|
|
16350
|
+
break;
|
|
16351
|
+
case "Home":
|
|
16352
|
+
newValue = min;
|
|
16353
|
+
break;
|
|
16354
|
+
case "End":
|
|
16355
|
+
newValue = max;
|
|
16356
|
+
break;
|
|
16357
|
+
}
|
|
16358
|
+
} else if (marks) {
|
|
16359
|
+
const maxMarksValue = marksValues[marksValues.length - 1];
|
|
16360
|
+
const currentMarkIndex = marksValues.indexOf(value);
|
|
16361
|
+
const decrementKeys = [isRtl ? "ArrowRight" : "ArrowLeft", "ArrowDown", "PageDown", "Home"];
|
|
16362
|
+
const incrementKeys = [isRtl ? "ArrowLeft" : "ArrowRight", "ArrowUp", "PageUp", "End"];
|
|
16363
|
+
if (decrementKeys.includes(event.key)) {
|
|
16364
|
+
if (currentMarkIndex === 0) {
|
|
16365
|
+
newValue = marksValues[0];
|
|
16366
|
+
} else {
|
|
16367
|
+
newValue = marksValues[currentMarkIndex - 1];
|
|
16368
|
+
}
|
|
16369
|
+
} else if (incrementKeys.includes(event.key)) {
|
|
16370
|
+
if (currentMarkIndex === marksValues.length - 1) {
|
|
16371
|
+
newValue = maxMarksValue;
|
|
16372
|
+
} else {
|
|
16373
|
+
newValue = marksValues[currentMarkIndex + 1];
|
|
16374
|
+
}
|
|
16375
|
+
}
|
|
16376
|
+
}
|
|
16377
|
+
if (newValue != null) {
|
|
16378
|
+
changeValue(event, newValue);
|
|
16379
|
+
}
|
|
16380
|
+
}
|
|
16381
|
+
(_a = otherHandlers == null ? void 0 : otherHandlers.onKeyDown) == null ? void 0 : _a.call(otherHandlers, event);
|
|
16382
|
+
};
|
|
16383
|
+
useEnhancedEffect(() => {
|
|
16384
|
+
var _a;
|
|
16385
|
+
if (disabled && sliderRef.current.contains(document.activeElement)) {
|
|
16386
|
+
(_a = document.activeElement) == null ? void 0 : _a.blur();
|
|
16387
|
+
}
|
|
16388
|
+
}, [disabled]);
|
|
16389
|
+
if (disabled && active !== -1) {
|
|
16390
|
+
setActive(-1);
|
|
16391
|
+
}
|
|
16392
|
+
if (disabled && focusedThumbIndex !== -1) {
|
|
16393
|
+
setFocusedThumbIndex(-1);
|
|
16394
|
+
}
|
|
16395
|
+
const createHandleHiddenInputChange = (otherHandlers) => (event) => {
|
|
16396
|
+
var _a;
|
|
16397
|
+
(_a = otherHandlers.onChange) == null ? void 0 : _a.call(otherHandlers, event);
|
|
16398
|
+
changeValue(event, event.target.valueAsNumber);
|
|
16399
|
+
};
|
|
16400
|
+
const previousIndex = React.useRef(void 0);
|
|
16401
|
+
let axis = orientation;
|
|
16402
|
+
if (isRtl && orientation === "horizontal") {
|
|
16403
|
+
axis += "-reverse";
|
|
16404
|
+
}
|
|
16405
|
+
const getFingerNewValue = ({
|
|
16406
|
+
finger,
|
|
16407
|
+
move = false
|
|
16408
|
+
}) => {
|
|
16409
|
+
const {
|
|
16410
|
+
current: slider
|
|
16411
|
+
} = sliderRef;
|
|
16412
|
+
const {
|
|
16413
|
+
width: width2,
|
|
16414
|
+
height: height2,
|
|
16415
|
+
bottom,
|
|
16416
|
+
left
|
|
16417
|
+
} = slider.getBoundingClientRect();
|
|
16418
|
+
let percent;
|
|
16419
|
+
if (axis.startsWith("vertical")) {
|
|
16420
|
+
percent = (bottom - finger.y) / height2;
|
|
16421
|
+
} else {
|
|
16422
|
+
percent = (finger.x - left) / width2;
|
|
16423
|
+
}
|
|
16424
|
+
if (axis.includes("-reverse")) {
|
|
16425
|
+
percent = 1 - percent;
|
|
16426
|
+
}
|
|
16427
|
+
let newValue;
|
|
16428
|
+
newValue = percentToValue(percent, min, max);
|
|
16429
|
+
if (step) {
|
|
16430
|
+
newValue = roundValueToStep(newValue, step, min);
|
|
16431
|
+
} else {
|
|
16432
|
+
const closestIndex = findClosest(marksValues, newValue);
|
|
16433
|
+
newValue = marksValues[closestIndex];
|
|
16434
|
+
}
|
|
16435
|
+
newValue = clamp(newValue, min, max);
|
|
16436
|
+
let activeIndex = 0;
|
|
16437
|
+
if (range) {
|
|
16438
|
+
if (!move) {
|
|
16439
|
+
activeIndex = findClosest(values2, newValue);
|
|
16440
|
+
} else {
|
|
16441
|
+
activeIndex = previousIndex.current;
|
|
16442
|
+
}
|
|
16443
|
+
if (disableSwap) {
|
|
16444
|
+
newValue = clamp(newValue, values2[activeIndex - 1] || -Infinity, values2[activeIndex + 1] || Infinity);
|
|
16445
|
+
}
|
|
16446
|
+
const previousValue = newValue;
|
|
16447
|
+
newValue = setValueIndex({
|
|
16448
|
+
values: values2,
|
|
16449
|
+
newValue,
|
|
16450
|
+
index: activeIndex
|
|
16451
|
+
});
|
|
16452
|
+
if (!(disableSwap && move)) {
|
|
16453
|
+
activeIndex = newValue.indexOf(previousValue);
|
|
16454
|
+
previousIndex.current = activeIndex;
|
|
16455
|
+
}
|
|
16456
|
+
}
|
|
16457
|
+
return {
|
|
16458
|
+
newValue,
|
|
16459
|
+
activeIndex
|
|
16460
|
+
};
|
|
16461
|
+
};
|
|
16462
|
+
const handleTouchMove = useEventCallback((nativeEvent) => {
|
|
16463
|
+
const finger = trackFinger(nativeEvent, touchId);
|
|
16464
|
+
if (!finger) {
|
|
16465
|
+
return;
|
|
16466
|
+
}
|
|
16467
|
+
moveCount.current += 1;
|
|
16468
|
+
if (nativeEvent.type === "mousemove" && nativeEvent.buttons === 0) {
|
|
16469
|
+
handleTouchEnd(nativeEvent);
|
|
16470
|
+
return;
|
|
16471
|
+
}
|
|
16472
|
+
const {
|
|
16473
|
+
newValue,
|
|
16474
|
+
activeIndex
|
|
16475
|
+
} = getFingerNewValue({
|
|
16476
|
+
finger,
|
|
16477
|
+
move: true
|
|
16478
|
+
});
|
|
16479
|
+
focusThumb({
|
|
16480
|
+
sliderRef,
|
|
16481
|
+
activeIndex,
|
|
16482
|
+
setActive
|
|
16483
|
+
});
|
|
16484
|
+
setValueState(newValue);
|
|
16485
|
+
if (!dragging && moveCount.current > INTENTIONAL_DRAG_COUNT_THRESHOLD) {
|
|
16486
|
+
setDragging(true);
|
|
16487
|
+
}
|
|
16488
|
+
if (handleChange && !areValuesEqual(newValue, valueDerived)) {
|
|
16489
|
+
handleChange(nativeEvent, newValue, activeIndex);
|
|
16490
|
+
}
|
|
16491
|
+
});
|
|
16492
|
+
const handleTouchEnd = useEventCallback((nativeEvent) => {
|
|
16493
|
+
const finger = trackFinger(nativeEvent, touchId);
|
|
16494
|
+
setDragging(false);
|
|
16495
|
+
if (!finger) {
|
|
16496
|
+
return;
|
|
16497
|
+
}
|
|
16498
|
+
const {
|
|
16499
|
+
newValue
|
|
16500
|
+
} = getFingerNewValue({
|
|
16501
|
+
finger,
|
|
16502
|
+
move: true
|
|
16503
|
+
});
|
|
16504
|
+
setActive(-1);
|
|
16505
|
+
if (nativeEvent.type === "touchend") {
|
|
16506
|
+
setOpen(-1);
|
|
16507
|
+
}
|
|
16508
|
+
if (onChangeCommitted) {
|
|
16509
|
+
onChangeCommitted(nativeEvent, lastChangedValue.current ?? newValue);
|
|
16510
|
+
}
|
|
16511
|
+
touchId.current = void 0;
|
|
16512
|
+
stopListening();
|
|
16513
|
+
});
|
|
16514
|
+
const handleTouchStart = useEventCallback((nativeEvent) => {
|
|
16515
|
+
if (disabled) {
|
|
16516
|
+
return;
|
|
16517
|
+
}
|
|
16518
|
+
if (!doesSupportTouchActionNone()) {
|
|
16519
|
+
nativeEvent.preventDefault();
|
|
16520
|
+
}
|
|
16521
|
+
const touch = nativeEvent.changedTouches[0];
|
|
16522
|
+
if (touch != null) {
|
|
16523
|
+
touchId.current = touch.identifier;
|
|
16524
|
+
}
|
|
16525
|
+
const finger = trackFinger(nativeEvent, touchId);
|
|
16526
|
+
if (finger !== false) {
|
|
16527
|
+
const {
|
|
16528
|
+
newValue,
|
|
16529
|
+
activeIndex
|
|
16530
|
+
} = getFingerNewValue({
|
|
16531
|
+
finger
|
|
16532
|
+
});
|
|
16533
|
+
focusThumb({
|
|
16534
|
+
sliderRef,
|
|
16535
|
+
activeIndex,
|
|
16536
|
+
setActive
|
|
16537
|
+
});
|
|
16538
|
+
setValueState(newValue);
|
|
16539
|
+
if (handleChange && !areValuesEqual(newValue, valueDerived)) {
|
|
16540
|
+
handleChange(nativeEvent, newValue, activeIndex);
|
|
16541
|
+
}
|
|
16542
|
+
}
|
|
16543
|
+
moveCount.current = 0;
|
|
16544
|
+
const doc = ownerDocument(sliderRef.current);
|
|
16545
|
+
doc.addEventListener("touchmove", handleTouchMove, {
|
|
16546
|
+
passive: true
|
|
16547
|
+
});
|
|
16548
|
+
doc.addEventListener("touchend", handleTouchEnd, {
|
|
16549
|
+
passive: true
|
|
16550
|
+
});
|
|
16551
|
+
});
|
|
16552
|
+
const stopListening = React.useCallback(() => {
|
|
16553
|
+
const doc = ownerDocument(sliderRef.current);
|
|
16554
|
+
doc.removeEventListener("mousemove", handleTouchMove);
|
|
16555
|
+
doc.removeEventListener("mouseup", handleTouchEnd);
|
|
16556
|
+
doc.removeEventListener("touchmove", handleTouchMove);
|
|
16557
|
+
doc.removeEventListener("touchend", handleTouchEnd);
|
|
16558
|
+
}, [handleTouchEnd, handleTouchMove]);
|
|
16559
|
+
React.useEffect(() => {
|
|
16560
|
+
const {
|
|
16561
|
+
current: slider
|
|
16562
|
+
} = sliderRef;
|
|
16563
|
+
slider.addEventListener("touchstart", handleTouchStart, {
|
|
16564
|
+
passive: doesSupportTouchActionNone()
|
|
16565
|
+
});
|
|
16566
|
+
return () => {
|
|
16567
|
+
slider.removeEventListener("touchstart", handleTouchStart);
|
|
16568
|
+
stopListening();
|
|
16569
|
+
};
|
|
16570
|
+
}, [stopListening, handleTouchStart]);
|
|
16571
|
+
React.useEffect(() => {
|
|
16572
|
+
if (disabled) {
|
|
16573
|
+
stopListening();
|
|
16574
|
+
}
|
|
16575
|
+
}, [disabled, stopListening]);
|
|
16576
|
+
const createHandleMouseDown = (otherHandlers) => (event) => {
|
|
16577
|
+
var _a;
|
|
16578
|
+
(_a = otherHandlers.onMouseDown) == null ? void 0 : _a.call(otherHandlers, event);
|
|
16579
|
+
if (disabled) {
|
|
16580
|
+
return;
|
|
16581
|
+
}
|
|
16582
|
+
if (event.defaultPrevented) {
|
|
16583
|
+
return;
|
|
16584
|
+
}
|
|
16585
|
+
if (event.button !== 0) {
|
|
16586
|
+
return;
|
|
16587
|
+
}
|
|
16588
|
+
event.preventDefault();
|
|
16589
|
+
const finger = trackFinger(event, touchId);
|
|
16590
|
+
if (finger !== false) {
|
|
16591
|
+
const {
|
|
16592
|
+
newValue,
|
|
16593
|
+
activeIndex
|
|
16594
|
+
} = getFingerNewValue({
|
|
16595
|
+
finger
|
|
16596
|
+
});
|
|
16597
|
+
focusThumb({
|
|
16598
|
+
sliderRef,
|
|
16599
|
+
activeIndex,
|
|
16600
|
+
setActive
|
|
16601
|
+
});
|
|
16602
|
+
setValueState(newValue);
|
|
16603
|
+
if (handleChange && !areValuesEqual(newValue, valueDerived)) {
|
|
16604
|
+
handleChange(event, newValue, activeIndex);
|
|
16605
|
+
}
|
|
16606
|
+
}
|
|
16607
|
+
moveCount.current = 0;
|
|
16608
|
+
const doc = ownerDocument(sliderRef.current);
|
|
16609
|
+
doc.addEventListener("mousemove", handleTouchMove, {
|
|
16610
|
+
passive: true
|
|
16611
|
+
});
|
|
16612
|
+
doc.addEventListener("mouseup", handleTouchEnd);
|
|
16613
|
+
};
|
|
16614
|
+
const trackOffset = valueToPercent(range ? values2[0] : min, min, max);
|
|
16615
|
+
const trackLeap = valueToPercent(values2[values2.length - 1], min, max) - trackOffset;
|
|
16616
|
+
const getRootProps = (externalProps = {}) => {
|
|
16617
|
+
const externalHandlers = extractEventHandlers(externalProps);
|
|
16618
|
+
const ownEventHandlers = {
|
|
16619
|
+
onMouseDown: createHandleMouseDown(externalHandlers || {})
|
|
16620
|
+
};
|
|
16621
|
+
const mergedEventHandlers = {
|
|
16622
|
+
...externalHandlers,
|
|
16623
|
+
...ownEventHandlers
|
|
16624
|
+
};
|
|
16625
|
+
return {
|
|
16626
|
+
...externalProps,
|
|
16627
|
+
ref: handleRef,
|
|
16628
|
+
...mergedEventHandlers
|
|
16629
|
+
};
|
|
16630
|
+
};
|
|
16631
|
+
const createHandleMouseOver = (otherHandlers) => (event) => {
|
|
16632
|
+
var _a;
|
|
16633
|
+
(_a = otherHandlers.onMouseOver) == null ? void 0 : _a.call(otherHandlers, event);
|
|
16634
|
+
const index = Number(event.currentTarget.getAttribute("data-index"));
|
|
16635
|
+
setOpen(index);
|
|
16636
|
+
};
|
|
16637
|
+
const createHandleMouseLeave = (otherHandlers) => (event) => {
|
|
16638
|
+
var _a;
|
|
16639
|
+
(_a = otherHandlers.onMouseLeave) == null ? void 0 : _a.call(otherHandlers, event);
|
|
16640
|
+
setOpen(-1);
|
|
16641
|
+
};
|
|
16642
|
+
const getThumbProps = (externalProps = {}) => {
|
|
16643
|
+
const externalHandlers = extractEventHandlers(externalProps);
|
|
16644
|
+
const ownEventHandlers = {
|
|
16645
|
+
onMouseOver: createHandleMouseOver(externalHandlers || {}),
|
|
16646
|
+
onMouseLeave: createHandleMouseLeave(externalHandlers || {})
|
|
16647
|
+
};
|
|
16648
|
+
return {
|
|
16649
|
+
...externalProps,
|
|
16650
|
+
...externalHandlers,
|
|
16651
|
+
...ownEventHandlers
|
|
16652
|
+
};
|
|
16653
|
+
};
|
|
16654
|
+
const getThumbStyle = (index) => {
|
|
16655
|
+
return {
|
|
16656
|
+
// So the non active thumb doesn't show its label on hover.
|
|
16657
|
+
pointerEvents: active !== -1 && active !== index ? "none" : void 0
|
|
16658
|
+
};
|
|
16659
|
+
};
|
|
16660
|
+
let cssWritingMode;
|
|
16661
|
+
if (orientation === "vertical") {
|
|
16662
|
+
cssWritingMode = isRtl ? "vertical-rl" : "vertical-lr";
|
|
16663
|
+
}
|
|
16664
|
+
const getHiddenInputProps = (externalProps = {}) => {
|
|
16665
|
+
const externalHandlers = extractEventHandlers(externalProps);
|
|
16666
|
+
const ownEventHandlers = {
|
|
16667
|
+
onChange: createHandleHiddenInputChange(externalHandlers || {}),
|
|
16668
|
+
onFocus: createHandleHiddenInputFocus(externalHandlers || {}),
|
|
16669
|
+
onBlur: createHandleHiddenInputBlur(externalHandlers || {}),
|
|
16670
|
+
onKeyDown: createHandleHiddenInputKeyDown(externalHandlers || {})
|
|
16671
|
+
};
|
|
16672
|
+
const mergedEventHandlers = {
|
|
16673
|
+
...externalHandlers,
|
|
16674
|
+
...ownEventHandlers
|
|
16675
|
+
};
|
|
16676
|
+
return {
|
|
16677
|
+
tabIndex,
|
|
16678
|
+
"aria-labelledby": ariaLabelledby,
|
|
16679
|
+
"aria-orientation": orientation,
|
|
16680
|
+
"aria-valuemax": scale(max),
|
|
16681
|
+
"aria-valuemin": scale(min),
|
|
16682
|
+
name,
|
|
16683
|
+
type: "range",
|
|
16684
|
+
min: parameters.min,
|
|
16685
|
+
max: parameters.max,
|
|
16686
|
+
step: parameters.step === null && parameters.marks ? "any" : parameters.step ?? void 0,
|
|
16687
|
+
disabled,
|
|
16688
|
+
...externalProps,
|
|
16689
|
+
...mergedEventHandlers,
|
|
16690
|
+
style: {
|
|
16691
|
+
...visuallyHidden,
|
|
16692
|
+
direction: isRtl ? "rtl" : "ltr",
|
|
16693
|
+
// So that VoiceOver's focus indicator matches the thumb's dimensions
|
|
16694
|
+
width: "100%",
|
|
16695
|
+
height: "100%",
|
|
16696
|
+
writingMode: cssWritingMode
|
|
16697
|
+
}
|
|
16698
|
+
};
|
|
16699
|
+
};
|
|
16700
|
+
return {
|
|
16701
|
+
active,
|
|
16702
|
+
axis,
|
|
16703
|
+
axisProps,
|
|
16704
|
+
dragging,
|
|
16705
|
+
focusedThumbIndex,
|
|
16706
|
+
getHiddenInputProps,
|
|
16707
|
+
getRootProps,
|
|
16708
|
+
getThumbProps,
|
|
16709
|
+
marks,
|
|
16710
|
+
open,
|
|
16711
|
+
range,
|
|
16712
|
+
rootRef: handleRef,
|
|
16713
|
+
trackLeap,
|
|
16714
|
+
trackOffset,
|
|
16715
|
+
values: values2,
|
|
16716
|
+
getThumbStyle
|
|
16717
|
+
};
|
|
16718
|
+
}
|
|
16719
|
+
const shouldSpreadAdditionalProps = (Slot) => {
|
|
16720
|
+
return !Slot || !isHostComponent(Slot);
|
|
16721
|
+
};
|
|
16722
|
+
function getSliderUtilityClass(slot) {
|
|
16723
|
+
return generateUtilityClass("MuiSlider", slot);
|
|
16724
|
+
}
|
|
16725
|
+
const sliderClasses = generateUtilityClasses("MuiSlider", ["root", "active", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "disabled", "dragging", "focusVisible", "mark", "markActive", "marked", "markLabel", "markLabelActive", "rail", "sizeSmall", "thumb", "thumbColorPrimary", "thumbColorSecondary", "thumbColorError", "thumbColorSuccess", "thumbColorInfo", "thumbColorWarning", "track", "trackInverted", "trackFalse", "thumbSizeSmall", "valueLabel", "valueLabelOpen", "valueLabelCircle", "valueLabelLabel", "vertical"]);
|
|
16726
|
+
const useValueLabelClasses = (props) => {
|
|
16727
|
+
const {
|
|
16728
|
+
open
|
|
16729
|
+
} = props;
|
|
16730
|
+
const utilityClasses = {
|
|
16731
|
+
offset: clsx(open && sliderClasses.valueLabelOpen),
|
|
16732
|
+
circle: sliderClasses.valueLabelCircle,
|
|
16733
|
+
label: sliderClasses.valueLabelLabel
|
|
16734
|
+
};
|
|
16735
|
+
return utilityClasses;
|
|
16736
|
+
};
|
|
16737
|
+
function SliderValueLabel$1(props) {
|
|
16738
|
+
const {
|
|
16739
|
+
children,
|
|
16740
|
+
className,
|
|
16741
|
+
value
|
|
16742
|
+
} = props;
|
|
16743
|
+
const classes = useValueLabelClasses(props);
|
|
16744
|
+
if (!children) {
|
|
16745
|
+
return null;
|
|
16746
|
+
}
|
|
16747
|
+
return /* @__PURE__ */ React.cloneElement(children, {
|
|
16748
|
+
className: children.props.className
|
|
16749
|
+
}, /* @__PURE__ */ jsxs(React.Fragment, {
|
|
16750
|
+
children: [children.props.children, /* @__PURE__ */ jsx$1("span", {
|
|
16751
|
+
className: clsx(classes.offset, className),
|
|
16752
|
+
"aria-hidden": true,
|
|
16753
|
+
children: /* @__PURE__ */ jsx$1("span", {
|
|
16754
|
+
className: classes.circle,
|
|
16755
|
+
children: /* @__PURE__ */ jsx$1("span", {
|
|
16756
|
+
className: classes.label,
|
|
16757
|
+
children: value
|
|
16758
|
+
})
|
|
16759
|
+
})
|
|
16760
|
+
})]
|
|
16761
|
+
}));
|
|
16762
|
+
}
|
|
16763
|
+
process.env.NODE_ENV !== "production" ? SliderValueLabel$1.propTypes = {
|
|
16764
|
+
children: PropTypes.element.isRequired,
|
|
16765
|
+
className: PropTypes.string,
|
|
16766
|
+
value: PropTypes.node
|
|
16767
|
+
} : void 0;
|
|
16768
|
+
function Identity(x) {
|
|
16769
|
+
return x;
|
|
16770
|
+
}
|
|
16771
|
+
const SliderRoot = styled("span", {
|
|
16772
|
+
name: "MuiSlider",
|
|
16773
|
+
slot: "Root",
|
|
16774
|
+
overridesResolver: (props, styles2) => {
|
|
16775
|
+
const {
|
|
16776
|
+
ownerState
|
|
16777
|
+
} = props;
|
|
16778
|
+
return [styles2.root, styles2[`color${capitalize(ownerState.color)}`], ownerState.size !== "medium" && styles2[`size${capitalize(ownerState.size)}`], ownerState.marked && styles2.marked, ownerState.orientation === "vertical" && styles2.vertical, ownerState.track === "inverted" && styles2.trackInverted, ownerState.track === false && styles2.trackFalse];
|
|
16779
|
+
}
|
|
16780
|
+
})(memoTheme(({
|
|
16781
|
+
theme
|
|
16782
|
+
}) => ({
|
|
16783
|
+
borderRadius: 12,
|
|
16784
|
+
boxSizing: "content-box",
|
|
16785
|
+
display: "inline-block",
|
|
16786
|
+
position: "relative",
|
|
16787
|
+
cursor: "pointer",
|
|
16788
|
+
touchAction: "none",
|
|
16789
|
+
WebkitTapHighlightColor: "transparent",
|
|
16790
|
+
"@media print": {
|
|
16791
|
+
colorAdjust: "exact"
|
|
16792
|
+
},
|
|
16793
|
+
[`&.${sliderClasses.disabled}`]: {
|
|
16794
|
+
pointerEvents: "none",
|
|
16795
|
+
cursor: "default",
|
|
16796
|
+
color: (theme.vars || theme).palette.grey[400]
|
|
16797
|
+
},
|
|
16798
|
+
[`&.${sliderClasses.dragging}`]: {
|
|
16799
|
+
[`& .${sliderClasses.thumb}, & .${sliderClasses.track}`]: {
|
|
16800
|
+
transition: "none"
|
|
16801
|
+
}
|
|
16802
|
+
},
|
|
16803
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
16804
|
+
props: {
|
|
16805
|
+
color: color2
|
|
16806
|
+
},
|
|
16807
|
+
style: {
|
|
16808
|
+
color: (theme.vars || theme).palette[color2].main
|
|
16809
|
+
}
|
|
16810
|
+
})), {
|
|
16811
|
+
props: {
|
|
16812
|
+
orientation: "horizontal"
|
|
16813
|
+
},
|
|
16814
|
+
style: {
|
|
16815
|
+
height: 4,
|
|
16816
|
+
width: "100%",
|
|
16817
|
+
padding: "13px 0",
|
|
16818
|
+
// The primary input mechanism of the device includes a pointing device of limited accuracy.
|
|
16819
|
+
"@media (pointer: coarse)": {
|
|
16820
|
+
// Reach 42px touch target, about ~8mm on screen.
|
|
16821
|
+
padding: "20px 0"
|
|
16822
|
+
}
|
|
16823
|
+
}
|
|
16824
|
+
}, {
|
|
16825
|
+
props: {
|
|
16826
|
+
orientation: "horizontal",
|
|
16827
|
+
size: "small"
|
|
16828
|
+
},
|
|
16829
|
+
style: {
|
|
16830
|
+
height: 2
|
|
16831
|
+
}
|
|
16832
|
+
}, {
|
|
16833
|
+
props: {
|
|
16834
|
+
orientation: "horizontal",
|
|
16835
|
+
marked: true
|
|
16836
|
+
},
|
|
16837
|
+
style: {
|
|
16838
|
+
marginBottom: 20
|
|
16839
|
+
}
|
|
16840
|
+
}, {
|
|
16841
|
+
props: {
|
|
16842
|
+
orientation: "vertical"
|
|
16843
|
+
},
|
|
16844
|
+
style: {
|
|
16845
|
+
height: "100%",
|
|
16846
|
+
width: 4,
|
|
16847
|
+
padding: "0 13px",
|
|
16848
|
+
// The primary input mechanism of the device includes a pointing device of limited accuracy.
|
|
16849
|
+
"@media (pointer: coarse)": {
|
|
16850
|
+
// Reach 42px touch target, about ~8mm on screen.
|
|
16851
|
+
padding: "0 20px"
|
|
16852
|
+
}
|
|
16853
|
+
}
|
|
16854
|
+
}, {
|
|
16855
|
+
props: {
|
|
16856
|
+
orientation: "vertical",
|
|
16857
|
+
size: "small"
|
|
16858
|
+
},
|
|
16859
|
+
style: {
|
|
16860
|
+
width: 2
|
|
16861
|
+
}
|
|
16862
|
+
}, {
|
|
16863
|
+
props: {
|
|
16864
|
+
orientation: "vertical",
|
|
16865
|
+
marked: true
|
|
16866
|
+
},
|
|
16867
|
+
style: {
|
|
16868
|
+
marginRight: 44
|
|
16869
|
+
}
|
|
16870
|
+
}]
|
|
16871
|
+
})));
|
|
16872
|
+
const SliderRail = styled("span", {
|
|
16873
|
+
name: "MuiSlider",
|
|
16874
|
+
slot: "Rail"
|
|
16875
|
+
})({
|
|
16876
|
+
display: "block",
|
|
16877
|
+
position: "absolute",
|
|
16878
|
+
borderRadius: "inherit",
|
|
16879
|
+
backgroundColor: "currentColor",
|
|
16880
|
+
opacity: 0.38,
|
|
16881
|
+
variants: [{
|
|
16882
|
+
props: {
|
|
16883
|
+
orientation: "horizontal"
|
|
16884
|
+
},
|
|
16885
|
+
style: {
|
|
16886
|
+
width: "100%",
|
|
16887
|
+
height: "inherit",
|
|
16888
|
+
top: "50%",
|
|
16889
|
+
transform: "translateY(-50%)"
|
|
16890
|
+
}
|
|
16891
|
+
}, {
|
|
16892
|
+
props: {
|
|
16893
|
+
orientation: "vertical"
|
|
16894
|
+
},
|
|
16895
|
+
style: {
|
|
16896
|
+
height: "100%",
|
|
16897
|
+
width: "inherit",
|
|
16898
|
+
left: "50%",
|
|
16899
|
+
transform: "translateX(-50%)"
|
|
16900
|
+
}
|
|
16901
|
+
}, {
|
|
16902
|
+
props: {
|
|
16903
|
+
track: "inverted"
|
|
16904
|
+
},
|
|
16905
|
+
style: {
|
|
16906
|
+
opacity: 1
|
|
16907
|
+
}
|
|
16908
|
+
}]
|
|
16909
|
+
});
|
|
16910
|
+
const SliderTrack = styled("span", {
|
|
16911
|
+
name: "MuiSlider",
|
|
16912
|
+
slot: "Track"
|
|
16913
|
+
})(memoTheme(({
|
|
16914
|
+
theme
|
|
16915
|
+
}) => {
|
|
16916
|
+
return {
|
|
16917
|
+
display: "block",
|
|
16918
|
+
position: "absolute",
|
|
16919
|
+
borderRadius: "inherit",
|
|
16920
|
+
border: "1px solid currentColor",
|
|
16921
|
+
backgroundColor: "currentColor",
|
|
16922
|
+
transition: theme.transitions.create(["left", "width", "bottom", "height"], {
|
|
16923
|
+
duration: theme.transitions.duration.shortest
|
|
16924
|
+
}),
|
|
16925
|
+
variants: [{
|
|
16926
|
+
props: {
|
|
16927
|
+
size: "small"
|
|
16928
|
+
},
|
|
16929
|
+
style: {
|
|
16930
|
+
border: "none"
|
|
16931
|
+
}
|
|
16932
|
+
}, {
|
|
16933
|
+
props: {
|
|
16934
|
+
orientation: "horizontal"
|
|
16935
|
+
},
|
|
16936
|
+
style: {
|
|
16937
|
+
height: "inherit",
|
|
16938
|
+
top: "50%",
|
|
16939
|
+
transform: "translateY(-50%)"
|
|
16940
|
+
}
|
|
16941
|
+
}, {
|
|
16942
|
+
props: {
|
|
16943
|
+
orientation: "vertical"
|
|
16944
|
+
},
|
|
16945
|
+
style: {
|
|
16946
|
+
width: "inherit",
|
|
16947
|
+
left: "50%",
|
|
16948
|
+
transform: "translateX(-50%)"
|
|
16949
|
+
}
|
|
16950
|
+
}, {
|
|
16951
|
+
props: {
|
|
16952
|
+
track: false
|
|
16953
|
+
},
|
|
16954
|
+
style: {
|
|
16955
|
+
display: "none"
|
|
16956
|
+
}
|
|
16957
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
16958
|
+
props: {
|
|
16959
|
+
color: color2,
|
|
16960
|
+
track: "inverted"
|
|
16961
|
+
},
|
|
16962
|
+
style: {
|
|
16963
|
+
...theme.vars ? {
|
|
16964
|
+
backgroundColor: theme.vars.palette.Slider[`${color2}Track`],
|
|
16965
|
+
borderColor: theme.vars.palette.Slider[`${color2}Track`]
|
|
16966
|
+
} : {
|
|
16967
|
+
backgroundColor: theme.lighten(theme.palette[color2].main, 0.62),
|
|
16968
|
+
borderColor: theme.lighten(theme.palette[color2].main, 0.62),
|
|
16969
|
+
...theme.applyStyles("dark", {
|
|
16970
|
+
backgroundColor: theme.darken(theme.palette[color2].main, 0.5)
|
|
16971
|
+
}),
|
|
16972
|
+
...theme.applyStyles("dark", {
|
|
16973
|
+
borderColor: theme.darken(theme.palette[color2].main, 0.5)
|
|
16974
|
+
})
|
|
16975
|
+
}
|
|
16976
|
+
}
|
|
16977
|
+
}))]
|
|
16978
|
+
};
|
|
16979
|
+
}));
|
|
16980
|
+
const SliderThumb = styled("span", {
|
|
16981
|
+
name: "MuiSlider",
|
|
16982
|
+
slot: "Thumb",
|
|
16983
|
+
overridesResolver: (props, styles2) => {
|
|
16984
|
+
const {
|
|
16985
|
+
ownerState
|
|
16986
|
+
} = props;
|
|
16987
|
+
return [styles2.thumb, styles2[`thumbColor${capitalize(ownerState.color)}`], ownerState.size !== "medium" && styles2[`thumbSize${capitalize(ownerState.size)}`]];
|
|
16988
|
+
}
|
|
16989
|
+
})(memoTheme(({
|
|
16990
|
+
theme
|
|
16991
|
+
}) => ({
|
|
16992
|
+
position: "absolute",
|
|
16993
|
+
width: 20,
|
|
16994
|
+
height: 20,
|
|
16995
|
+
boxSizing: "border-box",
|
|
16996
|
+
borderRadius: "50%",
|
|
16997
|
+
outline: 0,
|
|
16998
|
+
backgroundColor: "currentColor",
|
|
16999
|
+
display: "flex",
|
|
17000
|
+
alignItems: "center",
|
|
17001
|
+
justifyContent: "center",
|
|
17002
|
+
transition: theme.transitions.create(["box-shadow", "left", "bottom"], {
|
|
17003
|
+
duration: theme.transitions.duration.shortest
|
|
17004
|
+
}),
|
|
17005
|
+
"&::before": {
|
|
17006
|
+
position: "absolute",
|
|
17007
|
+
content: '""',
|
|
17008
|
+
borderRadius: "inherit",
|
|
17009
|
+
width: "100%",
|
|
17010
|
+
height: "100%",
|
|
17011
|
+
boxShadow: (theme.vars || theme).shadows[2]
|
|
17012
|
+
},
|
|
17013
|
+
"&::after": {
|
|
17014
|
+
position: "absolute",
|
|
17015
|
+
content: '""',
|
|
17016
|
+
borderRadius: "50%",
|
|
17017
|
+
// 42px is the hit target
|
|
17018
|
+
width: 42,
|
|
17019
|
+
height: 42,
|
|
17020
|
+
top: "50%",
|
|
17021
|
+
left: "50%",
|
|
17022
|
+
transform: "translate(-50%, -50%)"
|
|
17023
|
+
},
|
|
17024
|
+
[`&.${sliderClasses.disabled}`]: {
|
|
17025
|
+
"&:hover": {
|
|
17026
|
+
boxShadow: "none"
|
|
17027
|
+
}
|
|
17028
|
+
},
|
|
17029
|
+
variants: [{
|
|
17030
|
+
props: {
|
|
17031
|
+
size: "small"
|
|
17032
|
+
},
|
|
17033
|
+
style: {
|
|
17034
|
+
width: 12,
|
|
17035
|
+
height: 12,
|
|
17036
|
+
"&::before": {
|
|
17037
|
+
boxShadow: "none"
|
|
17038
|
+
}
|
|
17039
|
+
}
|
|
17040
|
+
}, {
|
|
17041
|
+
props: {
|
|
17042
|
+
orientation: "horizontal"
|
|
17043
|
+
},
|
|
17044
|
+
style: {
|
|
17045
|
+
top: "50%",
|
|
17046
|
+
transform: "translate(-50%, -50%)"
|
|
17047
|
+
}
|
|
17048
|
+
}, {
|
|
17049
|
+
props: {
|
|
17050
|
+
orientation: "vertical"
|
|
17051
|
+
},
|
|
17052
|
+
style: {
|
|
17053
|
+
left: "50%",
|
|
17054
|
+
transform: "translate(-50%, 50%)"
|
|
17055
|
+
}
|
|
17056
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
17057
|
+
props: {
|
|
17058
|
+
color: color2
|
|
17059
|
+
},
|
|
17060
|
+
style: {
|
|
17061
|
+
[`&:hover, &.${sliderClasses.focusVisible}`]: {
|
|
17062
|
+
boxShadow: `0px 0px 0px 8px ${theme.alpha((theme.vars || theme).palette[color2].main, 0.16)}`,
|
|
17063
|
+
"@media (hover: none)": {
|
|
17064
|
+
boxShadow: "none"
|
|
17065
|
+
}
|
|
17066
|
+
},
|
|
17067
|
+
[`&.${sliderClasses.active}`]: {
|
|
17068
|
+
boxShadow: `0px 0px 0px 14px ${theme.alpha((theme.vars || theme).palette[color2].main, 0.16)}`
|
|
17069
|
+
}
|
|
17070
|
+
}
|
|
17071
|
+
}))]
|
|
17072
|
+
})));
|
|
17073
|
+
const SliderValueLabel = styled(SliderValueLabel$1, {
|
|
17074
|
+
name: "MuiSlider",
|
|
17075
|
+
slot: "ValueLabel"
|
|
17076
|
+
})(memoTheme(({
|
|
17077
|
+
theme
|
|
17078
|
+
}) => ({
|
|
17079
|
+
zIndex: 1,
|
|
17080
|
+
whiteSpace: "nowrap",
|
|
17081
|
+
...theme.typography.body2,
|
|
17082
|
+
fontWeight: 500,
|
|
17083
|
+
transition: theme.transitions.create(["transform"], {
|
|
17084
|
+
duration: theme.transitions.duration.shortest
|
|
17085
|
+
}),
|
|
17086
|
+
position: "absolute",
|
|
17087
|
+
backgroundColor: (theme.vars || theme).palette.grey[600],
|
|
17088
|
+
borderRadius: 2,
|
|
17089
|
+
color: (theme.vars || theme).palette.common.white,
|
|
17090
|
+
display: "flex",
|
|
17091
|
+
alignItems: "center",
|
|
17092
|
+
justifyContent: "center",
|
|
17093
|
+
padding: "0.25rem 0.75rem",
|
|
17094
|
+
variants: [{
|
|
17095
|
+
props: {
|
|
17096
|
+
orientation: "horizontal"
|
|
17097
|
+
},
|
|
17098
|
+
style: {
|
|
17099
|
+
transform: "translateY(-100%) scale(0)",
|
|
17100
|
+
top: "-10px",
|
|
17101
|
+
transformOrigin: "bottom center",
|
|
17102
|
+
"&::before": {
|
|
17103
|
+
position: "absolute",
|
|
17104
|
+
content: '""',
|
|
17105
|
+
width: 8,
|
|
17106
|
+
height: 8,
|
|
17107
|
+
transform: "translate(-50%, 50%) rotate(45deg)",
|
|
17108
|
+
backgroundColor: "inherit",
|
|
17109
|
+
bottom: 0,
|
|
17110
|
+
left: "50%"
|
|
17111
|
+
},
|
|
17112
|
+
[`&.${sliderClasses.valueLabelOpen}`]: {
|
|
17113
|
+
transform: "translateY(-100%) scale(1)"
|
|
17114
|
+
}
|
|
17115
|
+
}
|
|
17116
|
+
}, {
|
|
17117
|
+
props: {
|
|
17118
|
+
orientation: "vertical"
|
|
17119
|
+
},
|
|
17120
|
+
style: {
|
|
17121
|
+
transform: "translateY(-50%) scale(0)",
|
|
17122
|
+
right: "30px",
|
|
17123
|
+
top: "50%",
|
|
17124
|
+
transformOrigin: "right center",
|
|
17125
|
+
"&::before": {
|
|
17126
|
+
position: "absolute",
|
|
17127
|
+
content: '""',
|
|
17128
|
+
width: 8,
|
|
17129
|
+
height: 8,
|
|
17130
|
+
transform: "translate(-50%, -50%) rotate(45deg)",
|
|
17131
|
+
backgroundColor: "inherit",
|
|
17132
|
+
right: -8,
|
|
17133
|
+
top: "50%"
|
|
17134
|
+
},
|
|
17135
|
+
[`&.${sliderClasses.valueLabelOpen}`]: {
|
|
17136
|
+
transform: "translateY(-50%) scale(1)"
|
|
17137
|
+
}
|
|
17138
|
+
}
|
|
17139
|
+
}, {
|
|
17140
|
+
props: {
|
|
17141
|
+
size: "small"
|
|
17142
|
+
},
|
|
17143
|
+
style: {
|
|
17144
|
+
fontSize: theme.typography.pxToRem(12),
|
|
17145
|
+
padding: "0.25rem 0.5rem"
|
|
17146
|
+
}
|
|
17147
|
+
}, {
|
|
17148
|
+
props: {
|
|
17149
|
+
orientation: "vertical",
|
|
17150
|
+
size: "small"
|
|
17151
|
+
},
|
|
17152
|
+
style: {
|
|
17153
|
+
right: "20px"
|
|
17154
|
+
}
|
|
17155
|
+
}]
|
|
17156
|
+
})));
|
|
17157
|
+
process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes = {
|
|
17158
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
17159
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
17160
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
17161
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
17162
|
+
/**
|
|
17163
|
+
* @ignore
|
|
17164
|
+
*/
|
|
17165
|
+
children: PropTypes.element.isRequired,
|
|
17166
|
+
/**
|
|
17167
|
+
* @ignore
|
|
17168
|
+
*/
|
|
17169
|
+
index: PropTypes.number.isRequired,
|
|
17170
|
+
/**
|
|
17171
|
+
* @ignore
|
|
17172
|
+
*/
|
|
17173
|
+
open: PropTypes.bool.isRequired,
|
|
17174
|
+
/**
|
|
17175
|
+
* @ignore
|
|
17176
|
+
*/
|
|
17177
|
+
value: PropTypes.node
|
|
17178
|
+
} : void 0;
|
|
17179
|
+
const SliderMark = styled("span", {
|
|
17180
|
+
name: "MuiSlider",
|
|
17181
|
+
slot: "Mark",
|
|
17182
|
+
shouldForwardProp: (prop) => slotShouldForwardProp(prop) && prop !== "markActive",
|
|
17183
|
+
overridesResolver: (props, styles2) => {
|
|
17184
|
+
const {
|
|
17185
|
+
markActive
|
|
17186
|
+
} = props;
|
|
17187
|
+
return [styles2.mark, markActive && styles2.markActive];
|
|
17188
|
+
}
|
|
17189
|
+
})(memoTheme(({
|
|
17190
|
+
theme
|
|
17191
|
+
}) => ({
|
|
17192
|
+
position: "absolute",
|
|
17193
|
+
width: 2,
|
|
17194
|
+
height: 2,
|
|
17195
|
+
borderRadius: 1,
|
|
17196
|
+
backgroundColor: "currentColor",
|
|
17197
|
+
variants: [{
|
|
17198
|
+
props: {
|
|
17199
|
+
orientation: "horizontal"
|
|
17200
|
+
},
|
|
17201
|
+
style: {
|
|
17202
|
+
top: "50%",
|
|
17203
|
+
transform: "translate(-1px, -50%)"
|
|
17204
|
+
}
|
|
17205
|
+
}, {
|
|
17206
|
+
props: {
|
|
17207
|
+
orientation: "vertical"
|
|
17208
|
+
},
|
|
17209
|
+
style: {
|
|
17210
|
+
left: "50%",
|
|
17211
|
+
transform: "translate(-50%, 1px)"
|
|
17212
|
+
}
|
|
17213
|
+
}, {
|
|
17214
|
+
props: {
|
|
17215
|
+
markActive: true
|
|
17216
|
+
},
|
|
17217
|
+
style: {
|
|
17218
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
17219
|
+
opacity: 0.8
|
|
17220
|
+
}
|
|
17221
|
+
}]
|
|
17222
|
+
})));
|
|
17223
|
+
const SliderMarkLabel = styled("span", {
|
|
17224
|
+
name: "MuiSlider",
|
|
17225
|
+
slot: "MarkLabel",
|
|
17226
|
+
shouldForwardProp: (prop) => slotShouldForwardProp(prop) && prop !== "markLabelActive"
|
|
17227
|
+
})(memoTheme(({
|
|
17228
|
+
theme
|
|
17229
|
+
}) => ({
|
|
17230
|
+
...theme.typography.body2,
|
|
17231
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
17232
|
+
position: "absolute",
|
|
17233
|
+
whiteSpace: "nowrap",
|
|
17234
|
+
variants: [{
|
|
17235
|
+
props: {
|
|
17236
|
+
orientation: "horizontal"
|
|
17237
|
+
},
|
|
17238
|
+
style: {
|
|
17239
|
+
top: 30,
|
|
17240
|
+
transform: "translateX(-50%)",
|
|
17241
|
+
"@media (pointer: coarse)": {
|
|
17242
|
+
top: 40
|
|
17243
|
+
}
|
|
17244
|
+
}
|
|
17245
|
+
}, {
|
|
17246
|
+
props: {
|
|
17247
|
+
orientation: "vertical"
|
|
17248
|
+
},
|
|
17249
|
+
style: {
|
|
17250
|
+
left: 36,
|
|
17251
|
+
transform: "translateY(50%)",
|
|
17252
|
+
"@media (pointer: coarse)": {
|
|
17253
|
+
left: 44
|
|
17254
|
+
}
|
|
17255
|
+
}
|
|
17256
|
+
}, {
|
|
17257
|
+
props: {
|
|
17258
|
+
markLabelActive: true
|
|
17259
|
+
},
|
|
17260
|
+
style: {
|
|
17261
|
+
color: (theme.vars || theme).palette.text.primary
|
|
17262
|
+
}
|
|
17263
|
+
}]
|
|
17264
|
+
})));
|
|
17265
|
+
const useUtilityClasses = (ownerState) => {
|
|
17266
|
+
const {
|
|
17267
|
+
disabled,
|
|
17268
|
+
dragging,
|
|
17269
|
+
marked,
|
|
17270
|
+
orientation,
|
|
17271
|
+
track,
|
|
17272
|
+
classes,
|
|
17273
|
+
color: color2,
|
|
17274
|
+
size
|
|
17275
|
+
} = ownerState;
|
|
17276
|
+
const slots = {
|
|
17277
|
+
root: ["root", disabled && "disabled", dragging && "dragging", marked && "marked", orientation === "vertical" && "vertical", track === "inverted" && "trackInverted", track === false && "trackFalse", color2 && `color${capitalize(color2)}`, size && `size${capitalize(size)}`],
|
|
17278
|
+
rail: ["rail"],
|
|
17279
|
+
track: ["track"],
|
|
17280
|
+
mark: ["mark"],
|
|
17281
|
+
markActive: ["markActive"],
|
|
17282
|
+
markLabel: ["markLabel"],
|
|
17283
|
+
markLabelActive: ["markLabelActive"],
|
|
17284
|
+
valueLabel: ["valueLabel"],
|
|
17285
|
+
thumb: ["thumb", disabled && "disabled", size && `thumbSize${capitalize(size)}`, color2 && `thumbColor${capitalize(color2)}`],
|
|
17286
|
+
active: ["active"],
|
|
17287
|
+
disabled: ["disabled"],
|
|
17288
|
+
focusVisible: ["focusVisible"]
|
|
17289
|
+
};
|
|
17290
|
+
return composeClasses(slots, getSliderUtilityClass, classes);
|
|
17291
|
+
};
|
|
17292
|
+
const Forward = ({
|
|
17293
|
+
children
|
|
17294
|
+
}) => children;
|
|
17295
|
+
const Slider = /* @__PURE__ */ React.forwardRef(function Slider2(inputProps, ref) {
|
|
17296
|
+
const props = useDefaultProps({
|
|
17297
|
+
props: inputProps,
|
|
17298
|
+
name: "MuiSlider"
|
|
17299
|
+
});
|
|
17300
|
+
const isRtl = useRtl();
|
|
17301
|
+
const {
|
|
17302
|
+
"aria-label": ariaLabel,
|
|
17303
|
+
"aria-valuetext": ariaValuetext,
|
|
17304
|
+
"aria-labelledby": ariaLabelledby,
|
|
17305
|
+
// eslint-disable-next-line react/prop-types
|
|
17306
|
+
component = "span",
|
|
17307
|
+
components = {},
|
|
17308
|
+
componentsProps = {},
|
|
17309
|
+
color: color2 = "primary",
|
|
17310
|
+
classes: classesProp,
|
|
17311
|
+
className,
|
|
17312
|
+
disableSwap = false,
|
|
17313
|
+
disabled = false,
|
|
17314
|
+
getAriaLabel,
|
|
17315
|
+
getAriaValueText,
|
|
17316
|
+
marks: marksProp = false,
|
|
17317
|
+
max = 100,
|
|
17318
|
+
min = 0,
|
|
17319
|
+
name,
|
|
17320
|
+
onChange,
|
|
17321
|
+
onChangeCommitted,
|
|
17322
|
+
orientation = "horizontal",
|
|
17323
|
+
shiftStep = 10,
|
|
17324
|
+
size = "medium",
|
|
17325
|
+
step = 1,
|
|
17326
|
+
scale = Identity,
|
|
17327
|
+
slotProps,
|
|
17328
|
+
slots,
|
|
17329
|
+
tabIndex,
|
|
17330
|
+
track = "normal",
|
|
17331
|
+
value: valueProp,
|
|
17332
|
+
valueLabelDisplay = "off",
|
|
17333
|
+
valueLabelFormat = Identity,
|
|
17334
|
+
...other
|
|
17335
|
+
} = props;
|
|
17336
|
+
const ownerState = {
|
|
17337
|
+
...props,
|
|
17338
|
+
isRtl,
|
|
17339
|
+
max,
|
|
17340
|
+
min,
|
|
17341
|
+
classes: classesProp,
|
|
17342
|
+
disabled,
|
|
17343
|
+
disableSwap,
|
|
17344
|
+
orientation,
|
|
17345
|
+
marks: marksProp,
|
|
17346
|
+
color: color2,
|
|
17347
|
+
size,
|
|
17348
|
+
step,
|
|
17349
|
+
shiftStep,
|
|
17350
|
+
scale,
|
|
17351
|
+
track,
|
|
17352
|
+
valueLabelDisplay,
|
|
17353
|
+
valueLabelFormat
|
|
17354
|
+
};
|
|
17355
|
+
const {
|
|
17356
|
+
axisProps: axisProps2,
|
|
17357
|
+
getRootProps,
|
|
17358
|
+
getHiddenInputProps,
|
|
17359
|
+
getThumbProps,
|
|
17360
|
+
open,
|
|
17361
|
+
active,
|
|
17362
|
+
axis,
|
|
17363
|
+
focusedThumbIndex,
|
|
17364
|
+
range,
|
|
17365
|
+
dragging,
|
|
17366
|
+
marks,
|
|
17367
|
+
values: values2,
|
|
17368
|
+
trackOffset,
|
|
17369
|
+
trackLeap,
|
|
17370
|
+
getThumbStyle
|
|
17371
|
+
} = useSlider({
|
|
17372
|
+
...ownerState,
|
|
17373
|
+
rootRef: ref
|
|
17374
|
+
});
|
|
17375
|
+
ownerState.marked = marks.length > 0 && marks.some((mark) => mark.label);
|
|
17376
|
+
ownerState.dragging = dragging;
|
|
17377
|
+
ownerState.focusedThumbIndex = focusedThumbIndex;
|
|
17378
|
+
const classes = useUtilityClasses(ownerState);
|
|
17379
|
+
const RootSlot = (slots == null ? void 0 : slots.root) ?? components.Root ?? SliderRoot;
|
|
17380
|
+
const RailSlot = (slots == null ? void 0 : slots.rail) ?? components.Rail ?? SliderRail;
|
|
17381
|
+
const TrackSlot = (slots == null ? void 0 : slots.track) ?? components.Track ?? SliderTrack;
|
|
17382
|
+
const ThumbSlot = (slots == null ? void 0 : slots.thumb) ?? components.Thumb ?? SliderThumb;
|
|
17383
|
+
const ValueLabelSlot = (slots == null ? void 0 : slots.valueLabel) ?? components.ValueLabel ?? SliderValueLabel;
|
|
17384
|
+
const MarkSlot = (slots == null ? void 0 : slots.mark) ?? components.Mark ?? SliderMark;
|
|
17385
|
+
const MarkLabelSlot = (slots == null ? void 0 : slots.markLabel) ?? components.MarkLabel ?? SliderMarkLabel;
|
|
17386
|
+
const InputSlot = (slots == null ? void 0 : slots.input) ?? components.Input ?? "input";
|
|
17387
|
+
const rootSlotProps = (slotProps == null ? void 0 : slotProps.root) ?? componentsProps.root;
|
|
17388
|
+
const railSlotProps = (slotProps == null ? void 0 : slotProps.rail) ?? componentsProps.rail;
|
|
17389
|
+
const trackSlotProps = (slotProps == null ? void 0 : slotProps.track) ?? componentsProps.track;
|
|
17390
|
+
const thumbSlotProps = (slotProps == null ? void 0 : slotProps.thumb) ?? componentsProps.thumb;
|
|
17391
|
+
const valueLabelSlotProps = (slotProps == null ? void 0 : slotProps.valueLabel) ?? componentsProps.valueLabel;
|
|
17392
|
+
const markSlotProps = (slotProps == null ? void 0 : slotProps.mark) ?? componentsProps.mark;
|
|
17393
|
+
const markLabelSlotProps = (slotProps == null ? void 0 : slotProps.markLabel) ?? componentsProps.markLabel;
|
|
17394
|
+
const inputSlotProps = (slotProps == null ? void 0 : slotProps.input) ?? componentsProps.input;
|
|
17395
|
+
const rootProps = useSlotProps({
|
|
17396
|
+
elementType: RootSlot,
|
|
17397
|
+
getSlotProps: getRootProps,
|
|
17398
|
+
externalSlotProps: rootSlotProps,
|
|
17399
|
+
externalForwardedProps: other,
|
|
17400
|
+
additionalProps: {
|
|
17401
|
+
...shouldSpreadAdditionalProps(RootSlot) && {
|
|
17402
|
+
as: component
|
|
17403
|
+
}
|
|
17404
|
+
},
|
|
17405
|
+
ownerState: {
|
|
17406
|
+
...ownerState,
|
|
17407
|
+
...rootSlotProps == null ? void 0 : rootSlotProps.ownerState
|
|
17408
|
+
},
|
|
17409
|
+
className: [classes.root, className]
|
|
17410
|
+
});
|
|
17411
|
+
const railProps = useSlotProps({
|
|
17412
|
+
elementType: RailSlot,
|
|
17413
|
+
externalSlotProps: railSlotProps,
|
|
17414
|
+
ownerState,
|
|
17415
|
+
className: classes.rail
|
|
17416
|
+
});
|
|
17417
|
+
const trackProps = useSlotProps({
|
|
17418
|
+
elementType: TrackSlot,
|
|
17419
|
+
externalSlotProps: trackSlotProps,
|
|
17420
|
+
additionalProps: {
|
|
17421
|
+
style: {
|
|
17422
|
+
...axisProps2[axis].offset(trackOffset),
|
|
17423
|
+
...axisProps2[axis].leap(trackLeap)
|
|
17424
|
+
}
|
|
17425
|
+
},
|
|
17426
|
+
ownerState: {
|
|
17427
|
+
...ownerState,
|
|
17428
|
+
...trackSlotProps == null ? void 0 : trackSlotProps.ownerState
|
|
17429
|
+
},
|
|
17430
|
+
className: classes.track
|
|
17431
|
+
});
|
|
17432
|
+
const thumbProps = useSlotProps({
|
|
17433
|
+
elementType: ThumbSlot,
|
|
17434
|
+
getSlotProps: getThumbProps,
|
|
17435
|
+
externalSlotProps: thumbSlotProps,
|
|
17436
|
+
ownerState: {
|
|
17437
|
+
...ownerState,
|
|
17438
|
+
...thumbSlotProps == null ? void 0 : thumbSlotProps.ownerState
|
|
17439
|
+
},
|
|
17440
|
+
className: classes.thumb
|
|
17441
|
+
});
|
|
17442
|
+
const valueLabelProps = useSlotProps({
|
|
17443
|
+
elementType: ValueLabelSlot,
|
|
17444
|
+
externalSlotProps: valueLabelSlotProps,
|
|
17445
|
+
ownerState: {
|
|
17446
|
+
...ownerState,
|
|
17447
|
+
...valueLabelSlotProps == null ? void 0 : valueLabelSlotProps.ownerState
|
|
17448
|
+
},
|
|
17449
|
+
className: classes.valueLabel
|
|
17450
|
+
});
|
|
17451
|
+
const markProps = useSlotProps({
|
|
17452
|
+
elementType: MarkSlot,
|
|
17453
|
+
externalSlotProps: markSlotProps,
|
|
17454
|
+
ownerState,
|
|
17455
|
+
className: classes.mark
|
|
17456
|
+
});
|
|
17457
|
+
const markLabelProps = useSlotProps({
|
|
17458
|
+
elementType: MarkLabelSlot,
|
|
17459
|
+
externalSlotProps: markLabelSlotProps,
|
|
17460
|
+
ownerState,
|
|
17461
|
+
className: classes.markLabel
|
|
17462
|
+
});
|
|
17463
|
+
const inputSliderProps = useSlotProps({
|
|
17464
|
+
elementType: InputSlot,
|
|
17465
|
+
getSlotProps: getHiddenInputProps,
|
|
17466
|
+
externalSlotProps: inputSlotProps,
|
|
17467
|
+
ownerState
|
|
17468
|
+
});
|
|
17469
|
+
return /* @__PURE__ */ jsxs(RootSlot, {
|
|
17470
|
+
...rootProps,
|
|
17471
|
+
children: [/* @__PURE__ */ jsx$1(RailSlot, {
|
|
17472
|
+
...railProps
|
|
17473
|
+
}), /* @__PURE__ */ jsx$1(TrackSlot, {
|
|
17474
|
+
...trackProps
|
|
17475
|
+
}), marks.filter((mark) => mark.value >= min && mark.value <= max).map((mark, index) => {
|
|
17476
|
+
const percent = valueToPercent(mark.value, min, max);
|
|
17477
|
+
const style2 = axisProps2[axis].offset(percent);
|
|
17478
|
+
let markActive;
|
|
17479
|
+
if (track === false) {
|
|
17480
|
+
markActive = values2.includes(mark.value);
|
|
17481
|
+
} else {
|
|
17482
|
+
markActive = track === "normal" && (range ? mark.value >= values2[0] && mark.value <= values2[values2.length - 1] : mark.value <= values2[0]) || track === "inverted" && (range ? mark.value <= values2[0] || mark.value >= values2[values2.length - 1] : mark.value >= values2[0]);
|
|
17483
|
+
}
|
|
17484
|
+
return /* @__PURE__ */ jsxs(React.Fragment, {
|
|
17485
|
+
children: [/* @__PURE__ */ jsx$1(MarkSlot, {
|
|
17486
|
+
"data-index": index,
|
|
17487
|
+
...markProps,
|
|
17488
|
+
...!isHostComponent(MarkSlot) && {
|
|
17489
|
+
markActive
|
|
17490
|
+
},
|
|
17491
|
+
style: {
|
|
17492
|
+
...style2,
|
|
17493
|
+
...markProps.style
|
|
17494
|
+
},
|
|
17495
|
+
className: clsx(markProps.className, markActive && classes.markActive)
|
|
17496
|
+
}), mark.label != null ? /* @__PURE__ */ jsx$1(MarkLabelSlot, {
|
|
17497
|
+
"aria-hidden": true,
|
|
17498
|
+
"data-index": index,
|
|
17499
|
+
...markLabelProps,
|
|
17500
|
+
...!isHostComponent(MarkLabelSlot) && {
|
|
17501
|
+
markLabelActive: markActive
|
|
17502
|
+
},
|
|
17503
|
+
style: {
|
|
17504
|
+
...style2,
|
|
17505
|
+
...markLabelProps.style
|
|
17506
|
+
},
|
|
17507
|
+
className: clsx(classes.markLabel, markLabelProps.className, markActive && classes.markLabelActive),
|
|
17508
|
+
children: mark.label
|
|
17509
|
+
}) : null]
|
|
17510
|
+
}, index);
|
|
17511
|
+
}), values2.map((value, index) => {
|
|
17512
|
+
const percent = valueToPercent(value, min, max);
|
|
17513
|
+
const style2 = axisProps2[axis].offset(percent);
|
|
17514
|
+
const ValueLabelComponent = valueLabelDisplay === "off" ? Forward : ValueLabelSlot;
|
|
17515
|
+
return (
|
|
17516
|
+
/* TODO v6: Change component structure. It will help in avoiding the complicated React.cloneElement API added in SliderValueLabel component. Should be: Thumb -> Input, ValueLabel. Follow Joy UI's Slider structure. */
|
|
17517
|
+
/* @__PURE__ */ jsx$1(ValueLabelComponent, {
|
|
17518
|
+
...!isHostComponent(ValueLabelComponent) && {
|
|
17519
|
+
valueLabelFormat,
|
|
17520
|
+
valueLabelDisplay,
|
|
17521
|
+
value: typeof valueLabelFormat === "function" ? valueLabelFormat(scale(value), index) : valueLabelFormat,
|
|
17522
|
+
index,
|
|
17523
|
+
open: open === index || active === index || valueLabelDisplay === "on",
|
|
17524
|
+
disabled
|
|
17525
|
+
},
|
|
17526
|
+
...valueLabelProps,
|
|
17527
|
+
children: /* @__PURE__ */ jsx$1(ThumbSlot, {
|
|
17528
|
+
"data-index": index,
|
|
17529
|
+
...thumbProps,
|
|
17530
|
+
className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),
|
|
17531
|
+
style: {
|
|
17532
|
+
...style2,
|
|
17533
|
+
...getThumbStyle(index),
|
|
17534
|
+
...thumbProps.style
|
|
17535
|
+
},
|
|
17536
|
+
children: /* @__PURE__ */ jsx$1(InputSlot, {
|
|
17537
|
+
"data-index": index,
|
|
17538
|
+
"aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel,
|
|
17539
|
+
"aria-valuenow": scale(value),
|
|
17540
|
+
"aria-labelledby": ariaLabelledby,
|
|
17541
|
+
"aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,
|
|
17542
|
+
value: values2[index],
|
|
17543
|
+
...inputSliderProps
|
|
17544
|
+
})
|
|
17545
|
+
})
|
|
17546
|
+
}, index)
|
|
17547
|
+
);
|
|
17548
|
+
})]
|
|
17549
|
+
});
|
|
17550
|
+
});
|
|
17551
|
+
process.env.NODE_ENV !== "production" ? Slider.propTypes = {
|
|
17552
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
17553
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
17554
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
17555
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
17556
|
+
/**
|
|
17557
|
+
* The label of the slider.
|
|
17558
|
+
*/
|
|
17559
|
+
"aria-label": chainPropTypes(PropTypes.string, (props) => {
|
|
17560
|
+
const range = Array.isArray(props.value || props.defaultValue);
|
|
17561
|
+
if (range && props["aria-label"] != null) {
|
|
17562
|
+
return new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.");
|
|
17563
|
+
}
|
|
17564
|
+
return null;
|
|
17565
|
+
}),
|
|
17566
|
+
/**
|
|
17567
|
+
* The id of the element containing a label for the slider.
|
|
17568
|
+
*/
|
|
17569
|
+
"aria-labelledby": PropTypes.string,
|
|
17570
|
+
/**
|
|
17571
|
+
* A string value that provides a user-friendly name for the current value of the slider.
|
|
17572
|
+
*/
|
|
17573
|
+
"aria-valuetext": chainPropTypes(PropTypes.string, (props) => {
|
|
17574
|
+
const range = Array.isArray(props.value || props.defaultValue);
|
|
17575
|
+
if (range && props["aria-valuetext"] != null) {
|
|
17576
|
+
return new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.");
|
|
17577
|
+
}
|
|
17578
|
+
return null;
|
|
17579
|
+
}),
|
|
17580
|
+
/**
|
|
17581
|
+
* @ignore
|
|
17582
|
+
*/
|
|
17583
|
+
children: PropTypes.node,
|
|
17584
|
+
/**
|
|
17585
|
+
* Override or extend the styles applied to the component.
|
|
17586
|
+
*/
|
|
17587
|
+
classes: PropTypes.object,
|
|
17588
|
+
/**
|
|
17589
|
+
* @ignore
|
|
17590
|
+
*/
|
|
17591
|
+
className: PropTypes.string,
|
|
17592
|
+
/**
|
|
17593
|
+
* The color of the component.
|
|
17594
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
17595
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
17596
|
+
* @default 'primary'
|
|
17597
|
+
*/
|
|
17598
|
+
color: PropTypes.oneOfType([PropTypes.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), PropTypes.string]),
|
|
17599
|
+
/**
|
|
17600
|
+
* The components used for each slot inside.
|
|
17601
|
+
*
|
|
17602
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
17603
|
+
*
|
|
17604
|
+
* @default {}
|
|
17605
|
+
*/
|
|
17606
|
+
components: PropTypes.shape({
|
|
17607
|
+
Input: PropTypes.elementType,
|
|
17608
|
+
Mark: PropTypes.elementType,
|
|
17609
|
+
MarkLabel: PropTypes.elementType,
|
|
17610
|
+
Rail: PropTypes.elementType,
|
|
17611
|
+
Root: PropTypes.elementType,
|
|
17612
|
+
Thumb: PropTypes.elementType,
|
|
17613
|
+
Track: PropTypes.elementType,
|
|
17614
|
+
ValueLabel: PropTypes.elementType
|
|
17615
|
+
}),
|
|
17616
|
+
/**
|
|
17617
|
+
* The extra props for the slot components.
|
|
17618
|
+
* You can override the existing props or add new ones.
|
|
17619
|
+
*
|
|
17620
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
17621
|
+
*
|
|
17622
|
+
* @default {}
|
|
17623
|
+
*/
|
|
17624
|
+
componentsProps: PropTypes.shape({
|
|
17625
|
+
input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17626
|
+
mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17627
|
+
markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17628
|
+
rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17629
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17630
|
+
thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17631
|
+
track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17632
|
+
valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
17633
|
+
children: PropTypes.element,
|
|
17634
|
+
className: PropTypes.string,
|
|
17635
|
+
open: PropTypes.bool,
|
|
17636
|
+
style: PropTypes.object,
|
|
17637
|
+
value: PropTypes.node,
|
|
17638
|
+
valueLabelDisplay: PropTypes.oneOf(["auto", "off", "on"])
|
|
17639
|
+
})])
|
|
17640
|
+
}),
|
|
17641
|
+
/**
|
|
17642
|
+
* The default value. Use when the component is not controlled.
|
|
17643
|
+
*/
|
|
17644
|
+
defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
|
|
17645
|
+
/**
|
|
17646
|
+
* If `true`, the component is disabled.
|
|
17647
|
+
* @default false
|
|
17648
|
+
*/
|
|
17649
|
+
disabled: PropTypes.bool,
|
|
17650
|
+
/**
|
|
17651
|
+
* If `true`, the active thumb doesn't swap when moving pointer over a thumb while dragging another thumb.
|
|
17652
|
+
* @default false
|
|
17653
|
+
*/
|
|
17654
|
+
disableSwap: PropTypes.bool,
|
|
17655
|
+
/**
|
|
17656
|
+
* Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider.
|
|
17657
|
+
* This is important for screen reader users.
|
|
17658
|
+
* @param {number} index The thumb label's index to format.
|
|
17659
|
+
* @returns {string}
|
|
17660
|
+
*/
|
|
17661
|
+
getAriaLabel: PropTypes.func,
|
|
17662
|
+
/**
|
|
17663
|
+
* Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.
|
|
17664
|
+
* This is important for screen reader users.
|
|
17665
|
+
* @param {number} value The thumb label's value to format.
|
|
17666
|
+
* @param {number} index The thumb label's index to format.
|
|
17667
|
+
* @returns {string}
|
|
17668
|
+
*/
|
|
17669
|
+
getAriaValueText: PropTypes.func,
|
|
17670
|
+
/**
|
|
17671
|
+
* Marks indicate predetermined values to which the user can move the slider.
|
|
17672
|
+
* If `true` the marks are spaced according the value of the `step` prop.
|
|
17673
|
+
* If an array, it should contain objects with `value` and an optional `label` keys.
|
|
17674
|
+
* @default false
|
|
17675
|
+
*/
|
|
17676
|
+
marks: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
|
|
17677
|
+
label: PropTypes.node,
|
|
17678
|
+
value: PropTypes.number.isRequired
|
|
17679
|
+
})), PropTypes.bool]),
|
|
17680
|
+
/**
|
|
17681
|
+
* The maximum allowed value of the slider.
|
|
17682
|
+
* Should not be equal to min.
|
|
17683
|
+
* @default 100
|
|
17684
|
+
*/
|
|
17685
|
+
max: PropTypes.number,
|
|
17686
|
+
/**
|
|
17687
|
+
* The minimum allowed value of the slider.
|
|
17688
|
+
* Should not be equal to max.
|
|
17689
|
+
* @default 0
|
|
17690
|
+
*/
|
|
17691
|
+
min: PropTypes.number,
|
|
17692
|
+
/**
|
|
17693
|
+
* Name attribute of the hidden `input` element.
|
|
17694
|
+
*/
|
|
17695
|
+
name: PropTypes.string,
|
|
17696
|
+
/**
|
|
17697
|
+
* Callback function that is fired when the slider's value changed.
|
|
17698
|
+
*
|
|
17699
|
+
* @param {Event} event The event source of the callback.
|
|
17700
|
+
* You can pull out the new value by accessing `event.target.value` (any).
|
|
17701
|
+
* **Warning**: This is a generic event not a change event.
|
|
17702
|
+
* @param {Value} value The new value.
|
|
17703
|
+
* @param {number} activeThumb Index of the currently moved thumb.
|
|
17704
|
+
*/
|
|
17705
|
+
onChange: PropTypes.func,
|
|
17706
|
+
/**
|
|
17707
|
+
* Callback function that is fired when the `mouseup` is triggered.
|
|
17708
|
+
*
|
|
17709
|
+
* @param {React.SyntheticEvent | Event} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
17710
|
+
* @param {Value} value The new value.
|
|
17711
|
+
*/
|
|
17712
|
+
onChangeCommitted: PropTypes.func,
|
|
17713
|
+
/**
|
|
17714
|
+
* The component orientation.
|
|
17715
|
+
* @default 'horizontal'
|
|
17716
|
+
*/
|
|
17717
|
+
orientation: PropTypes.oneOf(["horizontal", "vertical"]),
|
|
17718
|
+
/**
|
|
17719
|
+
* A transformation function, to change the scale of the slider.
|
|
17720
|
+
* @param {any} x
|
|
17721
|
+
* @returns {any}
|
|
17722
|
+
* @default function Identity(x) {
|
|
17723
|
+
* return x;
|
|
17724
|
+
* }
|
|
17725
|
+
*/
|
|
17726
|
+
scale: PropTypes.func,
|
|
17727
|
+
/**
|
|
17728
|
+
* The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down.
|
|
17729
|
+
* @default 10
|
|
17730
|
+
*/
|
|
17731
|
+
shiftStep: PropTypes.number,
|
|
17732
|
+
/**
|
|
17733
|
+
* The size of the slider.
|
|
17734
|
+
* @default 'medium'
|
|
17735
|
+
*/
|
|
17736
|
+
size: PropTypes.oneOfType([PropTypes.oneOf(["small", "medium"]), PropTypes.string]),
|
|
17737
|
+
/**
|
|
17738
|
+
* The props used for each slot inside the Slider.
|
|
17739
|
+
* @default {}
|
|
17740
|
+
*/
|
|
17741
|
+
slotProps: PropTypes.shape({
|
|
17742
|
+
input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17743
|
+
mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17744
|
+
markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17745
|
+
rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17746
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17747
|
+
thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17748
|
+
track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
17749
|
+
valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
17750
|
+
children: PropTypes.element,
|
|
17751
|
+
className: PropTypes.string,
|
|
17752
|
+
open: PropTypes.bool,
|
|
17753
|
+
style: PropTypes.object,
|
|
17754
|
+
value: PropTypes.node,
|
|
17755
|
+
valueLabelDisplay: PropTypes.oneOf(["auto", "off", "on"])
|
|
17756
|
+
})])
|
|
17757
|
+
}),
|
|
17758
|
+
/**
|
|
17759
|
+
* The components used for each slot inside the Slider.
|
|
17760
|
+
* Either a string to use a HTML element or a component.
|
|
17761
|
+
* @default {}
|
|
17762
|
+
*/
|
|
17763
|
+
slots: PropTypes.shape({
|
|
17764
|
+
input: PropTypes.elementType,
|
|
17765
|
+
mark: PropTypes.elementType,
|
|
17766
|
+
markLabel: PropTypes.elementType,
|
|
17767
|
+
rail: PropTypes.elementType,
|
|
17768
|
+
root: PropTypes.elementType,
|
|
17769
|
+
thumb: PropTypes.elementType,
|
|
17770
|
+
track: PropTypes.elementType,
|
|
17771
|
+
valueLabel: PropTypes.elementType
|
|
17772
|
+
}),
|
|
17773
|
+
/**
|
|
17774
|
+
* The granularity with which the slider can step through values. (A "discrete" slider.)
|
|
17775
|
+
* The `min` prop serves as the origin for the valid values.
|
|
17776
|
+
* We recommend (max - min) to be evenly divisible by the step.
|
|
17777
|
+
*
|
|
17778
|
+
* When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop.
|
|
17779
|
+
* @default 1
|
|
17780
|
+
*/
|
|
17781
|
+
step: PropTypes.number,
|
|
17782
|
+
/**
|
|
17783
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
17784
|
+
*/
|
|
17785
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
17786
|
+
/**
|
|
17787
|
+
* Tab index attribute of the hidden `input` element.
|
|
17788
|
+
*/
|
|
17789
|
+
tabIndex: PropTypes.number,
|
|
17790
|
+
/**
|
|
17791
|
+
* The track presentation:
|
|
17792
|
+
*
|
|
17793
|
+
* - `normal` the track will render a bar representing the slider value.
|
|
17794
|
+
* - `inverted` the track will render a bar representing the remaining slider value.
|
|
17795
|
+
* - `false` the track will render without a bar.
|
|
17796
|
+
* @default 'normal'
|
|
17797
|
+
*/
|
|
17798
|
+
track: PropTypes.oneOf(["inverted", "normal", false]),
|
|
17799
|
+
/**
|
|
17800
|
+
* The value of the slider.
|
|
17801
|
+
* For ranged sliders, provide an array with two values.
|
|
17802
|
+
*/
|
|
17803
|
+
value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
|
|
17804
|
+
/**
|
|
17805
|
+
* Controls when the value label is displayed:
|
|
17806
|
+
*
|
|
17807
|
+
* - `auto` the value label will display when the thumb is hovered or focused.
|
|
17808
|
+
* - `on` will display persistently.
|
|
17809
|
+
* - `off` will never display.
|
|
17810
|
+
* @default 'off'
|
|
17811
|
+
*/
|
|
17812
|
+
valueLabelDisplay: PropTypes.oneOf(["auto", "off", "on"]),
|
|
17813
|
+
/**
|
|
17814
|
+
* The format function the value label's value.
|
|
17815
|
+
*
|
|
17816
|
+
* When a function is provided, it should have the following signature:
|
|
17817
|
+
*
|
|
17818
|
+
* - {number} value The value label's value to format
|
|
17819
|
+
* - {number} index The value label's index to format
|
|
17820
|
+
* @param {any} x
|
|
17821
|
+
* @returns {any}
|
|
17822
|
+
* @default function Identity(x) {
|
|
17823
|
+
* return x;
|
|
17824
|
+
* }
|
|
17825
|
+
*/
|
|
17826
|
+
valueLabelFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
|
|
17827
|
+
} : void 0;
|
|
17828
|
+
const boxClasses = generateUtilityClasses("MuiBox", ["root"]);
|
|
17829
|
+
const defaultTheme = createTheme();
|
|
17830
|
+
const Box = createBox({
|
|
17831
|
+
themeId: THEME_ID,
|
|
17832
|
+
defaultTheme,
|
|
17833
|
+
defaultClassName: boxClasses.root,
|
|
17834
|
+
generateClassName: ClassNameGenerator.generate
|
|
17835
|
+
});
|
|
17836
|
+
process.env.NODE_ENV !== "production" ? Box.propTypes = {
|
|
17837
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
17838
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
17839
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
17840
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
17841
|
+
/**
|
|
17842
|
+
* @ignore
|
|
17843
|
+
*/
|
|
17844
|
+
children: PropTypes.node,
|
|
17845
|
+
/**
|
|
17846
|
+
* The component used for the root node.
|
|
17847
|
+
* Either a string to use a HTML element or a component.
|
|
17848
|
+
*/
|
|
17849
|
+
component: PropTypes.elementType,
|
|
17850
|
+
/**
|
|
17851
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
17852
|
+
*/
|
|
17853
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
17854
|
+
} : void 0;
|
|
17855
|
+
function NewSlider({ defaultValue, onChange }) {
|
|
17856
|
+
return /* @__PURE__ */ jsx$1(Card, { noPadding: true, appearance: "ghost", children: /* @__PURE__ */ jsx$1(Box, { sx: { width: 150 }, children: /* @__PURE__ */ jsx$1(Slider, { defaultValue, "aria-label": "Default", valueLabelDisplay: "auto", onChange }) }) });
|
|
17857
|
+
}
|
|
17858
|
+
function Tab({ items, onTabSelected, defaultValue, ...cardProps }) {
|
|
17859
|
+
const [tabSelected, setTabSelected] = useState(defaultValue);
|
|
17860
|
+
const selectTab = (item) => {
|
|
17861
|
+
setTabSelected(item);
|
|
17862
|
+
onTabSelected == null ? void 0 : onTabSelected(item);
|
|
17863
|
+
};
|
|
17864
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17865
|
+
/* @__PURE__ */ jsx$1(SectionName, { section: "Filter by" }),
|
|
17866
|
+
/* @__PURE__ */ jsx$1(Card, { className: "rounded-md w-fit", noBlur: true, noPadding: true, ...cardProps, color: "blue", children: /* @__PURE__ */ jsx$1("div", { className: "flex p-[0.4rem] gap-x-[0.5rem]", children: items && items.map((item) => /* @__PURE__ */ jsx$1(
|
|
17867
|
+
Button,
|
|
17868
|
+
{
|
|
17869
|
+
onClick: () => selectTab(item),
|
|
17870
|
+
color: "blue",
|
|
17871
|
+
appearance: item === tabSelected ? "mate" : "ghost",
|
|
17872
|
+
dark: item === tabSelected ? false : true,
|
|
17873
|
+
label: item
|
|
17874
|
+
},
|
|
17875
|
+
item
|
|
17876
|
+
)) }) })
|
|
17877
|
+
] });
|
|
17878
|
+
}
|
|
17879
|
+
function Timeline({ children, faded, ...cardProps }) {
|
|
17880
|
+
const timelineStyle = {
|
|
17881
|
+
overflowY: "visible",
|
|
17882
|
+
WebkitMaskImage: "linear-gradient(to bottom, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 100%)",
|
|
17883
|
+
maskImage: "linear-gradient(to bottom, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%)"
|
|
17884
|
+
};
|
|
17885
|
+
return /* @__PURE__ */ jsx$1(Card, { className: "rounded-sm", noPadding: true, appearance: "ghost", ...cardProps, style: { ...cardProps.style, ...timelineStyle }, children: /* @__PURE__ */ jsx$1("ul", { className: "vertical-line list-disc font-bold text-start relative", style: { paddingInlineStart: 20 }, children }) });
|
|
17886
|
+
}
|
|
17887
|
+
function TlListItem({ label, badge, ...cardProps }) {
|
|
17888
|
+
return /* @__PURE__ */ jsx$1("li", { children: /* @__PURE__ */ jsx$1(Card, { noBlur: true, appearance: "ghost", noPadding: true, ...cardProps, children: /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center gap-x-[1rem] text-[1rem]", children: [
|
|
17889
|
+
label,
|
|
17890
|
+
badge
|
|
17891
|
+
] }) }) });
|
|
17892
|
+
}
|
|
15034
17893
|
export {
|
|
15035
17894
|
Avatar,
|
|
17895
|
+
Badge,
|
|
15036
17896
|
Button,
|
|
15037
17897
|
Calendar,
|
|
15038
|
-
Card
|
|
17898
|
+
Card,
|
|
17899
|
+
Checkbox,
|
|
17900
|
+
Dropdown,
|
|
17901
|
+
DropdownButton,
|
|
17902
|
+
Input,
|
|
17903
|
+
NewSlider,
|
|
17904
|
+
SectionName,
|
|
17905
|
+
Tab,
|
|
17906
|
+
ThemeContext,
|
|
17907
|
+
ThemeContextComponent,
|
|
17908
|
+
Timeline,
|
|
17909
|
+
TlListItem
|
|
15039
17910
|
};
|
|
15040
17911
|
//# sourceMappingURL=index.esm.js.map
|