@mui/lab 6.0.0-alpha.2 → 6.0.0-alpha.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.
Files changed (140) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/index.js +1 -1
  3. package/modern/index.js +1 -1
  4. package/node/index.js +1 -1
  5. package/package.json +5 -5
  6. package/legacy/AdapterDateFns/AdapterDateFns.js +0 -18
  7. package/legacy/AdapterDateFns/index.js +0 -1
  8. package/legacy/AdapterDayjs/AdapterDayjs.js +0 -18
  9. package/legacy/AdapterDayjs/index.js +0 -1
  10. package/legacy/AdapterLuxon/AdapterLuxon.js +0 -18
  11. package/legacy/AdapterLuxon/index.js +0 -1
  12. package/legacy/AdapterMoment/AdapterMoment.js +0 -18
  13. package/legacy/AdapterMoment/index.js +0 -1
  14. package/legacy/Alert/Alert.js +0 -20
  15. package/legacy/Alert/index.js +0 -1
  16. package/legacy/AlertTitle/AlertTitle.js +0 -20
  17. package/legacy/AlertTitle/index.js +0 -1
  18. package/legacy/Autocomplete/Autocomplete.js +0 -20
  19. package/legacy/Autocomplete/index.js +0 -1
  20. package/legacy/AvatarGroup/AvatarGroup.js +0 -20
  21. package/legacy/AvatarGroup/index.js +0 -1
  22. package/legacy/CalendarPicker/CalendarPicker.js +0 -21
  23. package/legacy/CalendarPicker/index.js +0 -2
  24. package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +0 -25
  25. package/legacy/CalendarPickerSkeleton/index.js +0 -2
  26. package/legacy/ClockPicker/ClockPicker.js +0 -21
  27. package/legacy/ClockPicker/index.js +0 -2
  28. package/legacy/DatePicker/DatePicker.js +0 -19
  29. package/legacy/DatePicker/index.js +0 -2
  30. package/legacy/DateRangePicker/DateRangePicker.js +0 -18
  31. package/legacy/DateRangePicker/index.js +0 -2
  32. package/legacy/DateRangePickerDay/DateRangePickerDay.js +0 -22
  33. package/legacy/DateRangePickerDay/index.js +0 -2
  34. package/legacy/DateTimePicker/DateTimePicker.js +0 -20
  35. package/legacy/DateTimePicker/index.js +0 -2
  36. package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -20
  37. package/legacy/DesktopDatePicker/index.js +0 -2
  38. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -18
  39. package/legacy/DesktopDateRangePicker/index.js +0 -2
  40. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -20
  41. package/legacy/DesktopDateTimePicker/index.js +0 -2
  42. package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -20
  43. package/legacy/DesktopTimePicker/index.js +0 -2
  44. package/legacy/LoadingButton/LoadingButton.js +0 -213
  45. package/legacy/LoadingButton/index.js +0 -3
  46. package/legacy/LoadingButton/loadingButtonClasses.js +0 -7
  47. package/legacy/LocalizationProvider/LocalizationProvider.js +0 -19
  48. package/legacy/LocalizationProvider/index.js +0 -2
  49. package/legacy/Masonry/Masonry.js +0 -339
  50. package/legacy/Masonry/index.js +0 -3
  51. package/legacy/Masonry/masonryClasses.js +0 -7
  52. package/legacy/MobileDatePicker/MobileDatePicker.js +0 -20
  53. package/legacy/MobileDatePicker/index.js +0 -2
  54. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +0 -18
  55. package/legacy/MobileDateRangePicker/index.js +0 -2
  56. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -20
  57. package/legacy/MobileDateTimePicker/index.js +0 -2
  58. package/legacy/MobileTimePicker/MobileTimePicker.js +0 -20
  59. package/legacy/MobileTimePicker/index.js +0 -2
  60. package/legacy/MonthPicker/MonthPicker.js +0 -25
  61. package/legacy/MonthPicker/index.js +0 -2
  62. package/legacy/Pagination/Pagination.js +0 -20
  63. package/legacy/Pagination/index.js +0 -2
  64. package/legacy/Pagination/usePagination.js +0 -3
  65. package/legacy/PaginationItem/PaginationItem.js +0 -20
  66. package/legacy/PaginationItem/index.js +0 -1
  67. package/legacy/PickersDay/PickersDay.js +0 -25
  68. package/legacy/PickersDay/index.js +0 -2
  69. package/legacy/Rating/Rating.js +0 -20
  70. package/legacy/Rating/index.js +0 -1
  71. package/legacy/Skeleton/Skeleton.js +0 -20
  72. package/legacy/Skeleton/index.js +0 -1
  73. package/legacy/SpeedDial/SpeedDial.js +0 -20
  74. package/legacy/SpeedDial/index.js +0 -1
  75. package/legacy/SpeedDialAction/SpeedDialAction.js +0 -20
  76. package/legacy/SpeedDialAction/index.js +0 -1
  77. package/legacy/SpeedDialIcon/SpeedDialIcon.js +0 -20
  78. package/legacy/SpeedDialIcon/index.js +0 -1
  79. package/legacy/StaticDatePicker/StaticDatePicker.js +0 -20
  80. package/legacy/StaticDatePicker/index.js +0 -2
  81. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +0 -18
  82. package/legacy/StaticDateRangePicker/index.js +0 -2
  83. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -20
  84. package/legacy/StaticDateTimePicker/index.js +0 -2
  85. package/legacy/StaticTimePicker/StaticTimePicker.js +0 -20
  86. package/legacy/StaticTimePicker/index.js +0 -2
  87. package/legacy/TabContext/TabContext.js +0 -72
  88. package/legacy/TabContext/index.js +0 -2
  89. package/legacy/TabList/TabList.js +0 -43
  90. package/legacy/TabList/index.js +0 -1
  91. package/legacy/TabPanel/TabPanel.js +0 -96
  92. package/legacy/TabPanel/index.js +0 -3
  93. package/legacy/TabPanel/tabPanelClasses.js +0 -7
  94. package/legacy/TimePicker/TimePicker.js +0 -20
  95. package/legacy/TimePicker/index.js +0 -2
  96. package/legacy/Timeline/Timeline.js +0 -113
  97. package/legacy/Timeline/Timeline.types.js +0 -1
  98. package/legacy/Timeline/TimelineContext.js +0 -10
  99. package/legacy/Timeline/index.js +0 -4
  100. package/legacy/Timeline/timelineClasses.js +0 -7
  101. package/legacy/TimelineConnector/TimelineConnector.js +0 -70
  102. package/legacy/TimelineConnector/index.js +0 -3
  103. package/legacy/TimelineConnector/timelineConnectorClasses.js +0 -7
  104. package/legacy/TimelineContent/TimelineContent.js +0 -82
  105. package/legacy/TimelineContent/index.js +0 -3
  106. package/legacy/TimelineContent/timelineContentClasses.js +0 -7
  107. package/legacy/TimelineDot/TimelineDot.js +0 -112
  108. package/legacy/TimelineDot/index.js +0 -3
  109. package/legacy/TimelineDot/timelineDotClasses.js +0 -7
  110. package/legacy/TimelineItem/TimelineItem.js +0 -118
  111. package/legacy/TimelineItem/index.js +0 -3
  112. package/legacy/TimelineItem/timelineItemClasses.js +0 -7
  113. package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +0 -84
  114. package/legacy/TimelineOppositeContent/index.js +0 -3
  115. package/legacy/TimelineOppositeContent/timelineOppositeContentClasses.js +0 -7
  116. package/legacy/TimelineSeparator/TimelineSeparator.js +0 -68
  117. package/legacy/TimelineSeparator/index.js +0 -3
  118. package/legacy/TimelineSeparator/timelineSeparatorClasses.js +0 -7
  119. package/legacy/ToggleButton/ToggleButton.js +0 -20
  120. package/legacy/ToggleButton/index.js +0 -1
  121. package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +0 -20
  122. package/legacy/ToggleButtonGroup/index.js +0 -1
  123. package/legacy/TreeItem/TreeItem.js +0 -19
  124. package/legacy/TreeItem/index.js +0 -2
  125. package/legacy/TreeView/TreeView.js +0 -20
  126. package/legacy/TreeView/index.js +0 -2
  127. package/legacy/YearPicker/YearPicker.js +0 -24
  128. package/legacy/YearPicker/index.js +0 -2
  129. package/legacy/index.js +0 -113
  130. package/legacy/internal/convertTimelinePositionToClass.js +0 -4
  131. package/legacy/internal/svg-icons/ArrowDropDown.js +0 -12
  132. package/legacy/internal/svg-icons/ArrowLeft.js +0 -12
  133. package/legacy/internal/svg-icons/ArrowRight.js +0 -12
  134. package/legacy/internal/svg-icons/Calendar.js +0 -12
  135. package/legacy/internal/svg-icons/Clock.js +0 -16
  136. package/legacy/internal/svg-icons/DateRange.js +0 -12
  137. package/legacy/internal/svg-icons/Pen.js +0 -12
  138. package/legacy/internal/svg-icons/Time.js +0 -16
  139. package/legacy/themeAugmentation/index.js +0 -1
  140. package/legacy/useAutocomplete/index.js +0 -1
