@getpara/core-components 2.11.0 → 2.12.0

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.
@@ -21886,6 +21886,7 @@ const CpslSelect = class {
21886
21886
  this.inputId = `cpsl-select-${inputIds++}`;
21887
21887
  this.onBlur = (ev) => {
21888
21888
  this.hasFocus = false;
21889
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises -- fire-and-forget: close popover on blur
21889
21890
  this.popoverEl.closePopover();
21890
21891
  this.cpslBlur.emit(ev);
21891
21892
  };
@@ -21970,6 +21971,7 @@ const CpslSelect = class {
21970
21971
  }
21971
21972
  onValueChange() {
21972
21973
  if (!this.multiple) {
21974
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises -- fire-and-forget: close popover on value change
21973
21975
  this.popoverEl.closePopover();
21974
21976
  }
21975
21977
  }
@@ -21993,10 +21995,10 @@ const CpslSelect = class {
21993
21995
  render() {
21994
21996
  var _a, _b, _c, _d, _e;
21995
21997
  const selectedValueAsString = Array.isArray(this.selectedValue) ? this.selectedValue.join(', ') : this.selectedValue;
21996
- return (index.h(index.Host, { key: '18900dc2127936e4cd74c736234287d3a9c4f5d6', id: this.id, class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': this.hasSelectedItem } }, this.label && (index.h("label", { key: '84edbb138188860c4b53d6bb5414529e0981c6ac', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? index.h("span", { class: "optional-label" }, "(optional)") : '')), index.h("div", { key: 'ab6f0e73fb1fc392fb6a37a364334e841c51e4f1', part: "select-container", id: "select-container", class: { 'select-container': true, 'error-container': Boolean(this.errorText) }, onClick: this.handleClick }, this.hasSelectedItem && this.showFormattedSelectedItem && index.h("slot", { key: '227f6bc64a4caf1ab62eb721abcff785f52c900a', name: "selected-item" }), index.h("div", { key: '6085a10a607168ce5804f0d0c10856509ec309db', class: { 'selected-container-content': true, 'hidden': this.hasSelectedItem && this.showFormattedSelectedItem }, id: "selected-container-content", style: {} }, (!this.hasSelectedItem || !this.showFormattedSelectedItem) && (index.h("cpsl-text", { key: '952821d6eb180709bf6484a1e5a201b1173c8e50', class: { 'selected-text': true, 'placeholder': !this.selectedValue }, part: "selected-text", color: this.selectedItemColor, variant: this.selectedItemVariant, weight: this.selectedItemWeight }, !this.selectedValue ? ((_a = this.placeholder) !== null && _a !== void 0 ? _a : 'Select') : ((_c = (_b = this.formatValue) === null || _b === void 0 ? void 0 : _b.call(this, this.selectedValue)) !== null && _c !== void 0 ? _c : selectedValueAsString)))), this.icon && this.icon !== null && (index.h("cpsl-icon", { key: 'ebc48a455be06e7423f46cd1cbc9794ac9f7158a', part: "icon", class: { 'chevron': true, 'open': !this.noIconAnimation && this.popoverOpen, 'has-value': this.hasSelectedItem }, icon: this.icon })), index.h("input", { key: '3e754fbb61ed2b895d100eac6c066965ccb019d4', id: this.inputId, disabled: this.disabled, class: { disabled: this.disabled }, value: this.selectedValue, onFocus: this.onFocus, onBlur: this.onBlur, onKeyPress: this.handleEnterPress, inputmode: "none" }), index.h("cpsl-popover", { key: 'a8213a89bfd08f45839402e7bea33df24331eadd', part: "popover", autoWidth: this.autoWidth, alignCenter: this.alignCenter, trigger: this.id, preventBlur: this.hasFocus, disabled: this.disabled, anchorEl: this.anchorEl }, index.h("div", { key: '1850448668be81bab36fa485a4ca9efc8a6f42c3', part: "dropdown", class: "dropdown" }, this.showSearch && (index.h("div", { key: 'f4d86eada1ab15fdc1e5c40f177c740ea402854c', class: "search-container" }, index.h("cpsl-input", { key: '5eac08c4bf0d58f52f393cf7fe709ea7104e567c', onClick: e => e.stopPropagation(), placeholder: (_d = this.searchPlaceholder) !== null && _d !== void 0 ? _d : 'Search', value: "", onCpslInput: e => {
21998
+ return (index.h(index.Host, { key: '1e4dc20d7f2dc7844dd956c110cc5a2757ddb752', id: this.id, class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': this.hasSelectedItem } }, this.label && (index.h("label", { key: '4af1f907313f9e095c706fbab2c236c8e9d47237', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? index.h("span", { class: "optional-label" }, "(optional)") : '')), index.h("div", { key: '98558fb18b2bfc48b5bf23021a46f9755decaaaf', part: "select-container", id: "select-container", class: { 'select-container': true, 'error-container': Boolean(this.errorText) }, onClick: this.handleClick }, this.hasSelectedItem && this.showFormattedSelectedItem && index.h("slot", { key: 'dd8f8e9e87137bdd3cd4607d869e616eb7c9b9c4', name: "selected-item" }), index.h("div", { key: 'b9ec417b3f67037837f948792511f80e842df799', class: { 'selected-container-content': true, 'hidden': this.hasSelectedItem && this.showFormattedSelectedItem }, id: "selected-container-content", style: {} }, (!this.hasSelectedItem || !this.showFormattedSelectedItem) && (index.h("cpsl-text", { key: '62dd60c821f9d94c00fddf30af34e64de2e345c8', class: { 'selected-text': true, 'placeholder': !this.selectedValue }, part: "selected-text", color: this.selectedItemColor, variant: this.selectedItemVariant, weight: this.selectedItemWeight }, !this.selectedValue ? ((_a = this.placeholder) !== null && _a !== void 0 ? _a : 'Select') : ((_c = (_b = this.formatValue) === null || _b === void 0 ? void 0 : _b.call(this, this.selectedValue)) !== null && _c !== void 0 ? _c : selectedValueAsString)))), this.icon && this.icon !== null && (index.h("cpsl-icon", { key: '56c75234d0ba048b23a3bf41d751f70a23f85041', part: "icon", class: { 'chevron': true, 'open': !this.noIconAnimation && this.popoverOpen, 'has-value': this.hasSelectedItem }, icon: this.icon })), index.h("input", { key: '65b85ee9df8fbb62b82470c0991428bdf67d5437', id: this.inputId, disabled: this.disabled, class: { disabled: this.disabled }, value: this.selectedValue, onFocus: this.onFocus, onBlur: this.onBlur, onKeyPress: this.handleEnterPress, inputmode: "none" }), index.h("cpsl-popover", { key: '751bfe385c3ca95cae0fe2eef9c03a779d6125b1', part: "popover", autoWidth: this.autoWidth, alignCenter: this.alignCenter, trigger: this.id, preventBlur: this.hasFocus, disabled: this.disabled, anchorEl: this.anchorEl }, index.h("div", { key: '0b6913238a58fe19a918d1eac7ee09b2f7570ec3', part: "dropdown", class: "dropdown" }, this.showSearch && (index.h("div", { key: '388d404c0ebbbfb922056f052511fdfc99f3d702', class: "search-container" }, index.h("cpsl-input", { key: 'e254975df404b4216c3318d5e626468e6350620c', onClick: e => e.stopPropagation(), placeholder: (_d = this.searchPlaceholder) !== null && _d !== void 0 ? _d : 'Search', value: "", onCpslInput: e => {
21997
21999
  e.stopPropagation();
21998
22000
  this.cpslSearchChange.emit(e.detail.value);
21999
- } }))), index.h("div", { key: '98be2ccca9d4f3393b375a6be57ecb994f208d63', class: "dropdown-inner", style: { maxHeight: `${this.dropdownMaxHeight}px` } }, index.h("slot", { key: '4b144f409037e0e19542bd01f360812afcbdeb8e', name: "items" }))))), (this.errorText || this.helperText) && (index.h("div", { key: '1ad20642e98bc4b530ba3831d721f4e5602301b7', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("span", { key: 'c78382be9cba907cd2d8400d8602ceebb523b8b5' }, (_e = this.errorText) !== null && _e !== void 0 ? _e : this.helperText)))));
22001
+ } }))), index.h("div", { key: 'b847a13c07e671d596eaa728e431423f7d3c2e4b', class: "dropdown-inner", style: { maxHeight: `${this.dropdownMaxHeight}px` } }, index.h("slot", { key: 'b6bafa1999a354a717a008a918ceccc67faeb9c2', name: "items" }))))), (this.errorText || this.helperText) && (index.h("div", { key: 'cfe5b3c706560be4de6e59916e554c95de461e92', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("span", { key: '7bff30a43bedaed3df56de1f826f33957163a6ef' }, (_e = this.errorText) !== null && _e !== void 0 ? _e : this.helperText)))));
22000
22002
  }
22001
22003
  get el() { return index.getElement(this); }
22002
22004
  static get watchers() { return {