@carto/meridian-ds 1.5.0-alpha-virtual-autocomplete.1 → 1.5.0-alpha.split

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 (37) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/{Alert-BzEgeyQJ.cjs → Alert-BiOR9aar.cjs} +1 -1
  3. package/dist/{Alert-CnaTtNJd.js → Alert-CywtIMOj.js} +1 -1
  4. package/dist/{MenuItem-lAxlHrDp.cjs → MenuItem-Br2jY2lt.cjs} +5 -9
  5. package/dist/{MenuItem-D6wJym7Z.js → MenuItem-CXnnE5lK.js} +5 -9
  6. package/dist/{TablePaginationActions-mbbjzV6Y.cjs → TablePaginationActions-CFGXm44W.cjs} +0 -8
  7. package/dist/{TablePaginationActions-Cz5Hbi6N.js → TablePaginationActions-KpTvhN4Y.js} +1 -9
  8. package/dist/components/index.cjs +49 -162
  9. package/dist/components/index.js +50 -163
  10. package/dist/theme/index.cjs +9 -13
  11. package/dist/theme/index.js +10 -14
  12. package/dist/types/components/atoms/SplitButton.d.ts +9 -5
  13. package/dist/types/components/atoms/SplitButton.d.ts.map +1 -1
  14. package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts +1 -1
  15. package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts.map +1 -1
  16. package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts +0 -18
  17. package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts.map +1 -1
  18. package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts +1 -1
  19. package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts.map +1 -1
  20. package/dist/types/components/molecules/Autocomplete/types.d.ts +3 -61
  21. package/dist/types/components/molecules/Autocomplete/types.d.ts.map +1 -1
  22. package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts +1 -3
  23. package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts.map +1 -1
  24. package/dist/types/components/molecules/Autocomplete/utils.d.ts +0 -9
  25. package/dist/types/components/molecules/Autocomplete/utils.d.ts.map +1 -1
  26. package/dist/types/components/molecules/Menu/Menu.d.ts.map +1 -1
  27. package/dist/types/components/molecules/Menu/MenuItem.d.ts.map +1 -1
  28. package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts.map +1 -1
  29. package/dist/types/components/molecules/Menu/MenuList.d.ts.map +1 -1
  30. package/dist/types/components/molecules/MultipleSelectField/MultipleSelectField.d.ts.map +1 -1
  31. package/dist/types/theme/sections/components/forms.d.ts.map +1 -1
  32. package/dist/types/theme/sections/components/navigation.d.ts.map +1 -1
  33. package/dist/types/theme/theme-constants.d.ts +0 -4
  34. package/dist/types/theme/theme-constants.d.ts.map +1 -1
  35. package/dist/widgets/index.cjs +2 -2
  36. package/dist/widgets/index.js +2 -2
  37. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- - Support VirtualizedList in Autocomplete components [#215](https://github.com/CartoDB/meridian-ds/pull/215)
5
+ - Support `loading` and `disabled` properties in `SplitButton` [#216](https://github.com/CartoDB/meridian-ds/pull/216)
6
6
 
7
7
  ## 1.0
8
8
 
@@ -2,7 +2,7 @@
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const React = require("react");
4
4
  const material = require("@mui/material");
5
- const TablePaginationActions = require("./TablePaginationActions-mbbjzV6Y.cjs");
5
+ const TablePaginationActions = require("./TablePaginationActions-CFGXm44W.cjs");
6
6
  const Option = material.styled("div")(({ theme }) => ({
7
7
  position: "relative",
8
8
  display: "inline-flex",
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useState } from "react";
3
3
  import { styled, IconButton as IconButton$1, Tooltip, CircularProgress, Alert as Alert$1, Fade, AlertTitle } from "@mui/material";
4
- import { b as ICON_SIZE_MEDIUM, T as Typography } from "./TablePaginationActions-Cz5Hbi6N.js";
4
+ import { b as ICON_SIZE_MEDIUM, T as Typography } from "./TablePaginationActions-KpTvhN4Y.js";
5
5
  const Option = styled("div")(({ theme }) => ({
6
6
  position: "relative",
7
7
  display: "inline-flex",
@@ -2,7 +2,6 @@
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const React = require("react");
4
4
  const material = require("@mui/material");
5
- const TablePaginationActions = require("./TablePaginationActions-mbbjzV6Y.cjs");
6
5
  const StyledMenuItem = material.styled(material.MenuItem, {
7
6
  shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
8
7
  prop
@@ -29,7 +28,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
29
28
  color: theme.palette.text.secondary
30
29
  },
31
30
  "&.MuiMenuItem-root": {
32
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_DENSE,
31
+ minHeight: theme.spacing(3),
33
32
  paddingTop: 0,
34
33
  paddingBottom: 0,
35
34
  marginTop: theme.spacing(1),
@@ -96,7 +95,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
96
95
  },
97
96
  ...extended && {
98
97
  "&.MuiButtonBase-root.MuiMenuItem-root": {
99
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED
98
+ minHeight: theme.spacing(6)
100
99
  }
101
100
  },
102
101
  ...fixed && {
@@ -107,14 +106,14 @@ const StyledMenuItem = material.styled(material.MenuItem, {
107
106
  bottom: 0,
108
107
  right: 0,
109
108
  zIndex: 2,
110
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED,
109
+ minHeight: theme.spacing(6),
111
110
  marginBottom: theme.spacing(1),
112
111
  padding: theme.spacing(0.5, 1.5),
113
112
  backgroundColor: `${theme.palette.background.paper} !important`,
114
113
  borderBottom: `1px solid ${theme.palette.divider}`
115
114
  },
116
115
  ".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type": {
117
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED,
116
+ minHeight: theme.spacing(6),
118
117
  marginTop: 0,
119
118
  "&:hover": {
120
119
  backgroundColor: theme.palette.background.paper
@@ -128,7 +127,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
128
127
  },
129
128
  ...dense && {
130
129
  "&.MuiButtonBase-root.MuiMenuItem-root": {
131
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_DENSE,
130
+ minHeight: theme.spacing(3),
132
131
  padding: theme.spacing(0.25, 1.5)
133
132
  }
134
133
  }
@@ -141,7 +140,6 @@ function _MenuItem({
141
140
  extended,
142
141
  fixed,
143
142
  iconColor = "primary",
144
- dense,
145
143
  ...props
146
144
  }, ref) {
147
145
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -154,12 +152,10 @@ function _MenuItem({
154
152
  subtitle,
155
153
  destructive,
156
154
  extended,
157
- dense,
158
155
  fixed,
159
156
  color: iconColor,
160
157
  "data-destructive": destructive,
161
158
  "data-extended": extended,
162
- "data-dense": dense,
163
159
  "data-fixed": fixed
164
160
  }
165
161
  );
@@ -1,7 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { styled, MenuItem as MenuItem$1 } from "@mui/material";
4
- import { e as MENU_ITEM_SIZE_DENSE, f as MENU_ITEM_SIZE_EXTENDED } from "./TablePaginationActions-Cz5Hbi6N.js";
5
4
  const StyledMenuItem = styled(MenuItem$1, {
6
5
  shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
7
6
  prop
@@ -28,7 +27,7 @@ const StyledMenuItem = styled(MenuItem$1, {
28
27
  color: theme.palette.text.secondary
29
28
  },
30
29
  "&.MuiMenuItem-root": {
31
- minHeight: MENU_ITEM_SIZE_DENSE,
30
+ minHeight: theme.spacing(3),
32
31
  paddingTop: 0,
33
32
  paddingBottom: 0,
34
33
  marginTop: theme.spacing(1),
@@ -95,7 +94,7 @@ const StyledMenuItem = styled(MenuItem$1, {
95
94
  },
96
95
  ...extended && {
97
96
  "&.MuiButtonBase-root.MuiMenuItem-root": {
98
- minHeight: MENU_ITEM_SIZE_EXTENDED
97
+ minHeight: theme.spacing(6)
99
98
  }
100
99
  },
101
100
  ...fixed && {
@@ -106,14 +105,14 @@ const StyledMenuItem = styled(MenuItem$1, {
106
105
  bottom: 0,
107
106
  right: 0,
108
107
  zIndex: 2,
109
- minHeight: MENU_ITEM_SIZE_EXTENDED,
108
+ minHeight: theme.spacing(6),
110
109
  marginBottom: theme.spacing(1),
111
110
  padding: theme.spacing(0.5, 1.5),
112
111
  backgroundColor: `${theme.palette.background.paper} !important`,
113
112
  borderBottom: `1px solid ${theme.palette.divider}`
114
113
  },
115
114
  ".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type": {
116
- minHeight: MENU_ITEM_SIZE_EXTENDED,
115
+ minHeight: theme.spacing(6),
117
116
  marginTop: 0,
118
117
  "&:hover": {
119
118
  backgroundColor: theme.palette.background.paper
@@ -127,7 +126,7 @@ const StyledMenuItem = styled(MenuItem$1, {
127
126
  },
128
127
  ...dense && {
129
128
  "&.MuiButtonBase-root.MuiMenuItem-root": {
130
- minHeight: MENU_ITEM_SIZE_DENSE,
129
+ minHeight: theme.spacing(3),
131
130
  padding: theme.spacing(0.25, 1.5)
132
131
  }
133
132
  }
@@ -140,7 +139,6 @@ function _MenuItem({
140
139
  extended,
141
140
  fixed,
142
141
  iconColor = "primary",
143
- dense,
144
142
  ...props
145
143
  }, ref) {
146
144
  return /* @__PURE__ */ jsx(
@@ -153,12 +151,10 @@ function _MenuItem({
153
151
  subtitle,
154
152
  destructive,
155
153
  extended,
156
- dense,
157
154
  fixed,
158
155
  color: iconColor,
159
156
  "data-destructive": destructive,
160
157
  "data-extended": extended,
161
- "data-dense": dense,
162
158
  "data-fixed": fixed
163
159
  }
164
160
  );
@@ -778,10 +778,6 @@ const ICON_SIZE_MEDIUM = getSpacing(2.25);
778
778
  const ICON_SIZE_LARGE = getSpacing(3);
779
779
  const APPBAR_SIZE = getSpacing(6);
780
780
  const NOTIFICATION_DURATION_IN_MS = 6e3;
781
- const MENU_LIST_MAX_SIZE = 312;
782
- const MENU_ITEM_SIZE_DENSE = 24;
783
- const MENU_ITEM_SIZE_DEFAULT = 32;
784
- const MENU_ITEM_SIZE_EXTENDED = 48;
785
781
  const FontWeight = {
786
782
  regular: 400,
787
783
  medium: 500,
@@ -5656,10 +5652,6 @@ exports.BREAKPOINTS = BREAKPOINTS;
5656
5652
  exports.ICON_SIZE_LARGE = ICON_SIZE_LARGE;
5657
5653
  exports.ICON_SIZE_MEDIUM = ICON_SIZE_MEDIUM;
5658
5654
  exports.ICON_SIZE_SMALL = ICON_SIZE_SMALL;
5659
- exports.MENU_ITEM_SIZE_DEFAULT = MENU_ITEM_SIZE_DEFAULT;
5660
- exports.MENU_ITEM_SIZE_DENSE = MENU_ITEM_SIZE_DENSE;
5661
- exports.MENU_ITEM_SIZE_EXTENDED = MENU_ITEM_SIZE_EXTENDED;
5662
- exports.MENU_LIST_MAX_SIZE = MENU_LIST_MAX_SIZE;
5663
5655
  exports.NOTIFICATION_DURATION_IN_MS = NOTIFICATION_DURATION_IN_MS;
5664
5656
  exports.SPACING = SPACING;
5665
5657
  exports.TablePaginationActions = TablePaginationActions;
@@ -777,10 +777,6 @@ const ICON_SIZE_MEDIUM = getSpacing(2.25);
777
777
  const ICON_SIZE_LARGE = getSpacing(3);
778
778
  const APPBAR_SIZE = getSpacing(6);
779
779
  const NOTIFICATION_DURATION_IN_MS = 6e3;
780
- const MENU_LIST_MAX_SIZE = 312;
781
- const MENU_ITEM_SIZE_DENSE = 24;
782
- const MENU_ITEM_SIZE_DEFAULT = 32;
783
- const MENU_ITEM_SIZE_EXTENDED = 48;
784
780
  const FontWeight = {
785
781
  regular: 400,
786
782
  medium: 500,
@@ -5654,17 +5650,13 @@ export {
5654
5650
  APPBAR_SIZE as A,
5655
5651
  BREAKPOINTS as B,
5656
5652
  ICON_SIZE_LARGE as I,
5657
- MENU_ITEM_SIZE_DEFAULT as M,
5658
5653
  NOTIFICATION_DURATION_IN_MS as N,
5659
5654
  SPACING as S,
5660
5655
  Typography as T,
5661
5656
  TablePaginationActions as a,
5662
5657
  ICON_SIZE_MEDIUM as b,
5663
5658
  ICON_SIZE_SMALL as c,
5664
- MENU_LIST_MAX_SIZE as d,
5665
- MENU_ITEM_SIZE_DENSE as e,
5666
- MENU_ITEM_SIZE_EXTENDED as f,
5659
+ getDefaultExportFromCjs as d,
5667
5660
  getSpacing as g,
5668
- getDefaultExportFromCjs as h,
5669
5661
  useImperativeIntl as u
5670
5662
  };
@@ -3,15 +3,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const material = require("@mui/material");
6
- const TablePaginationActions = require("../TablePaginationActions-mbbjzV6Y.cjs");
6
+ const TablePaginationActions = require("../TablePaginationActions-CFGXm44W.cjs");
7
7
  const ArrowDown = require("../ArrowDown-8fLj23Ge.cjs");
8
8
  const OpenDiagonallyRight = require("../OpenDiagonallyRight-CM1tojUq.cjs");
9
9
  const reactIntl = require("react-intl");
10
10
  const iconsMaterial = require("@mui/icons-material");
11
- const Alert$1 = require("../Alert-BzEgeyQJ.cjs");
11
+ const Alert$1 = require("../Alert-BiOR9aar.cjs");
12
12
  require("cartocolor");
13
- const MenuItem = require("../MenuItem-lAxlHrDp.cjs");
14
- const reactWindow = require("react-window");
13
+ const MenuItem = require("../MenuItem-Br2jY2lt.cjs");
15
14
  const DatePicker$1 = require("@mui/x-date-pickers/DatePicker");
16
15
  const xDatePickers = require("@mui/x-date-pickers");
17
16
  const TimePicker$1 = require("@mui/x-date-pickers/TimePicker");
@@ -109,6 +108,9 @@ const ButtonGroup = material.styled(material.ButtonGroup)(({ theme, size }) => (
109
108
  }));
110
109
  function SplitButton({
111
110
  options,
111
+ disabled,
112
+ loading,
113
+ loadingPosition,
112
114
  onClick,
113
115
  variant,
114
116
  size,
@@ -147,8 +149,17 @@ function SplitButton({
147
149
  color,
148
150
  ...otherProps,
149
151
  children: [
150
- /* @__PURE__ */ jsxRuntime.jsx(material.Button, { onClick: handleClick, children: (_a = options[selectedIndex]) == null ? void 0 : _a.label }),
151
- /* @__PURE__ */ jsxRuntime.jsx(material.Button, { onClick: handleToggle, children: open ? /* @__PURE__ */ jsxRuntime.jsx(OpenDiagonallyRight.ArrowUp, {}) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ArrowDown, {}) })
152
+ /* @__PURE__ */ jsxRuntime.jsx(
153
+ Button,
154
+ {
155
+ disabled,
156
+ loading,
157
+ loadingPosition,
158
+ onClick: handleClick,
159
+ children: (_a = options[selectedIndex]) == null ? void 0 : _a.label
160
+ }
161
+ ),
162
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { disabled: loading || disabled, onClick: handleToggle, children: open ? /* @__PURE__ */ jsxRuntime.jsx(OpenDiagonallyRight.ArrowUp, {}) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ArrowDown, {}) })
152
163
  ]
153
164
  }
154
165
  ),
@@ -468,10 +479,10 @@ function ToggleButtonGroup({
468
479
  }
469
480
  const StyledMenu = material.styled(material.Menu, {
470
481
  shouldForwardProp: (prop) => !["extended", "width", "height"].includes(prop)
471
- })(({ extended, width, height }) => ({
482
+ })(({ theme, extended, width, height }) => ({
472
483
  ...extended && {
473
484
  ".MuiMenuItem-root": {
474
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED
485
+ minHeight: theme.spacing(6)
475
486
  }
476
487
  },
477
488
  ...width && {
@@ -511,10 +522,10 @@ function _Menu({ extended, width, height, MenuListProps, ...otherProps }, ref) {
511
522
  const Menu$1 = React.forwardRef(_Menu);
512
523
  const StyledMenuList = material.styled(material.MenuList, {
513
524
  shouldForwardProp: (prop) => !["extended", "width", "height"].includes(prop)
514
- })(({ extended, width, height }) => ({
525
+ })(({ theme, extended, width, height }) => ({
515
526
  ...extended && {
516
527
  ".MuiMenuItem-root": {
517
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED
528
+ minHeight: theme.spacing(6)
518
529
  }
519
530
  },
520
531
  "&.MuiList-root": {
@@ -545,8 +556,7 @@ function _MenuList({ extended, width, height, ...otherProps }, ref) {
545
556
  }
546
557
  const MenuList = React.forwardRef(_MenuList);
547
558
  const StyledMenuItem$1 = material.styled(MenuItem.MenuItem)(() => ({
548
- marginTop: "0 !important",
549
- marginBottom: "0 !important"
559
+ marginTop: "0 !important"
550
560
  }));
551
561
  const LinkFilter = material.styled(material.Link)(
552
562
  ({ disabled, theme }) => ({
@@ -786,20 +796,12 @@ function _MultipleSelectField({
786
796
  },
787
797
  children: [
788
798
  showFilters && /* @__PURE__ */ jsxRuntime.jsx(
789
- material.Box,
799
+ MenuItemFilter,
790
800
  {
791
- sx: {
792
- mb: 1
793
- },
794
- children: /* @__PURE__ */ jsxRuntime.jsx(
795
- MenuItemFilter,
796
- {
797
- areAllSelected,
798
- areAnySelected,
799
- selectAll,
800
- selectAllDisabled
801
- }
802
- )
801
+ areAllSelected,
802
+ areAnySelected,
803
+ selectAll,
804
+ selectAllDisabled
803
805
  }
804
806
  ),
805
807
  options == null ? void 0 : options.map((option) => {
@@ -1133,40 +1135,7 @@ const getDefaultOptionLabel = (option) => {
1133
1135
  const createOptionWithMultiple = (option, multiple) => {
1134
1136
  return typeof option !== "object" || option === null ? { value: option, multiple } : { ...option, multiple };
1135
1137
  };
1136
- const getDefaultLimitTagsText = (more) => /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-testid": "more-options-tag", children: [
1137
- "+",
1138
- more
1139
- ] });
1140
- function createCounterRenderTags(counterText = "selected", options = [], size = "small", getOptionLabel = getDefaultOptionLabel) {
1141
- const CounterRenderTags = (value) => {
1142
- if (value.length === 0) {
1143
- return null;
1144
- }
1145
- const totalCount = options.length;
1146
- const selectedCount = value.length;
1147
- let text;
1148
- if (selectedCount === totalCount && totalCount > 0) {
1149
- text = `All ${counterText}`;
1150
- } else if (selectedCount === 1) {
1151
- text = getOptionLabel(value[0]);
1152
- } else {
1153
- text = `${selectedCount} ${counterText}`;
1154
- }
1155
- return /* @__PURE__ */ jsxRuntime.jsx(
1156
- TablePaginationActions.Typography,
1157
- {
1158
- variant: size === "small" ? "body2" : "body1",
1159
- component: "span",
1160
- "data-testid": "counter-tag",
1161
- sx: {
1162
- ml: 1
1163
- },
1164
- children: text
1165
- }
1166
- );
1167
- };
1168
- return CounterRenderTags;
1169
- }
1138
+ const getDefaultLimitTagsText = (more) => /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "more-options-tag", children: `+${more}` });
1170
1139
  function useAutocompleteRenderOption() {
1171
1140
  const renderOption = (props, option, state, getOptionLabel, customIcon) => {
1172
1141
  const {
@@ -1308,8 +1277,7 @@ function useMultipleAutocomplete({
1308
1277
  options,
1309
1278
  value,
1310
1279
  onChange,
1311
- getOptionLabel,
1312
- size
1280
+ getOptionLabel
1313
1281
  }) {
1314
1282
  const [multipleValue, setMultipleValue] = React.useState(
1315
1283
  Array.isArray(value) ? value : value ? [value] : []
@@ -1344,20 +1312,13 @@ function useMultipleAutocomplete({
1344
1312
  getOptionLabel
1345
1313
  );
1346
1314
  };
1347
- const getCounterRenderTags = () => createCounterRenderTags(
1348
- "selected",
1349
- options,
1350
- size,
1351
- getOptionLabel ? (option) => getOptionLabel(option) : void 0
1352
- );
1353
1315
  return {
1354
1316
  multipleValue,
1355
1317
  allSelected,
1356
1318
  someSelected,
1357
1319
  handleSelectAll,
1358
1320
  handleChange,
1359
- multipleRenderOption,
1360
- getCounterRenderTags
1321
+ multipleRenderOption
1361
1322
  };
1362
1323
  }
1363
1324
  function _ListboxWithFilter({
@@ -1367,53 +1328,15 @@ function _ListboxWithFilter({
1367
1328
  someSelected,
1368
1329
  handleSelectAll = () => void 0,
1369
1330
  multiple,
1370
- extended,
1371
- itemHeight,
1372
- maxListHeight = TablePaginationActions.MENU_LIST_MAX_SIZE,
1373
1331
  ...otherProps
1374
1332
  }, ref) {
1375
- const childrenArray = React.useMemo(() => {
1376
- if (Array.isArray(children)) {
1377
- return children;
1378
- }
1379
- return children ? [children] : [];
1380
- }, [children]);
1381
- const defaultItemHeight = itemHeight ?? (extended ? TablePaginationActions.MENU_ITEM_SIZE_EXTENDED : TablePaginationActions.MENU_ITEM_SIZE_DEFAULT);
1382
- const listboxHeight = React.useMemo(() => {
1383
- const filterHeight = showFilters && multiple ? TablePaginationActions.MENU_ITEM_SIZE_EXTENDED : 0;
1384
- const availableHeight = maxListHeight - filterHeight;
1385
- const calculatedHeight = Math.min(
1386
- childrenArray.length * defaultItemHeight,
1387
- availableHeight
1388
- );
1389
- return Math.max(calculatedHeight, defaultItemHeight + 8);
1390
- }, [
1391
- showFilters,
1392
- multiple,
1393
- maxListHeight,
1394
- childrenArray.length,
1395
- defaultItemHeight
1396
- ]);
1397
- const renderItem = ({
1398
- index,
1399
- style
1400
- }) => {
1401
- const child = childrenArray[index];
1402
- if (!child) return null;
1403
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style, children: child });
1404
- };
1405
1333
  return /* @__PURE__ */ jsxRuntime.jsxs(
1406
1334
  "ul",
1407
1335
  {
1408
1336
  ref,
1409
1337
  ...otherProps,
1410
1338
  role: "listbox",
1411
- "data-list-height": listboxHeight,
1412
- "data-item-height": defaultItemHeight,
1413
1339
  "aria-multiselectable": multiple,
1414
- style: {
1415
- maxHeight: maxListHeight + defaultItemHeight
1416
- },
1417
1340
  children: [
1418
1341
  showFilters && multiple && /* @__PURE__ */ jsxRuntime.jsx(
1419
1342
  MenuItemFilter,
@@ -1423,16 +1346,7 @@ function _ListboxWithFilter({
1423
1346
  selectAll: handleSelectAll
1424
1347
  }
1425
1348
  ),
1426
- /* @__PURE__ */ jsxRuntime.jsx(
1427
- reactWindow.FixedSizeList,
1428
- {
1429
- height: listboxHeight,
1430
- width: "100%",
1431
- itemCount: childrenArray.length,
1432
- itemSize: defaultItemHeight,
1433
- children: renderItem
1434
- }
1435
- )
1349
+ children
1436
1350
  ]
1437
1351
  }
1438
1352
  );
@@ -1447,15 +1361,10 @@ function _CreatableAutocomplete({
1447
1361
  disabled,
1448
1362
  loading,
1449
1363
  showFilters,
1450
- showCounter = false,
1451
1364
  options = [],
1452
1365
  value,
1453
1366
  onChange,
1454
1367
  getLimitTagsText,
1455
- renderTags,
1456
- itemHeight,
1457
- maxListHeight,
1458
- extended,
1459
1368
  ...props
1460
1369
  }, ref) {
1461
1370
  const { freeSolo = true, ...otherProps } = props;
@@ -1464,14 +1373,11 @@ function _CreatableAutocomplete({
1464
1373
  allSelected,
1465
1374
  someSelected,
1466
1375
  handleSelectAll,
1467
- handleChange,
1468
- getCounterRenderTags
1376
+ handleChange
1469
1377
  } = useMultipleAutocomplete({
1470
1378
  options,
1471
1379
  value,
1472
- onChange,
1473
- getOptionLabel,
1474
- size: props.size
1380
+ onChange
1475
1381
  });
1476
1382
  const {
1477
1383
  creatableFilterOptions,
@@ -1483,17 +1389,6 @@ function _CreatableAutocomplete({
1483
1389
  newItemIcon,
1484
1390
  multiple
1485
1391
  });
1486
- const listboxProps = {
1487
- showFilters,
1488
- allSelected,
1489
- someSelected,
1490
- handleSelectAll,
1491
- multiple,
1492
- itemHeight,
1493
- maxListHeight,
1494
- extended
1495
- };
1496
- const finalRenderTags = showCounter && multiple && !renderTags ? getCounterRenderTags() : renderTags;
1497
1392
  return /* @__PURE__ */ jsxRuntime.jsx(
1498
1393
  material.Autocomplete,
1499
1394
  {
@@ -1505,13 +1400,18 @@ function _CreatableAutocomplete({
1505
1400
  filterOptions: creatableFilterOptions,
1506
1401
  getOptionLabel: creatableOptionLabel,
1507
1402
  renderOption: creatableRenderOption,
1508
- renderTags: finalRenderTags,
1509
1403
  freeSolo,
1510
1404
  forcePopupIcon: true,
1511
1405
  multiple,
1512
1406
  disableCloseOnSelect: disableCloseOnSelect ?? multiple,
1513
1407
  ListboxComponent: ListboxWithFilter,
1514
- ListboxProps: listboxProps,
1408
+ ListboxProps: {
1409
+ showFilters,
1410
+ allSelected,
1411
+ someSelected,
1412
+ handleSelectAll,
1413
+ multiple
1414
+ },
1515
1415
  getLimitTagsText: getLimitTagsText ?? getDefaultLimitTagsText,
1516
1416
  disabled: disabled || loading,
1517
1417
  popupIcon: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ArrowDown, {}),
@@ -1526,16 +1426,11 @@ function _MultipleAutocomplete({
1526
1426
  disabled,
1527
1427
  loading,
1528
1428
  showFilters,
1529
- showCounter = false,
1530
1429
  options,
1531
1430
  value,
1532
1431
  onChange,
1533
1432
  getOptionLabel,
1534
1433
  getLimitTagsText,
1535
- renderTags,
1536
- itemHeight,
1537
- maxListHeight,
1538
- extended,
1539
1434
  ...props
1540
1435
  }, ref) {
1541
1436
  const {
@@ -1544,26 +1439,13 @@ function _MultipleAutocomplete({
1544
1439
  someSelected,
1545
1440
  handleSelectAll,
1546
1441
  handleChange,
1547
- multipleRenderOption,
1548
- getCounterRenderTags
1442
+ multipleRenderOption
1549
1443
  } = useMultipleAutocomplete({
1550
1444
  options,
1551
1445
  value,
1552
1446
  onChange,
1553
- getOptionLabel,
1554
- size: props.size
1447
+ getOptionLabel
1555
1448
  });
1556
- const listboxProps = {
1557
- showFilters,
1558
- allSelected,
1559
- someSelected,
1560
- handleSelectAll,
1561
- multiple: true,
1562
- itemHeight,
1563
- maxListHeight,
1564
- extended
1565
- };
1566
- const finalRenderTags = showCounter && !renderTags ? getCounterRenderTags() : renderTags;
1567
1449
  return /* @__PURE__ */ jsxRuntime.jsx(
1568
1450
  material.Autocomplete,
1569
1451
  {
@@ -1574,9 +1456,14 @@ function _MultipleAutocomplete({
1574
1456
  onChange: handleChange,
1575
1457
  getOptionLabel,
1576
1458
  renderOption: renderOption ?? multipleRenderOption,
1577
- renderTags: finalRenderTags,
1578
1459
  ListboxComponent: ListboxWithFilter,
1579
- ListboxProps: listboxProps,
1460
+ ListboxProps: {
1461
+ showFilters,
1462
+ allSelected,
1463
+ someSelected,
1464
+ handleSelectAll,
1465
+ multiple: true
1466
+ },
1580
1467
  multiple: true,
1581
1468
  getLimitTagsText: getLimitTagsText ?? getDefaultLimitTagsText,
1582
1469
  disableCloseOnSelect,