@carto/meridian-ds 2.5.5 → 2.6.0-alpha-searchfield.1

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 (100) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{Alert-lLA0z7fX.js → Alert-C1VgP3N1.js} +20 -77
  3. package/dist/{Alert-BdmDjcVc.cjs → Alert-F8G9P271.cjs} +22 -79
  4. package/dist/{MenuItem-nokUtiks.cjs → MenuItem-Bssr5qGq.cjs} +6 -6
  5. package/dist/{MenuItem-ZNdBUBvt.js → MenuItem-COajCLkS.js} +1 -1
  6. package/dist/{SwatchSquare-CaaLsjAC.js → Search-C7wkXu3f.js} +4 -23
  7. package/dist/{SwatchSquare-B8PIY3Rd.cjs → Search-CMWbM9nD.cjs} +3 -22
  8. package/dist/SwatchSquare-B6KYVoqV.js +24 -0
  9. package/dist/SwatchSquare-DuXPIL7t.cjs +23 -0
  10. package/dist/components/index.cjs +457 -112
  11. package/dist/components/index.js +397 -52
  12. package/dist/{TablePaginationActions-DAMGtIub.cjs → css-utils-CqIN_t7x.cjs} +126 -55
  13. package/dist/{TablePaginationActions-C6TVGJM-.js → css-utils-hxI-qUxK.js} +129 -58
  14. package/dist/custom-icons/index.cjs +3 -2
  15. package/dist/custom-icons/index.js +3 -2
  16. package/dist/theme/index.cjs +108 -114
  17. package/dist/theme/index.js +7 -13
  18. package/dist/types/components/AccordionGroup/AccordionGroup.d.ts +4 -1
  19. package/dist/types/components/AccordionGroup/AccordionGroup.d.ts.map +1 -1
  20. package/dist/types/components/AccordionGroup/AccordionGroup.stories.d.ts +39 -9
  21. package/dist/types/components/AccordionGroup/AccordionGroup.stories.d.ts.map +1 -1
  22. package/dist/types/components/AccordionGroup/AccordionGroup.test.d.ts +2 -0
  23. package/dist/types/components/AccordionGroup/AccordionGroup.test.d.ts.map +1 -0
  24. package/dist/types/components/AppBar/AppBar.d.ts +3 -1
  25. package/dist/types/components/AppBar/AppBar.d.ts.map +1 -1
  26. package/dist/types/components/AppBar/AppBar.stories.d.ts +2 -2
  27. package/dist/types/components/AppBar/AppBar.stories.d.ts.map +1 -1
  28. package/dist/types/components/AppBar/AppBar.test.d.ts +2 -0
  29. package/dist/types/components/AppBar/AppBar.test.d.ts.map +1 -0
  30. package/dist/types/components/Avatar/Avatar.d.ts +4 -1
  31. package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
  32. package/dist/types/components/Avatar/Avatar.stories.d.ts +1 -2
  33. package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
  34. package/dist/types/components/Avatar/Avatar.test.d.ts +2 -0
  35. package/dist/types/components/Avatar/Avatar.test.d.ts.map +1 -0
  36. package/dist/types/components/Button/Button.d.ts +5 -0
  37. package/dist/types/components/Button/Button.d.ts.map +1 -1
  38. package/dist/types/components/Button/Button.stories.d.ts +3 -0
  39. package/dist/types/components/Button/Button.stories.d.ts.map +1 -1
  40. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +117 -0
  41. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts.map +1 -0
  42. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts +66 -0
  43. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts.map +1 -0
  44. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts +2 -0
  45. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts.map +1 -0
  46. package/dist/types/components/EllipsisWithTooltip/index.d.ts +3 -0
  47. package/dist/types/components/EllipsisWithTooltip/index.d.ts.map +1 -0
  48. package/dist/types/components/Link/Link.d.ts +5 -0
  49. package/dist/types/components/Link/Link.d.ts.map +1 -1
  50. package/dist/types/components/Link/Link.stories.d.ts +9 -27
  51. package/dist/types/components/Link/Link.stories.d.ts.map +1 -1
  52. package/dist/types/components/SearchField/SearchField.d.ts +32 -0
  53. package/dist/types/components/SearchField/SearchField.d.ts.map +1 -0
  54. package/dist/types/components/SearchField/SearchField.stories.d.ts +123 -0
  55. package/dist/types/components/SearchField/SearchField.stories.d.ts.map +1 -0
  56. package/dist/types/components/SearchField/index.d.ts +3 -0
  57. package/dist/types/components/SearchField/index.d.ts.map +1 -0
  58. package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts +5 -2
  59. package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts.map +1 -1
  60. package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts +72 -0
  61. package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts.map +1 -0
  62. package/dist/types/components/TablePaginationActions/TablePaginationActions.test.d.ts +2 -0
  63. package/dist/types/components/TablePaginationActions/TablePaginationActions.test.d.ts.map +1 -0
  64. package/dist/types/components/Tag/Tag.d.ts +176 -4
  65. package/dist/types/components/Tag/Tag.d.ts.map +1 -1
  66. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -2
  67. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +1 -1
  68. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +2 -2
  69. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts.map +1 -1
  70. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts +2 -0
  71. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts.map +1 -0
  72. package/dist/types/components/TooltipData/TooltipData.d.ts.map +1 -1
  73. package/dist/types/components/TooltipData/TooltipData.stories.d.ts +34 -0
  74. package/dist/types/components/TooltipData/TooltipData.stories.d.ts.map +1 -0
  75. package/dist/types/components/TooltipData/TooltipData.test.d.ts +2 -0
  76. package/dist/types/components/TooltipData/TooltipData.test.d.ts.map +1 -0
  77. package/dist/types/components/index.d.ts +4 -0
  78. package/dist/types/components/index.d.ts.map +1 -1
  79. package/dist/types/localization/en.d.ts +1 -0
  80. package/dist/types/localization/en.d.ts.map +1 -1
  81. package/dist/types/localization/es.d.ts +1 -0
  82. package/dist/types/localization/es.d.ts.map +1 -1
  83. package/dist/types/localization/id.d.ts +1 -0
  84. package/dist/types/localization/id.d.ts.map +1 -1
  85. package/dist/types/localization/index.d.ts +3 -0
  86. package/dist/types/localization/index.d.ts.map +1 -1
  87. package/dist/types/theme/components/forms.d.ts.map +1 -1
  88. package/dist/types/theme/components/stories/Tooltip.stories.d.ts +0 -3
  89. package/dist/types/theme/components/stories/Tooltip.stories.d.ts.map +1 -1
  90. package/dist/types/utils/css-utils.d.ts +14 -0
  91. package/dist/types/utils/css-utils.d.ts.map +1 -0
  92. package/dist/types/utils/useTranslationFallback.d.ts +20 -0
  93. package/dist/types/utils/useTranslationFallback.d.ts.map +1 -0
  94. package/dist/types/utils/useTranslationFallback.test.d.ts +2 -0
  95. package/dist/types/utils/useTranslationFallback.test.d.ts.map +1 -0
  96. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts.map +1 -1
  97. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts.map +1 -1
  98. package/dist/widgets/index.cjs +120 -124
  99. package/dist/widgets/index.js +6 -10
  100. package/package.json +1 -1
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
- const reactIntl = require("react-intl");
6
5
  const material = require("@mui/material");
7
6
  const iconsMaterial = require("@mui/icons-material");
8
- const TablePaginationActions = require("../TablePaginationActions-DAMGtIub.cjs");
9
- const Alert$1 = require("../Alert-BdmDjcVc.cjs");
7
+ const Alert$1 = require("../Alert-F8G9P271.cjs");
8
+ const cssUtils = require("../css-utils-CqIN_t7x.cjs");
10
9
  const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
11
10
  const OpenDiagonallyRight = require("../OpenDiagonallyRight-CpL4ROwg.cjs");
12
- const MenuItem = require("../MenuItem-nokUtiks.cjs");
11
+ const reactIntl = require("react-intl");
12
+ const MenuItem = require("../MenuItem-Bssr5qGq.cjs");
13
13
  require("cartocolor");
