1
0
Fork 0

Added Statistics calculation

Statistics now show calculated values
This commit is contained in:
Techognito 2025-09-04 17:30:00 +02:00
parent fe87374e47
commit fc0f69dacb
2147 changed files with 141321 additions and 39 deletions

View file

@ -0,0 +1,18 @@
import * as React from 'react';
import { DefaultizedProps } from '@mui/x-internals/types';
import { MonthCalendarProps } from "./MonthCalendar.types.js";
export declare function useMonthCalendarDefaultizedProps(props: MonthCalendarProps, name: string): DefaultizedProps<MonthCalendarProps, 'minDate' | 'maxDate' | 'disableFuture' | 'disablePast' | 'monthsPerRow'>;
type MonthCalendarComponent = ((props: MonthCalendarProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
propTypes?: any;
};
/**
* Demos:
*
* - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)
*
* API:
*
* - [MonthCalendar API](https://mui.com/x/api/date-pickers/month-calendar/)
*/
export declare const MonthCalendar: MonthCalendarComponent;
export {};

View file

@ -0,0 +1,371 @@
"use strict";
'use client';
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.MonthCalendar = void 0;
exports.useMonthCalendarDefaultizedProps = useMonthCalendarDefaultizedProps;
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var React = _interopRequireWildcard(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _clsx = _interopRequireDefault(require("clsx"));
var _RtlProvider = require("@mui/system/RtlProvider");
var _createStyled = require("@mui/system/createStyled");
var _styles = require("@mui/material/styles");
var _useControlled = _interopRequireDefault(require("@mui/utils/useControlled"));
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
var _MonthCalendarButton = require("./MonthCalendarButton");
var _useUtils = require("../internals/hooks/useUtils");
var _monthCalendarClasses = require("./monthCalendarClasses");
var _dateUtils = require("../internals/utils/date-utils");
var _valueManagers = require("../internals/utils/valueManagers");
var _getDefaultReferenceDate = require("../internals/utils/getDefaultReferenceDate");
var _useControlledValue = require("../internals/hooks/useControlledValue");
var _dimensions = require("../internals/constants/dimensions");
var _usePickerPrivateContext = require("../internals/hooks/usePickerPrivateContext");
var _useDateManager = require("../managers/useDateManager");
var _usePickerAdapter = require("../hooks/usePickerAdapter");
var _jsxRuntime = require("react/jsx-runtime");
const _excluded = ["autoFocus", "className", "classes", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "shouldDisableMonth", "readOnly", "disableHighlightToday", "onMonthFocus", "hasFocus", "onFocusedViewChange", "monthsPerRow", "timezone", "gridLabelId", "slots", "slotProps"];
const useUtilityClasses = classes => {
const slots = {
root: ['root']
};
return (0, _composeClasses.default)(slots, _monthCalendarClasses.getMonthCalendarUtilityClass, classes);
};
function useMonthCalendarDefaultizedProps(props, name) {
const themeProps = (0, _styles.useThemeProps)({
props,
name
});
const validationProps = (0, _useDateManager.useApplyDefaultValuesToDateValidationProps)(themeProps);
return (0, _extends2.default)({}, themeProps, validationProps, {
monthsPerRow: themeProps.monthsPerRow ?? 3
});
}
const MonthCalendarRoot = (0, _styles.styled)('div', {
name: 'MuiMonthCalendar',
slot: 'Root',
shouldForwardProp: prop => (0, _createStyled.shouldForwardProp)(prop) && prop !== 'monthsPerRow'
})({
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'space-evenly',
rowGap: 16,
padding: '8px 0',
width: _dimensions.DIALOG_WIDTH,
// avoid padding increasing width over defined
boxSizing: 'border-box',
variants: [{
props: {
monthsPerRow: 3
},
style: {
columnGap: 24
}
}, {
props: {
monthsPerRow: 4
},
style: {
columnGap: 0
}
}]
});
/**
* Demos:
*
* - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)
*
* API:
*
* - [MonthCalendar API](https://mui.com/x/api/date-pickers/month-calendar/)
*/
const MonthCalendar = exports.MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalendar(inProps, ref) {
const props = useMonthCalendarDefaultizedProps(inProps, 'MuiMonthCalendar');
const {
autoFocus,
className,
classes: classesProp,
value: valueProp,
defaultValue,
referenceDate: referenceDateProp,
disabled,
disableFuture,
disablePast,
maxDate,
minDate,
onChange,
shouldDisableMonth,
readOnly,
onMonthFocus,
hasFocus,
onFocusedViewChange,
monthsPerRow,
timezone: timezoneProp,
gridLabelId,
slots,
slotProps
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
const {
value,
handleValueChange,
timezone
} = (0, _useControlledValue.useControlledValue)({
name: 'MonthCalendar',
timezone: timezoneProp,
value: valueProp,
defaultValue,
referenceDate: referenceDateProp,
onChange,
valueManager: _valueManagers.singleItemValueManager
});
const now = (0, _useUtils.useNow)(timezone);
const isRtl = (0, _RtlProvider.useRtl)();
const adapter = (0, _usePickerAdapter.usePickerAdapter)();
const {
ownerState
} = (0, _usePickerPrivateContext.usePickerPrivateContext)();
const referenceDate = React.useMemo(() => _valueManagers.singleItemValueManager.getInitialReferenceValue({
value,
adapter,
props,
timezone,
referenceDate: referenceDateProp,
granularity: _getDefaultReferenceDate.SECTION_TYPE_GRANULARITY.month
}), [] // eslint-disable-line react-hooks/exhaustive-deps
);
const classes = useUtilityClasses(classesProp);
const todayMonth = React.useMemo(() => adapter.getMonth(now), [adapter, now]);
const selectedMonth = React.useMemo(() => {
if (value != null) {
return adapter.getMonth(value);
}
return null;
}, [value, adapter]);
const [focusedMonth, setFocusedMonth] = React.useState(() => selectedMonth || adapter.getMonth(referenceDate));
const [internalHasFocus, setInternalHasFocus] = (0, _useControlled.default)({
name: 'MonthCalendar',
state: 'hasFocus',
controlled: hasFocus,
default: autoFocus ?? false
});
const changeHasFocus = (0, _useEventCallback.default)(newHasFocus => {
setInternalHasFocus(newHasFocus);
if (onFocusedViewChange) {
onFocusedViewChange(newHasFocus);
}
});
const isMonthDisabled = React.useCallback(dateToValidate => {
const firstEnabledMonth = adapter.startOfMonth(disablePast && adapter.isAfter(now, minDate) ? now : minDate);
const lastEnabledMonth = adapter.startOfMonth(disableFuture && adapter.isBefore(now, maxDate) ? now : maxDate);
const monthToValidate = adapter.startOfMonth(dateToValidate);
if (adapter.isBefore(monthToValidate, firstEnabledMonth)) {
return true;
}
if (adapter.isAfter(monthToValidate, lastEnabledMonth)) {
return true;
}
if (!shouldDisableMonth) {
return false;
}
return shouldDisableMonth(monthToValidate);
}, [disableFuture, disablePast, maxDate, minDate, now, shouldDisableMonth, adapter]);
const handleMonthSelection = (0, _useEventCallback.default)((event, month) => {
if (readOnly) {
return;
}
const newDate = adapter.setMonth(value ?? referenceDate, month);
handleValueChange(newDate);
});
const focusMonth = (0, _useEventCallback.default)(month => {
if (!isMonthDisabled(adapter.setMonth(value ?? referenceDate, month))) {
setFocusedMonth(month);
changeHasFocus(true);
if (onMonthFocus) {
onMonthFocus(month);
}
}
});
React.useEffect(() => {
setFocusedMonth(prevFocusedMonth => selectedMonth !== null && prevFocusedMonth !== selectedMonth ? selectedMonth : prevFocusedMonth);
}, [selectedMonth]);
const handleKeyDown = (0, _useEventCallback.default)((event, month) => {
const monthsInYear = 12;
const monthsInRow = 3;
switch (event.key) {
case 'ArrowUp':
focusMonth((monthsInYear + month - monthsInRow) % monthsInYear);
event.preventDefault();
break;
case 'ArrowDown':
focusMonth((monthsInYear + month + monthsInRow) % monthsInYear);
event.preventDefault();
break;
case 'ArrowLeft':
focusMonth((monthsInYear + month + (isRtl ? 1 : -1)) % monthsInYear);
event.preventDefault();
break;
case 'ArrowRight':
focusMonth((monthsInYear + month + (isRtl ? -1 : 1)) % monthsInYear);
event.preventDefault();
break;
default:
break;
}
});
const handleMonthFocus = (0, _useEventCallback.default)((event, month) => {
focusMonth(month);
});
const handleMonthBlur = (0, _useEventCallback.default)((event, month) => {
if (focusedMonth === month) {
changeHasFocus(false);
}
});
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MonthCalendarRoot, (0, _extends2.default)({
ref: ref,
className: (0, _clsx.default)(classes.root, className),
ownerState: ownerState,
role: "radiogroup",
"aria-labelledby": gridLabelId,
monthsPerRow: monthsPerRow
}, other, {
children: (0, _dateUtils.getMonthsInYear)(adapter, value ?? referenceDate).map(month => {
const monthNumber = adapter.getMonth(month);
const monthText = adapter.format(month, 'monthShort');
const monthLabel = adapter.format(month, 'month');
const isSelected = monthNumber === selectedMonth;
const isDisabled = disabled || isMonthDisabled(month);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MonthCalendarButton.MonthCalendarButton, {
selected: isSelected,
value: monthNumber,
onClick: handleMonthSelection,
onKeyDown: handleKeyDown,
autoFocus: internalHasFocus && monthNumber === focusedMonth,
disabled: isDisabled,
tabIndex: monthNumber === focusedMonth && !isDisabled ? 0 : -1,
onFocus: handleMonthFocus,
onBlur: handleMonthBlur,
"aria-current": todayMonth === monthNumber ? 'date' : undefined,
"aria-label": monthLabel,
slots: slots,
slotProps: slotProps,
classes: classesProp,
children: monthText
}, monthText);
})
}));
});
if (process.env.NODE_ENV !== "production") MonthCalendar.displayName = "MonthCalendar";
process.env.NODE_ENV !== "production" ? MonthCalendar.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "pnpm proptypes" |
// ----------------------------------------------------------------------
autoFocus: _propTypes.default.bool,
/**
* Override or extend the styles applied to the component.
*/
classes: _propTypes.default.object,
className: _propTypes.default.string,
/**
* The default selected value.
* Used when the component is not controlled.
*/
defaultValue: _propTypes.default.object,
/**
* If `true`, the component is disabled.
* When disabled, the value cannot be changed and no interaction is possible.
* @default false
*/
disabled: _propTypes.default.bool,
/**
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
* @default false
*/
disableFuture: _propTypes.default.bool,
/**
* If `true`, today's date is rendering without highlighting with circle.
* @default false
*/
disableHighlightToday: _propTypes.default.bool,
/**
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
* @default false
*/
disablePast: _propTypes.default.bool,
gridLabelId: _propTypes.default.string,
hasFocus: _propTypes.default.bool,
/**
* Maximal selectable date.
* @default 2099-12-31
*/
maxDate: _propTypes.default.object,
/**
* Minimal selectable date.
* @default 1900-01-01
*/
minDate: _propTypes.default.object,
/**
* Months rendered per row.
* @default 3
*/
monthsPerRow: _propTypes.default.oneOf([3, 4]),
/**
* Callback fired when the value changes.
* @param {PickerValidDate} value The new value.
*/
onChange: _propTypes.default.func,
onFocusedViewChange: _propTypes.default.func,
onMonthFocus: _propTypes.default.func,
/**
* If `true`, the component is read-only.
* When read-only, the value cannot be changed but the user can interact with the interface.
* @default false
*/
readOnly: _propTypes.default.bool,
/**
* The date used to generate the new value when both `value` and `defaultValue` are empty.
* @default The closest valid month using the validation props, except callbacks such as `shouldDisableMonth`.
*/
referenceDate: _propTypes.default.object,
/**
* Disable specific month.
* @param {PickerValidDate} month The month to test.
* @returns {boolean} If `true`, the month will be disabled.
*/
shouldDisableMonth: _propTypes.default.func,
/**
* The props used for each component slot.
* @default {}
*/
slotProps: _propTypes.default.object,
/**
* Overridable component slots.
* @default {}
*/
slots: _propTypes.default.object,
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
/**
* Choose which timezone to use for the value.
* Example: "default", "system", "UTC", "America/New_York".
* If you pass values from other timezones to some props, they will be converted to this timezone before being used.
* @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
* @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
*/
timezone: _propTypes.default.string,
/**
* The selected value.
* Used when the component is controlled.
*/
value: _propTypes.default.object
} : void 0;

