@homebound/beam 2.326.0 → 2.326.1

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.
@@ -53,9 +53,11 @@ function ChipTextField(props) {
53
53
  }
54
54
  }, onInput: (e) => {
55
55
  var _a, _b, _c;
56
- // Prevent user from pasting content that has new line characters and replace with empty space.
57
56
  const target = e.target;
58
- target.textContent = (_b = (_a = target.textContent) === null || _a === void 0 ? void 0 : _a.replace(/[\n\r]/g, " ")) !== null && _b !== void 0 ? _b : "";
57
+ if ("inputType" in e.nativeEvent && e.nativeEvent.inputType === "insertFromPaste") {
58
+ // Clean up any formatting from pasted text
59
+ target.innerHTML = (_b = (_a = target.textContent) === null || _a === void 0 ? void 0 : _a.replace(/[A\n\r]/g, " ")) !== null && _b !== void 0 ? _b : "";
60
+ }
59
61
  onChange((_c = target.textContent) !== null && _c !== void 0 ? _c : "");
60
62
  }, ...focusProps, css: {
61
63
  ...Css_1.Css[typeScale].dib.br16.pl1.pxPx(10).pyPx(2).gray900.bgGray300.outline0.mwPx(32).$,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.326.0",
3
+ "version": "2.326.1",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",