@carto/meridian-ds 4.2.1-alpha.f6cae08.304 → 4.3.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 +14 -4
- package/dist/{TablePaginationActions-B3Vtruj_.cjs → TablePaginationActions-BUlirVpH.cjs} +4 -6
- package/dist/{TablePaginationActions-CpCi2L7U.js → TablePaginationActions-DZWE9NVG.js} +4 -6
- package/dist/components/index.cjs +121 -73
- package/dist/components/index.js +123 -75
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/metadata.json +148 -143
- package/dist/palette-utils-DX1R_i9N.cjs +1138 -0
- package/dist/palette-utils-d-9NY8qw.js +1122 -0
- package/dist/theme/index.cjs +12 -37
- package/dist/theme/index.js +13 -38
- package/dist/types/components/Autocomplete/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/Autocomplete/Autocomplete.stories.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/CreatableAutocomplete/CreatableAutocomplete.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/CreatableAutocomplete/CreatableAutocomplete.stories.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/CreatableAutocomplete/useCreatableAutocomplete.d.ts +11 -1
- package/dist/types/components/Autocomplete/CreatableAutocomplete/useCreatableAutocomplete.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/MultipleAutocomplete/MultipleAutocomplete.d.ts.map +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 +4 -3
- 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/ChipGroup/ChipGroup.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.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 +4 -5
- 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.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/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/components/List/List.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/PasswordField/PasswordField.d.ts.map +1 -1
- package/dist/types/components/PasswordField/PasswordField.stories.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.stories.d.ts +23 -0
- package/dist/types/components/SearchField/SearchField.stories.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.styled.d.ts +1 -0
- package/dist/types/components/SearchField/SearchField.styled.d.ts.map +1 -1
- package/dist/types/components/SearchField/types.d.ts +5 -0
- package/dist/types/components/SearchField/types.d.ts.map +1 -1
- 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/custom-icons/__docs__/CustomIcons.stories.d.ts.map +1 -1
- package/dist/types/localization/en.d.ts +1 -0
- package/dist/types/localization/en.d.ts.map +1 -1
- package/dist/types/localization/es.d.ts +1 -0
- package/dist/types/localization/es.d.ts.map +1 -1
- package/dist/types/localization/id.d.ts +1 -0
- package/dist/types/localization/id.d.ts.map +1 -1
- package/dist/types/localization/index.d.ts +3 -0
- package/dist/types/localization/index.d.ts.map +1 -1
- package/dist/types/theme/base-theme-options.d.ts +1775 -0
- package/dist/types/theme/base-theme-options.d.ts.map +1 -0
- package/dist/types/theme/carto-theme.d.ts +4260 -0
- package/dist/types/theme/carto-theme.d.ts.map +1 -0
- 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/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 +905 -0
- package/dist/types/theme/css-baseline.d.ts.map +1 -0
- package/dist/types/theme/tokens/LayoutTokens.stories.d.ts.map +1 -1
- package/dist/types/theme/tokens/typography.d.ts +1706 -0
- package/dist/types/theme/tokens/typography.d.ts.map +1 -0
- package/dist/types/theme/types.d.ts +8 -13
- package/dist/types/theme/types.d.ts.map +1 -1
- package/dist/types/widgets/legend/LegendWidgetUI.styles.d.ts +1 -1
- package/dist/types/widgets/legend/legend-types/LegendProportion.d.ts.map +1 -1
- package/dist/{useImperativeIntl-BUw_LXAO.js → useImperativeIntl-DXeh_Eda.js} +3 -0
- package/dist/{useImperativeIntl-lvkv1UNL.cjs → useImperativeIntl-v_ds_FH7.cjs} +3 -0
- package/dist/widgets/index.cjs +14 -6
- package/dist/widgets/index.js +14 -6
- package/package.json +19 -23
- package/dist/palette-utils-Ccd-r_Nr.js +0 -357
- package/dist/palette-utils-Dt4yj7Pv.cjs +0 -373
package/CHANGELOG.md
CHANGED
|
@@ -2,8 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
## 4.0
|
|
6
|
+
|
|
7
|
+
### 4.3.0
|
|
8
|
+
|
|
9
|
+
- chore(deps): bump js-yaml from 4.3.0 to 4.3.1 [#516](https://github.com/CartoDB/meridian-ds/pull/516)
|
|
10
|
+
- chore(deps): bump nanoid from 3.3.16 to 3.3.18 [#515](https://github.com/CartoDB/meridian-ds/pull/515)
|
|
11
|
+
- feat(SearchField): dense prop for compact 32px control height [#517](https://github.com/CartoDB/meridian-ds/pull/517)
|
|
12
|
+
- chore(deps-dev): bump dompurify from 3.4.12 to 3.4.13 [#512](https://github.com/CartoDB/meridian-ds/pull/512)
|
|
13
|
+
- test(visual): stop DateRangeCalendar snapshot date drift, document story determinism + review triage [sc-565483] [sc-565508] [#509](https://github.com/CartoDB/meridian-ds/pull/509)
|
|
14
|
+
- fix(ci): re-sync the auto-logged CHANGELOG line when a PR title changes [sc-565536] [#510](https://github.com/CartoDB/meridian-ds/pull/510)
|
|
15
|
+
- chore(deps): bump brace-expansion from 1.1.16 to 1.1.18 [#503](https://github.com/CartoDB/meridian-ds/pull/503)
|
|
16
|
+
- chore(deps): bump fast-uri from 3.1.4 to 3.1.5 [#508](https://github.com/CartoDB/meridian-ds/pull/508)
|
|
17
|
+
- chore(deps): bump undici from 7.28.0 to 7.29.0 [#507](https://github.com/CartoDB/meridian-ds/pull/507)
|
|
18
|
+
- fix(CreatableAutocomplete): show a no-options row instead of an empty popup [#504](https://github.com/CartoDB/meridian-ds/pull/504)
|
|
7
19
|
- chore(deps): bump yaml from 1.10.2 to 1.10.3 [#501](https://github.com/CartoDB/meridian-ds/pull/501)
|
|
8
20
|
- chore(deps): bump postcss from 8.5.16 to 8.5.23 [#498](https://github.com/CartoDB/meridian-ds/pull/498)
|
|
9
21
|
- chore(deps): bump picomatch from 2.3.1 to 2.3.2 [#500](https://github.com/CartoDB/meridian-ds/pull/500)
|
|
@@ -25,8 +37,6 @@
|
|
|
25
37
|
- chore(deps): bump undici from 7.25.0 to 7.28.0 [#456](https://github.com/CartoDB/meridian-ds/pull/456)
|
|
26
38
|
- chore(deps-dev): bump dompurify from 3.2.6 to 3.4.11 [#455](https://github.com/CartoDB/meridian-ds/pull/455)
|
|
27
39
|
|
|
28
|
-
## 4.0
|
|
29
|
-
|
|
30
40
|
### 4.2.0
|
|
31
41
|
|
|
32
42
|
- feat(ai-metadata): serve custom-icon and theme-token knowledge to AI agents — new `meridian_list_icons`, `meridian_get_tokens`, and `meridian_get_screenshot` MCP tools (icons searchable by curated keywords + a labeled all-icons reference image an agent can Read to match a design by sight; tokens projected straight from the composed theme: palette / typography / spacing / shape / breakpoints / shadows), plus surfaced List `direction`/`spacing` props [#463](https://github.com/CartoDB/meridian-ds/pull/463) [sc-559510] [sc-559550] [sc-561408]
|
|
@@ -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 paletteUtils = require("./palette-utils-
|
|
5
|
+
const paletteUtils = require("./palette-utils-DX1R_i9N.cjs");
|
|
6
6
|
const iconsMaterial = require("@mui/icons-material");
|
|
7
7
|
const reactIntl = require("react-intl");
|
|
8
|
-
const useImperativeIntl = require("./useImperativeIntl-
|
|
8
|
+
const useImperativeIntl = require("./useImperativeIntl-v_ds_FH7.cjs");
|
|
9
9
|
function useTranslationWithFallback(translationKey, customText, intlValues) {
|
|
10
10
|
const intl = reactIntl.useIntl();
|
|
11
11
|
const intlConfig = useImperativeIntl.useImperativeIntl(intl);
|
|
@@ -249,12 +249,10 @@ function _IconButton({
|
|
|
249
249
|
variant,
|
|
250
250
|
color,
|
|
251
251
|
active,
|
|
252
|
-
loading,
|
|
253
|
-
loadingIndicator: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }),
|
|
254
|
-
disabled,
|
|
252
|
+
disabled: disabled || loading,
|
|
255
253
|
role: "button",
|
|
256
254
|
"aria-label": ariaLabel,
|
|
257
|
-
children: loading ?
|
|
255
|
+
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : icon
|
|
258
256
|
}
|
|
259
257
|
)
|
|
260
258
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
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-d-9NY8qw.js";
|
|
5
5
|
import { KeyboardArrowLeftOutlined, KeyboardArrowRightOutlined } from "@mui/icons-material";
|
|
6
6
|
import { useIntl } from "react-intl";
|
|
7
|
-
import { u as useImperativeIntl } from "./useImperativeIntl-
|
|
7
|
+
import { u as useImperativeIntl } from "./useImperativeIntl-DXeh_Eda.js";
|
|
8
8
|
function useTranslationWithFallback(translationKey, customText, intlValues) {
|
|
9
9
|
const intl = useIntl();
|
|
10
10
|
const intlConfig = useImperativeIntl(intl);
|
|
@@ -248,12 +248,10 @@ function _IconButton({
|
|
|
248
248
|
variant,
|
|
249
249
|
color,
|
|
250
250
|
active,
|
|
251
|
-
loading,
|
|
252
|
-
loadingIndicator: /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" }),
|
|
253
|
-
disabled,
|
|
251
|
+
disabled: disabled || loading,
|
|
254
252
|
role: "button",
|
|
255
253
|
"aria-label": ariaLabel,
|
|
256
|
-
children: loading ?
|
|
254
|
+
children: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" }) : icon
|
|
257
255
|
}
|
|
258
256
|
)
|
|
259
257
|
}
|
|
@@ -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-DX1R_i9N.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-BUlirVpH.cjs");
|
|
11
11
|
const Search = require("../Search-BsaXrSzs.cjs");
|
|
12
12
|
require("cartocolor");
|
|
13
13
|
const reactCodemirror2 = require("react-codemirror2");
|
|
@@ -38,7 +38,7 @@ require("codemirror/addon/fold/comment-fold.js");
|
|
|
38
38
|
const ClickAwayListener = require("@mui/material/ClickAwayListener");
|
|
39
39
|
const DatePicker$1 = require("@mui/x-date-pickers/DatePicker");
|
|
40
40
|
const reactIntl = require("react-intl");
|
|
41
|
-
const useImperativeIntl = require("../useImperativeIntl-
|
|
41
|
+
const useImperativeIntl = require("../useImperativeIntl-v_ds_FH7.cjs");
|
|
42
42
|
const DateCalendar = require("@mui/x-date-pickers/DateCalendar");
|
|
43
43
|
const xDatePickers = require("@mui/x-date-pickers");
|
|
44
44
|
const DateTimePicker$1 = require("@mui/x-date-pickers/DateTimePicker");
|
|
@@ -72,7 +72,20 @@ const ScreenReaderOnly = material.styled("span")(() => ({
|
|
|
72
72
|
whiteSpace: "nowrap",
|
|
73
73
|
border: 0
|
|
74
74
|
}));
|
|
75
|
-
const
|
|
75
|
+
const IndicatorIcon = material.styled(material.Box)({
|
|
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
|
+
});
|
|
76
89
|
function _Button({
|
|
77
90
|
children,
|
|
78
91
|
loading,
|
|
@@ -90,17 +103,46 @@ function _Button({
|
|
|
90
103
|
"c4r.button.opensInNewTab",
|
|
91
104
|
screenReaderText
|
|
92
105
|
);
|
|
106
|
+
const defaultIconLoader = /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" });
|
|
107
|
+
const isDefaultLoading = loading && loadingPosition === void 0;
|
|
93
108
|
const isExternalLink = otherProps.href && external;
|
|
94
|
-
const
|
|
109
|
+
const renderContent = () => {
|
|
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
|
+
};
|
|
95
140
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
96
141
|
material.Button,
|
|
97
142
|
{
|
|
98
|
-
loading,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
disabled,
|
|
102
|
-
startIcon: loading ? void 0 : startIcon,
|
|
103
|
-
endIcon: loading ? void 0 : endIcon || (isExternalLink && showExternalIcon ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.OpenInNewOutlined, {}) : void 0),
|
|
143
|
+
disabled: loading || disabled,
|
|
144
|
+
startIcon: getIconForPosition("start"),
|
|
145
|
+
endIcon: getIconForPosition("end"),
|
|
104
146
|
...otherProps,
|
|
105
147
|
role: otherProps.href ? "link" : "button",
|
|
106
148
|
...isExternalLink && {
|
|
@@ -109,20 +151,7 @@ function _Button({
|
|
|
109
151
|
},
|
|
110
152
|
ref,
|
|
111
153
|
"aria-describedby": isExternalLink ? "external-hint" : ariaDescribedby,
|
|
112
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
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
|
-
)
|
|
154
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(paletteUtils.Typography, { variant: "inherit", color: "inherit", noWrap: true, component: "span", children: renderContent() })
|
|
126
155
|
}
|
|
127
156
|
);
|
|
128
157
|
}
|
|
@@ -353,27 +382,25 @@ function _PasswordField({
|
|
|
353
382
|
type: showPassword ? "text" : "password",
|
|
354
383
|
size,
|
|
355
384
|
disabled,
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
...InputProps,
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}
|
|
376
|
-
}
|
|
385
|
+
InputProps: {
|
|
386
|
+
...InputProps,
|
|
387
|
+
inputProps: {
|
|
388
|
+
...InputProps == null ? void 0 : InputProps.inputProps,
|
|
389
|
+
role: "textbox"
|
|
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"
|
|
377
404
|
}
|
|
378
405
|
);
|
|
379
406
|
}
|
|
@@ -624,9 +651,7 @@ const UnselectButton = material.styled(material.InputAdornment, {
|
|
|
624
651
|
})(({ theme, size }) => ({
|
|
625
652
|
display: "none",
|
|
626
653
|
position: "absolute",
|
|
627
|
-
|
|
628
|
-
top: "50%",
|
|
629
|
-
transform: "translateY(-50%)",
|
|
654
|
+
top: theme.spacing(2),
|
|
630
655
|
right: theme.spacing(3.5),
|
|
631
656
|
".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &": {
|
|
632
657
|
display: "flex"
|
|
@@ -635,6 +660,7 @@ const UnselectButton = material.styled(material.InputAdornment, {
|
|
|
635
660
|
color: theme.palette.text.hint
|
|
636
661
|
},
|
|
637
662
|
...size === "medium" && {
|
|
663
|
+
top: theme.spacing(3),
|
|
638
664
|
right: theme.spacing(5)
|
|
639
665
|
}
|
|
640
666
|
}));
|
|
@@ -1527,11 +1553,9 @@ function _Autocomplete({
|
|
|
1527
1553
|
disabled: disabled || loading,
|
|
1528
1554
|
popupIcon: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ForwardedComponent, {}),
|
|
1529
1555
|
"data-name": "autocomplete",
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
...props.ListboxProps
|
|
1534
|
-
}
|
|
1556
|
+
ListboxProps: {
|
|
1557
|
+
"aria-multiselectable": false,
|
|
1558
|
+
...props.ListboxProps
|
|
1535
1559
|
}
|
|
1536
1560
|
}
|
|
1537
1561
|
);
|
|
@@ -1628,11 +1652,16 @@ function useAutocompleteRenderOption() {
|
|
|
1628
1652
|
};
|
|
1629
1653
|
return { renderOption };
|
|
1630
1654
|
}
|
|
1655
|
+
const NO_OPTIONS_ROW_PROPERTY = "__creatableNoOptions";
|
|
1656
|
+
function isCreatableNoOptionsRow(option) {
|
|
1657
|
+
return typeof option === "object" && option !== null && NO_OPTIONS_ROW_PROPERTY in option;
|
|
1658
|
+
}
|
|
1631
1659
|
function useCreatableAutocomplete({
|
|
1632
1660
|
getOptionLabel,
|
|
1633
1661
|
newItemLabel,
|
|
1634
1662
|
newItemIcon,
|
|
1635
|
-
multiple
|
|
1663
|
+
multiple,
|
|
1664
|
+
noOptionsText
|
|
1636
1665
|
}) {
|
|
1637
1666
|
const filter = material.createFilterOptions();
|
|
1638
1667
|
const { renderOption: autocompleteRenderOption } = useAutocompleteRenderOption();
|
|
@@ -1640,6 +1669,10 @@ function useCreatableAutocomplete({
|
|
|
1640
1669
|
"c4r.form.add",
|
|
1641
1670
|
typeof newItemLabel === "string" ? newItemLabel : void 0
|
|
1642
1671
|
);
|
|
1672
|
+
const noOptionsLabel = TablePaginationActions.useTranslationWithFallback(
|
|
1673
|
+
"c4r.form.noOptions",
|
|
1674
|
+
noOptionsText
|
|
1675
|
+
);
|
|
1643
1676
|
const creatableFilterOptions = (options, params) => {
|
|
1644
1677
|
const filtered = filter(
|
|
1645
1678
|
options,
|
|
@@ -1661,12 +1694,22 @@ function useCreatableAutocomplete({
|
|
|
1661
1694
|
title: newItemText
|
|
1662
1695
|
});
|
|
1663
1696
|
}
|
|
1697
|
+
if (filtered.length === 0) {
|
|
1698
|
+
filtered.push({
|
|
1699
|
+
[NO_OPTIONS_ROW_PROPERTY]: true,
|
|
1700
|
+
subtitle: true,
|
|
1701
|
+
title: noOptionsLabel
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1664
1704
|
return filtered;
|
|
1665
1705
|
};
|
|
1666
1706
|
const creatableOptionLabel = (option) => {
|
|
1667
1707
|
if (typeof option === "string") {
|
|
1668
1708
|
return option;
|
|
1669
1709
|
}
|
|
1710
|
+
if (isCreatableNoOptionsRow(option)) {
|
|
1711
|
+
return "";
|
|
1712
|
+
}
|
|
1670
1713
|
if (option.inputValue) {
|
|
1671
1714
|
return option.inputValue;
|
|
1672
1715
|
}
|
|
@@ -1826,8 +1869,13 @@ function _CreatableAutocomplete({
|
|
|
1826
1869
|
getOptionLabel,
|
|
1827
1870
|
newItemLabel,
|
|
1828
1871
|
newItemIcon,
|
|
1829
|
-
multiple
|
|
1872
|
+
multiple,
|
|
1873
|
+
noOptionsText: props.noOptionsText
|
|
1830
1874
|
});
|
|
1875
|
+
const isOptionDisabled = (option) => {
|
|
1876
|
+
var _a;
|
|
1877
|
+
return isCreatableNoOptionsRow(option) || (((_a = props.getOptionDisabled) == null ? void 0 : _a.call(props, option)) ?? false);
|
|
1878
|
+
};
|
|
1831
1879
|
const listboxProps = {
|
|
1832
1880
|
showFilters,
|
|
1833
1881
|
allSelected,
|
|
@@ -1851,21 +1899,18 @@ function _CreatableAutocomplete({
|
|
|
1851
1899
|
filterOptions: creatableFilterOptions,
|
|
1852
1900
|
getOptionLabel: creatableOptionLabel,
|
|
1853
1901
|
renderOption: creatableRenderOption,
|
|
1902
|
+
getOptionDisabled: isOptionDisabled,
|
|
1854
1903
|
renderTags: finalRenderTags,
|
|
1855
1904
|
freeSolo,
|
|
1856
1905
|
forcePopupIcon: true,
|
|
1857
1906
|
multiple,
|
|
1858
1907
|
disableCloseOnSelect: disableCloseOnSelect ?? multiple,
|
|
1908
|
+
ListboxComponent: AutocompleteList,
|
|
1909
|
+
ListboxProps: listboxProps,
|
|
1859
1910
|
getLimitTagsText: getLimitTagsText ?? getDefaultLimitTagsText,
|
|
1860
1911
|
disabled: disabled || loading,
|
|
1861
1912
|
popupIcon: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ForwardedComponent, {}),
|
|
1862
|
-
"data-name": "creatable-autocomplete"
|
|
1863
|
-
slotProps: {
|
|
1864
|
-
listbox: {
|
|
1865
|
-
component: AutocompleteList,
|
|
1866
|
-
...listboxProps
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1913
|
+
"data-name": "creatable-autocomplete"
|
|
1869
1914
|
}
|
|
1870
1915
|
);
|
|
1871
1916
|
}
|
|
@@ -1937,18 +1982,14 @@ function _MultipleAutocomplete({
|
|
|
1937
1982
|
getOptionLabel,
|
|
1938
1983
|
renderOption: renderOption ?? multipleRenderOption,
|
|
1939
1984
|
renderTags: finalRenderTags,
|
|
1985
|
+
ListboxComponent: AutocompleteList,
|
|
1986
|
+
ListboxProps: listboxProps,
|
|
1940
1987
|
multiple: true,
|
|
1941
1988
|
getLimitTagsText: getLimitTagsText ?? getDefaultLimitTagsText,
|
|
1942
1989
|
disableCloseOnSelect,
|
|
1943
1990
|
disabled: disabled || loading,
|
|
1944
1991
|
popupIcon: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ForwardedComponent, {}),
|
|
1945
|
-
"data-name": "multiple-autocomplete"
|
|
1946
|
-
slotProps: {
|
|
1947
|
-
listbox: {
|
|
1948
|
-
component: AutocompleteList,
|
|
1949
|
-
...listboxProps
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1992
|
+
"data-name": "multiple-autocomplete"
|
|
1952
1993
|
}
|
|
1953
1994
|
);
|
|
1954
1995
|
}
|
|
@@ -3325,6 +3366,7 @@ function _Dialog({
|
|
|
3325
3366
|
hasForm
|
|
3326
3367
|
},
|
|
3327
3368
|
fullScreen,
|
|
3369
|
+
role: "section",
|
|
3328
3370
|
"aria-label": ariaLabel,
|
|
3329
3371
|
"data-testid": dataTestId,
|
|
3330
3372
|
"data-size": size,
|
|
@@ -6119,9 +6161,12 @@ const SearchInputAdornment = material.styled(material.InputAdornment, {
|
|
|
6119
6161
|
})
|
|
6120
6162
|
);
|
|
6121
6163
|
const SearchFieldBase = material.styled(material.TextField, {
|
|
6122
|
-
shouldForwardProp: (prop) => prop !== "minimized" && prop !== "isInputFocused" && prop !== "emphasis"
|
|
6123
|
-
})(({ theme, emphasis = "filled", minimized, isInputFocused }) => ({
|
|
6164
|
+
shouldForwardProp: (prop) => prop !== "minimized" && prop !== "isInputFocused" && prop !== "emphasis" && prop !== "dense"
|
|
6165
|
+
})(({ theme, emphasis = "filled", minimized, isInputFocused, dense }) => ({
|
|
6124
6166
|
"&.MuiTextField-root .MuiInputBase-root": {
|
|
6167
|
+
// The theme locks every input to a 48px control; dense surfaces
|
|
6168
|
+
// (table headers, toolbars) opt into the compact 32px height.
|
|
6169
|
+
...dense && { height: theme.spacing(4) },
|
|
6125
6170
|
paddingRight: theme.spacing(1),
|
|
6126
6171
|
transition: theme.transitions.create(["width", "padding"], {
|
|
6127
6172
|
easing: theme.transitions.easing.easeInOut,
|
|
@@ -6266,6 +6311,7 @@ function _SearchField({
|
|
|
6266
6311
|
loading = false,
|
|
6267
6312
|
variant = "filled",
|
|
6268
6313
|
size = "small",
|
|
6314
|
+
dense = false,
|
|
6269
6315
|
InputProps,
|
|
6270
6316
|
inputProps,
|
|
6271
6317
|
startAdornment,
|
|
@@ -6313,6 +6359,7 @@ function _SearchField({
|
|
|
6313
6359
|
isInputFocused,
|
|
6314
6360
|
disabled,
|
|
6315
6361
|
minimized,
|
|
6362
|
+
dense,
|
|
6316
6363
|
InputProps: {
|
|
6317
6364
|
onFocus: handleFocus,
|
|
6318
6365
|
onBlur: handleBlur,
|
|
@@ -6346,6 +6393,7 @@ function _SearchField({
|
|
|
6346
6393
|
},
|
|
6347
6394
|
role: "search",
|
|
6348
6395
|
"data-variant": variant,
|
|
6396
|
+
"data-dense": dense || void 0,
|
|
6349
6397
|
"data-name": "search-field",
|
|
6350
6398
|
ref,
|
|
6351
6399
|
...otherProps
|
|
@@ -6476,7 +6524,7 @@ function Snackbar({
|
|
|
6476
6524
|
open,
|
|
6477
6525
|
autoHideDuration: duration,
|
|
6478
6526
|
onClose,
|
|
6479
|
-
|
|
6527
|
+
TransitionComponent: autoWidth ? material.Fade : material.Slide,
|
|
6480
6528
|
"data-auto-width": autoWidth,
|
|
6481
6529
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6482
6530
|
Content$1,
|