@carto/meridian-ds 2.1.1 → 2.2.0-alpha-filter-dropdown.5

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 (50) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/{Alert-yL5uEg4Z.js → Link-D5fKicEY.js} +129 -129
  3. package/dist/{Alert-oGAW_syG.cjs → Link-_lzRY1Ay.cjs} +129 -129
  4. package/dist/{MenuItem-CyIdh2wX.cjs → MenuItem-YpFpuljU.cjs} +4 -3
  5. package/dist/{MenuItem-C8x-GasJ.js → MenuItem-badiQq9A.js} +4 -3
  6. package/dist/{TablePaginationActions-BWer8cmX.js → TablePaginationActions-CCDi-BO-.js} +6 -6
  7. package/dist/{TablePaginationActions-MwqZJoRm.cjs → TablePaginationActions-D2K26kdR.cjs} +6 -6
  8. package/dist/components/index.cjs +977 -690
  9. package/dist/components/index.js +944 -657
  10. package/dist/theme/index.cjs +2 -2
  11. package/dist/theme/index.js +3 -3
  12. package/dist/types/components/atoms/Copy/CopiableComponent.d.ts +4 -0
  13. package/dist/types/components/atoms/Copy/CopiableComponent.d.ts.map +1 -0
  14. package/dist/types/components/atoms/Copy/CopiableInputText.d.ts +18 -0
  15. package/dist/types/components/atoms/Copy/CopiableInputText.d.ts.map +1 -0
  16. package/dist/types/components/atoms/Copy/copyString.d.ts.map +1 -0
  17. package/dist/types/components/{molecules → atoms}/Copy/index.d.ts +2 -1
  18. package/dist/types/components/atoms/Copy/index.d.ts.map +1 -0
  19. package/dist/types/components/{molecules/Copy/CopiableComponent.d.ts → atoms/Copy/types.d.ts} +11 -5
  20. package/dist/types/components/atoms/Copy/types.d.ts.map +1 -0
  21. package/dist/types/components/atoms/Copy/useCopyValue.d.ts.map +1 -0
  22. package/dist/types/components/atoms/index.d.ts +2 -0
  23. package/dist/types/components/atoms/index.d.ts.map +1 -1
  24. package/dist/types/components/molecules/FilterDropdown/FilterDropdown.d.ts +6 -0
  25. package/dist/types/components/molecules/FilterDropdown/FilterDropdown.d.ts.map +1 -0
  26. package/dist/types/components/molecules/FilterDropdown/FilterDropdownMenuItem.d.ts +3 -0
  27. package/dist/types/components/molecules/FilterDropdown/FilterDropdownMenuItem.d.ts.map +1 -0
  28. package/dist/types/components/molecules/FilterDropdown/index.d.ts +4 -0
  29. package/dist/types/components/molecules/FilterDropdown/index.d.ts.map +1 -0
  30. package/dist/types/components/molecules/FilterDropdown/types.d.ts +55 -0
  31. package/dist/types/components/molecules/FilterDropdown/types.d.ts.map +1 -0
  32. package/dist/types/components/molecules/Menu/MenuItem.d.ts.map +1 -1
  33. package/dist/types/components/molecules/index.d.ts +2 -2
  34. package/dist/types/components/molecules/index.d.ts.map +1 -1
  35. package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts.map +1 -1
  36. package/dist/types/components/organisms/Dialog/types.d.ts +1 -1
  37. package/dist/types/components/organisms/Dialog/types.d.ts.map +1 -1
  38. package/dist/types/localization/en.d.ts +2 -2
  39. package/dist/types/localization/es.d.ts +2 -2
  40. package/dist/types/localization/id.d.ts +2 -2
  41. package/dist/types/localization/index.d.ts +6 -6
  42. package/dist/widgets/index.cjs +8 -8
  43. package/dist/widgets/index.js +2 -2
  44. package/package.json +1 -1
  45. package/dist/types/components/molecules/Copy/CopiableComponent.d.ts.map +0 -1
  46. package/dist/types/components/molecules/Copy/copyString.d.ts.map +0 -1
  47. package/dist/types/components/molecules/Copy/index.d.ts.map +0 -1
  48. package/dist/types/components/molecules/Copy/useCopyValue.d.ts.map +0 -1
  49. /package/dist/types/components/{molecules → atoms}/Copy/copyString.d.ts +0 -0
  50. /package/dist/types/components/{molecules → atoms}/Copy/useCopyValue.d.ts +0 -0
@@ -5,12 +5,12 @@ const React = require("react");
5
5
  const reactIntl = require("react-intl");
6
6
  const material = require("@mui/material");
7
7
  const iconsMaterial = require("@mui/icons-material");
8
- const TablePaginationActions = require("../TablePaginationActions-MwqZJoRm.cjs");
9
- const Alert$1 = require("../Alert-oGAW_syG.cjs");
8
+ const TablePaginationActions = require("../TablePaginationActions-D2K26kdR.cjs");
9
+ const Link = require("../Link-_lzRY1Ay.cjs");
10
10
  const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
11
11
  const OpenDiagonallyRight = require("../OpenDiagonallyRight-CpL4ROwg.cjs");
12
12
  require("cartocolor");
13
- const MenuItem = require("../MenuItem-CyIdh2wX.cjs");
13
+ const MenuItem = require("../MenuItem-YpFpuljU.cjs");
14
14
  const reactWindow = require("react-window");
15
15
  const DatePicker$1 = require("@mui/x-date-pickers/DatePicker");
16
16
  const xDatePickers = require("@mui/x-date-pickers");
@@ -41,307 +41,195 @@ require("codemirror/addon/fold/indent-fold.js");
41
41
  require("codemirror/addon/fold/markdown-fold.js");
42
42
  require("codemirror/addon/fold/comment-fold.js");
43
43
  const ClickAwayListener = require("@mui/material/ClickAwayListener");
44
- const IndicatorIcon = material.styled(material.Box)({
45
- position: "absolute",
46
- top: 0,
47
- left: 0,
48
- right: 0,
49
- bottom: 0,
50
- display: "flex",
51
- alignItems: "center",
52
- justifyContent: "center"
53
- });
54
- const HiddenText = material.styled(material.Box)({
55
- visibility: "hidden",
56
- pointerEvents: "none"
57
- });
58
- function _Button({
59
- children,
60
- loading,
61
- disabled,
62
- startIcon,
63
- endIcon,
64
- loadingPosition,
65
- external,
66
- showExternalIcon = true,
67
- "aria-describedby": ariaDescribedby,
68
- ...otherProps
69
- }, ref) {
70
- const intl = reactIntl.useIntl();
71
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
72
- const defaultIconLoader = /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" });
73
- const isDefaultLoading = loading && loadingPosition === void 0;
74
- const isExternalLink = otherProps.href && external;
75
- const renderContent = () => {
76
- if (isDefaultLoading) {
77
- return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { position: "relative" }, children: [
78
- /* @__PURE__ */ jsxRuntime.jsx(IndicatorIcon, { children: defaultIconLoader }),
79
- /* @__PURE__ */ jsxRuntime.jsx(HiddenText, { children })
80
- ] });
44
+ const StyledMenu = material.styled(material.Menu, {
45
+ shouldForwardProp: (prop) => !["extended", "width", "height"].includes(prop)
46
+ })(({ extended, width, height }) => ({
47
+ ...extended && {
48
+ ".MuiMenuItem-root": {
49
+ minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED
81
50
  }
82
- if (isExternalLink) {
83
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
84
- children,
85
- /* @__PURE__ */ jsxRuntime.jsx(Alert$1.ScreenReaderOnly, { id: "external-hint", children: `(${intlConfig.formatMessage({
86
- id: "c4r.button.opensInNewTab"
87
- })})` })
88
- ] });
51
+ },
52
+ ...width && {
53
+ ".MuiList-root": {
54
+ width,
55
+ minWidth: width
89
56
  }
90
- return children;
91
- };
92
- const getIconForPosition = (position) => {
93
- if (isDefaultLoading) {
94
- return void 0;
57
+ },
58
+ ...height && {
59
+ ".MuiMenu-paper": {
60
+ overflow: "hidden"
61
+ },
62
+ ".MuiList-root": {
63
+ maxHeight: height
95
64
  }
96
- if (loading && loadingPosition !== void 0) {
97
- if (loadingPosition === position) {
98
- return defaultIconLoader;
65
+ }
66
+ }));
67
+ function _Menu({ extended, width, height, MenuListProps, ...otherProps }, ref) {
68
+ return /* @__PURE__ */ jsxRuntime.jsx(
69
+ StyledMenu,
70
+ {
71
+ ...otherProps,
72
+ ref,
73
+ "data-name": "menu",
74
+ width,
75
+ height,
76
+ extended,
77
+ MenuListProps: {
78
+ ...MenuListProps,
79
+ "data-width": width,
80
+ "data-height": height,
81
+ "data-extended": extended
99
82
  }
100
- return void 0;
101
83
  }
102
- if (position === "start") {
103
- return startIcon;
104
- } else {
105
- return endIcon || (isExternalLink && showExternalIcon ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.OpenInNewOutlined, {}) : void 0);
84
+ );
85
+ }
86
+ const Menu$1 = React.forwardRef(_Menu);
87
+ const StyledMenuList = material.styled(material.MenuList, {
88
+ shouldForwardProp: (prop) => !["extended", "width", "height"].includes(prop)
89
+ })(({ extended, width, height }) => ({
90
+ ...extended && {
91
+ ".MuiMenuItem-root": {
92
+ minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED
106
93
  }
107
- };
94
+ },
95
+ "&.MuiList-root": {
96
+ ...width && {
97
+ width,
98
+ minWidth: width
99
+ },
100
+ ...height && {
101
+ maxHeight: height
102
+ }
103
+ }
104
+ }));
105
+ function _MenuList({ extended, width, height, ...otherProps }, ref) {
108
106
  return /* @__PURE__ */ jsxRuntime.jsx(
109
- material.Button,
107
+ StyledMenuList,
110
108
  {
111
- disabled: loading || disabled,
112
- startIcon: getIconForPosition("start"),
113
- endIcon: getIconForPosition("end"),
114
109
  ...otherProps,
115
- role: otherProps.href ? "link" : "button",
116
- ...isExternalLink && {
117
- target: "_blank",
118
- rel: "noopener noreferrer"
119
- },
120
110
  ref,
121
- "aria-describedby": isExternalLink ? "external-hint" : ariaDescribedby,
122
- children: /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { variant: "inherit", color: "inherit", noWrap: true, component: "span", children: renderContent() })
111
+ width,
112
+ height,
113
+ extended,
114
+ "data-name": "menu-list",
115
+ "data-width": width,
116
+ "data-height": height,
117
+ "data-extended": extended
123
118
  }
124
119
  );
125
120
  }
