@carto/meridian-ds 2.6.1 → 2.7.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 +16 -0
- package/dist/{Alert-DHd9hCGz.js → Alert-BfDnWlbD.js} +5 -41
- package/dist/{Alert-DOeOwxOe.cjs → Alert-CPvYAHO_.cjs} +4 -40
- package/dist/{MenuItem-MUmADf3e.js → MenuItem-D90EfuGS.js} +12 -3
- package/dist/{MenuItem-CYJN2OVU.cjs → MenuItem-ZSYcQBtg.cjs} +12 -3
- package/dist/{SwatchSquare-CaaLsjAC.js → Search-C7wkXu3f.js} +4 -23
- package/dist/{SwatchSquare-B8PIY3Rd.cjs → Search-CMWbM9nD.cjs} +3 -22
- package/dist/SwatchSquare-B6KYVoqV.js +24 -0
- package/dist/SwatchSquare-DuXPIL7t.cjs +23 -0
- package/dist/components/index.cjs +616 -235
- package/dist/components/index.js +616 -235
- package/dist/{css-utils-WejOmkiI.js → css-utils-BHYA7By_.js} +32 -13
- package/dist/{css-utils-CCi3p7os.cjs → css-utils-DjvM17Vb.cjs} +30 -11
- package/dist/custom-icons/index.cjs +774 -611
- package/dist/custom-icons/index.js +774 -611
- package/dist/theme/index.cjs +75 -7
- package/dist/theme/index.js +77 -9
- package/dist/types/components/Alert/Alert.d.ts.map +1 -1
- package/dist/types/components/AppBar/AppBar.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/AutocompleteList/AutocompleteList.d.ts +1 -0
- 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/CreatableAutocomplete/useCreatableAutocomplete.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/Autocomplete/MultipleAutocomplete/useMultipleAutocomplete.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/types.d.ts +13 -1
- package/dist/types/components/Autocomplete/types.d.ts.map +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +0 -2
- package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/components/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts +7 -1
- package/dist/types/components/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts.map +1 -1
- package/dist/types/components/CodeArea/CodeAreaDialog/components/CodeAreaDialogConfirmation.d.ts +5 -1
- package/dist/types/components/CodeArea/CodeAreaDialog/components/CodeAreaDialogConfirmation.d.ts.map +1 -1
- package/dist/types/components/CodeArea/CodeAreaFooter/CodeAreaFooter.d.ts +3 -1
- package/dist/types/components/CodeArea/CodeAreaFooter/CodeAreaFooter.d.ts.map +1 -1
- package/dist/types/components/CodeArea/CodeAreaHeader/CodeAreaHeader.d.ts +5 -1
- package/dist/types/components/CodeArea/CodeAreaHeader/CodeAreaHeader.d.ts.map +1 -1
- package/dist/types/components/CopiableComponent/CopiableComponent.d.ts.map +1 -1
- package/dist/types/components/CopiableComponent/CopiableComponent.stories.d.ts +3 -0
- package/dist/types/components/CopiableComponent/CopiableComponent.stories.d.ts.map +1 -1
- package/dist/types/components/CopiableComponent/types.d.ts +8 -1
- package/dist/types/components/CopiableComponent/types.d.ts.map +1 -1
- package/dist/types/components/CopiableInputText/CopiableInputText.d.ts +9 -3
- package/dist/types/components/CopiableInputText/CopiableInputText.d.ts.map +1 -1
- package/dist/types/components/CopiableInputText/CopiableInputText.stories.d.ts +28 -3
- package/dist/types/components/CopiableInputText/CopiableInputText.stories.d.ts.map +1 -1
- package/dist/types/components/CopiableInputText/types.d.ts +4 -1
- package/dist/types/components/CopiableInputText/types.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DatePicker/DatePicker.d.ts +1 -1
- package/dist/types/components/DatePickers/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DatePicker/DatePicker.stories.d.ts +3 -0
- package/dist/types/components/DatePickers/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.stories.d.ts +3 -0
- package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/dist/types/components/DatePickers/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/dist/types/components/DatePickers/DateTimePicker/DateTimePicker.stories.d.ts +3 -0
- package/dist/types/components/DatePickers/DateTimePicker/DateTimePicker.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/TimePicker/TimePicker.d.ts +1 -1
- package/dist/types/components/DatePickers/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/types/components/DatePickers/TimePicker/TimePicker.stories.d.ts +3 -0
- package/dist/types/components/DatePickers/TimePicker/TimePicker.stories.d.ts.map +1 -1
- package/dist/types/components/DatePickers/types.d.ts +7 -0
- package/dist/types/components/DatePickers/types.d.ts.map +1 -1
- package/dist/types/components/Dialog/Dialog/Dialog.stories.d.ts +48 -0
- package/dist/types/components/Dialog/Dialog/Dialog.stories.d.ts.map +1 -1
- package/dist/types/components/Dialog/DialogContent/DialogContent.d.ts.map +1 -1
- package/dist/types/components/Dialog/DialogContent/DialogContent.test.d.ts +2 -0
- package/dist/types/components/Dialog/DialogContent/DialogContent.test.d.ts.map +1 -0
- package/dist/types/components/Dialog/DialogHeader/DialogHeader.d.ts +1 -1
- package/dist/types/components/Dialog/DialogHeader/DialogHeader.d.ts.map +1 -1
- package/dist/types/components/Dialog/DialogHeader/DialogHeader.stories.d.ts +14 -0
- package/dist/types/components/Dialog/DialogHeader/DialogHeader.stories.d.ts.map +1 -1
- package/dist/types/components/Dialog/types.d.ts +6 -0
- package/dist/types/components/Dialog/types.d.ts.map +1 -1
- package/dist/types/components/FilterDropdown/FilterDropdown.d.ts +1 -1
- package/dist/types/components/FilterDropdown/FilterDropdown.d.ts.map +1 -1
- package/dist/types/components/FilterDropdown/FilterDropdown.stories.d.ts +48 -0
- package/dist/types/components/FilterDropdown/FilterDropdown.stories.d.ts.map +1 -1
- package/dist/types/components/FilterDropdown/types.d.ts +8 -0
- package/dist/types/components/FilterDropdown/types.d.ts.map +1 -1
- package/dist/types/components/Menu/Menu/Menu.stories.d.ts +16 -7
- package/dist/types/components/Menu/Menu/Menu.stories.d.ts.map +1 -1
- package/dist/types/components/Menu/MenuItem/MenuItem.d.ts.map +1 -1
- package/dist/types/components/Menu/MenuItemFilter/MenuItemFilter.d.ts.map +1 -1
- package/dist/types/components/Menu/types.d.ts +1 -0
- package/dist/types/components/Menu/types.d.ts.map +1 -1
- package/dist/types/components/PasswordField/PasswordField.d.ts +10 -1
- package/dist/types/components/PasswordField/PasswordField.d.ts.map +1 -1
- package/dist/types/components/PasswordField/PasswordField.stories.d.ts +10 -1
- package/dist/types/components/PasswordField/PasswordField.stories.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.d.ts +4 -0
- package/dist/types/components/SearchField/SearchField.d.ts.map +1 -0
- package/dist/types/components/SearchField/SearchField.stories.d.ts +111 -0
- package/dist/types/components/SearchField/SearchField.stories.d.ts.map +1 -0
- package/dist/types/components/SearchField/SearchField.styled.d.ts +23 -0
- package/dist/types/components/SearchField/SearchField.styled.d.ts.map +1 -0
- package/dist/types/components/SearchField/SearchField.test.d.ts +2 -0
- package/dist/types/components/SearchField/SearchField.test.d.ts.map +1 -0
- package/dist/types/components/SearchField/components/SearchFieldEndAdornment.d.ts +19 -0
- package/dist/types/components/SearchField/components/SearchFieldEndAdornment.d.ts.map +1 -0
- package/dist/types/components/SearchField/components/SearchFieldStartAdornment.d.ts +14 -0
- package/dist/types/components/SearchField/components/SearchFieldStartAdornment.d.ts.map +1 -0
- package/dist/types/components/SearchField/index.d.ts +3 -0
- package/dist/types/components/SearchField/index.d.ts.map +1 -0
- package/dist/types/components/SearchField/types.d.ts +72 -0
- package/dist/types/components/SearchField/types.d.ts.map +1 -0
- package/dist/types/components/SelectField/MultipleSelectField/MultipleSelectField.d.ts.map +1 -1
- package/dist/types/components/SelectField/MultipleSelectField/MultipleSelectField.stories.d.ts +22 -2
- package/dist/types/components/SelectField/MultipleSelectField/MultipleSelectField.stories.d.ts.map +1 -1
- package/dist/types/components/SelectField/types.d.ts +4 -0
- package/dist/types/components/SelectField/types.d.ts.map +1 -1
- package/dist/types/components/Snackbar/Snackbar.d.ts +2 -1
- package/dist/types/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/dist/types/components/Snackbar/Snackbar.stories.d.ts +15 -0
- package/dist/types/components/Snackbar/Snackbar.stories.d.ts.map +1 -1
- package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts +3 -0
- package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts.map +1 -1
- package/dist/types/components/UploadField/useFileUpload.d.ts +4 -1
- package/dist/types/components/UploadField/useFileUpload.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/custom-icons/ApiAccessToken.d.ts +4 -0
- package/dist/types/custom-icons/ApiAccessToken.d.ts.map +1 -0
- package/dist/types/custom-icons/ApiBaseUrl.d.ts +4 -0
- package/dist/types/custom-icons/ApiBaseUrl.d.ts.map +1 -0
- package/dist/types/custom-icons/AppCredentials.d.ts +4 -0
- package/dist/types/custom-icons/AppCredentials.d.ts.map +1 -0
- package/dist/types/custom-icons/M2mOauthClient.d.ts +4 -0
- package/dist/types/custom-icons/M2mOauthClient.d.ts.map +1 -0
- package/dist/types/custom-icons/SpaOauthClient.d.ts +4 -0
- package/dist/types/custom-icons/SpaOauthClient.d.ts.map +1 -0
- package/dist/types/custom-icons/WorkflowApiEndpoint.d.ts +4 -0
- package/dist/types/custom-icons/WorkflowApiEndpoint.d.ts.map +1 -0
- package/dist/types/custom-icons/index.d.ts +6 -0
- package/dist/types/custom-icons/index.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/carto-theme.d.ts.map +1 -1
- package/dist/types/theme/components/data-display.d.ts.map +1 -1
- package/dist/types/theme/components/feedback.d.ts.map +1 -1
- package/dist/types/theme/components/layout.d.ts +3 -0
- package/dist/types/theme/components/layout.d.ts.map +1 -0
- package/dist/types/theme/components/navigation.d.ts.map +1 -1
- package/dist/types/theme/types.d.ts +11 -0
- package/dist/types/theme/types.d.ts.map +1 -1
- package/dist/types/utils/useTranslationWithFallback.d.ts +39 -0
- package/dist/types/utils/useTranslationWithFallback.d.ts.map +1 -0
- package/dist/types/utils/useTranslationWithFallback.test.d.ts +2 -0
- package/dist/types/utils/useTranslationWithFallback.test.d.ts.map +1 -0
- package/dist/widgets/index.cjs +8 -7
- package/dist/widgets/index.js +4 -3
- package/package.json +1 -1
- package/dist/types/utils/useTranslationFallback.d.ts +0 -20
- package/dist/types/utils/useTranslationFallback.d.ts.map +0 -1
- package/dist/types/utils/useTranslationFallback.test.d.ts +0 -2
- package/dist/types/utils/useTranslationFallback.test.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
## 2.0
|
|
6
6
|
|
|
7
|
+
### 2.7.0
|
|
8
|
+
|
|
9
|
+
- New SearchField component [#308](https://github.com/CartoDB/meridian-ds/pull/308)
|
|
10
|
+
- Custom Icons: ApiAccessToken, ApiBaseUrl, AppCredentials, M2mOauthClient,SpaOauthClient, WorkflowApiEndpoint [#325](https://github.com/CartoDB/meridian-ds/pull/325)
|
|
11
|
+
- Avatar: move size styles to the theme [#321](https://github.com/CartoDB/meridian-ds/pull/321)
|
|
12
|
+
- Alert: move neutral styles to the theme [#320](https://github.com/CartoDB/meridian-ds/pull/320)
|
|
13
|
+
- Handle empty buttonFooterLabelId in CodeAreaFooter [#323](https://github.com/CartoDB/meridian-ds/pull/323)
|
|
14
|
+
- Dialog: add a property to override content gap [#322](https://github.com/CartoDB/meridian-ds/pull/322)
|
|
15
|
+
- Improve translations handling in Meridian (part 4) [#309](https://github.com/CartoDB/meridian-ds/pull/309)
|
|
16
|
+
- Improve translations handling in Meridian (part 3) [#306](https://github.com/CartoDB/meridian-ds/pull/306)
|
|
17
|
+
- Improve translations handling in Meridian (part 2) [#305](https://github.com/CartoDB/meridian-ds/pull/305)
|
|
18
|
+
- Improve translations handling in Meridian (part 1) [#304](https://github.com/CartoDB/meridian-ds/pull/304)
|
|
19
|
+
- FilterDropdown: improve customization [#312](https://github.com/CartoDB/meridian-ds/pull/312)
|
|
20
|
+
- CopiableComponent: improve customization [#311](https://github.com/CartoDB/meridian-ds/pull/311)
|
|
21
|
+
- AppBar: disallow user selection of text [#324](https://github.com/CartoDB/meridian-ds/pull/324)
|
|
22
|
+
|
|
7
23
|
### 2.6.1
|
|
8
24
|
|
|
9
25
|
- Custom Icons: FoldersStackedOutlined,RedoAlt,UndoAlt [#317](https://github.com/CartoDB/meridian-ds/pull/317)
|
|
@@ -3,8 +3,7 @@ import { forwardRef, useState } from "react";
|
|
|
3
3
|
import { styled, Link as Link$1, Alert as Alert$1, Fade, AlertTitle } from "@mui/material";
|
|
4
4
|
import { OpenInNewOutlined } from "@mui/icons-material";
|
|
5
5
|
import "cartocolor";
|
|
6
|
-
import {
|
|
7
|
-
import { useIntl } from "react-intl";
|
|
6
|
+
import { c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, u as useTranslationWithFallback, T as Typography } from "./css-utils-BHYA7By_.js";
|
|
8
7
|
const ScreenReaderOnly = styled("span")(() => ({
|
|
9
8
|
position: "absolute",
|
|
10
9
|
width: 1,
|
|
@@ -16,14 +15,6 @@ const ScreenReaderOnly = styled("span")(() => ({
|
|
|
16
15
|
whiteSpace: "nowrap",
|
|
17
16
|
border: 0
|
|
18
17
|
}));
|
|
19
|
-
function useTranslationFallback(translationKey, customText) {
|
|
20
|
-
const intl = useIntl();
|
|
21
|
-
const intlConfig = useImperativeIntl(intl);
|
|
22
|
-
if (customText !== void 0 && customText !== null) {
|
|
23
|
-
return customText;
|
|
24
|
-
}
|
|
25
|
-
return intlConfig.formatMessage({ id: translationKey });
|
|
26
|
-
}
|
|
27
18
|
const StyledLink = styled(Link$1)(() => ({
|
|
28
19
|
display: "inline-block"
|
|
29
20
|
}));
|
|
@@ -82,7 +73,7 @@ function _Link({
|
|
|
82
73
|
"aria-describedby": ariaDescribedby,
|
|
83
74
|
...otherProps
|
|
84
75
|
}, ref) {
|
|
85
|
-
const screenReaderTextValue =
|
|
76
|
+
const screenReaderTextValue = useTranslationWithFallback(
|
|
86
77
|
"c4r.button.opensInNewTab",
|
|
87
78
|
screenReaderText
|
|
88
79
|
);
|
|
@@ -113,7 +104,6 @@ function _Link({
|
|
|
113
104
|
const Link = forwardRef(_Link);
|
|
114
105
|
const StyledAlert = styled(Alert$1, {
|
|
115
106
|
shouldForwardProp: (prop) => ![
|
|
116
|
-
"isNeutral",
|
|
117
107
|
"content",
|
|
118
108
|
"hasCloseButton",
|
|
119
109
|
"hasAction",
|
|
@@ -121,15 +111,7 @@ const StyledAlert = styled(Alert$1, {
|
|
|
121
111
|
"isSticky"
|
|
122
112
|
].includes(prop)
|
|
123
113
|
})(
|
|
124
|
-
({
|
|
125
|
-
isNeutral,
|
|
126
|
-
content,
|
|
127
|
-
hasCloseButton,
|
|
128
|
-
hasAction,
|
|
129
|
-
hasTitle,
|
|
130
|
-
isSticky,
|
|
131
|
-
theme
|
|
132
|
-
}) => ({
|
|
114
|
+
({ content, hasCloseButton, hasAction, hasTitle, isSticky, theme }) => ({
|
|
133
115
|
columnGap: theme.spacing(1),
|
|
134
116
|
minHeight: theme.spacing(6),
|
|
135
117
|
...hasAction && {
|
|
@@ -140,10 +122,6 @@ const StyledAlert = styled(Alert$1, {
|
|
|
140
122
|
`,
|
|
141
123
|
gridTemplateColumns: hasCloseButton ? `${ICON_SIZE_MEDIUM} 1fr ${theme.spacing(3)}` : `${ICON_SIZE_MEDIUM}`
|
|
142
124
|
},
|
|
143
|
-
...isNeutral && {
|
|
144
|
-
backgroundColor: theme.palette.default.background,
|
|
145
|
-
color: theme.palette.text.primary
|
|
146
|
-
},
|
|
147
125
|
...isSticky && {
|
|
148
126
|
borderRadius: 0
|
|
149
127
|
},
|
|
@@ -159,14 +137,6 @@ const StyledAlert = styled(Alert$1, {
|
|
|
159
137
|
},
|
|
160
138
|
...hasAction && {
|
|
161
139
|
gridArea: "message"
|
|
162
|
-
},
|
|
163
|
-
...isNeutral && {
|
|
164
|
-
"& :not(.MuiAlertTitle-root)": {
|
|
165
|
-
color: theme.palette.text.secondary
|
|
166
|
-
},
|
|
167
|
-
a: {
|
|
168
|
-
color: `${theme.palette.primary.main} !important`
|
|
169
|
-
}
|
|
170
140
|
}
|
|
171
141
|
},
|
|
172
142
|
".MuiAlert-icon": {
|
|
@@ -174,9 +144,6 @@ const StyledAlert = styled(Alert$1, {
|
|
|
174
144
|
marginRight: 0,
|
|
175
145
|
...hasAction && {
|
|
176
146
|
gridArea: "icon"
|
|
177
|
-
},
|
|
178
|
-
...isNeutral && {
|
|
179
|
-
color: theme.palette.text.primary
|
|
180
147
|
}
|
|
181
148
|
},
|
|
182
149
|
".MuiAlert-action": {
|
|
@@ -210,14 +177,12 @@ function _Alert({
|
|
|
210
177
|
onClose(ev);
|
|
211
178
|
setOpen(false);
|
|
212
179
|
} : void 0;
|
|
213
|
-
const isNeutral = severity === "neutral";
|
|
214
180
|
const isOpen = controlledOpen ?? open;
|
|
215
181
|
return /* @__PURE__ */ jsx(Fade, { in: isOpen, appear: false, children: /* @__PURE__ */ jsxs(
|
|
216
182
|
StyledAlert,
|
|
217
183
|
{
|
|
218
184
|
ref,
|
|
219
|
-
severity
|
|
220
|
-
isNeutral,
|
|
185
|
+
severity,
|
|
221
186
|
content,
|
|
222
187
|
action,
|
|
223
188
|
onClose: handleClose,
|
|
@@ -241,6 +206,5 @@ const Alert = forwardRef(_Alert);
|
|
|
241
206
|
export {
|
|
242
207
|
Alert as A,
|
|
243
208
|
Link as L,
|
|
244
|
-
ScreenReaderOnly as S
|
|
245
|
-
useTranslationFallback as u
|
|
209
|
+
ScreenReaderOnly as S
|
|
246
210
|
};
|
|
@@ -4,8 +4,7 @@ const React = require("react");
|
|
|
4
4
|
const material = require("@mui/material");
|
|
5
5
|
const iconsMaterial = require("@mui/icons-material");
|
|
6
6
|
require("cartocolor");
|
|
7
|
-
const cssUtils = require("./css-utils-
|
|
8
|
-
const reactIntl = require("react-intl");
|
|
7
|
+
const cssUtils = require("./css-utils-DjvM17Vb.cjs");
|
|
9
8
|
const ScreenReaderOnly = material.styled("span")(() => ({
|
|
10
9
|
position: "absolute",
|
|
11
10
|
width: 1,
|
|
@@ -17,14 +16,6 @@ const ScreenReaderOnly = material.styled("span")(() => ({
|
|
|
17
16
|
whiteSpace: "nowrap",
|
|
18
17
|
border: 0
|
|
19
18
|
}));
|
|
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;
|
|
25
|
-
}
|
|
26
|
-
return intlConfig.formatMessage({ id: translationKey });
|
|
27
|
-
}
|
|
28
19
|
const StyledLink = material.styled(material.Link)(() => ({
|
|
29
20
|
display: "inline-block"
|
|
30
21
|
}));
|
|
@@ -83,7 +74,7 @@ function _Link({
|
|
|
83
74
|
"aria-describedby": ariaDescribedby,
|
|
84
75
|
...otherProps
|
|
85
76
|
}, ref) {
|
|
86
|
-
const screenReaderTextValue =
|
|
77
|
+
const screenReaderTextValue = cssUtils.useTranslationWithFallback(
|
|
87
78
|
"c4r.button.opensInNewTab",
|
|
88
79
|
screenReaderText
|
|
89
80
|
);
|
|
@@ -114,7 +105,6 @@ function _Link({
|
|
|
114
105
|
const Link = React.forwardRef(_Link);
|
|
115
106
|
const StyledAlert = material.styled(material.Alert, {
|
|
116
107
|
shouldForwardProp: (prop) => ![
|
|
117
|
-
"isNeutral",
|
|
118
108
|
"content",
|
|
119
109
|
"hasCloseButton",
|
|
120
110
|
"hasAction",
|
|
@@ -122,15 +112,7 @@ const StyledAlert = material.styled(material.Alert, {
|
|
|
122
112
|
"isSticky"
|
|
123
113
|
].includes(prop)
|
|
124
114
|
})(
|
|
125
|
-
({
|
|
126
|
-
isNeutral,
|
|
127
|
-
content,
|
|
128
|
-
hasCloseButton,
|
|
129
|
-
hasAction,
|
|
130
|
-
hasTitle,
|
|
131
|
-
isSticky,
|
|
132
|
-
theme
|
|
133
|
-
}) => ({
|
|
115
|
+
({ content, hasCloseButton, hasAction, hasTitle, isSticky, theme }) => ({
|
|
134
116
|
columnGap: theme.spacing(1),
|
|
135
117
|
minHeight: theme.spacing(6),
|
|
136
118
|
...hasAction && {
|
|
@@ -141,10 +123,6 @@ const StyledAlert = material.styled(material.Alert, {
|
|
|
141
123
|
`,
|
|
142
124
|
gridTemplateColumns: hasCloseButton ? `${cssUtils.ICON_SIZE_MEDIUM} 1fr ${theme.spacing(3)}` : `${cssUtils.ICON_SIZE_MEDIUM}`
|
|
143
125
|
},
|
|
144
|
-
...isNeutral && {
|
|
145
|
-
backgroundColor: theme.palette.default.background,
|
|
146
|
-
color: theme.palette.text.primary
|
|
147
|
-
},
|
|
148
126
|
...isSticky && {
|
|
149
127
|
borderRadius: 0
|
|
150
128
|
},
|
|
@@ -160,14 +138,6 @@ const StyledAlert = material.styled(material.Alert, {
|
|
|
160
138
|
},
|
|
161
139
|
...hasAction && {
|
|
162
140
|
gridArea: "message"
|
|
163
|
-
},
|
|
164
|
-
...isNeutral && {
|
|
165
|
-
"& :not(.MuiAlertTitle-root)": {
|
|
166
|
-
color: theme.palette.text.secondary
|
|
167
|
-
},
|
|
168
|
-
a: {
|
|
169
|
-
color: `${theme.palette.primary.main} !important`
|
|
170
|
-
}
|
|
171
141
|
}
|
|
172
142
|
},
|
|
173
143
|
".MuiAlert-icon": {
|
|
@@ -175,9 +145,6 @@ const StyledAlert = material.styled(material.Alert, {
|
|
|
175
145
|
marginRight: 0,
|
|
176
146
|
...hasAction && {
|
|
177
147
|
gridArea: "icon"
|
|
178
|
-
},
|
|
179
|
-
...isNeutral && {
|
|
180
|
-
color: theme.palette.text.primary
|
|
181
148
|
}
|
|
182
149
|
},
|
|
183
150
|
".MuiAlert-action": {
|
|
@@ -211,14 +178,12 @@ function _Alert({
|
|
|
211
178
|
onClose(ev);
|
|
212
179
|
setOpen(false);
|
|
213
180
|
} : void 0;
|
|
214
|
-
const isNeutral = severity === "neutral";
|
|
215
181
|
const isOpen = controlledOpen ?? open;
|
|
216
182
|
return /* @__PURE__ */ jsxRuntime.jsx(material.Fade, { in: isOpen, appear: false, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
217
183
|
StyledAlert,
|
|
218
184
|
{
|
|
219
185
|
ref,
|
|
220
|
-
severity
|
|
221
|
-
isNeutral,
|
|
186
|
+
severity,
|
|
222
187
|
content,
|
|
223
188
|
action,
|
|
224
189
|
onClose: handleClose,
|
|
@@ -242,4 +207,3 @@ const Alert = React.forwardRef(_Alert);
|
|
|
242
207
|
exports.Alert = Alert;
|
|
243
208
|
exports.Link = Link;
|
|
244
209
|
exports.ScreenReaderOnly = ScreenReaderOnly;
|
|
245
|
-
exports.useTranslationFallback = useTranslationFallback;
|
|
@@ -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 { f as MENU_ITEM_SIZE_DENSE, h as MENU_ITEM_SIZE_EXTENDED } from "./css-utils-
|
|
4
|
+
import { f as MENU_ITEM_SIZE_DENSE, h as MENU_ITEM_SIZE_EXTENDED } from "./css-utils-BHYA7By_.js";
|
|
5
5
|
const StyledMenuItem = styled(MenuItem$1, {
|
|
6
6
|
shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
|
|
7
7
|
prop
|
|
@@ -108,10 +108,13 @@ const StyledMenuItem = styled(MenuItem$1, {
|
|
|
108
108
|
zIndex: 2,
|
|
109
109
|
minHeight: MENU_ITEM_SIZE_EXTENDED,
|
|
110
110
|
marginBottom: theme.spacing(1),
|
|
111
|
-
padding: theme.spacing(0.5,
|
|
111
|
+
padding: theme.spacing(0.5, 0),
|
|
112
112
|
backgroundColor: `${theme.palette.background.paper} !important`,
|
|
113
113
|
borderBottom: `1px solid ${theme.palette.divider}`
|
|
114
114
|
},
|
|
115
|
+
"&.MuiMenuItem-gutters": {
|
|
116
|
+
padding: theme.spacing(0.5, 1.5)
|
|
117
|
+
},
|
|
115
118
|
".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type": {
|
|
116
119
|
minHeight: MENU_ITEM_SIZE_EXTENDED,
|
|
117
120
|
marginTop: 0,
|
|
@@ -128,6 +131,9 @@ const StyledMenuItem = styled(MenuItem$1, {
|
|
|
128
131
|
...dense && {
|
|
129
132
|
"&.MuiButtonBase-root.MuiMenuItem-root": {
|
|
130
133
|
minHeight: MENU_ITEM_SIZE_DENSE,
|
|
134
|
+
padding: theme.spacing(0.25, 0)
|
|
135
|
+
},
|
|
136
|
+
"&.MuiButtonBase-root.MuiMenuItem-gutters": {
|
|
131
137
|
padding: theme.spacing(0.25, 1.5)
|
|
132
138
|
}
|
|
133
139
|
}
|
|
@@ -141,6 +147,7 @@ function _MenuItem({
|
|
|
141
147
|
fixed,
|
|
142
148
|
iconColor = "primary",
|
|
143
149
|
dense,
|
|
150
|
+
disableGutters,
|
|
144
151
|
...props
|
|
145
152
|
}, ref) {
|
|
146
153
|
return /* @__PURE__ */ jsx(
|
|
@@ -156,11 +163,13 @@ function _MenuItem({
|
|
|
156
163
|
dense,
|
|
157
164
|
fixed,
|
|
158
165
|
iconColor,
|
|
166
|
+
disableGutters,
|
|
159
167
|
"data-destructive": destructive,
|
|
160
168
|
"data-extended": extended,
|
|
161
169
|
"data-dense": dense,
|
|
162
170
|
"data-fixed": fixed,
|
|
163
|
-
"data-icon-color": iconColor
|
|
171
|
+
"data-icon-color": iconColor,
|
|
172
|
+
"data-disable-gutters": disableGutters
|
|
164
173
|
}
|
|
165
174
|
);
|
|
166
175
|
}
|
|
@@ -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 cssUtils = require("./css-utils-
|
|
5
|
+
const cssUtils = require("./css-utils-DjvM17Vb.cjs");
|
|
6
6
|
const StyledMenuItem = material.styled(material.MenuItem, {
|
|
7
7
|
shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
|
|
8
8
|
prop
|
|
@@ -109,10 +109,13 @@ const StyledMenuItem = material.styled(material.MenuItem, {
|
|
|
109
109
|
zIndex: 2,
|
|
110
110
|
minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED,
|
|
111
111
|
marginBottom: theme.spacing(1),
|
|
112
|
-
padding: theme.spacing(0.5,
|
|
112
|
+
padding: theme.spacing(0.5, 0),
|
|
113
113
|
backgroundColor: `${theme.palette.background.paper} !important`,
|
|
114
114
|
borderBottom: `1px solid ${theme.palette.divider}`
|
|
115
115
|
},
|
|
116
|
+
"&.MuiMenuItem-gutters": {
|
|
117
|
+
padding: theme.spacing(0.5, 1.5)
|
|
118
|
+
},
|
|
116
119
|
".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type": {
|
|
117
120
|
minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED,
|
|
118
121
|
marginTop: 0,
|
|
@@ -129,6 +132,9 @@ const StyledMenuItem = material.styled(material.MenuItem, {
|
|
|
129
132
|
...dense && {
|
|
130
133
|
"&.MuiButtonBase-root.MuiMenuItem-root": {
|
|
131
134
|
minHeight: cssUtils.MENU_ITEM_SIZE_DENSE,
|
|
135
|
+
padding: theme.spacing(0.25, 0)
|
|
136
|
+
},
|
|
137
|
+
"&.MuiButtonBase-root.MuiMenuItem-gutters": {
|
|
132
138
|
padding: theme.spacing(0.25, 1.5)
|
|
133
139
|
}
|
|
134
140
|
}
|
|
@@ -142,6 +148,7 @@ function _MenuItem({
|
|
|
142
148
|
fixed,
|
|
143
149
|
iconColor = "primary",
|
|
144
150
|
dense,
|
|
151
|
+
disableGutters,
|
|
145
152
|
...props
|
|
146
153
|
}, ref) {
|
|
147
154
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -157,11 +164,13 @@ function _MenuItem({
|
|
|
157
164
|
dense,
|
|
158
165
|
fixed,
|
|
159
166
|
iconColor,
|
|
167
|
+
disableGutters,
|
|
160
168
|
"data-destructive": destructive,
|
|
161
169
|
"data-extended": extended,
|
|
162
170
|
"data-dense": dense,
|
|
163
171
|
"data-fixed": fixed,
|
|
164
|
-
"data-icon-color": iconColor
|
|
172
|
+
"data-icon-color": iconColor,
|
|
173
|
+
"data-disable-gutters": disableGutters
|
|
165
174
|
}
|
|
166
175
|
);
|
|
167
176
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { createSvgIcon } from "@mui/material";
|
|
4
|
-
const Icon
|
|
4
|
+
const Icon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
|
|
5
5
|
"path",
|
|
6
6
|
{
|
|
7
7
|
fill: "currentColor",
|
|
@@ -10,26 +10,8 @@ const Icon$1 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000
|
|
|
10
10
|
clipRule: "evenodd"
|
|
11
11
|
}
|
|
12
12
|
) });
|
|
13
|
-
const BaseSvgIcon
|
|
13
|
+
const BaseSvgIcon = createSvgIcon(Icon(), "Search");
|
|
14
14
|
function Search({ width, height, sx, ...props }, ref) {
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
BaseSvgIcon$1,
|
|
17
|
-
{
|
|
18
|
-
ref,
|
|
19
|
-
viewBox: "0 0 24 24",
|
|
20
|
-
sx: {
|
|
21
|
-
width,
|
|
22
|
-
height: height || width,
|
|
23
|
-
...sx
|
|
24
|
-
},
|
|
25
|
-
...props
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
const Search$1 = forwardRef(Search);
|
|
30
|
-
const Icon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx("rect", { width: 16, height: 16, x: 4, y: 4, fill: "currentColor", rx: 2 }) });
|
|
31
|
-
const BaseSvgIcon = createSvgIcon(Icon(), "SwatchSquare");
|
|
32
|
-
function SwatchSquare({ width, height, sx, ...props }, ref) {
|
|
33
15
|
return /* @__PURE__ */ jsx(
|
|
34
16
|
BaseSvgIcon,
|
|
35
17
|
{
|
|
@@ -44,8 +26,7 @@ function SwatchSquare({ width, height, sx, ...props }, ref) {
|
|
|
44
26
|
}
|
|
45
27
|
);
|
|
46
28
|
}
|
|
47
|
-
const
|
|
29
|
+
const Search$1 = forwardRef(Search);
|
|
48
30
|
export {
|
|
49
|
-
Search$1 as S
|
|
50
|
-
SwatchSquare$1 as a
|
|
31
|
+
Search$1 as S
|
|
51
32
|
};
|
|
@@ -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 Icon
|
|
5
|
+
const Icon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6
6
|
"path",
|
|
7
7
|
{
|
|
8
8
|
fill: "currentColor",
|
|
@@ -11,26 +11,8 @@ const Icon$1 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.
|
|
|
11
11
|
clipRule: "evenodd"
|
|
12
12
|
}
|
|
13
13
|
) });
|
|
14
|
-
const BaseSvgIcon
|
|
14
|
+
const BaseSvgIcon = material.createSvgIcon(Icon(), "Search");
|
|
15
15
|
function Search({ width, height, sx, ...props }, ref) {
|
|
16
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17
|
-
BaseSvgIcon$1,
|
|
18
|
-
{
|
|
19
|
-
ref,
|
|
20
|
-
viewBox: "0 0 24 24",
|
|
21
|
-
sx: {
|
|
22
|
-
width,
|
|
23
|
-
height: height || width,
|
|
24
|
-
...sx
|
|
25
|
-
},
|
|
26
|
-
...props
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
const Search$1 = React.forwardRef(Search);
|
|
31
|
-
const Icon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: 16, height: 16, x: 4, y: 4, fill: "currentColor", rx: 2 }) });
|
|
32
|
-
const BaseSvgIcon = material.createSvgIcon(Icon(), "SwatchSquare");
|
|
33
|
-
function SwatchSquare({ width, height, sx, ...props }, ref) {
|
|
34
16
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35
17
|
BaseSvgIcon,
|
|
36
18
|
{
|
|
@@ -45,6 +27,5 @@ function SwatchSquare({ width, height, sx, ...props }, ref) {
|
|
|
45
27
|
}
|
|
46
28
|
);
|
|
47
29
|
}
|
|
48
|
-
const
|
|
30
|
+
const Search$1 = React.forwardRef(Search);
|
|
49
31
|
exports.Search = Search$1;
|
|
50
|
-
exports.SwatchSquare = SwatchSquare$1;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { createSvgIcon } from "@mui/material";
|
|
4
|
+
const Icon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx("rect", { width: 16, height: 16, x: 4, y: 4, fill: "currentColor", rx: 2 }) });
|
|
5
|
+
const BaseSvgIcon = createSvgIcon(Icon(), "SwatchSquare");
|
|
6
|
+
function SwatchSquare({ width, height, sx, ...props }, ref) {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
BaseSvgIcon,
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
sx: {
|
|
13
|
+
width,
|
|
14
|
+
height: height || width,
|
|
15
|
+
...sx
|
|
16
|
+
},
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
const SwatchSquare$1 = forwardRef(SwatchSquare);
|
|
22
|
+
export {
|
|
23
|
+
SwatchSquare$1 as S
|
|
24
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const material = require("@mui/material");
|
|
5
|
+
const Icon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: 16, height: 16, x: 4, y: 4, fill: "currentColor", rx: 2 }) });
|
|
6
|
+
const BaseSvgIcon = material.createSvgIcon(Icon(), "SwatchSquare");
|
|
7
|
+
function SwatchSquare({ width, height, sx, ...props }, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
|
+
BaseSvgIcon,
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
sx: {
|
|
14
|
+
width,
|
|
15
|
+
height: height || width,
|
|
16
|
+
...sx
|
|
17
|
+
},
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
const SwatchSquare$1 = React.forwardRef(SwatchSquare);
|
|
23
|
+
exports.SwatchSquare = SwatchSquare$1;
|