@redsift/table 12.4.0-muiv7 → 12.5.0-muiv6
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/_internal/BasePopper.js +187 -191
- package/_internal/BasePopper.js.map +1 -1
- package/_internal/ControlledPagination.js +5605 -6994
- package/_internal/ControlledPagination.js.map +1 -1
- package/_internal/DataGrid2.js +135 -59
- package/_internal/DataGrid2.js.map +1 -1
- package/_internal/GridToolbarFilterSemanticField2.js +1 -1
- package/_internal/GridToolbarFilterSemanticField2.js.map +1 -1
- package/_internal/Pagination.js +1 -1
- package/_internal/Portal.js +1686 -3886
- package/_internal/Portal.js.map +1 -1
- package/_internal/StatefulDataGrid.js +1 -1
- package/_internal/StatefulDataGrid2.js +658 -711
- package/_internal/StatefulDataGrid2.js.map +1 -1
- package/_internal/Toolbar2.js +5 -22
- package/_internal/Toolbar2.js.map +1 -1
- package/_internal/ToolbarWrapper2.js +2 -2
- package/_internal/ToolbarWrapper2.js.map +1 -1
- package/_internal/useControlledDatagridState.js +41 -962
- package/_internal/useControlledDatagridState.js.map +1 -1
- package/index.d.ts +339 -182
- package/index.js +11 -8
- package/index.js.map +1 -1
- package/package.json +9 -9
package/_internal/BasePopper.js
CHANGED
|
@@ -1,91 +1,11 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, b as _extends } from './_rollupPluginBabelHelpers.js';
|
|
1
|
+
import { a as _objectWithoutProperties, b as _extends$1 } from './_rollupPluginBabelHelpers.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { forwardRef } from 'react';
|
|
4
4
|
import { ButtonsColorPalette, IconButton, Button, Checkbox, Icon } from '@redsift/design-system';
|
|
5
5
|
import { mdiFilterVariant, mdiViewColumn, mdiArrowUp, mdiArrowDown, mdiViewHeadline, mdiViewSequential, mdiViewStream, mdiChevronDown, mdiChevronRight, mdiTrayArrowDown } from '@redsift/icons';
|
|
6
|
-
import {
|
|
6
|
+
import { f as generateUtilityClass, g as generateUtilityClasses, _ as _objectWithoutPropertiesLoose, o as ownerDocument, n as Portal, a as _extends, p as chainPropTypes, P as PropTypes, H as HTMLElementType, m as refType, q as useForkRef, t as useEnhancedEffect, v as useSlotProps, l as composeClasses, w as useClassNamesOverride, h as styled, x as useTheme, j as useThemeProps } from './Portal.js';
|
|
7
7
|
import { j as jsxRuntimeExports } from './jsx-runtime.js';
|
|
8
8
|
|
|
9
|
-
const _excluded$2 = ["children", "color", "onClick", "startIcon"];
|
|
10
|
-
const BaseButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
11
|
-
var _props$className;
|
|
12
|
-
const {
|
|
13
|
-
children,
|
|
14
|
-
color: propsColor,
|
|
15
|
-
onClick,
|
|
16
|
-
startIcon
|
|
17
|
-
} = props,
|
|
18
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$2);
|
|
19
|
-
const color = Object.keys(ButtonsColorPalette).includes(propsColor) ? propsColor : 'primary';
|
|
20
|
-
if ((_props$className = props.className) !== null && _props$className !== void 0 && _props$className.includes('redsift-condensed')) {
|
|
21
|
-
return /*#__PURE__*/React__default.createElement(IconButton, _extends({}, forwardedProps, {
|
|
22
|
-
color: color,
|
|
23
|
-
onClick: onClick,
|
|
24
|
-
ref: ref,
|
|
25
|
-
variant: "unstyled",
|
|
26
|
-
isActive: props['aria-expanded'] === 'true',
|
|
27
|
-
icon: typeof startIcon !== 'string' ? /*#__PURE__*/React__default.cloneElement(startIcon, {
|
|
28
|
-
fontSize: 'medium'
|
|
29
|
-
}) : startIcon,
|
|
30
|
-
"aria-label": children,
|
|
31
|
-
size: "medium"
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
return /*#__PURE__*/React__default.createElement(Button, _extends({}, forwardedProps, {
|
|
35
|
-
color: color,
|
|
36
|
-
onClick: onClick,
|
|
37
|
-
ref: ref,
|
|
38
|
-
variant: "unstyled",
|
|
39
|
-
isActive: props['aria-expanded'] === 'true',
|
|
40
|
-
leftIcon: startIcon
|
|
41
|
-
}), children);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const _excluded$1 = ["checked", "indeterminate", "disabled", "onChange", "touchRippleRef"];
|
|
45
|
-
const BaseCheckbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
46
|
-
const {
|
|
47
|
-
checked,
|
|
48
|
-
indeterminate,
|
|
49
|
-
disabled,
|
|
50
|
-
onChange,
|
|
51
|
-
touchRippleRef: _touchRippleRef
|
|
52
|
-
} = props,
|
|
53
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$1);
|
|
54
|
-
return /*#__PURE__*/React__default.createElement(Checkbox, _extends({}, forwardedProps, forwardedProps.inputProps, {
|
|
55
|
-
isSelected: checked && !indeterminate,
|
|
56
|
-
isDisabled: disabled,
|
|
57
|
-
isIndeterminate: indeterminate,
|
|
58
|
-
ref: ref,
|
|
59
|
-
onChange: (isChecked, value, name, event) => onChange(event)
|
|
60
|
-
}));
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
const _excluded = ["displayName"];
|
|
64
|
-
const muiIconToDSIcon = {
|
|
65
|
-
columnFilteredIcon: mdiFilterVariant,
|
|
66
|
-
columnSelectorIcon: mdiViewColumn,
|
|
67
|
-
columnSortedAscendingIcon: mdiArrowUp,
|
|
68
|
-
columnSortedDescendingIcon: mdiArrowDown,
|
|
69
|
-
densityCompactIcon: mdiViewHeadline,
|
|
70
|
-
densityStandardIcon: mdiViewSequential,
|
|
71
|
-
densityComfortableIcon: mdiViewStream,
|
|
72
|
-
detailPanelCollapseIcon: mdiChevronDown,
|
|
73
|
-
detailPanelExpandIcon: mdiChevronRight,
|
|
74
|
-
exportIcon: mdiTrayArrowDown,
|
|
75
|
-
openFilterButtonIcon: mdiFilterVariant
|
|
76
|
-
};
|
|
77
|
-
const BaseIcon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
78
|
-
const {
|
|
79
|
-
displayName
|
|
80
|
-
} = props,
|
|
81
|
-
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
82
|
-
return /*#__PURE__*/React__default.createElement(Icon, _extends({}, forwardedProps, forwardedProps.inputProps, {
|
|
83
|
-
ref: ref,
|
|
84
|
-
size: forwardedProps.fontSize,
|
|
85
|
-
icon: muiIconToDSIcon[displayName]
|
|
86
|
-
}));
|
|
87
|
-
});
|
|
88
|
-
|
|
89
9
|
var top = 'top';
|
|
90
10
|
var bottom = 'bottom';
|
|
91
11
|
var right = 'right';
|
|
@@ -1882,6 +1802,8 @@ function getPopperUtilityClass(slot) {
|
|
|
1882
1802
|
}
|
|
1883
1803
|
generateUtilityClasses('MuiPopper', ['root']);
|
|
1884
1804
|
|
|
1805
|
+
const _excluded$4 = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"],
|
|
1806
|
+
_excluded2 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"];
|
|
1885
1807
|
function flipPlacement(placement, direction) {
|
|
1886
1808
|
if (direction === 'ltr') {
|
|
1887
1809
|
return placement;
|
|
@@ -1908,35 +1830,32 @@ function isHTMLElement(element) {
|
|
|
1908
1830
|
function isVirtualElement(element) {
|
|
1909
1831
|
return !isHTMLElement(element);
|
|
1910
1832
|
}
|
|
1911
|
-
const useUtilityClasses =
|
|
1912
|
-
const {
|
|
1913
|
-
classes
|
|
1914
|
-
} = ownerState;
|
|
1833
|
+
const useUtilityClasses = () => {
|
|
1915
1834
|
const slots = {
|
|
1916
1835
|
root: ['root']
|
|
1917
1836
|
};
|
|
1918
|
-
return composeClasses(slots, getPopperUtilityClass
|
|
1837
|
+
return composeClasses(slots, useClassNamesOverride(getPopperUtilityClass));
|
|
1919
1838
|
};
|
|
1920
1839
|
const defaultPopperOptions = {};
|
|
1921
1840
|
const PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props, forwardedRef) {
|
|
1841
|
+
var _slots$root;
|
|
1922
1842
|
const {
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
} = props;
|
|
1843
|
+
anchorEl,
|
|
1844
|
+
children,
|
|
1845
|
+
direction,
|
|
1846
|
+
disablePortal,
|
|
1847
|
+
modifiers,
|
|
1848
|
+
open,
|
|
1849
|
+
placement: initialPlacement,
|
|
1850
|
+
popperOptions,
|
|
1851
|
+
popperRef: popperRefProp,
|
|
1852
|
+
slotProps = {},
|
|
1853
|
+
slots = {},
|
|
1854
|
+
TransitionProps
|
|
1855
|
+
// @ts-ignore internal logic
|
|
1856
|
+
// prevent from spreading to DOM, it can come from the parent component e.g. Select.
|
|
1857
|
+
} = props,
|
|
1858
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$4);
|
|
1940
1859
|
const tooltipRef = React.useRef(null);
|
|
1941
1860
|
const ownRef = useForkRef(tooltipRef, forwardedRef);
|
|
1942
1861
|
const popperRef = React.useRef(null);
|
|
@@ -2004,11 +1923,11 @@ const PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props
|
|
|
2004
1923
|
if (popperOptions && popperOptions.modifiers != null) {
|
|
2005
1924
|
popperModifiers = popperModifiers.concat(popperOptions.modifiers);
|
|
2006
1925
|
}
|
|
2007
|
-
const popper = createPopper(resolvedAnchorElement, tooltipRef.current, {
|
|
2008
|
-
placement: rtlPlacement
|
|
2009
|
-
|
|
1926
|
+
const popper = createPopper(resolvedAnchorElement, tooltipRef.current, _extends({
|
|
1927
|
+
placement: rtlPlacement
|
|
1928
|
+
}, popperOptions, {
|
|
2010
1929
|
modifiers: popperModifiers
|
|
2011
|
-
});
|
|
1930
|
+
}));
|
|
2012
1931
|
handlePopperRefRef.current(popper);
|
|
2013
1932
|
return () => {
|
|
2014
1933
|
popper.destroy();
|
|
@@ -2021,8 +1940,8 @@ const PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props
|
|
|
2021
1940
|
if (TransitionProps !== null) {
|
|
2022
1941
|
childProps.TransitionProps = TransitionProps;
|
|
2023
1942
|
}
|
|
2024
|
-
const classes = useUtilityClasses(
|
|
2025
|
-
const Root = slots.root
|
|
1943
|
+
const classes = useUtilityClasses();
|
|
1944
|
+
const Root = (_slots$root = slots.root) != null ? _slots$root : 'div';
|
|
2026
1945
|
const rootProps = useSlotProps({
|
|
2027
1946
|
elementType: Root,
|
|
2028
1947
|
externalSlotProps: slotProps.root,
|
|
@@ -2034,34 +1953,41 @@ const PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props
|
|
|
2034
1953
|
ownerState: props,
|
|
2035
1954
|
className: classes.root
|
|
2036
1955
|
});
|
|
2037
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(Root, {
|
|
2038
|
-
...rootProps,
|
|
1956
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(Root, _extends({}, rootProps, {
|
|
2039
1957
|
children: typeof children === 'function' ? children(childProps) : children
|
|
2040
|
-
});
|
|
1958
|
+
}));
|
|
2041
1959
|
});
|
|
2042
1960
|
|
|
2043
1961
|
/**
|
|
2044
|
-
*
|
|
1962
|
+
* Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v2/) for positioning.
|
|
1963
|
+
*
|
|
1964
|
+
* Demos:
|
|
1965
|
+
*
|
|
1966
|
+
* - [Popper](https://mui.com/base/react-popper/)
|
|
1967
|
+
*
|
|
1968
|
+
* API:
|
|
1969
|
+
*
|
|
1970
|
+
* - [Popper API](https://mui.com/base/react-popper/components-api/#popper)
|
|
2045
1971
|
*/
|
|
2046
1972
|
const Popper$2 = /*#__PURE__*/React.forwardRef(function Popper(props, forwardedRef) {
|
|
2047
1973
|
const {
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
1974
|
+
anchorEl,
|
|
1975
|
+
children,
|
|
1976
|
+
container: containerProp,
|
|
1977
|
+
direction = 'ltr',
|
|
1978
|
+
disablePortal = false,
|
|
1979
|
+
keepMounted = false,
|
|
1980
|
+
modifiers,
|
|
1981
|
+
open,
|
|
1982
|
+
placement = 'bottom',
|
|
1983
|
+
popperOptions = defaultPopperOptions,
|
|
1984
|
+
popperRef,
|
|
1985
|
+
style,
|
|
1986
|
+
transition = false,
|
|
1987
|
+
slotProps = {},
|
|
1988
|
+
slots = {}
|
|
1989
|
+
} = props,
|
|
1990
|
+
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
2065
1991
|
const [exited, setExited] = React.useState(true);
|
|
2066
1992
|
const handleEnter = () => {
|
|
2067
1993
|
setExited(false);
|
|
@@ -2092,7 +2018,7 @@ const Popper$2 = /*#__PURE__*/React.forwardRef(function Popper(props, forwardedR
|
|
|
2092
2018
|
return /*#__PURE__*/jsxRuntimeExports.jsx(Portal, {
|
|
2093
2019
|
disablePortal: disablePortal,
|
|
2094
2020
|
container: container,
|
|
2095
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(PopperTooltip, {
|
|
2021
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(PopperTooltip, _extends({
|
|
2096
2022
|
anchorEl: anchorEl,
|
|
2097
2023
|
direction: direction,
|
|
2098
2024
|
disablePortal: disablePortal,
|
|
@@ -2103,27 +2029,26 @@ const Popper$2 = /*#__PURE__*/React.forwardRef(function Popper(props, forwardedR
|
|
|
2103
2029
|
popperOptions: popperOptions,
|
|
2104
2030
|
popperRef: popperRef,
|
|
2105
2031
|
slotProps: slotProps,
|
|
2106
|
-
slots: slots
|
|
2107
|
-
|
|
2108
|
-
style: {
|
|
2032
|
+
slots: slots
|
|
2033
|
+
}, other, {
|
|
2034
|
+
style: _extends({
|
|
2109
2035
|
// Prevents scroll issue, waiting for Popper.js to add this style once initiated.
|
|
2110
2036
|
position: 'fixed',
|
|
2111
2037
|
// Fix Popper.js display issue
|
|
2112
2038
|
top: 0,
|
|
2113
2039
|
left: 0,
|
|
2114
|
-
display
|
|
2115
|
-
|
|
2116
|
-
},
|
|
2040
|
+
display
|
|
2041
|
+
}, style),
|
|
2117
2042
|
TransitionProps: transitionProps,
|
|
2118
2043
|
children: children
|
|
2119
|
-
})
|
|
2044
|
+
}))
|
|
2120
2045
|
});
|
|
2121
2046
|
});
|
|
2122
2047
|
process.env.NODE_ENV !== "production" ? Popper$2.propTypes /* remove-proptypes */ = {
|
|
2123
|
-
//
|
|
2124
|
-
//
|
|
2125
|
-
//
|
|
2126
|
-
//
|
|
2048
|
+
// ----------------------------- Warning --------------------------------
|
|
2049
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
2050
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
2051
|
+
// ----------------------------------------------------------------------
|
|
2127
2052
|
/**
|
|
2128
2053
|
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
2129
2054
|
* or a function that returns either.
|
|
@@ -2152,9 +2077,6 @@ process.env.NODE_ENV !== "production" ? Popper$2.propTypes /* remove-proptypes *
|
|
|
2152
2077
|
* An HTML element or function that returns one.
|
|
2153
2078
|
* The `container` will have the portal children appended to it.
|
|
2154
2079
|
*
|
|
2155
|
-
* You can also provide a callback, which is called in a React layout effect.
|
|
2156
|
-
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
2157
|
-
*
|
|
2158
2080
|
* By default, it uses the body of the top-level document object,
|
|
2159
2081
|
* so it's simply `document.body` most of the time.
|
|
2160
2082
|
*/
|
|
@@ -2242,6 +2164,87 @@ process.env.NODE_ENV !== "production" ? Popper$2.propTypes /* remove-proptypes *
|
|
|
2242
2164
|
} : void 0;
|
|
2243
2165
|
var BasePopper$1 = Popper$2;
|
|
2244
2166
|
|
|
2167
|
+
const _excluded$3 = ["children", "color", "onClick", "startIcon"];
|
|
2168
|
+
const BaseButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
2169
|
+
var _props$className;
|
|
2170
|
+
const {
|
|
2171
|
+
children,
|
|
2172
|
+
color: propsColor,
|
|
2173
|
+
onClick,
|
|
2174
|
+
startIcon
|
|
2175
|
+
} = props,
|
|
2176
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$3);
|
|
2177
|
+
const color = Object.keys(ButtonsColorPalette).includes(propsColor) ? propsColor : 'primary';
|
|
2178
|
+
if ((_props$className = props.className) !== null && _props$className !== void 0 && _props$className.includes('redsift-condensed')) {
|
|
2179
|
+
return /*#__PURE__*/React__default.createElement(IconButton, _extends$1({}, forwardedProps, {
|
|
2180
|
+
color: color,
|
|
2181
|
+
onClick: onClick,
|
|
2182
|
+
ref: ref,
|
|
2183
|
+
variant: "unstyled",
|
|
2184
|
+
isActive: props['aria-expanded'] === 'true',
|
|
2185
|
+
icon: typeof startIcon !== 'string' ? /*#__PURE__*/React__default.cloneElement(startIcon, {
|
|
2186
|
+
fontSize: 'medium'
|
|
2187
|
+
}) : startIcon,
|
|
2188
|
+
"aria-label": children,
|
|
2189
|
+
size: "medium"
|
|
2190
|
+
}));
|
|
2191
|
+
}
|
|
2192
|
+
return /*#__PURE__*/React__default.createElement(Button, _extends$1({}, forwardedProps, {
|
|
2193
|
+
color: color,
|
|
2194
|
+
onClick: onClick,
|
|
2195
|
+
ref: ref,
|
|
2196
|
+
variant: "unstyled",
|
|
2197
|
+
isActive: props['aria-expanded'] === 'true',
|
|
2198
|
+
leftIcon: startIcon
|
|
2199
|
+
}), children);
|
|
2200
|
+
});
|
|
2201
|
+
|
|
2202
|
+
const _excluded$2 = ["checked", "indeterminate", "disabled", "onChange", "touchRippleRef"];
|
|
2203
|
+
const BaseCheckbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
2204
|
+
const {
|
|
2205
|
+
checked,
|
|
2206
|
+
indeterminate,
|
|
2207
|
+
disabled,
|
|
2208
|
+
onChange,
|
|
2209
|
+
touchRippleRef: _touchRippleRef
|
|
2210
|
+
} = props,
|
|
2211
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$2);
|
|
2212
|
+
return /*#__PURE__*/React__default.createElement(Checkbox, _extends$1({}, forwardedProps, forwardedProps.inputProps, {
|
|
2213
|
+
isSelected: checked && !indeterminate,
|
|
2214
|
+
isDisabled: disabled,
|
|
2215
|
+
isIndeterminate: indeterminate,
|
|
2216
|
+
ref: ref,
|
|
2217
|
+
onChange: (isChecked, value, name, event) => onChange(event)
|
|
2218
|
+
}));
|
|
2219
|
+
});
|
|
2220
|
+
|
|
2221
|
+
const _excluded$1 = ["displayName"];
|
|
2222
|
+
const muiIconToDSIcon = {
|
|
2223
|
+
ColumnFilteredIcon: mdiFilterVariant,
|
|
2224
|
+
ColumnSelectorIcon: mdiViewColumn,
|
|
2225
|
+
ColumnSortedAscendingIcon: mdiArrowUp,
|
|
2226
|
+
ColumnSortedDescendingIcon: mdiArrowDown,
|
|
2227
|
+
DensityCompactIcon: mdiViewHeadline,
|
|
2228
|
+
DensityStandardIcon: mdiViewSequential,
|
|
2229
|
+
DensityComfortableIcon: mdiViewStream,
|
|
2230
|
+
DetailPanelCollapseIcon: mdiChevronDown,
|
|
2231
|
+
DetailPanelExpandIcon: mdiChevronRight,
|
|
2232
|
+
ExportIcon: mdiTrayArrowDown,
|
|
2233
|
+
OpenFilterButtonIcon: mdiFilterVariant
|
|
2234
|
+
};
|
|
2235
|
+
const BaseIcon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
2236
|
+
const {
|
|
2237
|
+
displayName
|
|
2238
|
+
} = props,
|
|
2239
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$1);
|
|
2240
|
+
return /*#__PURE__*/React__default.createElement(Icon, _extends$1({}, forwardedProps, forwardedProps.inputProps, {
|
|
2241
|
+
ref: ref,
|
|
2242
|
+
size: forwardedProps.fontSize,
|
|
2243
|
+
icon: muiIconToDSIcon[displayName]
|
|
2244
|
+
}));
|
|
2245
|
+
});
|
|
2246
|
+
|
|
2247
|
+
const _excluded = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"];
|
|
2245
2248
|
const PopperRoot = styled(BasePopper$1, {
|
|
2246
2249
|
name: 'MuiPopper',
|
|
2247
2250
|
slot: 'Root',
|
|
@@ -2252,40 +2255,41 @@ const PopperRoot = styled(BasePopper$1, {
|
|
|
2252
2255
|
*
|
|
2253
2256
|
* Demos:
|
|
2254
2257
|
*
|
|
2255
|
-
* - [Autocomplete](https://
|
|
2256
|
-
* - [Menu](https://
|
|
2257
|
-
* - [Popper](https://
|
|
2258
|
+
* - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)
|
|
2259
|
+
* - [Menu](https://mui.com/material-ui/react-menu/)
|
|
2260
|
+
* - [Popper](https://mui.com/material-ui/react-popper/)
|
|
2258
2261
|
*
|
|
2259
2262
|
* API:
|
|
2260
2263
|
*
|
|
2261
|
-
* - [Popper API](https://
|
|
2264
|
+
* - [Popper API](https://mui.com/material-ui/api/popper/)
|
|
2262
2265
|
*/
|
|
2263
2266
|
const Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
|
|
2264
|
-
|
|
2265
|
-
const
|
|
2267
|
+
var _slots$root;
|
|
2268
|
+
const theme = useTheme();
|
|
2269
|
+
const props = useThemeProps({
|
|
2266
2270
|
props: inProps,
|
|
2267
2271
|
name: 'MuiPopper'
|
|
2268
2272
|
});
|
|
2269
2273
|
const {
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
const RootComponent = slots
|
|
2288
|
-
const otherProps = {
|
|
2274
|
+
anchorEl,
|
|
2275
|
+
component,
|
|
2276
|
+
components,
|
|
2277
|
+
componentsProps,
|
|
2278
|
+
container,
|
|
2279
|
+
disablePortal,
|
|
2280
|
+
keepMounted,
|
|
2281
|
+
modifiers,
|
|
2282
|
+
open,
|
|
2283
|
+
placement,
|
|
2284
|
+
popperOptions,
|
|
2285
|
+
popperRef,
|
|
2286
|
+
transition,
|
|
2287
|
+
slots,
|
|
2288
|
+
slotProps
|
|
2289
|
+
} = props,
|
|
2290
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
2291
|
+
const RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;
|
|
2292
|
+
const otherProps = _extends({
|
|
2289
2293
|
anchorEl,
|
|
2290
2294
|
container,
|
|
2291
2295
|
disablePortal,
|
|
@@ -2295,25 +2299,24 @@ const Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
|
|
|
2295
2299
|
placement,
|
|
2296
2300
|
popperOptions,
|
|
2297
2301
|
popperRef,
|
|
2298
|
-
transition
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(PopperRoot, {
|
|
2302
|
+
transition
|
|
2303
|
+
}, other);
|
|
2304
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(PopperRoot, _extends({
|
|
2302
2305
|
as: component,
|
|
2303
|
-
direction:
|
|
2306
|
+
direction: theme == null ? void 0 : theme.direction,
|
|
2304
2307
|
slots: {
|
|
2305
2308
|
root: RootComponent
|
|
2306
2309
|
},
|
|
2307
|
-
slotProps: slotProps
|
|
2308
|
-
|
|
2310
|
+
slotProps: slotProps != null ? slotProps : componentsProps
|
|
2311
|
+
}, otherProps, {
|
|
2309
2312
|
ref: ref
|
|
2310
|
-
});
|
|
2313
|
+
}));
|
|
2311
2314
|
});
|
|
2312
2315
|
process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */ = {
|
|
2313
|
-
//
|
|
2314
|
-
//
|
|
2315
|
-
//
|
|
2316
|
-
//
|
|
2316
|
+
// ----------------------------- Warning --------------------------------
|
|
2317
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
2318
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
2319
|
+
// ----------------------------------------------------------------------
|
|
2317
2320
|
/**
|
|
2318
2321
|
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
2319
2322
|
* or a function that returns either.
|
|
@@ -2333,8 +2336,6 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
|
|
|
2333
2336
|
/**
|
|
2334
2337
|
* The components used for each slot inside the Popper.
|
|
2335
2338
|
* Either a string to use a HTML element or a component.
|
|
2336
|
-
*
|
|
2337
|
-
* @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
2338
2339
|
* @default {}
|
|
2339
2340
|
*/
|
|
2340
2341
|
components: PropTypes.shape({
|
|
@@ -2342,8 +2343,6 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
|
|
|
2342
2343
|
}),
|
|
2343
2344
|
/**
|
|
2344
2345
|
* The props used for each slot inside the Popper.
|
|
2345
|
-
*
|
|
2346
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
2347
2346
|
* @default {}
|
|
2348
2347
|
*/
|
|
2349
2348
|
componentsProps: PropTypes.shape({
|
|
@@ -2353,9 +2352,6 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
|
|
|
2353
2352
|
* An HTML element or function that returns one.
|
|
2354
2353
|
* The `container` will have the portal children appended to it.
|
|
2355
2354
|
*
|
|
2356
|
-
* You can also provide a callback, which is called in a React layout effect.
|
|
2357
|
-
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
2358
|
-
*
|
|
2359
2355
|
* By default, it uses the body of the top-level document object,
|
|
2360
2356
|
* so it's simply `document.body` most of the time.
|
|
2361
2357
|
*/
|
|
@@ -2443,7 +2439,7 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
|
|
|
2443
2439
|
var Popper$1 = Popper;
|
|
2444
2440
|
|
|
2445
2441
|
const BasePopper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
2446
|
-
return /*#__PURE__*/React__default.createElement(Popper$1, _extends({}, props, {
|
|
2442
|
+
return /*#__PURE__*/React__default.createElement(Popper$1, _extends$1({}, props, {
|
|
2447
2443
|
ref: ref,
|
|
2448
2444
|
container: () => document.getElementById('redsift-app-container')
|
|
2449
2445
|
}));
|