View file

@ -0,0 +1,82 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '@mui/material/styles';
import { SlotComponentPropsFromProps } from '@mui/x-internals/types';
import { MonthCalendarClasses } from "./monthCalendarClasses.js";
import { BaseDateValidationProps, MonthValidationProps } from "../internals/models/validation.js";
import { PickerOwnerState, PickerValidDate, TimezoneProps } from "../models/index.js";
import { FormProps } from "../internals/models/formProps.js";
export interface MonthButtonOwnerState extends PickerOwnerState {
isMonthSelected: boolean;
isMonthDisabled: boolean;
}
export interface MonthCalendarSlots {
/**
* Button displayed to render a single month in the `month` view.
* @default MonthCalendarButton
*/
monthButton?: React.ElementType;
}
export interface MonthCalendarSlotProps {
monthButton?: SlotComponentPropsFromProps<React.HTMLAttributes<HTMLButtonElement> & {
sx: SxProps;
}, {}, MonthButtonOwnerState>;
}
export interface ExportedMonthCalendarProps {
/**
* Months rendered per row.
* @default 3
*/
monthsPerRow?: 3 | 4;
}
export interface MonthCalendarProps extends ExportedMonthCalendarProps, MonthValidationProps, BaseDateValidationProps, TimezoneProps, FormProps {
autoFocus?: boolean;
className?: string;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<MonthCalendarClasses>;
/**
* Overridable component slots.
* @default {}
*/
slots?: MonthCalendarSlots;
/**
* The props used for each component slot.
* @default {}
*/
slotProps?: MonthCalendarSlotProps;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
/**
* The selected value.
* Used when the component is controlled.
*/
value?: PickerValidDate | null;
/**
* The default selected value.
* Used when the component is not controlled.
*/
defaultValue?: PickerValidDate | null;
/**
* The date used to generate the new value when both `value` and `defaultValue` are empty.
* @default The closest valid month using the validation props, except callbacks such as `shouldDisableMonth`.
*/
referenceDate?: PickerValidDate;
/**
* Callback fired when the value changes.
* @param {PickerValidDate} value The new value.
*/
onChange?: (value: PickerValidDate) => void;
/**
* If `true`, today's date is rendering without highlighting with circle.
* @default false
*/
disableHighlightToday?: boolean;
onMonthFocus?: (month: number) => void;
hasFocus?: boolean;
onFocusedViewChange?: (hasFocus: boolean) => void;
gridLabelId?: string;
}

