wini-web-components 1.2.1 → 1.2.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.
@@ -107,16 +107,16 @@ var Select1 = /** @class */ (function (_super) {
107
107
  _this.onKeyDown = function (ev) {
108
108
  var _a, _b, _c, _d, _e, _f, _g;
109
109
  console.log(ev.key);
110
- debugger;
111
- ev.preventDefault();
112
110
  if ((((_a = _this.state.options) === null || _a === void 0 ? void 0 : _a.length) || ((_b = _this.state.search) === null || _b === void 0 ? void 0 : _b.length)) && _this.state.isOpen) {
113
111
  switch (ev.key.toLowerCase()) {
114
112
  case "enter":
113
+ ev.preventDefault();
115
114
  var _selectItem = ((_c = _this.state.search) !== null && _c !== void 0 ? _c : _this.state.options).find(function (e) { return e.id === _this.state.selected; });
116
115
  if (_selectItem)
117
116
  _this.onSelect(_selectItem);
118
117
  break;
119
118
  case "arrowup":
119
+ ev.preventDefault();
120
120
  if (_this.state.selected) {
121
121
  var _index = ((_d = _this.state.search) !== null && _d !== void 0 ? _d : _this.state.options).findIndex(function (e) { return e.id === _this.state.selected; });
122
122
  _index = ((_index === 0) ? _this.props.options.length : _index) - 1;
@@ -124,6 +124,7 @@ var Select1 = /** @class */ (function (_super) {
124
124
  }
125
125
  break;
126
126
  case "arrowdown":
127
+ ev.preventDefault();
127
128
  if (_this.state.selected) {
128
129
  var _index = ((_f = _this.state.search) !== null && _f !== void 0 ? _f : _this.state.options).findIndex(function (e) { return e.id === _this.state.selected; });
129
130
  _index = ((_index + 1 === _this.props.options.length) ? -1 : _index) + 1;
@@ -39,7 +39,7 @@ var TextArea = /** @class */ (function (_super) {
39
39
  }
40
40
  TextArea.prototype.render = function () {
41
41
  var _a, _b, _c, _d;
42
- return react_1.default.createElement("div", { className: "text-area-container row ".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : 'body-3', " ").concat(((_b = this.props.helperText) === null || _b === void 0 ? void 0 : _b.length) && 'helper-text'), style: this.props.style ? __assign(__assign({}, { '--helper-text-color': (_c = this.props.helperTextColor) !== null && _c !== void 0 ? _c : '#e14337' }), this.props.style) : { '--helper-text-color': (_d = this.props.helperTextColor) !== null && _d !== void 0 ? _d : '#e14337' } }, this.props.register ?
42
+ return react_1.default.createElement("div", { className: "text-area-container row ".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : 'body-3', " ").concat(((_b = this.props.helperText) === null || _b === void 0 ? void 0 : _b.length) && 'helper-text'), "helper-text": this.props.helperText, style: this.props.style ? __assign(__assign({}, { '--helper-text-color': (_c = this.props.helperTextColor) !== null && _c !== void 0 ? _c : '#e14337' }), this.props.style) : { '--helper-text-color': (_d = this.props.helperTextColor) !== null && _d !== void 0 ? _d : '#e14337' } }, this.props.register ?
43
43
  react_1.default.createElement("textarea", __assign({ autoFocus: this.props.autoFocus }, this.props.register, { maxLength: this.props.maxLength, name: this.props.name, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onFocus: this.props.onFocus })) : react_1.default.createElement("textarea", { autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, name: this.props.name, defaultValue: this.props.defaultValue, value: this.props.value, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onChange: this.props.onChange, onFocus: this.props.onFocus, onBlur: this.props.onBlur }));
44
44
  };
45
45
  return TextArea;