126
- const Button = React.forwardRef(_Button);
127
- const ButtonGroup = material.styled(material.ButtonGroup)(({ theme, size }) => ({
128
- "& .MuiButton-root:last-child": {
129
- padding: 0,
130
- minWidth: size === "small" ? theme.spacing(3) : size === "large" ? theme.spacing(6) : theme.spacing(4)
121
+ const MenuList = React.forwardRef(_MenuList);
122
+ const StyledMenuItem$1 = material.styled(MenuItem.MenuItem)(() => ({
123
+ marginTop: "0 !important",
124
+ marginBottom: "0 !important"
125
+ }));
126
+ const LinkFilter = material.styled(material.Link)(
127
+ ({ disabled, theme }) => ({
128
+ display: "flex",
129
+ alignItems: "center",
130
+ gap: theme.spacing(1),
131
+ width: "100%",
132
+ textAlign: "initial",
133
+ ...disabled && {
134
+ pointerEvents: "none",
135
+ color: theme.palette.text.disabled
136
+ }
137
+ })
138
+ );
139
+ function _MenuItemFilter({
140
+ areAllSelected,
141
+ areAnySelected,
142
+ selectAll,
143
+ selectAllDisabled,
144
+ "aria-label": ariaLabel,
145
+ "data-testid": dataTestId
146
+ }, ref) {
147
+ const intl = reactIntl.useIntl();
148
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
149
+ return /* @__PURE__ */ jsxRuntime.jsx(
150
+ StyledMenuItem$1,
151
+ {
152
+ ref,
153
+ fixed: true,
154
+ "data-name": "menu-filter",
155
+ "aria-label": ariaLabel,
156
+ "data-testid": dataTestId,
157
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
158
+ LinkFilter,
159
+ {
160
+ variant: "body2",
161
+ color: "textPrimary",
162
+ component: "button",
163
+ underline: "none",
164
+ disabled: !!selectAllDisabled,
165
+ onClick: selectAll,
166
+ tabIndex: 0,
167
+ children: [
168
+ /* @__PURE__ */ jsxRuntime.jsx(
169
+ material.Checkbox,
170
+ {
171
+ checked: areAllSelected,
172
+ indeterminate: areAnySelected && !areAllSelected,
173
+ disabled: selectAllDisabled
174
+ }
175
+ ),
176
+ intlConfig.formatMessage({ id: "c4r.form.selectAll" })
177
+ ]
178
+ }
179
+ )
180
+ }
181
+ );
182
+ }
183
+ const MenuItemFilter = React.forwardRef(_MenuItemFilter);
184
+ const idCounter = {};
185
+ function uniqueId(prefix = "$lodash$") {
186
+ if (!idCounter[prefix]) {
187
+ idCounter[prefix] = 0;
188
+ }
189
+ const id = ++idCounter[prefix];
190
+ if (prefix === "$lodash$") {
191
+ return `${id}`;
192
+ }
193
+ return `${prefix}${id}`;
194
+ }
195
+ const StyledSelect = material.styled(material.Select)(({ theme }) => ({
196
+ "& .MuiInputAdornment-positionStart": {
197
+ paddingLeft: theme.spacing(2),
198
+ "&.MuiInputAdornment-sizeSmall": {
199
+ paddingLeft: theme.spacing(1.5)
200
+ }
201
+ },
202
+ "& .MuiInputBase-inputAdornedStart": {
203
+ paddingLeft: "0px !important"
204
+ },
205
+ "& .MuiSelect-select .MuiMenuItem-root:hover": {
206
+ backgroundColor: "transparent"
207
+ },
208
+ "&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple": {
209
+ paddingRight: theme.spacing(7)
131
210
  }
132
211
  }));
133
- function SplitButton({
134
- options,
212
+ const PlaceholderItem = material.styled(material.MenuItem)(() => ({
213
+ display: "none"
214
+ }));
215
+ function _SelectField({
216
+ children,
217
+ placeholder,
218
+ size = "small",
219
+ displayEmpty,
220
+ menuProps,
221
+ inputProps,
222
+ labelId,
223
+ label,
224
+ labelSecondary,
225
+ helperText,
226
+ name,
227
+ error,
228
+ focused,
135
229
  disabled,
136
- loading,
137
- loadingPosition,
138
- onClick,
139
- variant,
140
- size,
141
- color,
142
- ...otherProps
143
- }) {
144
- var _a;
145
- const [open, setOpen] = React.useState(false);
146
- const anchorRef = React.useRef(null);
147
- const [selectedIndex, setSelectedIndex] = React.useState(0);
148
- const handleClick = () => {
149
- onClick(options[selectedIndex]);
150
- };
151
- const handleMenuItemClick = (_, index) => {
152
- setSelectedIndex(index);
153
- setOpen(false);
154
- };
155
- const handleToggle = () => {
156
- setOpen((prevOpen) => !prevOpen);
157
- };
158
- const handleClose = (event) => {
159
- var _a2;
160
- if ((_a2 = anchorRef.current) == null ? void 0 : _a2.contains(event.target)) {
161
- return;
162
- }
163
- setOpen(false);
164
- };
165
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
166
- /* @__PURE__ */ jsxRuntime.jsxs(
167
- ButtonGroup,
168
- {
169
- "data-name": "split-button",
170
- ref: anchorRef,
171
- variant,
172
- size,
173
- color,
174
- ...otherProps,
175
- children: [
176
- /* @__PURE__ */ jsxRuntime.jsx(
177
- Button,
178
- {
179
- disabled,
180
- loading,
181
- loadingPosition,
182
- onClick: handleClick,
183
- children: (_a = options[selectedIndex]) == null ? void 0 : _a.label
184
- }
185
- ),
186
- /* @__PURE__ */ jsxRuntime.jsx(Button, { disabled: loading || disabled, onClick: handleToggle, children: open ? /* @__PURE__ */ jsxRuntime.jsx(OpenDiagonallyRight.ArrowUp, {}) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ArrowDown, {}) })
187
- ]
188
- }
189
- ),
190
- /* @__PURE__ */ jsxRuntime.jsx(
191
- material.Popper,
192
- {
193
- sx: { zIndex: 1 },
194
- open,
195
- anchorEl: anchorRef.current,
196
- role: void 0,
197
- transition: true,
198
- disablePortal: true,
199
- placement: "bottom-end",
200
- children: ({ TransitionProps, placement }) => /* @__PURE__ */ jsxRuntime.jsx(
201
- material.Grow,
202
- {
203
- ...TransitionProps,
204
- style: {
205
- transformOrigin: placement === "bottom" ? "center top" : "center bottom"
206
- },
207
- children: /* @__PURE__ */ jsxRuntime.jsx(material.Paper, { elevation: 8, children: /* @__PURE__ */ jsxRuntime.jsx(material.ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ jsxRuntime.jsx(material.MenuList, { autoFocusItem: true, sx: { paddingY: 1 }, children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
208
- material.MenuItem,
209
- {
210
- disabled: option.disabled,
211
- selected: index === selectedIndex,
212
- onClick: (event) => handleMenuItemClick(event, index),
213
- children: option.label
214
- },
215
- option.label
216
- )) }) }) })
217
- }
218
- )
219
- }
220
- )
221
- ] });
222
- }
223
- const Root$5 = material.styled(material.Box)(({ theme }) => ({
224
- display: "flex",
225
- alignItems: "center",
226
- gap: theme.spacing(0.5)
227
- }));
228
- const Indicator = material.styled(TablePaginationActions.Typography)(({ theme }) => ({
229
- ".Mui-disabled &": {
230
- color: theme.palette.text.disabled
231
- }
232
- }));
233
- const Icon = material.styled(material.Box)(({ theme }) => ({
234
- display: "flex",
235
- svg: {
236
- width: TablePaginationActions.ICON_SIZE_SMALL,
237
- height: TablePaginationActions.ICON_SIZE_SMALL,
238
- fontSize: TablePaginationActions.ICON_SIZE_SMALL,
239
- path: {
240
- fill: theme.palette.text.secondary,
241
- ".Mui-disabled &": {
242
- fill: theme.palette.text.disabled
243
- }
244
- }
245
- }
246
- }));
247
- function LabelWithIndicator({
248
- label,
249
- type,
250
- icon,
251
- inheritSize
252
- }) {
253
- return /* @__PURE__ */ jsxRuntime.jsxs(Root$5, { children: [
254
- label,
255
- type && /* @__PURE__ */ jsxRuntime.jsx(
256
- Indicator,
257
- {
258
- component: "span",
259
- variant: inheritSize ? "inherit" : "caption",
260
- color: "textSecondary",
261
- weight: "regular",
262
- children: type === "required" ? "(required)" : "(optional)"
263
- }
264
- ),
265
- icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: icon })
266
- ] });
267
- }
268
- function _PasswordField({ InputProps, size = "small", ...otherProps }, ref) {
269
- const intl = reactIntl.useIntl();
270
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
271
- const [showPassword, setShowPassword] = React.useState(false);
272
- const handleClickShowPassword = () => setShowPassword(!showPassword);
273
- return /* @__PURE__ */ jsxRuntime.jsx(
274
- material.TextField,
275
- {
276
- ...otherProps,
277
- ref,
278
- type: showPassword ? "text" : "password",
279
- size,
280
- InputProps: {
281
- ...InputProps,
282
- endAdornment: /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { size, onClick: handleClickShowPassword, children: /* @__PURE__ */ jsxRuntime.jsx(
283
- material.Tooltip,
284
- {
285
- title: intlConfig.formatMessage({
286
- id: `c4r.form.${showPassword ? "hidePassword" : "showPassword"}`
287
- }),
288
- children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOffOutlined, {}) : /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOutlined, {})
289
- }
290
- ) }) })
291
- }
292
- }
293
- );
294
- }
295
- const PasswordField = React.forwardRef(_PasswordField);
296
- const idCounter = {};
297
- function uniqueId(prefix = "$lodash$") {
298
- if (!idCounter[prefix]) {
299
- idCounter[prefix] = 0;
300
- }
301
- const id = ++idCounter[prefix];
302
- if (prefix === "$lodash$") {
303
- return `${id}`;
304
- }
305
- return `${prefix}${id}`;
306
- }
307
- const StyledSelect = material.styled(material.Select)(({ theme }) => ({
308
- "& .MuiInputAdornment-positionStart": {
309
- paddingLeft: theme.spacing(2),
310
- "&.MuiInputAdornment-sizeSmall": {
311
- paddingLeft: theme.spacing(1.5)
312
- }
313
- },
314
- "& .MuiInputBase-inputAdornedStart": {
315
- paddingLeft: "0px !important"
316
- },
317
- "& .MuiSelect-select .MuiMenuItem-root:hover": {
318
- backgroundColor: "transparent"
319
- },
320
- "&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple": {
321
- paddingRight: theme.spacing(7)
322
- }
323
- }));
324
- const PlaceholderItem = material.styled(material.MenuItem)(() => ({
325
- display: "none"
326
- }));
327
- function _SelectField({
328
- children,
329
- placeholder,
330
- size = "small",
331
- displayEmpty,
332
- menuProps,
333
- inputProps,
334
- labelId,
335
- label,
336
- labelSecondary,
337
- helperText,
338
- name,
339
- error,
340
- focused,
341
- disabled,
342
- fullWidth,
343
- required,
344
- "aria-label": ariaLabel,
230
+ fullWidth,
231
+ required,
232
+ "aria-label": ariaLabel,
345
233
  ...otherProps
346
234
  }, ref) {
347
235
  const isSmall = size === "small";
@@ -411,236 +299,6 @@ function _SelectField({
411
299
  );
412
300
  }
413
301
  const SelectField = React.forwardRef(_SelectField);
414
- const StyledToggleButtonGroup = material.styled(material.ToggleButtonGroup, {
415
- shouldForwardProp: (prop) => prop !== "variant" && prop !== "backgroundColor"
416
- })(({ variant, backgroundColor, theme }) => ({
417
- // Variants
418
- ...variant === "contained" && {
419
- boxShadow: "none"
420
- },
421
- ...variant === "unbounded" && {
422
- boxShadow: "none",
423
- borderRadius: theme.spacing(0.5),
424
- "& .MuiDivider-root": {
425
- height: theme.spacing(4),
426
- "&.MuiToggleButtonGroup-groupedHorizontal": {
427
- height: theme.spacing(4)
428
- },
429
- "&.MuiToggleButtonGroup-groupedVertical": {
430
- height: "auto",
431
- width: theme.spacing(4),
432
- margin: `${theme.spacing(0.5, 0, 1)} !important`,
433
- borderRadius: "0 !important"
434
- }
435
- },
436
- "& .MuiToggleButton-sizeSmall": {
437
- margin: 0,
438
- "&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)": {
439
- margin: 0
440
- },
441
- "& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal": {
442
- height: theme.spacing(3)
443
- },
444
- "& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical": {
445
- height: "auto",
446
- width: theme.spacing(3)
447
- }
448
- },
449
- ".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)": {
450
- margin: 0,
451
- "&:first-of-type": {
452
- marginLeft: 0
453
- },
454
- "&:not(:last-of-type)": {
455
- marginRight: theme.spacing(0.5)
456
- }
457
- },
458
- "&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)": {
459
- ".MuiToggleButtonGroup-grouped": {
460
- margin: theme.spacing(0, 0.5)
461
- }
462
- },
463
- "&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)": {
464
- ".MuiToggleButtonGroup-grouped": {
465
- margin: theme.spacing(0, 0, 0.5),
466
- "&:not(:last-of-type)": {
467
- marginRight: 0
468
- },
469
- "&:last-of-type": {
470
- marginBottom: 0
471
- }
472
- }
473
- }
474
- },
475
- // Colors
476
- ...backgroundColor === "primary" && {
477
- backgroundColor: theme.palette.background.paper
478
- },
479
- ...backgroundColor === "secondary" && {
480
- backgroundColor: theme.palette.background.default
481
- },
482
- ...backgroundColor === "transparent" && {
483
- backgroundColor: "transparent"
484
- }
485
- }));
486
- function ToggleButtonGroup({
487
- children,
488
- variant = "floating",
489
- backgroundColor,
490
- ...rest
491
- }) {
492
- const isUnbounded = variant === "unbounded";
493
- const defaultColor = isUnbounded ? "transparent" : "primary";
494
- return /* @__PURE__ */ jsxRuntime.jsx(
495
- StyledToggleButtonGroup,
496
- {
497
- ...rest,
498
- variant,
499
- backgroundColor: backgroundColor ?? defaultColor,
500
- children
501
- }
502
- );
503
- }
504
- const StyledMenu = material.styled(material.Menu, {
505
- shouldForwardProp: (prop) => !["extended", "width", "height"].includes(prop)
506
- })(({ extended, width, height }) => ({
507
- ...extended && {
508
- ".MuiMenuItem-root": {
509
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED
510
- }
511
- },
512
- ...width && {
513
- ".MuiList-root": {
514
- width,
515
- minWidth: width
516
- }
517
- },
518
- ...height && {
519
- ".MuiMenu-paper": {
520
- overflow: "hidden"
521
- },
522
- ".MuiList-root": {
523
- maxHeight: height
524
- }
525
- }
526
- }));
527
- function _Menu({ extended, width, height, MenuListProps, ...otherProps }, ref) {
528
- return /* @__PURE__ */ jsxRuntime.jsx(
529
- StyledMenu,
530
- {
531
- ...otherProps,
532
- ref,
533
- "data-name": "menu",
534
- width,
535
- height,
536
- extended,
537
- MenuListProps: {
538
- ...MenuListProps,
539
- "data-width": width,
540
- "data-height": height,
541
- "data-extended": extended
542
- }
543
- }
544
- );
545
- }
546
- const Menu$1 = React.forwardRef(_Menu);
547
- const StyledMenuList = material.styled(material.MenuList, {
548
- shouldForwardProp: (prop) => !["extended", "width", "height"].includes(prop)
549
- })(({ extended, width, height }) => ({
550
- ...extended && {
551
- ".MuiMenuItem-root": {
552
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED
553
- }
554
- },
555
- "&.MuiList-root": {
556
- ...width && {
557
- width,
558
- minWidth: width
559
- },
560
- ...height && {
561
- maxHeight: height
562
- }
563
- }
564
- }));
565
- function _MenuList({ extended, width, height, ...otherProps }, ref) {
566
- return /* @__PURE__ */ jsxRuntime.jsx(
567
- StyledMenuList,
568
- {
569
- ...otherProps,
570
- ref,
571
- width,
572
- height,
573
- extended,
574
- "data-name": "menu-list",
575
- "data-width": width,
576
- "data-height": height,
577
- "data-extended": extended
578
- }
579
- );
580
- }
581
- const MenuList = React.forwardRef(_MenuList);
582
- const StyledMenuItem$1 = material.styled(MenuItem.MenuItem)(() => ({
583
- marginTop: "0 !important",
584
- marginBottom: "0 !important"
585
- }));
586
- const LinkFilter = material.styled(material.Link)(
587
- ({ disabled, theme }) => ({
588
- display: "flex",
589
- alignItems: "center",
590
- gap: theme.spacing(1),
591
- width: "100%",
592
- textAlign: "initial",
593
- ...disabled && {
594
- pointerEvents: "none",
595
- color: theme.palette.text.disabled
596
- }
597
- })
598
- );
599
- function _MenuItemFilter({
600
- areAllSelected,
601
- areAnySelected,
602
- selectAll,
603
- selectAllDisabled,
604
- "aria-label": ariaLabel,
605
- "data-testid": dataTestId
606
- }, ref) {
607
- const intl = reactIntl.useIntl();
608
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
609
- return /* @__PURE__ */ jsxRuntime.jsx(
610
- StyledMenuItem$1,
611
- {
612
- ref,
613
- fixed: true,
614
- "data-name": "menu-filter",
615
- "aria-label": ariaLabel,
616
- "data-testid": dataTestId,
617
- children: /* @__PURE__ */ jsxRuntime.jsxs(
618
- LinkFilter,
619
- {
620
- variant: "body2",
621
- color: "textPrimary",
622
- component: "button",
623
- underline: "none",
624
- disabled: !!selectAllDisabled,
625
- onClick: selectAll,
626
- tabIndex: 0,
627
- children: [
628
- /* @__PURE__ */ jsxRuntime.jsx(
629
- material.Checkbox,
630
- {
631
- checked: areAllSelected,
632
- indeterminate: areAnySelected && !areAllSelected,
633
- disabled: selectAllDisabled
634
- }
635
- ),
636
- intlConfig.formatMessage({ id: "c4r.form.selectAll" })
637
- ]
638
- }
639
- )
640
- }
641
- );
642
- }
643
- const MenuItemFilter = React.forwardRef(_MenuItemFilter);
644
302
  function useMultipleSelectField({
645
303
  selectedOptions,
646
304
  options,
@@ -1871,96 +1529,183 @@ function useAutocomplete({
1871
1529
  getOptionLabel: internalGetOptionLabel
1872
1530
  };
1873
1531
  }
1874
- const _CopiableComponent = ({
1875
- children,
1876
- disabled,
1532
+ const FilterDropdownMenuItem = ({
1533
+ item,
1534
+ selectedValue,
1535
+ dense,
1536
+ extended,
1537
+ onItemChange
1538
+ }) => {
1539
+ const {
1540
+ id,
1541
+ label,
1542
+ description,
1543
+ startAdornment,
1544
+ endAdornment,
1545
+ tooltipLabel,
1546
+ tooltipPlacement,
1547
+ disabled,
1548
+ "aria-label": ariaLabel,
1549
+ hidden,
1550
+ destructive,
1551
+ subtitle,
1552
+ divider,
1553
+ fixed,
1554
+ selected
1555
+ } = item;
1556
+ const menuItemId = `filter-dropdown-item-${id}`;
1557
+ const isSelected = selected || (selectedValue == null ? void 0 : selectedValue.id) === id;
1558
+ if (hidden) return null;
1559
+ return /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: tooltipLabel, placement: tooltipPlacement, children: /* @__PURE__ */ jsxRuntime.jsxs(
1560
+ MenuItem.MenuItem,
1561
+ {
1562
+ onClick: disabled ? void 0 : (event) => onItemChange(item, event),
1563
+ selected: isSelected,
1564
+ dense,
1565
+ extended,
1566
+ disabled,
1567
+ destructive,
1568
+ subtitle,
1569
+ divider,
1570
+ fixed,
1571
+ "aria-label": ariaLabel,
1572
+ "aria-labelledby": menuItemId,
1573
+ "aria-selected": isSelected,
1574
+ children: [
1575
+ startAdornment && /* @__PURE__ */ jsxRuntime.jsx(material.ListItemIcon, { children: startAdornment }),
1576
+ /* @__PURE__ */ jsxRuntime.jsx(material.ListItemText, { id: menuItemId, primary: label, secondary: description }),
1577
+ endAdornment && /* @__PURE__ */ jsxRuntime.jsx(material.ListItemIcon, { children: endAdornment })
1578
+ ]
1579
+ }
1580
+ ) }, id);
1581
+ };
1582
+ const ButtonWrapper = material.styled(material.Box, {
1583
+ shouldForwardProp: (prop) => prop !== "isOpen" && prop !== "buttonColor"
1584
+ })(({ isOpen, theme, buttonColor }) => ({
1585
+ display: "flex",
1586
+ alignItems: "center",
1587
+ justifyContent: "center",
1588
+ ...isOpen && {
1589
+ "& .MuiButtonBase-root": {
1590
+ backgroundColor: theme.palette.action.hover
1591
+ }
1592
+ },
1593
+ ...buttonColor === "secondary" && {
1594
+ "& button": {
1595
+ color: theme.palette.text.secondary
1596
+ }
1597
+ }
1598
+ }));
1599
+ function _FilterDropdown({
1600
+ menuItems,
1601
+ onClickItem,
1877
1602
  value,
1878
- onCopied,
1879
- copyText = "c4r.button.copy",
1880
- copiedText = "c4r.notifications.copiedToClipboard",
1881
- button,
1882
- buttonLabel,
1883
- buttonProps,
1884
- ariaLabel,
1885
- dataTestId,
1886
- tooltipPlacement = "top",
1603
+ defaultValue = menuItems[0],
1604
+ menuTitle,
1605
+ disabled,
1606
+ icon,
1607
+ label,
1608
+ buttonSize,
1609
+ buttonColor = "primary",
1610
+ dense = false,
1611
+ extended = false,
1612
+ "aria-label": ariaLabel,
1613
+ responsive,
1614
+ tooltipLabel,
1615
+ tooltipPlacement,
1616
+ slotProps,
1617
+ MenuListProps,
1887
1618
  ...props
1888
- }, ref) => {
1889
- const intl = reactIntl.useIntl();
1890
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
1891
- const [open, setOpen] = React.useState(false);
1892
- const { copy } = useCopyValue(copyText, copiedText);
1893
- const handleClick = (e) => {
1894
- e.preventDefault();
1895
- copy(value).then(() => {
1896
- onCopied == null ? void 0 : onCopied();
1897
- setOpen(true);
1898
- }).catch(console.error);
1619
+ }, ref) {
1620
+ const [selected_, setSelected] = React.useState(defaultValue || void 0);
1621
+ const [anchorEl, setAnchorEl] = React.useState(null);
1622
+ const isOpen = !!anchorEl;
1623
+ const selected = value ?? selected_;
1624
+ const isTablet = material.useMediaQuery((theme) => theme.breakpoints.down("lg"));
1625
+ const isIcon = Boolean(icon) && (!responsive || isTablet);
1626
+ const menuLabel = label || (selected == null ? void 0 : selected.alternativeLabel) || (selected == null ? void 0 : selected.label) || "Select an option";
1627
+ const [buttonId] = React.useState(() => `filter-dropdown-button-${uniqueId()}`);
1628
+ const [menuId] = React.useState(() => `filter-dropdown-menu-${uniqueId()}`);
1629
+ const handleOpen = (event) => {
1630
+ setAnchorEl(event.currentTarget);
1631
+ };
1632
+ const handleClose = () => {
1633
+ setAnchorEl(null);
1634
+ };
1635
+ const handleChange = (item, event) => {
1636
+ setSelected(item);
1637
+ onClickItem(item, event);
1638
+ handleClose();
1639
+ };
1640
+ const commonButtonProps = {
1641
+ onClick: handleOpen,
1642
+ disabled,
1643
+ size: buttonSize,
1644
+ color: "default",
1645
+ "aria-label": ariaLabel,
1646
+ id: buttonId,
1647
+ "aria-controls": isOpen ? menuId : void 0,
1648
+ "aria-haspopup": !disabled,
1649
+ "aria-expanded": isOpen
1899
1650
  };
1900
1651
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1901
- /* @__PURE__ */ jsxRuntime.jsx(
1902
- material.Tooltip,
1652
+ /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: tooltipLabel, placement: tooltipPlacement, children: /* @__PURE__ */ jsxRuntime.jsx(ButtonWrapper, { isOpen, buttonColor, ref, children: isIcon ? /* @__PURE__ */ jsxRuntime.jsx(Link.IconButton, { ...commonButtonProps, icon }) : /* @__PURE__ */ jsxRuntime.jsx(
1653
+ Button,
1903
1654
  {
1904
- title: intlConfig.formatMessage({ id: copyText }),
1905
- leaveDelay: 0,
1906
- placement: tooltipPlacement,
1907
- children: /* @__PURE__ */ jsxRuntime.jsxs(
1908
- material.Box,
1909
- {
1910
- ...props,
1911
- sx: { cursor: disabled ? void 0 : "pointer" },
1912
- onClick: handleClick,
1913
- "data-name": "copiable",
1914
- ref,
1915
- children: [
1916
- children,
1917
- button && /* @__PURE__ */ jsxRuntime.jsx(
1918
- Alert$1.IconButton,
1919
- {
1920
- ...buttonProps,
1921
- disabled,
1922
- icon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ContentCopyOutlined, {}),
1923
- "data-testid": dataTestId,
1924
- "aria-label": ariaLabel || buttonLabel,
1925
- sx: {
1926
- display: "flex"
1927
- }
1928
- }
1929
- )
1930
- ]
1931
- }
1932
- )
1655
+ ...commonButtonProps,
1656
+ endIcon: isOpen ? /* @__PURE__ */ jsxRuntime.jsx(OpenDiagonallyRight.ArrowUp, {}) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ArrowDown, {}),
1657
+ children: menuLabel
1933
1658
  }
1934
- ),
1935
- /* @__PURE__ */ jsxRuntime.jsx(
1936
- Snackbar,
1659
+ ) }) }),
1660
+ /* @__PURE__ */ jsxRuntime.jsxs(
1661
+ Menu$1,
1937
1662
  {
1938
- open,
1939
- autoWidth: true,
1940
- closeable: false,
1941
- autoHideDuration: 4e3,
1942
- onClose: () => setOpen(false),
1943
- children: intlConfig.formatMessage({ id: copiedText })
1663
+ id: menuId,
1664
+ transformOrigin: { vertical: "top", horizontal: "right" },
1665
+ anchorOrigin: { vertical: "bottom", horizontal: "right" },
1666
+ ...props,
1667
+ anchorEl,
1668
+ open: isOpen,
1669
+ onClose: handleClose,
1670
+ keepMounted: true,
1671
+ slotProps: {
1672
+ ...slotProps,
1673
+ paper: {
1674
+ "data-name": "filter-dropdown",
1675
+ "data-dense": dense,
1676
+ ...slotProps == null ? void 0 : slotProps.paper
1677
+ }
1678
+ },
1679
+ MenuListProps: {
1680
+ "aria-labelledby": buttonId,
1681
+ autoFocus: true,
1682
+ // To allow keyboard navigation
1683
+ ...MenuListProps
1684
+ },
1685
+ children: [
1686
+ menuTitle && /* @__PURE__ */ jsxRuntime.jsx(MenuItem.MenuItem, { subtitle: true, children: menuTitle }),
1687
+ menuItems.map((item) => {
1688
+ const { id } = item;
1689
+ return /* @__PURE__ */ jsxRuntime.jsx(
1690
+ FilterDropdownMenuItem,
1691
+ {
1692
+ item,
1693
+ selectedValue: selected,
1694
+ dense,
1695
+ extended,
1696
+ onItemChange: handleChange
1697
+ },
1698
+ id
1699
+ );
1700
+ })
1701
+ ]
1944
1702
  }
1945
1703
  )
1946
1704
  ] });
