@superdispatch/ui 0.21.0 → 0.21.5-alpha.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.
Files changed (55) hide show
  1. package/dist-node/index.js +1434 -1349
  2. package/dist-node/index.js.map +1 -1
  3. package/dist-src/adaptive-toolbar/AdaptiveToolbar.js +14 -12
  4. package/dist-src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.js +3 -3
  5. package/dist-src/app-bar/AppBarOverrides.js +6 -4
  6. package/dist-src/autocomplete/AutocompleteOverrides.js +14 -18
  7. package/dist-src/avatar/AvatarOverrides.js +14 -12
  8. package/dist-src/avatar-button/AvatarButton.js +80 -92
  9. package/dist-src/button/Button.js +11 -15
  10. package/dist-src/button/ButtonOverrides.js +147 -149
  11. package/dist-src/card/CardOverrides.js +10 -6
  12. package/dist-src/card-button/CardButton.js +78 -75
  13. package/dist-src/checkbox/CheckboxField.js +1 -1
  14. package/dist-src/checkbox/CheckboxGroudField.js +1 -1
  15. package/dist-src/checkbox/CheckboxOverrides.js +60 -50
  16. package/dist-src/chip/ChipOverrides.js +88 -85
  17. package/dist-src/description-list/DescriptionList.js +58 -55
  18. package/dist-src/dialog/DialogOverrides.js +31 -25
  19. package/dist-src/drawer/DrawerActions.js +32 -34
  20. package/dist-src/drawer/DrawerContent.js +10 -26
  21. package/dist-src/drawer/DrawerList.js +8 -27
  22. package/dist-src/drawer/DrawerOverrides.js +12 -10
  23. package/dist-src/drawer/DrawerTitle.js +46 -40
  24. package/dist-src/grid/GridStack.js +1 -1
  25. package/dist-src/grid/InlineGrid.js +2 -2
  26. package/dist-src/icon-button/IconButtonOverrides.js +48 -32
  27. package/dist-src/info-card/InfoCard.js +27 -37
  28. package/dist-src/link/LinkOverrides.js +29 -26
  29. package/dist-src/list/ListOverrides.js +10 -7
  30. package/dist-src/menu/MenuOverrides.js +28 -14
  31. package/dist-src/overflow-text/OverflowText.js +35 -34
  32. package/dist-src/pagination/PaginationOverrides.js +27 -32
  33. package/dist-src/paper/PaperOverrides.js +8 -6
  34. package/dist-src/radio/RadioField.js +1 -1
  35. package/dist-src/radio/RadioGroupField.js +1 -1
  36. package/dist-src/radio/RadioOverrides.js +38 -36
  37. package/dist-src/responsive/ResponsiveContext.js +1 -1
  38. package/dist-src/snackbar/Snackbar.js +1 -1
  39. package/dist-src/snackbar/SnackbarContent.js +3 -3
  40. package/dist-src/snackbar/SnackbarOverrides.js +28 -18
  41. package/dist-src/svg-icon/SvgIconOverrides.js +28 -18
  42. package/dist-src/switch/SwitchOverrides.js +72 -71
  43. package/dist-src/tabs/TabsOverrides.js +34 -30
  44. package/dist-src/tag/Tag.js +2 -2
  45. package/dist-src/text-field/TextFieldOverrides.js +158 -137
  46. package/dist-src/theme/CssBaselineOverrides.js +8 -0
  47. package/dist-src/theme/ThemeProvider.js +25 -28
  48. package/dist-src/tiles/Tiles.js +4 -3
  49. package/dist-src/toolbar/ToolbarOverrides.js +10 -8
  50. package/dist-src/tooltip/TooltipOverrides.js +33 -30
  51. package/dist-src/typography/TypographyOverrides.js +12 -2
  52. package/dist-types/index.d.ts +31 -26
  53. package/dist-web/index.js +1371 -1286
  54. package/dist-web/index.js.map +1 -1
  55. package/package.json +5 -5
@@ -1,60 +1,70 @@
1
- import { SvgIcon } from '@material-ui/core';
1
+ import { checkboxClasses, SvgIcon } from '@mui/material';
2
2
  import { Color } from "../theme/Color.js";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { jsxs as _jsxs } from "react/jsx-runtime";
