@getpara/core-components 1.7.1 → 1.8.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.
@@ -16934,6 +16934,11 @@ const CpslPopover = class {
16934
16934
  {
16935
16935
  eventName: 'mousedown',
16936
16936
  callback: e => {
16937
+ var _a;
16938
+ const targetId = (_a = e.target.id) !== null && _a !== void 0 ? _a : '';
16939
+ if (targetId === 'ignore-click') {
16940
+ return;
16941
+ }
16937
16942
  if (this.preventBlur) {
16938
16943
  e.preventDefault();
16939
16944
  }
@@ -16943,6 +16948,11 @@ const CpslPopover = class {
16943
16948
  {
16944
16949
  eventName: 'touchstart',
16945
16950
  callback: e => {
16951
+ var _a;
16952
+ const targetId = (_a = e.target.id) !== null && _a !== void 0 ? _a : '';
16953
+ if (targetId === 'ignore-click') {
16954
+ return;
16955
+ }
16946
16956
  if (this.preventBlur) {
16947
16957
  e.preventDefault();
16948
16958
  }
@@ -17099,7 +17109,7 @@ const CpslPopover = class {
17099
17109
  }
17100
17110
  render() {
17101
17111
  var _a;
17102
- return (index.h(index.Host, { key: 'ef05d515c8622a70f143f460538a422c010de2e5', class: {
17112
+ return (index.h(index.Host, { key: '95731e6389d5621165b539f11615b4a5999ebde5', class: {
17103
17113
  'open': this.open,
17104
17114
  'transform-h-left': this.transformOriginHorizontal === 'left',
17105
17115
  'transform-h-center': this.transformOriginHorizontal === 'center',
@@ -17111,9 +17121,9 @@ const CpslPopover = class {
17111
17121
  top: `${this.positionY}px`,
17112
17122
  left: `${this.positionX}px`,
17113
17123
  width: !this.open ? '0px' : this.autoWidth ? 'auto' : `${(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.clientWidth}px`,
17114
- } }, index.h("div", { key: 'd9134dc8de72f5802ce8ebf8b31f0a9a1cb09775', id: "container", class: { container: true, open: this.open }, style: {
17124
+ } }, index.h("div", { key: '39fd662f00df0cc9b0ed3de57e99a8ff51e8f789', id: "container", class: { container: true, open: this.open }, style: {
17115
17125
  visibility: this.hasSetInitialPosition ? 'visible' : 'hidden',
17116
- } }, index.h("slot", { key: '6461c7a0c09cd8a0b03e5c42ba9fae303e571146' }))));
17126
+ } }, index.h("slot", { key: '9229367a71f6f32655fe0bfb3d4ddde2cc079a57' }))));
17117
17127
  }
17118
17128
  get el() { return index.getElement(this); }
17119
17129
  static get watchers() { return {
@@ -21344,7 +21354,12 @@ const CpslSelect = class {
21344
21354
  typeof window !== 'undefined' && window.removeEventListener('click', this.handleClickOutside);
21345
21355
  }
21346
21356
  };
21347
- this.handleClick = () => {
21357
+ this.handleClick = (e) => {
21358
+ var _a;
21359
+ const targetId = (_a = e.target.id) !== null && _a !== void 0 ? _a : '';
21360
+ if (targetId === 'ignore-click') {
21361
+ return;
21362
+ }
21348
21363
  if (!this.disabled) {
21349
21364
  this.hasFocus = true;
21350
21365
  typeof window !== 'undefined' && window.addEventListener('click', this.handleClickOutside);
@@ -21402,10 +21417,10 @@ const CpslSelect = class {
21402
21417
  render() {
21403
21418
  var _a, _b, _c, _d, _e;
21404
21419
  const selectedValueAsString = Array.isArray(this.selectedValue) ? this.selectedValue.join(', ') : this.selectedValue;
21405
- return (index.h(index.Host, { key: 'b2cf6a54a8e1613128c5e6c852b53e752c66b24a', id: this.id, class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': this.hasSelectedItem } }, this.label && (index.h("label", { key: 'd79a35cde5c5c5d9c22b6c8de85e7cf36afc512e', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? index.h("span", { class: "optional-label" }, "(optional)") : '')), index.h("div", { key: '748bbd58ed4a6623d4e58b6da244aaf00bd23068', part: "select-container", id: "select-container", class: { 'select-container': true, 'error-container': Boolean(this.errorText) }, onMouseDown: this.handleClick }, this.hasSelectedItem && this.showFormattedSelectedItem && index.h("slot", { key: '21600540039afb807f827657459a9ad7a4851df1', name: "selected-item" }), index.h("div", { key: '8fa8319aa7d3738b8ac75b028a2e30606cdd6038', class: { 'selected-container-content': true, 'hidden': this.hasSelectedItem && this.showFormattedSelectedItem }, id: "selected-container-content", style: {} }, (!this.hasSelectedItem || !this.showFormattedSelectedItem) && (index.h("cpsl-text", { key: '6d4a639dcb42b27154b02461a4dc02deb879dea5', 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)))), index.h("cpsl-icon", { key: 'f3b1b1b7407e839c3b4a9a0f20c40e33af805b7a', part: "icon", class: { 'chevron': true, 'open': !this.noIconAnimation && this.popoverOpen, 'has-value': this.hasSelectedItem }, icon: this.icon }), index.h("input", { key: '2590796cd4c320c5ae62a9c203f649d3ee582bc3', 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: 'd159f40989070c4cba12346386e6866ed6123e20', part: "popover", autoWidth: this.autoWidth, trigger: this.id, preventBlur: this.hasFocus, disabled: this.disabled, anchorEl: this.anchorEl }, index.h("div", { key: '1d2c107f595de6523782bd792111aa3830df75db', part: "dropdown", class: "dropdown" }, this.showSearch && (index.h("div", { key: '559403261a208be7bd7e3275437df87e82964a10', class: "search-container" }, index.h("cpsl-input", { key: 'c4daa89e27279643295ae30620d8d5b98ea456cf', onClick: e => e.stopPropagation(), placeholder: (_d = this.searchPlaceholder) !== null && _d !== void 0 ? _d : 'Search', value: "", onCpslInput: e => {
21420
+ return (index.h(index.Host, { key: 'f7c2db799e3462ef83fd0e7b29a3fd88a2d69e38', id: this.id, class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': this.hasSelectedItem } }, this.label && (index.h("label", { key: '8629dcd2d81bbf631962f84c551b2e2a3c96dd33', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? index.h("span", { class: "optional-label" }, "(optional)") : '')), index.h("div", { key: 'f01a1d57e48256e4b1898beeebb4c01275966aa6', part: "select-container", id: "select-container", class: { 'select-container': true, 'error-container': Boolean(this.errorText) }, onMouseDown: this.handleClick }, this.hasSelectedItem && this.showFormattedSelectedItem && index.h("slot", { key: 'eb8a31b3254990d3f4165275561b21fe9e9abaf9', name: "selected-item" }), index.h("div", { key: 'a78cec861e87ac9702477bddf10ec4c66cf37626', class: { 'selected-container-content': true, 'hidden': this.hasSelectedItem && this.showFormattedSelectedItem }, id: "selected-container-content", style: {} }, (!this.hasSelectedItem || !this.showFormattedSelectedItem) && (index.h("cpsl-text", { key: '74fdd4ff8ad178376220d89890f507b304298be4', 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)))), index.h("cpsl-icon", { key: '7f0f942c54e7b72279fbff7cba99b1a84105b912', part: "icon", class: { 'chevron': true, 'open': !this.noIconAnimation && this.popoverOpen, 'has-value': this.hasSelectedItem }, icon: this.icon }), index.h("input", { key: '43e2fbcd9d13168ecdd9fadb2047591480cf2c42', 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: '926ef9d6f59215260143f133104e63a46ecedc1f', part: "popover", autoWidth: this.autoWidth, trigger: this.id, preventBlur: this.hasFocus, disabled: this.disabled, anchorEl: this.anchorEl }, index.h("div", { key: '90520534785a584d539d5ef8e49ff394d2f4c3d7', part: "dropdown", class: "dropdown" }, this.showSearch && (index.h("div", { key: 'e0cf6cf0e4d0c17981b78428ff3ceeb049cebba5', class: "search-container" }, index.h("cpsl-input", { key: 'e1d3bc0a68026b0cbbca0677a30b26934b6296be', onClick: e => e.stopPropagation(), placeholder: (_d = this.searchPlaceholder) !== null && _d !== void 0 ? _d : 'Search', value: "", onCpslInput: e => {
21406
21421
  e.stopPropagation();
21407
21422
  this.cpslSearchChange.emit(e.detail.value);
21408
- } }))), index.h("div", { key: '0c17584f09e80d2391747bc79acde90c7d9a227b', class: "dropdown-inner", style: { maxHeight: `${this.dropdownMaxHeight}px` } }, index.h("slot", { key: '334b72d0128b48d96005988b4e64a35d36a8bd78', name: "items" }))))), (this.errorText || this.helperText) && (index.h("div", { key: '58f2f1f4c80383012183c4da303be1c7fc0c5a57', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("span", { key: '19fe193e8b79aeb370d5f984cbf4bc9d9dca5b1a' }, (_e = this.errorText) !== null && _e !== void 0 ? _e : this.helperText)))));
21423
+ } }))), index.h("div", { key: '4f12646017f6b9c95a717188d7329750e8bdf74e', class: "dropdown-inner", style: { maxHeight: `${this.dropdownMaxHeight}px` } }, index.h("slot", { key: '33fd8a222ea76686c6d00ed388decb5ab10b98d8', name: "items" }))))), (this.errorText || this.helperText) && (index.h("div", { key: 'f9e99bd7e2a4c4eb98ea540c2ba0ed9a1e0feb67', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("span", { key: 'eae52c7b8dad9a6f702abb01f9f8205d7a96a82d' }, (_e = this.errorText) !== null && _e !== void 0 ? _e : this.helperText)))));
21409
21424
  }
21410
21425
  get el() { return index.getElement(this); }
21411
21426
  static get watchers() { return {