@underverse-ui/underverse 0.2.28 → 0.2.29

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/dist/index.cjs CHANGED
@@ -1277,9 +1277,21 @@ var TagInput = (0, import_react4.forwardRef)(
1277
1277
  e.preventDefault();
1278
1278
  if (e.ctrlKey || e.metaKey) {
1279
1279
  triggerSearch();
1280
- } else {
1281
- addTag(inputValue);
1280
+ return;
1281
+ }
1282
+ if (e.shiftKey) {
1283
+ const tagsToAdd = inputValue.split(/\s+/).map((t) => t.trim()).filter((t) => t.length > 0 && !value.includes(t));
1284
+ if (tagsToAdd.length > 0) {
1285
+ const availableSlots = maxTags !== void 0 ? maxTags - value.length : Infinity;
1286
+ if (availableSlots > 0) {
1287
+ const tagsToInsert = tagsToAdd.slice(0, availableSlots);
1288
+ onChange([...value, ...tagsToInsert]);
1289
+ setInputValue("");
1290
+ }
1291
+ }
1292
+ return;
1282
1293
  }
1294
+ addTag(inputValue);
1283
1295
  } else if (e.key === "Backspace" && inputValue === "" && value.length > 0) {
1284
1296
  removeTag(value.length - 1);
1285
1297
  }