@superdispatch/ui 0.13.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 (76) hide show
  1. package/dist-node/index.js +4051 -508
  2. package/dist-node/index.js.map +1 -1
  3. package/dist-src/dialog/DialogOverrides.js +8 -0
  4. package/dist-src/index.js +3 -1
  5. package/dist-src/info-card/InfoCard.js +1 -11
  6. package/dist-src/utils/mergeRefs.js +10 -7
  7. package/dist-src/v5/adaptive-toolbar/AdaptiveToolbar.js +146 -0
  8. package/dist-src/v5/app-bar/AppBarOverrides.js +9 -0
  9. package/dist-src/v5/autocomplete/AutocompleteOverrides.js +63 -0
  10. package/dist-src/v5/avatar/AvatarOverrides.js +21 -0
  11. package/dist-src/v5/avatar-button/AvatarButton.js +146 -0
  12. package/dist-src/v5/button/Button.js +32 -0
  13. package/dist-src/v5/button/ButtonOverrides.js +238 -0
  14. package/dist-src/v5/card/CardOverrides.js +16 -0
  15. package/dist-src/v5/card-button/CardButton.js +135 -0
  16. package/dist-src/v5/checkbox/CheckboxField.js +37 -0
  17. package/dist-src/v5/checkbox/CheckboxGroudField.js +32 -0
  18. package/dist-src/v5/checkbox/CheckboxOverrides.js +71 -0
  19. package/dist-src/v5/chip/ChipOverrides.js +106 -0
  20. package/dist-src/v5/columns/Column.js +75 -0
  21. package/dist-src/v5/columns/Columns.js +28 -0
  22. package/dist-src/v5/description-list/DescriptionList.js +114 -0
  23. package/dist-src/v5/dialog/DialogOverrides.js +43 -0
  24. package/dist-src/v5/drawer/DrawerActions.js +69 -0
  25. package/dist-src/v5/drawer/DrawerContent.js +15 -0
  26. package/dist-src/v5/drawer/DrawerList.js +31 -0
  27. package/dist-src/v5/drawer/DrawerOverrides.js +17 -0
  28. package/dist-src/v5/drawer/DrawerTitle.js +119 -0
  29. package/dist-src/v5/grid/GridStack.js +33 -0
  30. package/dist-src/v5/grid/InlineGrid.js +34 -0
  31. package/dist-src/v5/icon-button/IconButtonOverrides.js +60 -0
  32. package/dist-src/v5/index.js +38 -0
  33. package/dist-src/v5/info-card/InfoCard.js +59 -0
  34. package/dist-src/v5/inline/Inline.js +56 -0
  35. package/dist-src/v5/link/LinkOverrides.js +46 -0
  36. package/dist-src/v5/list/ListOverrides.js +16 -0
  37. package/dist-src/v5/menu/MenuOverrides.js +34 -0
  38. package/dist-src/v5/overflow-text/OverflowText.js +84 -0
  39. package/dist-src/v5/pagination/PaginationOverrides.js +35 -0
  40. package/dist-src/v5/paper/PaperOverrides.js +13 -0
  41. package/dist-src/v5/props/AlignProps.js +15 -0
  42. package/dist-src/v5/props/CollapseProp.js +3 -0
  43. package/dist-src/v5/props/ResponsiveProp.js +42 -0
  44. package/dist-src/v5/props/SpaceProp.js +28 -0
  45. package/dist-src/v5/radio/RadioField.js +36 -0
  46. package/dist-src/v5/radio/RadioGroupField.js +38 -0
  47. package/dist-src/v5/radio/RadioOverrides.js +49 -0
  48. package/dist-src/v5/responsive/CollapseBreakpoint.js +15 -0
  49. package/dist-src/v5/responsive/ResponsiveContext.js +31 -0
  50. package/dist-src/v5/snackbar/Snackbar.js +53 -0
  51. package/dist-src/v5/snackbar/SnackbarContent.js +105 -0
  52. package/dist-src/v5/snackbar/SnackbarOverrides.js +35 -0
  53. package/dist-src/v5/snackbar/SnackbarStack.js +113 -0
  54. package/dist-src/v5/stack/Stack.js +43 -0
  55. package/dist-src/v5/svg-icon/SvgIconOverrides.js +33 -0
  56. package/dist-src/v5/switch/SwitchOverrides.js +88 -0
  57. package/dist-src/v5/tabs/TabsOverrides.js +45 -0
  58. package/dist-src/v5/tag/Tag.js +118 -0
  59. package/dist-src/v5/text-field/TextFieldOverrides.js +205 -0
  60. package/dist-src/v5/theme/Color.js +77 -0
  61. package/dist-src/v5/theme/CssBaselineOverrides.js +8 -0
  62. package/dist-src/v5/theme/SuperDispatchTheme.js +2 -0
  63. package/dist-src/v5/theme/ThemeProvider.js +142 -0
  64. package/dist-src/v5/tiles/Tiles.js +94 -0
  65. package/dist-src/v5/toolbar/ToolbarOverrides.js +15 -0
  66. package/dist-src/v5/tooltip/TooltipOverrides.js +42 -0
  67. package/dist-src/v5/typography/TypographyOverrides.js +121 -0
  68. package/dist-src/v5/utils/VisibilityObserver.js +53 -0
  69. package/dist-src/v5/utils/isEmptyReactNode.js +3 -0
  70. package/dist-src/v5/utils/mergeRefs.js +20 -0
  71. package/dist-src/v5/utils/renderChildren.js +8 -0
  72. package/dist-src/v5/utils/useUID.js +6 -0
  73. package/dist-types/index.d.ts +643 -37
  74. package/dist-web/index.js +4214 -673
  75. package/dist-web/index.js.map +1 -1
  76. package/package.json +9 -3
