@getpara/core-components 1.8.0 → 2.0.0-alpha.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.
@@ -16934,11 +16934,6 @@ 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
- }
16942
16937
  if (this.preventBlur) {
16943
16938
  e.preventDefault();
16944
16939
  }
@@ -16948,11 +16943,6 @@ const CpslPopover = class {
16948
16943
  {
16949
16944
  eventName: 'touchstart',
16950
16945
  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
- }
16956
16946
  if (this.preventBlur) {
16957
16947
  e.preventDefault();
16958
16948
  }
@@ -17109,7 +17099,7 @@ const CpslPopover = class {
17109
17099
  }
17110
17100
  render() {
17111
17101
  var _a;
17112
- return (index.h(index.Host, { key: '95731e6389d5621165b539f11615b4a5999ebde5', class: {
17102
+ return (index.h(index.Host, { key: 'ef05d515c8622a70f143f460538a422c010de2e5', class: {
17113
17103
  'open': this.open,
17114
17104
  'transform-h-left': this.transformOriginHorizontal === 'left',
17115
17105
  'transform-h-center': this.transformOriginHorizontal === 'center',
@@ -17121,9 +17111,9 @@ const CpslPopover = class {
17121
17111
  top: `${this.positionY}px`,
17122
17112
  left: `${this.positionX}px`,
17123
17113
  width: !this.open ? '0px' : this.autoWidth ? 'auto' : `${(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.clientWidth}px`,
17124
- } }, index.h("div", { key: '39fd662f00df0cc9b0ed3de57e99a8ff51e8f789', id: "container", class: { container: true, open: this.open }, style: {
17114
+ } }, index.h("div", { key: 'd9134dc8de72f5802ce8ebf8b31f0a9a1cb09775', id: "container", class: { container: true, open: this.open }, style: {
17125
17115
  visibility: this.hasSetInitialPosition ? 'visible' : 'hidden',
17126
- } }, index.h("slot", { key: '9229367a71f6f32655fe0bfb3d4ddde2cc079a57' }))));
17116
+ } }, index.h("slot", { key: '6461c7a0c09cd8a0b03e5c42ba9fae303e571146' }))));
17127
17117
  }
17128
17118
  get el() { return index.getElement(this); }
17129
17119
  static get watchers() { return {
@@ -21354,12 +21344,7 @@ const CpslSelect = class {
21354
21344
  typeof window !== 'undefined' && window.removeEventListener('click', this.handleClickOutside);
21355
21345
  }
21356
21346
  };
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
- }
21347
+ this.handleClick = () => {
21363
21348
  if (!this.disabled) {
21364
21349
  this.hasFocus = true;
21365
21350
  typeof window !== 'undefined' && window.addEventListener('click', this.handleClickOutside);
@@ -21416,11 +21401,11 @@ const CpslSelect = class {
21416
21401
  }
21417
21402
  render() {
21418
21403
  var _a, _b, _c, _d, _e;
21419
- const selectedValueAsString = Array.isArray(this.selectedValue) ? this.selectedValue.join(', ') : this.selectedValue;
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 => {
21404
+ const selectedValueAsString = typeof this.selectedValue === 'string' ? this.selectedValue : this.selectedValue.join(', ');
21405
+ return (index.h(index.Host, { key: '0b366a3c097d845993afaa7d27c894c5c0f03e44', id: this.id, class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': this.hasSelectedItem } }, this.label && (index.h("label", { key: 'cfa4ae1a802f98d1beeea74bce33dd1844f821bf', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? index.h("span", { class: "optional-label" }, "(optional)") : '')), index.h("div", { key: '971c488bbadbaa9ade8e17d0ec91bbaaccd1c3df', 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: 'c4cb233ece4d06a3cc7ef4b7aa5d9ccb6fada6c2', name: "selected-item" }), index.h("div", { key: '78e52b91db67e50205601902074610c4841d73db', class: { 'selected-container-content': true, 'hidden': this.hasSelectedItem && this.showFormattedSelectedItem }, id: "selected-container-content", style: {} }, (!this.hasSelectedItem || !this.showFormattedSelectedItem) && (index.h("cpsl-text", { key: '682ce440ce404b1549eec38f6a523026eb48ea0d', 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: '96355103fb2e94e3c2bce8be308c643de03cb94c', part: "icon", class: { 'chevron': true, 'open': !this.noIconAnimation && this.popoverOpen, 'has-value': this.hasSelectedItem }, icon: this.icon }), index.h("input", { key: '60eb6ad37fcaa568b3166f10b6c8dd59b8ca6e10', 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: '4bd5c2e243c05671786dded417234bdb3ae4e5ef', part: "popover", autoWidth: this.autoWidth, trigger: this.id, preventBlur: this.hasFocus, disabled: this.disabled, anchorEl: this.anchorEl }, index.h("div", { key: '0d1bb3a829f31e211cc99e28e3650d21a353ec75', part: "dropdown", class: "dropdown" }, this.showSearch && (index.h("div", { key: 'af48dfde2c8fd8717b9602ad6870a7b8da86c6db', class: "search-container" }, index.h("cpsl-input", { key: '3a3d0197b1fe0f6a91568fb2c0530a34d8f68c8d', onClick: e => e.stopPropagation(), placeholder: (_d = this.searchPlaceholder) !== null && _d !== void 0 ? _d : 'Search', value: "", onCpslInput: e => {
21421
21406
  e.stopPropagation();
21422
21407
  this.cpslSearchChange.emit(e.detail.value);
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)))));
21408
+ } }))), index.h("div", { key: 'fb7d1dc0be277669ad804766f7ebb03218268a17', class: "dropdown-inner", style: { maxHeight: `${this.dropdownMaxHeight}px` } }, index.h("slot", { key: 'f63682b1d61aeab270cd2bf8683bf9b2f100274d', name: "items" }))))), (this.errorText || this.helperText) && (index.h("div", { key: '66ff41128e6faa920cd1a3e7cea36995921b89b6', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("span", { key: '77f56f4d6c7bff3836cdb54392b7938a0aa2ef9a' }, (_e = this.errorText) !== null && _e !== void 0 ? _e : this.helperText)))));
21424
21409
  }
21425
21410
  get el() { return index.getElement(this); }
21426
21411
  static get watchers() { return {