5
5
  export function overrideCheckbox(theme) {
6
- theme.props.MuiCheckbox = {
7
- color: 'primary',
8
- icon: /*#__PURE__*/_jsx(SvgIcon, {
9
- children: /*#__PURE__*/_jsx("rect", {
10
- width: "17",
11
- height: "17",
12
- x: "3.5",
13
- y: "3.5",
14
- fill: Color.White,
15
- stroke: "currentColor",
16
- rx: "1.5"
6
+ theme.components.MuiCheckbox = {
7
+ defaultProps: {
8
+ color: 'primary',
9
+ icon: /*#__PURE__*/_jsx(SvgIcon, {
10
+ children: /*#__PURE__*/_jsx("rect", {
11
+ width: "17",
12
+ height: "17",
13
+ x: "3.5",
14
+ y: "3.5",
15
+ fill: Color.White,
16
+ stroke: "currentColor",
17
+ rx: "1.5"
18
+ })
19
+ }),
20
+ checkedIcon: /*#__PURE__*/_jsxs(SvgIcon, {
21
+ children: [/*#__PURE__*/_jsx("rect", {
22
+ width: "18",
23
+ height: "18",
24
+ x: "3",
25
+ y: "3",
26
+ fill: "currentColor",
27
+ rx: "2"
28
+ }), /*#__PURE__*/_jsx("path", {
29
+ fill: Color.White,
30
+ d: "M15.73 8l-.63.63c-1.43 1.43-2.94 3.05-4.37 4.5l-1.9-1.57-.7-.57L7 12.38l.7.57 2.53 2.09.63.52.58-.58c1.6-1.62 3.35-3.5 4.93-5.08l.63-.63L15.73 8z"
31
+ })]
32
+ }),
33
+ indeterminateIcon: /*#__PURE__*/_jsxs(SvgIcon, {
34
+ children: [/*#__PURE__*/_jsx("rect", {
35
+ width: "18",
36
+ height: "18",
37
+ x: "3",
38
+ y: "3",
39
+ fill: "currentIcon",
40
+ rx: "2"
41
+ }), /*#__PURE__*/_jsx("path", {
42
+ fill: Color.White,
43
+ d: "M7 11h10v2H7v-2z"
44
+ })]
17
45
  })
18
- }),
19
- checkedIcon: /*#__PURE__*/_jsxs(SvgIcon, {
20
- children: [/*#__PURE__*/_jsx("rect", {
21
- width: "18",
22
- height: "18",
23
- x: "3",
24
- y: "3",
25
- fill: "currentColor",
26
- rx: "2"
27
- }), /*#__PURE__*/_jsx("path", {
28
- fill: Color.White,
29
- d: "M15.73 8l-.63.63c-1.43 1.43-2.94 3.05-4.37 4.5l-1.9-1.57-.7-.57L7 12.38l.7.57 2.53 2.09.63.52.58-.58c1.6-1.62 3.35-3.5 4.93-5.08l.63-.63L15.73 8z"
30
- })]
31
- }),
32
- indeterminateIcon: /*#__PURE__*/_jsxs(SvgIcon, {
33
- children: [/*#__PURE__*/_jsx("rect", {
34
- width: "18",
35
- height: "18",
36
- x: "3",
37
- y: "3",
38
- fill: "currentIcon",
39
- rx: "2"
40
- }), /*#__PURE__*/_jsx("path", {
41
- fill: Color.White,
42
- d: "M7 11h10v2H7v-2z"
43
- })]
44
- })
45
- };
46
- theme.overrides.MuiCheckbox = {
47
- root: {
48
- color: Color.Dark100,
49
- marginTop: theme.spacing(-0.625),
50
- marginBottom: theme.spacing(-0.625)
51
46
  },
52
- colorPrimary: {
53
- '&$checked$disabled': {
54
- color: Color.Silver500
47
+ styleOverrides: {
48
+ root: {
49
+ color: Color.Dark100,
50
+ marginTop: theme.spacing(-0.625),
51
+ marginBottom: theme.spacing(-0.625)
52
+ },
53
+ indeterminate: {
54
+ ["&:not(.".concat(checkboxClasses.checked, ")")]: {
55
+ color: Color.Dark100
56
+ },
57
+ ["&.".concat(checkboxClasses.disabled)]: {
58
+ color: Color.Silver400
59
+ }
55
60
  },
56
- '&:hover:not($checked)': {
57
- color: Color.Dark100
61
+ colorPrimary: {
62
+ ["&.".concat(checkboxClasses.checked, ".").concat(checkboxClasses.disabled)]: {
63
+ color: Color.Silver500
64
+ },
65
+ ["&:hover:not(.".concat(checkboxClasses.checked, ")")]: {
66
+ color: Color.Dark100
67
+ }
58
68
  }
59
69
  }
60
70
  };
@@ -1,102 +1,105 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import { SvgIcon } from '@material-ui/core';
2
+ import { chipClasses, SvgIcon } from '@mui/material';
3
3
  import { Color } from "../theme/Color.js";
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
5
  export function overrideChip(theme) {
6
6
  var sm = theme.breakpoints.up('sm');
7
- theme.props.MuiChip = {
8
- size: 'small',
9
- deleteIcon: /*#__PURE__*/_jsx("div", {
10
- children: /*#__PURE__*/_jsx(SvgIcon, {
11
- children: /*#__PURE__*/_jsx("path", {
12
- fillRule: "evenodd",
13
- clipRule: "evenodd",
14
- d: "M13.239 12L17 8.239 15.761 7 12 10.761 8.239 7 7 8.239 10.761 12 7 15.761 8.239 17 12 13.239 15.761 17 17 15.761 13.239 12z",
15
- fill: "currentColor"
7
+ theme.components.MuiChip = {
8
+ defaultProps: {
9
+ size: 'small',
10
+ deleteIcon: /*#__PURE__*/_jsx("div", {
11
+ children: /*#__PURE__*/_jsx(SvgIcon, {
12
+ children: /*#__PURE__*/_jsx("path", {
13
+ fillRule: "evenodd",
14
+ clipRule: "evenodd",
15
+ d: "M13.239 12L17 8.239 15.761 7 12 10.761 8.239 7 7 8.239 10.761 12 7 15.761 8.239 17 12 13.239 15.761 17 17 15.761 13.239 12z",
16
+ fill: "currentColor"
17
+ })
16
18
  })
17
19
  })
18
- })
19
- };
20
- theme.overrides.MuiChip = {
21
- root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
22
- color: undefined,
23
- height: undefined,
24
- borderRadius: 4,
25
- backgroundColor: Color.Silver200,
26
- '&$disabled': {
27
- opacity: undefined,
28
- color: Color.Dark100
29
- }
30
- }),
31
- sizeSmall: {
32
- height: undefined
33
- },
34
- labelSmall: {
35
- paddingLeft: 6,
36
- paddingRight: 6,
37
- [sm]: {
38
- paddingLeft: 4,
39
- paddingRight: 4
40
- }
41
20
  },
42
- clickable: {
43
- '&:hover, &:focus': {
44
- backgroundColor: undefined
21
+ styleOverrides: {
22
+ root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
23
+ color: 'unset',
24
+ height: 'unset',
25
+ borderRadius: 4,
26
+ backgroundColor: Color.Silver200,
27
+ ["&.".concat(chipClasses.disabled)]: {
28
+ opacity: 1,
29
+ color: Color.Dark100
30
+ }
31
+ }),
32
+ sizeSmall: {
33
+ height: 'unset'
45
34
  },
46
- '&:active': {
47
- boxShadow: undefined
35
+ labelSmall: {
36
+ paddingLeft: 6,
37
+ paddingRight: 6,
38
+ [sm]: {
39
+ paddingLeft: 4,
40
+ paddingRight: 4
41
+ }
48
42
  },
49
- '&:focus': {
50
- boxShadow: "0 0 0 2px ".concat(Color.Silver300)
43
+ clickable: {
44
+ '&:hover, &:focus': {
45
+ backgroundColor: Color.Silver200
46
+ },
47
+ '&:active': {
48
+ boxShadow: 'unset'
49
+ },
50
+ '&:focus': {
51
+ boxShadow: "0 0 0 2px ".concat(Color.Silver300)
52
+ },
53
+ '&:active, &:hover': {
54
+ backgroundColor: Color.Silver300
55
+ }
51
56
  },
52
- '&:active, &:hover': {
53
- backgroundColor: Color.Silver300
54
- }
55
- },
56
- deletable: {
57
- '&:focus': {
58
- backgroundColor: undefined,
59
- boxShadow: "0 0 0 2px ".concat(Color.Silver300)
60
- }
61
- },
62
- deleteIcon: {
63
- width: undefined,
64
- height: undefined,
65
- display: 'flex',
66
- transition: theme.transitions.create('background-color'),
67
- '&:active, &:hover, &:focus': {
57
+ deletable: {
58
+ '&:focus': {
59
+ backgroundColor: Color.Silver200,
60
+ boxShadow: "0 0 0 2px ".concat(Color.Silver300)
61
+ }
62
+ },
63
+ deleteIcon: {
64
+ width: 'unset',
65
+ height: 'unset',
66
+ display: 'flex',
67
+ fontSize: 14,
68
+ transition: theme.transitions.create('background-color'),
69
+ '&:active, &:hover, &:focus': {
70
+ '& > svg': {
71
+ backgroundColor: Color.Silver400
72
+ }
73
+ },
68
74
  '& > svg': {
69
- backgroundColor: Color.Silver400
75
+ borderRadius: '50%',
76
+ color: Color.Dark200,
77
+ fontSize: '1em'
70
78
  }
71
79
  },
72
- '& > svg': {
73
- borderRadius: '50%',
74
- color: Color.Dark200,
75
- fontSize: '1em'
76
- }
77
- },
78
- deleteIconSmall: {
79
- width: undefined,
80
- height: undefined,
81
- padding: theme.spacing(0.5),
82
- marginLeft: theme.spacing(-0.5),
83
- marginRight: theme.spacing(0.25),
84
- [sm]: {
85
- marginRight: 0
86
- }
87
- },
88
- icon: {
89
- color: Color.Dark100,
90
- fontSize: '1em',
91
- marginRight: undefined
92
- },
93
- iconSmall: {
94
- width: undefined,
95
- height: undefined,
96
- marginLeft: 8,
97
- marginRight: undefined,
98
- [sm]: {
99
- marginLeft: 4
80
+ deleteIconSmall: {
81
+ width: 'unset',
82
+ height: 'unset',
83
+ padding: theme.spacing(0.5),
84
+ marginLeft: theme.spacing(-0.5),
85
+ marginRight: theme.spacing(0.25),
86
+ [sm]: {
87
+ marginRight: 0
88
+ }
89
+ },
90
+ icon: {
91
+ color: Color.Dark100,
92
+ fontSize: '1em',
93
+ marginRight: 'unset'
94
+ },
95
+ iconSmall: {
96
+ width: 'unset',
97
+ height: 'unset',
98
+ marginLeft: 8,
99
+ marginRight: 'unset',
100
+ [sm]: {
101
+ marginLeft: 4
102
+ }
100
103
  }
101
104
  }
102
105
  };
@@ -1,9 +1,7 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
3
3
  var _excluded = ["size"];
4
- import { SvgIcon, Typography } from '@material-ui/core';
5
- import { makeStyles } from '@material-ui/styles';
6
- import clsx from 'clsx';
4
+ import { styled, SvgIcon, Typography } from '@mui/material';
7
5
  import { forwardRef } from 'react';
8
6
  import { OverflowText } from "../overflow-text/OverflowText.js";
9
7
  import { Color } from "../theme/Color.js";
@@ -11,29 +9,18 @@ import { isEmptyReactNode } from "../utils/isEmptyReactNode.js";
11
9
  import { useUID } from "../utils/useUID.js";
12
10
  import { jsx as _jsx } from "react/jsx-runtime";
13
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
-
15
- function sizeVariant(theme, mobileSpacing, desktopSpacing) {
12
+ var DescriptionListItemRoot = /*#__PURE__*/styled('div', {
13
+ name: 'SD-DescriptionListItem',
14
+ slot: 'Root'
15
+ })({
16
+ display: 'flex',
17
+ alignItems: 'center'
18
+ });
19
+ var DescriptionListItemIcon = /*#__PURE__*/styled('div')(_ref => {
20
+ var {
21
+ theme
22
+ } = _ref;
16
23
  return {
17
- '& > $list, & > $item': {
18
- '&:not(:last-child)': {
19
- paddingBottom: theme.spacing(mobileSpacing),
20
- [theme.breakpoints.up('sm')]: {
21
- paddingBottom: theme.spacing(desktopSpacing)
22
- }
23
- }
24
- }
25
- };
26
- }
27
-
28
- var useStyles = /*#__PURE__*/makeStyles(theme => ({
29
- list: sizeVariant(theme, 2, 1),
30
- listSmall: sizeVariant(theme, 1, 0.5),
31
- listLarge: sizeVariant(theme, 3, 2),
32
- item: {
33
- display: 'flex',
34
- alignItems: 'center'
35
- },
36
- icon: {
37
24
  display: 'inline-flex',
38
25
  marginRight: theme.spacing(1),
39
26
  '& > .MuiSvgIcon-root': {
@@ -43,33 +30,11 @@ var useStyles = /*#__PURE__*/makeStyles(theme => ({
43
30
  fontSize: theme.spacing(2)
44
31
  }
45
32
  }
46
- }
47
- }), {
48
- name: 'SD-DescriptionList'
49
- }); //
50
- // DescriptionList
51
- //
52
-
53
- export var DescriptionList = /*#__PURE__*/forwardRef((_ref, ref) => {
54
- var {
55
- size
56
- } = _ref,
57
- props = _objectWithoutProperties(_ref, _excluded);
58
-
59
- var styles = useStyles();
60
- return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
61
- ref: ref,
62
- "data-size": size,
63
- className: clsx(styles.list, {
64
- 'small': styles.listSmall,
65
- 'large': styles.listLarge
66
- }[size])
67
- }));
33
+ };
68
34
  }); //
69
35
  // DescriptionListItem
70
36
  //
71
37
 
72
- if (process.env.NODE_ENV !== "production") DescriptionList.displayName = "DescriptionList";
73
38
  export var DescriptionListItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
74
39
  var _ref3, _contentTypographyPro, _contentTypographyPro2;
75
40
 
@@ -82,15 +47,12 @@ export var DescriptionListItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
82
47
  contentTypographyProps,
83
48
  fallback
84
49
  } = _ref2;
85
- var styles = useStyles();
86
50
  var labelID = useUID(labelTypographyProps === null || labelTypographyProps === void 0 ? void 0 : labelTypographyProps.id);
87
51
  var shouldRenderFallback = isEmptyReactNode(content);
88
- return /*#__PURE__*/_jsxs("div", {
52
+ return /*#__PURE__*/_jsxs(DescriptionListItemRoot, {
89
53
  ref: ref,
90
- className: styles.item,
91
54
  "aria-labelledby": label != null ? labelID : undefined,
92
- children: [!!icon && /*#__PURE__*/_jsx("div", {
93
- className: styles.icon,
55
+ children: [!!icon && /*#__PURE__*/_jsx(DescriptionListItemIcon, {
94
56
  children: icon
95
57
  }), /*#__PURE__*/_jsxs(OverflowText, _objectSpread(_objectSpread({}, contentTypographyProps), {}, {
96
58
  component: "span",
@@ -107,5 +69,46 @@ export var DescriptionListItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
107
69
  })), label != null && ' ', !shouldRenderFallback ? content : fallback]
108
70
  }))]
109
71
  });
72
+ }); //
73
+ // DescriptionList
74
+ //
75
+
76
+ if (process.env.NODE_ENV !== "production") DescriptionListItem.displayName = "DescriptionListItem";
77
+ var DescriptionListRoot = /*#__PURE__*/styled('div', {
78
+ name: 'SD-DescriptionList',
79
+ slot: 'Root'
80
+ })(_ref4 => {
81
+ var {
82
+ theme
83
+ } = _ref4;
84
+ return _objectSpread(_objectSpread({}, sizeVariant(theme, 2, 1)), {}, {
85
+ '&[data-size="small"]': sizeVariant(theme, 1, 0.5),
86
+ '&[data-size="large"]': sizeVariant(theme, 3, 2)
87
+ });
88
+ });
89
+
90
+ function sizeVariant(theme, mobileSpacing, desktopSpacing) {
91
+ return {
92
+ ["& > ".concat(DescriptionListRoot.toString(), ", & > ").concat(DescriptionListItemRoot.toString())]: {
93
+ '&:not(:last-child)': {
94
+ paddingBottom: theme.spacing(mobileSpacing),
95
+ [theme.breakpoints.up('sm')]: {
96
+ paddingBottom: theme.spacing(desktopSpacing)
97
+ }
98
+ }
99
+ }
100
+ };
101
+ }
102
+
103
+ export var DescriptionList = /*#__PURE__*/forwardRef((_ref5, ref) => {
104
+ var {
105
+ size
106
+ } = _ref5,
107
+ props = _objectWithoutProperties(_ref5, _excluded);
108
+
109
+ return /*#__PURE__*/_jsx(DescriptionListRoot, _objectSpread(_objectSpread({}, props), {}, {
110
+ ref: ref,
111
+ "data-size": size
112
+ }));
110
113
  });
111
- if (process.env.NODE_ENV !== "production") DescriptionListItem.displayName = "DescriptionListItem";
114
+ if (process.env.NODE_ENV !== "production") DescriptionList.displayName = "DescriptionList";
@@ -1,36 +1,42 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
1
+ import { dialogClasses } from '@mui/material';
2
2
  export function overrideDialog(theme) {
3
- theme.props.MuiDialogTitle = {
4
- disableTypography: true
5
- };
6
- theme.overrides.MuiDialog = {
7
- paper: {
8
- margin: theme.spacing(3)
9
- },
10
- paperWidthXs: {
11
- maxWidth: Math.max(theme.breakpoints.values.xs, 360),
12
- '&$paperScrollBody': {
13
- [theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 360) + 32 * 2)]: {
14
- maxWidth: 'calc(100% - 64px)'
3
+ theme.components.MuiDialog = {
4
+ styleOverrides: {
5
+ paper: {
6
+ margin: theme.spacing(3)
7
+ },
8
+ paperWidthXs: {
9
+ maxWidth: Math.max(theme.breakpoints.values.xs, 360),
10
+ ["&.".concat(dialogClasses.paperScrollBody)]: {
11
+ [theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 360) + 32 * 2)]: {
12
+ maxWidth: 'calc(100% - 64px)'
13
+ }
15
14
  }
16
15
  }
17
16
  }
18
17
  };
19
- theme.overrides.MuiDialogTitle = {
20
- root: _objectSpread({}, theme.typography.h3)
18
+ theme.components.MuiDialogTitle = {
19
+ defaultProps: {
20
+ // @ts-expect-error DialogTitleProps has missing type def
21
+ variant: 'h3'
22
+ }
21
23
  };
22
- theme.overrides.MuiDialogContent = {
23
- root: {
24
- padding: theme.spacing(0, 3)
24
+ theme.components.MuiDialogContent = {
25
+ styleOverrides: {
26
+ root: {
27
+ padding: theme.spacing(0, 3)
28
+ }
25
29
  }
26
30
  };
27
- theme.overrides.MuiDialogActions = {
28
- root: {
29
- padding: theme.spacing(3)
30
- },
31
- spacing: {
32
- '& > :not(:first-child)': {
33
- marginLeft: theme.spacing(2)
31
+ theme.components.MuiDialogActions = {
32
+ styleOverrides: {
33
+ root: {
34
+ padding: theme.spacing(3)
35
+ },
36
+ spacing: {
37
+ '& > :not(:first-child)': {
38
+ marginLeft: theme.spacing(2)
39
+ }
34
40
  }
35
41
  }
36
42
  };
@@ -1,31 +1,34 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "className"];
4
- import { AppBar, Toolbar } from '@material-ui/core';
5
- import { makeStyles } from '@material-ui/styles';
6
- import clsx from 'clsx';
3
+ var _excluded = ["children"];
4
+ import { AppBar, styled, Toolbar } from '@mui/material';
7
5
  import { forwardRef } from 'react';
8
6
  import { Color } from "../theme/Color.js";
9
7
  import { VisibilityObserver } from "../utils/VisibilityObserver.js";
10
8
  import { jsx as _jsx } from "react/jsx-runtime";
11
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
12
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
- var useStyles = /*#__PURE__*/makeStyles(theme => ({
14
- appBar: {
15
- '&&': {
16
- bottom: 0,
17
- top: 'auto',
18
- borderLeft: 'none',
19
- borderRight: 'none',
20
- borderBottom: 'none',
21
- transition: theme.transitions.create(['border-color']),
22
- '&:not($appBarSticky)': {
23
- borderTopColor: Color.Transparent
24
- }
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
25
24
  }
26
- },
27
- appBarSticky: {},
28
- toolbar: {
25
+ };
26
+ });
27
+ var StyledToolbar = /*#__PURE__*/styled(Toolbar)(_ref2 => {
28
+ var {
29
+ theme
30
+ } = _ref2;
31
+ return {
29
32
  '&.MuiToolbar-gutters': {
30
33
  paddingLeft: theme.spacing(3),
31
34
  paddingRight: theme.spacing(3),
@@ -34,31 +37,26 @@ var useStyles = /*#__PURE__*/makeStyles(theme => ({
34
37
  paddingRight: theme.spacing(4)
35
38
  }
36
39
  }
37
- }
38
- }), {
39
- name: 'SD-DrawerActions'
40
+ };
40
41
  });
41
- export var DrawerActions = /*#__PURE__*/forwardRef((_ref, appBarRef) => {
42
+ export var DrawerActions = /*#__PURE__*/forwardRef((_ref3, appBarRef) => {
42
43
  var {
43
- children,
44
- className
45
- } = _ref,
46
- props = _objectWithoutProperties(_ref, _excluded);
44
+ children
45
+ } = _ref3,
46
+ props = _objectWithoutProperties(_ref3, _excluded);
47
47
 
48
- var styles = useStyles();
49
48
  return /*#__PURE__*/_jsx(VisibilityObserver, {
50
- render: _ref2 => {
49
+ render: _ref4 => {
51
50
  var {
52
51
  ref,
53
52
  visibility
54
- } = _ref2;
53
+ } = _ref4;
55
54
  return /*#__PURE__*/_jsxs(_Fragment, {
56
- children: [/*#__PURE__*/_jsx(AppBar, _objectSpread(_objectSpread({}, props), {}, {
55
+ children: [/*#__PURE__*/_jsx(StyledAppBar, _objectSpread(_objectSpread({}, props), {}, {
57
56
  ref: appBarRef,
58
57
  position: "sticky",
59
- className: clsx(className, styles.appBar, visibility === 'invisible' && styles.appBarSticky),
60
- children: /*#__PURE__*/_jsx(Toolbar, {
61
- className: styles.toolbar,
58
+ "data-sticky": visibility === 'invisible',
59
+ children: /*#__PURE__*/_jsx(StyledToolbar, {
62
60
  children: children
63
61
  })
64
62
  })), /*#__PURE__*/_jsx("div", {
@@ -1,31 +1,15 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["className"];
4
- import { makeStyles } from '@material-ui/styles';
5
- import clsx from 'clsx';
6
- import { forwardRef } from 'react';
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- var useStyles = /*#__PURE__*/makeStyles(theme => ({
9
- root: {
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 {
10
9
  maxWidth: '100%',
11
10
  padding: theme.spacing(2, 3),
12
11
  [theme.breakpoints.up('md')]: {
13
12
  padding: theme.spacing(2, 4)
14
13
  }
15
- }
16
- }), {
17
- name: 'SD-DrawerContent'
18
- });
19
- export var DrawerContent = /*#__PURE__*/forwardRef((_ref, ref) => {
20
- var {
21
- className
22
- } = _ref,
23
- props = _objectWithoutProperties(_ref, _excluded);
24
-
25
- var styles = useStyles();
26
- return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
27
- ref: ref,
28
- className: clsx(styles.root, className)
29
- }));
30
- });
31
- if (process.env.NODE_ENV !== "production") DrawerContent.displayName = "DrawerContent";
14
+ };
15
+ });