@superdispatch/ui 0.21.8 → 0.21.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-node/index.js +62 -14
- package/dist-node/index.js.map +1 -1
- package/dist-src/index.js +1 -0
- package/dist-src/info-tooltip/InfoTooltip.js +54 -0
- package/dist-types/index.d.ts +378 -366
- package/dist-web/index.js +64 -17
- package/dist-web/index.js.map +1 -1
- package/package.json +39 -39
package/dist-web/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import { Button as Button$1, CircularProgress, ButtonGroup, Popover, MenuList, Toolbar, Grid, MenuItem, Typography, Menu, Divider, ButtonBase, Avatar, FormControl, FormControlLabel, Checkbox, FormHelperText, FormLabel, FormGroup, useMediaQuery, Tooltip, SvgIcon, AppBar, List, Card, CardContent, TextField, Radio, RadioGroup, SnackbarContent as SnackbarContent$1,
|
|
4
|
-
import { MoreHoriz, Close, Warning, CheckCircle } from '@material-ui/icons';
|
|
3
|
+
import { Button as Button$1, CircularProgress, ButtonGroup, Popover, MenuList, Toolbar, Grid, MenuItem, Typography, Menu, Divider, ButtonBase, Avatar, FormControl, FormControlLabel, Checkbox, FormHelperText, FormLabel, FormGroup, useMediaQuery, Tooltip, SvgIcon, AppBar, List, Card, CardContent, IconButton, TextField, Radio, RadioGroup, SnackbarContent as SnackbarContent$1, Portal, Snackbar as Snackbar$1, Slide, CssBaseline, createTheme, createGenerateClassName } from '@material-ui/core';
|
|
4
|
+
import { MoreHoriz, Info, Close, Warning, CheckCircle } from '@material-ui/icons';
|
|
5
5
|
import { makeStyles, StylesProvider, ThemeProvider as ThemeProvider$1 } from '@material-ui/styles';
|
|
6
6
|
import { forwardRef, useState, useRef, useLayoutEffect, cloneElement, useMemo, useContext, createContext, Children, useCallback, useEffect } from 'react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1655,6 +1655,53 @@ var InfoCard = /*#__PURE__*/forwardRef((_ref, _ref2) => {
|
|
|
1655
1655
|
});
|
|
1656
1656
|
if (process.env.NODE_ENV !== "production") InfoCard.displayName = "InfoCard";
|
|
1657
1657
|
|
|
1658
|
+
var _excluded$h = ["children", "iconButtonProps", "fontSize", "TextProps", "title", "isOpen", "onClick", "onClose"];
|
|
1659
|
+
var Root = /*#__PURE__*/styled.div.withConfig({
|
|
1660
|
+
displayName: "InfoTooltip__Root",
|
|
1661
|
+
componentId: "SD__sc-1emqpa9-0"
|
|
1662
|
+
})(["display:flex;align-items:center;"]);
|
|
1663
|
+
var InfoTooltip = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1664
|
+
var {
|
|
1665
|
+
children,
|
|
1666
|
+
iconButtonProps,
|
|
1667
|
+
fontSize = 'small',
|
|
1668
|
+
TextProps,
|
|
1669
|
+
title,
|
|
1670
|
+
isOpen,
|
|
1671
|
+
onClick,
|
|
1672
|
+
onClose
|
|
1673
|
+
} = _ref,
|
|
1674
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
1675
|
+
|
|
1676
|
+
var tooltip = /*#__PURE__*/jsx(Tooltip, _objectSpread(_objectSpread({
|
|
1677
|
+
open: isOpen,
|
|
1678
|
+
title: title,
|
|
1679
|
+
placement: "top",
|
|
1680
|
+
onClose: onClose,
|
|
1681
|
+
disableFocusListener: true,
|
|
1682
|
+
disableTouchListener: true,
|
|
1683
|
+
onClick: onClick,
|
|
1684
|
+
ref: ref
|
|
1685
|
+
}, props), {}, {
|
|
1686
|
+
children: /*#__PURE__*/jsx(IconButton, _objectSpread(_objectSpread({}, iconButtonProps), {}, {
|
|
1687
|
+
size: "small",
|
|
1688
|
+
onMouseOver: onClick,
|
|
1689
|
+
children: /*#__PURE__*/jsx(Info, {
|
|
1690
|
+
color: "action",
|
|
1691
|
+
fontSize: fontSize
|
|
1692
|
+
})
|
|
1693
|
+
}))
|
|
1694
|
+
}));
|
|
1695
|
+
|
|
1696
|
+
if (!children) return tooltip;
|
|
1697
|
+
return /*#__PURE__*/jsxs(Root, {
|
|
1698
|
+
children: [/*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, TextProps), {}, {
|
|
1699
|
+
children: children
|
|
1700
|
+
})), tooltip]
|
|
1701
|
+
});
|
|
1702
|
+
});
|
|
1703
|
+
if (process.env.NODE_ENV !== "production") InfoTooltip.displayName = "InfoTooltip";
|
|
1704
|
+
|
|
1658
1705
|
function inlineRootMixin(spaceProp, noWrap, verticalAlign, horizontalAlign) {
|
|
1659
1706
|
var space = parseSpaceProp(spaceProp);
|
|
1660
1707
|
return css(["&:before{margin-top:", "px;}& > div{display:flex;margin-left:-", "px;flex-wrap:", ";align-items:", ";justify-content:", ";& > div{&:empty{display:none;}min-width:0;flex-shrink:0;max-width:100%;margin-top:", "px;margin-left:", "px;}}"], -space - 1, space, noWrap ? 'nowrap' : 'wrap', parseAlignProp(verticalAlign), parseAlignProp(horizontalAlign), space, space);
|
|
@@ -1704,7 +1751,7 @@ var Inline = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
1704
1751
|
});
|
|
1705
1752
|
if (process.env.NODE_ENV !== "production") Inline.displayName = "Inline";
|
|
1706
1753
|
|
|
1707
|
-
var _excluded$
|
|
1754
|
+
var _excluded$i = ["value", "inputRef", "onChange", "isNumericString", "thousandSeparator", "disableValueParsing"],
|
|
1708
1755
|
_excluded2$3 = ["id", "InputProps"];
|
|
1709
1756
|
|
|
1710
1757
|
function NumberInputComponent(_ref) {
|
|
@@ -1716,7 +1763,7 @@ function NumberInputComponent(_ref) {
|
|
|
1716
1763
|
thousandSeparator = true,
|
|
1717
1764
|
disableValueParsing
|
|
1718
1765
|
} = _ref,
|
|
1719
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1766
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
1720
1767
|
|
|
1721
1768
|
return /*#__PURE__*/jsx(NumberFormat, _objectSpread(_objectSpread({}, props), {}, {
|
|
1722
1769
|
value: value !== null && value !== void 0 ? value : '',
|
|
@@ -1756,7 +1803,7 @@ var NumberField = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
1756
1803
|
if (process.env.NODE_ENV !== "production") NumberField.displayName = "NumberField";
|
|
1757
1804
|
NumberField.displayName = 'NumberField';
|
|
1758
1805
|
|
|
1759
|
-
var _excluded$
|
|
1806
|
+
var _excluded$j = ["label", "error", "checked", "onBlur", "onChange", "helperText", "FormControlLabelProps"];
|
|
1760
1807
|
var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1761
1808
|
var {
|
|
1762
1809
|
label,
|
|
@@ -1767,7 +1814,7 @@ var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1767
1814
|
helperText,
|
|
1768
1815
|
FormControlLabelProps: formControlLabelProps
|
|
1769
1816
|
} = _ref,
|
|
1770
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1817
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
1771
1818
|
|
|
1772
1819
|
return /*#__PURE__*/jsxs(FormControl, {
|
|
1773
1820
|
error: error,
|
|
@@ -1787,7 +1834,7 @@ var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1787
1834
|
});
|
|
1788
1835
|
if (process.env.NODE_ENV !== "production") RadioField.displayName = "RadioField";
|
|
1789
1836
|
|
|
1790
|
-
var _excluded$
|
|
1837
|
+
var _excluded$k = ["name", "value", "onChange", "RadioGroupProps", "label", "FormLabelProps", "helperText", "FormHelperTextProps", "children"];
|
|
1791
1838
|
var RadioGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1792
1839
|
var {
|
|
1793
1840
|
name,
|
|
@@ -1800,7 +1847,7 @@ var RadioGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1800
1847
|
FormHelperTextProps: formHelperTextProps,
|
|
1801
1848
|
children
|
|
1802
1849
|
} = _ref,
|
|
1803
|
-
formControlProps = _objectWithoutProperties(_ref, _excluded$
|
|
1850
|
+
formControlProps = _objectWithoutProperties(_ref, _excluded$k);
|
|
1804
1851
|
|
|
1805
1852
|
return /*#__PURE__*/jsxs(FormControl, _objectSpread(_objectSpread({}, formControlProps), {}, {
|
|
1806
1853
|
hiddenLabel: !label,
|
|
@@ -1850,7 +1897,7 @@ function useMinBreakpoint(minBreakpoint) {
|
|
|
1850
1897
|
return minBreakpointIDX < breakpointIDX;
|
|
1851
1898
|
}
|
|
1852
1899
|
|
|
1853
|
-
var _excluded$
|
|
1900
|
+
var _excluded$l = ["action", "children", "onClose", "className", "classes", "variant"],
|
|
1854
1901
|
_excluded2$4 = ["icon", "closeButton", "variantError", "variantSuccess"];
|
|
1855
1902
|
var useStyles$b = /*#__PURE__*/makeStyles(theme => ({
|
|
1856
1903
|
root: {
|
|
@@ -1895,7 +1942,7 @@ var SnackbarContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1895
1942
|
classes,
|
|
1896
1943
|
variant = 'default'
|
|
1897
1944
|
} = _ref,
|
|
1898
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1945
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
1899
1946
|
|
|
1900
1947
|
var _useStyles = useStyles$b({
|
|
1901
1948
|
classes
|
|
@@ -1945,7 +1992,7 @@ var SnackbarContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1945
1992
|
});
|
|
1946
1993
|
if (process.env.NODE_ENV !== "production") SnackbarContent.displayName = "SnackbarContent";
|
|
1947
1994
|
|
|
1948
|
-
var _excluded$
|
|
1995
|
+
var _excluded$m = ["open", "action", "variant", "onClose", "children", "ContentProps", "hasCloseButton", "TransitionComponent"];
|
|
1949
1996
|
|
|
1950
1997
|
function SlideTransition(props) {
|
|
1951
1998
|
return /*#__PURE__*/jsx(Slide, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -1964,7 +2011,7 @@ var Snackbar = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1964
2011
|
hasCloseButton = onClose != null,
|
|
1965
2012
|
TransitionComponent = SlideTransition
|
|
1966
2013
|
} = _ref,
|
|
1967
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2014
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
1968
2015
|
|
|
1969
2016
|
function handleClose(reason) {
|
|
1970
2017
|
if (reason !== 'clickaway') {
|
|
@@ -1993,7 +2040,7 @@ var Snackbar = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1993
2040
|
});
|
|
1994
2041
|
if (process.env.NODE_ENV !== "production") Snackbar.displayName = "Snackbar";
|
|
1995
2042
|
|
|
1996
|
-
var _excluded$
|
|
2043
|
+
var _excluded$n = ["onClose", "variant", "key", "id", "autoHideDuration"];
|
|
1997
2044
|
|
|
1998
2045
|
function warnContext() {
|
|
1999
2046
|
// eslint-disable-next-line no-console
|
|
@@ -2039,7 +2086,7 @@ function SnackbarStackProvider(_ref2) {
|
|
|
2039
2086
|
id = String(key),
|
|
2040
2087
|
autoHideDuration = 5000
|
|
2041
2088
|
} = _ref3,
|
|
2042
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
2089
|
+
props = _objectWithoutProperties(_ref3, _excluded$n);
|
|
2043
2090
|
|
|
2044
2091
|
function removeSnackbar() {
|
|
2045
2092
|
setStack(prev => {
|
|
@@ -2136,7 +2183,7 @@ var Stack = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
2136
2183
|
});
|
|
2137
2184
|
if (process.env.NODE_ENV !== "production") Stack.displayName = "Stack";
|
|
2138
2185
|
|
|
2139
|
-
var _excluded$
|
|
2186
|
+
var _excluded$o = ["color", "variant", "children", "classes", "className", "noWrap", "fontWeight", "component"];
|
|
2140
2187
|
var useStyles$c = /*#__PURE__*/makeStyles(theme => ({
|
|
2141
2188
|
root: {
|
|
2142
2189
|
maxWidth: '100%',
|
|
@@ -2220,7 +2267,7 @@ var Tag = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
2220
2267
|
fontWeight = 'bold',
|
|
2221
2268
|
component = 'div'
|
|
2222
2269
|
} = _ref,
|
|
2223
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2270
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
2224
2271
|
|
|
2225
2272
|
var styles = useStyles$c({
|
|
2226
2273
|
classes
|
|
@@ -3747,5 +3794,5 @@ function ExitTransitionPlaceholder(_ref) {
|
|
|
3747
3794
|
return renderChildren(children);
|
|
3748
3795
|
}
|
|
3749
3796
|
|
|
3750
|
-
export { AdaptiveToolbar, AdaptiveVerticalToolbar, AvatarButton, Button, CardButton, CheckboxField, CheckboxGroupField, Color, Column, Columns, DescriptionList, DescriptionListItem, DrawerActions, DrawerContent, DrawerList, DrawerTitle, DropdownButton, ExitTransitionPlaceholder, GridStack, InfoCard, Inline, InlineGrid, NumberField, OverflowText, RadioField, RadioGroupField, ResponsiveContextProvider, Snackbar, SnackbarContent, SnackbarStackConsumer, SnackbarStackProvider, Stack, Tag, ThemeProvider, Tiles, VisibilityObserver, assignRef, isColorProp, isEmptyReactNode, mergeRefs, parseAlignProp, parseCollapsedBelow, parseResponsiveProp, parseSpaceProp, renderChildren, useCollapseBreakpoint, useMinBreakpoint, useResizeObserver, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
|
|
3797
|
+
export { AdaptiveToolbar, AdaptiveVerticalToolbar, AvatarButton, Button, CardButton, CheckboxField, CheckboxGroupField, Color, Column, Columns, DescriptionList, DescriptionListItem, DrawerActions, DrawerContent, DrawerList, DrawerTitle, DropdownButton, ExitTransitionPlaceholder, GridStack, InfoCard, InfoTooltip, Inline, InlineGrid, NumberField, OverflowText, RadioField, RadioGroupField, ResponsiveContextProvider, Snackbar, SnackbarContent, SnackbarStackConsumer, SnackbarStackProvider, Stack, Tag, ThemeProvider, Tiles, VisibilityObserver, assignRef, isColorProp, isEmptyReactNode, mergeRefs, parseAlignProp, parseCollapsedBelow, parseResponsiveProp, parseSpaceProp, renderChildren, useCollapseBreakpoint, useMinBreakpoint, useResizeObserver, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
|
|
3751
3798
|
//# sourceMappingURL=index.js.map
|