@superdispatch/ui 0.15.0 → 0.16.0-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 (73) hide show
  1. package/dist-node/index.js +4032 -490
  2. package/dist-node/index.js.map +1 -1
  3. package/dist-src/index.js +3 -1
  4. package/dist-src/v5/adaptive-toolbar/AdaptiveToolbar.js +146 -0
  5. package/dist-src/v5/app-bar/AppBarOverrides.js +9 -0
  6. package/dist-src/v5/autocomplete/AutocompleteOverrides.js +63 -0
  7. package/dist-src/v5/avatar/AvatarOverrides.js +21 -0
  8. package/dist-src/v5/avatar-button/AvatarButton.js +146 -0
  9. package/dist-src/v5/button/Button.js +32 -0
  10. package/dist-src/v5/button/ButtonOverrides.js +238 -0
  11. package/dist-src/v5/card/CardOverrides.js +16 -0
  12. package/dist-src/v5/card-button/CardButton.js +135 -0
  13. package/dist-src/v5/checkbox/CheckboxField.js +37 -0
  14. package/dist-src/v5/checkbox/CheckboxGroudField.js +32 -0
  15. package/dist-src/v5/checkbox/CheckboxOverrides.js +71 -0
  16. package/dist-src/v5/chip/ChipOverrides.js +106 -0
  17. package/dist-src/v5/columns/Column.js +75 -0
  18. package/dist-src/v5/columns/Columns.js +28 -0
  19. package/dist-src/v5/description-list/DescriptionList.js +114 -0
  20. package/dist-src/v5/dialog/DialogOverrides.js +43 -0
  21. package/dist-src/v5/drawer/DrawerActions.js +69 -0
  22. package/dist-src/v5/drawer/DrawerContent.js +15 -0
  23. package/dist-src/v5/drawer/DrawerList.js +31 -0
  24. package/dist-src/v5/drawer/DrawerOverrides.js +17 -0
  25. package/dist-src/v5/drawer/DrawerTitle.js +119 -0
  26. package/dist-src/v5/grid/GridStack.js +33 -0
  27. package/dist-src/v5/grid/InlineGrid.js +34 -0
  28. package/dist-src/v5/icon-button/IconButtonOverrides.js +60 -0
  29. package/dist-src/v5/index.js +38 -0
  30. package/dist-src/v5/info-card/InfoCard.js +59 -0
  31. package/dist-src/v5/inline/Inline.js +56 -0
  32. package/dist-src/v5/link/LinkOverrides.js +46 -0
  33. package/dist-src/v5/list/ListOverrides.js +16 -0
  34. package/dist-src/v5/menu/MenuOverrides.js +34 -0
  35. package/dist-src/v5/overflow-text/OverflowText.js +84 -0
  36. package/dist-src/v5/pagination/PaginationOverrides.js +35 -0
  37. package/dist-src/v5/paper/PaperOverrides.js +13 -0
  38. package/dist-src/v5/props/AlignProps.js +15 -0
  39. package/dist-src/v5/props/CollapseProp.js +3 -0
  40. package/dist-src/v5/props/ResponsiveProp.js +42 -0
  41. package/dist-src/v5/props/SpaceProp.js +28 -0
  42. package/dist-src/v5/radio/RadioField.js +36 -0
  43. package/dist-src/v5/radio/RadioGroupField.js +38 -0
  44. package/dist-src/v5/radio/RadioOverrides.js +49 -0
  45. package/dist-src/v5/responsive/CollapseBreakpoint.js +15 -0
  46. package/dist-src/v5/responsive/ResponsiveContext.js +31 -0
  47. package/dist-src/v5/snackbar/Snackbar.js +53 -0
  48. package/dist-src/v5/snackbar/SnackbarContent.js +105 -0
  49. package/dist-src/v5/snackbar/SnackbarOverrides.js +35 -0
  50. package/dist-src/v5/snackbar/SnackbarStack.js +113 -0
  51. package/dist-src/v5/stack/Stack.js +43 -0
  52. package/dist-src/v5/svg-icon/SvgIconOverrides.js +33 -0
  53. package/dist-src/v5/switch/SwitchOverrides.js +88 -0
  54. package/dist-src/v5/tabs/TabsOverrides.js +45 -0
  55. package/dist-src/v5/tag/Tag.js +118 -0
  56. package/dist-src/v5/text-field/TextFieldOverrides.js +205 -0
  57. package/dist-src/v5/theme/Color.js +77 -0
  58. package/dist-src/v5/theme/CssBaselineOverrides.js +8 -0
  59. package/dist-src/v5/theme/SuperDispatchTheme.js +2 -0
  60. package/dist-src/v5/theme/ThemeProvider.js +142 -0
  61. package/dist-src/v5/tiles/Tiles.js +94 -0
  62. package/dist-src/v5/toolbar/ToolbarOverrides.js +15 -0
  63. package/dist-src/v5/tooltip/TooltipOverrides.js +42 -0
  64. package/dist-src/v5/typography/TypographyOverrides.js +121 -0
  65. package/dist-src/v5/utils/VisibilityObserver.js +53 -0
  66. package/dist-src/v5/utils/isEmptyReactNode.js +3 -0
  67. package/dist-src/v5/utils/mergeRefs.js +20 -0
  68. package/dist-src/v5/utils/renderChildren.js +8 -0
  69. package/dist-src/v5/utils/useUID.js +6 -0
  70. package/dist-types/index.d.ts +642 -37
  71. package/dist-web/index.js +4195 -654
  72. package/dist-web/index.js.map +1 -1
  73. package/package.json +8 -2
@@ -0,0 +1,69 @@
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";
@@ -0,0 +1,15 @@
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
+ });
@@ -0,0 +1,31 @@
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
+ });
@@ -0,0 +1,17 @@
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
+ }
@@ -0,0 +1,119 @@
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";
@@ -0,0 +1,33 @@
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";
@@ -0,0 +1,34 @@
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";
@@ -0,0 +1,60 @@
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
+ }
@@ -0,0 +1,38 @@
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";
@@ -0,0 +1,59 @@
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";
@@ -0,0 +1,56 @@
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";
@@ -0,0 +1,46 @@
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
+ }
@@ -0,0 +1,16 @@
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
+ }
@@ -0,0 +1,34 @@
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
+ }