@carto/meridian-ds 2.5.5 → 2.6.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.
- package/CHANGELOG.md +7 -0
- package/dist/{Alert-lLA0z7fX.js → Alert-DHd9hCGz.js} +20 -77
- package/dist/{Alert-BdmDjcVc.cjs → Alert-DOeOwxOe.cjs} +22 -79
- package/dist/{MenuItem-nokUtiks.cjs → MenuItem-CYJN2OVU.cjs} +6 -6
- package/dist/{MenuItem-ZNdBUBvt.js → MenuItem-MUmADf3e.js} +1 -1
- package/dist/components/index.cjs +309 -112
- package/dist/components/index.js +249 -52
- package/dist/{TablePaginationActions-DAMGtIub.cjs → css-utils-CCi3p7os.cjs} +123 -55
- package/dist/{TablePaginationActions-C6TVGJM-.js → css-utils-WejOmkiI.js} +126 -58
- package/dist/theme/index.cjs +108 -114
- package/dist/theme/index.js +7 -13
- package/dist/types/components/AccordionGroup/AccordionGroup.d.ts +4 -1
- package/dist/types/components/AccordionGroup/AccordionGroup.d.ts.map +1 -1
- package/dist/types/components/AccordionGroup/AccordionGroup.stories.d.ts +39 -9
- package/dist/types/components/AccordionGroup/AccordionGroup.stories.d.ts.map +1 -1
- package/dist/types/components/AccordionGroup/AccordionGroup.test.d.ts +2 -0
- package/dist/types/components/AccordionGroup/AccordionGroup.test.d.ts.map +1 -0
- package/dist/types/components/AppBar/AppBar.d.ts +3 -1
- package/dist/types/components/AppBar/AppBar.d.ts.map +1 -1
- package/dist/types/components/AppBar/AppBar.stories.d.ts +2 -2
- package/dist/types/components/AppBar/AppBar.stories.d.ts.map +1 -1
- package/dist/types/components/AppBar/AppBar.test.d.ts +2 -0
- package/dist/types/components/AppBar/AppBar.test.d.ts.map +1 -0
- package/dist/types/components/Avatar/Avatar.d.ts +4 -1
- package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/components/Avatar/Avatar.stories.d.ts +1 -2
- package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/types/components/Avatar/Avatar.test.d.ts +2 -0
- package/dist/types/components/Avatar/Avatar.test.d.ts.map +1 -0
- package/dist/types/components/Button/Button.d.ts +5 -0
- package/dist/types/components/Button/Button.d.ts.map +1 -1
- package/dist/types/components/Button/Button.stories.d.ts +3 -0
- package/dist/types/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +117 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts.map +1 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts +66 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts.map +1 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts +2 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts.map +1 -0
- package/dist/types/components/EllipsisWithTooltip/index.d.ts +3 -0
- package/dist/types/components/EllipsisWithTooltip/index.d.ts.map +1 -0
- package/dist/types/components/Link/Link.d.ts +5 -0
- package/dist/types/components/Link/Link.d.ts.map +1 -1
- package/dist/types/components/Link/Link.stories.d.ts +9 -27
- package/dist/types/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts +5 -2
- package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts.map +1 -1
- package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts +72 -0
- package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts.map +1 -0
- package/dist/types/components/TablePaginationActions/TablePaginationActions.test.d.ts +2 -0
- package/dist/types/components/TablePaginationActions/TablePaginationActions.test.d.ts.map +1 -0
- package/dist/types/components/Tag/Tag.d.ts +176 -4
- package/dist/types/components/Tag/Tag.d.ts.map +1 -1
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -2
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +2 -2
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts.map +1 -1
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts +2 -0
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts.map +1 -0
- package/dist/types/components/TooltipData/TooltipData.d.ts.map +1 -1
- package/dist/types/components/TooltipData/TooltipData.stories.d.ts +34 -0
- package/dist/types/components/TooltipData/TooltipData.stories.d.ts.map +1 -0
- package/dist/types/components/TooltipData/TooltipData.test.d.ts +2 -0
- package/dist/types/components/TooltipData/TooltipData.test.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/theme/components/forms.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Tooltip.stories.d.ts +0 -3
- package/dist/types/theme/components/stories/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/utils/css-utils.d.ts +14 -0
- package/dist/types/utils/css-utils.d.ts.map +1 -0
- package/dist/types/utils/useTranslationFallback.d.ts +20 -0
- package/dist/types/utils/useTranslationFallback.d.ts.map +1 -0
- package/dist/types/utils/useTranslationFallback.test.d.ts +2 -0
- package/dist/types/utils/useTranslationFallback.test.d.ts.map +1 -0
- package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts.map +1 -1
- package/dist/widgets/index.cjs +114 -119
- package/dist/widgets/index.js +4 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## 2.0
|
|
6
6
|
|
|
7
|
+
### 2.6.0
|
|
8
|
+
|
|
9
|
+
- New EllipsisWithTooltip component [#299](https://github.com/CartoDB/meridian-ds/pull/299)
|
|
10
|
+
- Improve translations handling with `useTranslationFallback` hook [#293](https://github.com/CartoDB/meridian-ds/pull/293)
|
|
11
|
+
- Add unit tests for data display components [#292](https://github.com/CartoDB/meridian-ds/pull/292)
|
|
12
|
+
- Add unit tests for action components [#290](https://github.com/CartoDB/meridian-ds/pull/290)
|
|
13
|
+
|
|
7
14
|
### 2.5.5
|
|
8
15
|
|
|
9
16
|
- Utils files: rename to kebab-case for better naming convention [#291](https://github.com/CartoDB/meridian-ds/pull/291)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useState } from "react";
|
|
3
|
-
import { styled,
|
|
4
|
-
import { useIntl } from "react-intl";
|
|
3
|
+
import { styled, Link as Link$1, Alert as Alert$1, Fade, AlertTitle } from "@mui/material";
|
|
5
4
|
import { OpenInNewOutlined } from "@mui/icons-material";
|
|
6
|
-
import { c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, I as ICON_SIZE_LARGE, u as useImperativeIntl, T as Typography } from "./TablePaginationActions-C6TVGJM-.js";
|
|
7
5
|
import "cartocolor";
|
|
6
|
+
import { u as useImperativeIntl, c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, T as Typography } from "./css-utils-WejOmkiI.js";
|
|
7
|
+
import { useIntl } from "react-intl";
|
|
8
8
|
const ScreenReaderOnly = styled("span")(() => ({
|
|
9
9
|
position: "absolute",
|
|
10
10
|
width: 1,
|
|
@@ -16,64 +16,14 @@ const ScreenReaderOnly = styled("span")(() => ({
|
|
|
16
16
|
whiteSpace: "nowrap",
|
|
17
17
|
border: 0
|
|
18
18
|
}));
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"& + &, & + .optionIconButton": {
|
|
25
|
-
marginLeft: theme.spacing(0.5)
|
|
26
|
-
}
|
|
27
|
-
}));
|
|
28
|
-
const StyledIconButton = styled(IconButton$1, {
|
|
29
|
-
shouldForwardProp: (prop) => !["active"].includes(prop)
|
|
30
|
-
})(({ active, theme }) => ({
|
|
31
|
-
...active && {
|
|
32
|
-
color: theme.palette.primary.main,
|
|
33
|
-
backgroundColor: theme.palette.primary.background,
|
|
34
|
-
"& svg:not(.doNotFillIcon) path": {
|
|
35
|
-
fill: theme.palette.primary.main
|
|
36
|
-
}
|
|
19
|
+
function useTranslationFallback(translationKey, customText) {
|
|
20
|
+
const intl = useIntl();
|
|
21
|
+
const intlConfig = useImperativeIntl(intl);
|
|
22
|
+
if (customText !== void 0 && customText !== null) {
|
|
23
|
+
return customText;
|
|
37
24
|
}
|
|
38
|
-
})
|
|
39
|
-
function _IconButton({
|
|
40
|
-
tooltip,
|
|
41
|
-
tooltipPlacement = "top",
|
|
42
|
-
icon,
|
|
43
|
-
size = "medium",
|
|
44
|
-
variant = "icon",
|
|
45
|
-
color = "default",
|
|
46
|
-
sx,
|
|
47
|
-
className,
|
|
48
|
-
loading,
|
|
49
|
-
disabled,
|
|
50
|
-
active,
|
|
51
|
-
...props
|
|
52
|
-
}, ref) {
|
|
53
|
-
return /* @__PURE__ */ jsx(Tooltip, { placement: tooltipPlacement, title: tooltip ?? "", children: /* @__PURE__ */ jsx(
|
|
54
|
-
Option,
|
|
55
|
-
{
|
|
56
|
-
className: `optionIconButton ${className ?? ""}`,
|
|
57
|
-
sx,
|
|
58
|
-
"data-testid": "icon-button",
|
|
59
|
-
children: /* @__PURE__ */ jsx(
|
|
60
|
-
StyledIconButton,
|
|
61
|
-
{
|
|
62
|
-
...props,
|
|
63
|
-
ref,
|
|
64
|
-
size,
|
|
65
|
-
variant,
|
|
66
|
-
color,
|
|
67
|
-
active,
|
|
68
|
-
disabled: disabled || loading,
|
|
69
|
-
role: "button",
|
|
70
|
-
children: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" }) : icon
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
) });
|
|
25
|
+
return intlConfig.formatMessage({ id: translationKey });
|
|
75
26
|
}
|
|
76
|
-
const IconButton = forwardRef(_IconButton);
|
|
77
27
|
const StyledLink = styled(Link$1)(() => ({
|
|
78
28
|
display: "inline-block"
|
|
79
29
|
}));
|
|
@@ -107,21 +57,13 @@ const Icon = styled("span", {
|
|
|
107
57
|
fontSize: ICON_SIZE_SMALL
|
|
108
58
|
}
|
|
109
59
|
},
|
|
110
|
-
// Button and
|
|
111
|
-
...(variant === "button" || variant === "body2") && {
|
|
60
|
+
// Button, body2 and body1 variants use medium-sized icons
|
|
61
|
+
...(variant === "button" || variant === "body2" || variant === "body1") && {
|
|
112
62
|
top: "calc(1em * 1/4)",
|
|
113
63
|
// 25% offset ratio
|
|
114
64
|
svg: {
|
|
115
65
|
fontSize: ICON_SIZE_MEDIUM
|
|
116
66
|
}
|
|
117
|
-
},
|
|
118
|
-
// Body1 variant uses large icons
|
|
119
|
-
...variant === "body1" && {
|
|
120
|
-
top: "calc(1em * 1/3)",
|
|
121
|
-
// 33% offset ratio
|
|
122
|
-
svg: {
|
|
123
|
-
fontSize: ICON_SIZE_LARGE
|
|
124
|
-
}
|
|
125
67
|
}
|
|
126
68
|
})
|
|
127
69
|
);
|
|
@@ -133,14 +75,17 @@ function _Link({
|
|
|
133
75
|
color,
|
|
134
76
|
external,
|
|
135
77
|
showExternalIcon = true,
|
|
78
|
+
screenReaderText,
|
|
136
79
|
fontWeight = 500,
|
|
137
80
|
target,
|
|
138
81
|
rel,
|
|
139
82
|
"aria-describedby": ariaDescribedby,
|
|
140
83
|
...otherProps
|
|
141
84
|
}, ref) {
|
|
142
|
-
const
|
|
143
|
-
|
|
85
|
+
const screenReaderTextValue = useTranslationFallback(
|
|
86
|
+
"c4r.button.opensInNewTab",
|
|
87
|
+
screenReaderText
|
|
88
|
+
);
|
|
144
89
|
const isButtonLink = otherProps.component === "button";
|
|
145
90
|
return /* @__PURE__ */ jsxs(
|
|
146
91
|
StyledLink,
|
|
@@ -160,9 +105,7 @@ function _Link({
|
|
|
160
105
|
startIcon && /* @__PURE__ */ jsx(Icon, { variant, iconPosition: "left", children: startIcon }),
|
|
161
106
|
children,
|
|
162
107
|
(endIcon || external && showExternalIcon) && /* @__PURE__ */ jsx(Icon, { variant, iconPosition: "right", children: endIcon || /* @__PURE__ */ jsx(OpenInNewOutlined, {}) }),
|
|
163
|
-
external && /* @__PURE__ */ jsx(ScreenReaderOnly, { id: "external-hint", children:
|
|
164
|
-
id: "c4r.button.opensInNewTab"
|
|
165
|
-
})})` })
|
|
108
|
+
external && /* @__PURE__ */ jsx(ScreenReaderOnly, { id: "external-hint", children: screenReaderTextValue })
|
|
166
109
|
]
|
|
167
110
|
}
|
|
168
111
|
);
|
|
@@ -297,7 +240,7 @@ function _Alert({
|
|
|
297
240
|
const Alert = forwardRef(_Alert);
|
|
298
241
|
export {
|
|
299
242
|
Alert as A,
|
|
300
|
-
IconButton as I,
|
|
301
243
|
Link as L,
|
|
302
|
-
ScreenReaderOnly as S
|
|
244
|
+
ScreenReaderOnly as S,
|
|
245
|
+
useTranslationFallback as u
|
|
303
246
|
};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const React = require("react");
|
|
4
4
|
const material = require("@mui/material");
|
|
5
|
-
const reactIntl = require("react-intl");
|
|
6
5
|
const iconsMaterial = require("@mui/icons-material");
|
|
7
|
-
const TablePaginationActions = require("./TablePaginationActions-DAMGtIub.cjs");
|
|
8
6
|
require("cartocolor");
|
|
7
|
+
const cssUtils = require("./css-utils-CCi3p7os.cjs");
|
|
8
|
+
const reactIntl = require("react-intl");
|
|
9
9
|
const ScreenReaderOnly = material.styled("span")(() => ({
|
|
10
10
|
position: "absolute",
|
|
11
11
|
width: 1,
|
|
@@ -17,64 +17,14 @@ const ScreenReaderOnly = material.styled("span")(() => ({
|
|
|
17
17
|
whiteSpace: "nowrap",
|
|
18
18
|
border: 0
|
|
19
19
|
}));
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"& + &, & + .optionIconButton": {
|
|
26
|
-
marginLeft: theme.spacing(0.5)
|
|
27
|
-
}
|
|
28
|
-
}));
|
|
29
|
-
const StyledIconButton = material.styled(material.IconButton, {
|
|
30
|
-
shouldForwardProp: (prop) => !["active"].includes(prop)
|
|
31
|
-
})(({ active, theme }) => ({
|
|
32
|
-
...active && {
|
|
33
|
-
color: theme.palette.primary.main,
|
|
34
|
-
backgroundColor: theme.palette.primary.background,
|
|
35
|
-
"& svg:not(.doNotFillIcon) path": {
|
|
36
|
-
fill: theme.palette.primary.main
|
|
37
|
-
}
|
|
20
|
+
function useTranslationFallback(translationKey, customText) {
|
|
21
|
+
const intl = reactIntl.useIntl();
|
|
22
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
23
|
+
if (customText !== void 0 && customText !== null) {
|
|
24
|
+
return customText;
|
|
38
25
|
}
|
|
39
|
-
})
|
|
40
|
-
function _IconButton({
|
|
41
|
-
tooltip,
|
|
42
|
-
tooltipPlacement = "top",
|
|
43
|
-
icon,
|
|
44
|
-
size = "medium",
|
|
45
|
-
variant = "icon",
|
|
46
|
-
color = "default",
|
|
47
|
-
sx,
|
|
48
|
-
className,
|
|
49
|
-
loading,
|
|
50
|
-
disabled,
|
|
51
|
-
active,
|
|
52
|
-
...props
|
|
53
|
-
}, ref) {
|
|
54
|
-
return /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { placement: tooltipPlacement, title: tooltip ?? "", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
-
Option,
|
|
56
|
-
{
|
|
57
|
-
className: `optionIconButton ${className ?? ""}`,
|
|
58
|
-
sx,
|
|
59
|
-
"data-testid": "icon-button",
|
|
60
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
61
|
-
StyledIconButton,
|
|
62
|
-
{
|
|
63
|
-
...props,
|
|
64
|
-
ref,
|
|
65
|
-
size,
|
|
66
|
-
variant,
|
|
67
|
-
color,
|
|
68
|
-
active,
|
|
69
|
-
disabled: disabled || loading,
|
|
70
|
-
role: "button",
|
|
71
|
-
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : icon
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
) });
|
|
26
|
+
return intlConfig.formatMessage({ id: translationKey });
|
|
76
27
|
}
|
|
77
|
-
const IconButton = React.forwardRef(_IconButton);
|
|
78
28
|
const StyledLink = material.styled(material.Link)(() => ({
|
|
79
29
|
display: "inline-block"
|
|
80
30
|
}));
|
|
@@ -94,7 +44,7 @@ const Icon = material.styled("span", {
|
|
|
94
44
|
},
|
|
95
45
|
svg: {
|
|
96
46
|
// Size adapts to the text size, but make sure the icon size is at least 12px
|
|
97
|
-
fontSize: `max(1em, ${
|
|
47
|
+
fontSize: `max(1em, ${cssUtils.ICON_SIZE_SMALL})`,
|
|
98
48
|
color: "inherit !important",
|
|
99
49
|
"> path": {
|
|
100
50
|
color: "inherit !important"
|
|
@@ -105,23 +55,15 @@ const Icon = material.styled("span", {
|
|
|
105
55
|
top: "calc(1em * 1/5)",
|
|
106
56
|
// 20% offset ratio
|
|
107
57
|
svg: {
|
|
108
|
-
fontSize:
|
|
58
|
+
fontSize: cssUtils.ICON_SIZE_SMALL
|
|
109
59
|
}
|
|
110
60
|
},
|
|
111
|
-
// Button and
|
|
112
|
-
...(variant === "button" || variant === "body2") && {
|
|
61
|
+
// Button, body2 and body1 variants use medium-sized icons
|
|
62
|
+
...(variant === "button" || variant === "body2" || variant === "body1") && {
|
|
113
63
|
top: "calc(1em * 1/4)",
|
|
114
64
|
// 25% offset ratio
|
|
115
65
|
svg: {
|
|
116
|
-
fontSize:
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
// Body1 variant uses large icons
|
|
120
|
-
...variant === "body1" && {
|
|
121
|
-
top: "calc(1em * 1/3)",
|
|
122
|
-
// 33% offset ratio
|
|
123
|
-
svg: {
|
|
124
|
-
fontSize: TablePaginationActions.ICON_SIZE_LARGE
|
|
66
|
+
fontSize: cssUtils.ICON_SIZE_MEDIUM
|
|
125
67
|
}
|
|
126
68
|
}
|
|
127
69
|
})
|
|
@@ -134,14 +76,17 @@ function _Link({
|
|
|
134
76
|
color,
|
|
135
77
|
external,
|
|
136
78
|
showExternalIcon = true,
|
|
79
|
+
screenReaderText,
|
|
137
80
|
fontWeight = 500,
|
|
138
81
|
target,
|
|
139
82
|
rel,
|
|
140
83
|
"aria-describedby": ariaDescribedby,
|
|
141
84
|
...otherProps
|
|
142
85
|
}, ref) {
|
|
143
|
-
const
|
|
144
|
-
|
|
86
|
+
const screenReaderTextValue = useTranslationFallback(
|
|
87
|
+
"c4r.button.opensInNewTab",
|
|
88
|
+
screenReaderText
|
|
89
|
+
);
|
|
145
90
|
const isButtonLink = otherProps.component === "button";
|
|
146
91
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
147
92
|
StyledLink,
|
|
@@ -161,9 +106,7 @@ function _Link({
|
|
|
161
106
|
startIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { variant, iconPosition: "left", children: startIcon }),
|
|
162
107
|
children,
|
|
163
108
|
(endIcon || external && showExternalIcon) && /* @__PURE__ */ jsxRuntime.jsx(Icon, { variant, iconPosition: "right", children: endIcon || /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.OpenInNewOutlined, {}) }),
|
|
164
|
-
external && /* @__PURE__ */ jsxRuntime.jsx(ScreenReaderOnly, { id: "external-hint", children:
|
|
165
|
-
id: "c4r.button.opensInNewTab"
|
|
166
|
-
})})` })
|
|
109
|
+
external && /* @__PURE__ */ jsxRuntime.jsx(ScreenReaderOnly, { id: "external-hint", children: screenReaderTextValue })
|
|
167
110
|
]
|
|
168
111
|
}
|
|
169
112
|
);
|
|
@@ -196,7 +139,7 @@ const StyledAlert = material.styled(material.Alert, {
|
|
|
196
139
|
"icon message"
|
|
197
140
|
"icon actions"
|
|
198
141
|
`,
|
|
199
|
-
gridTemplateColumns: hasCloseButton ? `${
|
|
142
|
+
gridTemplateColumns: hasCloseButton ? `${cssUtils.ICON_SIZE_MEDIUM} 1fr ${theme.spacing(3)}` : `${cssUtils.ICON_SIZE_MEDIUM}`
|
|
200
143
|
},
|
|
201
144
|
...isNeutral && {
|
|
202
145
|
backgroundColor: theme.palette.default.background,
|
|
@@ -290,13 +233,13 @@ function _Alert({
|
|
|
290
233
|
...otherProps,
|
|
291
234
|
children: [
|
|
292
235
|
title && /* @__PURE__ */ jsxRuntime.jsx(material.AlertTitle, { children: title }),
|
|
293
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
236
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", color: "inherit", component: "div", children })
|
|
294
237
|
]
|
|
295
238
|
}
|
|
296
239
|
) });
|
|
297
240
|
}
|
|
298
241
|
const Alert = React.forwardRef(_Alert);
|
|
299
242
|
exports.Alert = Alert;
|
|
300
|
-
exports.IconButton = IconButton;
|
|
301
243
|
exports.Link = Link;
|
|
302
244
|
exports.ScreenReaderOnly = ScreenReaderOnly;
|
|
245
|
+
exports.useTranslationFallback = useTranslationFallback;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const React = require("react");
|
|
4
4
|
const material = require("@mui/material");
|
|
5
|
-
const
|
|
5
|
+
const cssUtils = require("./css-utils-CCi3p7os.cjs");
|
|
6
6
|
const StyledMenuItem = material.styled(material.MenuItem, {
|
|
7
7
|
shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
|
|
8
8
|
prop
|
|
@@ -29,7 +29,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
|
|
|
29
29
|
color: theme.palette.text.secondary
|
|
30
30
|
},
|
|
31
31
|
"&.MuiMenuItem-root": {
|
|
32
|
-
minHeight:
|
|
32
|
+
minHeight: cssUtils.MENU_ITEM_SIZE_DENSE,
|
|
33
33
|
paddingTop: 0,
|
|
34
34
|
paddingBottom: 0,
|
|
35
35
|
marginTop: theme.spacing(1),
|
|
@@ -96,7 +96,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
|
|
|
96
96
|
},
|
|
97
97
|
...extended && {
|
|
98
98
|
"&.MuiButtonBase-root.MuiMenuItem-root": {
|
|
99
|
-
minHeight:
|
|
99
|
+
minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
...fixed && {
|
|
@@ -107,14 +107,14 @@ const StyledMenuItem = material.styled(material.MenuItem, {
|
|
|
107
107
|
bottom: 0,
|
|
108
108
|
right: 0,
|
|
109
109
|
zIndex: 2,
|
|
110
|
-
minHeight:
|
|
110
|
+
minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED,
|
|
111
111
|
marginBottom: theme.spacing(1),
|
|
112
112
|
padding: theme.spacing(0.5, 1.5),
|
|
113
113
|
backgroundColor: `${theme.palette.background.paper} !important`,
|
|
114
114
|
borderBottom: `1px solid ${theme.palette.divider}`
|
|
115
115
|
},
|
|
116
116
|
".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type": {
|
|
117
|
-
minHeight:
|
|
117
|
+
minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED,
|
|
118
118
|
marginTop: 0,
|
|
119
119
|
"&:hover": {
|
|
120
120
|
backgroundColor: theme.palette.background.paper
|
|
@@ -128,7 +128,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
|
|
|
128
128
|
},
|
|
129
129
|
...dense && {
|
|
130
130
|
"&.MuiButtonBase-root.MuiMenuItem-root": {
|
|
131
|
-
minHeight:
|
|
131
|
+
minHeight: cssUtils.MENU_ITEM_SIZE_DENSE,
|
|
132
132
|
padding: theme.spacing(0.25, 1.5)
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { styled, MenuItem as MenuItem$1 } from "@mui/material";
|
|
4
|
-
import {
|
|
4
|
+
import { f as MENU_ITEM_SIZE_DENSE, h as MENU_ITEM_SIZE_EXTENDED } from "./css-utils-WejOmkiI.js";
|
|
5
5
|
const StyledMenuItem = styled(MenuItem$1, {
|
|
6
6
|
shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
|
|
7
7
|
prop
|