@carto/meridian-ds 2.6.1-alpha-searchfield.5 → 2.6.1-alpha-searchfield.7

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/{Alert-1-pacqlp.js → Alert-BfDnWlbD.js} +2 -28
  3. package/dist/{Alert-N-6EugaP.cjs → Alert-CPvYAHO_.cjs} +2 -28
  4. package/dist/{MenuItem-GpTpLidu.js → MenuItem-D90EfuGS.js} +11 -2
  5. package/dist/{MenuItem-BPvH70wa.cjs → MenuItem-ZSYcQBtg.cjs} +11 -2
  6. package/dist/components/index.cjs +53 -71
  7. package/dist/components/index.js +54 -72
  8. package/dist/theme/index.cjs +64 -5
  9. package/dist/theme/index.js +65 -6
  10. package/dist/types/components/Alert/Alert.d.ts.map +1 -1
  11. package/dist/types/components/AppBar/AppBar.d.ts.map +1 -1
  12. package/dist/types/components/Avatar/Avatar.d.ts +0 -2
  13. package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
  14. package/dist/types/components/DatePickers/DatePicker/DatePicker.d.ts +1 -1
  15. package/dist/types/components/DatePickers/DatePicker/DatePicker.d.ts.map +1 -1
  16. package/dist/types/components/DatePickers/DatePicker/DatePicker.stories.d.ts +3 -0
  17. package/dist/types/components/DatePickers/DatePicker/DatePicker.stories.d.ts.map +1 -1
  18. package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.d.ts +1 -1
  19. package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  20. package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.stories.d.ts +3 -0
  21. package/dist/types/components/DatePickers/DateRangePicker/DateRangePicker.stories.d.ts.map +1 -1
  22. package/dist/types/components/DatePickers/DateTimePicker/DateTimePicker.d.ts +1 -1
  23. package/dist/types/components/DatePickers/DateTimePicker/DateTimePicker.d.ts.map +1 -1
  24. package/dist/types/components/DatePickers/DateTimePicker/DateTimePicker.stories.d.ts +3 -0
  25. package/dist/types/components/DatePickers/DateTimePicker/DateTimePicker.stories.d.ts.map +1 -1
  26. package/dist/types/components/DatePickers/TimePicker/TimePicker.d.ts +1 -1
  27. package/dist/types/components/DatePickers/TimePicker/TimePicker.d.ts.map +1 -1
  28. package/dist/types/components/DatePickers/TimePicker/TimePicker.stories.d.ts +3 -0
  29. package/dist/types/components/DatePickers/TimePicker/TimePicker.stories.d.ts.map +1 -1
  30. package/dist/types/components/DatePickers/types.d.ts +7 -0
  31. package/dist/types/components/DatePickers/types.d.ts.map +1 -1
  32. package/dist/types/components/Menu/Menu/Menu.stories.d.ts +16 -7
  33. package/dist/types/components/Menu/Menu/Menu.stories.d.ts.map +1 -1
  34. package/dist/types/components/Menu/MenuItem/MenuItem.d.ts.map +1 -1
  35. package/dist/types/components/SearchField/components/SearchFieldEndAdornment.d.ts +1 -1
  36. package/dist/types/components/SearchField/components/SearchFieldEndAdornment.d.ts.map +1 -1
  37. package/dist/types/components/SearchField/types.d.ts +1 -1
  38. package/dist/types/theme/components/data-display.d.ts.map +1 -1
  39. package/dist/types/theme/components/feedback.d.ts.map +1 -1
  40. package/dist/types/theme/components/navigation.d.ts.map +1 -1
  41. package/dist/types/theme/types.d.ts +11 -0
  42. package/dist/types/theme/types.d.ts.map +1 -1
  43. package/dist/widgets/index.cjs +1 -1
  44. package/dist/widgets/index.js +1 -1
  45. 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: isNeutral ? "info" : 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: isNeutral ? "info" : severity,
212
- isNeutral,
186
+ severity,
213
187
  content,
214
188
  action,
215
189
  onClose: handleClose,
@@ -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, 1.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
  }
@@ -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, 1.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
  }
@@ -5,10 +5,10 @@ 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-N-6EugaP.cjs");
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
- const MenuItem = require("../MenuItem-BPvH70wa.cjs");
11
+ const MenuItem = require("../MenuItem-ZSYcQBtg.cjs");
12
12
  require("cartocolor");
13
13
  const reactWindow = require("react-window");
14
14
  const reactCodemirror2 = require("react-codemirror2");
@@ -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 ?? "c4r.button.save",
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 intl = reactIntl.useIntl();
3961
- const intlConfig = cssUtils.useImperativeIntl(intl);
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) ?? intlConfig.formatMessage({ id: "c4r.form.startDate" }),
4326
+ label: (startProps == null ? void 0 : startProps.label) ?? _startDateLabel,
4314
4327
  slotProps: {
4315
4328
  popper: {
4316
4329
  placement: "bottom-start",
4317
- "aria-label": intlConfig.formatMessage({
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": intlConfig.formatMessage({
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) ?? intlConfig.formatMessage({ id: "c4r.form.endDate" }),
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 intl = reactIntl.useIntl();
4437
- const intlConfig = cssUtils.useImperativeIntl(intl);
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: label ?? intlConfig.formatMessage({ id: "c4r.form.time" }),
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": intlConfig.formatMessage({
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 intl = reactIntl.useIntl();
4548
- const intlConfig = cssUtils.useImperativeIntl(intl);
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: label ?? intlConfig.formatMessage({ id: "c4r.form.time" }),
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": intlConfig.formatMessage({
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
- StyledAvatar,
4733
+ material.Avatar,
4752
4734
  {
4753
4735
  ...otherProps,
4754
4736
  ref,
@@ -5216,7 +5198,7 @@ const SearchFieldEndAdornment = ({
5216
5198
  color: "default",
5217
5199
  disabled,
5218
5200
  tooltip: clearButtonLabel,
5219
- "aria-label": String(clearButtonLabel),
5201
+ "aria-label": clearButtonLabel,
5220
5202
  icon: /* @__PURE__ */ jsxRuntime.jsx(ClearSearchIcon, {})
5221
5203
  }
5222
5204
  ) : null,