@carto/meridian-ds 4.3.0 → 4.3.1-alpha.39d32aa.313
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 +3 -0
- package/dist/{TablePaginationActions-BUlirVpH.cjs → TablePaginationActions-BLijipor.cjs} +5 -3
- package/dist/{TablePaginationActions-DZWE9NVG.js → TablePaginationActions-DGKthtrC.js} +5 -3
- package/dist/components/index.cjs +162 -100
- package/dist/components/index.js +164 -102
- package/dist/fonts/inter/Inter-Medium.woff2 +0 -0
- package/dist/fonts/inter/Inter-Regular.woff2 +0 -0
- package/dist/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/dist/fonts/overpass-mono/OverpassMono-Regular.woff2 +0 -0
- package/dist/fonts/overpass-mono/OverpassMono-SemiBold.woff2 +0 -0
- package/dist/icons-screenshot.webp +0 -0
- package/dist/metadata.json +148 -148
- package/dist/palette-utils-Ccd-r_Nr.js +357 -0
- package/dist/palette-utils-Dt4yj7Pv.cjs +373 -0
- package/dist/theme/index.cjs +39 -5
- package/dist/theme/index.js +40 -6
- package/dist/types/components/Autocomplete/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/types/components/Autocomplete/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/Autocomplete/Autocomplete.metadata.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/Autocomplete/Autocomplete.stories.d.ts +1 -1
- package/dist/types/components/Autocomplete/Autocomplete/Autocomplete.stories.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/AutocompleteList/AutocompleteList.d.ts +1 -1
- package/dist/types/components/Autocomplete/AutocompleteList/AutocompleteList.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/CreatableAutocomplete/CreatableAutocomplete.d.ts +1 -1
- package/dist/types/components/Autocomplete/CreatableAutocomplete/CreatableAutocomplete.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/CreatableAutocomplete/CreatableAutocomplete.stories.d.ts +1 -1
- package/dist/types/components/Autocomplete/CreatableAutocomplete/CreatableAutocomplete.stories.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/MultipleAutocomplete/MultipleAutocomplete.d.ts +1 -1
- package/dist/types/components/Autocomplete/MultipleAutocomplete/MultipleAutocomplete.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/MultipleAutocomplete/MultipleAutocomplete.stories.d.ts +1 -1
- package/dist/types/components/Autocomplete/MultipleAutocomplete/MultipleAutocomplete.stories.d.ts.map +1 -1
- package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/types/components/Button/Button.d.ts +3 -4
- package/dist/types/components/Button/Button.d.ts.map +1 -1
- package/dist/types/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/types/components/CodeArea/CodeAreaDialog/CodeAreaDialog.stories.d.ts.map +1 -1
- package/dist/types/components/CodeArea/CodeAreaField/CodeAreaField.stories.d.ts.map +1 -1
- package/dist/types/components/CopiableInputText/CopiableInputText.d.ts +2 -2
- package/dist/types/components/CopiableInputText/CopiableInputText.stories.d.ts +2 -2
- package/dist/types/components/CopiableInputText/CopiableInputText.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DateRangeCalendar/DateRangeCalendar.stories.d.ts +3 -0
- package/dist/types/components/DatePickers/DateRangeCalendar/DateRangeCalendar.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DateTimePicker/DateTimePicker.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/TimePicker/TimePicker.stories.d.ts.map +1 -1
- package/dist/types/components/Dialog/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts +9 -9
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts.map +1 -1
- package/dist/types/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/types/components/IconButton/IconButton.stories.d.ts.map +1 -1
- package/dist/types/components/IconWrapper/IconWrapper.stories.d.ts.map +1 -1
- package/dist/types/components/LabelWithIndicator/LabelWithIndicator.stories.d.ts.map +1 -1
- package/dist/types/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/components/List/ListItem/ListItem.stories.d.ts.map +1 -1
- package/dist/types/components/MessageField/MessageField.stories.d.ts.map +1 -1
- package/dist/types/components/MessageField/MessageField.styled.d.ts +1 -1
- package/dist/types/components/PasswordField/PasswordField.d.ts +2 -2
- package/dist/types/components/PasswordField/PasswordField.d.ts.map +1 -1
- package/dist/types/components/PasswordField/PasswordField.stories.d.ts +2 -2
- package/dist/types/components/PasswordField/PasswordField.stories.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.stories.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.styled.d.ts +2 -2
- package/dist/types/components/SelectField/MultipleSelectField/MultipleSelectField.d.ts.map +1 -1
- package/dist/types/components/SelectField/MultipleSelectField/MultipleSelectField.stories.d.ts.map +1 -1
- package/dist/types/components/SelectField/SelectField/SelectField.stories.d.ts.map +1 -1
- package/dist/types/components/SplitButton/SplitButton.stories.d.ts.map +1 -1
- package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts.map +1 -1
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts.map +1 -1
- package/dist/types/components/UploadField/UploadField.stories.d.ts.map +1 -1
- package/dist/types/components/UploadField/UploadField.styled.d.ts +1 -1
- package/dist/types/theme/base-theme-options.d.ts +2 -1764
- package/dist/types/theme/base-theme-options.d.ts.map +1 -1
- package/dist/types/theme/carto-theme.d.ts +2 -4258
- package/dist/types/theme/carto-theme.d.ts.map +1 -1
- package/dist/types/theme/components/buttons.d.ts.map +1 -1
- package/dist/types/theme/components/data-display.d.ts.map +1 -1
- package/dist/types/theme/components/forms.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Checkbox.stories.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Chip.stories.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Divider.stories.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Paper.stories.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Radio.stories.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Slider.stories.d.ts +1 -1
- package/dist/types/theme/components/stories/Switch.stories.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Tabs.stories.d.ts.map +1 -1
- package/dist/types/theme/components/stories/TextArea.stories.d.ts.map +1 -1
- package/dist/types/theme/components/stories/TextField.stories.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/theme/css-baseline.d.ts +2 -904
- package/dist/types/theme/css-baseline.d.ts.map +1 -1
- package/dist/types/theme/tokens/LayoutTokens.stories.d.ts.map +1 -1
- package/dist/types/theme/tokens/typography.d.ts +2 -1705
- package/dist/types/theme/tokens/typography.d.ts.map +1 -1
- package/dist/types/theme/types.d.ts +13 -8
- package/dist/types/theme/types.d.ts.map +1 -1
- package/dist/types/utils/slot-props-utils.d.ts +13 -0
- package/dist/types/utils/slot-props-utils.d.ts.map +1 -0
- package/dist/types/widgets/SkeletonWidgets.d.ts +4 -4
- package/dist/types/widgets/legend/LegendWidgetUI.styles.d.ts +2 -2
- package/dist/types/widgets/legend/legend-types/LegendProportion.d.ts.map +1 -1
- package/dist/widgets/index.cjs +5 -13
- package/dist/widgets/index.js +5 -13
- package/package.json +36 -32
- package/dist/palette-utils-DX1R_i9N.cjs +0 -1138
- package/dist/palette-utils-d-9NY8qw.js +0 -1122
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- chore(deps): MUI v5 → v9 upgrade (integration branch) [sc-557186] [#485](https://github.com/CartoDB/meridian-ds/pull/485)
|
|
6
|
+
- chore(deps): upgrade MUI core to v6 + prep peers/react-is [sc-563129] [#484](https://github.com/CartoDB/meridian-ds/pull/484)
|
|
7
|
+
|
|
5
8
|
## 4.0
|
|
6
9
|
|
|
7
10
|
### 4.3.0
|
|
@@ -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 paletteUtils = require("./palette-utils-
|
|
5
|
+
const paletteUtils = require("./palette-utils-Dt4yj7Pv.cjs");
|
|
6
6
|
const iconsMaterial = require("@mui/icons-material");
|
|
7
7
|
const reactIntl = require("react-intl");
|
|
8
8
|
const useImperativeIntl = require("./useImperativeIntl-v_ds_FH7.cjs");
|
|
@@ -249,10 +249,12 @@ function _IconButton({
|
|
|
249
249
|
variant,
|
|
250
250
|
color,
|
|
251
251
|
active,
|
|
252
|
-
|
|
252
|
+
loading,
|
|
253
|
+
loadingIndicator: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }),
|
|
254
|
+
disabled,
|
|
253
255
|
role: "button",
|
|
254
256
|
"aria-label": ariaLabel,
|
|
255
|
-
children: loading ?
|
|
257
|
+
children: loading ? null : icon
|
|
256
258
|
}
|
|
257
259
|
)
|
|
258
260
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { styled, MenuItem as MenuItem$1, Tooltip, CircularProgress, IconButton as IconButton$1, Box } from "@mui/material";
|
|
4
|
-
import { d as MENU_ITEM_SIZE_DENSE, M as MENU_ITEM_SIZE_EXTENDED, e as ICON_SIZE_LARGE, a as ICON_SIZE_MEDIUM, I as ICON_SIZE_SMALL } from "./palette-utils-
|
|
4
|
+
import { d as MENU_ITEM_SIZE_DENSE, M as MENU_ITEM_SIZE_EXTENDED, e as ICON_SIZE_LARGE, a as ICON_SIZE_MEDIUM, I as ICON_SIZE_SMALL } from "./palette-utils-Ccd-r_Nr.js";
|
|
5
5
|
import { KeyboardArrowLeftOutlined, KeyboardArrowRightOutlined } from "@mui/icons-material";
|
|
6
6
|
import { useIntl } from "react-intl";
|
|
7
7
|
import { u as useImperativeIntl } from "./useImperativeIntl-DXeh_Eda.js";
|
|
@@ -248,10 +248,12 @@ function _IconButton({
|
|
|
248
248
|
variant,
|
|
249
249
|
color,
|
|
250
250
|
active,
|
|
251
|
-
|
|
251
|
+
loading,
|
|
252
|
+
loadingIndicator: /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" }),
|
|
253
|
+
disabled,
|
|
252
254
|
role: "button",
|
|
253
255
|
"aria-label": ariaLabel,
|
|
254
|
-
children: loading ?
|
|
256
|
+
children: loading ? null : icon
|
|
255
257
|
}
|
|
256
258
|
)
|
|
257
259
|
}
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const material = require("@mui/material");
|
|
6
|
-
const paletteUtils = require("../palette-utils-
|
|
6
|
+
const paletteUtils = require("../palette-utils-Dt4yj7Pv.cjs");
|
|
7
7
|
const iconsMaterial = require("@mui/icons-material");
|
|
8
8
|
const ArrowDown = require("../ArrowDown-84Oc8r9k.cjs");
|
|
9
9
|
const ReactWindow = require("react-window");
|
|
10
|
-
const TablePaginationActions = require("../TablePaginationActions-
|
|
10
|
+
const TablePaginationActions = require("../TablePaginationActions-BLijipor.cjs");
|
|
11
11
|
const Search = require("../Search-BsaXrSzs.cjs");
|
|
12
12
|
require("cartocolor");
|
|
13
13
|
const reactCodemirror2 = require("react-codemirror2");
|
|
@@ -72,20 +72,7 @@ const ScreenReaderOnly = material.styled("span")(() => ({
|
|
|
72
72
|
whiteSpace: "nowrap",
|
|
73
73
|
border: 0
|
|
74
74
|
}));
|
|
75
|
-
const
|
|
76
|
-
position: "absolute",
|
|
77
|
-
top: 0,
|
|
78
|
-
left: 0,
|
|
79
|
-
right: 0,
|
|
80
|
-
bottom: 0,
|
|
81
|
-
display: "flex",
|
|
82
|
-
alignItems: "center",
|
|
83
|
-
justifyContent: "center"
|
|
84
|
-
});
|
|
85
|
-
const HiddenText = material.styled(material.Box)({
|
|
86
|
-
visibility: "hidden",
|
|
87
|
-
pointerEvents: "none"
|
|
88
|
-
});
|
|
75
|
+
const loadingIndicator = /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" });
|
|
89
76
|
function _Button({
|
|
90
77
|
children,
|
|
91
78
|
loading,
|
|
@@ -103,46 +90,17 @@ function _Button({
|
|
|
103
90
|
"c4r.button.opensInNewTab",
|
|
104
91
|
screenReaderText
|
|
105
92
|
);
|
|
106
|
-
const defaultIconLoader = /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" });
|
|
107
|
-
const isDefaultLoading = loading && loadingPosition === void 0;
|
|
108
93
|
const isExternalLink = otherProps.href && external;
|
|
109
|
-
const
|
|
110
|
-
if (isDefaultLoading) {
|
|
111
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { position: "relative" }, children: [
|
|
112
|
-
/* @__PURE__ */ jsxRuntime.jsx(IndicatorIcon, { children: defaultIconLoader }),
|
|
113
|
-
/* @__PURE__ */ jsxRuntime.jsx(HiddenText, { children })
|
|
114
|
-
] });
|
|
115
|
-
}
|
|
116
|
-
if (isExternalLink) {
|
|
117
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
118
|
-
children,
|
|
119
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScreenReaderOnly, { id: "external-hint", children: screenReaderTextValue })
|
|
120
|
-
] });
|
|
121
|
-
}
|
|
122
|
-
return children;
|
|
123
|
-
};
|
|
124
|
-
const getIconForPosition = (position) => {
|
|
125
|
-
if (isDefaultLoading) {
|
|
126
|
-
return void 0;
|
|
127
|
-
}
|
|
128
|
-
if (loading && loadingPosition !== void 0) {
|
|
129
|
-
if (loadingPosition === position) {
|
|
130
|
-
return defaultIconLoader;
|
|
131
|
-
}
|
|
132
|
-
return void 0;
|
|
133
|
-
}
|
|
134
|
-
if (position === "start") {
|
|
135
|
-
return startIcon;
|
|
136
|
-
} else {
|
|
137
|
-
return endIcon || (isExternalLink && showExternalIcon ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.OpenInNewOutlined, {}) : void 0);
|
|
138
|
-
}
|
|
139
|
-
};
|
|
94
|
+
const isCenterLoading = loading && loadingPosition === void 0;
|
|
140
95
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141
96
|
material.Button,
|
|
142
97
|
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
98
|
+
loading,
|
|
99
|
+
loadingPosition,
|
|
100
|
+
loadingIndicator,
|
|
101
|
+
disabled,
|
|
102
|
+
startIcon: loading ? void 0 : startIcon,
|
|
103
|
+
endIcon: loading ? void 0 : endIcon || (isExternalLink && showExternalIcon ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.OpenInNewOutlined, {}) : void 0),
|
|
146
104
|
...otherProps,
|
|
147
105
|
role: otherProps.href ? "link" : "button",
|
|
148
106
|
...isExternalLink && {
|
|
@@ -151,7 +109,20 @@ function _Button({
|
|
|
151
109
|
},
|
|
152
110
|
ref,
|
|
153
111
|
"aria-describedby": isExternalLink ? "external-hint" : ariaDescribedby,
|
|
154
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
112
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
113
|
+
paletteUtils.Typography,
|
|
114
|
+
{
|
|
115
|
+
variant: "inherit",
|
|
116
|
+
color: "inherit",
|
|
117
|
+
noWrap: true,
|
|
118
|
+
component: "span",
|
|
119
|
+
sx: isCenterLoading ? { visibility: "hidden" } : void 0,
|
|
120
|
+
children: [
|
|
121
|
+
children,
|
|
122
|
+
isExternalLink && /* @__PURE__ */ jsxRuntime.jsx(ScreenReaderOnly, { id: "external-hint", children: screenReaderTextValue })
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
)
|
|
155
126
|
}
|
|
156
127
|
);
|
|
157
128
|
}
|
|
@@ -361,6 +332,7 @@ function _PasswordField({
|
|
|
361
332
|
disabled,
|
|
362
333
|
showPasswordText,
|
|
363
334
|
hidePasswordText,
|
|
335
|
+
slotProps,
|
|
364
336
|
...otherProps
|
|
365
337
|
}, ref) {
|
|
366
338
|
const showPasswordLabel = TablePaginationActions.useTranslationWithFallback(
|
|
@@ -374,6 +346,36 @@ function _PasswordField({
|
|
|
374
346
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
375
347
|
const handleClickShowPassword = () => setShowPassword(!showPassword);
|
|
376
348
|
const label = showPassword ? hidePasswordLabel : showPasswordLabel;
|
|
349
|
+
const htmlInputSlotProps = typeof (slotProps == null ? void 0 : slotProps.htmlInput) === "function" ? void 0 : slotProps == null ? void 0 : slotProps.htmlInput;
|
|
350
|
+
const buildInputSlotProps = (consumerProps) => ({
|
|
351
|
+
...InputProps,
|
|
352
|
+
...consumerProps,
|
|
353
|
+
inputProps: {
|
|
354
|
+
...InputProps == null ? void 0 : InputProps.inputProps,
|
|
355
|
+
...htmlInputSlotProps,
|
|
356
|
+
...consumerProps == null ? void 0 : consumerProps.inputProps,
|
|
357
|
+
role: "textbox"
|
|
358
|
+
},
|
|
359
|
+
endAdornment: /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
360
|
+
TablePaginationActions.IconButton,
|
|
361
|
+
{
|
|
362
|
+
size,
|
|
363
|
+
disabled,
|
|
364
|
+
onClick: handleClickShowPassword,
|
|
365
|
+
icon: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOffOutlined, {}) : /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOutlined, {}),
|
|
366
|
+
tooltip: label,
|
|
367
|
+
"aria-label": label
|
|
368
|
+
}
|
|
369
|
+
) })
|
|
370
|
+
});
|
|
371
|
+
const consumerInputSlotProps = slotProps == null ? void 0 : slotProps.input;
|
|
372
|
+
const inputSlotProps = typeof consumerInputSlotProps === "function" ? (ownerState) => buildInputSlotProps(
|
|
373
|
+
consumerInputSlotProps(
|
|
374
|
+
ownerState
|
|
375
|
+
)
|
|
376
|
+
) : buildInputSlotProps(
|
|
377
|
+
consumerInputSlotProps
|
|
378
|
+
);
|
|
377
379
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
378
380
|
material.TextField,
|
|
379
381
|
{
|
|
@@ -382,25 +384,11 @@ function _PasswordField({
|
|
|
382
384
|
type: showPassword ? "text" : "password",
|
|
383
385
|
size,
|
|
384
386
|
disabled,
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
},
|
|
391
|
-
endAdornment: /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
392
|
-
TablePaginationActions.IconButton,
|
|
393
|
-
{
|
|
394
|
-
size,
|
|
395
|
-
disabled,
|
|
396
|
-
onClick: handleClickShowPassword,
|
|
397
|
-
icon: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOffOutlined, {}) : /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOutlined, {}),
|
|
398
|
-
tooltip: label,
|
|
399
|
-
"aria-label": label
|
|
400
|
-
}
|
|
401
|
-
) })
|
|
402
|
-
},
|
|
403
|
-
"data-name": "password-field"
|
|
387
|
+
"data-name": "password-field",
|
|
388
|
+
slotProps: {
|
|
389
|
+
...slotProps,
|
|
390
|
+
input: inputSlotProps
|
|
391
|
+
}
|
|
404
392
|
}
|
|
405
393
|
);
|
|
406
394
|
}
|
|
@@ -651,7 +639,9 @@ const UnselectButton = material.styled(material.InputAdornment, {
|
|
|
651
639
|
})(({ theme, size }) => ({
|
|
652
640
|
display: "none",
|
|
653
641
|
position: "absolute",
|
|
654
|
-
|
|
642
|
+
// Center vertically regardless of the input's height.
|
|
643
|
+
top: "50%",
|
|
644
|
+
transform: "translateY(-50%)",
|
|
655
645
|
right: theme.spacing(3.5),
|
|
656
646
|
".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &": {
|
|
657
647
|
display: "flex"
|
|
@@ -660,7 +650,6 @@ const UnselectButton = material.styled(material.InputAdornment, {
|
|
|
660
650
|
color: theme.palette.text.hint
|
|
661
651
|
},
|
|
662
652
|
...size === "medium" && {
|
|
663
|
-
top: theme.spacing(3),
|
|
664
653
|
right: theme.spacing(5)
|
|
665
654
|
}
|
|
666
655
|
}));
|
|
@@ -1537,12 +1526,28 @@ const warnDeprecatedGroupBy = /* @__PURE__ */ (() => {
|
|
|
1537
1526
|
}
|
|
1538
1527
|
};
|
|
1539
1528
|
})();
|
|
1529
|
+
function mergeSlotProps({
|
|
1530
|
+
ownProps,
|
|
1531
|
+
consumerProps
|
|
1532
|
+
}) {
|
|
1533
|
+
if (typeof consumerProps === "function") {
|
|
1534
|
+
const resolveConsumerProps = consumerProps;
|
|
1535
|
+
return (ownerState) => ({
|
|
1536
|
+
...ownProps,
|
|
1537
|
+
...resolveConsumerProps(ownerState)
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
return { ...ownProps, ...consumerProps };
|
|
1541
|
+
}
|
|
1540
1542
|
function _Autocomplete({
|
|
1541
1543
|
disabled,
|
|
1542
1544
|
loading,
|
|
1545
|
+
ListboxComponent,
|
|
1546
|
+
ListboxProps,
|
|
1547
|
+
slotProps,
|
|
1543
1548
|
...props
|
|
1544
1549
|
}, ref) {
|
|
1545
|
-
if (props.groupBy &&
|
|
1550
|
+
if (props.groupBy && ListboxComponent === AutocompleteList) {
|
|
1546
1551
|
warnDeprecatedGroupBy("Autocomplete");
|
|
1547
1552
|
}
|
|
1548
1553
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1553,9 +1558,18 @@ function _Autocomplete({
|
|
|
1553
1558
|
disabled: disabled || loading,
|
|
1554
1559
|
popupIcon: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ForwardedComponent, {}),
|
|
1555
1560
|
"data-name": "autocomplete",
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1561
|
+
slotProps: {
|
|
1562
|
+
...slotProps,
|
|
1563
|
+
listbox: mergeSlotProps({
|
|
1564
|
+
ownProps: {
|
|
1565
|
+
"aria-multiselectable": false,
|
|
1566
|
+
// v7 ignores the deprecated ListboxComponent prop entirely, so the
|
|
1567
|
+
// listbox slot is the only wiring that still virtualizes.
|
|
1568
|
+
...ListboxComponent && { component: ListboxComponent },
|
|
1569
|
+
...ListboxProps
|
|
1570
|
+
},
|
|
1571
|
+
consumerProps: slotProps == null ? void 0 : slotProps.listbox
|
|
1572
|
+
})
|
|
1559
1573
|
}
|
|
1560
1574
|
}
|
|
1561
1575
|
);
|
|
@@ -1838,6 +1852,7 @@ function _CreatableAutocomplete({
|
|
|
1838
1852
|
maxListHeight,
|
|
1839
1853
|
extended,
|
|
1840
1854
|
groupBy,
|
|
1855
|
+
slotProps,
|
|
1841
1856
|
...props
|
|
1842
1857
|
}, ref) {
|
|
1843
1858
|
if (groupBy) {
|
|
@@ -1905,12 +1920,20 @@ function _CreatableAutocomplete({
|
|
|
1905
1920
|
forcePopupIcon: true,
|
|
1906
1921
|
multiple,
|
|
1907
1922
|
disableCloseOnSelect: disableCloseOnSelect ?? multiple,
|
|
1908
|
-
ListboxComponent: AutocompleteList,
|
|
1909
|
-
ListboxProps: listboxProps,
|
|
1910
1923
|
getLimitTagsText: getLimitTagsText ?? getDefaultLimitTagsText,
|
|
1911
1924
|
disabled: disabled || loading,
|
|
1912
1925
|
popupIcon: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ForwardedComponent, {}),
|
|
1913
|
-
"data-name": "creatable-autocomplete"
|
|
1926
|
+
"data-name": "creatable-autocomplete",
|
|
1927
|
+
slotProps: {
|
|
1928
|
+
...slotProps,
|
|
1929
|
+
listbox: mergeSlotProps({
|
|
1930
|
+
ownProps: {
|
|
1931
|
+
component: AutocompleteList,
|
|
1932
|
+
...listboxProps
|
|
1933
|
+
},
|
|
1934
|
+
consumerProps: slotProps == null ? void 0 : slotProps.listbox
|
|
1935
|
+
})
|
|
1936
|
+
}
|
|
1914
1937
|
}
|
|
1915
1938
|
);
|
|
1916
1939
|
}
|
|
@@ -1936,6 +1959,7 @@ function _MultipleAutocomplete({
|
|
|
1936
1959
|
maxListHeight,
|
|
1937
1960
|
extended,
|
|
1938
1961
|
groupBy,
|
|
1962
|
+
slotProps,
|
|
1939
1963
|
...props
|
|
1940
1964
|
}, ref) {
|
|
1941
1965
|
if (groupBy) {
|
|
@@ -1982,14 +2006,22 @@ function _MultipleAutocomplete({
|
|
|
1982
2006
|
getOptionLabel,
|
|
1983
2007
|
renderOption: renderOption ?? multipleRenderOption,
|
|
1984
2008
|
renderTags: finalRenderTags,
|
|
1985
|
-
ListboxComponent: AutocompleteList,
|
|
1986
|
-
ListboxProps: listboxProps,
|
|
1987
2009
|
multiple: true,
|
|
1988
2010
|
getLimitTagsText: getLimitTagsText ?? getDefaultLimitTagsText,
|
|
1989
2011
|
disableCloseOnSelect,
|
|
1990
2012
|
disabled: disabled || loading,
|
|
1991
2013
|
popupIcon: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ForwardedComponent, {}),
|
|
1992
|
-
"data-name": "multiple-autocomplete"
|
|
2014
|
+
"data-name": "multiple-autocomplete",
|
|
2015
|
+
slotProps: {
|
|
2016
|
+
...slotProps,
|
|
2017
|
+
listbox: mergeSlotProps({
|
|
2018
|
+
ownProps: {
|
|
2019
|
+
component: AutocompleteList,
|
|
2020
|
+
...listboxProps
|
|
2021
|
+
},
|
|
2022
|
+
consumerProps: slotProps == null ? void 0 : slotProps.listbox
|
|
2023
|
+
})
|
|
2024
|
+
}
|
|
1993
2025
|
}
|
|
1994
2026
|
);
|
|
1995
2027
|
}
|
|
@@ -3322,6 +3354,15 @@ const DialogPaper = material.styled(material.Paper, {
|
|
|
3322
3354
|
}
|
|
3323
3355
|
})
|
|
3324
3356
|
);
|
|
3357
|
+
function splitSurfaceAttributes({ props }) {
|
|
3358
|
+
const surfaceAttributes = {};
|
|
3359
|
+
const rootProps = {};
|
|
3360
|
+
for (const [key, value] of Object.entries(props)) {
|
|
3361
|
+
const target = key.startsWith("data-") ? surfaceAttributes : rootProps;
|
|
3362
|
+
target[key] = value;
|
|
3363
|
+
}
|
|
3364
|
+
return { surfaceAttributes, rootProps };
|
|
3365
|
+
}
|
|
3325
3366
|
function _Dialog({
|
|
3326
3367
|
nonModal,
|
|
3327
3368
|
children,
|
|
@@ -3333,6 +3374,7 @@ function _Dialog({
|
|
|
3333
3374
|
hasForm,
|
|
3334
3375
|
"aria-label": ariaLabel,
|
|
3335
3376
|
"data-testid": dataTestId,
|
|
3377
|
+
slotProps,
|
|
3336
3378
|
...props
|
|
3337
3379
|
}, ref) {
|
|
3338
3380
|
if (nonModal) {
|
|
@@ -3353,27 +3395,47 @@ function _Dialog({
|
|
|
3353
3395
|
}
|
|
3354
3396
|
);
|
|
3355
3397
|
}
|
|
3398
|
+
const { surfaceAttributes, rootProps } = splitSurfaceAttributes({ props });
|
|
3399
|
+
const consumerPaperProps = typeof (slotProps == null ? void 0 : slotProps.paper) === "function" ? void 0 : slotProps == null ? void 0 : slotProps.paper;
|
|
3400
|
+
const hasOwnLabelledby = Boolean(
|
|
3401
|
+
props["aria-labelledby"] ?? (PaperProps == null ? void 0 : PaperProps["aria-labelledby"]) ?? (consumerPaperProps == null ? void 0 : consumerPaperProps["aria-labelledby"])
|
|
3402
|
+
);
|
|
3403
|
+
const suppressGeneratedLabelledby = Boolean(ariaLabel) && !hasOwnLabelledby;
|
|
3404
|
+
const paperProps = {
|
|
3405
|
+
"data-name": "dialog",
|
|
3406
|
+
"data-size": size,
|
|
3407
|
+
...width && { "data-width": width },
|
|
3408
|
+
...height && { "data-height": height },
|
|
3409
|
+
...PaperProps,
|
|
3410
|
+
size,
|
|
3411
|
+
fullScreen,
|
|
3412
|
+
height,
|
|
3413
|
+
width,
|
|
3414
|
+
hasForm,
|
|
3415
|
+
...dataTestId && { "data-testid": dataTestId },
|
|
3416
|
+
...ariaLabel && { "aria-label": ariaLabel },
|
|
3417
|
+
// Typed as string|undefined so it stays compatible with a consumer's own
|
|
3418
|
+
// aria-labelledby rather than narrowing the merged slot props to undefined.
|
|
3419
|
+
...suppressGeneratedLabelledby && {
|
|
3420
|
+
"aria-labelledby": void 0
|
|
3421
|
+
},
|
|
3422
|
+
// Consumer-supplied data-* wins over the defaults above, as it did when
|
|
3423
|
+
// they all spread onto the root.
|
|
3424
|
+
...surfaceAttributes
|
|
3425
|
+
};
|
|
3356
3426
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3357
3427
|
material.Dialog,
|
|
3358
3428
|
{
|
|
3359
3429
|
PaperComponent: DialogPaper,
|
|
3360
|
-
|
|
3361
|
-
...
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
hasForm
|
|
3430
|
+
slotProps: {
|
|
3431
|
+
...slotProps,
|
|
3432
|
+
paper: mergeSlotProps({
|
|
3433
|
+
ownProps: paperProps,
|
|
3434
|
+
consumerProps: slotProps == null ? void 0 : slotProps.paper
|
|
3435
|
+
})
|
|
3367
3436
|
},
|
|
3368
3437
|
fullScreen,
|
|
3369
|
-
|
|
3370
|
-
"aria-label": ariaLabel,
|
|
3371
|
-
"data-testid": dataTestId,
|
|
3372
|
-
"data-size": size,
|
|
3373
|
-
"data-width": width,
|
|
3374
|
-
"data-height": height,
|
|
3375
|
-
"data-name": "dialog",
|
|
3376
|
-
...props,
|
|
3438
|
+
...rootProps,
|
|
3377
3439
|
ref,
|
|
3378
3440
|
children
|
|
3379
3441
|
}
|
|
@@ -6524,7 +6586,7 @@ function Snackbar({
|
|
|
6524
6586
|
open,
|
|
6525
6587
|
autoHideDuration: duration,
|
|
6526
6588
|
onClose,
|
|
6527
|
-
|
|
6589
|
+
slots: { transition: autoWidth ? material.Fade : material.Slide, ...rest.slots },
|
|
6528
6590
|
"data-auto-width": autoWidth,
|
|
6529
6591
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6530
6592
|
Content$1,
|