1947
- };
1948
- const CopiableComponent = React.forwardRef(_CopiableComponent);
1949
- async function copyString(value) {
1950
- return await navigator.clipboard.writeText(value);
1951
1705
  }
1952
- const useCopyValue = (msg = "c4r.button.copy", copiedMsg = "c4r.notifications.copiedToClipboard") => {
1953
- const [message, setMessage] = React.useState(msg);
1954
- const copy = async (text) => {
1955
- await copyString(text);
1956
- setMessage(copiedMsg);
1957
- setTimeout(() => setMessage(msg), 1e3);
1958
- };
1959
- return {
1960
- message,
1961
- copy
1962
- };
1963
- };
1706
+ const FilterDropdown = React.forwardRef(
1707
+ _FilterDropdown
1708
+ );
1964
1709
  const AccordionContainer = material.styled("div", {
1965
1710
  shouldForwardProp: (prop) => prop !== "variant"
1966
1711
  })(({ variant, theme }) => ({
@@ -2060,7 +1805,7 @@ const Content$4 = material.styled(material.Box, {
2060
1805
  }
2061
1806
  }
2062
1807
  }));
2063
- const Alert = material.styled(Alert$1.Alert, {
1808
+ const Alert = material.styled(Link.Alert, {
2064
1809
  shouldForwardProp: (prop) => !["hasActions", "closeable"].includes(prop)
2065
1810
  })(({ hasActions, closeable, icon, theme }) => ({
2066
1811
  position: "relative",
@@ -2174,7 +1919,7 @@ function Snackbar({
2174
1919
  }
2175
1920
  ),
2176
1921
  closeable && /* @__PURE__ */ jsxRuntime.jsx(CloseButtonWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
2177
- Alert$1.IconButton,
1922
+ Link.IconButton,
2178
1923
  {
2179
1924
  color: "default",
2180
1925
  onClick: (e) => onClose(e, "timeout"),
@@ -2279,106 +2024,645 @@ function colorProps(color, variant, theme, disabled) {
2279
2024
  borderColor: theme.palette.error.main
2280
2025
  };
2281
2026
  }
2282
- return {
2283
- color: theme.palette.primary.contrastText,
2284
- backgroundColor: theme.palette.error.main,
2285
- borderColor: "transparent"
2286
- };
2287
- }
2027
+ return {
2028
+ color: theme.palette.primary.contrastText,
2029
+ backgroundColor: theme.palette.error.main,
2030
+ borderColor: "transparent"
2031
+ };
2032
+ }
2033
+ }
2034
+ const TagRoot = material.styled("div", {
2035
+ shouldForwardProp: (prop) => !["color", "variant", "disabled"].includes(prop)
2036
+ })(({
2037
+ color,
2038
+ variant,
2039
+ disabled,
2040
+ theme
2041
+ }) => {
2042
+ return {
2043
+ display: "inline-flex",
2044
+ flexDirection: "row",
2045
+ flexWrap: "nowrap",
2046
+ alignItems: "center",
2047
+ padding: theme.spacing(0, 0.5),
2048
+ borderRadius: theme.spacing(0.25),
2049
+ gap: theme.spacing(0.5),
2050
+ height: theme.spacing(2),
2051
+ borderWidth: "1px",
2052
+ borderStyle: "solid",
2053
+ ...colorProps(color ?? "primary", variant ?? "filled", theme, disabled),
2054
+ '.Mui-selected &, [aria-selected="true"] &': {
2055
+ borderColor: theme.palette.primary.main,
2056
+ backgroundColor: theme.palette.primary.background,
2057
+ ".MuiTypography-root": {
2058
+ color: theme.palette.primary.main
2059
+ }
2060
+ }
2061
+ };
2062
+ });
2063
+ const TagIcon = material.styled("div")(({ theme }) => ({
2064
+ display: "flex",
2065
+ justifyContent: "center",
2066
+ alignItems: "center",
2067
+ "& svg": {
2068
+ width: theme.spacing(TablePaginationActions.ICON_SIZE_SMALL),
2069
+ height: theme.spacing(TablePaginationActions.ICON_SIZE_SMALL),
2070
+ "& g": {
2071
+ fill: "currentColor"
2072
+ }
2073
+ }
2074
+ }));
2075
+ const TagLabel = material.styled("div", {
2076
+ shouldForwardProp: (prop) => !["type"].includes(prop)
2077
+ })(({ type, theme }) => ({
2078
+ display: "flex",
2079
+ alignItems: "center",
2080
+ paddingTop: type === "code" ? theme.spacing(0.25) : void 0
2081
+ }));
2082
+ function _Tag({
2083
+ label,
2084
+ color = "primary",
2085
+ variant = "filled",
2086
+ icon,
2087
+ type = "default",
2088
+ typographyProps,
2089
+ noWrap = true,
2090
+ disabled,
2091
+ ...otherProps
2092
+ }, ref) {
2093
+ const typeCode = type === "code";
2094
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2095
+ TagRoot,
2096
+ {
2097
+ ref,
2098
+ className: "CartoTag-root",
2099
+ color,
2100
+ variant,
2101
+ disabled,
2102
+ "aria-disabled": disabled,
2103
+ "data-color": color,
2104
+ "data-variant": variant,
2105
+ "data-type": type,
2106
+ "data-name": "tag",
2107
+ ...otherProps,
2108
+ children: [
2109
+ icon && /* @__PURE__ */ jsxRuntime.jsx(TagIcon, { children: icon }),
2110
+ /* @__PURE__ */ jsxRuntime.jsx(TagLabel, { type, children: /* @__PURE__ */ jsxRuntime.jsx(
2111
+ TablePaginationActions.Typography,
2112
+ {
2113
+ component: "span",
2114
+ color: "inherit",
2115
+ variant: typeCode ? "code3" : "caption",
2116
+ weight: typeCode ? "strong" : "medium",
2117
+ noWrap,
2118
+ ...typographyProps,
2119
+ children: label
2120
+ }
2121
+ ) })
2122
+ ]
2123
+ }
2124
+ );
2125
+ }
2126
+ const Tag = React.forwardRef(_Tag);
2127
+ const _CopiableComponent = ({
2128
+ children,
2129
+ disabled,
2130
+ value,
2131
+ onCopied,
2132
+ copyText,
2133
+ copiedText,
2134
+ button,
2135
+ buttonLabel,
2136
+ buttonProps,
2137
+ ariaLabel,
2138
+ dataTestId,
2139
+ tooltipPlacement = "top",
2140
+ ...props
2141
+ }, ref) => {
2142
+ const [open, setOpen] = React.useState(false);
2143
+ const intl = reactIntl.useIntl();
2144
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
2145
+ const copyTooltipText = copyText || intlConfig.formatMessage({ id: "c4r.button.copy" });
2146
+ const copySuccessMessage = copiedText || intlConfig.formatMessage({
2147
+ id: "c4r.notifications.copiedToClipboard"
2148
+ });
2149
+ const { copy } = useCopyValue(copyTooltipText, copySuccessMessage);
2150
+ const handleClick = (e) => {
2151
+ e.preventDefault();
2152
+ copy(value).then(() => {
2153
+ onCopied == null ? void 0 : onCopied();
2154
+ setOpen(true);
2155
+ }).catch(console.error);
2156
+ };
2157
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2158
+ /* @__PURE__ */ jsxRuntime.jsx(
2159
+ material.Tooltip,
2160
+ {
2161
+ title: copyTooltipText,
2162
+ leaveDelay: 0,
2163
+ placement: tooltipPlacement,
2164
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
2165
+ material.Box,
2166
+ {
2167
+ ...props,
2168
+ sx: { cursor: disabled ? void 0 : "pointer" },
2169
+ onClick: handleClick,
2170
+ "data-name": "copiable",
2171
+ ref,
2172
+ children: [
2173
+ children,
2174
+ button && /* @__PURE__ */ jsxRuntime.jsx(
2175
+ Link.IconButton,
2176
+ {
2177
+ ...buttonProps,
2178
+ disabled,
2179
+ icon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ContentCopyOutlined, {}),
2180
+ "data-testid": dataTestId,
2181
+ "aria-label": ariaLabel || buttonLabel || copyTooltipText,
2182
+ sx: {
2183
+ display: "flex"
2184
+ }
2185
+ }
2186
+ )
2187
+ ]
2188
+ }
2189
+ )
2190
+ }
2191
+ ),
2192
+ /* @__PURE__ */ jsxRuntime.jsx(
2193
+ Snackbar,
2194
+ {
2195
+ open,
2196
+ autoWidth: true,
2197
+ closeable: false,
2198
+ autoHideDuration: 4e3,
2199
+ onClose: () => setOpen(false),
2200
+ children: copySuccessMessage
2201
+ }
2202
+ )
2203
+ ] });
2204
+ };
2205
+ const CopiableComponent = React.forwardRef(_CopiableComponent);
2206
+ const StyledTextField = material.styled(material.TextField, {
2207
+ shouldForwardProp: (prop) => !["isInputFocused"].includes(prop)
2208
+ })(({ isInputFocused }) => ({
2209
+ "& input": {
2210
+ pointerEvents: isInputFocused ? "auto" : "none"
2211
+ // Disable pointer events when not focused https://issues.chromium.org/issues/41245282
2212
+ }
2213
+ }));
2214
+ const AdornmentWrapper = material.styled(material.Box, {
2215
+ shouldForwardProp: (prop) => !["size", "variant"].includes(prop)
2216
+ })(({ variant, size, theme }) => ({
2217
+ width: theme.spacing(3),
2218
+ ...variant === "standard" ? {
2219
+ marginLeft: theme.spacing(-0.25)
2220
+ } : {
2221
+ marginRight: theme.spacing(-1)
2222
+ },
2223
+ ...size === "medium" && {
2224
+ width: theme.spacing(4),
2225
+ ...variant === "standard" ? {
2226
+ marginLeft: theme.spacing(-0.5)
2227
+ } : {
2228
+ marginLeft: theme.spacing(1)
2229
+ }
2230
+ }
2231
+ }));
2232
+ function _CopiableInputText({
2233
+ value,
2234
+ variant,
2235
+ InputProps,
2236
+ extraEndAdornment,
2237
+ onCopied,
2238
+ password,
2239
+ size = "small",
2240
+ onFocus,
2241
+ onBlur,
2242
+ ...rest
2243
+ }, ref) {
2244
+ const intl = reactIntl.useIntl();
2245
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
2246
+ const [showText, setShowText] = React.useState(false);
2247
+ const [isInputFocused, setIsInputFocused] = React.useState(false);
2248
+ const inputType = !password ? "text" : showText ? "text" : "password";
2249
+ const showTextLabel = intlConfig.formatMessage({
2250
+ id: showText ? "c4r.button.hide" : "c4r.button.show"
2251
+ });
2252
+ const handleFocus = (event) => {
2253
+ setIsInputFocused(true);
2254
+ onFocus == null ? void 0 : onFocus(event);
2255
+ };
2256
+ const handleBlur = (event) => {
2257
+ setIsInputFocused(false);
2258
+ onBlur == null ? void 0 : onBlur(event);
2259
+ };
2260
+ const passwordAdornment = /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(
2261
+ Link.IconButton,
2262
+ {
2263
+ edge: variant !== "standard" ? "end" : void 0,
2264
+ onClick: () => setShowText(!showText),
2265
+ size,
2266
+ icon: showText ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOutlined, {}) : /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOffOutlined, {}),
2267
+ tooltip: showTextLabel,
2268
+ "aria-label": showTextLabel
2269
+ }
2270
+ ) });
2271
+ return /* @__PURE__ */ jsxRuntime.jsx(
2272
+ StyledTextField,
2273
+ {
2274
+ ...rest,
2275
+ isInputFocused,
2276
+ size,
2277
+ value,
2278
+ variant,
2279
+ InputProps: {
2280
+ readOnly: true,
2281
+ onFocus: handleFocus,
2282
+ onBlur: handleBlur,
2283
+ endAdornment: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2284
+ password ? passwordAdornment : extraEndAdornment,
2285
+ /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(AdornmentWrapper, { size, variant, children: /* @__PURE__ */ jsxRuntime.jsx(
2286
+ CopiableComponent,
2287
+ {
2288
+ value,
2289
+ onCopied,
2290
+ button: true,
2291
+ buttonProps: {
2292
+ size
2293
+ }
2294
+ }
2295
+ ) }) })
2296
+ ] }),
2297
+ ...variant === "filled" && {
2298
+ disableUnderline: true
2299
+ },
2300
+ ...InputProps
2301
+ },
2302
+ type: inputType,
2303
+ "data-name": "copiable-input-text",
2304
+ ref
2305
+ }
2306
+ );
2307
+ }
2308
+ const CopiableInputText = React.forwardRef(_CopiableInputText);
2309
+ async function copyString(value) {
2310
+ return await navigator.clipboard.writeText(value);
2311
+ }
2312
+ const useCopyValue = (msg = "c4r.button.copy", copiedMsg = "c4r.notifications.copiedToClipboard") => {
2313
+ const [message, setMessage] = React.useState(msg);
2314
+ const copy = async (text) => {
2315
+ await copyString(text);
2316
+ setMessage(copiedMsg);
2317
+ setTimeout(() => setMessage(msg), 1e3);
2318
+ };
2319
+ return {
2320
+ message,
2321
+ copy
2322
+ };
2323
+ };
2324
+ const IndicatorIcon = material.styled(material.Box)({
2325
+ position: "absolute",
2326
+ top: 0,
2327
+ left: 0,
2328
+ right: 0,
2329
+ bottom: 0,
2330
+ display: "flex",
2331
+ alignItems: "center",
2332
+ justifyContent: "center"
2333
+ });
2334
+ const HiddenText = material.styled(material.Box)({
2335
+ visibility: "hidden",
2336
+ pointerEvents: "none"
2337
+ });
2338
+ function _Button({
2339
+ children,
2340
+ loading,
2341
+ disabled,
2342
+ startIcon,
2343
+ endIcon,
2344
+ loadingPosition,
2345
+ external,
2346
+ showExternalIcon = true,
2347
+ "aria-describedby": ariaDescribedby,
2348
+ ...otherProps
2349
+ }, ref) {
2350
+ const intl = reactIntl.useIntl();
2351
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
2352
+ const defaultIconLoader = /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" });
2353
+ const isDefaultLoading = loading && loadingPosition === void 0;
2354
+ const isExternalLink = otherProps.href && external;
2355
+ const renderContent = () => {
2356
+ if (isDefaultLoading) {
2357
+ return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { position: "relative" }, children: [
2358
+ /* @__PURE__ */ jsxRuntime.jsx(IndicatorIcon, { children: defaultIconLoader }),
2359
+ /* @__PURE__ */ jsxRuntime.jsx(HiddenText, { children })
2360
+ ] });
2361
+ }
2362
+ if (isExternalLink) {
2363
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2364
+ children,
2365
+ /* @__PURE__ */ jsxRuntime.jsx(Link.ScreenReaderOnly, { id: "external-hint", children: `(${intlConfig.formatMessage({
2366
+ id: "c4r.button.opensInNewTab"
2367
+ })})` })
2368
+ ] });
2369
+ }
2370
+ return children;
2371
+ };
2372
+ const getIconForPosition = (position) => {
2373
+ if (isDefaultLoading) {
2374
+ return void 0;
2375
+ }
2376
+ if (loading && loadingPosition !== void 0) {
2377
+ if (loadingPosition === position) {
2378
+ return defaultIconLoader;
2379
+ }
2380
+ return void 0;
2381
+ }
2382
+ if (position === "start") {
2383
+ return startIcon;
2384
+ } else {
2385
+ return endIcon || (isExternalLink && showExternalIcon ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.OpenInNewOutlined, {}) : void 0);
2386
+ }
2387
+ };
2388
+ return /* @__PURE__ */ jsxRuntime.jsx(
2389
+ material.Button,
2390
+ {
2391
+ disabled: loading || disabled,
2392
+ startIcon: getIconForPosition("start"),
2393
+ endIcon: getIconForPosition("end"),
2394
+ ...otherProps,
2395
+ role: otherProps.href ? "link" : "button",
2396
+ ...isExternalLink && {
2397
+ target: "_blank",
2398
+ rel: "noopener noreferrer"
2399
+ },
2400
+ ref,
2401
+ "aria-describedby": isExternalLink ? "external-hint" : ariaDescribedby,
2402
+ children: /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { variant: "inherit", color: "inherit", noWrap: true, component: "span", children: renderContent() })
2403
+ }
2404
+ );
2405
+ }
2406
+ const Button = React.forwardRef(_Button);
2407
+ const ButtonGroup = material.styled(material.ButtonGroup)(({ theme, size }) => ({
2408
+ "& .MuiButton-root:last-child": {
2409
+ padding: 0,
2410
+ minWidth: size === "small" ? theme.spacing(3) : size === "large" ? theme.spacing(6) : theme.spacing(4)
2411
+ }
2412
+ }));
2413
+ function SplitButton({
2414
+ options,
2415
+ disabled,
2416
+ loading,
2417
+ loadingPosition,
2418
+ onClick,
2419
+ variant,
2420
+ size,
2421
+ color,
2422
+ ...otherProps
2423
+ }) {
2424
+ var _a;
2425
+ const [open, setOpen] = React.useState(false);
2426
+ const anchorRef = React.useRef(null);
2427
+ const [selectedIndex, setSelectedIndex] = React.useState(0);
2428
+ const handleClick = () => {
2429
+ onClick(options[selectedIndex]);
2430
+ };
2431
+ const handleMenuItemClick = (_, index) => {
2432
+ setSelectedIndex(index);
2433
+ setOpen(false);
2434
+ };
2435
+ const handleToggle = () => {
2436
+ setOpen((prevOpen) => !prevOpen);
2437
+ };
2438
+ const handleClose = (event) => {
2439
+ var _a2;
2440
+ if ((_a2 = anchorRef.current) == null ? void 0 : _a2.contains(event.target)) {
2441
+ return;
2442
+ }
2443
+ setOpen(false);
2444
+ };
2445
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2446
+ /* @__PURE__ */ jsxRuntime.jsxs(
2447
+ ButtonGroup,
2448
+ {
2449
+ "data-name": "split-button",
2450
+ ref: anchorRef,
2451
+ variant,
2452
+ size,
2453
+ color,
2454
+ ...otherProps,
2455
+ children: [
2456
+ /* @__PURE__ */ jsxRuntime.jsx(
2457
+ Button,
2458
+ {
2459
+ disabled,
2460
+ loading,
2461
+ loadingPosition,
2462
+ onClick: handleClick,
2463
+ children: (_a = options[selectedIndex]) == null ? void 0 : _a.label
2464
+ }
2465
+ ),
2466
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { disabled: loading || disabled, onClick: handleToggle, children: open ? /* @__PURE__ */ jsxRuntime.jsx(OpenDiagonallyRight.ArrowUp, {}) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ArrowDown, {}) })
2467
+ ]
2468
+ }
2469
+ ),
2470
+ /* @__PURE__ */ jsxRuntime.jsx(
2471
+ material.Popper,
2472
+ {
2473
+ sx: { zIndex: 1 },
2474
+ open,
2475
+ anchorEl: anchorRef.current,
2476
+ role: void 0,
2477
+ transition: true,
2478
+ disablePortal: true,
2479
+ placement: "bottom-end",
2480
+ children: ({ TransitionProps, placement }) => /* @__PURE__ */ jsxRuntime.jsx(
2481
+ material.Grow,
2482
+ {
2483
+ ...TransitionProps,
2484
+ style: {
2485
+ transformOrigin: placement === "bottom" ? "center top" : "center bottom"
2486
+ },
2487
+ children: /* @__PURE__ */ jsxRuntime.jsx(material.Paper, { elevation: 8, children: /* @__PURE__ */ jsxRuntime.jsx(material.ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ jsxRuntime.jsx(material.MenuList, { autoFocusItem: true, sx: { paddingY: 1 }, children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
2488
+ material.MenuItem,
2489
+ {
2490
+ disabled: option.disabled,
2491
+ selected: index === selectedIndex,
2492
+ onClick: (event) => handleMenuItemClick(event, index),
2493
+ children: option.label
2494
+ },
2495
+ option.label
2496
+ )) }) }) })
2497
+ }
2498
+ )
2499
+ }
2500
+ )
2501
+ ] });
2288
2502
  }