14
14
  const reactWindow = require("react-window");
15
15
  const reactCodemirror2 = require("react-codemirror2");
@@ -41,6 +41,7 @@ const DatePicker$1 = require("@mui/x-date-pickers/DatePicker");
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");
44
+ const Search = require("../Search-CMWbM9nD.cjs");
44
45
  const DOMPurify = require("dompurify");
45
46
  const IndicatorIcon = material.styled(material.Box)({
46
47
  position: "absolute",
@@ -65,11 +66,14 @@ function _Button({
65
66
  loadingPosition,
66
67
  external,
67
68
  showExternalIcon = true,
69
+ screenReaderText,
68
70
  "aria-describedby": ariaDescribedby,
69
71
  ...otherProps
70
72
  }, ref) {
71
- const intl = reactIntl.useIntl();
72
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
73
+ const screenReaderTextValue = Alert$1.useTranslationFallback(
74
+ "c4r.button.opensInNewTab",
75
+ screenReaderText
76
+ );
73
77
  const defaultIconLoader = /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" });
74
78
  const isDefaultLoading = loading && loadingPosition === void 0;
75
79
  const isExternalLink = otherProps.href && external;
@@ -83,9 +87,7 @@ function _Button({
83
87
  if (isExternalLink) {
84
88
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
85
89
  children,
86
- /* @__PURE__ */ jsxRuntime.jsx(Alert$1.ScreenReaderOnly, { id: "external-hint", children: `(${intlConfig.formatMessage({
87
- id: "c4r.button.opensInNewTab"
88
- })})` })
90
+ /* @__PURE__ */ jsxRuntime.jsx(Alert$1.ScreenReaderOnly, { id: "external-hint", children: screenReaderTextValue })
89
91
  ] });
90
92
  }
91
93
  return children;
@@ -120,7 +122,7 @@ function _Button({
120
122
  },
121
123
  ref,
122
124
  "aria-describedby": isExternalLink ? "external-hint" : ariaDescribedby,
123
- children: /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { variant: "inherit", color: "inherit", noWrap: true, component: "span", children: renderContent() })
125
+ children: /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "inherit", color: "inherit", noWrap: true, component: "span", children: renderContent() })
124
126
  }
125
127
  );
126
128
  }
@@ -226,7 +228,7 @@ const Root$5 = material.styled(material.Box)(({ theme }) => ({
226
228
  alignItems: "center",
227
229
  gap: theme.spacing(0.5)
228
230
  }));
