@carto/meridian-ds 1.5.0-alpha-virtual-autocomplete.1 → 1.5.0-alpha-virtual-autocomplete.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/dist/{MenuItem-D6wJym7Z.js → MenuItem-C1DvWMry.js} +1 -1
- package/dist/{MenuItem-lAxlHrDp.cjs → MenuItem-C4bG5WHw.cjs} +1 -1
- package/dist/components/index.cjs +235 -56
- package/dist/components/index.js +237 -58
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/types/components/atoms/SplitButton.d.ts +9 -5
- package/dist/types/components/atoms/SplitButton.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/types/components/molecules/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/AutocompleteList.d.ts +13 -0
- package/dist/types/components/molecules/Autocomplete/AutocompleteList.d.ts.map +1 -0
- package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts +1 -1
- package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts +1 -1
- package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/index.d.ts +3 -0
- package/dist/types/components/molecules/Autocomplete/index.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/types.d.ts +73 -40
- package/dist/types/components/molecules/Autocomplete/types.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/useAutocomplete.d.ts +11 -0
- package/dist/types/components/molecules/Autocomplete/useAutocomplete.d.ts.map +1 -0
- package/dist/types/components/molecules/Autocomplete/useAutocompleteRenderOption.d.ts +6 -1
- package/dist/types/components/molecules/Autocomplete/useAutocompleteRenderOption.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts +24 -1
- package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/utils.d.ts +58 -3
- package/dist/types/components/molecules/Autocomplete/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts +0 -35
- package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts.map +0 -1
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useState, useRef, useEffect, useMemo, Fragment as Fragment$1, useImperativeHandle, useCallback } from "react";
|
|
2
|
+
import React, { forwardRef, useState, useRef, useEffect, useMemo, createElement, Fragment as Fragment$1, useImperativeHandle, useCallback } from "react";
|
|
3
3
|
import { styled, Box, Button as Button$1, CircularProgress, Popper, Grow, Paper, ClickAwayListener, MenuList as MenuList$1, MenuItem, ButtonGroup as ButtonGroup$1, TextField, InputAdornment, IconButton, Tooltip, Select, FormControl, InputLabel, FormHelperText, ToggleButtonGroup as ToggleButtonGroup$1, Menu as Menu$2, Link, Checkbox, ListItemText, Autocomplete as Autocomplete$1, Divider, ListItemIcon, createFilterOptions, Accordion, AccordionSummary, AccordionDetails, Avatar as Avatar$1, Snackbar as Snackbar$1, Portal, Fade, Slide, alpha, useTheme, Toolbar, AppBar as AppBar$1, Dialog as Dialog$1, DialogTitle as DialogTitle$1, Chip, DialogContent as DialogContent$1, DialogActions as DialogActions$1 } from "@mui/material";
|
|
4
|
-
import { T as Typography, c as ICON_SIZE_SMALL, u as useImperativeIntl, f as MENU_ITEM_SIZE_EXTENDED, d as MENU_LIST_MAX_SIZE, M as MENU_ITEM_SIZE_DEFAULT, N as NOTIFICATION_DURATION_IN_MS, A as APPBAR_SIZE } from "../TablePaginationActions-Cz5Hbi6N.js";
|
|
4
|
+
import { T as Typography, c as ICON_SIZE_SMALL, u as useImperativeIntl, f as MENU_ITEM_SIZE_EXTENDED, e as MENU_ITEM_SIZE_DENSE, d as MENU_LIST_MAX_SIZE, M as MENU_ITEM_SIZE_DEFAULT, N as NOTIFICATION_DURATION_IN_MS, A as APPBAR_SIZE } from "../TablePaginationActions-Cz5Hbi6N.js";
|
|
5
5
|
import { a } from "../TablePaginationActions-Cz5Hbi6N.js";
|
|
6
6
|
import { A as ArrowDown } from "../ArrowDown-CY_wMVJT.js";
|
|
7
7
|
import { A as ArrowUp, O as OpenDiagonallyRight, C as CloseDiagonallyRight } from "../OpenDiagonallyRight-CSm5GYYJ.js";
|
|
@@ -9,7 +9,7 @@ import { useIntl } from "react-intl";
|
|
|
9
9
|
import { VisibilityOffOutlined, VisibilityOutlined, Cancel, AddCircleOutlineOutlined, ContentCopyOutlined, CloseOutlined, MenuOutlined, HelpOutline, TodayOutlined, MoreVertOutlined, ErrorOutline, Check } from "@mui/icons-material";
|
|
10
10
|
import { I as IconButton$1, A as Alert$1 } from "../Alert-CnaTtNJd.js";
|
|
11
11
|
import "cartocolor";
|
|
12
|
-
import { M as MenuItem$1 } from "../MenuItem-
|
|
12
|
+
import { M as MenuItem$1 } from "../MenuItem-C1DvWMry.js";
|
|
13
13
|
import { FixedSizeList } from "react-window";
|
|
14
14
|
import { DatePicker as DatePicker$1 } from "@mui/x-date-pickers/DatePicker";
|
|
15
15
|
import { PickersDay as PickersDay$1 } from "@mui/x-date-pickers";
|
|
@@ -108,6 +108,9 @@ const ButtonGroup = styled(ButtonGroup$1)(({ theme, size }) => ({
|
|
|
108
108
|
}));
|
|
109
109
|
function SplitButton({
|
|
110
110
|
options,
|
|
111
|
+
disabled,
|
|
112
|
+
loading,
|
|
113
|
+
loadingPosition,
|
|
111
114
|
onClick,
|
|
112
115
|
variant,
|
|
113
116
|
size,
|
|
@@ -146,8 +149,17 @@ function SplitButton({
|
|
|
146
149
|
color,
|
|
147
150
|
...otherProps,
|
|
148
151
|
children: [
|
|
149
|
-
/* @__PURE__ */ jsx(
|
|
150
|
-
|
|
152
|
+
/* @__PURE__ */ 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__ */ jsx(Button, { disabled: loading || disabled, onClick: handleToggle, children: open ? /* @__PURE__ */ jsx(ArrowUp, {}) : /* @__PURE__ */ jsx(ArrowDown, {}) })
|
|
151
163
|
]
|
|
152
164
|
}
|
|
153
165
|
),
|
|
@@ -1105,27 +1117,6 @@ function UploadField({
|
|
|
1105
1117
|
)
|
|
1106
1118
|
] });
|
|
1107
1119
|
}
|
|
1108
|
-
function _Autocomplete({
|
|
1109
|
-
disabled,
|
|
1110
|
-
loading,
|
|
1111
|
-
...props
|
|
1112
|
-
}, ref) {
|
|
1113
|
-
return /* @__PURE__ */ jsx(
|
|
1114
|
-
Autocomplete$1,
|
|
1115
|
-
{
|
|
1116
|
-
...props,
|
|
1117
|
-
ref,
|
|
1118
|
-
disabled: disabled || loading,
|
|
1119
|
-
popupIcon: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" }) : /* @__PURE__ */ jsx(ArrowDown, {}),
|
|
1120
|
-
"data-name": "autocomplete",
|
|
1121
|
-
ListboxProps: {
|
|
1122
|
-
"aria-multiselectable": false,
|
|
1123
|
-
...props.ListboxProps
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
);
|
|
1127
|
-
}
|
|
1128
|
-
const Autocomplete = forwardRef(_Autocomplete);
|
|
1129
1120
|
const getDefaultOptionLabel = (option) => {
|
|
1130
1121
|
return option && typeof option === "object" ? option.title ?? String(option) : String(option);
|
|
1131
1122
|
};
|
|
@@ -1136,21 +1127,20 @@ const getDefaultLimitTagsText = (more) => /* @__PURE__ */ jsxs("span", { "data-t
|
|
|
1136
1127
|
"+",
|
|
1137
1128
|
more
|
|
1138
1129
|
] });
|
|
1139
|
-
function createCounterRenderTags(
|
|
1130
|
+
function createCounterRenderTags(formatCounter, options = [], size = "small", getOptionLabel = getDefaultOptionLabel) {
|
|
1140
1131
|
const CounterRenderTags = (value) => {
|
|
1141
1132
|
if (value.length === 0) {
|
|
1142
1133
|
return null;
|
|
1143
1134
|
}
|
|
1144
|
-
const totalCount = options.length;
|
|
1145
1135
|
const selectedCount = value.length;
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
}
|
|
1136
|
+
const totalCount = options.length;
|
|
1137
|
+
const text = formatCounter({
|
|
1138
|
+
selectedCount,
|
|
1139
|
+
totalCount,
|
|
1140
|
+
selectedItems: value,
|
|
1141
|
+
allItems: options,
|
|
1142
|
+
getOptionLabel
|
|
1143
|
+
});
|
|
1154
1144
|
return /* @__PURE__ */ jsx(
|
|
1155
1145
|
Typography,
|
|
1156
1146
|
{
|
|
@@ -1166,8 +1156,102 @@ function createCounterRenderTags(counterText = "selected", options = [], size =
|
|
|
1166
1156
|
};
|
|
1167
1157
|
return CounterRenderTags;
|
|
1168
1158
|
}
|
|
1159
|
+
function createCounterFormatter(counterText, allText, showSingleItemText = true) {
|
|
1160
|
+
return ({
|
|
1161
|
+
selectedCount,
|
|
1162
|
+
totalCount,
|
|
1163
|
+
selectedItems,
|
|
1164
|
+
getOptionLabel
|
|
1165
|
+
}) => {
|
|
1166
|
+
if (selectedCount === totalCount && totalCount > 0) {
|
|
1167
|
+
return allText;
|
|
1168
|
+
} else if (selectedCount === 1 && showSingleItemText) {
|
|
1169
|
+
return getOptionLabel(selectedItems[0]);
|
|
1170
|
+
} else {
|
|
1171
|
+
return `${selectedCount} ${counterText}`;
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
function createAutocompleteGroupByList(options, groupBy) {
|
|
1176
|
+
const grouped = options.reduce(
|
|
1177
|
+
(acc, option) => {
|
|
1178
|
+
const group = groupBy(option);
|
|
1179
|
+
if (!acc[group]) {
|
|
1180
|
+
acc[group] = [];
|
|
1181
|
+
}
|
|
1182
|
+
acc[group].push(option);
|
|
1183
|
+
return acc;
|
|
1184
|
+
},
|
|
1185
|
+
{}
|
|
1186
|
+
);
|
|
1187
|
+
const result = [];
|
|
1188
|
+
Object.keys(grouped).forEach((title) => {
|
|
1189
|
+
result.push({ __isGroupHeader: true, title });
|
|
1190
|
+
const groupOptions = grouped[title];
|
|
1191
|
+
if (groupOptions) {
|
|
1192
|
+
result.push(...groupOptions);
|
|
1193
|
+
}
|
|
1194
|
+
});
|
|
1195
|
+
return result;
|
|
1196
|
+
}
|
|
1197
|
+
function warnDeprecatedGroupBy(componentName) {
|
|
1198
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1199
|
+
console.warn(
|
|
1200
|
+
`${componentName}: The \`groupBy\` prop is deprecated and breaks virtualization. Use \`createAutocompleteGroupByList\` instead:
|
|
1201
|
+
|
|
1202
|
+
\`\`\`
|
|
1203
|
+
import { createAutocompleteGroupByList, ${componentName} } from "@carto/meridian-ds/components"
|
|
1204
|
+
|
|
1205
|
+
const groupedOptions = createAutocompleteGroupByList(options, (option) => option.category)
|
|
1206
|
+
|
|
1207
|
+
<${componentName} options={groupedOptions} />
|
|
1208
|
+
\`\`\`
|
|
1209
|
+
`
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
function _Autocomplete({
|
|
1214
|
+
disabled,
|
|
1215
|
+
loading,
|
|
1216
|
+
groupBy,
|
|
1217
|
+
...props
|
|
1218
|
+
}, ref) {
|
|
1219
|
+
if (groupBy) {
|
|
1220
|
+
warnDeprecatedGroupBy("Autocomplete");
|
|
1221
|
+
}
|
|
1222
|
+
return /* @__PURE__ */ jsx(
|
|
1223
|
+
Autocomplete$1,
|
|
1224
|
+
{
|
|
1225
|
+
...props,
|
|
1226
|
+
ref,
|
|
1227
|
+
disabled: disabled || loading,
|
|
1228
|
+
popupIcon: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" }) : /* @__PURE__ */ jsx(ArrowDown, {}),
|
|
1229
|
+
"data-name": "autocomplete",
|
|
1230
|
+
ListboxProps: {
|
|
1231
|
+
"aria-multiselectable": false,
|
|
1232
|
+
...props.ListboxProps
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
const Autocomplete = forwardRef(_Autocomplete);
|
|
1169
1238
|
function useAutocompleteRenderOption() {
|
|
1170
1239
|
const renderOption = (props, option, state, getOptionLabel, customIcon) => {
|
|
1240
|
+
const { key, ...otherProps } = props;
|
|
1241
|
+
if (typeof option === "object" && option !== null && "__isGroupHeader" in option) {
|
|
1242
|
+
return /* @__PURE__ */ createElement(
|
|
1243
|
+
MenuItem$1,
|
|
1244
|
+
{
|
|
1245
|
+
...otherProps,
|
|
1246
|
+
subtitle: true,
|
|
1247
|
+
key,
|
|
1248
|
+
"aria-disabled": true,
|
|
1249
|
+
"aria-selected": false
|
|
1250
|
+
},
|
|
1251
|
+
option.title
|
|
1252
|
+
);
|
|
1253
|
+
}
|
|
1254
|
+
const regularOption = option;
|
|
1171
1255
|
const {
|
|
1172
1256
|
title,
|
|
1173
1257
|
inputValue,
|
|
@@ -1184,9 +1268,8 @@ function useAutocompleteRenderOption() {
|
|
|
1184
1268
|
alternativeTitle,
|
|
1185
1269
|
secondaryText,
|
|
1186
1270
|
multiple
|
|
1187
|
-
} =
|
|
1188
|
-
const
|
|
1189
|
-
const isPrimitiveOptionType = typeof option === "string" || typeof option === "number";
|
|
1271
|
+
} = regularOption;
|
|
1272
|
+
const isPrimitiveOptionType = typeof regularOption === "string" || typeof regularOption === "number";
|
|
1190
1273
|
const getOptionLabelText = (getOptionLabel2, option2, alternativeTitle2, title2) => {
|
|
1191
1274
|
if (alternativeTitle2) return alternativeTitle2;
|
|
1192
1275
|
if (title2) return title2;
|
|
@@ -1220,7 +1303,7 @@ function useAutocompleteRenderOption() {
|
|
|
1220
1303
|
/* @__PURE__ */ jsxs(ListItemText, { children: [
|
|
1221
1304
|
getOptionLabelText(
|
|
1222
1305
|
getOptionLabel ?? getDefaultOptionLabel,
|
|
1223
|
-
|
|
1306
|
+
regularOption,
|
|
1224
1307
|
alternativeTitle,
|
|
1225
1308
|
title
|
|
1226
1309
|
),
|
|
@@ -1308,8 +1391,15 @@ function useMultipleAutocomplete({
|
|
|
1308
1391
|
value,
|
|
1309
1392
|
onChange,
|
|
1310
1393
|
getOptionLabel,
|
|
1311
|
-
size
|
|
1394
|
+
size,
|
|
1395
|
+
counterFormatter,
|
|
1396
|
+
counterText,
|
|
1397
|
+
allSelectedText
|
|
1312
1398
|
}) {
|
|
1399
|
+
const intl = useIntl();
|
|
1400
|
+
const intlConfig = useImperativeIntl(intl);
|
|
1401
|
+
const defaultCounterText = counterText || intlConfig.formatMessage({ id: "c4r.form.selected" });
|
|
1402
|
+
const defaultAllSelectedText = allSelectedText || intlConfig.formatMessage({ id: "c4r.form.allSelected" });
|
|
1313
1403
|
const [multipleValue, setMultipleValue] = useState(
|
|
1314
1404
|
Array.isArray(value) ? value : value ? [value] : []
|
|
1315
1405
|
);
|
|
@@ -1343,12 +1433,15 @@ function useMultipleAutocomplete({
|
|
|
1343
1433
|
getOptionLabel
|
|
1344
1434
|
);
|
|
1345
1435
|
};
|
|
1346
|
-
const getCounterRenderTags = () =>
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1436
|
+
const getCounterRenderTags = () => {
|
|
1437
|
+
const formatter = counterFormatter || createCounterFormatter(defaultCounterText, defaultAllSelectedText);
|
|
1438
|
+
return createCounterRenderTags(
|
|
1439
|
+
formatter,
|
|
1440
|
+
options,
|
|
1441
|
+
size,
|
|
1442
|
+
getOptionLabel ? (option) => getOptionLabel(option) : void 0
|
|
1443
|
+
);
|
|
1444
|
+
};
|
|
1352
1445
|
return {
|
|
1353
1446
|
multipleValue,
|
|
1354
1447
|
allSelected,
|
|
@@ -1359,7 +1452,40 @@ function useMultipleAutocomplete({
|
|
|
1359
1452
|
getCounterRenderTags
|
|
1360
1453
|
};
|
|
1361
1454
|
}
|
|
1362
|
-
|
|
1455
|
+
const ItemWrapper = styled("div")(
|
|
1456
|
+
({ theme, isSubtitle }) => ({
|
|
1457
|
+
"& .MuiMenuItem-root": {
|
|
1458
|
+
marginTop: 0,
|
|
1459
|
+
"&:first-of-type": {
|
|
1460
|
+
marginTop: "0 !important"
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
...isSubtitle && {
|
|
1464
|
+
"& .MuiAutocomplete-option.MuiMenuItem-root": {
|
|
1465
|
+
height: MENU_ITEM_SIZE_DENSE,
|
|
1466
|
+
minHeight: MENU_ITEM_SIZE_DENSE,
|
|
1467
|
+
marginTop: `${theme.spacing(1)} !important`,
|
|
1468
|
+
alignItems: "flex-end",
|
|
1469
|
+
...theme.typography.caption,
|
|
1470
|
+
fontWeight: 500
|
|
1471
|
+
},
|
|
1472
|
+
// First item has no divider
|
|
1473
|
+
"&:not(:first-of-type)": {
|
|
1474
|
+
"&::before": {
|
|
1475
|
+
content: '""',
|
|
1476
|
+
position: "absolute",
|
|
1477
|
+
zIndex: 1,
|
|
1478
|
+
top: theme.spacing(0.5),
|
|
1479
|
+
left: 0,
|
|
1480
|
+
right: 0,
|
|
1481
|
+
height: "1px",
|
|
1482
|
+
backgroundColor: theme.palette.divider
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
})
|
|
1487
|
+
);
|
|
1488
|
+
function _AutocompleteList({
|
|
1363
1489
|
children,
|
|
1364
1490
|
showFilters,
|
|
1365
1491
|
allSelected,
|
|
@@ -1372,10 +1498,7 @@ function _ListboxWithFilter({
|
|
|
1372
1498
|
...otherProps
|
|
1373
1499
|
}, ref) {
|
|
1374
1500
|
const childrenArray = useMemo(() => {
|
|
1375
|
-
|
|
1376
|
-
return children;
|
|
1377
|
-
}
|
|
1378
|
-
return children ? [children] : [];
|
|
1501
|
+
return React.Children.toArray(children);
|
|
1379
1502
|
}, [children]);
|
|
1380
1503
|
const defaultItemHeight = itemHeight ?? (extended ? MENU_ITEM_SIZE_EXTENDED : MENU_ITEM_SIZE_DEFAULT);
|
|
1381
1504
|
const listboxHeight = useMemo(() => {
|
|
@@ -1399,7 +1522,16 @@ function _ListboxWithFilter({
|
|
|
1399
1522
|
}) => {
|
|
1400
1523
|
const child = childrenArray[index];
|
|
1401
1524
|
if (!child) return null;
|
|
1402
|
-
|
|
1525
|
+
const isSubtitle = React.isValidElement(child) && child.props.subtitle === true;
|
|
1526
|
+
return /* @__PURE__ */ jsx(
|
|
1527
|
+
ItemWrapper,
|
|
1528
|
+
{
|
|
1529
|
+
style,
|
|
1530
|
+
isSubtitle,
|
|
1531
|
+
"data-name": "virtual-menu-item",
|
|
1532
|
+
children: child
|
|
1533
|
+
}
|
|
1534
|
+
);
|
|
1403
1535
|
};
|
|
1404
1536
|
return /* @__PURE__ */ jsxs(
|
|
1405
1537
|
"ul",
|
|
@@ -1436,7 +1568,7 @@ function _ListboxWithFilter({
|
|
|
1436
1568
|
}
|
|
1437
1569
|
);
|
|
1438
1570
|
}
|
|
1439
|
-
const
|
|
1571
|
+
const AutocompleteList = forwardRef(_AutocompleteList);
|
|
1440
1572
|
function _CreatableAutocomplete({
|
|
1441
1573
|
newItemLabel,
|
|
1442
1574
|
newItemIcon,
|
|
@@ -1447,6 +1579,9 @@ function _CreatableAutocomplete({
|
|
|
1447
1579
|
loading,
|
|
1448
1580
|
showFilters,
|
|
1449
1581
|
showCounter = false,
|
|
1582
|
+
counterFormatter,
|
|
1583
|
+
counterText,
|
|
1584
|
+
allSelectedText,
|
|
1450
1585
|
options = [],
|
|
1451
1586
|
value,
|
|
1452
1587
|
onChange,
|
|
@@ -1455,8 +1590,12 @@ function _CreatableAutocomplete({
|
|
|
1455
1590
|
itemHeight,
|
|
1456
1591
|
maxListHeight,
|
|
1457
1592
|
extended,
|
|
1593
|
+
groupBy,
|
|
1458
1594
|
...props
|
|
1459
1595
|
}, ref) {
|
|
1596
|
+
if (groupBy) {
|
|
1597
|
+
warnDeprecatedGroupBy("CreatableAutocomplete");
|
|
1598
|
+
}
|
|
1460
1599
|
const { freeSolo = true, ...otherProps } = props;
|
|
1461
1600
|
const {
|
|
1462
1601
|
multipleValue,
|
|
@@ -1470,7 +1609,10 @@ function _CreatableAutocomplete({
|
|
|
1470
1609
|
value,
|
|
1471
1610
|
onChange,
|
|
1472
1611
|
getOptionLabel,
|
|
1473
|
-
size: props.size
|
|
1612
|
+
size: props.size,
|
|
1613
|
+
counterFormatter,
|
|
1614
|
+
counterText,
|
|
1615
|
+
allSelectedText
|
|
1474
1616
|
});
|
|
1475
1617
|
const {
|
|
1476
1618
|
creatableFilterOptions,
|
|
@@ -1509,7 +1651,7 @@ function _CreatableAutocomplete({
|
|
|
1509
1651
|
forcePopupIcon: true,
|
|
1510
1652
|
multiple,
|
|
1511
1653
|
disableCloseOnSelect: disableCloseOnSelect ?? multiple,
|
|
1512
|
-
ListboxComponent:
|
|
1654
|
+
ListboxComponent: AutocompleteList,
|
|
1513
1655
|
ListboxProps: listboxProps,
|
|
1514
1656
|
getLimitTagsText: getLimitTagsText ?? getDefaultLimitTagsText,
|
|
1515
1657
|
disabled: disabled || loading,
|
|
@@ -1526,6 +1668,9 @@ function _MultipleAutocomplete({
|
|
|
1526
1668
|
loading,
|
|
1527
1669
|
showFilters,
|
|
1528
1670
|
showCounter = false,
|
|
1671
|
+
counterFormatter,
|
|
1672
|
+
counterText,
|
|
1673
|
+
allSelectedText,
|
|
1529
1674
|
options,
|
|
1530
1675
|
value,
|
|
1531
1676
|
onChange,
|
|
@@ -1535,8 +1680,12 @@ function _MultipleAutocomplete({
|
|
|
1535
1680
|
itemHeight,
|
|
1536
1681
|
maxListHeight,
|
|
1537
1682
|
extended,
|
|
1683
|
+
groupBy,
|
|
1538
1684
|
...props
|
|
1539
1685
|
}, ref) {
|
|
1686
|
+
if (groupBy) {
|
|
1687
|
+
warnDeprecatedGroupBy("MultipleAutocomplete");
|
|
1688
|
+
}
|
|
1540
1689
|
const {
|
|
1541
1690
|
multipleValue,
|
|
1542
1691
|
allSelected,
|
|
@@ -1550,7 +1699,10 @@ function _MultipleAutocomplete({
|
|
|
1550
1699
|
value,
|
|
1551
1700
|
onChange,
|
|
1552
1701
|
getOptionLabel,
|
|
1553
|
-
size: props.size
|
|
1702
|
+
size: props.size,
|
|
1703
|
+
counterFormatter,
|
|
1704
|
+
counterText,
|
|
1705
|
+
allSelectedText
|
|
1554
1706
|
});
|
|
1555
1707
|
const listboxProps = {
|
|
1556
1708
|
showFilters,
|
|
@@ -1574,7 +1726,7 @@ function _MultipleAutocomplete({
|
|
|
1574
1726
|
getOptionLabel,
|
|
1575
1727
|
renderOption: renderOption ?? multipleRenderOption,
|
|
1576
1728
|
renderTags: finalRenderTags,
|
|
1577
|
-
ListboxComponent:
|
|
1729
|
+
ListboxComponent: AutocompleteList,
|
|
1578
1730
|
ListboxProps: listboxProps,
|
|
1579
1731
|
multiple: true,
|
|
1580
1732
|
getLimitTagsText: getLimitTagsText ?? getDefaultLimitTagsText,
|
|
@@ -1586,6 +1738,30 @@ function _MultipleAutocomplete({
|
|
|
1586
1738
|
);
|
|
1587
1739
|
}
|
|
1588
1740
|
const MultipleAutocomplete = forwardRef(_MultipleAutocomplete);
|
|
1741
|
+
function useAutocomplete({
|
|
1742
|
+
getOptionLabel = getDefaultOptionLabel
|
|
1743
|
+
}) {
|
|
1744
|
+
const { renderOption: autocompleteRenderOption } = useAutocompleteRenderOption();
|
|
1745
|
+
const internalGetOptionLabel = (option) => {
|
|
1746
|
+
if (typeof option === "object" && option !== null && "__isGroupHeader" in option) {
|
|
1747
|
+
return option.title;
|
|
1748
|
+
}
|
|
1749
|
+
return getOptionLabel(option);
|
|
1750
|
+
};
|
|
1751
|
+
const singleRenderOption = (props, option, state) => {
|
|
1752
|
+
const optionWithMultiple = createOptionWithMultiple(option, false);
|
|
1753
|
+
return autocompleteRenderOption(
|
|
1754
|
+
props,
|
|
1755
|
+
optionWithMultiple,
|
|
1756
|
+
state,
|
|
1757
|
+
internalGetOptionLabel
|
|
1758
|
+
);
|
|
1759
|
+
};
|
|
1760
|
+
return {
|
|
1761
|
+
singleRenderOption,
|
|
1762
|
+
getOptionLabel: internalGetOptionLabel
|
|
1763
|
+
};
|
|
1764
|
+
}
|
|
1589
1765
|
const _CopiableComponent = ({
|
|
1590
1766
|
children,
|
|
1591
1767
|
disabled,
|
|
@@ -4810,6 +4986,7 @@ export {
|
|
|
4810
4986
|
Alert$1 as Alert,
|
|
4811
4987
|
AppBar,
|
|
4812
4988
|
Autocomplete,
|
|
4989
|
+
AutocompleteList,
|
|
4813
4990
|
Avatar,
|
|
4814
4991
|
Button,
|
|
4815
4992
|
CodeAreaDialog,
|
|
@@ -4857,6 +5034,8 @@ export {
|
|
|
4857
5034
|
UploadField,
|
|
4858
5035
|
UploadFieldBase,
|
|
4859
5036
|
copyString,
|
|
5037
|
+
createAutocompleteGroupByList,
|
|
4860
5038
|
dialogDimensionsBySize,
|
|
5039
|
+
useAutocomplete,
|
|
4861
5040
|
useCopyValue
|
|
4862
5041
|
};
|
package/dist/theme/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ const TablePaginationActions = require("../TablePaginationActions-mbbjzV6Y.cjs")
|
|
|
7
7
|
const iconsMaterial = require("@mui/icons-material");
|
|
8
8
|
const ArrowDown = require("../ArrowDown-8fLj23Ge.cjs");
|
|
9
9
|
const xDatePickers = require("@mui/x-date-pickers");
|
|
10
|
-
const MenuItem = require("../MenuItem-
|
|
10
|
+
const MenuItem = require("../MenuItem-C4bG5WHw.cjs");
|
|
11
11
|
const paletteUtils = require("../paletteUtils-B9ybmwiI.cjs");
|
|
12
12
|
const tooltipArrowSize = 1;
|
|
13
13
|
const tooltipSeparation = 0.5;
|
package/dist/theme/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { f, N } from "../TablePaginationActions-Cz5Hbi6N.js";
|
|
|
6
6
|
import { Cancel, EventOutlined, ChevronRightOutlined, ChevronLeftOutlined, ExpandMoreOutlined, CheckCircleOutlined } from "@mui/icons-material";
|
|
7
7
|
import { A as ArrowDown } from "../ArrowDown-CY_wMVJT.js";
|
|
8
8
|
import { renderDigitalClockTimeView } from "@mui/x-date-pickers";
|
|
9
|
-
import { M as MenuItem } from "../MenuItem-
|
|
9
|
+
import { M as MenuItem } from "../MenuItem-C1DvWMry.js";
|
|
10
10
|
import { c as commonPalette } from "../paletteUtils-BHqJlHm9.js";
|
|
11
11
|
import { g } from "../paletteUtils-BHqJlHm9.js";
|
|
12
12
|
const tooltipArrowSize = 1;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { ButtonProps } from '
|
|
1
|
+
import { ButtonProps } from './Button';
|
|
2
2
|
type SplitButtonOption = {
|
|
3
3
|
label: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
[key: string]: any;
|
|
5
6
|
};
|
|
6
|
-
export type SplitButtonProps = {
|
|
7
|
-
options:
|
|
8
|
-
onClick: (option:
|
|
7
|
+
export type SplitButtonProps<T extends SplitButtonOption = SplitButtonOption> = {
|
|
8
|
+
options: T[];
|
|
9
|
+
onClick: (option: T) => void;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
loadingPosition?: ButtonProps['loadingPosition'];
|
|
12
|
+
disabled?: boolean;
|
|
9
13
|
variant?: ButtonProps['variant'];
|
|
10
14
|
size?: ButtonProps['size'];
|
|
11
15
|
color?: ButtonProps['color'];
|
|
12
16
|
'data-testid'?: string;
|
|
13
17
|
'aria-label'?: string;
|
|
14
18
|
};
|
|
15
|
-
export default function SplitButton({ options, onClick, variant, size, color, ...otherProps }: SplitButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default function SplitButton<T extends SplitButtonOption = SplitButtonOption>({ options, disabled, loading, loadingPosition, onClick, variant, size, color, ...otherProps }: SplitButtonProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
20
|
export {};
|
|
17
21
|
//# sourceMappingURL=SplitButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SplitButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SplitButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SplitButton.tsx"],"names":[],"mappings":"AAWA,OAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAe9C,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,IAC1E;IACE,OAAO,EAAE,CAAC,EAAE,CAAA;IACZ,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAA;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAEH,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,EAC/C,EACA,OAAO,EACP,QAAQ,EACR,OAAO,EACP,eAAe,EACf,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,EACL,GAAG,UAAU,EACd,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAyFrB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ForwardedRef } from 'react';
|
|
2
2
|
import { ChipTypeMap } from '@mui/material';
|
|
3
3
|
import { AutocompleteProps } from './types';
|
|
4
|
-
declare function _Autocomplete<Value, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ disabled, loading, ...props }: AutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>, ref: ForwardedRef<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function _Autocomplete<Value, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ disabled, loading, groupBy, ...props }: AutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>, ref: ForwardedRef<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const Autocomplete: <Value, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]>(props: AutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent> & {
|
|
6
6
|
ref?: ForwardedRef<HTMLElement>;
|
|
7
7
|
}) => ReturnType<typeof _Autocomplete>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAChD,OAAO,EACL,WAAW,EAGZ,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAChD,OAAO,EACL,WAAW,EAGZ,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAG3C,iBAAS,aAAa,CACpB,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,KAAK,EAC5C,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,aAAa,SAAS,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,EAEzE,EACE,QAAQ,EACR,OAAO,EACP,OAAO,EACP,GAAG,KAAK,EACT,EAAE,iBAAiB,CAClB,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,aAAa,CACd,EACD,GAAG,EAAE,YAAY,CAAC,WAAW,CAAC,2CAsB/B;AAID,QAAA,MAAM,YAAY,EAAgC,CAChD,KAAK,EACL,QAA4C,SAA3B,OAAO,GAAG,SAAS,GAAG,KAAK,EAC5C,gBAAwD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAgD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,aAAyE,SAAnD,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,EAEzE,KAAK,EAAE,iBAAiB,CACtB,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,aAAa,CACd,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAA;CAAE,KACpC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAA;AAErC,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
declare const AutocompleteList: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
3
|
+
showFilters?: boolean;
|
|
4
|
+
allSelected?: boolean;
|
|
5
|
+
someSelected?: boolean;
|
|
6
|
+
handleSelectAll?: () => void;
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
extended?: boolean;
|
|
9
|
+
itemHeight?: number;
|
|
10
|
+
maxListHeight?: number;
|
|
11
|
+
} & React.RefAttributes<HTMLUListElement>>;
|
|
12
|
+
export default AutocompleteList;
|
|
13
|
+
//# sourceMappingURL=AutocompleteList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutocompleteList.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/AutocompleteList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAA;AAsJhE,QAAA,MAAM,gBAAgB;;;;;;;;;0CAAgC,CAAA;AACtD,eAAe,gBAAgB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ForwardedRef } from 'react';
|
|
2
2
|
import { ChipTypeMap } from '@mui/material';
|
|
3
3
|
import { CreatableAutocompleteProps } from './types';
|
|
4
|
-
declare function _CreatableAutocomplete<Value, Multiple extends boolean | undefined = undefined, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ newItemLabel, newItemIcon, getOptionLabel, multiple, disableCloseOnSelect, disabled, loading, showFilters, showCounter, options, value, onChange, getLimitTagsText, renderTags, itemHeight, maxListHeight, extended, ...props }: CreatableAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>, ref: ForwardedRef<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function _CreatableAutocomplete<Value, Multiple extends boolean | undefined = undefined, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ newItemLabel, newItemIcon, getOptionLabel, multiple, disableCloseOnSelect, disabled, loading, showFilters, showCounter, counterFormatter, counterText, allSelectedText, options, value, onChange, getLimitTagsText, renderTags, itemHeight, maxListHeight, extended, groupBy, ...props }: CreatableAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>, ref: ForwardedRef<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const CreatableAutocomplete: <Value, Multiple extends boolean | undefined = undefined, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]>(props: CreatableAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent> & {
|
|
6
6
|
ref?: ForwardedRef<HTMLElement>;
|
|
7
7
|
}) => ReturnType<typeof _CreatableAutocomplete>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatableAutocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/CreatableAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAChD,OAAO,EACL,WAAW,EAGZ,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"CreatableAutocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/CreatableAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAChD,OAAO,EACL,WAAW,EAGZ,MAAM,eAAe,CAAA;AAWtB,OAAO,EAAE,0BAA0B,EAAyB,MAAM,SAAS,CAAA;AAG3E,iBAAS,sBAAsB,CAC7B,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,aAAa,SAAS,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,EAEzE,EACE,YAAY,EACZ,WAAW,EACX,cAAsC,EACtC,QAAQ,EACR,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,WAAW,EACX,WAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,OAAY,EACZ,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,aAAa,EACb,QAAQ,EACR,OAAO,EACP,GAAG,KAAK,EACT,EAAE,0BAA0B,CAC3B,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,aAAa,CACd,EACD,GAAG,EAAE,YAAY,CAAC,WAAW,CAAC,2CA6E/B;AAID,QAAA,MAAM,qBAAqB,EAAyC,CAClE,KAAK,EACL,QAAgD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,gBAAwD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAgD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,aAAyE,SAAnD,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,EAEzE,KAAK,EAAE,0BAA0B,CAC/B,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,aAAa,CACd,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAA;CAAE,KACpC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE9C,eAAe,qBAAqB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ForwardedRef } from 'react';
|
|
2
2
|
import { ChipTypeMap } from '@mui/material';
|
|
3
3
|
import { MultipleAutocompleteProps } from './types';
|
|
4
|
-
declare function _MultipleAutocomplete<Value, Multiple extends boolean | undefined = true, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ renderOption, disableCloseOnSelect, disabled, loading, showFilters, showCounter, options, value, onChange, getOptionLabel, getLimitTagsText, renderTags, itemHeight, maxListHeight, extended, ...props }: MultipleAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>, ref: ForwardedRef<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function _MultipleAutocomplete<Value, Multiple extends boolean | undefined = true, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ renderOption, disableCloseOnSelect, disabled, loading, showFilters, showCounter, counterFormatter, counterText, allSelectedText, options, value, onChange, getOptionLabel, getLimitTagsText, renderTags, itemHeight, maxListHeight, extended, groupBy, ...props }: MultipleAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>, ref: ForwardedRef<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const MultipleAutocomplete: <Value, Multiple extends boolean | undefined = true, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]>(props: MultipleAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent> & {
|
|
6
6
|
ref?: ForwardedRef<HTMLElement>;
|
|
7
7
|
}) => ReturnType<typeof _MultipleAutocomplete>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultipleAutocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/MultipleAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAChD,OAAO,EACL,WAAW,EAGZ,MAAM,eAAe,CAAA;AAMtB,OAAO,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"MultipleAutocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/MultipleAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAChD,OAAO,EACL,WAAW,EAGZ,MAAM,eAAe,CAAA;AAMtB,OAAO,EAAE,yBAAyB,EAAyB,MAAM,SAAS,CAAA;AAG1E,iBAAS,qBAAqB,CAC5B,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,IAAI,EAC3C,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,aAAa,SAAS,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,EAEzE,EACE,YAAY,EACZ,oBAA2B,EAC3B,QAAQ,EACR,OAAO,EACP,WAAW,EACX,WAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,OAAO,EACP,KAAK,EACL,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,aAAa,EACb,QAAQ,EACR,OAAO,EACP,GAAG,KAAK,EACT,EAAE,yBAAyB,CAC1B,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,aAAa,CACd,EACD,GAAG,EAAE,YAAY,CAAC,WAAW,CAAC,2CA8D/B;AAID,QAAA,MAAM,oBAAoB,EAAwC,CAChE,KAAK,EACL,QAA2C,SAA1B,OAAO,GAAG,SAAS,GAAG,IAAI,EAC3C,gBAAwD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EACxD,QAAgD,SAA/B,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,aAAyE,SAAnD,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,EAEzE,KAAK,EAAE,yBAAyB,CAC9B,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,aAAa,CACd,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAA;CAAE,KACpC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE7C,eAAe,oBAAoB,CAAA"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { default as Autocomplete } from './Autocomplete';
|
|
2
2
|
export { default as CreatableAutocomplete } from './CreatableAutocomplete';
|
|
3
3
|
export { default as MultipleAutocomplete } from './MultipleAutocomplete';
|
|
4
|
+
export { default as AutocompleteList } from './AutocompleteList';
|
|
5
|
+
export { default as useAutocomplete } from './useAutocomplete';
|
|
6
|
+
export { createAutocompleteGroupByList } from './utils';
|
|
4
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Autocomplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAA"}
|