@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,40 +1,44 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import { Color } from "../theme/Color.js";
3
3
  export function overrideTabs(theme) {
4
- theme.props.MuiTabs = {
5
- variant: 'scrollable',
6
- textColor: 'primary',
7
- indicatorColor: 'primary'
8
- };
9
- theme.overrides.MuiTabs = {
10
- root: {
11
- minHeight: theme.spacing(6)
4
+ theme.components.MuiTabs = {
5
+ defaultProps: {
6
+ variant: 'scrollable',
7
+ textColor: 'primary',
8
+ indicatorColor: 'primary'
12
9
  },
13
- scrollButtons: {
14
- opacity: 1,
15
- color: Color.Dark100,
16
- width: theme.spacing(4),
17
- transition: theme.transitions.create('opacity', {
18
- duration: theme.transitions.duration.short
19
- })
10
+ styleOverrides: {
11
+ root: {
12
+ minHeight: theme.spacing(6)
13
+ },
14
+ scrollButtons: {
15
+ opacity: 1,
16
+ color: Color.Dark100,
17
+ width: theme.spacing(4),
18
+ transition: theme.transitions.create('opacity', {
19
+ duration: theme.transitions.duration.short
20
+ })
21
+ }
20
22
  }
21
23
  };
22
- theme.overrides.MuiTab = {
23
- root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
24
- minHeight: theme.spacing(6),
25
- transition: theme.transitions.create(['color'], {
26
- duration: theme.transitions.duration.short
24
+ theme.components.MuiTab = {
25
+ styleOverrides: {
26
+ root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
27
+ minHeight: theme.spacing(6),
28
+ transition: theme.transitions.create(['color'], {
29
+ duration: theme.transitions.duration.short
30
+ }),
31
+ [theme.breakpoints.up('sm')]: {
32
+ minWidth: 'unset',
33
+ fontSize: 'unset',
34
+ padding: theme.spacing(0.75, 3)
35
+ }
27
36
  }),
28
- [theme.breakpoints.up('sm')]: {
29
- minWidth: undefined,
30
- fontSize: undefined,
31
- padding: theme.spacing(0.75, 3)
32
- }
33
- }),
34
- textColorPrimary: {
35
- color: Color.Dark500,
36
- '&:hover, &:focus': {
37
- color: Color.Blue300
37
+ textColorPrimary: {
38
+ color: Color.Dark500,
39
+ '&:hover, &:focus': {
40
+ color: Color.Blue300
41
+ }
38
42
  }
39
43
  }
40
44
  };
@@ -1,8 +1,8 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["color", "variant", "children", "classes", "className", "noWrap", "fontWeight", "component"];
4
- import { Typography } from '@material-ui/core';
5
- import { makeStyles } from '@material-ui/styles';
4
+ import { Typography } from '@mui/material';
5
+ import { makeStyles } from '@mui/styles';
6
6
  import cx from 'clsx';
7
7
  import { forwardRef } from 'react';
8
8
  import { Color } from "../theme/Color.js";
@@ -1,5 +1,5 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import { SvgIcon } from '@material-ui/core';
2
+ import { formLabelClasses, inputBaseClasses, outlinedInputClasses, SvgIcon } from '@mui/material';
3
3
  import { forwardRef } from 'react';
4
4
  import { Color } from "../theme/Color.js";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -14,171 +14,192 @@ var SelectIcon = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/_jsx(SvgIc
14
14
  if (process.env.NODE_ENV !== "production") SelectIcon.displayName = "SelectIcon";
15
15
  export function overrideTextField(theme) {
16
16
  var sm = theme.breakpoints.up('sm');
17
- theme.props.MuiTextField = {
18
- minRows: 4,
19
- maxRows: 4,
20
- variant: 'outlined'
17
+ theme.components.MuiTextField = {
18
+ defaultProps: {
19
+ minRows: 4,
20
+ maxRows: 4,
21
+ variant: 'outlined'
22
+ }
21
23
  };
22
- theme.overrides.MuiFormLabel = {
23
- root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
24
- color: Color.Dark400,
25
- '&$error': {
26
- color: undefined
27
- },
28
- '&$focused': {
29
- color: undefined
30
- },
31
- '&$disabled': {
32
- color: undefined
33
- }
34
- })
24
+ theme.components.MuiFormLabel = {
25
+ styleOverrides: {
26
+ root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
27
+ color: Color.Dark400,
28
+ ["&.".concat(formLabelClasses.error)]: {
29
+ color: Color.Dark400
30
+ },
31
+ ["&.".concat(formLabelClasses.focused)]: {
32
+ color: Color.Dark400
33
+ },
34
+ ["&.".concat(formLabelClasses.disabled)]: {
35
+ color: Color.Dark400
36
+ }
37
+ })
38
+ }
35
39
  };
36
- theme.overrides.MuiInputBase = {
37
- root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
38
- '&$disabled': {
39
- backgroundColor: Color.Silver100
40
- }
41
- }),
42
- input: {
43
- textOverflow: 'ellipsis',
44
- height: theme.spacing(3),
45
- [sm]: {
46
- height: theme.spacing(2.5)
40
+ theme.components.MuiInputBase = {
41
+ styleOverrides: {
42
+ root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
43
+ ["&.".concat(inputBaseClasses.disabled)]: {
44
+ backgroundColor: Color.Silver100
45
+ }
46
+ }),
47
+ input: {
48
+ textOverflow: 'ellipsis',
49
+ height: theme.spacing(3),
50
+ [sm]: {
51
+ height: theme.spacing(2.5)
52
+ }
53
+ },
54
+ inputMultiline: {
55
+ resize: 'vertical'
47
56
  }
48
- },
49
- inputMultiline: {
50
- resize: 'vertical'
51
57
  }
52
58
  };
53
- theme.props.MuiInputLabel = {
54
- shrink: true
55
- };
56
- theme.overrides.MuiInputLabel = {
57
- root: {
58
- marginBottom: theme.spacing(0.5),
59
- transformOrigin: undefined
60
- },
61
- formControl: {
62
- top: undefined,
63
- left: undefined,
64
- position: undefined,
65
- transform: undefined
59
+ theme.components.MuiInputLabel = {
60
+ defaultProps: {
61
+ shrink: true
66
62
  },
67
- shrink: {
68
- transform: undefined,
69
- transformOrigin: undefined
70
- },
71
- outlined: {
72
- zIndex: undefined,
73
- transform: undefined,
74
- pointerEvents: undefined,
75
- '&$shrink': {
76
- transform: undefined
63
+ styleOverrides: {
64
+ root: {
65
+ marginBottom: theme.spacing(0.5),
66
+ transformOrigin: 'unset'
67
+ },
68
+ formControl: {
69
+ top: 'unset',
70
+ left: 'unset',
71
+ position: 'unset',
72
+ transform: 'unset'
73
+ },
74
+ shrink: {
75
+ transform: 'unset',
76
+ transformOrigin: 'unset'
77
+ },
78
+ outlined: {
79
+ zIndex: 'unset',
80
+ transform: 'unset',
81
+ pointerEvents: 'unset'
77
82
  }
78
83
  }
79
84
  };
80
- theme.props.MuiOutlinedInput = {
81
- notched: false
82
- };
83
- theme.overrides.MuiOutlinedInput = {
84
- root: {
85
- '&:hover $notchedOutline': {
86
- borderColor: undefined
87
- }
85
+ theme.components.MuiOutlinedInput = {
86
+ defaultProps: {
87
+ notched: false
88
88
  },
89
- input: {
90
- padding: theme.spacing(1.25, 1.5),
91
- [sm]: {
89
+ styleOverrides: {
90
+ root: {
91
+ ["&:hover .".concat(outlinedInputClasses.notchedOutline)]: {
92
+ borderColor: Color.Silver500
93
+ }
94
+ },
95
+ input: {
96
+ padding: theme.spacing(1.25, 1.5),
97
+ [sm]: {
98
+ padding: theme.spacing(0.75, 1)
99
+ },
100
+ '&.MuiInputBase-inputAdornedStart': {
101
+ paddingLeft: 0
102
+ },
103
+ '&.MuiInputBase-inputAdornedEnd': {
104
+ paddingRight: 0
105
+ }
106
+ },
107
+ inputMultiline: {
108
+ padding: 0,
109
+ [sm]: {
110
+ padding: 0
111
+ }
112
+ },
113
+ multiline: {
92
114
  padding: theme.spacing(0.75, 1)
93
- }
94
- },
95
- multiline: {
96
- padding: theme.spacing(0.75, 1)
97
- },
98
- adornedStart: {
99
- paddingLeft: theme.spacing(1)
100
- },
101
- adornedEnd: {
102
- paddingRight: theme.spacing(1)
103
- },
104
- notchedOutline: {
105
- top: 0,
106
- borderColor: Color.Silver500,
107
- '& legend': {
108
- display: 'none'
115
+ },
116
+ adornedStart: {
117
+ paddingLeft: theme.spacing(1)
118
+ },
119
+ adornedEnd: {
120
+ paddingRight: theme.spacing(1)
121
+ },
122
+ notchedOutline: {
123
+ top: 0,
124
+ borderColor: Color.Silver500,
125
+ '& legend': {
126
+ display: 'none'
127
+ }
109
128
  }
110
129
  }
111
130
  };
112
- theme.props.MuiSelect = {
113
- IconComponent: SelectIcon
114
- };
115
- theme.overrides.MuiSelect = {
116
- icon: {
117
- top: 'calc(50% - 0.5em)',
118
- '$disabled &': {
119
- color: Color.Dark100
120
- },
121
- fontSize: theme.spacing(3),
122
- [sm]: {
123
- fontSize: theme.spacing(2)
124
- }
125
- },
126
- iconOutlined: {
127
- right: theme.spacing(1.5),
128
- [sm]: {
129
- right: theme.spacing(1)
130
- }
131
+ theme.components.MuiSelect = {
132
+ defaultProps: {
133
+ IconComponent: SelectIcon
131
134
  },
132
- select: {
133
- '&:focus': {
134
- backgroundColor: undefined
135
- }
136
- },
137
- selectMenu: {
138
- '&&': {
135
+ styleOverrides: {
136
+ icon: {
137
+ top: 'calc(50% - 0.5em)',
138
+ '$disabled &': {
139
+ color: Color.Dark100
140
+ },
141
+ fontSize: theme.spacing(3),
142
+ [sm]: {
143
+ fontSize: theme.spacing(2)
144
+ }
145
+ },
146
+ iconOutlined: {
147
+ right: theme.spacing(1.5),
148
+ [sm]: {
149
+ right: theme.spacing(1)
150
+ }
151
+ },
152
+ select: {
139
153
  paddingRight: theme.spacing(4.5),
140
154
  [sm]: {
141
155
  right: theme.spacing(4)
156
+ },
157
+ '&:focus': {
158
+ backgroundColor: 'unset'
142
159
  }
143
160
  }
144
161
  }
145
162
  };
146
- theme.overrides.MuiInputAdornment = {
147
- root: {
148
- '& .MuiSvgIcon-root:not(.MuiSvgIcon-fontSizeSmall)': {
149
- fontSize: theme.spacing(3),
150
- [sm]: {
151
- fontSize: theme.spacing(2.5)
163
+ theme.components.MuiInputAdornment = {
164
+ styleOverrides: {
165
+ root: {
166
+ '& .MuiSvgIcon-root:not(.MuiSvgIcon-fontSizeSmall)': {
167
+ fontSize: theme.spacing(3),
168
+ [sm]: {
169
+ fontSize: theme.spacing(2.5)
170
+ }
171
+ },
172
+ '& .MuiIconButton-root': {
173
+ padding: theme.spacing(1)
152
174
  }
153
175
  },
154
- '& .MuiIconButton-root': {
155
- padding: theme.spacing(1)
156
- }
157
- },
158
- positionStart: {
159
- '& .MuiIconButton-root': {
160
- marginLeft: theme.spacing(-0.5),
161
- [sm]: {
162
- marginLeft: theme.spacing(-0.75)
176
+ positionStart: {
177
+ '& .MuiIconButton-root': {
178
+ marginLeft: theme.spacing(-0.5),
179
+ [sm]: {
180
+ marginLeft: theme.spacing(-0.75)
181
+ }
163
182
  }
164
- }
165
- },
166
- positionEnd: {
167
- '& .MuiIconButton-root': {
168
- marginRight: theme.spacing(-0.5),
169
- [sm]: {
170
- marginRight: theme.spacing(-0.75)
183
+ },
184
+ positionEnd: {
185
+ '& .MuiIconButton-root': {
186
+ marginRight: theme.spacing(-0.5),
187
+ [sm]: {
188
+ marginRight: theme.spacing(-0.75)
189
+ }
171
190
  }
172
191
  }
173
192
  }
174
193
  };
175
- theme.overrides.MuiFormHelperText = {
176
- root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
177
- marginTop: theme.spacing(0.5)
178
- }),
179
- contained: {
180
- marginLeft: undefined,
181
- marginRight: undefined
194
+ theme.components.MuiFormHelperText = {
195
+ styleOverrides: {
196
+ root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
197
+ marginTop: theme.spacing(0.5)
198
+ }),
199
+ contained: {
200
+ marginLeft: 'unset',
201
+ marginRight: 'unset'
202
+ }
182
203
  }
183
204
  };
184
205
  }
@@ -0,0 +1,8 @@
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ export function overrideCssBaseline(theme) {
3
+ theme.components.MuiCssBaseline = {
4
+ styleOverrides: {
5
+ body: _objectSpread({}, theme.typography.body2)
6
+ }
7
+ };
8
+ }
@@ -1,8 +1,7 @@
1
- import { createGenerateClassName, createTheme, CssBaseline } from '@material-ui/core';
2
- import createBreakpoints from '@material-ui/core/styles/createBreakpoints';
3
- import { StylesProvider, ThemeProvider as MaterialThemeProvider } from '@material-ui/styles';
1
+ import { createTheme, CssBaseline, ThemeProvider as MaterialThemeProvider } from '@mui/material';
2
+ import { createGenerateClassName, StylesProvider } from '@mui/styles';
3
+ import { createBreakpoints } from '@mui/system';
4
4
  import { useConstant } from '@superdispatch/hooks';
5
- import { ThemeProvider as StyledThemeProvider } from 'styled-components';
6
5
  import { overrideAppBar } from "../app-bar/AppBarOverrides.js";
7
6
  import { overrideAutocomplete } from "../autocomplete/AutocompleteOverrides.js";
8
7
  import { overrideAvatar } from "../avatar/AvatarOverrides.js";
@@ -30,6 +29,7 @@ import { overrideToolbar } from "../toolbar/ToolbarOverrides.js";
30
29
  import { overrideTooltip } from "../tooltip/TooltipOverrides.js";
31
30
  import { createTypographyOptions, overrideTypography } from "../typography/TypographyOverrides.js";
32
31
  import { Color } from "./Color.js";
32
+ import { overrideCssBaseline } from "./CssBaselineOverrides.js";
33
33
  import { jsx as _jsx } from "react/jsx-runtime";
34
34
  import { jsxs as _jsxs } from "react/jsx-runtime";
35
35
 
@@ -52,39 +52,39 @@ function createSuperDispatchTheme() {
52
52
  text: {
53
53
  primary: Color.Dark500,
54
54
  secondary: Color.Dark200,
55
- hint: Color.Dark100,
55
+ // hint: Color.Dark100, todo
56
56
  disabled: Color.Dark100
57
57
  },
58
58
  divider: Color.Silver400
59
59
  },
60
60
  typography: createTypographyOptions(breakpoints),
61
- props: {},
62
- overrides: {}
61
+ components: {}
63
62
  });
63
+ overrideCard(theme);
64
+ overrideButton(theme);
64
65
  overrideAppBar(theme);
65
- overrideAutocomplete(theme);
66
+ overridePaper(theme);
67
+ overrideTooltip(theme);
68
+ overrideSvgIcon(theme);
69
+ overrideToolbar(theme);
70
+ overrideIconButton(theme);
71
+ overrideTypography(theme);
72
+ overrideMenu(theme);
66
73
  overrideAvatar(theme);
67
- overrideButton(theme);
68
- overrideCard(theme);
74
+ overrideTextField(theme);
75
+ overrideAutocomplete(theme);
76
+ overrideCssBaseline(theme);
69
77
  overrideCheckbox(theme);
78
+ overrideRadio(theme);
79
+ overrideSwitch(theme);
70
80
  overrideChip(theme);
71
81
  overrideDialog(theme);
72
82
  overrideDrawer(theme);
73
- overrideIconButton(theme);
74
- overrideLink(theme);
83
+ overridePagination(theme);
75
84
  overrideList(theme);
76
- overrideMenu(theme);
77
- overridePaper(theme);
78
- overrideRadio(theme);
85
+ overrideLink(theme);
79
86
  overrideSnackbar(theme);
80
- overrideSvgIcon(theme);
81
- overrideSwitch(theme);
82
87
  overrideTabs(theme);
83
- overrideTextField(theme);
84
- overrideToolbar(theme);
85
- overrideTooltip(theme);
86
- overrideTypography(theme);
87
- overridePagination(theme);
88
88
  return theme;
89
89
  }
90
90
 
@@ -132,12 +132,9 @@ export function ThemeProvider(_ref) {
132
132
  generateClassName: generateClassName,
133
133
  children: /*#__PURE__*/_jsxs(MaterialThemeProvider, {
134
134
  theme: theme,
135
- children: [/*#__PURE__*/_jsx(CssBaseline, {}), /*#__PURE__*/_jsx(StyledThemeProvider, {
136
- theme: theme,
137
- children: /*#__PURE__*/_jsx(ResponsiveContextProvider, {
138
- children: /*#__PURE__*/_jsx(SnackbarStackProvider, {
139
- children: children
140
- })
135
+ children: [/*#__PURE__*/_jsx(CssBaseline, {}), /*#__PURE__*/_jsx(ResponsiveContextProvider, {
136
+ children: /*#__PURE__*/_jsx(SnackbarStackProvider, {
137
+ children: children
141
138
  })
142
139
  })]
143
140
  })
@@ -1,4 +1,4 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import clsx from 'clsx';
3
3
  import { forwardRef } from 'react';
4
4
  import flattenChildren from 'react-keyed-flatten-children';
@@ -8,12 +8,13 @@ var PREVENT_COLLAPSE = 1;
8
8
 
9
9
  function spaceVariant(theme, space) {
10
10
  var gap = theme.spacing(space);
11
+ var parsedGap = parseInt(gap);
11
12
  return {
12
13
  '&:before': {
13
- marginTop: -gap - PREVENT_COLLAPSE
14
+ marginTop: -parsedGap - PREVENT_COLLAPSE
14
15
  },
15
16
  '& > $container': {
16
- marginLeft: -gap,
17
+ marginLeft: -parsedGap,
17
18
  '& > $child > $childContainer': {
18
19
  marginTop: gap,
19
20
  marginLeft: gap
@@ -1,12 +1,14 @@
1
1
  export function overrideToolbar(theme) {
2
- theme.overrides.MuiToolbar = {
3
- regular: {
4
- minHeight: theme.spacing(8)
5
- },
6
- gutters: {
7
- [theme.breakpoints.up('sm')]: {
8
- paddingLeft: theme.spacing(2),
9
- paddingRight: theme.spacing(2)
2
+ theme.components.MuiToolbar = {
3
+ styleOverrides: {
4
+ regular: {
5
+ minHeight: theme.spacing(8)
6
+ },
7
+ gutters: {
8
+ [theme.breakpoints.up('sm')]: {
9
+ paddingLeft: theme.spacing(2),
10
+ paddingRight: theme.spacing(2)
11
+ }
10
12
  }
11
13
  }
12
14
  };
@@ -1,39 +1,42 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import { tooltipClasses } from '@mui/material';
2
3
  import { Color } from "../theme/Color.js";
3
4
  export function overrideTooltip(theme) {
4
- theme.props.MuiTooltip = {
5
- arrow: true
6
- };
7
- theme.overrides.MuiTooltip = {
8
- tooltip: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
9
- padding: theme.spacing(1, 1.5),
10
- backgroundColor: Color.Dark400
11
- }),
12
- popperArrow: {
13
- '&[x-placement*="top"] $arrow': {
14
- '&::before': {
15
- borderBottomRightRadius: 2
16
- }
17
- },
18
- '&[x-placement*="left"] $arrow': {
19
- '&::before': {
20
- borderTopRightRadius: 2
21
- }
22
- },
23
- '&[x-placement*="right"] $arrow': {
24
- '&::before': {
25
- borderBottomLeftRadius: 2
5
+ theme.components.MuiTooltip = {
6
+ defaultProps: {
7
+ arrow: true
8
+ },
9
+ styleOverrides: {
10
+ tooltip: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
11
+ padding: theme.spacing(1, 1.5),
12
+ backgroundColor: Color.Dark400
13
+ }),
14
+ popperArrow: {
15
+ ["&[data-popper-placement*=\"top\"] .".concat(tooltipClasses.arrow)]: {
16
+ '&::before': {
17
+ borderBottomRightRadius: 2
18
+ }
19
+ },
20
+ ["&[data-popper-placement*=\"left\"] .".concat(tooltipClasses.arrow)]: {
21
+ '&::before': {
22
+ borderTopRightRadius: 2
23
+ }
24
+ },
25
+ ["&[data-popper-placement*=\"right\"] .".concat(tooltipClasses.arrow)]: {
26
+ '&::before': {
27
+ borderBottomLeftRadius: 2
28
+ }
29
+ },
30
+ ["&[data-popper-placement*=\"bottom\"] .".concat(tooltipClasses.arrow)]: {
31
+ '&::before': {
32
+ borderTopLeftRadius: 2
33
+ }
26
34
  }
27
35
  },
28
- '&[x-placement*="bottom"] $arrow': {
29
- '&::before': {
30
- borderTopLeftRadius: 2
31
- }
36
+ arrow: {
37
+ color: Color.Dark400,
38
+ fontSize: theme.spacing(1)
32
39
  }
33
- },
34
- arrow: {
35
- color: Color.Dark400,
36
- fontSize: theme.spacing(1)
37
40
  }
38
41
  };
39
42
  }
@@ -1,3 +1,11 @@
1
+ function createCSSVarName(component, property) {
2
+ return "--mui-".concat(component, "-").concat(property);
3
+ }
4
+
5
+ export var typographyVars = {
6
+ color: /*#__PURE__*/createCSSVarName('typography', 'color'),
7
+ backgroundImage: /*#__PURE__*/createCSSVarName('typography', 'backgroundImage')
8
+ };
1
9
  export function createTypographyOptions(breakpoints) {
2
10
  var xsOnly = breakpoints.only('xs');
3
11
  return {
@@ -103,7 +111,9 @@ export function createTypographyOptions(breakpoints) {
103
111
  };
104
112
  }
105
113
  export function overrideTypography(theme) {
106
- theme.props.MuiTypography = {
107
- variant: 'body2'
114
+ theme.components.MuiTypography = {
115
+ defaultProps: {
116
+ variant: 'body2'
117
+ }
108
118
  };
109
119
  }