229
- const Indicator = material.styled(TablePaginationActions.Typography)(({ theme }) => ({
231
+ const Indicator = material.styled(cssUtils.Typography)(({ theme }) => ({
230
232
  ".Mui-disabled &": {
231
233
  color: theme.palette.text.disabled
232
234
  }
@@ -234,9 +236,9 @@ const Indicator = material.styled(TablePaginationActions.Typography)(({ theme })
234
236
  const Icon = material.styled(material.Box)(({ theme }) => ({
235
237
  display: "flex",
236
238
  svg: {
237
- width: TablePaginationActions.ICON_SIZE_SMALL,
238
- height: TablePaginationActions.ICON_SIZE_SMALL,
239
- fontSize: TablePaginationActions.ICON_SIZE_SMALL,
239
+ width: cssUtils.ICON_SIZE_SMALL,
240
+ height: cssUtils.ICON_SIZE_SMALL,
241
+ fontSize: cssUtils.ICON_SIZE_SMALL,
240
242
  path: {
241
243
  fill: theme.palette.text.secondary,
242
244
  ".Mui-disabled &": {
@@ -283,7 +285,7 @@ function _LabelWithIndicator({
283
285
  const LabelWithIndicator = React.forwardRef(_LabelWithIndicator);
284
286
  function _PasswordField({ InputProps, size = "small", disabled, ...otherProps }, ref) {
285
287
  const intl = reactIntl.useIntl();
286
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
288
+ const intlConfig = cssUtils.useImperativeIntl(intl);
287
289
  const [showPassword, setShowPassword] = React.useState(false);
288
290
  const handleClickShowPassword = () => setShowPassword(!showPassword);
289
291
  const showPasswordLabel = intlConfig.formatMessage({
@@ -304,7 +306,7 @@ function _PasswordField({ InputProps, size = "small", disabled, ...otherProps },
304
306
  role: "textbox"
305
307
  },
306
308
  endAdornment: /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(
307
- Alert$1.IconButton,
309
+ cssUtils.IconButton,
308
310
  {
309
311
  size,
310
312
  disabled,
@@ -420,7 +422,7 @@ function _SelectField({
420
422
  },
421
423
  children: [
422
424
  placeholder && /* @__PURE__ */ jsxRuntime.jsx(PlaceholderItem, { disabled: true, value: "", children: /* @__PURE__ */ jsxRuntime.jsx(
423
- TablePaginationActions.Typography,
425
+ cssUtils.Typography,
424
426
  {
425
427
  variant: isSmall ? "body2" : "body1",
426
428
  color: "text.hint",
@@ -525,7 +527,7 @@ function _MenuItemFilter({
525
527
  "data-testid": dataTestId
526
528
  }, ref) {
527
529
  const intl = reactIntl.useIntl();
528
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
530
+ const intlConfig = cssUtils.useImperativeIntl(intl);
529
531
  return /* @__PURE__ */ jsxRuntime.jsx(
530
532
  StyledMenuItem$1,
531
533
  {
@@ -617,14 +619,14 @@ function _MultipleSelectField({
617
619
  const isSmall = size === "small";
618
620
  const paddingSize = isSmall || variant === "standard" ? 0 : 2;
619
621
  const intl = reactIntl.useIntl();
620
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
622
+ const intlConfig = cssUtils.useImperativeIntl(intl);
621
623
  const counterText = `${currentOptions.length} ${intlConfig.formatMessage({
622
624
  id: "c4r.form.selected"
623
625
  })}`;
624
626
  const renderValue = React.useMemo(() => {
625
627
  if (areAllSelected) {
626
628
  return /* @__PURE__ */ jsxRuntime.jsx(
627
- TablePaginationActions.Typography,
629
+ cssUtils.Typography,
628
630
  {
629
631
  component: "span",
630
632
  variant: isSmall ? "body2" : "body1",
@@ -636,7 +638,7 @@ function _MultipleSelectField({
636
638
  }
637
639
  if (areAnySelected) {
638
640
  return /* @__PURE__ */ jsxRuntime.jsx(
639
- TablePaginationActions.Typography,
641
+ cssUtils.Typography,
640
642
  {
641
643
  component: "span",
642
644
  variant: isSmall ? "body2" : "body1",
@@ -647,7 +649,7 @@ function _MultipleSelectField({
647
649
  );
648
650
  }
649
651
  return /* @__PURE__ */ jsxRuntime.jsx(
650
- TablePaginationActions.Typography,
652
+ cssUtils.Typography,
651
653
  {
652
654
  component: "span",
653
655
  variant: isSmall ? "body2" : "body1",
@@ -816,24 +818,36 @@ const StyledToggleButtonGroup = material.styled(material.ToggleButtonGroup, {
816
818
  backgroundColor: "transparent"
817
819
  }
818
820
  }));
819
- function ToggleButtonGroup({
821
+ function _ToggleButtonGroup({
820
822
  children,
821
823
  variant = "floating",
822
824
  backgroundColor,
825
+ orientation,
826
+ size,
823
827
  ...rest
824
- }) {
828
+ }, ref) {
825
829
  const isUnbounded = variant === "unbounded";
826
830
  const defaultColor = isUnbounded ? "transparent" : "primary";
831
+ const resolvedBackgroundColor = backgroundColor ?? defaultColor;
827
832
  return /* @__PURE__ */ jsxRuntime.jsx(
828
833
  StyledToggleButtonGroup,
829
834
  {
830
835
  ...rest,
831
836
  variant,
832
- backgroundColor: backgroundColor ?? defaultColor,
837
+ backgroundColor: resolvedBackgroundColor,
838
+ orientation,
839
+ size,
840
+ "data-orientation": orientation,
841
+ "data-variant": variant,
842
+ "data-size": size,
843
+ "data-background-color": resolvedBackgroundColor,
844
+ "data-name": "toggle-button-group",
845
+ ref,
833
846
  children
834
847
  }
835
848
  );
836
849
  }
850
+ const ToggleButtonGroup = React.forwardRef(_ToggleButtonGroup);
837
851
  async function copyString(value) {
838
852
  return await navigator.clipboard.writeText(value);
839
853
  }
@@ -866,7 +880,7 @@ const _CopiableComponent = ({
866
880
  }, ref) => {
867
881
  const [open, setOpen] = React.useState(false);
868
882
  const intl = reactIntl.useIntl();
869
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
883
+ const intlConfig = cssUtils.useImperativeIntl(intl);
870
884
  const copyTooltipText = copyText === null ? null : copyText || intlConfig.formatMessage({ id: "c4r.button.copy" });
871
885
  const copySuccessMessage = copiedText || intlConfig.formatMessage({
872
886
  id: "c4r.notifications.copiedToClipboard"
@@ -897,7 +911,7 @@ const _CopiableComponent = ({
897
911
  children: [
898
912
  children,
899
913
  button && /* @__PURE__ */ jsxRuntime.jsx(
900
- Alert$1.IconButton,
914
+ cssUtils.IconButton,
901
915
  {
902
916
  ...buttonProps,
903
917
  disabled,
@@ -967,7 +981,7 @@ function _CopiableInputText({
967
981
  ...rest
968
982
  }, ref) {
969
983
  const intl = reactIntl.useIntl();
970
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
984
+ const intlConfig = cssUtils.useImperativeIntl(intl);
971
985
  const [showText, setShowText] = React.useState(false);
972
986
  const [isInputFocused, setIsInputFocused] = React.useState(false);
973
987
  const inputType = !password ? "text" : showText ? "text" : "password";
@@ -983,7 +997,7 @@ function _CopiableInputText({
983
997
  onBlur == null ? void 0 : onBlur(event);
984
998
  };
985
999
  const passwordAdornment = /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(
986
- Alert$1.IconButton,
1000
+ cssUtils.IconButton,
987
1001
  {
988
1002
  edge: variant !== "standard" ? "end" : void 0,
989
1003
  onClick: () => setShowText(!showText),
@@ -1068,7 +1082,7 @@ function createCounterRenderTags({
1068
1082
  getOptionLabel
1069
1083
  });
1070
1084
  return /* @__PURE__ */ jsxRuntime.jsx(
1071
- TablePaginationActions.Typography,
1085
+ cssUtils.Typography,
1072
1086
  {
1073
1087
  variant: size === "small" ? "body2" : "body1",
1074
1088
  component: "span",
@@ -1237,7 +1251,7 @@ function useAutocompleteRenderOption() {
1237
1251
  title
1238
1252
  ),
1239
1253
  secondaryText && /* @__PURE__ */ jsxRuntime.jsx(
1240
- TablePaginationActions.Typography,
1254
+ cssUtils.Typography,
1241
1255
  {
1242
1256
  component: "p",
1243
1257
  variant: "caption",
@@ -1261,7 +1275,7 @@ function useCreatableAutocomplete({
1261
1275
  multiple
1262
1276
  }) {
1263
1277
  const intl = reactIntl.useIntl();
1264
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
1278
+ const intlConfig = cssUtils.useImperativeIntl(intl);
1265
1279
  const filter = material.createFilterOptions();
1266
1280
  const { renderOption: autocompleteRenderOption } = useAutocompleteRenderOption();
1267
1281
  const creatableFilterOptions = (options, params) => {
@@ -1326,7 +1340,7 @@ function useMultipleAutocomplete({
1326
1340
  allSelectedText
1327
1341
  }) {
1328
1342
  const intl = reactIntl.useIntl();
1329
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
1343
+ const intlConfig = cssUtils.useImperativeIntl(intl);
1330
1344
  const defaultCounterText = counterText || intlConfig.formatMessage({ id: "c4r.form.selected" });
1331
1345
  const defaultAllSelectedText = allSelectedText || intlConfig.formatMessage({ id: "c4r.form.allSelected" });
1332
1346
  const [multipleValue, setMultipleValue] = React.useState(
@@ -1404,8 +1418,8 @@ const List = material.styled("ul")(
1404
1418
  const ItemWrapper = material.styled("div")(({ style, theme, isSubtitle, isExtended, isMultiple }) => {
1405
1419
  const getSubtitleStyles = () => {
1406
1420
  const baseStyles = {
1407
- height: TablePaginationActions.MENU_ITEM_SIZE_DENSE,
1408
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_DENSE,
1421
+ height: cssUtils.MENU_ITEM_SIZE_DENSE,
1422
+ minHeight: cssUtils.MENU_ITEM_SIZE_DENSE,
1409
1423
  marginTop: `${theme.spacing(1)} !important`,
1410
1424
  alignItems: "flex-end",
1411
1425
  ...theme.typography.caption,
@@ -1462,7 +1476,7 @@ function _AutocompleteList({
1462
1476
  multiple,
1463
1477
  extended,
1464
1478
  itemHeight,
1465
- maxListHeight = TablePaginationActions.MENU_LIST_MAX_SIZE,
1479
+ maxListHeight = cssUtils.MENU_LIST_MAX_SIZE,
1466
1480
  ...otherProps
1467
1481
  }, ref) {
1468
1482
  const childrenArray = React.useMemo(() => {
@@ -1484,9 +1498,9 @@ function _AutocompleteList({
1484
1498
  };
1485
1499
  });
1486
1500
  }, [children, multiple]);
1487
- const defaultItemHeight = itemHeight ?? (extended ? TablePaginationActions.MENU_ITEM_SIZE_EXTENDED : TablePaginationActions.MENU_ITEM_SIZE_DEFAULT);
1501
+ const defaultItemHeight = itemHeight ?? (extended ? cssUtils.MENU_ITEM_SIZE_EXTENDED : cssUtils.MENU_ITEM_SIZE_DEFAULT);
1488
1502
  const listboxHeight = React.useMemo(() => {
1489
- const filterHeight = showFilters && multiple ? TablePaginationActions.MENU_ITEM_SIZE_EXTENDED : 0;
1503
+ const filterHeight = showFilters && multiple ? cssUtils.MENU_ITEM_SIZE_EXTENDED : 0;
1490
1504
  const availableHeight = maxListHeight - filterHeight;
1491
1505
  const calculatedHeight = Math.min(
1492
1506
  childrenArray.length * defaultItemHeight,
@@ -1752,7 +1766,7 @@ function useAutocomplete({
1752
1766
  const Menu$1 = material.styled("div")(({ theme }) => ({
1753
1767
  display: "flex",
1754
1768
  alignItems: "center",
1755
- height: TablePaginationActions.APPBAR_SIZE,
1769
+ height: cssUtils.APPBAR_SIZE,
1756
1770
  marginRight: theme.spacing(1.5)
1757
1771
  }));
1758
1772
  const MenuButton = material.styled(material.IconButton)(({ theme }) => ({
@@ -1798,7 +1812,7 @@ const Logo = material.styled("div")(({ theme }) => ({
1798
1812
  function BrandLogo({ logo }) {
1799
1813
  return /* @__PURE__ */ jsxRuntime.jsx(Logo, { children: logo });
1800
1814
  }
1801
- const Text$1 = material.styled(TablePaginationActions.Typography)({
1815
+ const Text$1 = material.styled(cssUtils.Typography)({
1802
1816
  display: "flex",
1803
1817
  alignItems: "center",
1804
1818
  whiteSpace: "nowrap"
@@ -1815,7 +1829,7 @@ function BrandText({ text }) {
1815
1829
  }
1816
1830
  );
1817
1831
  }
1818
- const Text = material.styled(TablePaginationActions.Typography)(({ theme }) => ({
1832
+ const Text = material.styled(cssUtils.Typography)(({ theme }) => ({
1819
1833
  display: "flex",
1820
1834
  alignItems: "center",
1821
1835
  "&::before": {
@@ -1856,14 +1870,14 @@ const BrandElements = material.styled("div")(({ theme }) => ({
1856
1870
  minWidth: "192px"
1857
1871
  }
1858
1872
  }));
1859
- const Content$4 = material.styled("div")(({ theme }) => ({
1873
+ const Content$5 = material.styled("div")(({ theme }) => ({
1860
1874
  display: "flex",
1861
1875
  alignItems: "center",
1862
1876
  justifyContent: "space-between",
1863
1877
  flex: 1,
1864
1878
  marginLeft: theme.spacing(1)
1865
1879
  }));
1866
- function AppBar({
1880
+ function _AppBar({
1867
1881
  children,
1868
1882
  brandLogo,
1869
1883
  brandText,
@@ -1871,17 +1885,18 @@ function AppBar({
1871
1885
  showBurgerMenu = false,
1872
1886
  onClickMenu,
1873
1887
  ...otherProps
1874
- }) {
1875
- return /* @__PURE__ */ jsxRuntime.jsx(Root$4, { ...otherProps, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Toolbar, { children: [
1888
+ }, ref) {
1889
+ return /* @__PURE__ */ jsxRuntime.jsx(Root$4, { ...otherProps, ref, "data-name": "app-bar", children: /* @__PURE__ */ jsxRuntime.jsxs(material.Toolbar, { children: [
1876
1890
  /* @__PURE__ */ jsxRuntime.jsxs(BrandElements, { children: [
1877
1891
  showBurgerMenu && /* @__PURE__ */ jsxRuntime.jsx(BurgerMenu, { onClickMenu }),
1878
1892
  brandLogo && /* @__PURE__ */ jsxRuntime.jsx(BrandLogo, { logo: brandLogo }),
1879
1893
  brandText && /* @__PURE__ */ jsxRuntime.jsx(BrandText, { text: brandText }),
1880
1894
  secondaryText && /* @__PURE__ */ jsxRuntime.jsx(SecondaryText, { text: secondaryText })
1881
1895
  ] }),
1882
- /* @__PURE__ */ jsxRuntime.jsx(Content$4, { children })
1896
+ /* @__PURE__ */ jsxRuntime.jsx(Content$5, { children })
1883
1897
  ] }) });
1884
1898
  }
1899
+ const AppBar = React.forwardRef(_AppBar);
1885
1900
  const Footer = material.styled(material.Box, {
1886
1901
  shouldForwardProp: (prop) => !["withGutter", "disabled"].includes(prop)
1887
1902
  })(
@@ -1913,7 +1928,7 @@ function CodeAreaFooter({
1913
1928
  ...props
1914
1929
  }) {
1915
1930
  const intl = reactIntl.useIntl();
1916
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
1931
+ const intlConfig = cssUtils.useImperativeIntl(intl);
1917
1932
  if (!onClickFooter) return null;
1918
1933
  return /* @__PURE__ */ jsxRuntime.jsxs(
1919
1934
  Footer,
@@ -1971,7 +1986,7 @@ function CodeAreaHeader({
1971
1986
  size
1972
1987
  }) {
1973
1988
  const intl = reactIntl.useIntl();
1974
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
1989
+ const intlConfig = cssUtils.useImperativeIntl(intl);
1975
1990
  const showExpandButton = !!onClickExpand;
1976
1991
  const showCopyButton = copyValue !== void 0;
1977
1992
  const showMenu = showExpandButton && showCopyButton;
@@ -2000,7 +2015,7 @@ function CodeAreaHeader({
2000
2015
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2001
2016
  /* @__PURE__ */ jsxRuntime.jsxs(Header, { size, "data-size": size, "data-name": "code-area-header", children: [
2002
2017
  /* @__PURE__ */ jsxRuntime.jsx(
2003
- Alert$1.IconButton,
2018
+ cssUtils.IconButton,
2004
2019
  {
2005
2020
  color: "default",
2006
2021
  size,
@@ -2064,7 +2079,7 @@ function CodeAreaHeader({
2064
2079
  }
2065
2080
  ),
2066
2081
  showExpandButton && /* @__PURE__ */ jsxRuntime.jsx(
2067
- Alert$1.IconButton,
2082
+ cssUtils.IconButton,
2068
2083
  {
2069
2084
  color: "default",
2070
2085
  size,
@@ -2686,8 +2701,8 @@ const InputWrapper = material.styled(material.Box, {
2686
2701
  }
2687
2702
  }));
2688
2703
  const HelpIcon = material.styled(iconsMaterial.HelpOutline)(({ theme }) => ({
2689
- width: TablePaginationActions.ICON_SIZE_SMALL,
2690
- height: TablePaginationActions.ICON_SIZE_SMALL,
2704
+ width: cssUtils.ICON_SIZE_SMALL,
2705
+ height: cssUtils.ICON_SIZE_SMALL,
2691
2706
  fill: theme.palette.text.secondary
2692
2707
  }));
2693
2708
  function CodeAreaField({
@@ -3123,13 +3138,13 @@ function DialogHeader({
3123
3138
  ...otherProps
3124
3139
  }) {
3125
3140
  const intl = reactIntl.useIntl();
3126
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
3141
+ const intlConfig = cssUtils.useImperativeIntl(intl);
3127
3142
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3128
3143
  /* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { component: "div", "data-name": "dialog-header", ...otherProps, children: [
3129
3144
  /* @__PURE__ */ jsxRuntime.jsxs(Main$1, { children: [
3130
3145
  /* @__PURE__ */ jsxRuntime.jsxs(ItemsWrapper$1, { flex: 1, maxWidth: 0.8, children: [
3131
3146
  /* @__PURE__ */ jsxRuntime.jsx(
3132
- TablePaginationActions.Typography,
3147
+ cssUtils.Typography,
3133
3148
  {
3134
3149
  component: "h2",
3135
3150
  variant: "inherit",
@@ -3158,7 +3173,7 @@ function DialogHeader({
3158
3173
  children && /* @__PURE__ */ jsxRuntime.jsx(DividerBottom, {})
3159
3174
  ] });
3160
3175
  }
3161
- const Content$3 = material.styled(material.DialogContent, {
3176
+ const Content$4 = material.styled(material.DialogContent, {
3162
3177
  shouldForwardProp: (prop) => !["scrollableContent", "withGutter", "withBottomGutter"].includes(prop)
3163
3178
  })(({ theme, scrollableContent, withGutter, withBottomGutter }) => ({
3164
3179
  display: "flex",
@@ -3235,7 +3250,7 @@ function _DialogContent({
3235
3250
  return () => resizeObserver.disconnect();
3236
3251
  }, [contentRef, updateBorders]);
3237
3252
  return /* @__PURE__ */ jsxRuntime.jsx(
3238
- Content$3,
3253
+ Content$4,
3239
3254
  {
3240
3255
  ref: setContentRef,
3241
3256
  onScroll: handleScroll,
@@ -3527,14 +3542,14 @@ function DialogStepper({
3527
3542
  "data-state": isCompleted ? "completed" : isCurrent ? "current" : "uncompleted",
3528
3543
  children: [
3529
3544
  /* @__PURE__ */ jsxRuntime.jsx(StepNumber, { completed: isCompleted, current: isCurrent, children: isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Check, { fontSize: "small", "aria-label": "Completed step" }) : step }),
3530
- /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { variant: "caption", component: "div", color: labelColor, children: stepLabel })
3545
+ /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", component: "div", color: labelColor, children: stepLabel })
3531
3546
  ]
3532
3547
  },
3533
3548
  idx
3534
3549
  );
3535
3550
  }) }) });
3536
3551
  }
3537
- const Content$2 = material.styled(DialogContent, {
3552
+ const Content$3 = material.styled(DialogContent, {
3538
3553
  shouldForwardProp: (prop) => !["error", "withBorder"].includes(prop)
3539
3554
  })(
3540
3555
  ({ error, withBorder, theme }) => ({
@@ -3563,7 +3578,7 @@ function CodeAreaDialogContent({
3563
3578
  withGutter = false
3564
3579
  }) {
3565
3580
  if (!children) return null;
3566
- return /* @__PURE__ */ jsxRuntime.jsx(Content$2, { withGutter, error, withBorder, children });
3581
+ return /* @__PURE__ */ jsxRuntime.jsx(Content$3, { withGutter, error, withBorder, children });
3567
3582
  }
3568
3583
  function CodeAreaDialogConfirmation({
3569
3584
  onClose,
@@ -3577,7 +3592,7 @@ function CodeAreaDialogConfirmation({
3577
3592
  content
3578
3593
  }) {
3579
3594
  const intl = reactIntl.useIntl();
3580
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
3595
+ const intlConfig = cssUtils.useImperativeIntl(intl);
3581
3596
  if (!onClose || !onCancel) {
3582
3597
  return null;
3583
3598
  }
@@ -3778,7 +3793,7 @@ function ClearButton({
3778
3793
  ...props
3779
3794
  }) {
3780
3795
  const intl = reactIntl.useIntl();
3781
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
3796
+ const intlConfig = cssUtils.useImperativeIntl(intl);
3782
3797
  return /* @__PURE__ */ jsxRuntime.jsx(Container, { size, variant, children: /* @__PURE__ */ jsxRuntime.jsx(
3783
3798
  material.IconButton,
3784
3799
  {
@@ -3851,7 +3866,7 @@ function DatePicker({
3851
3866
  ...props
3852
3867
  }) {
3853
3868
  const intl = reactIntl.useIntl();
3854
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
3869
+ const intlConfig = cssUtils.useImperativeIntl(intl);
3855
3870
  return (
3856
3871
  // Don't remove className, it's used for styling
3857
3872
  /* @__PURE__ */ jsxRuntime.jsx(material.Box, { className: "CartoDatePicker-root", "data-testid": "date-picker", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -4139,7 +4154,7 @@ function DateRangePicker({
4139
4154
  ...props
4140
4155
  }) {
4141
4156
  const intl = reactIntl.useIntl();
4142
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
4157
+ const intlConfig = cssUtils.useImperativeIntl(intl);
4143
4158
  const [isEndDateOpen, setIsEndDateOpen] = React.useState(false);
4144
4159
  const [isStartDateOpen, setIsStartDateOpen] = React.useState(false);
4145
4160
  const [startDate, setStartDate] = React.useState(
@@ -4327,7 +4342,7 @@ function TimePicker({
4327
4342
  ...props
4328
4343
  }) {
4329
4344
  const intl = reactIntl.useIntl();
4330
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
4345
+ const intlConfig = cssUtils.useImperativeIntl(intl);
4331
4346
  const inputRef = React.useRef(null);
4332
4347
  const [inputWidth, setInputWidth] = React.useState(0);
4333
4348
  React.useEffect(() => {
@@ -4438,7 +4453,7 @@ function DateTimePicker({
4438
4453
  ...props
4439
4454
  }) {
4440
4455
  const intl = reactIntl.useIntl();
4441
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
4456
+ const intlConfig = cssUtils.useImperativeIntl(intl);
4442
4457
  return /* @__PURE__ */ jsxRuntime.jsx(
4443
4458
  DateFieldContainer,
4444
4459
  {
@@ -4503,7 +4518,7 @@ function DateTimePicker({
4503
4518
  );
4504
4519
  }
4505
4520
  const DEFAULT_ITEMS = [{ outlinedBullet: false, value: "" }];
4506
- const Content$1 = material.styled("ul")(({ theme }) => ({
4521
+ const Content$2 = material.styled("ul")(({ theme }) => ({
4507
4522
  listStyle: "none",
4508
4523
  paddingLeft: 0,
4509
4524
  margin: theme.spacing(0.5, 0, 0, 0)
@@ -4524,7 +4539,7 @@ const Bullet = material.styled("span")(({ theme }) => ({
4524
4539
  borderRadius: "50%",
4525
4540
  backgroundColor: theme.palette.qualitative.bold[1]
4526
4541
  }));
4527
- const Category = material.styled(TablePaginationActions.Typography)(({ theme }) => ({
4542
+ const Category = material.styled(cssUtils.Typography)(({ theme }) => ({
4528
4543
  minWidth: theme.spacing(10),
4529
4544
  marginRight: theme.spacing(1.5)
4530
4545
  }));
@@ -4533,19 +4548,21 @@ function TooltipData({
4533
4548
  title
4534
4549
  }) {
4535
4550
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4536
- title && /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { color: "inherit", variant: "caption", weight: "medium", children: title }),
4537
- /* @__PURE__ */ jsxRuntime.jsx(Content$1, { children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(Entry, { children: [
4551
+ title && /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { color: "inherit", variant: "caption", weight: "medium", children: title }),
4552
+ /* @__PURE__ */ jsxRuntime.jsx(Content$2, { children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(Entry, { children: [
4538
4553
  /* @__PURE__ */ jsxRuntime.jsx(
4539
4554
  Bullet,
4540
4555
  {
4541
4556
  style: {
4542
4557
  backgroundColor: `${item.outlinedBullet ? "transparent" : item.color}`,
4543
4558
  borderColor: item.color
4544
- }
4559
+ },
4560
+ role: "presentation",
4561
+ "data-bullet": item.outlinedBullet ? "outlined" : "filled"
4545
4562
  }
4546
4563
  ),
4547
4564
  item.category && /* @__PURE__ */ jsxRuntime.jsx(Category, { color: "inherit", variant: "caption", children: item.category }),
4548
- /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { color: "inherit", variant: "caption", weight: "medium", children: item.value })
4565
+ /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { color: "inherit", variant: "caption", weight: "medium", children: item.value })
4549
4566
  ] }, index)) })
4550
4567
  ] });
4551
4568
  }
@@ -4559,32 +4576,47 @@ const AccordionContainer = material.styled("div", {
4559
4576
  boxShadow: `inset 0 0 0 1px ${theme.palette.divider}`
4560
4577
  }
4561
4578
  }));
4562
- function AccordionGroup({
4579
+ function _AccordionGroup({
4563
4580
  variant = "standard",
4564
4581
  items,
4582
+ "aria-label": ariaLabel,
4583
+ "data-testid": dataTestId,
4565
4584
  ...otherProps
4566
- }) {
4567
- return /* @__PURE__ */ jsxRuntime.jsx(AccordionContainer, { ...otherProps, variant, children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
4568
- material.Accordion,
4585
+ }, ref) {
4586
+ return /* @__PURE__ */ jsxRuntime.jsx(
4587
+ AccordionContainer,
4569
4588
  {
4570
- disabled: item.disabled,
4571
- defaultExpanded: item.defaultExpanded,
4572
- onChange: item.onChange,
4573
- children: [
4574
- /* @__PURE__ */ jsxRuntime.jsx(
4575
- material.AccordionSummary,
4576
- {
4577
- "aria-controls": `${index}-content`,
4578
- id: `${index}-header`,
4579
- children: item.summary
4580
- }
4581
- ),
4582
- /* @__PURE__ */ jsxRuntime.jsx(material.AccordionDetails, { children: item.content })
4583
- ]
4584
- },
4585
- index
4586
- )) });
4589
+ ...otherProps,
4590
+ variant,
4591
+ "aria-label": ariaLabel,
4592
+ "data-testid": dataTestId,
4593
+ "data-variant": variant,
4594
+ "data-name": "accordion-group",
4595
+ ref,
4596
+ children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
4597
+ material.Accordion,
4598
+ {
4599
+ disabled: item.disabled,
4600
+ defaultExpanded: item.defaultExpanded,
4601
+ onChange: item.onChange,
4602
+ children: [
4603
+ /* @__PURE__ */ jsxRuntime.jsx(
4604
+ material.AccordionSummary,
4605
+ {
4606
+ "aria-controls": `${index}-content`,
4607
+ id: `${index}-header`,
4608
+ children: item.summary
4609
+ }
4610
+ ),
4611
+ /* @__PURE__ */ jsxRuntime.jsx(material.AccordionDetails, { children: item.content })
4612
+ ]
4613
+ },
4614
+ index
4615
+ ))
4616
+ }
4617
+ );
4587
4618
  }
4619
+ const AccordionGroup = React.forwardRef(_AccordionGroup);
4588
4620
  const sizes = {
4589
4621
  large: 5,
4590
4622
  medium: 4,
@@ -4608,23 +4640,43 @@ const StyledAvatar = material.styled(material.Avatar, {
4608
4640
  ...theme.typography.caption,
4609
4641
  fontWeight: 500,
4610
4642
  svg: {
4611
- width: TablePaginationActions.ICON_SIZE_SMALL,
4612
- height: TablePaginationActions.ICON_SIZE_SMALL
4643
+ width: cssUtils.ICON_SIZE_SMALL,
4644
+ height: cssUtils.ICON_SIZE_SMALL
4613
4645
  }
4614
4646
  },
4615
4647
  ...disabled && {
4616
4648
  opacity: 0.6
4617
4649
  }
4618
4650
  }));
4619
- function Avatar(props) {
4620
- return /* @__PURE__ */ jsxRuntime.jsx(StyledAvatar, { ...props });
4651
+ function _Avatar({
4652
+ size,
4653
+ disabled,
4654
+ "aria-label": ariaLabel,
4655
+ "data-testid": dataTestId,
4656
+ ...otherProps
4657
+ }, ref) {
4658
+ return /* @__PURE__ */ jsxRuntime.jsx(
4659
+ StyledAvatar,
4660
+ {
4661
+ ...otherProps,
4662
+ ref,
4663
+ size,
4664
+ "aria-disabled": disabled,
4665
+ disabled,
4666
+ "aria-label": ariaLabel,
4667
+ "data-testid": dataTestId,
4668
+ "data-size": size,
4669
+ "data-name": "avatar"
4670
+ }
4671
+ );
4621
4672
  }
4673
+ const Avatar = React.forwardRef(_Avatar);
4622
4674
  const StyledMenu = material.styled(material.Menu, {
4623
4675
  shouldForwardProp: (prop) => !["extended", "width", "height"].includes(prop)
4624
4676
  })(({ extended, width, height }) => ({
4625
4677
  ...extended && {
4626
4678
  ".MuiMenuItem-root": {
4627
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED
4679
+ minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED
4628
4680
  }
4629
4681
  },
4630
4682
  ...width && {
@@ -4667,7 +4719,7 @@ const StyledMenuList = material.styled(material.MenuList, {
4667
4719
  })(({ extended, width, height }) => ({
4668
4720
  ...extended && {
4669
4721
  ".MuiMenuItem-root": {
4670
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED
4722
+ minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED
4671
4723
  }
4672
4724
  },
4673
4725
  "&.MuiList-root": {
@@ -4838,7 +4890,7 @@ function _FilterDropdown({
4838
4890
  "data-color": buttonColor
4839
4891
  };
4840
4892
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4841
- /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: tooltipLabel, placement: tooltipPlacement, children: /* @__PURE__ */ jsxRuntime.jsx(ButtonWrapper, { isOpen, buttonColor, ref, children: isIcon ? /* @__PURE__ */ jsxRuntime.jsx(Alert$1.IconButton, { ...commonButtonProps, icon }) : /* @__PURE__ */ jsxRuntime.jsx(
4893
+ /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: tooltipLabel, placement: tooltipPlacement, children: /* @__PURE__ */ jsxRuntime.jsx(ButtonWrapper, { isOpen, buttonColor, ref, children: isIcon ? /* @__PURE__ */ jsxRuntime.jsx(cssUtils.IconButton, { ...commonButtonProps, icon }) : /* @__PURE__ */ jsxRuntime.jsx(
4842
4894
  Button,
4843
4895
  {
4844
4896
  ...commonButtonProps,
@@ -4895,6 +4947,152 @@ function _FilterDropdown({
4895
4947
  const FilterDropdown = React.forwardRef(
4896
4948
  _FilterDropdown
4897
4949
  );
4950
+ const SearchIcon = material.styled(Search.Search, {
4951
+ shouldForwardProp: (prop) => prop !== "minimized" && prop !== "disabled"
4952
+ })(
4953
+ ({ theme, minimized, disabled }) => ({
4954
+ cursor: !disabled && minimized ? "pointer" : "inherit",
4955
+ width: cssUtils.ICON_SIZE_MEDIUM,
4956
+ height: cssUtils.ICON_SIZE_MEDIUM,
4957
+ path: {
4958
+ fillOpacity: 1,
4959
+ fill: disabled ? theme.palette.text.disabled : theme.palette.text.secondary
4960
+ }
4961
+ })
4962
+ );
4963
+ const CancelIcon = material.styled(iconsMaterial.Cancel)(({ theme }) => ({
4964
+ fill: theme.palette.text.hint,
4965
+ cursor: "pointer"
4966
+ }));
4967
+ const CircularProgressIcon = material.styled(material.CircularProgress)(({ theme }) => ({
4968
+ svg: {
4969
+ color: theme.palette.primary.main
4970
+ }
4971
+ }));
4972
+ const SearchFieldBase = material.styled(material.TextField, {
4973
+ shouldForwardProp: (prop) => prop !== "minimized" && prop !== "isInputFocused"
4974
+ })(
4975
+ ({ theme, disabled, minimized, isInputFocused }) => ({
4976
+ "& .MuiInputBase-input": {
4977
+ cursor: disabled ? "not-allowed" : "text",
4978
+ pointerEvents: isInputFocused ? "auto" : "none"
4979
+ // Fix Chrome scroll issue https://issues.chromium.org/issues/41245282
4980
+ },
4981
+ "&.MuiTextField-root .MuiInputBase-root": {
4982
+ paddingRight: theme.spacing(1),
4983
+ "&.MuiInputBase-sizeSmall": {
4984
+ paddingRight: theme.spacing(0.5)
4985
+ },
4986
+ "&:before": {
4987
+ border: `none !important`,
4988
+ "&:hover": {
4989
+ border: `none !important`
4990
+ }
4991
+ },
4992
+ width: minimized ? theme.spacing(4) : "100%",
4993
+ transition: theme.transitions.create("width", {
4994
+ easing: theme.transitions.easing.easeInOut,
4995
+ duration: theme.transitions.duration.shortest
4996
+ })
4997
+ },
4998
+ // Input Adornment
4999
+ "& .MuiInputAdornment-positionStart": {
5000
+ marginLeft: minimized ? theme.spacing(0.125) : void 0
5001
+ },
5002
+ "& .MuiInputAdornment-positionEnd": {
5003
+ minWidth: theme.spacing(4),
5004
+ "&.MuiInputAdornment-sizeSmall": {
5005
+ minWidth: theme.spacing(3)
5006
+ }
5007
+ },
5008
+ // Variants
5009
+ "& .MuiFilledInput-root": {
5010
+ transition: theme.transitions.create("background-color", {
5011
+ easing: theme.transitions.easing.easeInOut,
5012
+ duration: theme.transitions.duration.shortest
5013
+ }),
5014
+ backgroundColor: `${minimized ? "inherit" : theme.palette.default.background} !important`,
5015
+ "&:hover": {
5016
+ backgroundColor: `${disabled ? "inherit" : theme.palette.action.hover} !important`
5017
+ }
5018
+ }
5019
+ })
5020
+ );
5021
+ function _SearchField({
5022
+ value,
5023
+ defaultValue,
5024
+ placeholder,
5025
+ onChange,
5026
+ onClick,
5027
+ onResetSearch,
5028
+ disabled,
5029
+ minimized = false,
5030
+ loading = false,
5031
+ variant = "filled",
5032
+ size = "small",
5033
+ InputProps,
5034
+ startAdornment,
5035
+ endAdornment,
5036
+ onFocus,
5037
+ onBlur,
5038
+ clearTextLabel,
5039
+ ...otherProps
5040
+ }, ref) {
5041
+ const [isInputFocused, setIsInputFocused] = React.useState(false);
5042
+ const clearTextLabelValue = Alert$1.useTranslationFallback(
5043
+ "c4r.button.clear",
5044
+ clearTextLabel
5045
+ );
5046
+ const handleFocus = (event) => {
5047
+ setIsInputFocused(true);
5048
+ onFocus == null ? void 0 : onFocus(event);
5049
+ };
5050
+ const handleBlur = (event) => {
5051
+ setIsInputFocused(false);
5052
+ onBlur == null ? void 0 : onBlur(event);
5053
+ };
5054
+ const handleClearText = () => {
5055
+ onResetSearch == null ? void 0 : onResetSearch();
5056
+ onChange == null ? void 0 : onChange({ target: { value: "" } });
5057
+ };
5058
+ return /* @__PURE__ */ jsxRuntime.jsx(
5059
+ SearchFieldBase,
5060
+ {
5061
+ value: minimized ? "" : value,
5062
+ defaultValue,
5063
+ placeholder: minimized ? "" : placeholder,
5064
+ onChange,
5065
+ onClick,
5066
+ variant,
5067
+ size,
5068
+ focused: false,
5069
+ isInputFocused,
5070
+ disabled,
5071
+ minimized,
5072
+ InputProps: {
5073
+ onFocus: handleFocus,
5074
+ onBlur: handleBlur,
5075
+ startAdornment: /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "start", children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { display: "inline-flex", ml: minimized ? -0.75 : 0 }, children: loading && minimized ? /* @__PURE__ */ jsxRuntime.jsx(CircularProgressIcon, { size: cssUtils.ICON_SIZE_MEDIUM }) : startAdornment || /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { disabled, minimized }) }) }),
5076
+ endAdornment: /* @__PURE__ */ jsxRuntime.jsx(material.InputAdornment, { position: "end", children: loading ? /* @__PURE__ */ jsxRuntime.jsx(CircularProgressIcon, { size: cssUtils.ICON_SIZE_MEDIUM }) : !disabled && !minimized && (value ?? defaultValue) ? endAdornment || /* @__PURE__ */ jsxRuntime.jsx(
5077
+ cssUtils.IconButton,
5078
+ {
5079
+ icon: /* @__PURE__ */ jsxRuntime.jsx(CancelIcon, {}),
5080
+ onClick: handleClearText,
5081
+ size,
5082
+ color: "default",
5083
+ disabled,
5084
+ tooltip: clearTextLabelValue
5085
+ }
5086
+ ) : void 0 }),
5087
+ ...InputProps
5088
+ },
5089
+ "data-name": "search-field",
5090
+ ref,
5091
+ ...otherProps
5092
+ }
5093
+ );
5094
+ }
5095
+ const SearchField = React.forwardRef(_SearchField);
4898
5096
  const MAX_WIDTH = 480;
4899
5097
  const SnackbarRoot = material.styled(material.Snackbar)(({ theme }) => ({
4900
5098
  bottom: theme.spacing(2),
@@ -4908,7 +5106,7 @@ const SnackbarRoot = material.styled(material.Snackbar)(({ theme }) => ({
4908
5106
  maxWidth: `${MAX_WIDTH}px`
4909
5107
  }
4910
5108
  }));
4911
- const Content = material.styled(material.Box, {
5109
+ const Content$1 = material.styled(material.Box, {
4912
5110
  shouldForwardProp: (prop) => prop !== "autoWidth"
4913
5111
  })(({ autoWidth, theme }) => ({
4914
5112
  minWidth: "100%",
@@ -4990,7 +5188,7 @@ const CloseButtonWrapper = material.styled(material.Box)(({ theme }) => ({
4990
5188
  }));
4991
5189
  function Snackbar({
4992
5190
  severity = "neutral",
4993
- autoHideDuration = TablePaginationActions.NOTIFICATION_DURATION_IN_MS,
5191
+ autoHideDuration = cssUtils.NOTIFICATION_DURATION_IN_MS,
4994
5192
  closeable = true,
4995
5193
  children,
4996
5194
  title,
@@ -5002,11 +5200,11 @@ function Snackbar({
5002
5200
  ...rest
5003
5201
  }) {
5004
5202
  const intl = reactIntl.useIntl();
5005
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
5203
+ const intlConfig = cssUtils.useImperativeIntl(intl);
5006
5204
  const isNeutral = severity === "neutral";
5007
5205
  const disabledIcon = icon === false || isNeutral && !icon;
5008
5206
  const disabledAutoHide = autoHideDuration === null;
5009
- const duration = disabledAutoHide ? null : autoHideDuration || TablePaginationActions.NOTIFICATION_DURATION_IN_MS;
5207
+ const duration = disabledAutoHide ? null : autoHideDuration || cssUtils.NOTIFICATION_DURATION_IN_MS;
5010
5208
  return /* @__PURE__ */ jsxRuntime.jsx(material.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
5011
5209
  SnackbarRoot,
5012
5210
  {
@@ -5017,7 +5215,7 @@ function Snackbar({
5017
5215
  TransitionComponent: autoWidth ? material.Fade : material.Slide,
5018
5216
  "data-auto-width": autoWidth,
5019
5217
  children: /* @__PURE__ */ jsxRuntime.jsxs(
5020
- Content,
5218
+ Content$1,
5021
5219
  {
5022
5220
  sx: {
5023
5221
  position: "relative"
@@ -5038,7 +5236,7 @@ function Snackbar({
5038
5236
  }
5039
5237
  ),
5040
5238
  closeable && /* @__PURE__ */ jsxRuntime.jsx(CloseButtonWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
5041
- Alert$1.IconButton,
5239
+ cssUtils.IconButton,
5042
5240
  {
5043
5241
  color: "default",
5044
5242
  onClick: (e) => onClose(e, "timeout"),
@@ -5166,6 +5364,7 @@ const TagRoot = material.styled("div", {
5166
5364
  padding: theme.spacing(0, 0.5),
5167
5365
  borderRadius: theme.spacing(0.25),
5168
5366
  gap: theme.spacing(0.5),
5367
+ maxWidth: "100%",
5169
5368
  height: theme.spacing(2),
5170
5369
  borderWidth: "1px",
5171
5370
  borderStyle: "solid",
@@ -5184,8 +5383,8 @@ const TagIcon = material.styled("div")(({ theme }) => ({
5184
5383
  justifyContent: "center",
5185
5384
  alignItems: "center",
5186
5385
  "& svg": {
5187
- width: theme.spacing(TablePaginationActions.ICON_SIZE_SMALL),
5188
- height: theme.spacing(TablePaginationActions.ICON_SIZE_SMALL),
5386
+ width: theme.spacing(cssUtils.ICON_SIZE_SMALL),
5387
+ height: theme.spacing(cssUtils.ICON_SIZE_SMALL),
5189
5388
  "& g": {
5190
5389
  fill: "currentColor"
5191
5390
  }
@@ -5196,6 +5395,7 @@ const TagLabel = material.styled("div", {
5196
5395
  })(({ type, theme }) => ({
5197
5396
  display: "flex",
5198
5397
  alignItems: "center",
5398
+ ...cssUtils.ellipsisStyles,
5199
5399
  paddingTop: type === "code" ? theme.spacing(0.25) : void 0
5200
5400
  }));
5201
5401
  function _Tag({
@@ -5227,7 +5427,7 @@ function _Tag({
5227
5427
  children: [
5228
5428
  icon && /* @__PURE__ */ jsxRuntime.jsx(TagIcon, { children: icon }),
5229
5429
  /* @__PURE__ */ jsxRuntime.jsx(TagLabel, { type, children: /* @__PURE__ */ jsxRuntime.jsx(
5230
- TablePaginationActions.Typography,
5430
+ cssUtils.Typography,
5231
5431
  {
5232
5432
  component: "span",
5233
5433
  color: "inherit",
@@ -5369,7 +5569,7 @@ function useFileUpload({
5369
5569
  uploadInputRef
5370
5570
  }) {
5371
5571
  const intl = reactIntl.useIntl();
5372
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
5572
+ const intlConfig = cssUtils.useImperativeIntl(intl);
5373
5573
  const [filesText, setFilesText] = React.useState("");
5374
5574
  const [dragOver, setDragOver] = React.useState(false);
5375
5575
  React.useEffect(() => {
@@ -5524,12 +5724,155 @@ function _UploadField({
5524
5724
  ] });
5525
5725
  }
5526
5726
  const UploadField = React.forwardRef(_UploadField);
5527
- exports.TablePaginationActions = TablePaginationActions.TablePaginationActions;
5528
- exports.Typography = TablePaginationActions.Typography;
5727
+ const TooltipRoot = material.styled(material.Tooltip)(() => ({
5728
+ whiteSpace: "nowrap",
5729
+ maxWidth: 999,
5730
+ pointerEvents: "auto"
5731
+ }));
5732
+ const Content = material.styled("span", {
5733
+ shouldForwardProp: (prop) => !["ellipsisTarget", "lines", "content"].includes(prop)
5734
+ })(({ ellipsisTarget = "all", lines = 1, content = "block" }) => {
5735
+ if (lines > 1) {
5736
+ return {
5737
+ display: "-webkit-box",
5738
+ ...cssUtils.ellipsisStyles,
5739
+ whiteSpace: "initial !important",
5740
+ WebkitLineClamp: lines,
5741
+ WebkitBoxOrient: "vertical",
5742
+ "& > *": { display: "block" }
5743
+ };
5744
+ }
5745
+ if (ellipsisTarget === "first-child") {
5746
+ return {
5747
+ display: "flex",
5748
+ flex: "1",
5749
+ overflow: "hidden",
5750
+ "& > *:nth-of-type(1)": {
5751
+ display: "block",
5752
+ ...cssUtils.ellipsisStyles,
5753
+ marginRight: "-0.15em"
5754
+ // Prevent ellipsis separation
5755
+ }
5756
+ };
5757
+ }
5758
+ if (content === "flex") {
5759
+ return {
5760
+ display: "flex",
5761
+ flex: "1",
5762
+ "& > *": {
5763
+ display: "block",
5764
+ ...cssUtils.ellipsisStyles
5765
+ }
5766
+ };
5767
+ }
5768
+ return {
5769
+ display: "block",
5770
+ ...cssUtils.ellipsisStyles,
5771
+ fontWeight: "inherit",
5772
+ "& > *": { display: "inline" }
5773
+ };
5774
+ });
5775
+ function _EllipsisWithTooltip({
5776
+ children,
5777
+ tooltipText,
5778
+ alwaysShowTooltip,
5779
+ content = "block",
5780
+ textRef: inputTextRef,
5781
+ ellipsisTarget = "all",
5782
+ lines = 1,
5783
+ "aria-label": ariaLabel,
5784
+ contentProps,
5785
+ ...otherProps
5786
+ }, ref) {
5787
+ var _a;
5788
+ const textElementRef = React.useRef(null);
5789
+ const [overflowing, setOverflowing] = React.useState(false);
5790
+ const textRef = React.useMemo(
5791
+ () => inputTextRef || textElementRef,
5792
+ [inputTextRef, textElementRef]
5793
+ );
5794
+ const getTextContent = (node) => {
5795
+ if (typeof node === "string") return node;
5796
+ if (typeof node === "number") return String(node);
5797
+ if (React.isValidElement(node)) {
5798
+ const props = node.props;
5799
+ if (props.children) {
5800
+ return getTextContent(props.children);
5801
+ }
5802
+ }
5803
+ return "";
5804
+ };
5805
+ const elementTitle = tooltipText || ((_a = textElementRef.current) == null ? void 0 : _a.innerText) || (alwaysShowTooltip || overflowing ? getTextContent(children) : "");
5806
+ React.useEffect(() => {
5807
+ const container = textRef.current;
5808
+ if (!container || !children) return;
5809
+ if (alwaysShowTooltip) {
5810
+ setOverflowing(true);
5811
+ return;
5812
+ }
5813
+ let isOverflowing = false;
5814
+ if (lines > 1) {
5815
+ isOverflowing = container.scrollHeight > container.clientHeight;
5816
+ } else if (ellipsisTarget === "first-child") {
5817
+ const children2 = Array.from(container.children);
5818
+ const totalWidth = children2.reduce(
5819
+ (sum, child) => sum + ((child == null ? void 0 : child.scrollWidth) || 0),
5820
+ 0
5821
+ );
5822
+ isOverflowing = totalWidth > container.clientWidth;
5823
+ } else {
5824
+ const hasContainerOverflow = container.scrollWidth > container.clientWidth;
5825
+ const children2 = Array.from(container.children);
5826
+ const hasChildOverflow = children2.some(
5827
+ (child) => child.scrollWidth > child.clientWidth
5828
+ );
5829
+ isOverflowing = hasContainerOverflow || hasChildOverflow;
5830
+ }
5831
+ setOverflowing(isOverflowing);
5832
+ }, [textRef, alwaysShowTooltip, children, ellipsisTarget, lines, content]);
5833
+ React.useEffect(() => {
5834
+ if (typeof ref === "function") {
5835
+ ref(textElementRef.current);
5836
+ } else if (ref) {
5837
+ ref.current = textElementRef.current;
5838
+ }
5839
+ }, [ref]);
5840
+ return /* @__PURE__ */ jsxRuntime.jsx(
5841
+ TooltipRoot,
5842
+ {
5843
+ disableFocusListener: !overflowing && !alwaysShowTooltip,
5844
+ disableHoverListener: !overflowing && !alwaysShowTooltip,
5845
+ disableTouchListener: !overflowing && !alwaysShowTooltip,
5846
+ title: elementTitle,
5847
+ describeChild: true,
5848
+ ...otherProps,
5849
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5850
+ Content,
5851
+ {
5852
+ "aria-label": ariaLabel ?? elementTitle,
5853
+ ref: textElementRef,
5854
+ ellipsisTarget,
5855
+ lines,
5856
+ content,
5857
+ "data-name": "ellipsis-with-tooltip",
5858
+ "data-overflowing": overflowing,
5859
+ "data-lines": lines,
5860
+ "data-content": content,
5861
+ "data-ellipsis-target": ellipsisTarget,
5862
+ ...contentProps,
5863
+ children
5864
+ }
5865
+ )
5866
+ }
5867
+ );
5868
+ }
5869
+ const EllipsisWithTooltip = React.forwardRef(_EllipsisWithTooltip);
5529
5870
  exports.Alert = Alert$1.Alert;
5530
- exports.IconButton = Alert$1.IconButton;
5531
5871
  exports.Link = Alert$1.Link;
5532
5872
  exports.ScreenReaderOnly = Alert$1.ScreenReaderOnly;
5873
+ exports.IconButton = cssUtils.IconButton;
5874
+ exports.TablePaginationActions = cssUtils.TablePaginationActions;
5875
+ exports.Typography = cssUtils.Typography;
5533
5876
  exports.MenuItem = MenuItem.MenuItem;
5534
5877
  exports.AUTOCOMPLETE_GROUP_HEADER_PROPERTY = AUTOCOMPLETE_GROUP_HEADER_PROPERTY;
5535
5878
  exports.AccordionGroup = AccordionGroup;
@@ -5563,6 +5906,7 @@ exports.DialogFooter = DialogFooter;
5563
5906
  exports.DialogHeader = DialogHeader;
5564
5907
  exports.DialogPaper = DialogPaper;
5565
5908
  exports.DialogStepper = DialogStepper;
5909
+ exports.EllipsisWithTooltip = EllipsisWithTooltip;
5566
5910
  exports.FilterDropdown = FilterDropdown;
5567
5911
  exports.FilterDropdownMenuItem = FilterDropdownMenuItem;
5568
5912
  exports.LabelWithIndicator = LabelWithIndicator;
@@ -5572,6 +5916,7 @@ exports.MenuList = MenuList;
5572
5916
  exports.MultipleAutocomplete = MultipleAutocomplete;
5573
5917
  exports.MultipleSelectField = MultipleSelectField;
5574
5918
  exports.PasswordField = PasswordField;
5919
+ exports.SearchField = SearchField;
5575
5920
  exports.SelectField = SelectField;
5576
5921
  exports.Snackbar = Snackbar;
5577
5922
  exports.SplitButton = SplitButton;