View file

@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});

View file

@ -0,0 +1,24 @@
import * as React from 'react';
import { MonthCalendarSlotProps, MonthCalendarSlots } from "./MonthCalendar.types.js";
import { MonthCalendarClasses } from "./monthCalendarClasses.js";
export interface MonthCalendarButtonProps {
value: number;
tabIndex: number;
selected: boolean;
disabled: boolean;
autoFocus: boolean;
classes: Partial<MonthCalendarClasses> | undefined;
slots: MonthCalendarSlots | undefined;
slotProps: MonthCalendarSlotProps | undefined;
'aria-current': React.AriaAttributes['aria-current'];
'aria-label': React.AriaAttributes['aria-label'];
children: React.ReactNode;
onClick: (event: React.MouseEvent, month: number) => void;
onKeyDown: (event: React.KeyboardEvent, month: number) => void;
onFocus: (event: React.FocusEvent, month: number) => void;
onBlur: (event: React.FocusEvent, month: number) => void;
}
/**
* @ignore - do not document.
*/
export declare const MonthCalendarButton: React.NamedExoticComponent<MonthCalendarButtonProps>;

View file

@ -0,0 +1,124 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.MonthCalendarButton = void 0;
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var React = _interopRequireWildcard(require("react"));
var _styles = require("@mui/material/styles");
var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
var _usePickerPrivateContext = require("../internals/hooks/usePickerPrivateContext");
var _monthCalendarClasses = require("./monthCalendarClasses");
var _jsxRuntime = require("react/jsx-runtime");
const _excluded = ["autoFocus", "classes", "disabled", "selected", "value", "onClick", "onKeyDown", "onFocus", "onBlur", "slots", "slotProps"];
const useUtilityClasses = (classes, ownerState) => {
const slots = {
button: ['button', ownerState.isMonthDisabled && 'disabled', ownerState.isMonthSelected && 'selected']
};
return (0, _composeClasses.default)(slots, _monthCalendarClasses.getMonthCalendarUtilityClass, classes);
};
const DefaultMonthButton = (0, _styles.styled)('button', {
name: 'MuiMonthCalendar',
slot: 'Button',
overridesResolver: (_, styles) => [styles.button, {
[`&.${_monthCalendarClasses.monthCalendarClasses.disabled}`]: styles.disabled
}, {
[`&.${_monthCalendarClasses.monthCalendarClasses.selected}`]: styles.selected
}]
})(({
theme
}) => (0, _extends2.default)({
color: 'unset',
backgroundColor: 'transparent',
border: 0,
outline: 0
}, theme.typography.subtitle1, {
height: 36,
width: 72,
borderRadius: 18,
cursor: 'pointer',
'&:focus': {
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _styles.alpha)(theme.palette.action.active, theme.palette.action.hoverOpacity)
},
'&:hover': {
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _styles.alpha)(theme.palette.action.active, theme.palette.action.hoverOpacity)
},
'&:disabled': {
cursor: 'auto',
pointerEvents: 'none'
},
[`&.${_monthCalendarClasses.monthCalendarClasses.disabled}`]: {
color: (theme.vars || theme).palette.text.secondary
},
[`&.${_monthCalendarClasses.monthCalendarClasses.selected}`]: {
color: (theme.vars || theme).palette.primary.contrastText,
backgroundColor: (theme.vars || theme).palette.primary.main,
'&:focus, &:hover': {
backgroundColor: (theme.vars || theme).palette.primary.dark
}
}
}));
/**
* @ignore - do not document.
*/
const MonthCalendarButton = exports.MonthCalendarButton = /*#__PURE__*/React.memo(function MonthCalendarButton(props) {
const {
autoFocus,
classes: classesProp,
disabled,
selected,
value,
onClick,
onKeyDown,
onFocus,
onBlur,
slots,
slotProps
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
const ref = React.useRef(null);
const {
ownerState: pickerOwnerState
} = (0, _usePickerPrivateContext.usePickerPrivateContext)();
const ownerState = (0, _extends2.default)({}, pickerOwnerState, {
isMonthDisabled: disabled,
isMonthSelected: selected
});
const classes = useUtilityClasses(classesProp, ownerState);
// We can't forward the `autoFocus` to the button because it is a native button, not a MUI Button
(0, _useEnhancedEffect.default)(() => {
if (autoFocus) {
// `ref.current` being `null` would be a bug in MUI.
ref.current?.focus();
}
}, [autoFocus]);
const MonthButton = slots?.monthButton ?? DefaultMonthButton;
const monthButtonProps = (0, _useSlotProps.default)({
elementType: MonthButton,
externalSlotProps: slotProps?.monthButton,
externalForwardedProps: other,
additionalProps: {
disabled,
ref,
type: 'button',
role: 'radio',
'aria-checked': selected,
onClick: event => onClick(event, value),
onKeyDown: event => onKeyDown(event, value),
onFocus: event => onFocus(event, value),
onBlur: event => onBlur(event, value)
},
ownerState,
className: classes.button
});
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MonthButton, (0, _extends2.default)({}, monthButtonProps));
});
if (process.env.NODE_ENV !== "production") MonthCalendarButton.displayName = "MonthCalendarButton";

