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