@haiilo/catalyst 13.3.0 → 13.3.2

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.
@@ -9175,8 +9175,8 @@ const CatSelect = class {
9175
9175
  if (!oldState.isResolving) {
9176
9176
  this.valueChangedBySelection = true;
9177
9177
  this.value = newValue;
9178
+ this.catChange.emit();
9178
9179
  }
9179
- this.catChange.emit();
9180
9180
  this.showErrorsIfTimeout();
9181
9181
  }
9182
9182
  }
@@ -9377,18 +9377,18 @@ const CatSelect = class {
9377
9377
  }
9378
9378
  render() {
9379
9379
  this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
9380
- return (index.h(index.Host, { key: '93b8cc474d53cf5c950a5ee2ee9b51cf5956288e' }, index.h("div", { key: 'ce1bc0a70b577af3926a459aa1734bbc6200b2bd', class: {
9380
+ return (index.h(index.Host, { key: 'cce259c5f7b06306c1f336635c270de82e98064e' }, index.h("div", { key: 'a2949af92f006706e687564718aa20338b3e0f63', class: {
9381
9381
  'select-field': true,
9382
9382
  'select-horizontal': this.horizontal ?? this.fallbackHorizontal ?? false,
9383
9383
  'select-multiple': this.multiple
9384
- } }, index.h("div", { key: '49dd5bf7a639d1c44ccc5a35eb9efcbc362dfc71', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: '9fdb7777067c530a46d920ce49eba63ec890bf57', htmlFor: `select-${this.id}-input`, part: "label" }, index.h("span", { key: 'ed19b3d78c7d9c0f610884a824cd90f4b4a7f1cb', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: '39b9b19d3505885c873825b939b9f5334cadf351', name: "label" })) || this.label, index.h("div", { key: '8db9f030a2278e733e2186d8d386a3bc5e94702b', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: '5f3196c0a8c55b6dc55031e958cd30193858500f', class: "label-optional", "aria-hidden": "true" }, "(", index$1.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '8434806d6d457a85ee342cecf75e3d8cd4453bb2', class: "label-optional", "aria-hidden": "true" }, "(", index$1.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { key: '294b26a82988b0d35e98eb75e0d64227aa92bf7f', class: "select-container" }, index.h("div", { key: 'bc97d26c6da84a26e90897384895ede9b2091fc0', class: { 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }, ref: el => (this.trigger = el), id: this.id, role: "combobox", "aria-expanded": this.state.isOpen || this.isPillboxActive(), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-required": this.required ? 'true' : false, "aria-activedescendant": this.activeDescendant, onClick: e => this.onClick(e) }, index.h("div", { key: 'e6c2dd7b1e3053501ab9c84a7c651c87bc1367c0', class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (index.h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (index.h("span", { class: {
9384
+ } }, index.h("div", { key: 'eee1e60b3e1e09135935a0f7e7a093ba0ff6ee41', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: '94948c264228e044642651a0d560457703e5a983', htmlFor: `select-${this.id}-input`, part: "label" }, index.h("span", { key: 'bd5ba65749fac9293d3209793f081fa9ac4a162f', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: 'fca2150e151340e5ef5c10616c8e8c20654adca7', name: "label" })) || this.label, index.h("div", { key: '37d9af2e26316942d92c89380393a21f824c6e68', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: 'a692a243a43360edb4787c19ce375d2b7ef2f633', class: "label-optional", "aria-hidden": "true" }, "(", index$1.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: 'f38a61c19e758801fc64441c574b5dc886d92b43', class: "label-optional", "aria-hidden": "true" }, "(", index$1.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { key: '847171f206e167b9ac20d5865b5751d057c6093c', class: "select-container" }, index.h("div", { key: 'ae8c24288e33761373fc40aaf4092d8fe4ad6d8e', class: { 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }, ref: el => (this.trigger = el), id: this.id, role: "combobox", "aria-expanded": this.state.isOpen || this.isPillboxActive(), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-required": this.required ? 'true' : false, "aria-activedescendant": this.activeDescendant, onClick: e => this.onClick(e) }, index.h("div", { key: 'cb17665af425a0172bb204adf6d24cc76a4bcf79', class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (index.h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (index.h("span", { class: {
9385
9385
  pill: true,
9386
9386
  'select-no-open': true,
9387
9387
  'select-option-active': this.state.activeSelectionIndex === i
9388
- }, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (index.h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, index.h("span", null, item.render.label), !this.disabled && (index.h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: index$1.catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (index.h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, index.h("input", { key: '59735a765001238dddda82e9c12b9e76ba099684', "data-test": this.testId, ...this.nativeAttributes, part: "input", id: `select-${this.id}-input`, class: "select-input", role: "combobox", ref: el => (this.input = el), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-activedescendant": this.activeDescendant, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, "aria-autocomplete": "list", onInput: this.onInput.bind(this), value: !this.multiple ? this.state.term : undefined, placeholder: this.placeholder, disabled: this.disabled || this.state.isResolving })), this.state.isResolving && index.h("cat-spinner", { key: 'e43f723bd8149aea563ab01453bc47aefb2d4771' }), this.invalid && (index.h("cat-icon", { key: '602808e09ac23bf6b1f2690c50b538c47a376a6c', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
9388
+ }, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (index.h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, index.h("span", null, item.render.label), !this.disabled && (index.h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: index$1.catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (index.h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, index.h("input", { key: '9dcca82150b5b32cfd38968fc21e78b1702e58ac', "data-test": this.testId, ...this.nativeAttributes, part: "input", id: `select-${this.id}-input`, class: "select-input", role: "combobox", ref: el => (this.input = el), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-activedescendant": this.activeDescendant, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, "aria-autocomplete": "list", onInput: this.onInput.bind(this), value: !this.multiple ? this.state.term : undefined, placeholder: this.placeholder, disabled: this.disabled || this.state.isResolving })), this.state.isResolving && index.h("cat-spinner", { key: 'b270d73c72c3ca14cd74c07dd9ab62b248297c40' }), this.invalid && (index.h("cat-icon", { key: '928306a8eb51531aca26ad0f340c3862aef3ac26', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
9389
9389
  !this.disabled &&
9390
9390
  !this.state.isResolving &&
9391
- this.clearable ? (index.h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: index$1.catI18nRegistry.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (index.h("cat-button", { key: 'b84edc71dde76b9f65fa019d698cd91b97db2390', iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? index$1.catI18nRegistry.t('select.close') : index$1.catI18nRegistry.t('select.open'), "aria-controls": `select-listbox-${this.id}`, "aria-expanded": this.state.isOpen, tabIndex: -1, disabled: this.disabled || this.state.isResolving, "data-dropdown-no-close": true }))), this.hasHint && (index.h(CatFormHint, { key: 'a7d9d8e2a0a4333d9320d987c51792e9d8b13184', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))), index.h("div", { key: '6542000b357d4084d202af29010dd8a85dff5350', class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (index.h("cat-scrollable", { key: 'e449f1d397d1140e546b8e473b0649d9e8e2dbd7', class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, index.h("ul", { key: 'c3c172ebe62fa6a08b1a4f7254b863efc83e8247', class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isFirstLoading
9391
+ this.clearable ? (index.h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: index$1.catI18nRegistry.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (index.h("cat-button", { key: 'ab86beed53c22a5fc93ecc3c075a872fd050a173', iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? index$1.catI18nRegistry.t('select.close') : index$1.catI18nRegistry.t('select.open'), "aria-controls": `select-listbox-${this.id}`, "aria-expanded": this.state.isOpen, tabIndex: -1, disabled: this.disabled || this.state.isResolving, "data-dropdown-no-close": true }))), this.hasHint && (index.h(CatFormHint, { key: '61657538dcaa5bfed0854ccb6a30e62d6d0b3d8a', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))), index.h("div", { key: 'b126aaa05a2491aaa0acd854f11aa3062b8cbafd', class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (index.h("cat-scrollable", { key: 'dc897d6566fd5bf491f11f328c2574046fddf708', class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, index.h("ul", { key: '998a9ee7eca7f9d75d4f41b5aacc4ea4ea42251c', class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isFirstLoading
9392
9392
  ? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (index.h("li", { class: "select-option-loading" }, index.h("cat-skeleton", { variant: "body", lines: 1 }), index.h("cat-skeleton", { variant: "body", lines: 1 }))))
9393
9393
  : !this.state.options.length &&
9394
9394
  !this.tags && (index.h("li", { class: "select-option-empty" }, this.noItems ? this.noItems : index$1.catI18nRegistry.t('select.empty')))))))));