@superdispatch/ui 0.25.1 → 0.26.0
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 +280 -391
- package/dist-node/index.js.map +1 -1
- package/dist-src/adaptive-toolbar/AdaptiveToolbar.js +6 -15
- package/dist-src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.js +3 -10
- package/dist-src/autocomplete/AutocompleteOverrides.js +2 -1
- package/dist-src/avatar-button/AvatarButton.js +28 -31
- package/dist-src/button/Button.js +9 -12
- package/dist-src/button/ButtonOverrides.js +0 -6
- package/dist-src/card-button/CardButton.js +12 -15
- package/dist-src/checkbox/CheckboxField.js +10 -12
- package/dist-src/checkbox/CheckboxGroudField.js +9 -11
- package/dist-src/checkbox/CheckboxOverrides.js +1 -2
- package/dist-src/columns/Column.js +0 -13
- package/dist-src/columns/Columns.js +0 -2
- package/dist-src/description-list/DescriptionList.js +10 -12
- package/dist-src/drawer/DrawerActions.js +5 -8
- package/dist-src/drawer/DrawerContent.js +3 -4
- package/dist-src/drawer/DrawerList.js +3 -6
- package/dist-src/drawer/DrawerTitle.js +10 -13
- package/dist-src/dropdown-button/DropdownButton.js +9 -21
- package/dist-src/grid/GridStack.js +4 -6
- package/dist-src/grid/InlineGrid.js +6 -8
- package/dist-src/info-card/InfoCard.js +17 -19
- package/dist-src/info-tooltip/InfoTooltip.js +11 -14
- package/dist-src/inline/Inline.js +0 -2
- package/dist-src/link/LinkOverrides.js +0 -2
- package/dist-src/number-field/NumberField.js +17 -23
- package/dist-src/overflow-text/OverflowText.js +13 -15
- package/dist-src/pagination/PaginationOverrides.js +2 -1
- package/dist-src/pattern-field/PatternField.js +10 -10
- package/dist-src/props/AlignProps.js +0 -2
- package/dist-src/props/ResponsiveProp.js +0 -1
- package/dist-src/props/SpaceProp.js +0 -7
- package/dist-src/radio/RadioField.js +10 -12
- package/dist-src/radio/RadioFieldCard.js +11 -13
- package/dist-src/radio/RadioGroupField.js +12 -14
- package/dist-src/radio/RadioOverrides.js +1 -2
- package/dist-src/responsive/CollapseBreakpoint.js +0 -2
- package/dist-src/responsive/MinBreakpoint.js +0 -2
- package/dist-src/responsive/ResponsiveContext.js +0 -2
- package/dist-src/snackbar/Snackbar.js +10 -14
- package/dist-src/snackbar/SnackbarContent.js +19 -23
- package/dist-src/snackbar/SnackbarOverrides.js +7 -0
- package/dist-src/snackbar/SnackbarStack.js +13 -20
- package/dist-src/stack/Stack.js +0 -2
- package/dist-src/tag/Tag.js +10 -11
- package/dist-src/theme/Color.js +0 -2
- package/dist-src/theme/ThemeProvider.js +1 -12
- package/dist-src/tiles/Tiles.js +0 -3
- package/dist-src/utils/ResizeObserver.js +0 -1
- package/dist-src/utils/VisibilityObserver.js +4 -6
- package/dist-src/utils/mergeRefs.js +0 -1
- package/dist-src/utils/renderChildren.js +2 -2
- package/dist-web/index.js +279 -392
- package/dist-web/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,10 +7,7 @@ import { forwardRef } from 'react';
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { Color, mergeRefs, useUID } from "../index.js";
|
|
9
9
|
import { Button } from "../button/Button.js";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
-
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
11
|
function CaretDownIcon() {
|
|
15
12
|
return /*#__PURE__*/_jsx("svg", {
|
|
16
13
|
viewBox: "0 0 8 4",
|
|
@@ -20,7 +17,6 @@ function CaretDownIcon() {
|
|
|
20
17
|
})
|
|
21
18
|
});
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
var CaretButton = /*#__PURE__*/styled(Button).withConfig({
|
|
25
21
|
displayName: "DropdownButton__CaretButton",
|
|
26
22
|
componentId: "SD__sc-8l84jm-0"
|
|
@@ -32,40 +28,32 @@ var CaretButton = /*#__PURE__*/styled(Button).withConfig({
|
|
|
32
28
|
});
|
|
33
29
|
export var DropdownButton = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
34
30
|
var _anchorRef$current2;
|
|
35
|
-
|
|
36
31
|
var {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
MenuListProps,
|
|
33
|
+
ButtonGroupProps,
|
|
34
|
+
children,
|
|
35
|
+
isLoading,
|
|
36
|
+
onClick,
|
|
37
|
+
label
|
|
38
|
+
} = _ref2,
|
|
39
|
+
buttonProps = _objectWithoutProperties(_ref2, _excluded);
|
|
46
40
|
var uid = useUID();
|
|
47
41
|
var [open, setOpen] = React.useState(false);
|
|
48
42
|
var anchorRef = React.useRef(null);
|
|
49
|
-
|
|
50
43
|
function handleClick(event) {
|
|
51
44
|
setOpen(false);
|
|
52
45
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
53
46
|
}
|
|
54
|
-
|
|
55
47
|
function handleToggle() {
|
|
56
48
|
setOpen(prevOpen => !prevOpen);
|
|
57
49
|
}
|
|
58
|
-
|
|
59
50
|
function handleClose(event) {
|
|
60
51
|
var _anchorRef$current;
|
|
61
|
-
|
|
62
52
|
if ((_anchorRef$current = anchorRef.current) !== null && _anchorRef$current !== void 0 && _anchorRef$current.contains(event.currentTarget)) {
|
|
63
53
|
return;
|
|
64
54
|
}
|
|
65
|
-
|
|
66
55
|
setOpen(false);
|
|
67
56
|
}
|
|
68
|
-
|
|
69
57
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
70
58
|
children: [/*#__PURE__*/_jsxs(ButtonGroup, _objectSpread(_objectSpread({}, ButtonGroupProps), {}, {
|
|
71
59
|
ref: mergeRefs(ButtonGroupProps === null || ButtonGroupProps === void 0 ? void 0 : ButtonGroupProps.ref, anchorRef),
|
|
@@ -4,17 +4,15 @@ var _excluded = ["children", "alignItems"];
|
|
|
4
4
|
import { Grid } from '@material-ui/core';
|
|
5
5
|
import { Children, forwardRef } from 'react';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* @deprecated in favor of `Stack`.
|
|
10
9
|
*/
|
|
11
10
|
export var GridStack = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
12
11
|
var {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
children,
|
|
13
|
+
alignItems = 'stretch'
|
|
14
|
+
} = _ref,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
16
|
var items = Children.toArray(children);
|
|
19
17
|
return /*#__PURE__*/_jsx(Grid, _objectSpread(_objectSpread({}, props), {}, {
|
|
20
18
|
ref: ref,
|
|
@@ -4,19 +4,17 @@ var _excluded = ["children", "wrap", "justify", "alignItems"];
|
|
|
4
4
|
import { Grid } from '@material-ui/core';
|
|
5
5
|
import { Children, forwardRef } from 'react';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* @deprecated in favor of `Inline` component.
|
|
10
9
|
*/
|
|
11
10
|
export var InlineGrid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
12
11
|
var {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
children,
|
|
13
|
+
wrap = 'wrap',
|
|
14
|
+
justify = 'flex-start',
|
|
15
|
+
alignItems = 'flex-start'
|
|
16
|
+
} = _ref,
|
|
17
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
18
|
var items = Children.toArray(children);
|
|
21
19
|
return /*#__PURE__*/_jsx(Grid, _objectSpread(_objectSpread({}, props), {}, {
|
|
22
20
|
ref: ref,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["size", "square", "classes", "children", "className", "CardContentProps"],
|
|
4
|
-
|
|
4
|
+
_excluded2 = ["content", "sizeLarge", "fullWidth"];
|
|
5
5
|
import { Card, CardContent } from '@material-ui/core';
|
|
6
6
|
import { makeStyles } from '@material-ui/styles';
|
|
7
7
|
import clsx from 'clsx';
|
|
@@ -31,25 +31,23 @@ var useStyles = /*#__PURE__*/makeStyles(theme => ({
|
|
|
31
31
|
});
|
|
32
32
|
export var InfoCard = /*#__PURE__*/forwardRef((_ref, _ref2) => {
|
|
33
33
|
var {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
size,
|
|
35
|
+
square,
|
|
36
|
+
classes,
|
|
37
|
+
children,
|
|
38
|
+
className,
|
|
39
|
+
CardContentProps: cardContentProps = {}
|
|
40
|
+
} = _ref,
|
|
41
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
43
42
|
var _useStyles = useStyles({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
classes
|
|
44
|
+
}),
|
|
45
|
+
{
|
|
46
|
+
content: contentClassName,
|
|
47
|
+
sizeLarge: sizeLargeClassName,
|
|
48
|
+
fullWidth: fullWidthClassName
|
|
49
|
+
} = _useStyles,
|
|
50
|
+
styles = _objectWithoutProperties(_useStyles, _excluded2);
|
|
53
51
|
var [rootNode, setRootNode] = useState(null);
|
|
54
52
|
var clientRect = rootNode === null || rootNode === void 0 ? void 0 : rootNode.getBoundingClientRect();
|
|
55
53
|
var isFullWidth = (clientRect === null || clientRect === void 0 ? void 0 : clientRect.width) === window.innerWidth;
|
|
@@ -5,25 +5,23 @@ import { IconButton, Tooltip, Typography } from '@material-ui/core';
|
|
|
5
5
|
import { Info } from '@material-ui/icons';
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
9
|
var Root = /*#__PURE__*/styled.div.withConfig({
|
|
11
10
|
displayName: "InfoTooltip__Root",
|
|
12
11
|
componentId: "SD__sc-1emqpa9-0"
|
|
13
12
|
})(["display:flex;align-items:center;"]);
|
|
14
13
|
export var InfoTooltip = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
15
14
|
var {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
children,
|
|
16
|
+
iconButtonProps,
|
|
17
|
+
fontSize = 'small',
|
|
18
|
+
TextProps,
|
|
19
|
+
title,
|
|
20
|
+
isOpen,
|
|
21
|
+
onClick,
|
|
22
|
+
onClose
|
|
23
|
+
} = _ref,
|
|
24
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
25
|
var tooltip = /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
28
26
|
open: isOpen,
|
|
29
27
|
title: title,
|
|
@@ -43,7 +41,6 @@ export var InfoTooltip = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
43
41
|
})
|
|
44
42
|
}))
|
|
45
43
|
}));
|
|
46
|
-
|
|
47
44
|
if (!children) return tooltip;
|
|
48
45
|
return /*#__PURE__*/_jsxs(Root, {
|
|
49
46
|
children: [/*#__PURE__*/_jsx(Typography, _objectSpread(_objectSpread({}, TextProps), {}, {
|
|
@@ -5,12 +5,10 @@ import { parseAlignProp } from "../props/AlignProps.js";
|
|
|
5
5
|
import { useResponsiveProp } from "../props/ResponsiveProp.js";
|
|
6
6
|
import { parseSpaceProp } from "../props/SpaceProp.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
8
|
function inlineRootMixin(spaceProp, noWrap, verticalAlign, horizontalAlign) {
|
|
10
9
|
var space = parseSpaceProp(spaceProp);
|
|
11
10
|
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);
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
var InlineRoot = /*#__PURE__*/styled.div.withConfig({
|
|
15
13
|
displayName: "Inline__InlineRoot",
|
|
16
14
|
componentId: "SD__sc-13du4wm-0"
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["value", "inputRef", "onChange", "valueIsNumericString", "thousandSeparator", "disableValueParsing"],
|
|
4
|
-
|
|
4
|
+
_excluded2 = ["id", "InputProps"];
|
|
5
5
|
import { TextField } from '@material-ui/core';
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
7
|
import { NumericFormat } from 'react-number-format';
|
|
8
8
|
import { useUID } from "../utils/useUID.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
|
|
11
10
|
function NumberInputComponent(_ref) {
|
|
12
11
|
var {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
value,
|
|
13
|
+
inputRef,
|
|
14
|
+
onChange,
|
|
15
|
+
valueIsNumericString = true,
|
|
16
|
+
thousandSeparator = true,
|
|
17
|
+
disableValueParsing
|
|
18
|
+
} = _ref,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
20
|
return /*#__PURE__*/_jsx(NumericFormat, _objectSpread(_objectSpread({}, props), {}, {
|
|
23
21
|
value: value !== null && value !== void 0 ? value : '',
|
|
24
22
|
inputMode: "decimal",
|
|
@@ -27,29 +25,25 @@ function NumberInputComponent(_ref) {
|
|
|
27
25
|
thousandSeparator: thousandSeparator,
|
|
28
26
|
allowedDecimalSeparators: ['.', ','],
|
|
29
27
|
onValueChange: (values, sourceInfo) => {
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
var floatValue = (_values$floatValue = values.floatValue) !== null && _values$floatValue !== void 0 ? _values$floatValue : null;
|
|
28
|
+
var inputValue = values.value;
|
|
33
29
|
var {
|
|
34
30
|
event
|
|
35
|
-
} = sourceInfo;
|
|
36
|
-
|
|
31
|
+
} = sourceInfo;
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
37
33
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread(_objectSpread({}, event), {}, {
|
|
38
34
|
target: _objectSpread(_objectSpread({}, event === null || event === void 0 ? void 0 : event.target), {}, {
|
|
39
|
-
value:
|
|
35
|
+
value: inputValue
|
|
40
36
|
})
|
|
41
37
|
}));
|
|
42
38
|
}
|
|
43
39
|
}));
|
|
44
40
|
}
|
|
45
|
-
|
|
46
41
|
export var NumberField = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
47
42
|
var {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
id,
|
|
44
|
+
InputProps
|
|
45
|
+
} = _ref2,
|
|
46
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
53
47
|
var uid = useUID(id);
|
|
54
48
|
return /*#__PURE__*/_jsx(TextField, _objectSpread(_objectSpread({}, props), {}, {
|
|
55
49
|
ref: ref,
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["title", "enterDelay"],
|
|
4
|
-
|
|
4
|
+
_excluded2 = ["onClick", "children", "className", "disableUnderline", "TooltipProps"];
|
|
5
5
|
import { Tooltip, Typography } from '@material-ui/core';
|
|
6
6
|
import { makeStyles } from '@material-ui/styles';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { forwardRef, useState } from 'react';
|
|
9
9
|
import { Color } from "../theme/Color.js";
|
|
10
10
|
import { VisibilityObserver } from "../utils/VisibilityObserver.js";
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
var useStyles = /*#__PURE__*/makeStyles(theme => ({
|
|
14
13
|
root: {
|
|
15
14
|
marginBottom: -1,
|
|
@@ -31,18 +30,17 @@ var useStyles = /*#__PURE__*/makeStyles(theme => ({
|
|
|
31
30
|
});
|
|
32
31
|
export var OverflowText = /*#__PURE__*/forwardRef((_ref, rootRef) => {
|
|
33
32
|
var {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
onClick: _onClick,
|
|
34
|
+
children,
|
|
35
|
+
className,
|
|
36
|
+
disableUnderline,
|
|
37
|
+
TooltipProps: {
|
|
38
|
+
title = children,
|
|
39
|
+
enterDelay = 1000
|
|
40
|
+
} = {}
|
|
41
|
+
} = _ref,
|
|
42
|
+
tooltipProps = _objectWithoutProperties(_ref.TooltipProps, _excluded),
|
|
43
|
+
props = _objectWithoutProperties(_ref, _excluded2);
|
|
46
44
|
var [isOpen, setIsOpen] = useState(false);
|
|
47
45
|
var styles = useStyles();
|
|
48
46
|
return /*#__PURE__*/_jsx(VisibilityObserver, {
|
|
@@ -29,8 +29,9 @@ export function overridePagination(theme) {
|
|
|
29
29
|
color: Color.Dark100
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
};
|
|
32
|
+
};
|
|
33
33
|
|
|
34
|
+
// Remove `Object.assign` after official release of `PaginationItem`.
|
|
34
35
|
Object.assign(theme.props, {
|
|
35
36
|
MuiPaginationItem: props
|
|
36
37
|
});
|
|
@@ -8,19 +8,19 @@ import { useUID } from "../utils/useUID.js";
|
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export var PatternField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
10
10
|
var {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
id,
|
|
12
|
+
value,
|
|
13
|
+
onChange,
|
|
14
|
+
inputMode = 'decimal',
|
|
15
|
+
valueIsNumericString = true,
|
|
16
|
+
onValueChange: _onValueChange
|
|
17
|
+
} = _ref,
|
|
18
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
19
|
var uid = useUID(id);
|
|
21
20
|
return /*#__PURE__*/_jsx(PatternFormat, _objectSpread(_objectSpread({}, props), {}, {
|
|
22
21
|
id: uid,
|
|
23
|
-
value: value !== null && value !== void 0 ? value : ''
|
|
22
|
+
value: value !== null && value !== void 0 ? value : ''
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
24
24
|
,
|
|
25
25
|
inputMode: inputMode,
|
|
26
26
|
getInputRef: ref,
|
|
@@ -2,7 +2,6 @@ import { useDeepEqualValue } from '@superdispatch/hooks';
|
|
|
2
2
|
import { useResponsiveContext } from "../responsive/ResponsiveContext.js";
|
|
3
3
|
export function parseResponsiveProp(prop) {
|
|
4
4
|
var _tablet, _desktop;
|
|
5
|
-
|
|
6
5
|
if (typeof prop != 'object') return [prop, prop, prop];
|
|
7
6
|
var [mobile, tablet, desktop] = prop;
|
|
8
7
|
(_tablet = tablet) !== null && _tablet !== void 0 ? _tablet : tablet = mobile;
|
|
@@ -3,25 +3,18 @@ export function parseSpaceProp(prop) {
|
|
|
3
3
|
case 'none':
|
|
4
4
|
default:
|
|
5
5
|
return 0;
|
|
6
|
-
|
|
7
6
|
case 'xxsmall':
|
|
8
7
|
return 4;
|
|
9
|
-
|
|
10
8
|
case 'xsmall':
|
|
11
9
|
return 8;
|
|
12
|
-
|
|
13
10
|
case 'small':
|
|
14
11
|
return 16;
|
|
15
|
-
|
|
16
12
|
case 'medium':
|
|
17
13
|
return 24;
|
|
18
|
-
|
|
19
14
|
case 'large':
|
|
20
15
|
return 32;
|
|
21
|
-
|
|
22
16
|
case 'xlarge':
|
|
23
17
|
return 40;
|
|
24
|
-
|
|
25
18
|
case 'xxlarge':
|
|
26
19
|
return 48;
|
|
27
20
|
}
|
|
@@ -5,8 +5,7 @@ import { FormControl as FormControlMui, FormControlLabel, FormHelperText as Form
|
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
import { Color } from "../theme/Color.js";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
9
|
var FormControl = /*#__PURE__*/styled(FormControlMui).withConfig({
|
|
11
10
|
displayName: "RadioField__FormControl",
|
|
12
11
|
componentId: "SD__sc-6ey4qt-0"
|
|
@@ -17,16 +16,15 @@ var FormHelperText = /*#__PURE__*/styled(FormHelperTextMui).withConfig({
|
|
|
17
16
|
})(["color:", ";margin-left:30px;margin-top:0;margin-bottom:4px;&.Mui-error{color:", ";}"], Color.Dark300, Color.Red500);
|
|
18
17
|
export var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
19
18
|
var {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
label,
|
|
20
|
+
error,
|
|
21
|
+
checked,
|
|
22
|
+
onBlur,
|
|
23
|
+
onChange,
|
|
24
|
+
helperText,
|
|
25
|
+
FormControlLabelProps: formControlLabelProps
|
|
26
|
+
} = _ref,
|
|
27
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
30
28
|
return /*#__PURE__*/_jsxs(FormControl, {
|
|
31
29
|
error: error,
|
|
32
30
|
children: [/*#__PURE__*/_jsx(FormControlLabel, _objectSpread(_objectSpread({}, formControlLabelProps), {}, {
|
|
@@ -7,8 +7,7 @@ import styled from 'styled-components';
|
|
|
7
7
|
import { Column } from "../columns/Column.js";
|
|
8
8
|
import { Columns } from "../columns/Columns.js";
|
|
9
9
|
import { Color } from "../theme/Color.js";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
11
|
var ClickableCard = /*#__PURE__*/styled(ButtonBase).withConfig({
|
|
13
12
|
displayName: "RadioFieldCard__ClickableCard",
|
|
14
13
|
componentId: "SD__sc-5etge2-0"
|
|
@@ -36,17 +35,16 @@ var Caption = /*#__PURE__*/styled.div.withConfig({
|
|
|
36
35
|
})(["padding-left:30px;"]);
|
|
37
36
|
export var RadioFieldCard = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
38
37
|
var {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
name,
|
|
39
|
+
value,
|
|
40
|
+
label,
|
|
41
|
+
caption,
|
|
42
|
+
disabled,
|
|
43
|
+
icon,
|
|
44
|
+
checked,
|
|
45
|
+
onChange
|
|
46
|
+
} = _ref2,
|
|
47
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
50
48
|
return /*#__PURE__*/_jsx(Card, {
|
|
51
49
|
disabled: disabled,
|
|
52
50
|
children: /*#__PURE__*/_jsx(ClickableCard, _objectSpread(_objectSpread({
|
|
@@ -5,8 +5,7 @@ import { FormControl, FormHelperText as FormHelperTextMui, FormLabel as FormLabe
|
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
import { Color } from "../theme/Color.js";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
9
|
var FormLabel = /*#__PURE__*/styled(FormLabelMui).withConfig({
|
|
11
10
|
displayName: "RadioGroupField__FormLabel",
|
|
12
11
|
componentId: "SD__sc-1udxviq-0"
|
|
@@ -17,18 +16,17 @@ var FormHelperText = /*#__PURE__*/styled(FormHelperTextMui).withConfig({
|
|
|
17
16
|
})(["margin-top:8px;color:", ";&.Mui-error{color:", ";}"], Color.Dark300, Color.Red500);
|
|
18
17
|
export var RadioGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
19
18
|
var {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
name,
|
|
20
|
+
value = '',
|
|
21
|
+
onChange,
|
|
22
|
+
RadioGroupProps: radioGroupProps,
|
|
23
|
+
label,
|
|
24
|
+
FormLabelProps: formLabelProps,
|
|
25
|
+
helperText,
|
|
26
|
+
FormHelperTextProps: formHelperTextProps,
|
|
27
|
+
children
|
|
28
|
+
} = _ref,
|
|
29
|
+
formControlProps = _objectWithoutProperties(_ref, _excluded);
|
|
32
30
|
return /*#__PURE__*/_jsxs(FormControl, _objectSpread(_objectSpread({}, formControlProps), {}, {
|
|
33
31
|
hiddenLabel: !label,
|
|
34
32
|
children: [!!label && /*#__PURE__*/_jsx(FormLabel, _objectSpread(_objectSpread({}, formLabelProps), {}, {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SvgIcon } from '@material-ui/core';
|
|
2
2
|
import { Color } from "../theme/Color.js";
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
4
|
export function overrideRadio(theme) {
|
|
6
5
|
theme.props.MuiRadio = {
|
|
7
6
|
color: 'primary',
|
|
@@ -4,11 +4,9 @@ export function useCollapseBreakpoint(collapseBreakpoint) {
|
|
|
4
4
|
var {
|
|
5
5
|
breakpoint = 'xs'
|
|
6
6
|
} = useResponsiveContext();
|
|
7
|
-
|
|
8
7
|
if (collapseBreakpoint == null) {
|
|
9
8
|
return false;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
var breakpointIDX = BREAKPOINTS.indexOf(breakpoint);
|
|
13
11
|
var collapseBreakpointIDX = BREAKPOINTS.indexOf(collapseBreakpoint);
|
|
14
12
|
return breakpointIDX < collapseBreakpointIDX;
|
|
@@ -4,11 +4,9 @@ export function useMinBreakpoint(minBreakpoint) {
|
|
|
4
4
|
var {
|
|
5
5
|
breakpoint = 'xs'
|
|
6
6
|
} = useResponsiveContext();
|
|
7
|
-
|
|
8
7
|
if (minBreakpoint == null) {
|
|
9
8
|
return false;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
var breakpointIDX = BREAKPOINTS.indexOf(breakpoint);
|
|
13
11
|
var minBreakpointIDX = BREAKPOINTS.indexOf(minBreakpoint);
|
|
14
12
|
return minBreakpointIDX < breakpointIDX;
|
|
@@ -2,11 +2,9 @@ import { useMediaQuery } from '@material-ui/core';
|
|
|
2
2
|
import { createContext, useContext, useMemo } from 'react';
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
var Context = /*#__PURE__*/createContext({});
|
|
5
|
-
|
|
6
5
|
function useBreakpoint(breakpoint) {
|
|
7
6
|
return useMediaQuery(theme => theme.breakpoints.only(breakpoint));
|
|
8
7
|
}
|
|
9
|
-
|
|
10
8
|
export function ResponsiveContextProvider(_ref) {
|
|
11
9
|
var {
|
|
12
10
|
children,
|