@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/README.md
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
## To test
|
|
1
|
+
## To test:
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
`
|
|
3
|
+
Update the theme, components, etc. however you wish and when you are ready to test build:
|
|
4
|
+
`yarn build`
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
`
|
|
6
|
+
Then in whatever project you would like to install this local bundled build into run change ui-core package version in package.json to:
|
|
7
|
+
`"@xqmsg/ui-core": "file:../ui-core"`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Then in whatever project you would like to install this local bundled build into run the following:
|
|
14
|
-
`yalc add @xqmsg/ui-core@[VERSION]`
|
|
15
|
-
|
|
16
|
-
Any time you make changes, rebuild with the first command, and add to your project with the command above.
|
|
9
|
+
Any time you make changes, rebuild ui-core and reinstall in project.
|
|
10
|
+
`rm -rf node_modules/@xqmsg`
|
|
11
|
+
`pnpm i`
|
|
17
12
|
|
|
18
13
|
## Once you are satisfied with your work and would like to create a PR:
|
|
19
14
|
|
|
@@ -94,7 +94,8 @@ var Memo = /*#__PURE__*/React.memo(ForwardRef);
|
|
|
94
94
|
var Error$1 = function Error(_ref) {
|
|
95
95
|
var boxSize = _ref.boxSize;
|
|
96
96
|
return /*#__PURE__*/React__default.createElement(Memo, {
|
|
97
|
-
|
|
97
|
+
width: boxSize,
|
|
98
|
+
height: boxSize
|
|
98
99
|
});
|
|
99
100
|
};
|
|
100
101
|
|
|
@@ -124,7 +125,8 @@ var Neutral = function Neutral(_ref) {
|
|
|
124
125
|
var color = _ref.color,
|
|
125
126
|
boxSize = _ref.boxSize;
|
|
126
127
|
return /*#__PURE__*/React__default.createElement(Memo$1, {
|
|
127
|
-
|
|
128
|
+
width: boxSize,
|
|
129
|
+
height: boxSize,
|
|
128
130
|
fill: color || '#3C3C43'
|
|
129
131
|
});
|
|
130
132
|
};
|
|
@@ -155,7 +157,8 @@ var Memo$2 = /*#__PURE__*/React.memo(ForwardRef$2);
|
|
|
155
157
|
var Positive = function Positive(_ref) {
|
|
156
158
|
var boxSize = _ref.boxSize;
|
|
157
159
|
return /*#__PURE__*/React__default.createElement(Memo$2, {
|
|
158
|
-
|
|
160
|
+
width: boxSize,
|
|
161
|
+
height: boxSize
|
|
159
162
|
});
|
|
160
163
|
};
|
|
161
164
|
|
|
@@ -185,7 +188,8 @@ var Memo$3 = /*#__PURE__*/React.memo(ForwardRef$3);
|
|
|
185
188
|
var Warning = function Warning(_ref) {
|
|
186
189
|
var boxSize = _ref.boxSize;
|
|
187
190
|
return /*#__PURE__*/React__default.createElement(Memo$3, {
|
|
188
|
-
|
|
191
|
+
width: boxSize,
|
|
192
|
+
height: boxSize
|
|
189
193
|
});
|
|
190
194
|
};
|
|
191
195
|
|
|
@@ -689,7 +693,8 @@ var Memo$5 = /*#__PURE__*/React.memo(ForwardRef$5);
|
|
|
689
693
|
var Microsoft = function Microsoft(_ref) {
|
|
690
694
|
var boxSize = _ref.boxSize;
|
|
691
695
|
return /*#__PURE__*/React__default.createElement(Memo$5, {
|
|
692
|
-
|
|
696
|
+
width: boxSize,
|
|
697
|
+
height: boxSize
|
|
693
698
|
});
|
|
694
699
|
};
|
|
695
700
|
|
|
@@ -874,8 +879,21 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
874
879
|
options = _ref.options,
|
|
875
880
|
dropdownRef = _ref.dropdownRef,
|
|
876
881
|
position = _ref.position,
|
|
877
|
-
optionIndex = _ref.optionIndex
|
|
882
|
+
optionIndex = _ref.optionIndex,
|
|
883
|
+
children = _ref.children;
|
|
878
884
|
var DropdownContent = React.useMemo(function () {
|
|
885
|
+
if (!options || options.length === 0) {
|
|
886
|
+
return /*#__PURE__*/React__default.createElement(react.Box, {
|
|
887
|
+
borderRadius: "inherit",
|
|
888
|
+
fontSize: "13px",
|
|
889
|
+
px: "8px",
|
|
890
|
+
py: "4px",
|
|
891
|
+
width: "100%",
|
|
892
|
+
color: colors.label.primary.light,
|
|
893
|
+
bg: "inherit",
|
|
894
|
+
whiteSpace: "nowrap"
|
|
895
|
+
}, "No options");
|
|
896
|
+
}
|
|
879
897
|
return options.map(function (option, idx) {
|
|
880
898
|
return /*#__PURE__*/React__default.createElement(react.Box, {
|
|
881
899
|
key: idx,
|
|
@@ -918,11 +936,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
918
936
|
}, option.label));
|
|
919
937
|
});
|
|
920
938
|
}, [onSelectItem, optionIndex, options]);
|
|
921
|
-
if (!options) return null;
|
|
922
939
|
return /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
923
|
-
flexDirection: "column",
|
|
924
|
-
ref: dropdownRef,
|
|
925
|
-
scrollMargin: "15px",
|
|
926
940
|
bg: colors.fill.light.quaternary,
|
|
927
941
|
backdropFilter: "auto",
|
|
928
942
|
backdropBlur: "64px",
|
|
@@ -931,17 +945,29 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
931
945
|
borderColor: colors.fill.light.tertiary,
|
|
932
946
|
mt: "3px",
|
|
933
947
|
maxH: "240px",
|
|
934
|
-
|
|
948
|
+
position: "absolute",
|
|
935
949
|
px: "8px",
|
|
936
950
|
py: "4px",
|
|
937
|
-
|
|
951
|
+
overflow: "hidden",
|
|
952
|
+
minWidth: "100%",
|
|
953
|
+
zIndex: 100,
|
|
954
|
+
tabIndex: -2000,
|
|
955
|
+
alignItems: "flex-start",
|
|
956
|
+
flexDirection: "column",
|
|
938
957
|
top: position === 'top' ? 26 : undefined,
|
|
939
|
-
bottom: position === 'bottom' ? 30 : undefined
|
|
958
|
+
bottom: position === 'bottom' ? 30 : undefined
|
|
959
|
+
}, children && /*#__PURE__*/React__default.createElement(react.Box, {
|
|
960
|
+
width: "100%",
|
|
961
|
+
mb: 2,
|
|
962
|
+
mt: 1
|
|
963
|
+
}, children), /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
940
964
|
width: "fit-content",
|
|
965
|
+
overflowY: "auto",
|
|
966
|
+
flexDirection: "column",
|
|
967
|
+
ref: dropdownRef,
|
|
941
968
|
minWidth: "100%",
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
}, DropdownContent);
|
|
969
|
+
scrollMargin: "15px"
|
|
970
|
+
}, DropdownContent));
|
|
945
971
|
};
|
|
946
972
|
|
|
947
973
|
function useOnClickOutside(ref, handler) {
|
|
@@ -996,7 +1022,8 @@ var Dropdown$1 = function Dropdown(_ref) {
|
|
|
996
1022
|
var boxSize = _ref.boxSize,
|
|
997
1023
|
disabled = _ref.disabled;
|
|
998
1024
|
return /*#__PURE__*/React__default.createElement(Memo$6, {
|
|
999
|
-
|
|
1025
|
+
width: boxSize,
|
|
1026
|
+
height: boxSize,
|
|
1000
1027
|
fill: disabled ? '#3C3C4399' : '#0082FF'
|
|
1001
1028
|
});
|
|
1002
1029
|
};
|
|
@@ -1035,9 +1062,9 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1035
1062
|
var _useState5 = React.useState(''),
|
|
1036
1063
|
searchValue = _useState5[0],
|
|
1037
1064
|
setSearchValue = _useState5[1];
|
|
1038
|
-
var _useState6 = React.useState(
|
|
1039
|
-
|
|
1040
|
-
|
|
1065
|
+
var _useState6 = React.useState(options),
|
|
1066
|
+
filteredOptions = _useState6[0],
|
|
1067
|
+
setFilteredOptions = _useState6[1];
|
|
1041
1068
|
var boundingClientRect = (_dropdownRef$current = dropdownRef.current) == null ? void 0 : _dropdownRef$current.getBoundingClientRect();
|
|
1042
1069
|
React.useEffect(function () {
|
|
1043
1070
|
var _dropdownRef$current2;
|
|
@@ -1053,9 +1080,10 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1053
1080
|
setSelectedOption((_find$label = (_find = (fullOptions || options).find(function (option) {
|
|
1054
1081
|
return option.value === value;
|
|
1055
1082
|
})) == null ? void 0 : _find.label) != null ? _find$label : '');
|
|
1056
|
-
}, [fullOptions, value]);
|
|
1083
|
+
}, [fullOptions, options, value]);
|
|
1057
1084
|
useOnClickOutside(dropdownRef, function () {
|
|
1058
|
-
|
|
1085
|
+
setIsFocussed(false);
|
|
1086
|
+
setSearchValue('');
|
|
1059
1087
|
});
|
|
1060
1088
|
var handleOnSelectItem = function handleOnSelectItem(option) {
|
|
1061
1089
|
if (handleOnChange) {
|
|
@@ -1064,6 +1092,7 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1064
1092
|
setValue(name, option.value);
|
|
1065
1093
|
setSelectedOption(option.label);
|
|
1066
1094
|
setIsFocussed(false);
|
|
1095
|
+
setSearchValue('');
|
|
1067
1096
|
};
|
|
1068
1097
|
var handleOnKeyDown = function handleOnKeyDown(e) {
|
|
1069
1098
|
var initialOptionIndex = options[0].value === 'section_header' ? 1 : 0;
|
|
@@ -1123,19 +1152,21 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1123
1152
|
top: idx * 24,
|
|
1124
1153
|
behavior: 'smooth'
|
|
1125
1154
|
});
|
|
1126
|
-
setSearchValue('');
|
|
1127
|
-
setDebouncedSearchValue('');
|
|
1128
1155
|
}
|
|
1129
1156
|
}, [options, searchValue]);
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
}
|
|
1134
|
-
}, []);
|
|
1135
|
-
var
|
|
1136
|
-
|
|
1137
|
-
|
|
1157
|
+
React.useEffect(function () {
|
|
1158
|
+
setFilteredOptions(options.filter(function (element) {
|
|
1159
|
+
return element.label.toLowerCase().includes(searchValue.toLowerCase());
|
|
1160
|
+
}));
|
|
1161
|
+
}, [options, searchValue]);
|
|
1162
|
+
var handleInput = function handleInput(e) {
|
|
1163
|
+
var _filteredOptions$;
|
|
1164
|
+
var initialOptionIndex = ((_filteredOptions$ = filteredOptions[0]) == null ? void 0 : _filteredOptions$.value) === 'section_header' ? 1 : 0;
|
|
1165
|
+
setOptionIndex(initialOptionIndex);
|
|
1166
|
+
var value = e.target.value;
|
|
1167
|
+
setSearchValue(value);
|
|
1138
1168
|
};
|
|
1169
|
+
console.log(searchValue);
|
|
1139
1170
|
return /*#__PURE__*/React__default.createElement(react.Box, {
|
|
1140
1171
|
ref: dropdownRef,
|
|
1141
1172
|
position: "relative"
|
|
@@ -1146,16 +1177,11 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1146
1177
|
onClick: function onClick() {
|
|
1147
1178
|
return setIsFocussed(!isFocussed);
|
|
1148
1179
|
},
|
|
1149
|
-
cursor:
|
|
1150
|
-
color: "transparent",
|
|
1180
|
+
cursor: isFocussed ? 'select' : 'pointer',
|
|
1151
1181
|
fontSize: "13px",
|
|
1152
|
-
|
|
1153
|
-
value: selectedOption,
|
|
1154
|
-
disabled: disabled,
|
|
1182
|
+
value: isFocussed ? searchValue : selectedOption,
|
|
1155
1183
|
autoComplete: "off",
|
|
1156
|
-
onChange:
|
|
1157
|
-
return update(debouncedSearchValue.concat(e.target.value));
|
|
1158
|
-
},
|
|
1184
|
+
onChange: handleInput,
|
|
1159
1185
|
onKeyDown: handleOnKeyDown
|
|
1160
1186
|
})), /*#__PURE__*/React__default.createElement(react.InputRightElement, {
|
|
1161
1187
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
@@ -1163,13 +1189,13 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1163
1189
|
return !disabled && setIsFocussed(!isFocussed);
|
|
1164
1190
|
}
|
|
1165
1191
|
}, /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
1166
|
-
boxSize: "
|
|
1192
|
+
boxSize: "12px",
|
|
1167
1193
|
disabled: disabled
|
|
1168
1194
|
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
1169
1195
|
position: position,
|
|
1170
1196
|
dropdownRef: dropdownMenuRef,
|
|
1171
1197
|
onSelectItem: handleOnSelectItem,
|
|
1172
|
-
options:
|
|
1198
|
+
options: filteredOptions,
|
|
1173
1199
|
optionIndex: optionIndex
|
|
1174
1200
|
}));
|
|
1175
1201
|
});
|
|
@@ -1306,24 +1332,25 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1306
1332
|
var _useState3 = React.useState(options),
|
|
1307
1333
|
localOptions = _useState3[0],
|
|
1308
1334
|
setLocalOptions = _useState3[1];
|
|
1309
|
-
var _useState4 = React.useState(
|
|
1310
|
-
|
|
1311
|
-
|
|
1335
|
+
var _useState4 = React.useState(localOptions),
|
|
1336
|
+
filteredOptions = _useState4[0],
|
|
1337
|
+
setFilteredOptions = _useState4[1];
|
|
1312
1338
|
var _useState5 = React.useState(false),
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
var _useState6 = React.useState(
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
var _useState7 = React.useState(
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
var _useState8 = React.useState(''),
|
|
1322
|
-
|
|
1323
|
-
|
|
1339
|
+
isFocussed = _useState5[0],
|
|
1340
|
+
setIsFocussed = _useState5[1];
|
|
1341
|
+
var _useState6 = React.useState(false),
|
|
1342
|
+
shouldSideScroll = _useState6[0],
|
|
1343
|
+
setShouldSideScroll = _useState6[1];
|
|
1344
|
+
var _useState7 = React.useState(null),
|
|
1345
|
+
optionIndex = _useState7[0],
|
|
1346
|
+
setOptionIndex = _useState7[1];
|
|
1347
|
+
var _useState8 = React.useState('top'),
|
|
1348
|
+
position = _useState8[0],
|
|
1349
|
+
setPosition = _useState8[1];
|
|
1324
1350
|
var _useState9 = React.useState(''),
|
|
1325
|
-
|
|
1326
|
-
|
|
1351
|
+
searchValue = _useState9[0],
|
|
1352
|
+
setSearchValue = _useState9[1];
|
|
1353
|
+
// const [debouncedSearchValue, setDebouncedSearchValue] = useState('');
|
|
1327
1354
|
var boundingClientRect = (_dropdownRef$current = dropdownRef.current) == null ? void 0 : _dropdownRef$current.getBoundingClientRect();
|
|
1328
1355
|
React.useEffect(function () {
|
|
1329
1356
|
if (window.innerHeight - ((boundingClientRect == null ? void 0 : boundingClientRect.y) + 240) >= 0) {
|
|
@@ -1387,6 +1414,8 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1387
1414
|
setLocalValues(function (prevLocalValues) {
|
|
1388
1415
|
return [].concat(prevLocalValues, [option]);
|
|
1389
1416
|
});
|
|
1417
|
+
// reset search on value select
|
|
1418
|
+
setSearchValue('');
|
|
1390
1419
|
};
|
|
1391
1420
|
var handleDelete = function handleDelete(option) {
|
|
1392
1421
|
var newValue = localValues.filter(function (localValue) {
|
|
@@ -1422,16 +1451,16 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1422
1451
|
}
|
|
1423
1452
|
if (e.key === 'ArrowUp' && optionIndex !== null && optionIndex > 0) {
|
|
1424
1453
|
var _dropdownMenuRef$curr;
|
|
1425
|
-
var incrementValue =
|
|
1454
|
+
var incrementValue = filteredOptions[optionIndex - 1] && filteredOptions[optionIndex - 1].value === 'section_header' ? 2 : 1;
|
|
1426
1455
|
setOptionIndex(optionIndex - incrementValue);
|
|
1427
1456
|
return (_dropdownMenuRef$curr = dropdownMenuRef.current) == null ? void 0 : _dropdownMenuRef$curr.scrollTo({
|
|
1428
1457
|
top: optionIndex * 24,
|
|
1429
1458
|
behavior: 'smooth'
|
|
1430
1459
|
});
|
|
1431
1460
|
}
|
|
1432
|
-
if (e.key === 'ArrowDown' && optionIndex !== null && optionIndex <
|
|
1461
|
+
if (e.key === 'ArrowDown' && optionIndex !== null && optionIndex < filteredOptions.length) {
|
|
1433
1462
|
var _dropdownMenuRef$curr2;
|
|
1434
|
-
var _incrementValue =
|
|
1463
|
+
var _incrementValue = filteredOptions[optionIndex + 1] && filteredOptions[optionIndex + 1].value === 'section_header' ? 2 : 1;
|
|
1435
1464
|
setOptionIndex(optionIndex + _incrementValue);
|
|
1436
1465
|
return (_dropdownMenuRef$curr2 = dropdownMenuRef.current) == null ? void 0 : _dropdownMenuRef$curr2.scrollTo({
|
|
1437
1466
|
top: optionIndex * 24,
|
|
@@ -1439,7 +1468,7 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1439
1468
|
});
|
|
1440
1469
|
}
|
|
1441
1470
|
if (e.key === 'Enter' && optionIndex !== null) {
|
|
1442
|
-
var option =
|
|
1471
|
+
var option = filteredOptions.find(function (_, idx) {
|
|
1443
1472
|
return optionIndex === idx;
|
|
1444
1473
|
});
|
|
1445
1474
|
if (!option) return;
|
|
@@ -1449,7 +1478,6 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1449
1478
|
if (e.key === 'Tab') {
|
|
1450
1479
|
return setIsFocussed(false);
|
|
1451
1480
|
}
|
|
1452
|
-
return update(debouncedSearchValue.concat(e.key));
|
|
1453
1481
|
}
|
|
1454
1482
|
};
|
|
1455
1483
|
React.useEffect(function () {
|
|
@@ -1459,21 +1487,23 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1459
1487
|
return option.label.substring(0, searchValue.length).toLowerCase() === searchValue.toLowerCase();
|
|
1460
1488
|
});
|
|
1461
1489
|
(_dropdownMenuRef$curr3 = dropdownMenuRef.current) == null ? void 0 : _dropdownMenuRef$curr3.scrollTo({
|
|
1462
|
-
top: idx *
|
|
1490
|
+
top: idx * 27,
|
|
1463
1491
|
behavior: 'smooth'
|
|
1464
1492
|
});
|
|
1465
|
-
setSearchValue('');
|
|
1466
|
-
setDebouncedSearchValue('');
|
|
1467
1493
|
}
|
|
1468
1494
|
}, [options, searchValue]);
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
}
|
|
1473
|
-
}, []);
|
|
1474
|
-
var
|
|
1475
|
-
|
|
1476
|
-
|
|
1495
|
+
React.useEffect(function () {
|
|
1496
|
+
setFilteredOptions(localOptions.filter(function (element) {
|
|
1497
|
+
return element.label.toLowerCase().includes(searchValue.toLowerCase());
|
|
1498
|
+
}));
|
|
1499
|
+
}, [localOptions, searchValue]);
|
|
1500
|
+
var handleInput = function handleInput(e) {
|
|
1501
|
+
var _filteredOptions$;
|
|
1502
|
+
console.log(e);
|
|
1503
|
+
var initialOptionIndex = ((_filteredOptions$ = filteredOptions[0]) == null ? void 0 : _filteredOptions$.value) === 'section_header' ? 1 : 0;
|
|
1504
|
+
setOptionIndex(initialOptionIndex);
|
|
1505
|
+
var value = e.target.value;
|
|
1506
|
+
setSearchValue(value);
|
|
1477
1507
|
};
|
|
1478
1508
|
return /*#__PURE__*/React__default.createElement(react.Box, {
|
|
1479
1509
|
ref: dropdownRef,
|
|
@@ -1549,17 +1579,20 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1549
1579
|
justifyContent: "center",
|
|
1550
1580
|
alignItems: "center"
|
|
1551
1581
|
}, /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
1552
|
-
boxSize: "
|
|
1582
|
+
boxSize: "12px",
|
|
1553
1583
|
disabled: disabled
|
|
1554
1584
|
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
1555
1585
|
dropdownRef: dropdownMenuRef,
|
|
1556
1586
|
onSelectItem: function onSelectItem(option) {
|
|
1557
1587
|
return handleChange(option);
|
|
1558
1588
|
},
|
|
1559
|
-
options:
|
|
1589
|
+
options: filteredOptions,
|
|
1560
1590
|
position: position,
|
|
1561
1591
|
optionIndex: optionIndex
|
|
1562
|
-
}
|
|
1592
|
+
}, /*#__PURE__*/React__default.createElement(react.Input, {
|
|
1593
|
+
value: searchValue,
|
|
1594
|
+
onChange: handleInput
|
|
1595
|
+
})));
|
|
1563
1596
|
});
|
|
1564
1597
|
|
|
1565
1598
|
/**
|
|
@@ -2155,7 +2188,8 @@ var Memo$8 = /*#__PURE__*/React.memo(ForwardRef$8);
|
|
|
2155
2188
|
var Checkmark = function Checkmark(_ref) {
|
|
2156
2189
|
var boxSize = _ref.boxSize;
|
|
2157
2190
|
return /*#__PURE__*/React__default.createElement(Memo$8, {
|
|
2158
|
-
|
|
2191
|
+
width: boxSize,
|
|
2192
|
+
height: boxSize
|
|
2159
2193
|
});
|
|
2160
2194
|
};
|
|
2161
2195
|
|
|
@@ -2185,7 +2219,8 @@ var Memo$9 = /*#__PURE__*/React.memo(ForwardRef$9);
|
|
|
2185
2219
|
var ChevronDown = function ChevronDown(_ref) {
|
|
2186
2220
|
var boxSize = _ref.boxSize;
|
|
2187
2221
|
return /*#__PURE__*/React__default.createElement(Memo$9, {
|
|
2188
|
-
|
|
2222
|
+
width: boxSize,
|
|
2223
|
+
height: boxSize,
|
|
2189
2224
|
fill: colors.fill.action
|
|
2190
2225
|
});
|
|
2191
2226
|
};
|
|
@@ -2216,7 +2251,8 @@ var Memo$a = /*#__PURE__*/React.memo(ForwardRef$a);
|
|
|
2216
2251
|
var ChevronRight = function ChevronRight(_ref) {
|
|
2217
2252
|
var boxSize = _ref.boxSize;
|
|
2218
2253
|
return /*#__PURE__*/React__default.createElement(Memo$a, {
|
|
2219
|
-
|
|
2254
|
+
width: boxSize,
|
|
2255
|
+
height: boxSize
|
|
2220
2256
|
});
|
|
2221
2257
|
};
|
|
2222
2258
|
|
|
@@ -2246,7 +2282,8 @@ var Memo$b = /*#__PURE__*/React.memo(ForwardRef$b);
|
|
|
2246
2282
|
var Clock = function Clock(_ref) {
|
|
2247
2283
|
var boxSize = _ref.boxSize;
|
|
2248
2284
|
return /*#__PURE__*/React__default.createElement(Memo$b, {
|
|
2249
|
-
|
|
2285
|
+
width: boxSize,
|
|
2286
|
+
height: boxSize
|
|
2250
2287
|
});
|
|
2251
2288
|
};
|
|
2252
2289
|
|
|
@@ -2277,7 +2314,8 @@ var Memo$c = /*#__PURE__*/React.memo(ForwardRef$c);
|
|
|
2277
2314
|
var FileFill = function FileFill(_ref) {
|
|
2278
2315
|
var boxSize = _ref.boxSize;
|
|
2279
2316
|
return /*#__PURE__*/React__default.createElement(Memo$c, {
|
|
2280
|
-
|
|
2317
|
+
width: boxSize,
|
|
2318
|
+
height: boxSize
|
|
2281
2319
|
});
|
|
2282
2320
|
};
|
|
2283
2321
|
|
|
@@ -2307,7 +2345,8 @@ var Memo$d = /*#__PURE__*/React.memo(ForwardRef$d);
|
|
|
2307
2345
|
var FileOutline = function FileOutline(_ref) {
|
|
2308
2346
|
var boxSize = _ref.boxSize;
|
|
2309
2347
|
return /*#__PURE__*/React__default.createElement(Memo$d, {
|
|
2310
|
-
|
|
2348
|
+
width: boxSize,
|
|
2349
|
+
height: boxSize
|
|
2311
2350
|
});
|
|
2312
2351
|
};
|
|
2313
2352
|
|
|
@@ -2434,7 +2473,8 @@ var Memo$g = /*#__PURE__*/React.memo(ForwardRef$g);
|
|
|
2434
2473
|
var FolderOutline = function FolderOutline(_ref) {
|
|
2435
2474
|
var boxSize = _ref.boxSize;
|
|
2436
2475
|
return /*#__PURE__*/React__default.createElement(Memo$g, {
|
|
2437
|
-
|
|
2476
|
+
width: boxSize,
|
|
2477
|
+
height: boxSize
|
|
2438
2478
|
});
|
|
2439
2479
|
};
|
|
2440
2480
|
|
|
@@ -2464,7 +2504,8 @@ var Memo$h = /*#__PURE__*/React.memo(ForwardRef$h);
|
|
|
2464
2504
|
var FolderAddFill = function FolderAddFill(_ref) {
|
|
2465
2505
|
var boxSize = _ref.boxSize;
|
|
2466
2506
|
return /*#__PURE__*/React__default.createElement(Memo$h, {
|
|
2467
|
-
|
|
2507
|
+
width: boxSize,
|
|
2508
|
+
height: boxSize
|
|
2468
2509
|
});
|
|
2469
2510
|
};
|
|
2470
2511
|
|
|
@@ -2494,7 +2535,8 @@ var Memo$i = /*#__PURE__*/React.memo(ForwardRef$i);
|
|
|
2494
2535
|
var FolderAddOutline = function FolderAddOutline(_ref) {
|
|
2495
2536
|
var boxSize = _ref.boxSize;
|
|
2496
2537
|
return /*#__PURE__*/React__default.createElement(Memo$i, {
|
|
2497
|
-
|
|
2538
|
+
width: boxSize,
|
|
2539
|
+
height: boxSize
|
|
2498
2540
|
});
|
|
2499
2541
|
};
|
|
2500
2542
|
|
|
@@ -2537,7 +2579,8 @@ var Memo$j = /*#__PURE__*/React.memo(ForwardRef$j);
|
|
|
2537
2579
|
var Group = function Group(_ref) {
|
|
2538
2580
|
var boxSize = _ref.boxSize;
|
|
2539
2581
|
return /*#__PURE__*/React__default.createElement(Memo$j, {
|
|
2540
|
-
|
|
2582
|
+
width: boxSize,
|
|
2583
|
+
height: boxSize
|
|
2541
2584
|
});
|
|
2542
2585
|
};
|
|
2543
2586
|
|
|
@@ -2567,7 +2610,8 @@ var Memo$k = /*#__PURE__*/React.memo(ForwardRef$k);
|
|
|
2567
2610
|
var Home = function Home(_ref) {
|
|
2568
2611
|
var boxSize = _ref.boxSize;
|
|
2569
2612
|
return /*#__PURE__*/React__default.createElement(Memo$k, {
|
|
2570
|
-
|
|
2613
|
+
width: boxSize,
|
|
2614
|
+
height: boxSize
|
|
2571
2615
|
});
|
|
2572
2616
|
};
|
|
2573
2617
|
|
|
@@ -2597,7 +2641,8 @@ var Memo$l = /*#__PURE__*/React.memo(ForwardRef$l);
|
|
|
2597
2641
|
var Image = function Image(_ref) {
|
|
2598
2642
|
var boxSize = _ref.boxSize;
|
|
2599
2643
|
return /*#__PURE__*/React__default.createElement(Memo$l, {
|
|
2600
|
-
|
|
2644
|
+
width: boxSize,
|
|
2645
|
+
height: boxSize
|
|
2601
2646
|
});
|
|
2602
2647
|
};
|
|
2603
2648
|
|
|
@@ -2627,7 +2672,8 @@ var Memo$m = /*#__PURE__*/React.memo(ForwardRef$m);
|
|
|
2627
2672
|
var Menu = function Menu(_ref) {
|
|
2628
2673
|
var boxSize = _ref.boxSize;
|
|
2629
2674
|
return /*#__PURE__*/React__default.createElement(Memo$m, {
|
|
2630
|
-
|
|
2675
|
+
width: boxSize,
|
|
2676
|
+
height: boxSize
|
|
2631
2677
|
});
|
|
2632
2678
|
};
|
|
2633
2679
|
|
|
@@ -2670,7 +2716,8 @@ var Memo$n = /*#__PURE__*/React.memo(ForwardRef$n);
|
|
|
2670
2716
|
var Search = function Search(_ref) {
|
|
2671
2717
|
var boxSize = _ref.boxSize;
|
|
2672
2718
|
return /*#__PURE__*/React__default.createElement(Memo$n, {
|
|
2673
|
-
|
|
2719
|
+
width: boxSize,
|
|
2720
|
+
height: boxSize
|
|
2674
2721
|
});
|
|
2675
2722
|
};
|
|
2676
2723
|
|
|
@@ -2703,7 +2750,8 @@ var Memo$o = /*#__PURE__*/React.memo(ForwardRef$o);
|
|
|
2703
2750
|
var Settings = function Settings(_ref) {
|
|
2704
2751
|
var boxSize = _ref.boxSize;
|
|
2705
2752
|
return /*#__PURE__*/React__default.createElement(Memo$o, {
|
|
2706
|
-
|
|
2753
|
+
width: boxSize,
|
|
2754
|
+
height: boxSize,
|
|
2707
2755
|
fill: colors.fill.action
|
|
2708
2756
|
});
|
|
2709
2757
|
};
|
|
@@ -2734,7 +2782,8 @@ var Memo$p = /*#__PURE__*/React.memo(ForwardRef$p);
|
|
|
2734
2782
|
var TableFill = function TableFill(_ref) {
|
|
2735
2783
|
var boxSize = _ref.boxSize;
|
|
2736
2784
|
return /*#__PURE__*/React__default.createElement(Memo$p, {
|
|
2737
|
-
|
|
2785
|
+
width: boxSize,
|
|
2786
|
+
height: boxSize
|
|
2738
2787
|
});
|
|
2739
2788
|
};
|
|
2740
2789
|
|
|
@@ -2764,7 +2813,8 @@ var Memo$q = /*#__PURE__*/React.memo(ForwardRef$q);
|
|
|
2764
2813
|
var TableOutline = function TableOutline(_ref) {
|
|
2765
2814
|
var boxSize = _ref.boxSize;
|
|
2766
2815
|
return /*#__PURE__*/React__default.createElement(Memo$q, {
|
|
2767
|
-
|
|
2816
|
+
width: boxSize,
|
|
2817
|
+
height: boxSize
|
|
2768
2818
|
});
|
|
2769
2819
|
};
|
|
2770
2820
|
|
|
@@ -2794,7 +2844,8 @@ var Memo$r = /*#__PURE__*/React.memo(ForwardRef$r);
|
|
|
2794
2844
|
var Trash = function Trash(_ref) {
|
|
2795
2845
|
var boxSize = _ref.boxSize;
|
|
2796
2846
|
return /*#__PURE__*/React__default.createElement(Memo$r, {
|
|
2797
|
-
|
|
2847
|
+
width: boxSize,
|
|
2848
|
+
height: boxSize
|
|
2798
2849
|
});
|
|
2799
2850
|
};
|
|
2800
2851
|
|
|
@@ -2824,7 +2875,8 @@ var Memo$s = /*#__PURE__*/React.memo(ForwardRef$s);
|
|
|
2824
2875
|
var Services = function Services(_ref) {
|
|
2825
2876
|
var boxSize = _ref.boxSize;
|
|
2826
2877
|
return /*#__PURE__*/React__default.createElement(Memo$s, {
|
|
2827
|
-
|
|
2878
|
+
width: boxSize,
|
|
2879
|
+
height: boxSize
|
|
2828
2880
|
});
|
|
2829
2881
|
};
|
|
2830
2882
|
|
|
@@ -2867,7 +2919,8 @@ var Memo$t = /*#__PURE__*/React.memo(ForwardRef$t);
|
|
|
2867
2919
|
var Question = function Question(_ref) {
|
|
2868
2920
|
var boxSize = _ref.boxSize;
|
|
2869
2921
|
return /*#__PURE__*/React__default.createElement(Memo$t, {
|
|
2870
|
-
|
|
2922
|
+
width: boxSize,
|
|
2923
|
+
height: boxSize
|
|
2871
2924
|
});
|
|
2872
2925
|
};
|
|
2873
2926
|
|
|
@@ -2897,7 +2950,8 @@ var Memo$u = /*#__PURE__*/React.memo(ForwardRef$u);
|
|
|
2897
2950
|
var Video = function Video(_ref) {
|
|
2898
2951
|
var boxSize = _ref.boxSize;
|
|
2899
2952
|
return /*#__PURE__*/React__default.createElement(Memo$u, {
|
|
2900
|
-
|
|
2953
|
+
width: boxSize,
|
|
2954
|
+
height: boxSize
|
|
2901
2955
|
});
|
|
2902
2956
|
};
|
|
2903
2957
|
|
|
@@ -2927,7 +2981,8 @@ var Memo$v = /*#__PURE__*/React.memo(ForwardRef$v);
|
|
|
2927
2981
|
var Page = function Page(_ref) {
|
|
2928
2982
|
var boxSize = _ref.boxSize;
|
|
2929
2983
|
return /*#__PURE__*/React__default.createElement(Memo$v, {
|
|
2930
|
-
|
|
2984
|
+
width: boxSize,
|
|
2985
|
+
height: boxSize
|
|
2931
2986
|
});
|
|
2932
2987
|
};
|
|
2933
2988
|
|
|
@@ -3024,7 +3079,8 @@ var Memo$x = /*#__PURE__*/React.memo(ForwardRef$x);
|
|
|
3024
3079
|
var Task = function Task(_ref) {
|
|
3025
3080
|
var boxSize = _ref.boxSize;
|
|
3026
3081
|
return /*#__PURE__*/React__default.createElement(Memo$x, {
|
|
3027
|
-
|
|
3082
|
+
width: boxSize,
|
|
3083
|
+
height: boxSize
|
|
3028
3084
|
});
|
|
3029
3085
|
};
|
|
3030
3086
|
|