@carto/meridian-ds 2.6.1-alpha-searchfield.4 → 2.6.1-alpha-searchfield.6
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 +5 -0
- package/dist/{Alert-1-pacqlp.js → Alert-BfDnWlbD.js} +2 -28
- package/dist/{Alert-N-6EugaP.cjs → Alert-CPvYAHO_.cjs} +2 -28
- package/dist/components/index.cjs +56 -75
- package/dist/components/index.js +57 -76
- package/dist/theme/index.cjs +59 -3
- package/dist/theme/index.js +60 -4
- 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/Avatar/Avatar.d.ts +0 -2
- package/dist/types/components/Avatar/Avatar.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/SearchField/SearchField.stories.d.ts +0 -3
- package/dist/types/components/SearchField/SearchField.stories.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.styled.d.ts.map +1 -1
- package/dist/types/components/SearchField/components/SearchFieldEndAdornment.d.ts +1 -1
- package/dist/types/components/SearchField/components/SearchFieldEndAdornment.d.ts.map +1 -1
- package/dist/types/components/SearchField/types.d.ts +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/types.d.ts +11 -0
- package/dist/types/theme/types.d.ts.map +1 -1
- package/dist/widgets/index.cjs +1 -1
- package/dist/widgets/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
5
|
- New SearchField component [#308](https://github.com/CartoDB/meridian-ds/pull/308)
|
|
6
|
+
- Avatar: move size styles to the theme [#321](https://github.com/CartoDB/meridian-ds/pull/321)
|
|
7
|
+
- Alert: move neutral styles to the theme [#320](https://github.com/CartoDB/meridian-ds/pull/320)
|
|
8
|
+
- Handle empty buttonFooterLabelId in CodeAreaFooter [#323](https://github.com/CartoDB/meridian-ds/pull/323)
|
|
6
9
|
- Dialog: add a property to override content gap [#322](https://github.com/CartoDB/meridian-ds/pull/322)
|
|
7
10
|
- Improve translations handling in Meridian (part 4) [#309](https://github.com/CartoDB/meridian-ds/pull/309)
|
|
11
|
+
- Improve translations handling in Meridian (part 3) [#306](https://github.com/CartoDB/meridian-ds/pull/306)
|
|
8
12
|
- Improve translations handling in Meridian (part 2) [#305](https://github.com/CartoDB/meridian-ds/pull/305)
|
|
9
13
|
- Improve translations handling in Meridian (part 1) [#304](https://github.com/CartoDB/meridian-ds/pull/304)
|
|
10
14
|
- FilterDropdown: improve customization [#312](https://github.com/CartoDB/meridian-ds/pull/312)
|
|
11
15
|
- CopiableComponent: improve customization [#311](https://github.com/CartoDB/meridian-ds/pull/311)
|
|
16
|
+
- AppBar: disallow user selection of text [#324](https://github.com/CartoDB/meridian-ds/pull/324)
|
|
12
17
|
|
|
13
18
|
## 2.0
|
|
14
19
|
|
|
@@ -104,7 +104,6 @@ function _Link({
|
|
|
104
104
|
const Link = forwardRef(_Link);
|
|
105
105
|
const StyledAlert = styled(Alert$1, {
|
|
106
106
|
shouldForwardProp: (prop) => ![
|
|
107
|
-
"isNeutral",
|
|
108
107
|
"content",
|
|
109
108
|
"hasCloseButton",
|
|
110
109
|
"hasAction",
|
|
@@ -112,15 +111,7 @@ const StyledAlert = styled(Alert$1, {
|
|
|
112
111
|
"isSticky"
|
|
113
112
|
].includes(prop)
|
|
114
113
|
})(
|
|
115
|
-
({
|
|
116
|
-
isNeutral,
|
|
117
|
-
content,
|
|
118
|
-
hasCloseButton,
|
|
119
|
-
hasAction,
|
|
120
|
-
hasTitle,
|
|
121
|
-
isSticky,
|
|
122
|
-
theme
|
|
123
|
-
}) => ({
|
|
114
|
+
({ content, hasCloseButton, hasAction, hasTitle, isSticky, theme }) => ({
|
|
124
115
|
columnGap: theme.spacing(1),
|
|
125
116
|
minHeight: theme.spacing(6),
|
|
126
117
|
...hasAction && {
|
|
@@ -131,10 +122,6 @@ const StyledAlert = styled(Alert$1, {
|
|
|
131
122
|
`,
|
|
132
123
|
gridTemplateColumns: hasCloseButton ? `${ICON_SIZE_MEDIUM} 1fr ${theme.spacing(3)}` : `${ICON_SIZE_MEDIUM}`
|
|
133
124
|
},
|
|
134
|
-
...isNeutral && {
|
|
135
|
-
backgroundColor: theme.palette.default.background,
|
|
136
|
-
color: theme.palette.text.primary
|
|
137
|
-
},
|
|
138
125
|
...isSticky && {
|
|
139
126
|
borderRadius: 0
|
|
140
127
|
},
|
|
@@ -150,14 +137,6 @@ const StyledAlert = styled(Alert$1, {
|
|
|
150
137
|
},
|
|
151
138
|
...hasAction && {
|
|
152
139
|
gridArea: "message"
|
|
153
|
-
},
|
|
154
|
-
...isNeutral && {
|
|
155
|
-
"& :not(.MuiAlertTitle-root)": {
|
|
156
|
-
color: theme.palette.text.secondary
|
|
157
|
-
},
|
|
158
|
-
a: {
|
|
159
|
-
color: `${theme.palette.primary.main} !important`
|
|
160
|
-
}
|
|
161
140
|
}
|
|
162
141
|
},
|
|
163
142
|
".MuiAlert-icon": {
|
|
@@ -165,9 +144,6 @@ const StyledAlert = styled(Alert$1, {
|
|
|
165
144
|
marginRight: 0,
|
|
166
145
|
...hasAction && {
|
|
167
146
|
gridArea: "icon"
|
|
168
|
-
},
|
|
169
|
-
...isNeutral && {
|
|
170
|
-
color: theme.palette.text.primary
|
|
171
147
|
}
|
|
172
148
|
},
|
|
173
149
|
".MuiAlert-action": {
|
|
@@ -201,14 +177,12 @@ function _Alert({
|
|
|
201
177
|
onClose(ev);
|
|
202
178
|
setOpen(false);
|
|
203
179
|
} : void 0;
|
|
204
|
-
const isNeutral = severity === "neutral";
|
|
205
180
|
const isOpen = controlledOpen ?? open;
|
|
206
181
|
return /* @__PURE__ */ jsx(Fade, { in: isOpen, appear: false, children: /* @__PURE__ */ jsxs(
|
|
207
182
|
StyledAlert,
|
|
208
183
|
{
|
|
209
184
|
ref,
|
|
210
|
-
severity
|
|
211
|
-
isNeutral,
|
|
185
|
+
severity,
|
|
212
186
|
content,
|
|
213
187
|
action,
|
|
214
188
|
onClose: handleClose,
|
|
@@ -105,7 +105,6 @@ function _Link({
|
|
|
105
105
|
const Link = React.forwardRef(_Link);
|
|
106
106
|
const StyledAlert = material.styled(material.Alert, {
|
|
107
107
|
shouldForwardProp: (prop) => ![
|
|
108
|
-
"isNeutral",
|
|
109
108
|
"content",
|
|
110
109
|
"hasCloseButton",
|
|
111
110
|
"hasAction",
|
|
@@ -113,15 +112,7 @@ const StyledAlert = material.styled(material.Alert, {
|
|
|
113
112
|
"isSticky"
|
|
114
113
|
].includes(prop)
|
|
115
114
|
})(
|
|
116
|
-
({
|
|
117
|
-
isNeutral,
|
|
118
|
-
content,
|
|
119
|
-
hasCloseButton,
|
|
120
|
-
hasAction,
|
|
121
|
-
hasTitle,
|
|
122
|
-
isSticky,
|
|
123
|
-
theme
|
|
124
|
-
}) => ({
|
|
115
|
+
({ content, hasCloseButton, hasAction, hasTitle, isSticky, theme }) => ({
|
|
125
116
|
columnGap: theme.spacing(1),
|
|
126
117
|
minHeight: theme.spacing(6),
|
|
127
118
|
...hasAction && {
|
|
@@ -132,10 +123,6 @@ const StyledAlert = material.styled(material.Alert, {
|
|
|
132
123
|
`,
|
|
133
124
|
gridTemplateColumns: hasCloseButton ? `${cssUtils.ICON_SIZE_MEDIUM} 1fr ${theme.spacing(3)}` : `${cssUtils.ICON_SIZE_MEDIUM}`
|
|
134
125
|
},
|
|
135
|
-
...isNeutral && {
|
|
136
|
-
backgroundColor: theme.palette.default.background,
|
|
137
|
-
color: theme.palette.text.primary
|
|
138
|
-
},
|
|
139
126
|
...isSticky && {
|
|
140
127
|
borderRadius: 0
|
|
141
128
|
},
|
|
@@ -151,14 +138,6 @@ const StyledAlert = material.styled(material.Alert, {
|
|
|
151
138
|
},
|
|
152
139
|
...hasAction && {
|
|
153
140
|
gridArea: "message"
|
|
154
|
-
},
|
|
155
|
-
...isNeutral && {
|
|
156
|
-
"& :not(.MuiAlertTitle-root)": {
|
|
157
|
-
color: theme.palette.text.secondary
|
|
158
|
-
},
|
|
159
|
-
a: {
|
|
160
|
-
color: `${theme.palette.primary.main} !important`
|
|
161
|
-
}
|
|
162
141
|
}
|
|
163
142
|
},
|
|
164
143
|
".MuiAlert-icon": {
|
|
@@ -166,9 +145,6 @@ const StyledAlert = material.styled(material.Alert, {
|
|
|
166
145
|
marginRight: 0,
|
|
167
146
|
...hasAction && {
|
|
168
147
|
gridArea: "icon"
|
|
169
|
-
},
|
|
170
|
-
...isNeutral && {
|
|
171
|
-
color: theme.palette.text.primary
|
|
172
148
|
}
|
|
173
149
|
},
|
|
174
150
|
".MuiAlert-action": {
|
|
@@ -202,14 +178,12 @@ function _Alert({
|
|
|
202
178
|
onClose(ev);
|
|
203
179
|
setOpen(false);
|
|
204
180
|
} : void 0;
|
|
205
|
-
const isNeutral = severity === "neutral";
|
|
206
181
|
const isOpen = controlledOpen ?? open;
|
|
207
182
|
return /* @__PURE__ */ jsxRuntime.jsx(material.Fade, { in: isOpen, appear: false, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
208
183
|
StyledAlert,
|
|
209
184
|
{
|
|
210
185
|
ref,
|
|
211
|
-
severity
|
|
212
|
-
isNeutral,
|
|
186
|
+
severity,
|
|
213
187
|
content,
|
|
214
188
|
action,
|
|
215
189
|
onClose: handleClose,
|
|
@@ -5,7 +5,7 @@ const React = require("react");
|
|
|
5
5
|
const material = require("@mui/material");
|
|
6
6
|
const iconsMaterial = require("@mui/icons-material");
|
|
7
7
|
const cssUtils = require("../css-utils-DjvM17Vb.cjs");
|
|
8
|
-
const Alert$1 = require("../Alert-
|
|
8
|
+
const Alert$1 = require("../Alert-CPvYAHO_.cjs");
|
|
9
9
|
const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
|
|
10
10
|
const OpenDiagonallyRight = require("../OpenDiagonallyRight-CpL4ROwg.cjs");
|
|
11
11
|
const MenuItem = require("../MenuItem-BPvH70wa.cjs");
|
|
@@ -36,8 +36,8 @@ require("codemirror/addon/fold/indent-fold.js");
|
|
|
36
36
|
require("codemirror/addon/fold/markdown-fold.js");
|
|
37
37
|
require("codemirror/addon/fold/comment-fold.js");
|
|
38
38
|
const ClickAwayListener = require("@mui/material/ClickAwayListener");
|
|
39
|
-
const reactIntl = require("react-intl");
|
|
40
39
|
const DatePicker$1 = require("@mui/x-date-pickers/DatePicker");
|
|
40
|
+
const reactIntl = require("react-intl");
|
|
41
41
|
const xDatePickers = require("@mui/x-date-pickers");
|
|
42
42
|
const TimePicker$1 = require("@mui/x-date-pickers/TimePicker");
|
|
43
43
|
const DateTimePicker$1 = require("@mui/x-date-pickers/DateTimePicker");
|
|
@@ -1904,6 +1904,7 @@ function SecondaryText({ text }) {
|
|
|
1904
1904
|
}
|
|
1905
1905
|
const Root$4 = material.styled(material.AppBar)(({ theme }) => ({
|
|
1906
1906
|
backgroundColor: theme.palette.brand.appBarMain,
|
|
1907
|
+
userSelect: "none",
|
|
1907
1908
|
"& .MuiTypography-root": {
|
|
1908
1909
|
color: theme.palette.brand.appBarContrastText
|
|
1909
1910
|
},
|
|
@@ -1980,7 +1981,7 @@ function CodeAreaFooter({
|
|
|
1980
1981
|
...props
|
|
1981
1982
|
}) {
|
|
1982
1983
|
const buttonFooterLabel = cssUtils.useTranslationWithFallback(
|
|
1983
|
-
buttonFooterLabelId
|
|
1984
|
+
buttonFooterLabelId || "c4r.button.save",
|
|
1984
1985
|
buttonFooterText
|
|
1985
1986
|
);
|
|
1986
1987
|
const changesSavedLabel = cssUtils.useTranslationWithFallback(
|
|
@@ -3955,10 +3956,13 @@ function DatePicker({
|
|
|
3955
3956
|
readOnly,
|
|
3956
3957
|
"aria-label": ariaLabel,
|
|
3957
3958
|
"data-testid": dataTestId,
|
|
3959
|
+
chooseDateAriaLabel,
|
|
3958
3960
|
...props
|
|
3959
3961
|
}) {
|
|
3960
|
-
const
|
|
3961
|
-
|
|
3962
|
+
const chooseDateText = cssUtils.useTranslationWithFallback(
|
|
3963
|
+
"c4r.form.chooseDate",
|
|
3964
|
+
chooseDateAriaLabel
|
|
3965
|
+
);
|
|
3962
3966
|
return (
|
|
3963
3967
|
// Don't remove className, it's used for styling
|
|
3964
3968
|
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { className: "CartoDatePicker-root", "data-testid": "date-picker", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4003,16 +4007,7 @@ function DatePicker({
|
|
|
4003
4007
|
},
|
|
4004
4008
|
slots: {
|
|
4005
4009
|
clearButton: (props2) => /* @__PURE__ */ jsxRuntime.jsx(ClearButton, { ...props2, size, variant }),
|
|
4006
|
-
openPickerButton: (props2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4007
|
-
material.IconButton,
|
|
4008
|
-
{
|
|
4009
|
-
...props2,
|
|
4010
|
-
size,
|
|
4011
|
-
"aria-label": intlConfig.formatMessage({
|
|
4012
|
-
id: "c4r.form.chooseDate"
|
|
4013
|
-
})
|
|
4014
|
-
}
|
|
4015
|
-
),
|
|
4010
|
+
openPickerButton: (props2) => /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { ...props2, size, "aria-label": chooseDateText }),
|
|
4016
4011
|
...slots
|
|
4017
4012
|
},
|
|
4018
4013
|
disableOpenPicker: !showCalendar,
|
|
@@ -4241,12 +4236,14 @@ function DateRangePicker({
|
|
|
4241
4236
|
variant = "outlined",
|
|
4242
4237
|
startProps,
|
|
4243
4238
|
endProps,
|
|
4239
|
+
startDateLabel,
|
|
4240
|
+
endDateLabel,
|
|
4241
|
+
startDateCalendarAriaLabel,
|
|
4242
|
+
endDateCalendarAriaLabel,
|
|
4244
4243
|
"aria-label": ariaLabel,
|
|
4245
4244
|
"data-testid": dataTestId,
|
|
4246
4245
|
...props
|
|
4247
4246
|
}) {
|
|
4248
|
-
const intl = reactIntl.useIntl();
|
|
4249
|
-
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
4250
4247
|
const [isEndDateOpen, setIsEndDateOpen] = React.useState(false);
|
|
4251
4248
|
const [isStartDateOpen, setIsStartDateOpen] = React.useState(false);
|
|
4252
4249
|
const [startDate, setStartDate] = React.useState(
|
|
@@ -4257,6 +4254,22 @@ function DateRangePicker({
|
|
|
4257
4254
|
(endProps == null ? void 0 : endProps.value) ?? (startProps == null ? void 0 : startProps.value) ?? /* @__PURE__ */ new Date()
|
|
4258
4255
|
);
|
|
4259
4256
|
const hasError = error ?? (startProps == null ? void 0 : startProps.error) ?? (endProps == null ? void 0 : endProps.error);
|
|
4257
|
+
const _startDateLabel = cssUtils.useTranslationWithFallback(
|
|
4258
|
+
"c4r.form.startDate",
|
|
4259
|
+
startDateLabel
|
|
4260
|
+
);
|
|
4261
|
+
const _endDateLabel = cssUtils.useTranslationWithFallback(
|
|
4262
|
+
"c4r.form.endDate",
|
|
4263
|
+
endDateLabel
|
|
4264
|
+
);
|
|
4265
|
+
const startCalendarAriaLabel = cssUtils.useTranslationWithFallback(
|
|
4266
|
+
"c4r.form.startDateCalendar",
|
|
4267
|
+
startDateCalendarAriaLabel
|
|
4268
|
+
);
|
|
4269
|
+
const endCalendarAriaLabel = cssUtils.useTranslationWithFallback(
|
|
4270
|
+
"c4r.form.endDateCalendar",
|
|
4271
|
+
endDateCalendarAriaLabel
|
|
4272
|
+
);
|
|
4260
4273
|
const handleStartDateChange = (value, context) => {
|
|
4261
4274
|
setStartDate(value);
|
|
4262
4275
|
if (startProps == null ? void 0 : startProps.onChange) {
|
|
@@ -4310,13 +4323,11 @@ function DateRangePicker({
|
|
|
4310
4323
|
...startProps,
|
|
4311
4324
|
value: (startProps == null ? void 0 : startProps.value) ?? startDate,
|
|
4312
4325
|
maxDate: endDate ?? void 0,
|
|
4313
|
-
label: (startProps == null ? void 0 : startProps.label) ??
|
|
4326
|
+
label: (startProps == null ? void 0 : startProps.label) ?? _startDateLabel,
|
|
4314
4327
|
slotProps: {
|
|
4315
4328
|
popper: {
|
|
4316
4329
|
placement: "bottom-start",
|
|
4317
|
-
"aria-label":
|
|
4318
|
-
id: "c4r.form.startDateCalendar"
|
|
4319
|
-
})
|
|
4330
|
+
"aria-label": startCalendarAriaLabel
|
|
4320
4331
|
},
|
|
4321
4332
|
...startProps == null ? void 0 : startProps.slotProps
|
|
4322
4333
|
},
|
|
@@ -4351,9 +4362,7 @@ function DateRangePicker({
|
|
|
4351
4362
|
minDate: startDate ?? void 0,
|
|
4352
4363
|
slotProps: {
|
|
4353
4364
|
popper: {
|
|
4354
|
-
"aria-label":
|
|
4355
|
-
id: "c4r.form.endDateCalendar"
|
|
4356
|
-
})
|
|
4365
|
+
"aria-label": endCalendarAriaLabel
|
|
4357
4366
|
},
|
|
4358
4367
|
...endProps == null ? void 0 : endProps.slotProps
|
|
4359
4368
|
},
|
|
@@ -4369,7 +4378,7 @@ function DateRangePicker({
|
|
|
4369
4378
|
),
|
|
4370
4379
|
...endProps == null ? void 0 : endProps.slots
|
|
4371
4380
|
},
|
|
4372
|
-
label: (endProps == null ? void 0 : endProps.label) ??
|
|
4381
|
+
label: (endProps == null ? void 0 : endProps.label) ?? _endDateLabel,
|
|
4373
4382
|
error: (endProps == null ? void 0 : endProps.error) ?? error,
|
|
4374
4383
|
open: isEndDateOpen,
|
|
4375
4384
|
onOpen: handleEndDateOpen,
|
|
@@ -4429,12 +4438,16 @@ function TimePicker({
|
|
|
4429
4438
|
ampm = true,
|
|
4430
4439
|
views = ["hours", "minutes"],
|
|
4431
4440
|
format,
|
|
4441
|
+
openPickerAriaLabel,
|
|
4432
4442
|
"data-testid": dataTestId,
|
|
4433
4443
|
"aria-label": ariaLabel,
|
|
4434
4444
|
...props
|
|
4435
4445
|
}) {
|
|
4436
|
-
const
|
|
4437
|
-
const
|
|
4446
|
+
const fieldLabel = cssUtils.useTranslationWithFallback("c4r.form.time", label);
|
|
4447
|
+
const chooseDateAriaLabel = cssUtils.useTranslationWithFallback(
|
|
4448
|
+
"c4r.form.chooseDate",
|
|
4449
|
+
openPickerAriaLabel
|
|
4450
|
+
);
|
|
4438
4451
|
const inputRef = React.useRef(null);
|
|
4439
4452
|
const [inputWidth, setInputWidth] = React.useState(0);
|
|
4440
4453
|
React.useEffect(() => {
|
|
@@ -4468,7 +4481,7 @@ function TimePicker({
|
|
|
4468
4481
|
label: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4469
4482
|
LabelWithIndicator,
|
|
4470
4483
|
{
|
|
4471
|
-
label:
|
|
4484
|
+
label: fieldLabel,
|
|
4472
4485
|
type,
|
|
4473
4486
|
icon: labelHelpTooltip && /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: labelHelpTooltip, children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.HelpOutline, { htmlColor: "text.secondary" }) })
|
|
4474
4487
|
}
|
|
@@ -4508,9 +4521,7 @@ function TimePicker({
|
|
|
4508
4521
|
{
|
|
4509
4522
|
...props2,
|
|
4510
4523
|
size,
|
|
4511
|
-
"aria-label":
|
|
4512
|
-
id: "c4r.form.chooseDate"
|
|
4513
|
-
})
|
|
4524
|
+
"aria-label": chooseDateAriaLabel
|
|
4514
4525
|
}
|
|
4515
4526
|
),
|
|
4516
4527
|
...slots
|
|
@@ -4540,12 +4551,16 @@ function DateTimePicker({
|
|
|
4540
4551
|
ampm = true,
|
|
4541
4552
|
views = ["hours", "minutes"],
|
|
4542
4553
|
format,
|
|
4554
|
+
openPickerAriaLabel,
|
|
4543
4555
|
"data-testid": dataTestId,
|
|
4544
4556
|
"aria-label": ariaLabel,
|
|
4545
4557
|
...props
|
|
4546
4558
|
}) {
|
|
4547
|
-
const
|
|
4548
|
-
const
|
|
4559
|
+
const fieldLabel = cssUtils.useTranslationWithFallback("c4r.form.time", label);
|
|
4560
|
+
const chooseDateAriaLabel = cssUtils.useTranslationWithFallback(
|
|
4561
|
+
"c4r.form.chooseDate",
|
|
4562
|
+
openPickerAriaLabel
|
|
4563
|
+
);
|
|
4549
4564
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4550
4565
|
DateFieldContainer,
|
|
4551
4566
|
{
|
|
@@ -4562,7 +4577,7 @@ function DateTimePicker({
|
|
|
4562
4577
|
label: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4563
4578
|
LabelWithIndicator,
|
|
4564
4579
|
{
|
|
4565
|
-
label:
|
|
4580
|
+
label: fieldLabel,
|
|
4566
4581
|
type,
|
|
4567
4582
|
icon: labelHelpTooltip && /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: labelHelpTooltip, children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.HelpOutline, { htmlColor: "text.secondary" }) })
|
|
4568
4583
|
}
|
|
@@ -4594,9 +4609,7 @@ function DateTimePicker({
|
|
|
4594
4609
|
{
|
|
4595
4610
|
...props2,
|
|
4596
4611
|
size,
|
|
4597
|
-
"aria-label":
|
|
4598
|
-
id: "c4r.form.chooseDate"
|
|
4599
|
-
})
|
|
4612
|
+
"aria-label": chooseDateAriaLabel
|
|
4600
4613
|
}
|
|
4601
4614
|
),
|
|
4602
4615
|
...slots
|
|
@@ -4709,37 +4722,6 @@ function _AccordionGroup({
|
|
|
4709
4722
|
);
|
|
4710
4723
|
}
|
|
4711
4724
|
const AccordionGroup = React.forwardRef(_AccordionGroup);
|
|
4712
|
-
const sizes = {
|
|
4713
|
-
large: 5,
|
|
4714
|
-
medium: 4,
|
|
4715
|
-
small: 3,
|
|
4716
|
-
xsmall: 2.25
|
|
4717
|
-
};
|
|
4718
|
-
const StyledAvatar = material.styled(material.Avatar, {
|
|
4719
|
-
shouldForwardProp: (prop) => prop !== "size" && prop !== "disabled"
|
|
4720
|
-
})(({ theme, size = "medium", disabled = false }) => ({
|
|
4721
|
-
width: theme.spacing(sizes[size]),
|
|
4722
|
-
height: theme.spacing(sizes[size]),
|
|
4723
|
-
...theme.typography.subtitle1,
|
|
4724
|
-
...size === "large" && {
|
|
4725
|
-
...theme.typography.h6
|
|
4726
|
-
},
|
|
4727
|
-
...size === "small" && {
|
|
4728
|
-
...theme.typography.caption,
|
|
4729
|
-
fontWeight: 500
|
|
4730
|
-
},
|
|
4731
|
-
...size === "xsmall" && {
|
|
4732
|
-
...theme.typography.caption,
|
|
4733
|
-
fontWeight: 500,
|
|
4734
|
-
svg: {
|
|
4735
|
-
width: cssUtils.ICON_SIZE_SMALL,
|
|
4736
|
-
height: cssUtils.ICON_SIZE_SMALL
|
|
4737
|
-
}
|
|
4738
|
-
},
|
|
4739
|
-
...disabled && {
|
|
4740
|
-
opacity: 0.6
|
|
4741
|
-
}
|
|
4742
|
-
}));
|
|
4743
4725
|
function _Avatar({
|
|
4744
4726
|
size,
|
|
4745
4727
|
disabled,
|
|
@@ -4748,7 +4730,7 @@ function _Avatar({
|
|
|
4748
4730
|
...otherProps
|
|
4749
4731
|
}, ref) {
|
|
4750
4732
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4751
|
-
|
|
4733
|
+
material.Avatar,
|
|
4752
4734
|
{
|
|
4753
4735
|
...otherProps,
|
|
4754
4736
|
ref,
|
|
@@ -5151,7 +5133,6 @@ const SearchFieldBase = material.styled(material.TextField, {
|
|
|
5151
5133
|
// Variants
|
|
5152
5134
|
...emphasis === "filled" && {
|
|
5153
5135
|
"& .MuiInputBase-root": {
|
|
5154
|
-
backgroundColor: minimized ? "inherit !important" : void 0,
|
|
5155
5136
|
// not disabled
|
|
5156
5137
|
"&:not(.Mui-disabled):hover": {
|
|
5157
5138
|
backgroundColor: `${theme.palette.action.hover} !important`
|
|
@@ -5162,10 +5143,10 @@ const SearchFieldBase = material.styled(material.TextField, {
|
|
|
5162
5143
|
"& .MuiInputBase-root": {
|
|
5163
5144
|
backgroundColor: "transparent !important",
|
|
5164
5145
|
"&:hover": {
|
|
5165
|
-
backgroundColor: "transparent"
|
|
5146
|
+
backgroundColor: minimized ? `${theme.palette.action.hover} !important` : "transparent !important"
|
|
5166
5147
|
},
|
|
5167
5148
|
"&.Mui-disabled": {
|
|
5168
|
-
backgroundColor: "transparent"
|
|
5149
|
+
backgroundColor: "transparent !important"
|
|
5169
5150
|
}
|
|
5170
5151
|
}
|
|
5171
5152
|
},
|
|
@@ -5174,10 +5155,10 @@ const SearchFieldBase = material.styled(material.TextField, {
|
|
|
5174
5155
|
backgroundColor: `${theme.palette.background.paper} !important`,
|
|
5175
5156
|
boxShadow: theme.shadows[1],
|
|
5176
5157
|
"&:hover": {
|
|
5177
|
-
backgroundColor: theme.palette.background.paper
|
|
5158
|
+
backgroundColor: minimized ? `${theme.palette.action.hover} !important` : `${theme.palette.background.paper} !important`
|
|
5178
5159
|
},
|
|
5179
5160
|
"&.Mui-disabled": {
|
|
5180
|
-
backgroundColor: theme.palette.background.paper
|
|
5161
|
+
backgroundColor: `${theme.palette.background.paper} !important`
|
|
5181
5162
|
}
|
|
5182
5163
|
}
|
|
5183
5164
|
}
|
|
@@ -5217,7 +5198,7 @@ const SearchFieldEndAdornment = ({
|
|
|
5217
5198
|
color: "default",
|
|
5218
5199
|
disabled,
|
|
5219
5200
|
tooltip: clearButtonLabel,
|
|
5220
|
-
"aria-label":
|
|
5201
|
+
"aria-label": clearButtonLabel,
|
|
5221
5202
|
icon: /* @__PURE__ */ jsxRuntime.jsx(ClearSearchIcon, {})
|
|
5222
5203
|
}
|
|
5223
5204
|
) : null,
|