@@ -1,20 +0,0 @@
1
- 'use client';
2
-
3
- /* eslint-disable @typescript-eslint/no-unused-vars */
4
- import * as React from 'react';
5
- var warnedOnce = false;
6
- var warn = function 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
- var TimePicker = /*#__PURE__*/React.forwardRef(function DeprecatedTimePicker() {
17
- warn();
18
- return null;
19
- });
20
- export default TimePicker;
@@ -1,2 +0,0 @@
1
- export { default } from './TimePicker';
2
- export * from './TimePicker';
@@ -1,113 +0,0 @@
1
- 'use client';
2
-
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
- import clsx from 'clsx';
8
- import { unstable_composeClasses as composeClasses } from '@mui/base';
9
- import { styled, useThemeProps } from '@mui/material/styles';
10
- import TimelineContext from './TimelineContext';
11
- import { getTimelineUtilityClass } from './timelineClasses';
12
- import convertTimelinePositionToClass from '../internal/convertTimelinePositionToClass';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- var useUtilityClasses = function useUtilityClasses(ownerState) {
15
- var position = ownerState.position,
16
- classes = ownerState.classes;
17
- var slots = {
18
- root: ['root', position && convertTimelinePositionToClass(position)]
19
- };
20
- return composeClasses(slots, getTimelineUtilityClass, classes);
21
- };
22
- var TimelineRoot = styled('ul', {
23
- name: 'MuiTimeline',
24
- slot: 'Root',
25
- overridesResolver: function overridesResolver(props, styles) {
26
- var ownerState = props.ownerState;
27
- return [styles.root, ownerState.position && styles[convertTimelinePositionToClass(ownerState.position)]];
28
- }
29
- })({
30
- display: 'flex',
31
- flexDirection: 'column',
32
- padding: '6px 16px',
33
- flexGrow: 1
34
- });
35
-
36
- /**
37
- *
38
- * Demos:
39
- *
40
- * - [Timeline](https://mui.com/material-ui/react-timeline/)
41
- *
42
- * API:
43
- *
44
- * - [Timeline API](https://mui.com/material-ui/api/timeline/)
45
- */
46
- var Timeline = /*#__PURE__*/React.forwardRef(function Timeline(inProps, ref) {
47
- var props = useThemeProps({
48
- props: inProps,
49
- name: 'MuiTimeline'
50
- });
51
- var _props$position = props.position,
52
- position = _props$position === void 0 ? 'right' : _props$position,
53
- className = props.className,
54
- other = _objectWithoutProperties(props, ["position", "className"]);
55
- var ownerState = _extends({}, props, {
56
- position: position
57
- });
58
- var classes = useUtilityClasses(ownerState);
59
- var contextValue = React.useMemo(function () {
60
- return {
61
- position: position
62
- };
63
- }, [position]);
64
- return /*#__PURE__*/_jsx(TimelineContext.Provider, {
65
- value: contextValue,
66
- children: /*#__PURE__*/_jsx(TimelineRoot, _extends({
67
- className: clsx(classes.root, className),
68
- ownerState: ownerState
69
- // @ts-expect-error TypeScript bug, need to keep unknown for DX
70
- ,
71
- ref: ref
72
- }, other))
73
- });
74
- });
75
- process.env.NODE_ENV !== "production" ? Timeline.propTypes /* remove-proptypes */ = {
76
- // ┌────────────────────────────── Warning ──────────────────────────────┐
77
- // │ These PropTypes are generated from the TypeScript type definitions. │
78
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
79
- // └─────────────────────────────────────────────────────────────────────┘
80
- /**
81
- * The content of the component.
82
- */
83
- children: PropTypes.node,
84
- /**
85
- * Override or extend the styles applied to the component.
86
- */
87
- classes: PropTypes.object,
88
- /**
89
- * className applied to the root element.
90
- */
91
- className: PropTypes.string,
92
- /**
93
- * The position where the TimelineContent should appear relative to the time axis.
94
- * @default 'right'
95
- */
96
- position: PropTypes.oneOf(['alternate-reverse', 'alternate', 'left', 'right']),
97
- /**
98
- * The system prop that allows defining system overrides as well as additional CSS styles.
99
- */
100
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
101
- } : void 0;
102
-
103
- /**
104
- *
105
- * Demos:
106
- *
107
- * - [Timeline](https://mui.com/components/timeline/)
108
- *
109
- * API:
110
- *
111
- * - [Timeline API](https://mui.com/api/timeline/)
112
- */
113
- export default Timeline;
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
-
3
- /**
4
- * @ignore - internal component.
5
- */
6
- var TimelineContext = /*#__PURE__*/React.createContext({});
7
- if (process.env.NODE_ENV !== 'production') {
8
- TimelineContext.displayName = 'TimelineContext';
9
- }
10
- export default TimelineContext;
@@ -1,4 +0,0 @@
1
- export { default } from './Timeline';
2
- export * from './Timeline.types';
3
- export { default as timelineClasses } from './timelineClasses';
4
- export * from './timelineClasses';
@@ -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
- var timelineClasses = generateUtilityClasses('MuiTimeline', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse']);
7
- export default timelineClasses;
@@ -1,70 +0,0 @@
1
- 'use client';
2
-
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
- import clsx from 'clsx';
8
- import { unstable_composeClasses as composeClasses } from '@mui/base';
9
- import { styled, useThemeProps } from '@mui/material/styles';
10
- import { getTimelineConnectorUtilityClass } from './timelineConnectorClasses';
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- var useUtilityClasses = function useUtilityClasses(ownerState) {
13
- var classes = ownerState.classes;
14
- var slots = {
15
- root: ['root']
16
- };
17
- return composeClasses(slots, getTimelineConnectorUtilityClass, classes);
18
- };
19
- var TimelineConnectorRoot = styled('span', {
20
- name: 'MuiTimelineConnector',
21
- slot: 'Root',
22
- overridesResolver: function overridesResolver(props, styles) {
23
- return styles.root;
24
- }
25
- })(function (_ref) {
26
- var theme = _ref.theme;
27
- return {
28
- width: 2,
29
- backgroundColor: (theme.vars || theme).palette.grey[400],
30
- flexGrow: 1
31
- };
32
- });
33
- var TimelineConnector = /*#__PURE__*/React.forwardRef(function TimelineConnector(inProps, ref) {
34
- var props = useThemeProps({
35
- props: inProps,
36
- name: 'MuiTimelineConnector'
37
- });
38
- var className = props.className,
39
- other = _objectWithoutProperties(props, ["className"]);
40
- var ownerState = props;
41
- var classes = useUtilityClasses(ownerState);
42
- return /*#__PURE__*/_jsx(TimelineConnectorRoot, _extends({
43
- className: clsx(classes.root, className),
44
- ownerState: ownerState,
45
- ref: ref
46
- }, other));
47
- });
48
- process.env.NODE_ENV !== "production" ? TimelineConnector.propTypes /* remove-proptypes */ = {
49
- // ┌────────────────────────────── Warning ──────────────────────────────┐
50
- // │ These PropTypes are generated from the TypeScript type definitions. │
51
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
52
- // └─────────────────────────────────────────────────────────────────────┘
53
- /**
54
- * The content of the component.
55
- */
56
- children: PropTypes.node,
57
- /**
58
- * Override or extend the styles applied to the component.
59
- */
60
- classes: PropTypes.object,
61
- /**
62
- * @ignore
63
- */
64
- className: PropTypes.string,
65
- /**
66
- * The system prop that allows defining system overrides as well as additional CSS styles.
67
- */
68
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
69
- } : void 0;
70
- export default TimelineConnector;
@@ -1,3 +0,0 @@
1
- export { default } from './TimelineConnector';
2
- export { default as timelineConnectorClasses } from './timelineConnectorClasses';
3
- export * from './timelineConnectorClasses';
@@ -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
- var timelineConnectorClasses = generateUtilityClasses('MuiTimelineConnector', ['root']);
7
- export default timelineConnectorClasses;
@@ -1,82 +0,0 @@
1
- 'use client';
2
-
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- import _extends from "@babel/runtime/helpers/esm/extends";
5
- import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
- import clsx from 'clsx';
8
- import { styled, useThemeProps } from '@mui/material/styles';
9
- import { unstable_composeClasses as composeClasses } from '@mui/base';
10
- import Typography from '@mui/material/Typography';
11
- import TimelineContext from '../Timeline/TimelineContext';
12
- import { getTimelineContentUtilityClass } from './timelineContentClasses';
13
- import convertTimelinePositionToClass from '../internal/convertTimelinePositionToClass';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- var useUtilityClasses = function useUtilityClasses(ownerState) {
16
- var position = ownerState.position,
17
- classes = ownerState.classes;
18
- var slots = {
19
- root: ['root', convertTimelinePositionToClass(position)]
20
- };
21
- return composeClasses(slots, getTimelineContentUtilityClass, classes);
22
- };
23
- var TimelineContentRoot = styled(Typography, {
24
- name: 'MuiTimelineContent',
25
- slot: 'Root',
26
- overridesResolver: function overridesResolver(props, styles) {
27
- var ownerState = props.ownerState;
28
- return [styles.root, styles[convertTimelinePositionToClass(ownerState.position)]];
29
- }
30
- })(function (_ref) {
31
- var ownerState = _ref.ownerState;
32
- return _extends({
33
- flex: 1,
34
- padding: '6px 16px',
35
- textAlign: 'left'
36
- }, ownerState.position === 'left' && {
37
- textAlign: 'right'
38
- });
39
- });
40
- var TimelineContent = /*#__PURE__*/React.forwardRef(function TimelineContent(inProps, ref) {
41
- var props = useThemeProps({
42
- props: inProps,
43
- name: 'MuiTimelineContent'
44
- });
45
- var className = props.className,
46
- other = _objectWithoutProperties(props, ["className"]);
47
- var _React$useContext = React.useContext(TimelineContext),
48
- positionContext = _React$useContext.position;
49
- var ownerState = _extends({}, props, {
50
- position: positionContext || 'right'
51
- });
52
- var classes = useUtilityClasses(ownerState);
53
- return /*#__PURE__*/_jsx(TimelineContentRoot, _extends({
54
- component: "div",
55
- className: clsx(classes.root, className),
56
- ownerState: ownerState,
57
- ref: ref
58
- }, other));
59
- });
60
- process.env.NODE_ENV !== "production" ? TimelineContent.propTypes /* remove-proptypes */ = {
61
- // ┌────────────────────────────── Warning ──────────────────────────────┐
62
- // │ These PropTypes are generated from the TypeScript type definitions. │
63
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
64
- // └─────────────────────────────────────────────────────────────────────┘
65
- /**
66
- * The content of the component.
67
- */
68
- children: PropTypes.node,
69
- /**
70
- * Override or extend the styles applied to the component.
71
- */
72
- classes: PropTypes.object,
73
- /**
74
- * @ignore
75
- */
76
- className: PropTypes.string,
77
- /**
78
- * The system prop that allows defining system overrides as well as additional CSS styles.
79
- */
80
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
81
- } : void 0;
82
- export default TimelineContent;
@@ -1,3 +0,0 @@
1
- export { default } from './TimelineContent';
2
- export { default as timelineContentClasses } from './timelineContentClasses';
3
- export * from './timelineContentClasses';
@@ -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
- var timelineContentClasses = generateUtilityClasses('MuiTimelineContent', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse']);
7
- export default timelineContentClasses;
@@ -1,112 +0,0 @@
1
- 'use client';
2
-
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- import _extends from "@babel/runtime/helpers/esm/extends";
5
- import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
- import clsx from 'clsx';
8
- import { styled, useThemeProps } from '@mui/material/styles';
9
- import { capitalize } from '@mui/material/utils';
10
- import { unstable_composeClasses as composeClasses } from '@mui/base';
11
- import { getTimelineDotUtilityClass } from './timelineDotClasses';
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- var useUtilityClasses = function useUtilityClasses(ownerState) {
14
- var color = ownerState.color,
15
- variant = ownerState.variant,
16
- classes = ownerState.classes;
17
- var slots = {
18
- root: ['root', variant, color !== 'inherit' && "".concat(variant).concat(capitalize(color))]
19
- };
20
- return composeClasses(slots, getTimelineDotUtilityClass, classes);
21
- };
22
- var TimelineDotRoot = styled('span', {
23
- name: 'MuiTimelineDot',
24
- slot: 'Root',
25
- overridesResolver: function overridesResolver(props, styles) {
26
- var ownerState = props.ownerState;
27
- return [styles.root, styles[ownerState.color !== 'inherit' && "".concat(ownerState.variant).concat(capitalize(ownerState.color))], styles[ownerState.variant]];
28
- }
29
- })(function (_ref) {
30
- var ownerState = _ref.ownerState,
31
- theme = _ref.theme;
32
- return _extends({
33
- display: 'flex',
34
- alignSelf: 'baseline',
35
- borderStyle: 'solid',
36
- borderWidth: 2,
37
- padding: 4,
38
- borderRadius: '50%',
39
- boxShadow: (theme.vars || theme).shadows[1],
40
- margin: '11.5px 0'
41
- }, ownerState.variant === 'filled' && _extends({
42
- borderColor: 'transparent'
43
- }, ownerState.color !== 'inherit' && _extends({}, ownerState.color === 'grey' ? {
44
- color: (theme.vars || theme).palette.grey[50],
45
- backgroundColor: (theme.vars || theme).palette.grey[400]
46
- } : {
47
- color: (theme.vars || theme).palette[ownerState.color].contrastText,
48
- backgroundColor: (theme.vars || theme).palette[ownerState.color].main
49
- })), ownerState.variant === 'outlined' && _extends({
50
- boxShadow: 'none',
51
- backgroundColor: 'transparent'
52
- }, ownerState.color !== 'inherit' && _extends({}, ownerState.color === 'grey' ? {
53
- borderColor: (theme.vars || theme).palette.grey[400]
54
- } : {
55
- borderColor: (theme.vars || theme).palette[ownerState.color].main
56
- })));
57
- });
58
- var TimelineDot = /*#__PURE__*/React.forwardRef(function TimelineDot(inProps, ref) {
59
- var props = useThemeProps({
60
- props: inProps,
61
- name: 'MuiTimelineDot'
62
- });
63
- var className = props.className,
64
- _props$color = props.color,
65
- color = _props$color === void 0 ? 'grey' : _props$color,
66
- _props$variant = props.variant,
67
- variant = _props$variant === void 0 ? 'filled' : _props$variant,
68
- other = _objectWithoutProperties(props, ["className", "color", "variant"]);
69
- var ownerState = _extends({}, props, {
70
- color: color,
71
- variant: variant
72
- });
73
- var classes = useUtilityClasses(ownerState);
74
- return /*#__PURE__*/_jsx(TimelineDotRoot, _extends({
75
- className: clsx(classes.root, className),
76
- ownerState: ownerState,
77
- ref: ref
78
- }, other));
79
- });
80
- process.env.NODE_ENV !== "production" ? TimelineDot.propTypes /* remove-proptypes */ = {
81
- // ┌────────────────────────────── Warning ──────────────────────────────┐
82
- // │ These PropTypes are generated from the TypeScript type definitions. │
83
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
84
- // └─────────────────────────────────────────────────────────────────────┘
85
- /**
86
- * The content of the component.
87
- */
88
- children: PropTypes.node,
89
- /**
90
- * Override or extend the styles applied to the component.
91
- */
92
- classes: PropTypes.object,
93
- /**
94
- * @ignore
95
- */
96
- className: PropTypes.string,
97
- /**
98
- * The dot can have a different colors.
99
- * @default 'grey'
100
- */
101
- color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'grey', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),
102
- /**
103
- * The system prop that allows defining system overrides as well as additional CSS styles.
104
- */
105
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
106
- /**
107
- * The dot can appear filled or outlined.
108
- * @default 'filled'
109
- */
110
- variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['filled', 'outlined']), PropTypes.string])
111
- } : void 0;
112
- export default TimelineDot;
@@ -1,3 +0,0 @@
1
- export { default } from './TimelineDot';
2
- export { default as timelineDotClasses } from './timelineDotClasses';
3
- export * from './timelineDotClasses';
@@ -1,7 +0,0 @@
1
- import generateUtilityClass from '@mui/utils/generateUtilityClass';
2
- import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
3
- export function getTimelineDotUtilityClass(slot) {
4
- return generateUtilityClass('MuiTimelineDot', slot);
5
- }
6
- var timelineDotClasses = generateUtilityClasses('MuiTimelineDot', ['root', 'filled', 'outlined', 'filledGrey', 'outlinedGrey', 'filledPrimary', 'outlinedPrimary', 'filledSecondary', 'outlinedSecondary']);
7
- export default timelineDotClasses;
@@ -1,118 +0,0 @@
1
- 'use client';
2
-
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
- import _extends from "@babel/runtime/helpers/esm/extends";
6
- import * as React from 'react';
7
- import PropTypes from 'prop-types';
8
- import clsx from 'clsx';
9
- import { isMuiElement } from '@mui/material/utils';
10
- import { styled, useThemeProps } from '@mui/material/styles';
11
- import { unstable_composeClasses as composeClasses } from '@mui/base';
12
- import { timelineContentClasses } from '../TimelineContent';
13
- import { timelineOppositeContentClasses } from '../TimelineOppositeContent';
14
- import TimelineContext from '../Timeline/TimelineContext';
15
- import { getTimelineItemUtilityClass } from './timelineItemClasses';
16
- import convertTimelinePositionToClass from '../internal/convertTimelinePositionToClass';
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- var useUtilityClasses = function useUtilityClasses(ownerState) {
19
- var position = ownerState.position,
20
- classes = ownerState.classes,
21
- hasOppositeContent = ownerState.hasOppositeContent;
22
- var slots = {
23
- root: ['root', convertTimelinePositionToClass(position), !hasOppositeContent && 'missingOppositeContent']
24
- };
25
- return composeClasses(slots, getTimelineItemUtilityClass, classes);
26
- };
27
- var TimelineItemRoot = styled('li', {
28
- name: 'MuiTimelineItem',
29
- slot: 'Root',
30
- overridesResolver: function overridesResolver(props, styles) {
31
- var ownerState = props.ownerState;
32
- return [styles.root, styles[convertTimelinePositionToClass(ownerState.position)]];
33
- }
34
- })(function (_ref) {
35
- var ownerState = _ref.ownerState;
36
- return _extends({
37
- listStyle: 'none',
38
- display: 'flex',
39
- position: 'relative',
40
- minHeight: 70
41
- }, ownerState.position === 'left' && {
42
- flexDirection: 'row-reverse'
43
- }, (ownerState.position === 'alternate' || ownerState.position === 'alternate-reverse') && _defineProperty({}, "&:nth-of-type(".concat(ownerState.position === 'alternate' ? 'even' : 'odd', ")"), _defineProperty(_defineProperty({
44
- flexDirection: 'row-reverse'
45
- }, "& .".concat(timelineContentClasses.root), {
46
- textAlign: 'right'
47
- }), "& .".concat(timelineOppositeContentClasses.root), {
48
- textAlign: 'left'
49
- })), !ownerState.hasOppositeContent && {
50
- '&::before': {
51
- content: '""',
52
- flex: 1,
53
- padding: '6px 16px'
54
- }
55
- });
56
- });
57
- var TimelineItem = /*#__PURE__*/React.forwardRef(function TimelineItem(inProps, ref) {
58
- var props = useThemeProps({
59
- props: inProps,
60
- name: 'MuiTimelineItem'
61
- });
62
- var positionProp = props.position,
63
- className = props.className,
64
- other = _objectWithoutProperties(props, ["position", "className"]);
65
- var _React$useContext = React.useContext(TimelineContext),
66
- positionContext = _React$useContext.position;
67
- var hasOppositeContent = false;
68
- React.Children.forEach(props.children, function (child) {
69
- if (isMuiElement(child, ['TimelineOppositeContent'])) {
70
- hasOppositeContent = true;
71
- }
72
- });
73
- var ownerState = _extends({}, props, {
74
- position: positionProp || positionContext || 'right',
75
- hasOppositeContent: hasOppositeContent
76
- });
77
- var classes = useUtilityClasses(ownerState);
78
- var contextValue = React.useMemo(function () {
79
- return {
80
- position: ownerState.position
81
- };
82
- }, [ownerState.position]);
83
- return /*#__PURE__*/_jsx(TimelineContext.Provider, {
84
- value: contextValue,
85
- children: /*#__PURE__*/_jsx(TimelineItemRoot, _extends({
86
- className: clsx(classes.root, className),
87
- ownerState: ownerState,
88
- ref: ref
89
- }, other))
90
- });
91
- });
92
- process.env.NODE_ENV !== "production" ? TimelineItem.propTypes /* remove-proptypes */ = {
93
- // ┌────────────────────────────── Warning ──────────────────────────────┐
94
- // │ These PropTypes are generated from the TypeScript type definitions. │
95
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
96
- // └─────────────────────────────────────────────────────────────────────┘
97
- /**
98
- * The content of the component.
99
- */
100
- children: PropTypes.node,
101
- /**
102
- * Override or extend the styles applied to the component.
103
- */
104
- classes: PropTypes.object,
105
- /**
106
- * @ignore
107
- */
108
- className: PropTypes.string,
109
- /**
110
- * The position where the timeline's item should appear.
111
- */
112
- position: PropTypes.oneOf(['alternate-reverse', 'alternate', 'left', 'right']),
113
- /**
114
- * The system prop that allows defining system overrides as well as additional CSS styles.
115
- */
116
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
117
- } : void 0;
118
- export default TimelineItem;
@@ -1,3 +0,0 @@
1
- export { default } from './TimelineItem';
2
- export { default as timelineItemClasses } from './timelineItemClasses';
3
- export * from './timelineItemClasses';
@@ -1,7 +0,0 @@
1
- import generateUtilityClass from '@mui/utils/generateUtilityClass';
2
- import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
3
- export function getTimelineItemUtilityClass(slot) {
4
- return generateUtilityClass('MuiTimelineItem', slot);
5
- }
6
- var timelineItemClasses = generateUtilityClasses('MuiTimelineItem', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse', 'missingOppositeContent']);
7
- export default timelineItemClasses;