@@ -0,0 +1,75 @@
1
+ import { forwardRef } from 'react';
2
+ import styled, { css } from 'styled-components';
3
+ import { useResponsiveProp } from "../props/ResponsiveProp.js";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+
6
+ function computeFlexBasis(scale) {
7
+ return "".concat(scale * 100, "%");
8
+ }
9
+
10
+ function flexBasisMixin(width) {
11
+ switch (width) {
12
+ case '1/2':
13
+ return computeFlexBasis(1 / 2);
14
+
15
+ case '1/3':
16
+ return computeFlexBasis(1 / 3);
17
+
18
+ case '2/3':
19
+ return computeFlexBasis(2 / 3);
20
+
21
+ case '1/4':
22
+ return computeFlexBasis(1 / 4);
23
+
24
+ case '3/4':
25
+ return computeFlexBasis(3 / 4);
26
+
27
+ case '1/5':
28
+ return computeFlexBasis(1 / 5);
29
+
30
+ case '2/5':
31
+ return computeFlexBasis(2 / 5);
32
+
33
+ case '3/5':
34
+ return computeFlexBasis(3 / 5);
35
+
36
+ case '4/5':
37
+ return computeFlexBasis(4 / 5);
38
+ }
39
+
40
+ return 'auto';
41
+ }
42
+
43
+ function columnRootMixin(width) {
44
+ return css(["flex-grow:0;flex-basis:", ";width:", ";flex-shrink:", ";"], flexBasisMixin(width), width === 'fluid' ? '100%' : 'auto', width === 'fluid' || width === 'adaptive' ? 1 : 0);
45
+ }
46
+
47
+ var ColumnRoot = /*#__PURE__*/styled.div.withConfig({
48
+ displayName: "Column__ColumnRoot",
49
+ componentId: "SD__sc-nqzztj-0"
50
+ })(_ref => {
51
+ var {
52
+ theme,
53
+ columnWidth
54
+ } = _ref;
55
+ return css(["min-width:0;", ";", "{", ";}", "{", ";}& > div{padding-top:var(--column-space-top);padding-left:var(--column-space-left);padding-bottom:var(--column-space-bottom);}&:last-child > div{padding-top:0;padding-bottom:0;}"], columnRootMixin(columnWidth[0]), theme.breakpoints.up('sm'), columnRootMixin(columnWidth[1]), theme.breakpoints.up('md'), columnRootMixin(columnWidth[2]));
56
+ });
57
+ export var Column = /*#__PURE__*/forwardRef((_ref2, ref) => {
58
+ var {
59
+ children,
60
+ 'aria-label': ariaLabel,
61
+ 'aria-labelledby': ariaLabelledBy,
62
+ width = 'fluid'
63
+ } = _ref2;
64
+ var columnWidth = useResponsiveProp(width);
65
+ return /*#__PURE__*/_jsx(ColumnRoot, {
66
+ ref: ref,
67
+ columnWidth: columnWidth,
68
+ "aria-label": ariaLabel,
69
+ "aria-labelledby": ariaLabelledBy,
70
+ children: /*#__PURE__*/_jsx("div", {
71
+ children: children
72
+ })
73
+ });
74
+ });
75
+ if (process.env.NODE_ENV !== "production") Column.displayName = "Column";
@@ -0,0 +1,28 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { parseAlignProp } from "../props/AlignProps.js";
3
+ import { parseCollapsedBelow } from "../props/CollapseProp.js";
4
+ import { parseResponsiveProp } from "../props/ResponsiveProp.js";
5
+ import { parseSpaceProp } from "../props/SpaceProp.js";
6
+
7
+ function columnsRootMixin(align, spaceProp, isReversed, isCollapsed) {
8
+ var space = parseSpaceProp(spaceProp);
9
+ return css(["--column-space-left:", "px;--column-space-top:", "px;--column-space-bottom:", "px;align-items:", ";margin-left:", "px;width:", ";flex-direction:", ";"], isCollapsed ? 0 : space, isCollapsed && isReversed ? space : 0, isCollapsed && !isReversed ? space : 0, parseAlignProp(align), isCollapsed ? 0 : "-".concat(space), isCollapsed ? '100%' : "calc(100% + ".concat(space, "px)"), isCollapsed ? !isReversed ? 'column' : 'column-reverse' : !isReversed ? 'row' : 'row-reverse');
10
+ }
11
+
12
+ export var Columns = /*#__PURE__*/styled.div.withConfig({
13
+ displayName: "Columns",
14
+ componentId: "SD__sc-1uebhbi-0"
15
+ })(_ref => {
16
+ var {
17
+ theme,
18
+ collapseBelow,
19
+ align: alignProp = 'top',
20
+ space: spaceProp = 'none',
21
+ reverse: reverseProp = false
22
+ } = _ref;
23
+ var align = parseResponsiveProp(alignProp);
24
+ var space = parseResponsiveProp(spaceProp);
25
+ var reverse = parseResponsiveProp(reverseProp);
26
+ var collapsed = parseCollapsedBelow(collapseBelow);
27
+ return css(["width:100%;display:flex;", ";", "{", ";}", "{", ";}"], columnsRootMixin(align[0], space[0], reverse[0], collapsed[0]), theme.breakpoints.up('sm'), columnsRootMixin(align[1], space[1], reverse[1], collapsed[1]), theme.breakpoints.up('md'), columnsRootMixin(align[2], space[2], reverse[2], collapsed[2]));
28
+ });
@@ -0,0 +1,114 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
3
+ var _excluded = ["size"];
4
+ import { styled, SvgIcon, Typography } from '@mui/material';
5
+ import { forwardRef } from 'react';
6
+ import { OverflowText } from "../overflow-text/OverflowText.js";
7
+ import { Color } from "../theme/Color.js";
8
+ import { isEmptyReactNode } from "../utils/isEmptyReactNode.js";
9
+ import { useUID } from "../utils/useUID.js";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
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;
23
+ return {
24
+ display: 'inline-flex',
25
+ marginRight: theme.spacing(1),
26
+ '& > .MuiSvgIcon-root': {
27
+ color: Color.Dark100,
28
+ fontSize: theme.spacing(3),
29
+ [theme.breakpoints.up('sm')]: {
30
+ fontSize: theme.spacing(2)
31
+ }
32
+ }
33
+ };
34
+ }); //
35
+ // DescriptionListItem
36
+ //
37
+
38
+ export var DescriptionListItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
39
+ var _ref3, _contentTypographyPro, _contentTypographyPro2;
40
+
41
+ var {
42
+ inset,
43
+ icon = inset ? /*#__PURE__*/_jsx(SvgIcon, {}) : null,
44
+ label,
45
+ labelTypographyProps,
46
+ content,
47
+ contentTypographyProps,
48
+ fallback
49
+ } = _ref2;
50
+ var labelID = useUID(labelTypographyProps === null || labelTypographyProps === void 0 ? void 0 : labelTypographyProps.id);
51
+ var shouldRenderFallback = isEmptyReactNode(content);
52
+ return /*#__PURE__*/_jsxs(DescriptionListItemRoot, {
53
+ ref: ref,
54
+ "aria-labelledby": label != null ? labelID : undefined,
55
+ children: [!!icon && /*#__PURE__*/_jsx(DescriptionListItemIcon, {
56
+ children: icon
57
+ }), /*#__PURE__*/_jsxs(OverflowText, _objectSpread(_objectSpread({}, contentTypographyProps), {}, {
58
+ component: "span",
59
+ color: shouldRenderFallback && label == null ? 'textSecondary' : 'textPrimary',
60
+ TooltipProps: _objectSpread(_objectSpread({}, contentTypographyProps === null || contentTypographyProps === void 0 ? void 0 : contentTypographyProps.TooltipProps), {}, {
61
+ title: (_ref3 = (_contentTypographyPro = contentTypographyProps === null || contentTypographyProps === void 0 ? void 0 : (_contentTypographyPro2 = contentTypographyProps.TooltipProps) === null || _contentTypographyPro2 === void 0 ? void 0 : _contentTypographyPro2.title) !== null && _contentTypographyPro !== void 0 ? _contentTypographyPro : content) !== null && _ref3 !== void 0 ? _ref3 : undefined
62
+ }),
63
+ children: [label != null && /*#__PURE__*/_jsx(Typography, _objectSpread(_objectSpread({}, labelTypographyProps), {}, {
64
+ id: labelID,
65
+ variant: "body2",
66
+ component: "span",
67
+ color: "textSecondary",
68
+ children: label
69
+ })), label != null && ' ', !shouldRenderFallback ? content : fallback]
70
+ }))]
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, ", & > ").concat(DescriptionListItemRoot)]: {
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
+ }));
113
+ });
114
+ if (process.env.NODE_ENV !== "production") DescriptionList.displayName = "DescriptionList";
@@ -0,0 +1,43 @@
1
+ import { dialogClasses } from '@mui/material';
2
+ export function overrideDialog(theme) {
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
+ }
14
+ }
15
+ }
16
+ }
17
+ };
18
+ theme.components.MuiDialogTitle = {
19
+ defaultProps: {
20
+ // @ts-expect-error DialogTitleProps has missing type def
21
+ variant: 'h3'
22
+ }
23
+ };
24
+ theme.components.MuiDialogContent = {
25
+ styleOverrides: {
26
+ root: {
27
+ padding: theme.spacing(0, 3)
28
+ }
29
+ }
30
+ };
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
+ }
40
+ }
41
+ }
42
+ };
43
+ }
@@ -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";