@mui/lab 7.0.0-beta.1 → 7.0.0-beta.11
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/CHANGELOG.md +360 -0
- package/Masonry/Masonry.d.ts +2 -2
- package/Masonry/Masonry.js +3 -3
- package/README.md +3 -3
- package/TabContext/TabContext.d.ts +2 -2
- package/TabList/TabList.d.ts +3 -3
- package/TabPanel/TabPanel.d.ts +2 -2
- package/TabPanel/TabPanel.js +2 -2
- package/Timeline/Timeline.d.ts +2 -2
- package/Timeline/Timeline.js +4 -4
- package/TimelineConnector/TimelineConnector.d.ts +2 -2
- package/TimelineConnector/TimelineConnector.js +2 -2
- package/TimelineContent/TimelineContent.d.ts +3 -3
- package/TimelineContent/TimelineContent.js +2 -2
- package/TimelineDot/TimelineDot.d.ts +2 -2
- package/TimelineDot/TimelineDot.js +2 -2
- package/TimelineItem/TimelineItem.d.ts +2 -2
- package/TimelineItem/TimelineItem.js +2 -2
- package/TimelineOppositeContent/TimelineOppositeContent.d.ts +3 -3
- package/TimelineOppositeContent/TimelineOppositeContent.js +2 -2
- package/TimelineSeparator/TimelineSeparator.d.ts +2 -2
- package/TimelineSeparator/TimelineSeparator.js +2 -2
- package/esm/Masonry/Masonry.d.ts +2 -2
- package/esm/Masonry/Masonry.js +1 -1
- package/esm/TabContext/TabContext.d.ts +2 -2
- package/esm/TabList/TabList.d.ts +3 -3
- package/esm/TabPanel/TabPanel.d.ts +2 -2
- package/esm/TabPanel/TabPanel.js +1 -1
- package/esm/Timeline/Timeline.d.ts +2 -2
- package/esm/Timeline/Timeline.js +3 -3
- package/esm/TimelineConnector/TimelineConnector.d.ts +2 -2
- package/esm/TimelineConnector/TimelineConnector.js +1 -1
- package/esm/TimelineContent/TimelineContent.d.ts +3 -3
- package/esm/TimelineContent/TimelineContent.js +1 -1
- package/esm/TimelineDot/TimelineDot.d.ts +2 -2
- package/esm/TimelineDot/TimelineDot.js +1 -1
- package/esm/TimelineItem/TimelineItem.d.ts +2 -2
- package/esm/TimelineItem/TimelineItem.js +1 -1
- package/esm/TimelineOppositeContent/TimelineOppositeContent.d.ts +3 -3
- package/esm/TimelineOppositeContent/TimelineOppositeContent.js +1 -1
- package/esm/TimelineSeparator/TimelineSeparator.d.ts +2 -2
- package/esm/TimelineSeparator/TimelineSeparator.js +1 -1
- package/esm/index.js +1 -1
- package/esm/useAutocomplete/index.d.ts +1 -1
- package/esm/useAutocomplete/index.js +1 -1
- package/index.js +1 -1
- package/modern/Masonry/Masonry.d.ts +2 -2
- package/modern/TabContext/TabContext.d.ts +2 -2
- package/modern/TabList/TabList.d.ts +3 -3
- package/modern/TabPanel/TabPanel.d.ts +2 -2
- package/modern/Timeline/Timeline.d.ts +2 -2
- package/modern/TimelineConnector/TimelineConnector.d.ts +2 -2
- package/modern/TimelineContent/TimelineContent.d.ts +3 -3
- package/modern/TimelineDot/TimelineDot.d.ts +2 -2
- package/modern/TimelineItem/TimelineItem.d.ts +2 -2
- package/modern/TimelineOppositeContent/TimelineOppositeContent.d.ts +3 -3
- package/modern/TimelineSeparator/TimelineSeparator.d.ts +2 -2
- package/modern/useAutocomplete/index.d.ts +1 -1
- package/package.json +11 -17
- package/useAutocomplete/index.d.ts +1 -1
- package/useAutocomplete/index.js +4 -3
- package/modern/AdapterDateFns/AdapterDateFns.js +0 -16
- package/modern/AdapterDateFns/index.js +0 -1
- package/modern/AdapterDayjs/AdapterDayjs.js +0 -16
- package/modern/AdapterDayjs/index.js +0 -1
- package/modern/AdapterLuxon/AdapterLuxon.js +0 -16
- package/modern/AdapterLuxon/index.js +0 -1
- package/modern/AdapterMoment/AdapterMoment.js +0 -16
- package/modern/AdapterMoment/index.js +0 -1
- package/modern/CalendarPicker/CalendarPicker.js +0 -21
- package/modern/CalendarPicker/index.js +0 -2
- package/modern/CalendarPickerSkeleton/CalendarPickerSkeleton.js +0 -25
- package/modern/CalendarPickerSkeleton/index.js +0 -2
- package/modern/ClockPicker/ClockPicker.js +0 -21
- package/modern/ClockPicker/index.js +0 -2
- package/modern/DatePicker/DatePicker.js +0 -19
- package/modern/DatePicker/index.js +0 -2
- package/modern/DateRangePicker/DateRangePicker.js +0 -18
- package/modern/DateRangePicker/index.js +0 -2
- package/modern/DateRangePickerDay/DateRangePickerDay.js +0 -22
- package/modern/DateRangePickerDay/index.js +0 -2
- package/modern/DateTimePicker/DateTimePicker.js +0 -20
- package/modern/DateTimePicker/index.js +0 -2
- package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -20
- package/modern/DesktopDatePicker/index.js +0 -2
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -18
- package/modern/DesktopDateRangePicker/index.js +0 -2
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -20
- package/modern/DesktopDateTimePicker/index.js +0 -2
- package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -20
- package/modern/DesktopTimePicker/index.js +0 -2
- package/modern/LoadingButton/LoadingButton.js +0 -23
- package/modern/LoadingButton/index.js +0 -1
- package/modern/LocalizationProvider/LocalizationProvider.js +0 -19
- package/modern/LocalizationProvider/index.js +0 -2
- package/modern/Masonry/Masonry.js +0 -338
- package/modern/Masonry/index.js +0 -3
- package/modern/Masonry/masonryClasses.js +0 -7
- package/modern/MobileDatePicker/MobileDatePicker.js +0 -20
- package/modern/MobileDatePicker/index.js +0 -2
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +0 -18
- package/modern/MobileDateRangePicker/index.js +0 -2
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +0 -20
- package/modern/MobileDateTimePicker/index.js +0 -2
- package/modern/MobileTimePicker/MobileTimePicker.js +0 -20
- package/modern/MobileTimePicker/index.js +0 -2
- package/modern/MonthPicker/MonthPicker.js +0 -25
- package/modern/MonthPicker/index.js +0 -2
- package/modern/PickersDay/PickersDay.js +0 -25
- package/modern/PickersDay/index.js +0 -2
- package/modern/StaticDatePicker/StaticDatePicker.js +0 -20
- package/modern/StaticDatePicker/index.js +0 -2
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +0 -18
- package/modern/StaticDateRangePicker/index.js +0 -2
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +0 -20
- package/modern/StaticDateTimePicker/index.js +0 -2
- package/modern/StaticTimePicker/StaticTimePicker.js +0 -20
- package/modern/StaticTimePicker/index.js +0 -2
- package/modern/TabContext/TabContext.js +0 -76
- package/modern/TabContext/index.js +0 -2
- package/modern/TabList/TabList.js +0 -44
- package/modern/TabList/index.js +0 -1
- package/modern/TabPanel/TabPanel.js +0 -96
- package/modern/TabPanel/index.js +0 -3
- package/modern/TabPanel/tabPanelClasses.js +0 -7
- package/modern/TimePicker/TimePicker.js +0 -20
- package/modern/TimePicker/index.js +0 -2
- package/modern/Timeline/Timeline.js +0 -114
- package/modern/Timeline/Timeline.types.js +0 -1
- package/modern/Timeline/TimelineContext.js +0 -12
- package/modern/Timeline/index.js +0 -4
- package/modern/Timeline/timelineClasses.js +0 -7
- package/modern/TimelineConnector/TimelineConnector.js +0 -72
- package/modern/TimelineConnector/index.js +0 -3
- package/modern/TimelineConnector/timelineConnectorClasses.js +0 -7
- package/modern/TimelineContent/TimelineContent.js +0 -89
- package/modern/TimelineContent/index.js +0 -3
- package/modern/TimelineContent/timelineContentClasses.js +0 -7
- package/modern/TimelineDot/TimelineDot.js +0 -123
- package/modern/TimelineDot/index.js +0 -3
- package/modern/TimelineDot/timelineDotClasses.js +0 -7
- package/modern/TimelineItem/TimelineItem.js +0 -128
- package/modern/TimelineItem/index.js +0 -3
- package/modern/TimelineItem/timelineItemClasses.js +0 -7
- package/modern/TimelineOppositeContent/TimelineOppositeContent.js +0 -91
- package/modern/TimelineOppositeContent/index.js +0 -3
- package/modern/TimelineOppositeContent/timelineOppositeContentClasses.js +0 -7
- package/modern/TimelineSeparator/TimelineSeparator.js +0 -69
- package/modern/TimelineSeparator/index.js +0 -3
- package/modern/TimelineSeparator/timelineSeparatorClasses.js +0 -7
- package/modern/TreeItem/TreeItem.js +0 -19
- package/modern/TreeItem/index.js +0 -2
- package/modern/TreeView/TreeView.js +0 -20
- package/modern/TreeView/index.js +0 -2
- package/modern/YearPicker/YearPicker.js +0 -24
- package/modern/YearPicker/index.js +0 -2
- package/modern/index.js +0 -88
- package/modern/internal/convertTimelinePositionToClass.js +0 -4
- package/modern/internal/svg-icons/ArrowDropDown.js +0 -12
- package/modern/internal/svg-icons/ArrowLeft.js +0 -12
- package/modern/internal/svg-icons/ArrowRight.js +0 -12
- package/modern/internal/svg-icons/Calendar.js +0 -12
- package/modern/internal/svg-icons/Clock.js +0 -16
- package/modern/internal/svg-icons/DateRange.js +0 -12
- package/modern/internal/svg-icons/Pen.js +0 -12
- package/modern/internal/svg-icons/Time.js +0 -16
- package/modern/package.json +0 -1
- package/modern/themeAugmentation/components.js +0 -2
- package/modern/themeAugmentation/index.js +0 -1
- package/modern/themeAugmentation/overrides.js +0 -4
- package/modern/themeAugmentation/props.js +0 -2
- package/modern/useAutocomplete/index.js +0 -1
- package/modern/zero-styled/index.js +0 -2
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @type {React.Context<{ idPrefix: string; value: string } | null>}
|
|
8
|
-
*/
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
const Context = /*#__PURE__*/React.createContext(null);
|
|
11
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
12
|
-
Context.displayName = 'TabContext';
|
|
13
|
-
}
|
|
14
|
-
function useUniquePrefix() {
|
|
15
|
-
const [id, setId] = React.useState(null);
|
|
16
|
-
React.useEffect(() => {
|
|
17
|
-
setId(`mui-p-${Math.round(Math.random() * 1e5)}`);
|
|
18
|
-
}, []);
|
|
19
|
-
return id;
|
|
20
|
-
}
|
|
21
|
-
export default function TabContext(props) {
|
|
22
|
-
const {
|
|
23
|
-
children,
|
|
24
|
-
value
|
|
25
|
-
} = props;
|
|
26
|
-
const idPrefix = useUniquePrefix();
|
|
27
|
-
const context = React.useMemo(() => {
|
|
28
|
-
return {
|
|
29
|
-
idPrefix,
|
|
30
|
-
value
|
|
31
|
-
};
|
|
32
|
-
}, [idPrefix, value]);
|
|
33
|
-
return /*#__PURE__*/_jsx(Context.Provider, {
|
|
34
|
-
value: context,
|
|
35
|
-
children: children
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
process.env.NODE_ENV !== "production" ? TabContext.propTypes /* remove-proptypes */ = {
|
|
39
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
40
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
41
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
42
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
43
|
-
/**
|
|
44
|
-
* The content of the component.
|
|
45
|
-
*/
|
|
46
|
-
children: PropTypes.node,
|
|
47
|
-
/**
|
|
48
|
-
* The value of the currently selected `Tab`.
|
|
49
|
-
*/
|
|
50
|
-
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
51
|
-
} : void 0;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @returns {unknown}
|
|
55
|
-
*/
|
|
56
|
-
export function useTabContext() {
|
|
57
|
-
return React.useContext(Context);
|
|
58
|
-
}
|
|
59
|
-
export function getPanelId(context, value) {
|
|
60
|
-
const {
|
|
61
|
-
idPrefix
|
|
62
|
-
} = context;
|
|
63
|
-
if (idPrefix === null) {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
return `${context.idPrefix}-P-${value}`;
|
|
67
|
-
}
|
|
68
|
-
export function getTabId(context, value) {
|
|
69
|
-
const {
|
|
70
|
-
idPrefix
|
|
71
|
-
} = context;
|
|
72
|
-
if (idPrefix === null) {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
return `${context.idPrefix}-T-${value}`;
|
|
76
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import Tabs from '@mui/material/Tabs';
|
|
6
|
-
import { useTabContext, getTabId, getPanelId } from "../TabContext/index.js";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
const TabList = /*#__PURE__*/React.forwardRef(function TabList(props, ref) {
|
|
9
|
-
const {
|
|
10
|
-
children: childrenProp,
|
|
11
|
-
...other
|
|
12
|
-
} = props;
|
|
13
|
-
const context = useTabContext();
|
|
14
|
-
if (context === null) {
|
|
15
|
-
throw new TypeError('No TabContext provided');
|
|
16
|
-
}
|
|
17
|
-
const children = React.Children.map(childrenProp, child => {
|
|
18
|
-
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
22
|
-
// SOMEDAY: `Tabs` will set those themselves
|
|
23
|
-
'aria-controls': getPanelId(context, child.props.value),
|
|
24
|
-
id: getTabId(context, child.props.value)
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
return /*#__PURE__*/_jsx(Tabs, {
|
|
28
|
-
...other,
|
|
29
|
-
ref: ref,
|
|
30
|
-
value: context.value,
|
|
31
|
-
children: children
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
process.env.NODE_ENV !== "production" ? TabList.propTypes /* remove-proptypes */ = {
|
|
35
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
36
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
37
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
38
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
39
|
-
/**
|
|
40
|
-
* A list of `<Tab />` elements.
|
|
41
|
-
*/
|
|
42
|
-
children: PropTypes.node
|
|
43
|
-
} : void 0;
|
|
44
|
-
export default TabList;
|
package/modern/TabList/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./TabList.js";
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
|
-
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
8
|
-
import { getTabPanelUtilityClass } from "./tabPanelClasses.js";
|
|
9
|
-
import { getPanelId, getTabId, useTabContext } from "../TabContext/index.js";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
const useUtilityClasses = ownerState => {
|
|
12
|
-
const {
|
|
13
|
-
classes,
|
|
14
|
-
hidden
|
|
15
|
-
} = ownerState;
|
|
16
|
-
const slots = {
|
|
17
|
-
root: ['root', hidden && 'hidden']
|
|
18
|
-
};
|
|
19
|
-
return composeClasses(slots, getTabPanelUtilityClass, classes);
|
|
20
|
-
};
|
|
21
|
-
const TabPanelRoot = styled('div', {
|
|
22
|
-
name: 'MuiTabPanel',
|
|
23
|
-
slot: 'Root',
|
|
24
|
-
overridesResolver: (props, styles) => styles.root
|
|
25
|
-
})(({
|
|
26
|
-
theme
|
|
27
|
-
}) => ({
|
|
28
|
-
padding: theme.spacing(3)
|
|
29
|
-
}));
|
|
30
|
-
const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
|
|
31
|
-
const props = useThemeProps({
|
|
32
|
-
props: inProps,
|
|
33
|
-
name: 'MuiTabPanel'
|
|
34
|
-
});
|
|
35
|
-
const {
|
|
36
|
-
children,
|
|
37
|
-
className,
|
|
38
|
-
value,
|
|
39
|
-
keepMounted = false,
|
|
40
|
-
...other
|
|
41
|
-
} = props;
|
|
42
|
-
const ownerState = {
|
|
43
|
-
...props
|
|
44
|
-
};
|
|
45
|
-
const classes = useUtilityClasses(ownerState);
|
|
46
|
-
const context = useTabContext();
|
|
47
|
-
if (context === null) {
|
|
48
|
-
throw new TypeError('No TabContext provided');
|
|
49
|
-
}
|
|
50
|
-
const id = getPanelId(context, value);
|
|
51
|
-
const tabId = getTabId(context, value);
|
|
52
|
-
return /*#__PURE__*/_jsx(TabPanelRoot, {
|
|
53
|
-
"aria-labelledby": tabId,
|
|
54
|
-
className: clsx(classes.root, className),
|
|
55
|
-
hidden: value !== context.value,
|
|
56
|
-
id: id,
|
|
57
|
-
ref: ref,
|
|
58
|
-
role: "tabpanel",
|
|
59
|
-
ownerState: ownerState,
|
|
60
|
-
...other,
|
|
61
|
-
children: (keepMounted || value === context.value) && children
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes */ = {
|
|
65
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
66
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
67
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
68
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
69
|
-
/**
|
|
70
|
-
* The content of the component.
|
|
71
|
-
*/
|
|
72
|
-
children: PropTypes.node,
|
|
73
|
-
/**
|
|
74
|
-
* Override or extend the styles applied to the component.
|
|
75
|
-
*/
|
|
76
|
-
classes: PropTypes.object,
|
|
77
|
-
/**
|
|
78
|
-
* @ignore
|
|
79
|
-
*/
|
|
80
|
-
className: PropTypes.string,
|
|
81
|
-
/**
|
|
82
|
-
* Always keep the children in the DOM.
|
|
83
|
-
* @default false
|
|
84
|
-
*/
|
|
85
|
-
keepMounted: PropTypes.bool,
|
|
86
|
-
/**
|
|
87
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
88
|
-
*/
|
|
89
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
90
|
-
/**
|
|
91
|
-
* The `value` of the corresponding `Tab`. Must use the index of the `Tab` when
|
|
92
|
-
* no `value` was passed to `Tab`.
|
|
93
|
-
*/
|
|
94
|
-
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
95
|
-
} : void 0;
|
|
96
|
-
export default TabPanel;
|
package/modern/TabPanel/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
-
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
|
-
export function getTabPanelUtilityClass(slot) {
|
|
4
|
-
return generateUtilityClass('MuiTabPanel', slot);
|
|
5
|
-
}
|
|
6
|
-
const tabPanelClasses = generateUtilityClasses('MuiTabPanel', ['root', 'hidden']);
|
|
7
|
-
export default tabPanelClasses;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
let warnedOnce = false;
|
|
6
|
-
const warn = () => {
|
|
7
|
-
if (!warnedOnce) {
|
|
8
|
-
console.warn(['MUI: The TimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`.', '', "You should use `import { TimePicker } from '@mui/x-date-pickers'`", "or `import { TimePicker } from '@mui/x-date-pickers/TimePicker'`", '', 'More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.'].join('\n'));
|
|
9
|
-
warnedOnce = true;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated The StaticTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
|
|
14
|
-
* @ignore - do not document.
|
|
15
|
-
*/
|
|
16
|
-
const TimePicker = /*#__PURE__*/React.forwardRef(function DeprecatedTimePicker() {
|
|
17
|
-
warn();
|
|
18
|
-
return null;
|
|
19
|
-
});
|
|
20
|
-
export default TimePicker;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
7
|
-
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import TimelineContext from "./TimelineContext.js";
|
|
9
|
-
import { getTimelineUtilityClass } from "./timelineClasses.js";
|
|
10
|
-
import convertTimelinePositionToClass from "../internal/convertTimelinePositionToClass.js";
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
const useUtilityClasses = ownerState => {
|
|
13
|
-
const {
|
|
14
|
-
position,
|
|
15
|
-
classes
|
|
16
|
-
} = ownerState;
|
|
17
|
-
const slots = {
|
|
18
|
-
root: ['root', position && convertTimelinePositionToClass(position)]
|
|
19
|
-
};
|
|
20
|
-
return composeClasses(slots, getTimelineUtilityClass, classes);
|
|
21
|
-
};
|
|
22
|
-
const TimelineRoot = styled('ul', {
|
|
23
|
-
name: 'MuiTimeline',
|
|
24
|
-
slot: 'Root',
|
|
25
|
-
overridesResolver: (props, styles) => {
|
|
26
|
-
const {
|
|
27
|
-
ownerState
|
|
28
|
-
} = props;
|
|
29
|
-
return [styles.root, ownerState.position && styles[convertTimelinePositionToClass(ownerState.position)]];
|
|
30
|
-
}
|
|
31
|
-
})({
|
|
32
|
-
display: 'flex',
|
|
33
|
-
flexDirection: 'column',
|
|
34
|
-
padding: '6px 16px',
|
|
35
|
-
flexGrow: 1
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* Demos:
|
|
41
|
-
*
|
|
42
|
-
* - [Timeline](https://next.mui.com/material-ui/react-timeline/)
|
|
43
|
-
*
|
|
44
|
-
* API:
|
|
45
|
-
*
|
|
46
|
-
* - [Timeline API](https://next.mui.com/material-ui/api/timeline/)
|
|
47
|
-
*/
|
|
48
|
-
const Timeline = /*#__PURE__*/React.forwardRef(function Timeline(inProps, ref) {
|
|
49
|
-
const props = useThemeProps({
|
|
50
|
-
props: inProps,
|
|
51
|
-
name: 'MuiTimeline'
|
|
52
|
-
});
|
|
53
|
-
const {
|
|
54
|
-
position = 'right',
|
|
55
|
-
className,
|
|
56
|
-
...other
|
|
57
|
-
} = props;
|
|
58
|
-
const ownerState = {
|
|
59
|
-
...props,
|
|
60
|
-
position
|
|
61
|
-
};
|
|
62
|
-
const classes = useUtilityClasses(ownerState);
|
|
63
|
-
const contextValue = React.useMemo(() => ({
|
|
64
|
-
position
|
|
65
|
-
}), [position]);
|
|
66
|
-
return /*#__PURE__*/_jsx(TimelineContext.Provider, {
|
|
67
|
-
value: contextValue,
|
|
68
|
-
children: /*#__PURE__*/_jsx(TimelineRoot, {
|
|
69
|
-
className: clsx(classes.root, className),
|
|
70
|
-
ownerState: ownerState,
|
|
71
|
-
ref: ref,
|
|
72
|
-
...other
|
|
73
|
-
})
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
process.env.NODE_ENV !== "production" ? Timeline.propTypes /* remove-proptypes */ = {
|
|
77
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
78
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
79
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
80
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
81
|
-
/**
|
|
82
|
-
* The content of the component.
|
|
83
|
-
*/
|
|
84
|
-
children: PropTypes.node,
|
|
85
|
-
/**
|
|
86
|
-
* Override or extend the styles applied to the component.
|
|
87
|
-
*/
|
|
88
|
-
classes: PropTypes.object,
|
|
89
|
-
/**
|
|
90
|
-
* className applied to the root element.
|
|
91
|
-
*/
|
|
92
|
-
className: PropTypes.string,
|
|
93
|
-
/**
|
|
94
|
-
* The position where the TimelineContent should appear relative to the time axis.
|
|
95
|
-
* @default 'right'
|
|
96
|
-
*/
|
|
97
|
-
position: PropTypes.oneOf(['alternate-reverse', 'alternate', 'left', 'right']),
|
|
98
|
-
/**
|
|
99
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
100
|
-
*/
|
|
101
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
102
|
-
} : void 0;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
*
|
|
106
|
-
* Demos:
|
|
107
|
-
*
|
|
108
|
-
* - [Timeline](https://mui.com/components/timeline/)
|
|
109
|
-
*
|
|
110
|
-
* API:
|
|
111
|
-
*
|
|
112
|
-
* - [Timeline API](https://mui.com/api/timeline/)
|
|
113
|
-
*/
|
|
114
|
-
export default Timeline;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @ignore - internal component.
|
|
7
|
-
*/
|
|
8
|
-
const TimelineContext = /*#__PURE__*/React.createContext({});
|
|
9
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
10
|
-
TimelineContext.displayName = 'TimelineContext';
|
|
11
|
-
}
|
|
12
|
-
export default TimelineContext;
|
package/modern/Timeline/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
-
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
|
-
export function getTimelineUtilityClass(slot) {
|
|
4
|
-
return generateUtilityClass('MuiTimeline', slot);
|
|
5
|
-
}
|
|
6
|
-
const timelineClasses = generateUtilityClasses('MuiTimeline', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse']);
|
|
7
|
-
export default timelineClasses;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
7
|
-
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import { getTimelineConnectorUtilityClass } from "./timelineConnectorClasses.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
const useUtilityClasses = ownerState => {
|
|
11
|
-
const {
|
|
12
|
-
classes
|
|
13
|
-
} = ownerState;
|
|
14
|
-
const slots = {
|
|
15
|
-
root: ['root']
|
|
16
|
-
};
|
|
17
|
-
return composeClasses(slots, getTimelineConnectorUtilityClass, classes);
|
|
18
|
-
};
|
|
19
|
-
const TimelineConnectorRoot = styled('span', {
|
|
20
|
-
name: 'MuiTimelineConnector',
|
|
21
|
-
slot: 'Root',
|
|
22
|
-
overridesResolver: (props, styles) => styles.root
|
|
23
|
-
})(({
|
|
24
|
-
theme
|
|
25
|
-
}) => {
|
|
26
|
-
return {
|
|
27
|
-
width: 2,
|
|
28
|
-
backgroundColor: (theme.vars || theme).palette.grey[400],
|
|
29
|
-
flexGrow: 1
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
const TimelineConnector = /*#__PURE__*/React.forwardRef(function TimelineConnector(inProps, ref) {
|
|
33
|
-
const props = useThemeProps({
|
|
34
|
-
props: inProps,
|
|
35
|
-
name: 'MuiTimelineConnector'
|
|
36
|
-
});
|
|
37
|
-
const {
|
|
38
|
-
className,
|
|
39
|
-
...other
|
|
40
|
-
} = props;
|
|
41
|
-
const ownerState = props;
|
|
42
|
-
const classes = useUtilityClasses(ownerState);
|
|
43
|
-
return /*#__PURE__*/_jsx(TimelineConnectorRoot, {
|
|
44
|
-
className: clsx(classes.root, className),
|
|
45
|
-
ownerState: ownerState,
|
|
46
|
-
ref: ref,
|
|
47
|
-
...other
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
process.env.NODE_ENV !== "production" ? TimelineConnector.propTypes /* remove-proptypes */ = {
|
|
51
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
52
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
53
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
54
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
55
|
-
/**
|
|
56
|
-
* The content of the component.
|
|
57
|
-
*/
|
|
58
|
-
children: PropTypes.node,
|
|
59
|
-
/**
|
|
60
|
-
* Override or extend the styles applied to the component.
|
|
61
|
-
*/
|
|
62
|
-
classes: PropTypes.object,
|
|
63
|
-
/**
|
|
64
|
-
* @ignore
|
|
65
|
-
*/
|
|
66
|
-
className: PropTypes.string,
|
|
67
|
-
/**
|
|
68
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
69
|
-
*/
|
|
70
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
71
|
-
} : void 0;
|
|
72
|
-
export default TimelineConnector;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
-
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
|
-
export function getTimelineConnectorUtilityClass(slot) {
|
|
4
|
-
return generateUtilityClass('MuiTimelineConnector', slot);
|
|
5
|
-
}
|
|
6
|
-
const timelineConnectorClasses = generateUtilityClasses('MuiTimelineConnector', ['root']);
|
|
7
|
-
export default timelineConnectorClasses;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
|
-
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
8
|
-
import Typography from '@mui/material/Typography';
|
|
9
|
-
import TimelineContext from "../Timeline/TimelineContext.js";
|
|
10
|
-
import { getTimelineContentUtilityClass } from "./timelineContentClasses.js";
|
|
11
|
-
import convertTimelinePositionToClass from "../internal/convertTimelinePositionToClass.js";
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
const useUtilityClasses = ownerState => {
|
|
14
|
-
const {
|
|
15
|
-
position,
|
|
16
|
-
classes
|
|
17
|
-
} = ownerState;
|
|
18
|
-
const slots = {
|
|
19
|
-
root: ['root', convertTimelinePositionToClass(position)]
|
|
20
|
-
};
|
|
21
|
-
return composeClasses(slots, getTimelineContentUtilityClass, classes);
|
|
22
|
-
};
|
|
23
|
-
const TimelineContentRoot = styled(Typography, {
|
|
24
|
-
name: 'MuiTimelineContent',
|
|
25
|
-
slot: 'Root',
|
|
26
|
-
overridesResolver: (props, styles) => {
|
|
27
|
-
const {
|
|
28
|
-
ownerState
|
|
29
|
-
} = props;
|
|
30
|
-
return [styles.root, styles[convertTimelinePositionToClass(ownerState.position)]];
|
|
31
|
-
}
|
|
32
|
-
})(({
|
|
33
|
-
ownerState
|
|
34
|
-
}) => ({
|
|
35
|
-
flex: 1,
|
|
36
|
-
padding: '6px 16px',
|
|
37
|
-
textAlign: 'left',
|
|
38
|
-
...(ownerState.position === 'left' && {
|
|
39
|
-
textAlign: 'right'
|
|
40
|
-
})
|
|
41
|
-
}));
|
|
42
|
-
const TimelineContent = /*#__PURE__*/React.forwardRef(function TimelineContent(inProps, ref) {
|
|
43
|
-
const props = useThemeProps({
|
|
44
|
-
props: inProps,
|
|
45
|
-
name: 'MuiTimelineContent'
|
|
46
|
-
});
|
|
47
|
-
const {
|
|
48
|
-
className,
|
|
49
|
-
...other
|
|
50
|
-
} = props;
|
|
51
|
-
const {
|
|
52
|
-
position: positionContext
|
|
53
|
-
} = React.useContext(TimelineContext);
|
|
54
|
-
const ownerState = {
|
|
55
|
-
...props,
|
|
56
|
-
position: positionContext || 'right'
|
|
57
|
-
};
|
|
58
|
-
const classes = useUtilityClasses(ownerState);
|
|
59
|
-
return /*#__PURE__*/_jsx(TimelineContentRoot, {
|
|
60
|
-
component: "div",
|
|
61
|
-
className: clsx(classes.root, className),
|
|
62
|
-
ownerState: ownerState,
|
|
63
|
-
ref: ref,
|
|
64
|
-
...other
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
process.env.NODE_ENV !== "production" ? TimelineContent.propTypes /* remove-proptypes */ = {
|
|
68
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
69
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
70
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
71
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
72
|
-
/**
|
|
73
|
-
* The content of the component.
|
|
74
|
-
*/
|
|
75
|
-
children: PropTypes.node,
|
|
76
|
-
/**
|
|
77
|
-
* Override or extend the styles applied to the component.
|
|
78
|
-
*/
|
|
79
|
-
classes: PropTypes.object,
|
|
80
|
-
/**
|
|
81
|
-
* @ignore
|
|
82
|
-
*/
|
|
83
|
-
className: PropTypes.string,
|
|
84
|
-
/**
|
|
85
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
86
|
-
*/
|
|
87
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
88
|
-
} : void 0;
|
|
89
|
-
export default TimelineContent;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
-
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
|
-
export function getTimelineContentUtilityClass(slot) {
|
|
4
|
-
return generateUtilityClass('MuiTimelineContent', slot);
|
|
5
|
-
}
|
|
6
|
-
const timelineContentClasses = generateUtilityClasses('MuiTimelineContent', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse']);
|
|
7
|
-
export default timelineContentClasses;
|