@superdispatch/ui 0.16.0-alpha.0 → 0.16.0-alpha.1
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 +205 -3686
- package/dist-node/index.js.map +1 -1
- package/dist-src/adaptive-toolbar/AdaptiveToolbar.js +12 -12
- package/dist-src/app-bar/AppBarOverrides.js +6 -4
- package/dist-src/autocomplete/AutocompleteOverrides.js +13 -16
- package/dist-src/avatar/AvatarOverrides.js +14 -12
- package/dist-src/avatar-button/AvatarButton.js +78 -92
- package/dist-src/button/Button.js +11 -15
- package/dist-src/button/ButtonOverrides.js +147 -149
- package/dist-src/card/CardOverrides.js +10 -6
- package/dist-src/card-button/CardButton.js +78 -75
- package/dist-src/checkbox/CheckboxField.js +1 -1
- package/dist-src/checkbox/CheckboxGroudField.js +1 -1
- package/dist-src/checkbox/CheckboxOverrides.js +60 -50
- package/dist-src/chip/ChipOverrides.js +88 -85
- package/dist-src/description-list/DescriptionList.js +58 -55
- package/dist-src/dialog/DialogOverrides.js +31 -25
- package/dist-src/drawer/DrawerActions.js +32 -34
- package/dist-src/drawer/DrawerContent.js +10 -26
- package/dist-src/drawer/DrawerList.js +8 -27
- package/dist-src/drawer/DrawerOverrides.js +12 -10
- package/dist-src/drawer/DrawerTitle.js +46 -40
- package/dist-src/grid/GridStack.js +1 -1
- package/dist-src/grid/InlineGrid.js +2 -2
- package/dist-src/icon-button/IconButtonOverrides.js +48 -32
- package/dist-src/index.js +1 -5
- package/dist-src/info-card/InfoCard.js +27 -37
- package/dist-src/link/LinkOverrides.js +29 -26
- package/dist-src/list/ListOverrides.js +10 -7
- package/dist-src/menu/MenuOverrides.js +28 -14
- package/dist-src/overflow-text/OverflowText.js +35 -34
- package/dist-src/pagination/PaginationOverrides.js +27 -32
- package/dist-src/paper/PaperOverrides.js +8 -6
- package/dist-src/radio/RadioField.js +1 -1
- package/dist-src/radio/RadioGroupField.js +1 -1
- package/dist-src/radio/RadioOverrides.js +38 -36
- package/dist-src/responsive/ResponsiveContext.js +1 -1
- package/dist-src/snackbar/Snackbar.js +1 -1
- package/dist-src/snackbar/SnackbarContent.js +3 -3
- package/dist-src/snackbar/SnackbarOverrides.js +28 -18
- package/dist-src/svg-icon/SvgIconOverrides.js +26 -18
- package/dist-src/switch/SwitchOverrides.js +72 -71
- package/dist-src/tabs/TabsOverrides.js +34 -30
- package/dist-src/tag/Tag.js +2 -2
- package/dist-src/text-field/TextFieldOverrides.js +158 -137
- package/dist-src/{v5/theme → theme}/CssBaselineOverrides.js +0 -0
- package/dist-src/theme/ThemeProvider.js +25 -28
- package/dist-src/tiles/Tiles.js +4 -3
- package/dist-src/toolbar/ToolbarOverrides.js +10 -8
- package/dist-src/tooltip/TooltipOverrides.js +33 -30
- package/dist-src/typography/TypographyOverrides.js +14 -2
- package/dist-types/index.d.ts +7 -621
- package/dist-web/index.js +18 -3495
- package/dist-web/index.js.map +1 -1
- package/package.json +1 -1
- package/dist-src/v5/adaptive-toolbar/AdaptiveToolbar.js +0 -146
- package/dist-src/v5/app-bar/AppBarOverrides.js +0 -9
- package/dist-src/v5/autocomplete/AutocompleteOverrides.js +0 -63
- package/dist-src/v5/avatar/AvatarOverrides.js +0 -21
- package/dist-src/v5/avatar-button/AvatarButton.js +0 -146
- package/dist-src/v5/button/Button.js +0 -32
- package/dist-src/v5/button/ButtonOverrides.js +0 -238
- package/dist-src/v5/card/CardOverrides.js +0 -16
- package/dist-src/v5/card-button/CardButton.js +0 -135
- package/dist-src/v5/checkbox/CheckboxField.js +0 -37
- package/dist-src/v5/checkbox/CheckboxGroudField.js +0 -32
- package/dist-src/v5/checkbox/CheckboxOverrides.js +0 -71
- package/dist-src/v5/chip/ChipOverrides.js +0 -106
- package/dist-src/v5/columns/Column.js +0 -75
- package/dist-src/v5/columns/Columns.js +0 -28
- package/dist-src/v5/description-list/DescriptionList.js +0 -114
- package/dist-src/v5/dialog/DialogOverrides.js +0 -43
- package/dist-src/v5/drawer/DrawerActions.js +0 -69
- package/dist-src/v5/drawer/DrawerContent.js +0 -15
- package/dist-src/v5/drawer/DrawerList.js +0 -31
- package/dist-src/v5/drawer/DrawerOverrides.js +0 -17
- package/dist-src/v5/drawer/DrawerTitle.js +0 -119
- package/dist-src/v5/grid/GridStack.js +0 -33
- package/dist-src/v5/grid/InlineGrid.js +0 -34
- package/dist-src/v5/icon-button/IconButtonOverrides.js +0 -60
- package/dist-src/v5/index.js +0 -38
- package/dist-src/v5/info-card/InfoCard.js +0 -59
- package/dist-src/v5/inline/Inline.js +0 -56
- package/dist-src/v5/link/LinkOverrides.js +0 -46
- package/dist-src/v5/list/ListOverrides.js +0 -16
- package/dist-src/v5/menu/MenuOverrides.js +0 -34
- package/dist-src/v5/overflow-text/OverflowText.js +0 -84
- package/dist-src/v5/pagination/PaginationOverrides.js +0 -35
- package/dist-src/v5/paper/PaperOverrides.js +0 -13
- package/dist-src/v5/props/AlignProps.js +0 -15
- package/dist-src/v5/props/CollapseProp.js +0 -3
- package/dist-src/v5/props/ResponsiveProp.js +0 -42
- package/dist-src/v5/props/SpaceProp.js +0 -28
- package/dist-src/v5/radio/RadioField.js +0 -36
- package/dist-src/v5/radio/RadioGroupField.js +0 -38
- package/dist-src/v5/radio/RadioOverrides.js +0 -49
- package/dist-src/v5/responsive/CollapseBreakpoint.js +0 -15
- package/dist-src/v5/responsive/ResponsiveContext.js +0 -31
- package/dist-src/v5/snackbar/Snackbar.js +0 -53
- package/dist-src/v5/snackbar/SnackbarContent.js +0 -105
- package/dist-src/v5/snackbar/SnackbarOverrides.js +0 -35
- package/dist-src/v5/snackbar/SnackbarStack.js +0 -113
- package/dist-src/v5/stack/Stack.js +0 -43
- package/dist-src/v5/svg-icon/SvgIconOverrides.js +0 -33
- package/dist-src/v5/switch/SwitchOverrides.js +0 -88
- package/dist-src/v5/tabs/TabsOverrides.js +0 -45
- package/dist-src/v5/tag/Tag.js +0 -118
- package/dist-src/v5/text-field/TextFieldOverrides.js +0 -205
- package/dist-src/v5/theme/Color.js +0 -77
- package/dist-src/v5/theme/SuperDispatchTheme.js +0 -2
- package/dist-src/v5/theme/ThemeProvider.js +0 -142
- package/dist-src/v5/tiles/Tiles.js +0 -94
- package/dist-src/v5/toolbar/ToolbarOverrides.js +0 -15
- package/dist-src/v5/tooltip/TooltipOverrides.js +0 -42
- package/dist-src/v5/typography/TypographyOverrides.js +0 -121
- package/dist-src/v5/utils/VisibilityObserver.js +0 -53
- package/dist-src/v5/utils/isEmptyReactNode.js +0 -3
- package/dist-src/v5/utils/mergeRefs.js +0 -20
- package/dist-src/v5/utils/renderChildren.js +0 -8
- package/dist-src/v5/utils/useUID.js +0 -6
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children"];
|
|
4
|
-
import { AppBar, styled, Toolbar } from '@mui/material';
|
|
5
|
-
import { forwardRef } from 'react';
|
|
6
|
-
import { Color } from "../theme/Color.js";
|
|
7
|
-
import { VisibilityObserver } from "../utils/VisibilityObserver.js";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
var StyledAppBar = /*#__PURE__*/styled(AppBar)(_ref => {
|
|
12
|
-
var {
|
|
13
|
-
theme
|
|
14
|
-
} = _ref;
|
|
15
|
-
return {
|
|
16
|
-
bottom: 0,
|
|
17
|
-
top: 'auto',
|
|
18
|
-
borderLeft: 'none',
|
|
19
|
-
borderRight: 'none',
|
|
20
|
-
borderBottom: 'none',
|
|
21
|
-
transition: theme.transitions.create(['border-color']),
|
|
22
|
-
'&[data-sticky="false"]': {
|
|
23
|
-
borderTopColor: Color.Transparent
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
var StyledToolbar = /*#__PURE__*/styled(Toolbar)(_ref2 => {
|
|
28
|
-
var {
|
|
29
|
-
theme
|
|
30
|
-
} = _ref2;
|
|
31
|
-
return {
|
|
32
|
-
'&.MuiToolbar-gutters': {
|
|
33
|
-
paddingLeft: theme.spacing(3),
|
|
34
|
-
paddingRight: theme.spacing(3),
|
|
35
|
-
[theme.breakpoints.up('md')]: {
|
|
36
|
-
paddingLeft: theme.spacing(4),
|
|
37
|
-
paddingRight: theme.spacing(4)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
export var DrawerActions = /*#__PURE__*/forwardRef((_ref3, appBarRef) => {
|
|
43
|
-
var {
|
|
44
|
-
children
|
|
45
|
-
} = _ref3,
|
|
46
|
-
props = _objectWithoutProperties(_ref3, _excluded);
|
|
47
|
-
|
|
48
|
-
return /*#__PURE__*/_jsx(VisibilityObserver, {
|
|
49
|
-
render: _ref4 => {
|
|
50
|
-
var {
|
|
51
|
-
ref,
|
|
52
|
-
visibility
|
|
53
|
-
} = _ref4;
|
|
54
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
55
|
-
children: [/*#__PURE__*/_jsx(StyledAppBar, _objectSpread(_objectSpread({}, props), {}, {
|
|
56
|
-
ref: appBarRef,
|
|
57
|
-
position: "sticky",
|
|
58
|
-
"data-sticky": visibility === 'invisible',
|
|
59
|
-
children: /*#__PURE__*/_jsx(StyledToolbar, {
|
|
60
|
-
children: children
|
|
61
|
-
})
|
|
62
|
-
})), /*#__PURE__*/_jsx("div", {
|
|
63
|
-
ref: ref
|
|
64
|
-
})]
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
if (process.env.NODE_ENV !== "production") DrawerActions.displayName = "DrawerActions";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { styled } from '@mui/material';
|
|
2
|
-
export var DrawerContent = /*#__PURE__*/styled('div', {
|
|
3
|
-
name: 'SD-DrawerContent'
|
|
4
|
-
})(_ref => {
|
|
5
|
-
var {
|
|
6
|
-
theme
|
|
7
|
-
} = _ref;
|
|
8
|
-
return {
|
|
9
|
-
maxWidth: '100%',
|
|
10
|
-
padding: theme.spacing(2, 3),
|
|
11
|
-
[theme.breakpoints.up('md')]: {
|
|
12
|
-
padding: theme.spacing(2, 4)
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import { List, styled } from '@mui/material';
|
|
3
|
-
|
|
4
|
-
function listItemMixins(theme, space) {
|
|
5
|
-
return {
|
|
6
|
-
'& .MuiListItem-gutters': {
|
|
7
|
-
paddingLeft: theme.spacing(space),
|
|
8
|
-
paddingRight: theme.spacing(space),
|
|
9
|
-
'&.MuiListItem-secondaryAction': {
|
|
10
|
-
paddingRight: theme.spacing(space * 2)
|
|
11
|
-
},
|
|
12
|
-
'& .MuiListItemSecondaryAction-root': {
|
|
13
|
-
right: theme.spacing(space),
|
|
14
|
-
'& .MuiIconButton-edgeEnd': {
|
|
15
|
-
marginRight: theme.spacing(-(space / 2))
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export var DrawerList = /*#__PURE__*/styled(List)(_ref => {
|
|
23
|
-
var {
|
|
24
|
-
theme
|
|
25
|
-
} = _ref;
|
|
26
|
-
return _objectSpread(_objectSpread({
|
|
27
|
-
maxWidth: '100%'
|
|
28
|
-
}, listItemMixins(theme, 3)), {}, {
|
|
29
|
-
[theme.breakpoints.up('md')]: _objectSpread({}, listItemMixins(theme, 4))
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export function overrideDrawer(theme) {
|
|
2
|
-
theme.components.MuiDrawer = {
|
|
3
|
-
defaultProps: {
|
|
4
|
-
anchor: 'right'
|
|
5
|
-
},
|
|
6
|
-
styleOverrides: {
|
|
7
|
-
paper: {
|
|
8
|
-
maxWidth: '100%',
|
|
9
|
-
minWidth: '100%',
|
|
10
|
-
[theme.breakpoints.up('sm')]: {
|
|
11
|
-
minWidth: theme.spacing(54),
|
|
12
|
-
maxWidth: theme.breakpoints.values.sm
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["title", "titleTypographyProps", "subtitle", "subtitleTypographyProps", "startAction", "endAction"];
|
|
4
|
-
import { AppBar, Grid, styled, Toolbar, Typography } from '@mui/material';
|
|
5
|
-
import { forwardRef } from 'react';
|
|
6
|
-
import { Color } from "../theme/Color.js";
|
|
7
|
-
import { VisibilityObserver } from "../utils/VisibilityObserver.js";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
-
var StyledAppBar = /*#__PURE__*/styled(AppBar)(_ref => {
|
|
12
|
-
var {
|
|
13
|
-
theme
|
|
14
|
-
} = _ref;
|
|
15
|
-
return {
|
|
16
|
-
borderTop: 'none',
|
|
17
|
-
borderLeft: 'none',
|
|
18
|
-
borderRight: 'none',
|
|
19
|
-
transition: theme.transitions.create(['border-color']),
|
|
20
|
-
'&[data-sticky="false"]': {
|
|
21
|
-
borderBottomColor: Color.Transparent
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
var StyledToolbar = /*#__PURE__*/styled(Toolbar)(_ref2 => {
|
|
26
|
-
var {
|
|
27
|
-
theme
|
|
28
|
-
} = _ref2;
|
|
29
|
-
return {
|
|
30
|
-
'&.MuiToolbar-gutters': {
|
|
31
|
-
paddingLeft: theme.spacing(3),
|
|
32
|
-
paddingRight: theme.spacing(3),
|
|
33
|
-
[theme.breakpoints.up('md')]: {
|
|
34
|
-
paddingLeft: theme.spacing(4),
|
|
35
|
-
paddingRight: theme.spacing(4)
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
|
-
var StartAction = /*#__PURE__*/styled(Grid)(_ref3 => {
|
|
41
|
-
var {
|
|
42
|
-
theme
|
|
43
|
-
} = _ref3;
|
|
44
|
-
return {
|
|
45
|
-
marginRight: theme.spacing(0.5),
|
|
46
|
-
'& .MuiIconButton-edgeStart': {
|
|
47
|
-
marginLeft: theme.spacing(-2)
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
var EndAction = /*#__PURE__*/styled(Grid)(_ref4 => {
|
|
52
|
-
var {
|
|
53
|
-
theme
|
|
54
|
-
} = _ref4;
|
|
55
|
-
return {
|
|
56
|
-
marginLeft: theme.spacing(0.5),
|
|
57
|
-
'& .MuiIconButton-edgeEnd': {
|
|
58
|
-
marginRight: theme.spacing(-2)
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
export var DrawerTitle = /*#__PURE__*/forwardRef((_ref5, appBarRef) => {
|
|
63
|
-
var {
|
|
64
|
-
title,
|
|
65
|
-
titleTypographyProps,
|
|
66
|
-
subtitle,
|
|
67
|
-
subtitleTypographyProps,
|
|
68
|
-
startAction,
|
|
69
|
-
endAction
|
|
70
|
-
} = _ref5,
|
|
71
|
-
props = _objectWithoutProperties(_ref5, _excluded);
|
|
72
|
-
|
|
73
|
-
return /*#__PURE__*/_jsx(VisibilityObserver, {
|
|
74
|
-
render: _ref6 => {
|
|
75
|
-
var {
|
|
76
|
-
ref,
|
|
77
|
-
visibility
|
|
78
|
-
} = _ref6;
|
|
79
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
80
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
81
|
-
ref: ref
|
|
82
|
-
}), /*#__PURE__*/_jsx(StyledAppBar, _objectSpread(_objectSpread({}, props), {}, {
|
|
83
|
-
ref: appBarRef,
|
|
84
|
-
position: "sticky",
|
|
85
|
-
"data-sticky": visibility === 'invisible',
|
|
86
|
-
children: /*#__PURE__*/_jsx(StyledToolbar, {
|
|
87
|
-
children: /*#__PURE__*/_jsxs(Grid, {
|
|
88
|
-
container: true,
|
|
89
|
-
alignItems: "center",
|
|
90
|
-
children: [!!startAction && /*#__PURE__*/_jsx(StartAction, {
|
|
91
|
-
item: true,
|
|
92
|
-
children: startAction
|
|
93
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
|
94
|
-
item: true,
|
|
95
|
-
xs: true,
|
|
96
|
-
zeroMinWidth: true,
|
|
97
|
-
children: [/*#__PURE__*/_jsx(Typography, _objectSpread(_objectSpread({
|
|
98
|
-
variant: "h3",
|
|
99
|
-
noWrap: true
|
|
100
|
-
}, titleTypographyProps), {}, {
|
|
101
|
-
children: title
|
|
102
|
-
})), !!subtitle && /*#__PURE__*/_jsx(Typography, _objectSpread(_objectSpread({
|
|
103
|
-
variant: "body2",
|
|
104
|
-
noWrap: true
|
|
105
|
-
}, subtitleTypographyProps), {}, {
|
|
106
|
-
children: subtitle
|
|
107
|
-
}))]
|
|
108
|
-
}), !!endAction && /*#__PURE__*/_jsx(EndAction, {
|
|
109
|
-
item: true,
|
|
110
|
-
children: endAction
|
|
111
|
-
})]
|
|
112
|
-
})
|
|
113
|
-
})
|
|
114
|
-
}))]
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
if (process.env.NODE_ENV !== "production") DrawerTitle.displayName = "DrawerTitle";
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "alignItems"];
|
|
4
|
-
import { Grid } from '@material-ui/core';
|
|
5
|
-
import { Children, forwardRef } from 'react';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated in favor of `Stack`.
|
|
10
|
-
*/
|
|
11
|
-
export var GridStack = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
12
|
-
var {
|
|
13
|
-
children,
|
|
14
|
-
alignItems = 'stretch'
|
|
15
|
-
} = _ref,
|
|
16
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
-
|
|
18
|
-
var items = Children.toArray(children);
|
|
19
|
-
return /*#__PURE__*/_jsx(Grid, _objectSpread(_objectSpread({}, props), {}, {
|
|
20
|
-
ref: ref,
|
|
21
|
-
container: true,
|
|
22
|
-
wrap: "nowrap",
|
|
23
|
-
direction: "column",
|
|
24
|
-
alignItems: alignItems,
|
|
25
|
-
children: items.map((item, idx) => /*#__PURE__*/_jsx(Grid, {
|
|
26
|
-
item: true,
|
|
27
|
-
zeroMinWidth: true,
|
|
28
|
-
xs: alignItems === 'stretch' ? 12 : undefined,
|
|
29
|
-
children: item
|
|
30
|
-
}, idx))
|
|
31
|
-
}));
|
|
32
|
-
});
|
|
33
|
-
if (process.env.NODE_ENV !== "production") GridStack.displayName = "GridStack";
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "wrap", "justify", "alignItems"];
|
|
4
|
-
import { Grid } from '@material-ui/core';
|
|
5
|
-
import { Children, forwardRef } from 'react';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated in favor of `Inline` component.
|
|
10
|
-
*/
|
|
11
|
-
export var InlineGrid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
12
|
-
var {
|
|
13
|
-
children,
|
|
14
|
-
wrap = 'wrap',
|
|
15
|
-
justify = 'flex-start',
|
|
16
|
-
alignItems = 'flex-start'
|
|
17
|
-
} = _ref,
|
|
18
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
-
|
|
20
|
-
var items = Children.toArray(children);
|
|
21
|
-
return /*#__PURE__*/_jsx(Grid, _objectSpread(_objectSpread({}, props), {}, {
|
|
22
|
-
ref: ref,
|
|
23
|
-
wrap: wrap,
|
|
24
|
-
container: true,
|
|
25
|
-
justify: justify,
|
|
26
|
-
alignItems: alignItems,
|
|
27
|
-
children: items.map((item, idx) => /*#__PURE__*/_jsx(Grid, {
|
|
28
|
-
item: true,
|
|
29
|
-
zeroMinWidth: true,
|
|
30
|
-
children: item
|
|
31
|
-
}, idx))
|
|
32
|
-
}));
|
|
33
|
-
});
|
|
34
|
-
if (process.env.NODE_ENV !== "production") InlineGrid.displayName = "InlineGrid";
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { iconButtonClasses } from '@mui/material';
|
|
2
|
-
import { Color } from "../theme/Color.js";
|
|
3
|
-
export function overrideIconButton(theme) {
|
|
4
|
-
theme.components.MuiIconButton = {
|
|
5
|
-
styleOverrides: {
|
|
6
|
-
root: {
|
|
7
|
-
// no selector for default color
|
|
8
|
-
["&:not(.".concat(iconButtonClasses.colorInherit, "):not(.").concat(iconButtonClasses.colorPrimary, "):not(.").concat(iconButtonClasses.colorSecondary, "):not(.").concat(iconButtonClasses.disabled, ")")]: {
|
|
9
|
-
color: Color.Dark100
|
|
10
|
-
},
|
|
11
|
-
backgroundColor: Color.Transparent,
|
|
12
|
-
transition: theme.transitions.create(['color', 'background-color'], {
|
|
13
|
-
duration: theme.transitions.duration.short
|
|
14
|
-
}),
|
|
15
|
-
'&:hover': {
|
|
16
|
-
backgroundColor: Color.Transparent
|
|
17
|
-
},
|
|
18
|
-
'&:active': {
|
|
19
|
-
color: Color.Dark500
|
|
20
|
-
},
|
|
21
|
-
'&:hover ': {
|
|
22
|
-
color: Color.Dark300
|
|
23
|
-
},
|
|
24
|
-
'&:focus': {
|
|
25
|
-
backgroundColor: Color.Silver400
|
|
26
|
-
},
|
|
27
|
-
["&.".concat(iconButtonClasses.disabled)]: {
|
|
28
|
-
color: Color.Silver500
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
colorPrimary: {
|
|
32
|
-
'&:active': {
|
|
33
|
-
color: Color.Blue500
|
|
34
|
-
},
|
|
35
|
-
'&:hover ': {
|
|
36
|
-
color: Color.Blue300
|
|
37
|
-
},
|
|
38
|
-
'&:focus': {
|
|
39
|
-
backgroundColor: Color.Blue50
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
edgeEnd: {
|
|
43
|
-
marginRight: theme.spacing(-1)
|
|
44
|
-
},
|
|
45
|
-
edgeStart: {
|
|
46
|
-
marginLeft: theme.spacing(-1)
|
|
47
|
-
},
|
|
48
|
-
sizeSmall: {
|
|
49
|
-
padding: 3,
|
|
50
|
-
fontSize: theme.typography.pxToRem(18)
|
|
51
|
-
},
|
|
52
|
-
sizeMedium: {
|
|
53
|
-
padding: 12,
|
|
54
|
-
fontSize: theme.typography.pxToRem(24)
|
|
55
|
-
},
|
|
56
|
-
sizeLarge: {// todo declare large size
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
}
|
package/dist-src/v5/index.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export * from "./adaptive-toolbar/AdaptiveToolbar.js";
|
|
2
|
-
export * from "./avatar-button/AvatarButton.js";
|
|
3
|
-
export * from "./button/Button.js";
|
|
4
|
-
export * from "./card-button/CardButton.js";
|
|
5
|
-
export * from "./checkbox/CheckboxField.js";
|
|
6
|
-
export * from "./checkbox/CheckboxGroudField.js";
|
|
7
|
-
export * from "./columns/Column.js";
|
|
8
|
-
export * from "./columns/Columns.js";
|
|
9
|
-
export * from "./description-list/DescriptionList.js";
|
|
10
|
-
export * from "./drawer/DrawerActions.js";
|
|
11
|
-
export * from "./drawer/DrawerContent.js";
|
|
12
|
-
export * from "./drawer/DrawerList.js";
|
|
13
|
-
export * from "./drawer/DrawerTitle.js";
|
|
14
|
-
export * from "./grid/GridStack.js";
|
|
15
|
-
export * from "./grid/InlineGrid.js";
|
|
16
|
-
export * from "./info-card/InfoCard.js";
|
|
17
|
-
export * from "./inline/Inline.js";
|
|
18
|
-
export * from "./overflow-text/OverflowText.js";
|
|
19
|
-
export * from "./props/AlignProps.js";
|
|
20
|
-
export * from "./props/CollapseProp.js";
|
|
21
|
-
export * from "./props/ResponsiveProp.js";
|
|
22
|
-
export * from "./props/SpaceProp.js";
|
|
23
|
-
export * from "./radio/RadioField.js";
|
|
24
|
-
export * from "./radio/RadioGroupField.js";
|
|
25
|
-
export * from "./snackbar/Snackbar.js";
|
|
26
|
-
export * from "./snackbar/SnackbarContent.js";
|
|
27
|
-
export * from "./snackbar/SnackbarStack.js";
|
|
28
|
-
export * from "./stack/Stack.js";
|
|
29
|
-
export * from "./tag/Tag.js";
|
|
30
|
-
export * from "./theme/Color.js";
|
|
31
|
-
export * from "./theme/SuperDispatchTheme.js";
|
|
32
|
-
export * from "./theme/ThemeProvider.js";
|
|
33
|
-
export * from "./tiles/Tiles.js";
|
|
34
|
-
export * from "./utils/isEmptyReactNode.js";
|
|
35
|
-
export * from "./utils/mergeRefs.js";
|
|
36
|
-
export * from "./utils/renderChildren.js";
|
|
37
|
-
export * from "./utils/useUID.js";
|
|
38
|
-
export * from "./utils/VisibilityObserver.js";
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "square", "classes", "children", "className", "CardContentProps"];
|
|
4
|
-
import { Card, CardContent, styled } from '@mui/material';
|
|
5
|
-
import { forwardRef, useState } from 'react';
|
|
6
|
-
import { assignRef } from "../utils/mergeRefs.js";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
var StyledCardContent = /*#__PURE__*/styled(CardContent)(_ref => {
|
|
9
|
-
var {
|
|
10
|
-
theme
|
|
11
|
-
} = _ref;
|
|
12
|
-
return {
|
|
13
|
-
padding: theme.spacing(2)
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
var StyledCard = /*#__PURE__*/styled(Card)(_ref2 => {
|
|
17
|
-
var {
|
|
18
|
-
theme
|
|
19
|
-
} = _ref2;
|
|
20
|
-
return {
|
|
21
|
-
'&[data-full-width="true"]': {
|
|
22
|
-
borderRadius: 0,
|
|
23
|
-
borderLeftWidth: 0,
|
|
24
|
-
borderRightWidth: 0
|
|
25
|
-
},
|
|
26
|
-
["&[data-size=\"large\"] > ".concat(StyledCardContent)]: {
|
|
27
|
-
[theme.breakpoints.up('sm')]: {
|
|
28
|
-
padding: theme.spacing(3)
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
export var InfoCard = /*#__PURE__*/forwardRef((_ref3, _ref4) => {
|
|
34
|
-
var {
|
|
35
|
-
size,
|
|
36
|
-
square,
|
|
37
|
-
classes,
|
|
38
|
-
children,
|
|
39
|
-
className,
|
|
40
|
-
CardContentProps: cardContentProps = {}
|
|
41
|
-
} = _ref3,
|
|
42
|
-
props = _objectWithoutProperties(_ref3, _excluded);
|
|
43
|
-
|
|
44
|
-
var [rootNode, setRootNode] = useState(null);
|
|
45
|
-
var clientRect = rootNode === null || rootNode === void 0 ? void 0 : rootNode.getBoundingClientRect();
|
|
46
|
-
var isFullWidth = (clientRect === null || clientRect === void 0 ? void 0 : clientRect.width) === window.innerWidth;
|
|
47
|
-
return /*#__PURE__*/_jsx(StyledCard, _objectSpread(_objectSpread({}, props), {}, {
|
|
48
|
-
ref: node => {
|
|
49
|
-
assignRef(_ref4, node);
|
|
50
|
-
setRootNode(node);
|
|
51
|
-
},
|
|
52
|
-
"data-size": size,
|
|
53
|
-
"data-full-width": isFullWidth,
|
|
54
|
-
children: /*#__PURE__*/_jsx(StyledCardContent, _objectSpread(_objectSpread({}, cardContentProps), {}, {
|
|
55
|
-
children: children
|
|
56
|
-
}))
|
|
57
|
-
}));
|
|
58
|
-
});
|
|
59
|
-
if (process.env.NODE_ENV !== "production") InfoCard.displayName = "InfoCard";
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from 'react';
|
|
2
|
-
import flattenChildren from 'react-keyed-flatten-children';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
import { parseAlignProp } from "../props/AlignProps.js";
|
|
5
|
-
import { useResponsiveProp } from "../props/ResponsiveProp.js";
|
|
6
|
-
import { parseSpaceProp } from "../props/SpaceProp.js";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
|
-
function inlineRootMixin(spaceProp, noWrap, verticalAlign, horizontalAlign) {
|
|
10
|
-
var space = parseSpaceProp(spaceProp);
|
|
11
|
-
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
|
-
}
|
|
13
|
-
|
|
14
|
-
var InlineRoot = /*#__PURE__*/styled.div.withConfig({
|
|
15
|
-
displayName: "Inline__InlineRoot",
|
|
16
|
-
componentId: "SD__sc-1tgkwtt-0"
|
|
17
|
-
})(_ref => {
|
|
18
|
-
var {
|
|
19
|
-
theme,
|
|
20
|
-
space,
|
|
21
|
-
noWrap,
|
|
22
|
-
verticalAlign,
|
|
23
|
-
horizontalAlign
|
|
24
|
-
} = _ref;
|
|
25
|
-
return css(["padding-top:1px;&:before{content:'';display:block;}", " ", "{", "}", "{", "}"], inlineRootMixin(space[0], noWrap[0], verticalAlign[0], horizontalAlign[0]), theme.breakpoints.up('sm'), inlineRootMixin(space[1], noWrap[1], verticalAlign[1], horizontalAlign[1]), theme.breakpoints.up('md'), inlineRootMixin(space[2], noWrap[2], verticalAlign[2], horizontalAlign[2]));
|
|
26
|
-
});
|
|
27
|
-
export var Inline = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
28
|
-
var {
|
|
29
|
-
children,
|
|
30
|
-
'aria-label': ariaLabel,
|
|
31
|
-
'aria-labelledby': ariaLabelledBy,
|
|
32
|
-
noWrap: noWrapProp = false,
|
|
33
|
-
space: spaceProp = 'xsmall',
|
|
34
|
-
verticalAlign: verticalAlignProp = 'top',
|
|
35
|
-
horizontalAlign: horizontalAlignProp = 'left'
|
|
36
|
-
} = _ref2;
|
|
37
|
-
var space = useResponsiveProp(spaceProp);
|
|
38
|
-
var noWrap = useResponsiveProp(noWrapProp);
|
|
39
|
-
var verticalAlign = useResponsiveProp(verticalAlignProp);
|
|
40
|
-
var horizontalAlign = useResponsiveProp(horizontalAlignProp);
|
|
41
|
-
return /*#__PURE__*/_jsx(InlineRoot, {
|
|
42
|
-
ref: ref,
|
|
43
|
-
space: space,
|
|
44
|
-
noWrap: noWrap,
|
|
45
|
-
verticalAlign: verticalAlign,
|
|
46
|
-
horizontalAlign: horizontalAlign,
|
|
47
|
-
"aria-label": ariaLabel,
|
|
48
|
-
"aria-labelledby": ariaLabelledBy,
|
|
49
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
50
|
-
children: flattenChildren(children).map((child, idx) => /*#__PURE__*/_jsx("div", {
|
|
51
|
-
children: child
|
|
52
|
-
}, idx))
|
|
53
|
-
})
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
if (process.env.NODE_ENV !== "production") Inline.displayName = "Inline";
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Color } from "../theme/Color.js";
|
|
2
|
-
|
|
3
|
-
function line(color) {
|
|
4
|
-
return "linear-gradient(to right, ".concat(color, " 0%, ").concat(color, " 100%)");
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function overrideLink(theme) {
|
|
8
|
-
theme.components.MuiLink = {
|
|
9
|
-
defaultProps: {
|
|
10
|
-
underline: 'none',
|
|
11
|
-
color: 'textPrimary'
|
|
12
|
-
},
|
|
13
|
-
styleOverrides: {
|
|
14
|
-
root: {
|
|
15
|
-
backgroundSize: '100% 1px',
|
|
16
|
-
backgroundRepeat: 'repeat-x',
|
|
17
|
-
backgroundPosition: '0 100%',
|
|
18
|
-
backgroundColor: Color.Transparent,
|
|
19
|
-
'&:focus': {
|
|
20
|
-
outline: 'none'
|
|
21
|
-
},
|
|
22
|
-
'&:hover, &:active': {
|
|
23
|
-
backgroundImage: line('currentColor')
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
// @ts-expect-error type def need in patch-package
|
|
27
|
-
colorTextPrimary: {
|
|
28
|
-
backgroundImage: line(Color.Silver500),
|
|
29
|
-
'&:focus, &:hover, &:active': {
|
|
30
|
-
color: Color.Blue300,
|
|
31
|
-
backgroundImage: line(Color.Blue300)
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
button: {
|
|
35
|
-
// Reset button styles.
|
|
36
|
-
backgroundColor: 'unset',
|
|
37
|
-
// Override browser defaults.
|
|
38
|
-
fontSize: 'inherit',
|
|
39
|
-
textAlign: 'inherit',
|
|
40
|
-
lineHeight: 'inherit',
|
|
41
|
-
userSelect: 'inherit',
|
|
42
|
-
verticalAlign: 'inherit'
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { listItemClasses } from '@mui/material';
|
|
2
|
-
import { Color } from "../theme/Color.js";
|
|
3
|
-
export function overrideList(theme) {
|
|
4
|
-
theme.components.MuiListItem = {
|
|
5
|
-
styleOverrides: {
|
|
6
|
-
root: {
|
|
7
|
-
["&.".concat(listItemClasses.selected, ", &.").concat(listItemClasses.selected, ":hover")]: {
|
|
8
|
-
backgroundColor: Color.Blue50
|
|
9
|
-
},
|
|
10
|
-
'& .MuiTouchRipple-root': {
|
|
11
|
-
color: Color.Blue100
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import { menuItemClasses } from '@mui/material';
|
|
3
|
-
import { Color } from "../../theme/Color.js";
|
|
4
|
-
export function overrideMenu(theme) {
|
|
5
|
-
theme.components.MuiMenu = {
|
|
6
|
-
defaultProps: {
|
|
7
|
-
anchorOrigin: {
|
|
8
|
-
vertical: 'bottom',
|
|
9
|
-
horizontal: 'left'
|
|
10
|
-
},
|
|
11
|
-
transformOrigin: {
|
|
12
|
-
vertical: 'top',
|
|
13
|
-
horizontal: 'left'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
theme.components.MuiMenuItem = {
|
|
18
|
-
styleOverrides: {
|
|
19
|
-
root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
|
|
20
|
-
paddingTop: theme.spacing(1),
|
|
21
|
-
paddingBottom: theme.spacing(1),
|
|
22
|
-
'& .MuiTouchRipple-root': {
|
|
23
|
-
color: Color.Blue100
|
|
24
|
-
},
|
|
25
|
-
["&.".concat(menuItemClasses.selected, ", &.").concat(menuItemClasses.selected, ":hover")]: {
|
|
26
|
-
backgroundColor: Color.Blue50,
|
|
27
|
-
["&.".concat(menuItemClasses.focusVisible)]: {
|
|
28
|
-
backgroundColor: Color.Blue50
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
})
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|