2289
- const TagRoot = material.styled("div", {
2290
- shouldForwardProp: (prop) => !["color", "variant", "disabled"].includes(prop)
2291
- })(({
2292
- color,
2293
- variant,
2294
- disabled,
2295
- theme
2296
- }) => {
2297
- return {
2298
- display: "inline-flex",
2299
- flexDirection: "row",
2300
- flexWrap: "nowrap",
2301
- alignItems: "center",
2302
- padding: theme.spacing(0, 0.5),
2303
- borderRadius: theme.spacing(0.25),
2304
- gap: theme.spacing(0.5),
2305
- height: theme.spacing(2),
2306
- borderWidth: "1px",
2307
- borderStyle: "solid",
2308
- ...colorProps(color ?? "primary", variant ?? "filled", theme, disabled),
2309
- '.Mui-selected &, [aria-selected="true"] &': {
2310
- borderColor: theme.palette.primary.main,
2311
- backgroundColor: theme.palette.primary.background,
2312
- ".MuiTypography-root": {
2313
- color: theme.palette.primary.main
2314
- }
2315
- }
2316
- };
2317
- });
2318
- const TagIcon = material.styled("div")(({ theme }) => ({
2503
+ const Root$5 = material.styled(material.Box)(({ theme }) => ({
2319
2504
  display: "flex",
2320
- justifyContent: "center",
2321
2505
  alignItems: "center",
2322
- "& svg": {
2323
- width: theme.spacing(TablePaginationActions.ICON_SIZE_SMALL),
2324
- height: theme.spacing(TablePaginationActions.ICON_SIZE_SMALL),
2325
- "& g": {
2326
- fill: "currentColor"
2327
- }
2506
+ gap: theme.spacing(0.5)
2507
+ }));
2508
+ const Indicator = material.styled(TablePaginationActions.Typography)(({ theme }) => ({
2509
+ ".Mui-disabled &": {
2510
+ color: theme.palette.text.disabled
2328
2511
  }
2329
2512
  }));
2330
- const TagLabel = material.styled("div", {
2331
- shouldForwardProp: (prop) => !["type"].includes(prop)
2332
- })(({ type, theme }) => ({
2513
+ const Icon = material.styled(material.Box)(({ theme }) => ({
2333
2514
  display: "flex",
2334
- alignItems: "center",
2335
- paddingTop: type === "code" ? theme.spacing(0.25) : void 0
2515
+ svg: {
2516
+ width: TablePaginationActions.ICON_SIZE_SMALL,
2517
+ height: TablePaginationActions.ICON_SIZE_SMALL,
2518
+ fontSize: TablePaginationActions.ICON_SIZE_SMALL,
2519
+ path: {
2520
+ fill: theme.palette.text.secondary,
2521
+ ".Mui-disabled &": {
2522
+ fill: theme.palette.text.disabled
2523
+ }
2524
+ }
2525
+ }
2336
2526
  }));
2337
- function _Tag({
2527
+ function LabelWithIndicator({
2338
2528
  label,
2339
- color = "primary",
2340
- variant = "filled",
2529
+ type,
2341
2530
  icon,
2342
- type = "default",
2343
- typographyProps,
2344
- noWrap = true,
2345
- disabled,
2346
- ...otherProps
2347
- }, ref) {
2348
- const typeCode = type === "code";
2349
- return /* @__PURE__ */ jsxRuntime.jsxs(
2350
- TagRoot,
2531
+ inheritSize
2532
+ }) {
2533
+ return /* @__PURE__ */ jsxRuntime.jsxs(Root$5, { children: [
2534
+ label,
2535
+ type && /* @__PURE__ */ jsxRuntime.jsx(
2536
+ Indicator,
2537
+ {
2538
+ component: "span",
2539
+ variant: inheritSize ? "inherit" : "caption",
2540
+ color: "textSecondary",
2541
+ weight: "regular",
2542
+ children: type === "required" ? "(required)" : "(optional)"
2543
+ }
2544
+ ),
2545
+ icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: icon })
2546
+ ] });
2547
+ }
2548
+ function _PasswordField({ InputProps, size = "small", ...otherProps }, ref) {
2549
+ const intl = reactIntl.useIntl();
2550
+ const intlConfig = TablePaginationActions.useImperativeIntl(intl);
2551
+ const [showPassword, setShowPassword] = React.useState(false);
2552
+ const handleClickShowPassword = () => setShowPassword(!showPassword);
2553
+ return /* @__PURE__ */ jsxRuntime.jsx(
2554
+ material.TextField,
2351
2555
  {
2352
- ref,
2353
- className: "CartoTag-root",
2354
- color,
2355
- variant,
2356
- disabled,
2357
- "aria-disabled": disabled,
2358
- "data-color": color,
2359
- "data-variant": variant,
2360
- "data-type": type,
2361
- "data-name": "tag",
2362
2556
  ...otherProps,
2363
- children: [
2364
- icon && /* @__PURE__ */ jsxRuntime.jsx(TagIcon, { children: icon }),
2365
- /* @__PURE__ */ jsxRuntime.jsx(TagLabel, { type, children: /* @__PURE__ */ jsxRuntime.jsx(
2366
- TablePaginationActions.Typography,
2557
+ ref,
2558
+ type: showPassword ? "text" : "password",
2559
+ size,
2560
+ InputProps: {
2561
+ ...InputProps,
2562
+ endAdornment: /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { size, onClick: handleClickShowPassword, children: /* @__PURE__ */ jsxRuntime.jsx(
2563
+ material.Tooltip,
2367
2564
  {
2368
- component: "span",
2369
- color: "inherit",
2370
- variant: typeCode ? "code3" : "caption",
2371
- weight: typeCode ? "strong" : "medium",
2372
- noWrap,
2373
- ...typographyProps,
2374
- children: label
2565
+ title: intlConfig.formatMessage({
2566
+ id: `c4r.form.${showPassword ? "hidePassword" : "showPassword"}`
2567
+ }),
2568
+ children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOffOutlined, {}) : /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.VisibilityOutlined, {})
2375
2569
  }
2376
- ) })
2377
- ]
2570
+ ) }) })
2571
+ }
2572
+ }
2573
+ );
2574
+ }
2575
+ const PasswordField = React.forwardRef(_PasswordField);
2576
+ const StyledToggleButtonGroup = material.styled(material.ToggleButtonGroup, {
2577
+ shouldForwardProp: (prop) => prop !== "variant" && prop !== "backgroundColor"
2578
+ })(({ variant, backgroundColor, theme }) => ({
2579
+ // Variants
2580
+ ...variant === "contained" && {
2581
+ boxShadow: "none"
2582
+ },
2583
+ ...variant === "unbounded" && {
2584
+ boxShadow: "none",
2585
+ borderRadius: theme.spacing(0.5),
2586
+ "& .MuiDivider-root": {
2587
+ height: theme.spacing(4),
2588
+ "&.MuiToggleButtonGroup-groupedHorizontal": {
2589
+ height: theme.spacing(4)
2590
+ },
2591
+ "&.MuiToggleButtonGroup-groupedVertical": {
2592
+ height: "auto",
2593
+ width: theme.spacing(4),
2594
+ margin: `${theme.spacing(0.5, 0, 1)} !important`,
2595
+ borderRadius: "0 !important"
2596
+ }
2597
+ },
2598
+ "& .MuiToggleButton-sizeSmall": {
2599
+ margin: 0,
2600
+ "&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)": {
2601
+ margin: 0
2602
+ },
2603
+ "& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal": {
2604
+ height: theme.spacing(3)
2605
+ },
2606
+ "& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical": {
2607
+ height: "auto",
2608
+ width: theme.spacing(3)
2609
+ }
2610
+ },
2611
+ ".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)": {
2612
+ margin: 0,
2613
+ "&:first-of-type": {
2614
+ marginLeft: 0
2615
+ },
2616
+ "&:not(:last-of-type)": {
2617
+ marginRight: theme.spacing(0.5)
2618
+ }
2619
+ },
2620
+ "&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)": {
2621
+ ".MuiToggleButtonGroup-grouped": {
2622
+ margin: theme.spacing(0, 0.5)
2623
+ }
2624
+ },
2625
+ "&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)": {
2626
+ ".MuiToggleButtonGroup-grouped": {
2627
+ margin: theme.spacing(0, 0, 0.5),
2628
+ "&:not(:last-of-type)": {
2629
+ marginRight: 0
2630
+ },
2631
+ "&:last-of-type": {
2632
+ marginBottom: 0
2633
+ }
2634
+ }
2635
+ }
2636
+ },
2637
+ // Colors
2638
+ ...backgroundColor === "primary" && {
2639
+ backgroundColor: theme.palette.background.paper
2640
+ },
2641
+ ...backgroundColor === "secondary" && {
2642
+ backgroundColor: theme.palette.background.default
2643
+ },
2644
+ ...backgroundColor === "transparent" && {
2645
+ backgroundColor: "transparent"
2646
+ }
2647
+ }));
2648
+ function ToggleButtonGroup({
2649
+ children,
2650
+ variant = "floating",
2651
+ backgroundColor,
2652
+ ...rest
2653
+ }) {
2654
+ const isUnbounded = variant === "unbounded";
2655
+ const defaultColor = isUnbounded ? "transparent" : "primary";
2656
+ return /* @__PURE__ */ jsxRuntime.jsx(
2657
+ StyledToggleButtonGroup,
2658
+ {
2659
+ ...rest,
2660
+ variant,
2661
+ backgroundColor: backgroundColor ?? defaultColor,
2662
+ children
2378
2663
  }
2379
2664
  );
2380
2665
  }
2381
- const Tag = React.forwardRef(_Tag);
2382
2666
  const Menu = material.styled("div")(({ theme }) => ({
2383
2667
  display: "flex",
2384
2668
  alignItems: "center",
@@ -3424,7 +3708,7 @@ function CodeAreaHeader({
3424
3708
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3425
3709
  /* @__PURE__ */ jsxRuntime.jsxs(Header, { size, "data-size": size, "data-name": "code-area-header", children: [
3426
3710
  /* @__PURE__ */ jsxRuntime.jsx(
3427
- Alert$1.IconButton,
3711
+ Link.IconButton,
3428
3712
  {
3429
3713
  color: "default",
3430
3714
  size,
@@ -3488,7 +3772,7 @@ function CodeAreaHeader({
3488
3772
  }
3489
3773
  ),
3490
3774
  showExpandButton && /* @__PURE__ */ jsxRuntime.jsx(
3491
- Alert$1.IconButton,
3775
+ Link.IconButton,
3492
3776
  {
3493
3777
  color: "default",
3494
3778
  size,
@@ -4660,7 +4944,7 @@ const DialogContentPadded = material.styled(DialogContent, {
4660
4944
  paddingBottom: `${theme.spacing(3)} !important`
4661
4945
  }
4662
4946
  }));
4663
- const StyledAlert = material.styled(Alert$1.Alert)(({ theme }) => ({
4947
+ const StyledAlert = material.styled(Link.Alert)(({ theme }) => ({
4664
4948
  minHeight: "auto",
4665
4949
  padding: 0,
4666
4950
  backgroundColor: "transparent",
@@ -5092,10 +5376,10 @@ function CodeAreaDialog({
5092
5376
  }
5093
5377
  exports.TablePaginationActions = TablePaginationActions.TablePaginationActions;
5094
5378
  exports.Typography = TablePaginationActions.Typography;
5095
- exports.Alert = Alert$1.Alert;
5096
- exports.IconButton = Alert$1.IconButton;
5097
- exports.Link = Alert$1.Link;
5098
- exports.ScreenReaderOnly = Alert$1.ScreenReaderOnly;
5379
+ exports.Alert = Link.Alert;
5380
+ exports.IconButton = Link.IconButton;
5381
+ exports.Link = Link.Link;
5382
+ exports.ScreenReaderOnly = Link.ScreenReaderOnly;
5099
5383
  exports.MenuItem = MenuItem.MenuItem;
5100
5384
  exports.AUTOCOMPLETE_GROUP_HEADER_PROPERTY = AUTOCOMPLETE_GROUP_HEADER_PROPERTY;
5101
5385
  exports.AccordionGroup = AccordionGroup;
@@ -5114,6 +5398,7 @@ exports.CodeAreaHeader = CodeAreaHeader;
5114
5398
  exports.CodeAreaInput = CodeAreaInput;
5115
5399
  exports.CodeAreaMarkTextPattern = CodeAreaMarkTextPattern;
5116
5400
  exports.CopiableComponent = CopiableComponent;
5401
+ exports.CopiableInputText = CopiableInputText;
5117
5402
  exports.CreatableAutocomplete = CreatableAutocomplete;
5118
5403
  exports.DatePicker = DatePicker;
5119
5404
  exports.DateRangePicker = DateRangePicker;
@@ -5128,6 +5413,8 @@ exports.DialogFooter = DialogFooter;
5128
5413
  exports.DialogHeader = DialogHeader;
5129
5414
  exports.DialogPaper = DialogPaper;
5130
5415
  exports.DialogStepper = DialogStepper;
5416
+ exports.FilterDropdown = FilterDropdown;
5417
+ exports.FilterDropdownMenuItem = FilterDropdownMenuItem;
5131
5418
  exports.LabelWithIndicator = LabelWithIndicator;
5132
5419
  exports.Menu = Menu$1;
5133
5420
  exports.MenuItemFilter = MenuItemFilter;