@xqmsg/ui-core 0.24.2 → 0.24.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/README.md +8 -13
- package/dist/components/input/components/dropdown/index.d.ts +1 -0
- package/dist/ui-core.cjs.development.js +156 -100
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +157 -101
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +6 -2
- package/src/components/icons/checkmark/index.tsx +1 -1
- package/src/components/icons/chevron/down/index.tsx +7 -1
- package/src/components/icons/chevron/right/index.tsx +1 -1
- package/src/components/icons/clock/index.tsx +1 -1
- package/src/components/icons/dropdown/index.tsx +5 -1
- package/src/components/icons/error/index.tsx +1 -1
- package/src/components/icons/file/fill/index.tsx +1 -1
- package/src/components/icons/file/outline/index.tsx +1 -1
- package/src/components/icons/folder/add/fill/index.tsx +1 -1
- package/src/components/icons/folder/add/outline/index.tsx +1 -1
- package/src/components/icons/folder/outline/index.tsx +1 -1
- package/src/components/icons/group/index.tsx +1 -1
- package/src/components/icons/home/index.tsx +1 -1
- package/src/components/icons/image/index.tsx +1 -1
- package/src/components/icons/link/index.tsx +1 -1
- package/src/components/icons/menu/index.tsx +1 -1
- package/src/components/icons/microsoft/index.tsx +1 -1
- package/src/components/icons/neutral/index.tsx +3 -1
- package/src/components/icons/page/index.tsx +1 -1
- package/src/components/icons/positive/index.tsx +1 -1
- package/src/components/icons/question/index.tsx +1 -1
- package/src/components/icons/search/index.tsx +1 -1
- package/src/components/icons/services/index.tsx +1 -1
- package/src/components/icons/settings/index.tsx +3 -1
- package/src/components/icons/table/fill/index.tsx +1 -1
- package/src/components/icons/table/outline/index.tsx +1 -1
- package/src/components/icons/task/index.tsx +1 -1
- package/src/components/icons/trash/index.tsx +1 -1
- package/src/components/icons/video/index.tsx +1 -1
- package/src/components/icons/warning/index.tsx +1 -1
- package/src/components/input/StackedMultiSelect/index.tsx +34 -27
- package/src/components/input/StackedSelect/index.tsx +30 -25
- package/src/components/input/components/dropdown/index.tsx +39 -11
package/dist/ui-core.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { memo, forwardRef, createElement, useMemo, useCallback, Children, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Box, Button as Button$2, Alert as Alert$1, AlertDescription, Flex, Text as Text$2, Spinner, Checkbox as Checkbox$1, InputGroup, Input as Input$2, RadioGroup, Radio, InputRightElement, Textarea as Textarea$1, useOutsideClick, Switch as Switch$1, FormLabel as FormLabel$1, Popover as Popover$1, PopoverTrigger, PopoverContent, PopoverArrow, PopoverBody, FormControl, FormErrorMessage, FormHelperText, SimpleGrid, Image as Image$1, Select as Select$1, useMediaQuery, Grid, GridItem, IconButton, Collapse, Modal as Modal$2, ModalOverlay, ModalContent, ModalHeader, ModalBody, ModalFooter, Link as Link$2, Table as Table$1, Tbody, Tr, Td, TableContainer, Thead, Th, Tabs as Tabs$1, TabList, Tab, createMultiStyleConfigHelpers, defineStyle as defineStyle$1, extendTheme, useToast as useToast$1 } from '@chakra-ui/react';
|
|
3
3
|
import { FormProvider, useWatch, Controller } from 'react-hook-form';
|
|
4
|
-
import {
|
|
4
|
+
import { truncate } from 'lodash-es';
|
|
5
5
|
import { QuestionIcon, CloseIcon, HamburgerIcon } from '@chakra-ui/icons';
|
|
6
6
|
import { Link as Link$3 } from 'react-router-dom';
|
|
7
7
|
import { HiOutlineRefresh } from 'react-icons/hi';
|
|
@@ -87,7 +87,8 @@ var Memo = /*#__PURE__*/memo(ForwardRef);
|
|
|
87
87
|
var Error$1 = function Error(_ref) {
|
|
88
88
|
var boxSize = _ref.boxSize;
|
|
89
89
|
return /*#__PURE__*/React__default.createElement(Memo, {
|
|
90
|
-
|
|
90
|
+
width: boxSize,
|
|
91
|
+
height: boxSize
|
|
91
92
|
});
|
|
92
93
|
};
|
|
93
94
|
|
|
@@ -117,7 +118,8 @@ var Neutral = function Neutral(_ref) {
|
|
|
117
118
|
var color = _ref.color,
|
|
118
119
|
boxSize = _ref.boxSize;
|
|
119
120
|
return /*#__PURE__*/React__default.createElement(Memo$1, {
|
|
120
|
-
|
|
121
|
+
width: boxSize,
|
|
122
|
+
height: boxSize,
|
|
121
123
|
fill: color || '#3C3C43'
|
|
122
124
|
});
|
|
123
125
|
};
|
|
@@ -148,7 +150,8 @@ var Memo$2 = /*#__PURE__*/memo(ForwardRef$2);
|
|
|
148
150
|
var Positive = function Positive(_ref) {
|
|
149
151
|
var boxSize = _ref.boxSize;
|
|
150
152
|
return /*#__PURE__*/React__default.createElement(Memo$2, {
|
|
151
|
-
|
|
153
|
+
width: boxSize,
|
|
154
|
+
height: boxSize
|
|
152
155
|
});
|
|
153
156
|
};
|
|
154
157
|
|
|
@@ -178,7 +181,8 @@ var Memo$3 = /*#__PURE__*/memo(ForwardRef$3);
|
|
|
178
181
|
var Warning = function Warning(_ref) {
|
|
179
182
|
var boxSize = _ref.boxSize;
|
|
180
183
|
return /*#__PURE__*/React__default.createElement(Memo$3, {
|
|
181
|
-
|
|
184
|
+
width: boxSize,
|
|
185
|
+
height: boxSize
|
|
182
186
|
});
|
|
183
187
|
};
|
|
184
188
|
|
|
@@ -682,7 +686,8 @@ var Memo$5 = /*#__PURE__*/memo(ForwardRef$5);
|
|
|
682
686
|
var Microsoft = function Microsoft(_ref) {
|
|
683
687
|
var boxSize = _ref.boxSize;
|
|
684
688
|
return /*#__PURE__*/React__default.createElement(Memo$5, {
|
|
685
|
-
|
|
689
|
+
width: boxSize,
|
|
690
|
+
height: boxSize
|
|
686
691
|
});
|
|
687
692
|
};
|
|
688
693
|
|
|
@@ -867,8 +872,21 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
867
872
|
options = _ref.options,
|
|
868
873
|
dropdownRef = _ref.dropdownRef,
|
|
869
874
|
position = _ref.position,
|
|
870
|
-
optionIndex = _ref.optionIndex
|
|
875
|
+
optionIndex = _ref.optionIndex,
|
|
876
|
+
children = _ref.children;
|
|
871
877
|
var DropdownContent = useMemo(function () {
|
|
878
|
+
if (!options || options.length === 0) {
|
|
879
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
880
|
+
borderRadius: "inherit",
|
|
881
|
+
fontSize: "13px",
|
|
882
|
+
px: "8px",
|
|
883
|
+
py: "4px",
|
|
884
|
+
width: "100%",
|
|
885
|
+
color: colors.label.primary.light,
|
|
886
|
+
bg: "inherit",
|
|
887
|
+
whiteSpace: "nowrap"
|
|
888
|
+
}, "No options");
|
|
889
|
+
}
|
|
872
890
|
return options.map(function (option, idx) {
|
|
873
891
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
874
892
|
key: idx,
|
|
@@ -911,11 +929,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
911
929
|
}, option.label));
|
|
912
930
|
});
|
|
913
931
|
}, [onSelectItem, optionIndex, options]);
|
|
914
|
-
if (!options) return null;
|
|
915
932
|
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
916
|
-
flexDirection: "column",
|
|
917
|
-
ref: dropdownRef,
|
|
918
|
-
scrollMargin: "15px",
|
|
919
933
|
bg: colors.fill.light.quaternary,
|
|
920
934
|
backdropFilter: "auto",
|
|
921
935
|
backdropBlur: "64px",
|
|
@@ -924,17 +938,29 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
924
938
|
borderColor: colors.fill.light.tertiary,
|
|
925
939
|
mt: "3px",
|
|
926
940
|
maxH: "240px",
|
|
927
|
-
|
|
941
|
+
position: "absolute",
|
|
928
942
|
px: "8px",
|
|
929
943
|
py: "4px",
|
|
930
|
-
|
|
944
|
+
overflow: "hidden",
|
|
945
|
+
minWidth: "100%",
|
|
946
|
+
zIndex: 100,
|
|
947
|
+
tabIndex: -2000,
|
|
948
|
+
alignItems: "flex-start",
|
|
949
|
+
flexDirection: "column",
|
|
931
950
|
top: position === 'top' ? 26 : undefined,
|
|
932
|
-
bottom: position === 'bottom' ? 30 : undefined
|
|
951
|
+
bottom: position === 'bottom' ? 30 : undefined
|
|
952
|
+
}, children && /*#__PURE__*/React__default.createElement(Box, {
|
|
953
|
+
width: "100%",
|
|
954
|
+
mb: 2,
|
|
955
|
+
mt: 1
|
|
956
|
+
}, children), /*#__PURE__*/React__default.createElement(Flex, {
|
|
933
957
|
width: "fit-content",
|
|
958
|
+
overflowY: "auto",
|
|
959
|
+
flexDirection: "column",
|
|
960
|
+
ref: dropdownRef,
|
|
934
961
|
minWidth: "100%",
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
}, DropdownContent);
|
|
962
|
+
scrollMargin: "15px"
|
|
963
|
+
}, DropdownContent));
|
|
938
964
|
};
|
|
939
965
|
|
|
940
966
|
function useOnClickOutside(ref, handler) {
|
|
@@ -989,7 +1015,8 @@ var Dropdown$1 = function Dropdown(_ref) {
|
|
|
989
1015
|
var boxSize = _ref.boxSize,
|
|
990
1016
|
disabled = _ref.disabled;
|
|
991
1017
|
return /*#__PURE__*/React__default.createElement(Memo$6, {
|
|
992
|
-
|
|
1018
|
+
width: boxSize,
|
|
1019
|
+
height: boxSize,
|
|
993
1020
|
fill: disabled ? '#3C3C4399' : '#0082FF'
|
|
994
1021
|
});
|
|
995
1022
|
};
|
|
@@ -1028,9 +1055,9 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1028
1055
|
var _useState5 = useState(''),
|
|
1029
1056
|
searchValue = _useState5[0],
|
|
1030
1057
|
setSearchValue = _useState5[1];
|
|
1031
|
-
var _useState6 = useState(
|
|
1032
|
-
|
|
1033
|
-
|
|
1058
|
+
var _useState6 = useState(options),
|
|
1059
|
+
filteredOptions = _useState6[0],
|
|
1060
|
+
setFilteredOptions = _useState6[1];
|
|
1034
1061
|
var boundingClientRect = (_dropdownRef$current = dropdownRef.current) == null ? void 0 : _dropdownRef$current.getBoundingClientRect();
|
|
1035
1062
|
useEffect(function () {
|
|
1036
1063
|
var _dropdownRef$current2;
|
|
@@ -1046,9 +1073,10 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1046
1073
|
setSelectedOption((_find$label = (_find = (fullOptions || options).find(function (option) {
|
|
1047
1074
|
return option.value === value;
|
|
1048
1075
|
})) == null ? void 0 : _find.label) != null ? _find$label : '');
|
|
1049
|
-
}, [fullOptions, value]);
|
|
1076
|
+
}, [fullOptions, options, value]);
|
|
1050
1077
|
useOnClickOutside(dropdownRef, function () {
|
|
1051
|
-
|
|
1078
|
+
setIsFocussed(false);
|
|
1079
|
+
setSearchValue('');
|
|
1052
1080
|
});
|
|
1053
1081
|
var handleOnSelectItem = function handleOnSelectItem(option) {
|
|
1054
1082
|
if (handleOnChange) {
|
|
@@ -1057,6 +1085,7 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1057
1085
|
setValue(name, option.value);
|
|
1058
1086
|
setSelectedOption(option.label);
|
|
1059
1087
|
setIsFocussed(false);
|
|
1088
|
+
setSearchValue('');
|
|
1060
1089
|
};
|
|
1061
1090
|
var handleOnKeyDown = function handleOnKeyDown(e) {
|
|
1062
1091
|
var initialOptionIndex = options[0].value === 'section_header' ? 1 : 0;
|
|
@@ -1116,19 +1145,21 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1116
1145
|
top: idx * 24,
|
|
1117
1146
|
behavior: 'smooth'
|
|
1118
1147
|
});
|
|
1119
|
-
setSearchValue('');
|
|
1120
|
-
setDebouncedSearchValue('');
|
|
1121
1148
|
}
|
|
1122
1149
|
}, [options, searchValue]);
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
}
|
|
1127
|
-
}, []);
|
|
1128
|
-
var
|
|
1129
|
-
|
|
1130
|
-
|
|
1150
|
+
useEffect(function () {
|
|
1151
|
+
setFilteredOptions(options.filter(function (element) {
|
|
1152
|
+
return element.label.toLowerCase().includes(searchValue.toLowerCase());
|
|
1153
|
+
}));
|
|
1154
|
+
}, [options, searchValue]);
|
|
1155
|
+
var handleInput = function handleInput(e) {
|
|
1156
|
+
var _filteredOptions$;
|
|
1157
|
+
var initialOptionIndex = ((_filteredOptions$ = filteredOptions[0]) == null ? void 0 : _filteredOptions$.value) === 'section_header' ? 1 : 0;
|
|
1158
|
+
setOptionIndex(initialOptionIndex);
|
|
1159
|
+
var value = e.target.value;
|
|
1160
|
+
setSearchValue(value);
|
|
1131
1161
|
};
|
|
1162
|
+
console.log(searchValue);
|
|
1132
1163
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
1133
1164
|
ref: dropdownRef,
|
|
1134
1165
|
position: "relative"
|
|
@@ -1139,16 +1170,11 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1139
1170
|
onClick: function onClick() {
|
|
1140
1171
|
return setIsFocussed(!isFocussed);
|
|
1141
1172
|
},
|
|
1142
|
-
cursor:
|
|
1143
|
-
color: "transparent",
|
|
1173
|
+
cursor: isFocussed ? 'select' : 'pointer',
|
|
1144
1174
|
fontSize: "13px",
|
|
1145
|
-
|
|
1146
|
-
value: selectedOption,
|
|
1147
|
-
disabled: disabled,
|
|
1175
|
+
value: isFocussed ? searchValue : selectedOption,
|
|
1148
1176
|
autoComplete: "off",
|
|
1149
|
-
onChange:
|
|
1150
|
-
return update(debouncedSearchValue.concat(e.target.value));
|
|
1151
|
-
},
|
|
1177
|
+
onChange: handleInput,
|
|
1152
1178
|
onKeyDown: handleOnKeyDown
|
|
1153
1179
|
})), /*#__PURE__*/React__default.createElement(InputRightElement, {
|
|
1154
1180
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
@@ -1156,13 +1182,13 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1156
1182
|
return !disabled && setIsFocussed(!isFocussed);
|
|
1157
1183
|
}
|
|
1158
1184
|
}, /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
1159
|
-
boxSize: "
|
|
1185
|
+
boxSize: "12px",
|
|
1160
1186
|
disabled: disabled
|
|
1161
1187
|
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
1162
1188
|
position: position,
|
|
1163
1189
|
dropdownRef: dropdownMenuRef,
|
|
1164
1190
|
onSelectItem: handleOnSelectItem,
|
|
1165
|
-
options:
|
|
1191
|
+
options: filteredOptions,
|
|
1166
1192
|
optionIndex: optionIndex
|
|
1167
1193
|
}));
|
|
1168
1194
|
});
|
|
@@ -1299,24 +1325,25 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1299
1325
|
var _useState3 = useState(options),
|
|
1300
1326
|
localOptions = _useState3[0],
|
|
1301
1327
|
setLocalOptions = _useState3[1];
|
|
1302
|
-
var _useState4 = useState(
|
|
1303
|
-
|
|
1304
|
-
|
|
1328
|
+
var _useState4 = useState(localOptions),
|
|
1329
|
+
filteredOptions = _useState4[0],
|
|
1330
|
+
setFilteredOptions = _useState4[1];
|
|
1305
1331
|
var _useState5 = useState(false),
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
var _useState6 = useState(
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
var _useState7 = useState(
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
var _useState8 = useState(''),
|
|
1315
|
-
|
|
1316
|
-
|
|
1332
|
+
isFocussed = _useState5[0],
|
|
1333
|
+
setIsFocussed = _useState5[1];
|
|
1334
|
+
var _useState6 = useState(false),
|
|
1335
|
+
shouldSideScroll = _useState6[0],
|
|
1336
|
+
setShouldSideScroll = _useState6[1];
|
|
1337
|
+
var _useState7 = useState(null),
|
|
1338
|
+
optionIndex = _useState7[0],
|
|
1339
|
+
setOptionIndex = _useState7[1];
|
|
1340
|
+
var _useState8 = useState('top'),
|
|
1341
|
+
position = _useState8[0],
|
|
1342
|
+
setPosition = _useState8[1];
|
|
1317
1343
|
var _useState9 = useState(''),
|
|
1318
|
-
|
|
1319
|
-
|
|
1344
|
+
searchValue = _useState9[0],
|
|
1345
|
+
setSearchValue = _useState9[1];
|
|
1346
|
+
// const [debouncedSearchValue, setDebouncedSearchValue] = useState('');
|
|
1320
1347
|
var boundingClientRect = (_dropdownRef$current = dropdownRef.current) == null ? void 0 : _dropdownRef$current.getBoundingClientRect();
|
|
1321
1348
|
useEffect(function () {
|
|
1322
1349
|
if (window.innerHeight - ((boundingClientRect == null ? void 0 : boundingClientRect.y) + 240) >= 0) {
|
|
@@ -1380,6 +1407,8 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1380
1407
|
setLocalValues(function (prevLocalValues) {
|
|
1381
1408
|
return [].concat(prevLocalValues, [option]);
|
|
1382
1409
|
});
|
|
1410
|
+
// reset search on value select
|
|
1411
|
+
setSearchValue('');
|
|
1383
1412
|
};
|
|
1384
1413
|
var handleDelete = function handleDelete(option) {
|
|
1385
1414
|
var newValue = localValues.filter(function (localValue) {
|
|
@@ -1415,16 +1444,16 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1415
1444
|
}
|
|
1416
1445
|
if (e.key === 'ArrowUp' && optionIndex !== null && optionIndex > 0) {
|
|
1417
1446
|
var _dropdownMenuRef$curr;
|
|
1418
|
-
var incrementValue =
|
|
1447
|
+
var incrementValue = filteredOptions[optionIndex - 1] && filteredOptions[optionIndex - 1].value === 'section_header' ? 2 : 1;
|
|
1419
1448
|
setOptionIndex(optionIndex - incrementValue);
|
|
1420
1449
|
return (_dropdownMenuRef$curr = dropdownMenuRef.current) == null ? void 0 : _dropdownMenuRef$curr.scrollTo({
|
|
1421
1450
|
top: optionIndex * 24,
|
|
1422
1451
|
behavior: 'smooth'
|
|
1423
1452
|
});
|
|
1424
1453
|
}
|
|
1425
|
-
if (e.key === 'ArrowDown' && optionIndex !== null && optionIndex <
|
|
1454
|
+
if (e.key === 'ArrowDown' && optionIndex !== null && optionIndex < filteredOptions.length) {
|
|
1426
1455
|
var _dropdownMenuRef$curr2;
|
|
1427
|
-
var _incrementValue =
|
|
1456
|
+
var _incrementValue = filteredOptions[optionIndex + 1] && filteredOptions[optionIndex + 1].value === 'section_header' ? 2 : 1;
|
|
1428
1457
|
setOptionIndex(optionIndex + _incrementValue);
|
|
1429
1458
|
return (_dropdownMenuRef$curr2 = dropdownMenuRef.current) == null ? void 0 : _dropdownMenuRef$curr2.scrollTo({
|
|
1430
1459
|
top: optionIndex * 24,
|
|
@@ -1432,7 +1461,7 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1432
1461
|
});
|
|
1433
1462
|
}
|
|
1434
1463
|
if (e.key === 'Enter' && optionIndex !== null) {
|
|
1435
|
-
var option =
|
|
1464
|
+
var option = filteredOptions.find(function (_, idx) {
|
|
1436
1465
|
return optionIndex === idx;
|
|
1437
1466
|
});
|
|
1438
1467
|
if (!option) return;
|
|
@@ -1442,7 +1471,6 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1442
1471
|
if (e.key === 'Tab') {
|
|
1443
1472
|
return setIsFocussed(false);
|
|
1444
1473
|
}
|
|
1445
|
-
return update(debouncedSearchValue.concat(e.key));
|
|
1446
1474
|
}
|
|
1447
1475
|
};
|
|
1448
1476
|
useEffect(function () {
|
|
@@ -1452,21 +1480,23 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1452
1480
|
return option.label.substring(0, searchValue.length).toLowerCase() === searchValue.toLowerCase();
|
|
1453
1481
|
});
|
|
1454
1482
|
(_dropdownMenuRef$curr3 = dropdownMenuRef.current) == null ? void 0 : _dropdownMenuRef$curr3.scrollTo({
|
|
1455
|
-
top: idx *
|
|
1483
|
+
top: idx * 27,
|
|
1456
1484
|
behavior: 'smooth'
|
|
1457
1485
|
});
|
|
1458
|
-
setSearchValue('');
|
|
1459
|
-
setDebouncedSearchValue('');
|
|
1460
1486
|
}
|
|
1461
1487
|
}, [options, searchValue]);
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
}
|
|
1466
|
-
}, []);
|
|
1467
|
-
var
|
|
1468
|
-
|
|
1469
|
-
|
|
1488
|
+
useEffect(function () {
|
|
1489
|
+
setFilteredOptions(localOptions.filter(function (element) {
|
|
1490
|
+
return element.label.toLowerCase().includes(searchValue.toLowerCase());
|
|
1491
|
+
}));
|
|
1492
|
+
}, [localOptions, searchValue]);
|
|
1493
|
+
var handleInput = function handleInput(e) {
|
|
1494
|
+
var _filteredOptions$;
|
|
1495
|
+
console.log(e);
|
|
1496
|
+
var initialOptionIndex = ((_filteredOptions$ = filteredOptions[0]) == null ? void 0 : _filteredOptions$.value) === 'section_header' ? 1 : 0;
|
|
1497
|
+
setOptionIndex(initialOptionIndex);
|
|
1498
|
+
var value = e.target.value;
|
|
1499
|
+
setSearchValue(value);
|
|
1470
1500
|
};
|
|
1471
1501
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
1472
1502
|
ref: dropdownRef,
|
|
@@ -1542,17 +1572,20 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1542
1572
|
justifyContent: "center",
|
|
1543
1573
|
alignItems: "center"
|
|
1544
1574
|
}, /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
1545
|
-
boxSize: "
|
|
1575
|
+
boxSize: "12px",
|
|
1546
1576
|
disabled: disabled
|
|
1547
1577
|
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
1548
1578
|
dropdownRef: dropdownMenuRef,
|
|
1549
1579
|
onSelectItem: function onSelectItem(option) {
|
|
1550
1580
|
return handleChange(option);
|
|
1551
1581
|
},
|
|
1552
|
-
options:
|
|
1582
|
+
options: filteredOptions,
|
|
1553
1583
|
position: position,
|
|
1554
1584
|
optionIndex: optionIndex
|
|
1555
|
-
}
|
|
1585
|
+
}, /*#__PURE__*/React__default.createElement(Input$2, {
|
|
1586
|
+
value: searchValue,
|
|
1587
|
+
onChange: handleInput
|
|
1588
|
+
})));
|
|
1556
1589
|
});
|
|
1557
1590
|
|
|
1558
1591
|
/**
|
|
@@ -2148,7 +2181,8 @@ var Memo$8 = /*#__PURE__*/memo(ForwardRef$8);
|
|
|
2148
2181
|
var Checkmark = function Checkmark(_ref) {
|
|
2149
2182
|
var boxSize = _ref.boxSize;
|
|
2150
2183
|
return /*#__PURE__*/React__default.createElement(Memo$8, {
|
|
2151
|
-
|
|
2184
|
+
width: boxSize,
|
|
2185
|
+
height: boxSize
|
|
2152
2186
|
});
|
|
2153
2187
|
};
|
|
2154
2188
|
|
|
@@ -2178,7 +2212,8 @@ var Memo$9 = /*#__PURE__*/memo(ForwardRef$9);
|
|
|
2178
2212
|
var ChevronDown = function ChevronDown(_ref) {
|
|
2179
2213
|
var boxSize = _ref.boxSize;
|
|
2180
2214
|
return /*#__PURE__*/React__default.createElement(Memo$9, {
|
|
2181
|
-
|
|
2215
|
+
width: boxSize,
|
|
2216
|
+
height: boxSize,
|
|
2182
2217
|
fill: colors.fill.action
|
|
2183
2218
|
});
|
|
2184
2219
|
};
|
|
@@ -2209,7 +2244,8 @@ var Memo$a = /*#__PURE__*/memo(ForwardRef$a);
|
|
|
2209
2244
|
var ChevronRight = function ChevronRight(_ref) {
|
|
2210
2245
|
var boxSize = _ref.boxSize;
|
|
2211
2246
|
return /*#__PURE__*/React__default.createElement(Memo$a, {
|
|
2212
|
-
|
|
2247
|
+
width: boxSize,
|
|
2248
|
+
height: boxSize
|
|
2213
2249
|
});
|
|
2214
2250
|
};
|
|
2215
2251
|
|
|
@@ -2239,7 +2275,8 @@ var Memo$b = /*#__PURE__*/memo(ForwardRef$b);
|
|
|
2239
2275
|
var Clock = function Clock(_ref) {
|
|
2240
2276
|
var boxSize = _ref.boxSize;
|
|
2241
2277
|
return /*#__PURE__*/React__default.createElement(Memo$b, {
|
|
2242
|
-
|
|
2278
|
+
width: boxSize,
|
|
2279
|
+
height: boxSize
|
|
2243
2280
|
});
|
|
2244
2281
|
};
|
|
2245
2282
|
|
|
@@ -2270,7 +2307,8 @@ var Memo$c = /*#__PURE__*/memo(ForwardRef$c);
|
|
|
2270
2307
|
var FileFill = function FileFill(_ref) {
|
|
2271
2308
|
var boxSize = _ref.boxSize;
|
|
2272
2309
|
return /*#__PURE__*/React__default.createElement(Memo$c, {
|
|
2273
|
-
|
|
2310
|
+
width: boxSize,
|
|
2311
|
+
height: boxSize
|
|
2274
2312
|
});
|
|
2275
2313
|
};
|
|
2276
2314
|
|
|
@@ -2300,7 +2338,8 @@ var Memo$d = /*#__PURE__*/memo(ForwardRef$d);
|
|
|
2300
2338
|
var FileOutline = function FileOutline(_ref) {
|
|
2301
2339
|
var boxSize = _ref.boxSize;
|
|
2302
2340
|
return /*#__PURE__*/React__default.createElement(Memo$d, {
|
|
2303
|
-
|
|
2341
|
+
width: boxSize,
|
|
2342
|
+
height: boxSize
|
|
2304
2343
|
});
|
|
2305
2344
|
};
|
|
2306
2345
|
|
|
@@ -2427,7 +2466,8 @@ var Memo$g = /*#__PURE__*/memo(ForwardRef$g);
|
|
|
2427
2466
|
var FolderOutline = function FolderOutline(_ref) {
|
|
2428
2467
|
var boxSize = _ref.boxSize;
|
|
2429
2468
|
return /*#__PURE__*/React__default.createElement(Memo$g, {
|
|
2430
|
-
|
|
2469
|
+
width: boxSize,
|
|
2470
|
+
height: boxSize
|
|
2431
2471
|
});
|
|
2432
2472
|
};
|
|
2433
2473
|
|
|
@@ -2457,7 +2497,8 @@ var Memo$h = /*#__PURE__*/memo(ForwardRef$h);
|
|
|
2457
2497
|
var FolderAddFill = function FolderAddFill(_ref) {
|
|
2458
2498
|
var boxSize = _ref.boxSize;
|
|
2459
2499
|
return /*#__PURE__*/React__default.createElement(Memo$h, {
|
|
2460
|
-
|
|
2500
|
+
width: boxSize,
|
|
2501
|
+
height: boxSize
|
|
2461
2502
|
});
|
|
2462
2503
|
};
|
|
2463
2504
|
|
|
@@ -2487,7 +2528,8 @@ var Memo$i = /*#__PURE__*/memo(ForwardRef$i);
|
|
|
2487
2528
|
var FolderAddOutline = function FolderAddOutline(_ref) {
|
|
2488
2529
|
var boxSize = _ref.boxSize;
|
|
2489
2530
|
return /*#__PURE__*/React__default.createElement(Memo$i, {
|
|
2490
|
-
|
|
2531
|
+
width: boxSize,
|
|
2532
|
+
height: boxSize
|
|
2491
2533
|
});
|
|
2492
2534
|
};
|
|
2493
2535
|
|
|
@@ -2530,7 +2572,8 @@ var Memo$j = /*#__PURE__*/memo(ForwardRef$j);
|
|
|
2530
2572
|
var Group = function Group(_ref) {
|
|
2531
2573
|
var boxSize = _ref.boxSize;
|
|
2532
2574
|
return /*#__PURE__*/React__default.createElement(Memo$j, {
|
|
2533
|
-
|
|
2575
|
+
width: boxSize,
|
|
2576
|
+
height: boxSize
|
|
2534
2577
|
});
|
|
2535
2578
|
};
|
|
2536
2579
|
|
|
@@ -2560,7 +2603,8 @@ var Memo$k = /*#__PURE__*/memo(ForwardRef$k);
|
|
|
2560
2603
|
var Home = function Home(_ref) {
|
|
2561
2604
|
var boxSize = _ref.boxSize;
|
|
2562
2605
|
return /*#__PURE__*/React__default.createElement(Memo$k, {
|
|
2563
|
-
|
|
2606
|
+
width: boxSize,
|
|
2607
|
+
height: boxSize
|
|
2564
2608
|
});
|
|
2565
2609
|
};
|
|
2566
2610
|
|
|
@@ -2590,7 +2634,8 @@ var Memo$l = /*#__PURE__*/memo(ForwardRef$l);
|
|
|
2590
2634
|
var Image = function Image(_ref) {
|
|
2591
2635
|
var boxSize = _ref.boxSize;
|
|
2592
2636
|
return /*#__PURE__*/React__default.createElement(Memo$l, {
|
|
2593
|
-
|
|
2637
|
+
width: boxSize,
|
|
2638
|
+
height: boxSize
|
|
2594
2639
|
});
|
|
2595
2640
|
};
|
|
2596
2641
|
|
|
@@ -2620,7 +2665,8 @@ var Memo$m = /*#__PURE__*/memo(ForwardRef$m);
|
|
|
2620
2665
|
var Menu = function Menu(_ref) {
|
|
2621
2666
|
var boxSize = _ref.boxSize;
|
|
2622
2667
|
return /*#__PURE__*/React__default.createElement(Memo$m, {
|
|
2623
|
-
|
|
2668
|
+
width: boxSize,
|
|
2669
|
+
height: boxSize
|
|
2624
2670
|
});
|
|
2625
2671
|
};
|
|
2626
2672
|
|
|
@@ -2663,7 +2709,8 @@ var Memo$n = /*#__PURE__*/memo(ForwardRef$n);
|
|
|
2663
2709
|
var Search = function Search(_ref) {
|
|
2664
2710
|
var boxSize = _ref.boxSize;
|
|
2665
2711
|
return /*#__PURE__*/React__default.createElement(Memo$n, {
|
|
2666
|
-
|
|
2712
|
+
width: boxSize,
|
|
2713
|
+
height: boxSize
|
|
2667
2714
|
});
|
|
2668
2715
|
};
|
|
2669
2716
|
|
|
@@ -2696,7 +2743,8 @@ var Memo$o = /*#__PURE__*/memo(ForwardRef$o);
|
|
|
2696
2743
|
var Settings = function Settings(_ref) {
|
|
2697
2744
|
var boxSize = _ref.boxSize;
|
|
2698
2745
|
return /*#__PURE__*/React__default.createElement(Memo$o, {
|
|
2699
|
-
|
|
2746
|
+
width: boxSize,
|
|
2747
|
+
height: boxSize,
|
|
2700
2748
|
fill: colors.fill.action
|
|
2701
2749
|
});
|
|
2702
2750
|
};
|
|
@@ -2727,7 +2775,8 @@ var Memo$p = /*#__PURE__*/memo(ForwardRef$p);
|
|
|
2727
2775
|
var TableFill = function TableFill(_ref) {
|
|
2728
2776
|
var boxSize = _ref.boxSize;
|
|
2729
2777
|
return /*#__PURE__*/React__default.createElement(Memo$p, {
|
|
2730
|
-
|
|
2778
|
+
width: boxSize,
|
|
2779
|
+
height: boxSize
|
|
2731
2780
|
});
|
|
2732
2781
|
};
|
|
2733
2782
|
|
|
@@ -2757,7 +2806,8 @@ var Memo$q = /*#__PURE__*/memo(ForwardRef$q);
|
|
|
2757
2806
|
var TableOutline = function TableOutline(_ref) {
|
|
2758
2807
|
var boxSize = _ref.boxSize;
|
|
2759
2808
|
return /*#__PURE__*/React__default.createElement(Memo$q, {
|
|
2760
|
-
|
|
2809
|
+
width: boxSize,
|
|
2810
|
+
height: boxSize
|
|
2761
2811
|
});
|
|
2762
2812
|
};
|
|
2763
2813
|
|
|
@@ -2787,7 +2837,8 @@ var Memo$r = /*#__PURE__*/memo(ForwardRef$r);
|
|
|
2787
2837
|
var Trash = function Trash(_ref) {
|
|
2788
2838
|
var boxSize = _ref.boxSize;
|
|
2789
2839
|
return /*#__PURE__*/React__default.createElement(Memo$r, {
|
|
2790
|
-
|
|
2840
|
+
width: boxSize,
|
|
2841
|
+
height: boxSize
|
|
2791
2842
|
});
|
|
2792
2843
|
};
|
|
2793
2844
|
|
|
@@ -2817,7 +2868,8 @@ var Memo$s = /*#__PURE__*/memo(ForwardRef$s);
|
|
|
2817
2868
|
var Services = function Services(_ref) {
|
|
2818
2869
|
var boxSize = _ref.boxSize;
|
|
2819
2870
|
return /*#__PURE__*/React__default.createElement(Memo$s, {
|
|
2820
|
-
|
|
2871
|
+
width: boxSize,
|
|
2872
|
+
height: boxSize
|
|
2821
2873
|
});
|
|
2822
2874
|
};
|
|
2823
2875
|
|
|
@@ -2860,7 +2912,8 @@ var Memo$t = /*#__PURE__*/memo(ForwardRef$t);
|
|
|
2860
2912
|
var Question = function Question(_ref) {
|
|
2861
2913
|
var boxSize = _ref.boxSize;
|
|
2862
2914
|
return /*#__PURE__*/React__default.createElement(Memo$t, {
|
|
2863
|
-
|
|
2915
|
+
width: boxSize,
|
|
2916
|
+
height: boxSize
|
|
2864
2917
|
});
|
|
2865
2918
|
};
|
|
2866
2919
|
|
|
@@ -2890,7 +2943,8 @@ var Memo$u = /*#__PURE__*/memo(ForwardRef$u);
|
|
|
2890
2943
|
var Video = function Video(_ref) {
|
|
2891
2944
|
var boxSize = _ref.boxSize;
|
|
2892
2945
|
return /*#__PURE__*/React__default.createElement(Memo$u, {
|
|
2893
|
-
|
|
2946
|
+
width: boxSize,
|
|
2947
|
+
height: boxSize
|
|
2894
2948
|
});
|
|
2895
2949
|
};
|
|
2896
2950
|
|
|
@@ -2920,7 +2974,8 @@ var Memo$v = /*#__PURE__*/memo(ForwardRef$v);
|
|
|
2920
2974
|
var Page = function Page(_ref) {
|
|
2921
2975
|
var boxSize = _ref.boxSize;
|
|
2922
2976
|
return /*#__PURE__*/React__default.createElement(Memo$v, {
|
|
2923
|
-
|
|
2977
|
+
width: boxSize,
|
|
2978
|
+
height: boxSize
|
|
2924
2979
|
});
|
|
2925
2980
|
};
|
|
2926
2981
|
|
|
@@ -3017,7 +3072,8 @@ var Memo$x = /*#__PURE__*/memo(ForwardRef$x);
|
|
|
3017
3072
|
var Task = function Task(_ref) {
|
|
3018
3073
|
var boxSize = _ref.boxSize;
|
|
3019
3074
|
return /*#__PURE__*/React__default.createElement(Memo$x, {
|
|
3020
|
-
|
|
3075
|
+
width: boxSize,
|
|
3076
|
+
height: boxSize
|
|
3021
3077
|
});
|
|
3022
3078
|
};
|
|
3023
3079
|
|