View file

@ -0,0 +1,4 @@
export { MonthCalendar } from "./MonthCalendar.js";
export type { MonthCalendarProps, MonthCalendarSlots, MonthCalendarSlotProps } from "./MonthCalendar.types.js";
export { monthCalendarClasses, getMonthCalendarUtilityClass } from "./monthCalendarClasses.js";
export type { MonthCalendarClasses, MonthCalendarClassKey } from "./monthCalendarClasses.js";

View file

@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "MonthCalendar", {
enumerable: true,
get: function () {
return _MonthCalendar.MonthCalendar;
}
});
Object.defineProperty(exports, "getMonthCalendarUtilityClass", {
enumerable: true,
get: function () {
return _monthCalendarClasses.getMonthCalendarUtilityClass;
}
});
Object.defineProperty(exports, "monthCalendarClasses", {
enumerable: true,
get: function () {
return _monthCalendarClasses.monthCalendarClasses;
}
});
var _MonthCalendar = require("./MonthCalendar");
var _monthCalendarClasses = require("./monthCalendarClasses");

View file

@ -0,0 +1,13 @@
export declare function getMonthCalendarUtilityClass(slot: string): string;
export interface MonthCalendarClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the button element that represents a single month */
button: string;
/** Styles applied to a disabled button element. */
disabled: string;
/** Styles applied to a selected button element. */
selected: string;
}
export type MonthCalendarClassKey = keyof MonthCalendarClasses;
export declare const monthCalendarClasses: Record<keyof MonthCalendarClasses, string>;

View file

@ -0,0 +1,14 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getMonthCalendarUtilityClass = getMonthCalendarUtilityClass;
exports.monthCalendarClasses = void 0;
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
function getMonthCalendarUtilityClass(slot) {
return (0, _generateUtilityClass.default)('MuiMonthCalendar', slot);
}
const monthCalendarClasses = exports.monthCalendarClasses = (0, _generateUtilityClasses.default)('MuiMonthCalendar', ['root', 'button', 'disabled', 'selected']);