@haiilo/catalyst 14.3.0 → 14.5.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.
Files changed (116) hide show
  1. package/dist/catalyst/catalyst.css +15 -4
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/index.cdn.js +1 -0
  4. package/dist/catalyst/{p-CFGROHMy.js → p-7uZgmxXB.js} +2 -2
  5. package/dist/catalyst/p-7uZgmxXB.js.map +1 -0
  6. package/dist/catalyst/p-fb92a2f1.entry.js +10 -0
  7. package/dist/catalyst/p-fb92a2f1.entry.js.map +1 -0
  8. package/dist/catalyst/scss/core/_nav.scss +2 -1
  9. package/dist/catalyst/scss/core/sanitize-overwrite.scss +3 -0
  10. package/dist/catalyst/scss/index.scss +1 -0
  11. package/dist/cjs/{cat-alert_30.cjs.entry.js → cat-alert_32.cjs.entry.js} +346 -103
  12. package/dist/cjs/catalyst.cjs.js +2 -2
  13. package/dist/cjs/{index-B8-TCsLD.js → index-Ddad39qn.js} +7 -4
  14. package/dist/cjs/index-Ddad39qn.js.map +1 -0
  15. package/dist/cjs/loader.cjs.js +2 -2
  16. package/dist/collection/collection-manifest.json +3 -1
  17. package/dist/collection/components/cat-alert/cat-alert.js +1 -1
  18. package/dist/collection/components/cat-badge/cat-badge.js +1 -1
  19. package/dist/collection/components/cat-button/cat-button.css +9 -2
  20. package/dist/collection/components/cat-button/cat-button.js +26 -1
  21. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  22. package/dist/collection/components/cat-button-group/cat-button-group.js +1 -1
  23. package/dist/collection/components/cat-card/cat-card.js +1 -1
  24. package/dist/collection/components/cat-checkbox/cat-checkbox.js +2 -2
  25. package/dist/collection/components/cat-date/cat-date.js +2 -2
  26. package/dist/collection/components/cat-date-inline/cat-date-inline.js +4 -4
  27. package/dist/collection/components/cat-datepicker/cat-datepicker.js +3 -3
  28. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +2 -2
  29. package/dist/collection/components/cat-dropdown/cat-dropdown.js +116 -47
  30. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  31. package/dist/collection/components/cat-menu/cat-menu.css +9 -0
  32. package/dist/collection/components/cat-menu/cat-menu.js +652 -0
  33. package/dist/collection/components/cat-menu/cat-menu.js.map +1 -0
  34. package/dist/collection/components/cat-menu-item/cat-menu-item.js +387 -0
  35. package/dist/collection/components/cat-menu-item/cat-menu-item.js.map +1 -0
  36. package/dist/collection/components/cat-pagination/cat-pagination.js +2 -2
  37. package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
  38. package/dist/collection/components/cat-radio/cat-radio.js +2 -2
  39. package/dist/collection/components/cat-radio-group/cat-radio-group.js +1 -1
  40. package/dist/collection/components/cat-scrollable/cat-scrollable.js +3 -3
  41. package/dist/collection/components/cat-select/cat-select.js +14 -18
  42. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  43. package/dist/collection/components/cat-select-demo/cat-select-demo.js +1 -1
  44. package/dist/collection/components/cat-skeleton/cat-skeleton.js +1 -1
  45. package/dist/collection/components/cat-spinner/cat-spinner.js +2 -2
  46. package/dist/collection/components/cat-tab/cat-tab.js +1 -1
  47. package/dist/collection/components/cat-tabs/cat-tabs.js +1 -1
  48. package/dist/collection/components/cat-tag/cat-tag.js +1 -1
  49. package/dist/collection/components/cat-textarea/cat-textarea.js +3 -3
  50. package/dist/collection/components/cat-time/cat-time.css +0 -9
  51. package/dist/collection/components/cat-time/cat-time.js +4 -5
  52. package/dist/collection/components/cat-time/cat-time.js.map +1 -1
  53. package/dist/collection/components/cat-toggle/cat-toggle.js +2 -2
  54. package/dist/collection/index.cdn.js +1 -0
  55. package/dist/collection/index.js.map +1 -1
  56. package/dist/collection/scss/core/_nav.scss +2 -1
  57. package/dist/collection/scss/core/sanitize-overwrite.scss +3 -0
  58. package/dist/collection/scss/index.scss +1 -0
  59. package/dist/components/cat-alert.js +1 -1
  60. package/dist/components/cat-badge.js +1 -1
  61. package/dist/components/cat-button-group.js +1 -1
  62. package/dist/components/cat-button2.js +8 -2
  63. package/dist/components/cat-button2.js.map +1 -1
  64. package/dist/components/cat-card.js +1 -1
  65. package/dist/components/cat-checkbox2.js +2 -2
  66. package/dist/components/cat-date-inline2.js +4 -4
  67. package/dist/components/cat-date.js +2 -2
  68. package/dist/components/cat-datepicker-inline.js +2 -2
  69. package/dist/components/cat-datepicker.js +3 -3
  70. package/dist/components/cat-dropdown2.js +69 -44
  71. package/dist/components/cat-dropdown2.js.map +1 -1
  72. package/dist/components/cat-menu-item.d.ts +11 -0
  73. package/dist/components/cat-menu-item.js +9 -0
  74. package/dist/components/cat-menu-item.js.map +1 -0
  75. package/dist/components/cat-menu-item2.js +111 -0
  76. package/dist/components/cat-menu-item2.js.map +1 -0
  77. package/dist/components/cat-menu.d.ts +11 -0
  78. package/dist/components/cat-menu.js +9 -0
  79. package/dist/components/cat-menu.js.map +1 -0
  80. package/dist/components/cat-menu2.js +227 -0
  81. package/dist/components/cat-menu2.js.map +1 -0
  82. package/dist/components/cat-pagination.js +2 -2
  83. package/dist/components/cat-pagination.js.map +1 -1
  84. package/dist/components/cat-radio-group.js +1 -1
  85. package/dist/components/cat-radio.js +2 -2
  86. package/dist/components/cat-scrollable2.js +3 -3
  87. package/dist/components/cat-select-demo.js +1 -1
  88. package/dist/components/cat-select2.js +5 -5
  89. package/dist/components/cat-select2.js.map +1 -1
  90. package/dist/components/cat-skeleton2.js +1 -1
  91. package/dist/components/cat-spinner2.js +2 -2
  92. package/dist/components/cat-tab.js +1 -1
  93. package/dist/components/cat-tabs.js +1 -1
  94. package/dist/components/cat-tag.js +1 -1
  95. package/dist/components/cat-textarea.js +3 -3
  96. package/dist/components/cat-time.js +25 -14
  97. package/dist/components/cat-time.js.map +1 -1
  98. package/dist/components/cat-toggle.js +2 -2
  99. package/dist/esm/{cat-alert_30.entry.js → cat-alert_32.entry.js} +345 -104
  100. package/dist/esm/catalyst.js +3 -3
  101. package/dist/esm/{index-CFGROHMy.js → index-7uZgmxXB.js} +7 -4
  102. package/dist/esm/index-7uZgmxXB.js.map +1 -0
  103. package/dist/esm/loader.js +3 -3
  104. package/dist/types/components/cat-button/cat-button.d.ts +4 -0
  105. package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +14 -2
  106. package/dist/types/components/cat-menu/cat-menu.d.ts +124 -0
  107. package/dist/types/components/cat-menu-item/cat-menu-item.d.ts +80 -0
  108. package/dist/types/components/cat-select/cat-select.d.ts +3 -2
  109. package/dist/types/components.d.ts +426 -7
  110. package/dist/types/index.d.ts +2 -1
  111. package/package.json +2 -2
  112. package/dist/catalyst/p-0df8aaa1.entry.js +0 -10
  113. package/dist/catalyst/p-0df8aaa1.entry.js.map +0 -1
  114. package/dist/catalyst/p-CFGROHMy.js.map +0 -1
  115. package/dist/cjs/index-B8-TCsLD.js.map +0 -1
  116. package/dist/esm/index-CFGROHMy.js.map +0 -1
@@ -147,7 +147,7 @@ export class CatSelect {
147
147
  if (!oldState.isResolving) {
148
148
  this.valueChangedBySelection = true;
149
149
  this.value = newValue;
150
- this.catChange.emit();
150
+ this.catChange.emit(newValue);
151
151
  }
152
152
  this.showErrorsIfTimeout();
153
153
  }
@@ -352,18 +352,18 @@ export class CatSelect {
352
352
  }
353
353
  render() {
354
354
  this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
355
- return (h(Host, { key: '7489b4123c900ebefa06dcebde32b0a4ee52d4a3' }, h("div", { key: '9669441806e8bebc5f583957cc1a24330f06085a', class: {
355
+ return (h(Host, { key: 'efdb83ec9f52b391d279ece98996723fa558a87a' }, h("div", { key: 'eceeb2c9d577a78e5e0e52b1bde30706c8bb36ea', class: {
356
356
  'select-field': true,
357
357
  'select-horizontal': this.horizontal ?? this.fallbackHorizontal ?? false,
358
358
  'select-multiple': this.multiple
359
- } }, h("div", { key: 'a94a2217157c125e34802b140843d2fffd63283f', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: '557e2754156cb4484972dcccca103451db00a01e', htmlFor: `select-${this.id}-input`, part: "label" }, h("span", { key: '8d229578a218717dbe78a63e416cba36cc300c37', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: 'f1700687e21b73edce905bc8325479bed8c31962', name: "label" })) || this.label, h("div", { key: '109009794bab604eca5d3f690858145ac770ea81', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: '5868ecd309ab485a60439fd6743be56947f9d43e', class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '8e61a17e1d1b9f3fc584c08824b243b5f0c07c0f', class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.required'), ")"))))))), h("div", { key: '9d211cd7674cda6f9bcfeebaf1252055239421ce', class: "select-container" }, h("div", { key: '878137436714dff589d4731ada14d11e443ab4a6', 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) }, h("div", { key: '7a268001a9bc895aa5fd1157a57f89555ad9e868', class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (h("span", { class: {
359
+ } }, h("div", { key: 'a5803daa82570587270e53b640f098f2cdb0a3e5', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: '28cd43343dd2a806f612f5691bc7a1cdf0d6df72', htmlFor: `select-${this.id}-input`, part: "label" }, h("span", { key: '0c80bc9e92fc6090231eb04ff574198da6119639', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: '596fc3bceee736805d4047f879b28464ac12981e', name: "label" })) || this.label, h("div", { key: '02cbb3685b1b4d40566f67b20374309859d134e2', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: 'c14d1a9ca86d4693c095fdf14fea202843ce6dab', class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '44678be1c8667215a4fbaba68510f8f40cd5ef1e', class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.required'), ")"))))))), h("div", { key: 'e899d7810102e93836309d644cf842a366c368a1', class: "select-container" }, h("div", { key: '2c3707ee5070ac8a9d4a40a3eb3325a93a5664b5', 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) }, h("div", { key: 'b35e65763cd13120de56eb8592dc39d459aae199', class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (h("span", { class: {
360
360
  pill: true,
361
361
  'select-no-open': true,
362
362
  'select-option-active': this.state.activeSelectionIndex === i
363
- }, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (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, h("span", null, item.render.label), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: i18n.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 ? (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, h("input", { key: 'dd9c6f767f5cfc9c2e3e0f37dd4bad075f1169c8', "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 && h("cat-spinner", { key: 'c3ed10971f8f29d352df71a5bb577ff3f4499ccd' }), this.invalid && (h("cat-icon", { key: 'c4788a44a097252f58c43769edec339c57ed74e4', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
363
+ }, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (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, h("span", null, item.render.label), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: i18n.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 ? (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, h("input", { key: 'c7eb2d1f582c83ef1f257652f302ba6cf10e8d3c', "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 && h("cat-spinner", { key: 'e3d92ddd13d486940dbc35743be8bd65c841160e' }), this.invalid && (h("cat-icon", { key: '943a586107b4e449cea8006819442e78a8e84c6c', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
364
364
  !this.disabled &&
365
365
  !this.state.isResolving &&
366
- this.clearable ? (h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: i18n.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (h("cat-button", { key: 'a1ae4dfc03feec1a556f818ea08ba8a53b10f132', iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? i18n.t('select.close') : i18n.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 && (h(CatFormHint, { key: '2557e44ce584d96cc8497cee27d8e6e8f6464fd9', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))), h("div", { key: '795de862359d06464591e32d3a410a8974a55028', class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (h("cat-scrollable", { key: 'b88fc1b204533e3714b8533c10b7a817fe2d4ef1', class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, h("ul", { key: 'f0fe6e0c398c7682363174ec6e9f04eaa8e25073', class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isFirstLoading
366
+ this.clearable ? (h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: i18n.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (h("cat-button", { key: '1cb61ffc8c383f964672479d710d7ffaad5c6081', iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? i18n.t('select.close') : i18n.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 && (h(CatFormHint, { key: 'c231a520a632a58aec59ef56ee97f9d7e4ec5f40', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))), h("div", { key: 'd53fc5dd1b2a86a2f69d56e270e660aade45bd98', class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (h("cat-scrollable", { key: '979bffc2506e09806c4f0e6c467efad884254a8c', class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, h("ul", { key: '8b5ceec249c36079ebbebb3fde24aa2bf340f040', class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isFirstLoading
367
367
  ? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (h("li", { class: "select-option-loading" }, h("cat-skeleton", { variant: "body", lines: 1 }), h("cat-skeleton", { variant: "body", lines: 1 }))))
368
368
  : !this.state.options.length &&
369
369
  !this.tags && (h("li", { class: "select-option-empty" }, this.noItems ? this.noItems : i18n.t('select.empty')))))))));
@@ -859,18 +859,13 @@ export class CatSelect {
859
859
  "type": "string",
860
860
  "mutable": true,
861
861
  "complexType": {
862
- "original": "string | string[] | CatSelectTaggingValue | CatSelectMultipleTaggingValue",
862
+ "original": "CatSelectValue",
863
863
  "resolved": "CatSelectMultipleTaggingValue | CatSelectTaggingValue | string | string[] | undefined",
864
864
  "references": {
865
- "CatSelectTaggingValue": {
865
+ "CatSelectValue": {
866
866
  "location": "local",
867
867
  "path": "/home/runner/work/catalyst/catalyst/core/src/components/cat-select/cat-select.tsx",
868
- "id": "src/components/cat-select/cat-select.tsx::CatSelectTaggingValue"
869
- },
870
- "CatSelectMultipleTaggingValue": {
871
- "location": "local",
872
- "path": "/home/runner/work/catalyst/catalyst/core/src/components/cat-select/cat-select.tsx",
873
- "id": "src/components/cat-select/cat-select.tsx::CatSelectMultipleTaggingValue"
868
+ "id": "src/components/cat-select/cat-select.tsx::CatSelectValue"
874
869
  }
875
870
  }
876
871
  },
@@ -1263,12 +1258,13 @@ export class CatSelect {
1263
1258
  "text": "Emitted when the value is changed."
1264
1259
  },
1265
1260
  "complexType": {
1266
- "original": "InputEvent",
1267
- "resolved": "InputEvent",
1261
+ "original": "CatSelectValue",
1262
+ "resolved": "CatSelectMultipleTaggingValue | CatSelectTaggingValue | string | string[]",
1268
1263
  "references": {
1269
- "InputEvent": {
1270
- "location": "global",
1271
- "id": "global::InputEvent"
1264
+ "CatSelectValue": {
1265
+ "location": "local",
1266
+ "path": "/home/runner/work/catalyst/catalyst/core/src/components/cat-select/cat-select.tsx",
1267
+ "id": "src/components/cat-select/cat-select.tsx::CatSelectValue"
1272
1268
  }
1273
1269
  }
1274
1270
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cat-select.js","sourceRoot":"","sources":["../../../src/components/cat-select/cat-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAa,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,MAAM,EACN,KAAK,EAEL,EAAE,EACF,IAAI,EACJ,SAAS,EACT,OAAO,EAEP,SAAS,EACT,SAAS,EACT,GAAG,EACH,KAAK,EACN,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAY,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,+BAA+B,CAAC;AA+DxE,MAAM,UAAU,GAAmB;IACjC,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,KAAK;IAChB,cAAc,EAAE,IAAI;IACpB,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,EAAE;IACb,aAAa,EAAE,EAAE;IACjB,iBAAiB,EAAE,CAAC,CAAC;IACrB,oBAAoB,EAAE,CAAC,CAAC;CACzB,CAAC;AAEF,IAAI,YAAY,GAAG,CAAC,CAAC;AACrB,IAAI,eAAe,GAAG,CAAC,CAAC;AAExB;;;;;;;;;GASG;AAQH,MAAM,OAAO,SAAS;IAPtB;QAUmB,QAAG,GAAG,aAAa,YAAY,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjmCuB,wBAAc,GAAG,CAAC,AAAJ,CAAK;AACnB,yBAAe,GAAG,CAAC,AAAJ,CAAK","sourcesContent":["import { autoUpdate, computePosition, flip, offset, Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport autosizeInput from 'autosize-input';\nimport {\n catchError,\n debounce,\n distinctUntilChanged,\n filter,\n first,\n Observable,\n of,\n scan,\n startWith,\n Subject,\n Subscription,\n switchMap,\n takeWhile,\n tap,\n timer\n} from 'rxjs';\nimport { coerceBoolean, coerceNumber } from '../../utils/coerce';\nimport { CatFormHint, ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nexport interface Item {\n id: string;\n}\n\nexport interface Page<T> {\n content: T[];\n last: boolean;\n totalElements?: number;\n}\n\nexport interface RenderInfo {\n label: string;\n description?: string;\n avatar?: {\n src?: string;\n round?: boolean;\n initials?: string;\n icon?: string;\n };\n}\n\n/**\n * @property customId - Change the ID of item for the given one.\n * @property resolve - Resolves the value of the select.\n * @property retrieve - Retrieves the options of the select.\n * @property render - Renders the items of the select.\n * @property renderOptions$ - Observable that triggers re-rendering of options when emitted (doesn't support tags).\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface CatSelectConnector<T extends Item = any> {\n customId?: (item: T) => string;\n resolve: (ids: string[]) => Observable<T[]>;\n retrieve: (term: string, page: number) => Observable<Page<T>>;\n render: (item: T) => RenderInfo;\n renderOptions$?: Observable<void>;\n}\n\nexport interface CatSelectState {\n term: string;\n isOpen: boolean;\n isLoading: boolean;\n isFirstLoading: boolean;\n isResolving: boolean;\n options: { item: Item; render: RenderInfo }[];\n tempSelection: { item: Item; render: RenderInfo }[];\n selection: { item: Item; render: RenderInfo }[];\n activeOptionIndex: number;\n activeSelectionIndex: number;\n totalElements?: number;\n}\n\nexport interface CatSelectMultipleTaggingValue {\n ids: string[];\n tags: string[];\n}\n\nexport interface CatSelectTaggingValue {\n id: string;\n tag: string;\n}\n\nconst INIT_STATE: CatSelectState = {\n term: '',\n isOpen: false,\n isLoading: false,\n isFirstLoading: true,\n isResolving: false,\n options: [],\n selection: [],\n tempSelection: [],\n activeOptionIndex: -1,\n activeSelectionIndex: -1\n};\n\nlet nextUniqueId = 0;\nlet nextTagUniqueId = 0;\n\n/**\n * Select lets user choose one option from an options' menu.\n * Consider using select when you have 6 or more options. Select component supports any content type.\n *\n * @slot hint - Optional hint element to be displayed with the select.\n * @slot label - The slotted label. If both the label property and the label slot are present,\n * only the label slot will be displayed.\n * @part label - The native label element.\n * @part input - The native input element.\n */\n@Component({\n tag: 'cat-select',\n styleUrl: 'cat-select.scss',\n shadow: {\n delegatesFocus: true\n }\n})\nexport class CatSelect {\n private static readonly SKELETON_COUNT = 4;\n private static readonly DROPDOWN_OFFSET = 4;\n private readonly _id = `cat-input-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private dropdown?: HTMLElement;\n private trigger?: HTMLElement;\n private input?: HTMLInputElement;\n private errorMapSrc?: ErrorMap | true;\n\n private subscription?: Subscription;\n private renderSubscription?: Subscription;\n private term$: Subject<string> = new Subject();\n private more$: Subject<void> = new Subject();\n private valueChangedBySelection = false;\n private cleanupFloatingUi?: () => void;\n\n @Element() hostElement!: HTMLElement;\n\n @State() connector?: CatSelectConnector;\n\n @State() state: CatSelectState = INIT_STATE;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n @State() errorMap?: ErrorMap | true;\n\n /**\n * Whether the label need a marker to shown if the select is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal?: boolean;\n\n /**\n * If the horizontal value is not provided, this fallback value is used. Can be set by form-group.\n * @internal\n */\n @Prop() fallbackHorizontal?: boolean;\n\n /**\n * Enable multiple selection.\n */\n @Prop() multiple = false;\n\n /**\n * The debounce time for the search.\n */\n @Prop() debounce = 250;\n\n /**\n * The placement of the select.\n */\n @Prop() placement: Placement = 'bottom-start';\n\n /**\n * The value of the select. <br />\n * <br />\n * The value of the select depends on whether it is allowed to choose a single item or several items. <br />\n * When only one item can be selected, the value is the id of the item, in case several items can be selected, the value is an array of ids of the selected items. <br />\n * <br />\n * In case the user can add new items to the select (tags activated), the value in the single select is an object (CatSelectTaggingValue) with the id of the item or the name of the created item,\n * in the case of multiple select, it is an object (CatSelectMultipleTaggingValue) with the array of the ids of the items selected and the array of the names of the items created\n */\n @Prop({ mutable: true }) value?: string | string[] | CatSelectTaggingValue | CatSelectMultipleTaggingValue;\n\n /**\n * Whether the select is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The placeholder text to display within the select.\n */\n @Prop() placeholder?: string;\n\n /**\n * Optional hint text(s) to be displayed with the select.\n */\n @Prop() hint?: string | string[];\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the select.\n */\n @Prop() label = '';\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A value is required or must be checked for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Whether the select should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the select should add new items.\n */\n @Prop() tags = false;\n\n /**\n * Optional hint text to be displayed on the new item to be added.\n */\n @Prop() tagHint?: string;\n\n /**\n * The text to display in the dropdown if no results are found.\n */\n @Prop() noItems?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors change with the given delay in milliseconds or immediately on blur.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * A unique identifier for the underlying native element that is used for\n * testing purposes. The attribute is added as `data-test` attribute and acts\n * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`.\n */\n @Prop() testId?: string;\n\n @Watch('connector')\n onConnectorChanged(connector: CatSelectConnector) {\n this.reset(connector);\n this.resolve();\n }\n\n @Watch('value')\n onValueChanged() {\n !this.valueChangedBySelection ? this.resolve() : (this.valueChangedBySelection = false);\n }\n\n @Watch('errors')\n onErrorsChanged(newValue?: boolean | string[] | ErrorMap, _oldValue?: unknown, update: boolean = true) {\n if (!coerceBoolean(this.errorUpdate)) {\n this.errorMap = undefined;\n } else {\n this.errorMapSrc = Array.isArray(newValue)\n ? (newValue as string[]).reduce((acc, err) => ({ ...acc, [err]: undefined }), {})\n : newValue || undefined;\n if (update) {\n this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();\n }\n }\n }\n\n @Watch('state')\n onStateChanged(newState: CatSelectState, oldState: CatSelectState) {\n const changed = (key: keyof CatSelectState) => newState[key] !== oldState[key];\n if (changed('isOpen')) {\n this.update();\n }\n if (changed('activeOptionIndex') && this.state.activeOptionIndex >= 0) {\n this.dropdown\n ?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)\n ?.scrollIntoView({ block: 'nearest' });\n }\n\n if (changed('selection')) {\n let newValue;\n if (!this.multiple && this.state.selection.length) {\n this.hide();\n }\n const idsSelected = this.state.selection.map(item => item.item.id);\n if (!this.tags) {\n if (this.multiple) {\n newValue = idsSelected;\n } else {\n newValue = idsSelected.length ? idsSelected[0] : '';\n }\n } else {\n const ids = idsSelected.filter(id => !id.startsWith(`select-${this.id}-tag`));\n const tags = this.state.selection\n .filter(item => item.item.id.startsWith(`select-${this.id}-tag`))\n .map(item => item.render.label);\n if (this.multiple) {\n newValue = { ids, tags };\n } else {\n newValue = { id: ids.length ? ids[0] : '', tag: tags.length ? tags[0] : '' };\n }\n }\n\n if (!oldState.isResolving) {\n this.valueChangedBySelection = true;\n this.value = newValue;\n this.catChange.emit();\n }\n this.showErrorsIfTimeout();\n }\n }\n\n /**\n * Emitted when the select dropdown is opened.\n */\n @Event() catOpen!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the select dropdown is closed.\n */\n @Event() catClose!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter<InputEvent>;\n\n /**\n * Emitted when the select loses the focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n componentDidLoad(): void {\n if (this.input) {\n autosizeInput(this.input, { minWidth: true });\n }\n }\n\n componentWillLoad(): void {\n this.onErrorsChanged(this.errors, undefined, false);\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n @Listen('blur')\n onBlur(event: FocusEvent): void {\n if (!this.multiple && this.state.activeOptionIndex >= 0) {\n if (this.tags && this.state.options[this.state.activeOptionIndex].item.id === `select-${this.id}-option-tag`) {\n this.createTag(this.state.term);\n } else {\n this.select(this.state.options[this.state.activeOptionIndex]);\n }\n }\n this.hide();\n // Conditionally remove selection if the option was not manually selected through click or enter key press\n if (!this.multiple && (!this.tags || !this.state.selection?.length)) {\n if (this.state.tempSelection?.length) {\n this.patchState({\n activeSelectionIndex: -1,\n selection: this.state.tempSelection,\n tempSelection: [],\n options: [],\n term: this.state.tempSelection[0].render.label\n });\n } else if (!this.state.selection?.length) {\n this.patchState({\n activeSelectionIndex: -1,\n selection: [],\n tempSelection: [],\n options: [],\n term: ''\n });\n }\n } else {\n this.patchState({ activeSelectionIndex: -1 });\n }\n\n this.catBlur.emit(event);\n if (coerceBoolean(this.errorUpdate)) {\n this.showErrors();\n }\n }\n\n @Listen('keydown')\n onKeyDown(event: KeyboardEvent): void {\n const isInputFocused = this.hostElement.shadowRoot?.activeElement === this.input;\n\n if (['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {\n this.onArrowKeyDown(event);\n } else if (['Enter', ' '].includes(event.key) && isInputFocused) {\n if (\n this.tags &&\n this.state.activeOptionIndex === 0 &&\n this.state.options[0].item.id === `select-${this.id}-option-tag`\n ) {\n event.preventDefault();\n if (this.multiple) {\n this.toggleTag(this.state.options[0]);\n } else {\n this.createTag(this.state.options[0].render.label);\n }\n } else if (this.state.activeOptionIndex >= 0) {\n event.preventDefault();\n if (this.multiple) {\n this.toggle(this.state.options[this.state.activeOptionIndex]);\n } else {\n this.select(this.state.options[this.state.activeOptionIndex]);\n }\n } else if (this.tags && event.key === 'Enter' && this.state.activeOptionIndex < 0) {\n this.createTag(this.state.term);\n }\n } else if (event.key === 'Escape') {\n if (this.hide()) {\n event.stopPropagation();\n }\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n this.input?.focus();\n if (!this.multiple || !this.state.term || (this.input?.selectionStart === 0 && event.key === 'Backspace')) {\n if (this.state.activeSelectionIndex >= 0) {\n this.deselect(this.state.selection[this.state.activeSelectionIndex].item.id);\n } else if (this.state.selection.length) {\n const selectionClone = [...this.state.selection];\n selectionClone.pop();\n this.patchState({\n selection: selectionClone,\n tempSelection: this.state.term ? [...this.state.selection] : []\n });\n }\n }\n } else if (event.key === 'Tab') {\n this.trigger?.setAttribute('tabindex', '-1');\n if (this.multiple) {\n this.patchState({ activeSelectionIndex: -1, activeOptionIndex: -1 });\n } else if (this.state.activeOptionIndex >= 0) {\n if (this.tags && this.state.options[this.state.activeOptionIndex].item.id === `select-${this.id}-option-tag`) {\n this.createTag(this.state.term);\n } else {\n this.select(this.state.options[this.state.activeOptionIndex]);\n }\n }\n } else if (event.key.length === 1) {\n this.input?.focus();\n }\n }\n\n @Listen('keyup')\n onKeyUp(event: KeyboardEvent): void {\n if (event.key === 'Tab' && !event.shiftKey) {\n this.hostElement.shadowRoot?.activeElement === this.trigger && this.input?.focus();\n if (this.hostElement.shadowRoot?.activeElement === this.input) {\n this.show();\n }\n } else if (event.key === 'Tab' && event.shiftKey) {\n const clearButton = this.trigger?.querySelector(`#select-clear-btn-${this.id}`);\n\n if (clearButton) {\n this.hostElement.shadowRoot?.activeElement === clearButton && this.show();\n } else {\n this.show();\n }\n }\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise<void> {\n this.input?.focus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise<void> {\n this.input?.blur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise<void> {\n this.clearInput();\n }\n\n /**\n * Connect the functions of the select\n *\n * @param connector - The {@link CatSelectConnector} of the select.\n */\n @Method()\n async connect(connector: CatSelectConnector): Promise<void> {\n this.connector = connector;\n let number$: Observable<number>;\n this.subscription?.unsubscribe();\n this.subscription = this.term$\n .asObservable()\n .pipe(\n debounce(term => (term ? timer(this.debounce) : of(0))),\n distinctUntilChanged(),\n tap(\n () =>\n (number$ = this.more$.pipe(\n filter(() => !this.state.isLoading),\n scan(n => n + 1, 0),\n startWith(0)\n ))\n ),\n switchMap(term =>\n number$.pipe(\n tap(() => this.patchState({ isLoading: true })),\n switchMap(number => connector.retrieve(term, number)),\n tap(page =>\n this.patchState({ isLoading: false, totalElements: page.totalElements, isFirstLoading: false })\n ),\n takeWhile(page => !page.last, true),\n scan((items, page) => [...items, ...page.content], [] as Item[])\n )\n )\n )\n .subscribe(items => {\n const options = this.toSelectItems(connector, items);\n\n if (\n this.tags &&\n this.state.term.trim().length &&\n !options.find(value1 => value1.render.label.toLowerCase() === this.state.term.toLowerCase())\n ) {\n let label;\n if (this.isTagSelected(this.state.term)) {\n label = this.state.selection.find(item => item.render.label.toLowerCase() === this.state.term.toLowerCase())\n ?.render.label;\n }\n options.unshift({\n item: { id: `select-${this.id}-option-tag` },\n render: { label: label ? label : this.state.term }\n });\n }\n this.patchState({\n options\n });\n });\n\n this.renderSubscription?.unsubscribe();\n if (connector.renderOptions$) {\n this.renderSubscription = connector.renderOptions$.subscribe(() => {\n this.rerenderOptions();\n });\n }\n }\n\n render() {\n this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;\n return (\n <Host>\n <div\n class={{\n 'select-field': true,\n 'select-horizontal': this.horizontal ?? this.fallbackHorizontal ?? false,\n 'select-multiple': this.multiple\n }}\n >\n <div class={{ 'label-container': true, hidden: this.labelHidden }}>\n {(this.hasSlottedLabel || this.label) && (\n <label htmlFor={`select-${this.id}-input`} part=\"label\">\n <span class=\"label-wrapper\">\n {(this.hasSlottedLabel && <slot name=\"label\"></slot>) || this.label}\n <div class=\"label-metadata\">\n {!this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (\n <span class=\"label-optional\" aria-hidden=\"true\">\n ({i18n.t('input.optional')})\n </span>\n )}\n {this.required && this.requiredMarker?.startsWith('required') && (\n <span class=\"label-optional\" aria-hidden=\"true\">\n ({i18n.t('input.required')})\n </span>\n )}\n </div>\n </span>\n </label>\n )}\n </div>\n\n <div class=\"select-container\">\n <div\n class={{ 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }}\n ref={el => (this.trigger = el)}\n id={this.id}\n role=\"combobox\"\n aria-expanded={this.state.isOpen || this.isPillboxActive()}\n aria-controls={this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`}\n aria-required={this.required ? 'true' : false}\n aria-activedescendant={this.activeDescendant}\n onClick={e => this.onClick(e)}\n >\n <div class=\"select-wrapper-inner\">\n {this.multiple && this.state.selection.length ? (\n <div\n id={`select-pillbox-${this.id}`}\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n class=\"select-pills\"\n >\n {this.state.selection.map((item, i) => (\n <span\n class={{\n pill: true,\n 'select-no-open': true,\n 'select-option-active': this.state.activeSelectionIndex === i\n }}\n role=\"option\"\n aria-selected=\"true\"\n id={`select-${this.id}-selection-${i}`}\n >\n {item.render.avatar ? (\n <cat-avatar\n label={item.render.label}\n round={item.render.avatar.round}\n src={item.render.avatar.src}\n icon={item.render.avatar.icon}\n initials={item.render.avatar.initials ?? ''}\n ></cat-avatar>\n ) : null}\n <span>{item.render.label}</span>\n {!this.disabled && (\n <cat-button\n size=\"xs\"\n variant=\"text\"\n icon=\"$cat:select-clear\"\n iconOnly\n a11yLabel={i18n.t('select.deselect')}\n onClick={() => this.deselect(item.item.id)}\n tabIndex={-1}\n data-dropdown-no-close\n ></cat-button>\n )}\n </span>\n ))}\n </div>\n ) : this.state.selection.length && this.state.selection[0].render.avatar ? (\n <cat-avatar\n label={this.state.selection[0].render.label}\n round={this.state.selection[0].render.avatar.round}\n src={this.state.selection[0].render.avatar.src}\n icon={this.state.selection[0].render.avatar.icon}\n initials={this.state.selection[0].render.avatar.initials ?? ''}\n ></cat-avatar>\n ) : null}\n <input\n data-test={this.testId}\n {...this.nativeAttributes}\n part=\"input\"\n id={`select-${this.id}-input`}\n class=\"select-input\"\n role=\"combobox\"\n ref={el => (this.input = el)}\n aria-controls={this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`}\n aria-activedescendant={this.activeDescendant}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n aria-autocomplete=\"list\"\n onInput={this.onInput.bind(this)}\n value={!this.multiple ? this.state.term : undefined}\n placeholder={this.placeholder}\n disabled={this.disabled || this.state.isResolving}\n ></input>\n </div>\n {this.state.isResolving && <cat-spinner></cat-spinner>}\n {this.invalid && (\n <cat-icon icon=\"$cat:input-error\" class=\"icon-suffix cat-text-danger\" size=\"l\"></cat-icon>\n )}\n {(this.state.selection.length || this.state.term.length) &&\n !this.disabled &&\n !this.state.isResolving &&\n this.clearable ? (\n <cat-button\n id={`select-clear-btn-${this.id}`}\n iconOnly\n icon=\"$cat:input-close\"\n variant=\"text\"\n size=\"s\"\n a11yLabel={i18n.t('input.clear')}\n onCatClick={() => this.clearInput()}\n data-dropdown-no-close\n ></cat-button>\n ) : null}\n {!this.state.isResolving && (\n <cat-button\n iconOnly\n icon=\"$cat:select-open\"\n class={{ 'select-btn': true, 'select-btn-open': this.state.isOpen }}\n variant=\"text\"\n size=\"s\"\n a11yLabel={this.state.isOpen ? i18n.t('select.close') : i18n.t('select.open')}\n aria-controls={`select-listbox-${this.id}`}\n aria-expanded={this.state.isOpen}\n tabIndex={-1}\n disabled={this.disabled || this.state.isResolving}\n data-dropdown-no-close\n ></cat-button>\n )}\n </div>\n {this.hasHint && (\n <CatFormHint\n id={this.id}\n hint={this.hint}\n slottedHint={this.hasSlottedHint && <slot name=\"hint\"></slot>}\n errorMap={this.errorMap}\n />\n )}\n </div>\n </div>\n\n <div\n class=\"select-dropdown\"\n ref={el => (this.dropdown = el)}\n style={{ display: this.state.isOpen ? 'block' : undefined }}\n >\n {this.state.isOpen && (\n <cat-scrollable\n class=\"select-options-wrapper\"\n scrolledBuffer={56}\n noOverflowX\n noOverscroll\n noScrolledInit\n onScrolledBottom={() => this.more$.next()}\n >\n <ul\n class=\"select-options\"\n role=\"listbox\"\n aria-multiselectable={this.multiple}\n aria-setsize={this.state.totalElements}\n id={`select-listbox-${this.id}`}\n >\n {this.optionsList}\n {this.state.isFirstLoading\n ? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (\n <li class=\"select-option-loading\">\n <cat-skeleton variant=\"body\" lines={1}></cat-skeleton>\n <cat-skeleton variant=\"body\" lines={1}></cat-skeleton>\n </li>\n ))\n : !this.state.options.length &&\n !this.tags && (\n <li class=\"select-option-empty\">{this.noItems ? this.noItems : i18n.t('select.empty')}</li>\n )}\n </ul>\n </cat-scrollable>\n )}\n </div>\n </Host>\n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint || this.invalid;\n }\n\n private get invalid() {\n return this.errorMap === true || !!Object.keys(this.errorMap || {}).length;\n }\n\n private get optionsList() {\n return this.state.options.map((item, i) => {\n const isTagOption = this.tags && item.item.id === `select-${this.id}-option-tag`;\n\n const isOptionSelected = this.isSelected(item.item.id) || (this.tags && this.isTagSelected(item.render.label));\n\n const getLabel = () => {\n if (isTagOption) {\n return item.render.label + this.tagTextHelp;\n }\n return item.render.label;\n };\n\n return (\n <li\n role=\"option\"\n class=\"select-option\"\n id={`select-${this.id}-option-${i}`}\n aria-selected={isOptionSelected ? 'true' : 'false'}\n >\n {this.multiple ? (\n <cat-checkbox\n class={{ 'select-option-active': this.state.activeOptionIndex === i }}\n checked={isOptionSelected}\n tabIndex={-1}\n labelLeft\n onFocus={() => this.input?.focus()}\n onCatChange={e => {\n !isTagOption ? this.toggle(item) : this.toggleTag(item);\n e.stopPropagation();\n }}\n >\n <span slot=\"label\" class=\"select-option-inner\">\n {item.render.avatar ? (\n <cat-avatar\n label={item.render.label}\n round={item.render.avatar.round}\n src={item.render.avatar.src}\n icon={item.render.avatar.icon}\n initials={item.render.avatar.initials ?? ''}\n ></cat-avatar>\n ) : null}\n <span class=\"select-option-text\" part=\"option\">\n <span class=\"select-option-label\">{getLabel()}</span>\n <span class=\"select-option-description\">{item.render.description}</span>\n </span>\n </span>\n </cat-checkbox>\n ) : (\n <div\n class={{\n 'select-option-inner': true,\n 'select-option-single': true,\n 'select-option-active': this.state.activeOptionIndex === i\n }}\n onFocus={() => this.input?.focus()}\n onClick={() => (isTagOption ? this.createTag(item.render.label) : this.select(item))}\n tabIndex={-1}\n >\n {item.render.avatar ? (\n <cat-avatar\n label={item.render.label}\n round={item.render.avatar.round}\n src={item.render.avatar.src}\n icon={item.render.avatar.icon}\n initials={item.render.avatar.initials ?? ''}\n ></cat-avatar>\n ) : null}\n <span class=\"select-option-text\">\n <span class=\"select-option-label\">{getLabel()}</span>\n <span class=\"select-option-description\">{item.render.description}</span>\n </span>\n </div>\n )}\n </li>\n );\n });\n }\n\n private resolve() {\n const connector = this.connector;\n if (!connector) {\n return;\n }\n this.patchState({ isResolving: true });\n\n const ids = this.initIds();\n let tags: string[];\n\n if (this.tags) {\n tags = this.initTags();\n }\n\n const data$ = ids.length ? connector.resolve(ids).pipe(first()) : of([]);\n data$.pipe(catchError(() => of([]))).subscribe(items => {\n const selection = this.toSelectItems(connector, items);\n if (this.tags) {\n tags\n .filter(tag => !this.isTagSelected(tag, selection))\n .forEach((tag, index) => {\n const item = { id: `select-${this.id}-tag-${index}`, name: tag };\n selection.push({ item, render: { label: item.name } });\n });\n }\n const term = !this.multiple && selection.length ? selection[0].render.label : '';\n this.patchState({ isResolving: false, selection, term, activeOptionIndex: -1 });\n this.term$.next(term);\n this.input && (this.input.value = term);\n });\n }\n\n private toSelectItems(connector: CatSelectConnector, items: Item[]) {\n return items.map(item => ({\n item: { ...item, id: connector.customId ? connector.customId(item) : item.id },\n render: connector.render(item)\n }));\n }\n\n private show() {\n if (!this.state.isOpen && this.connector) {\n if (this.trigger && this.dropdown) {\n this.cleanupFloatingUi = autoUpdate(this.trigger, this.dropdown, () => this.update());\n }\n // reconnect to reset the connection, i.e. the pagination\n this.connect(this.connector);\n this.patchState({ isOpen: true, isFirstLoading: true, options: [] });\n this.catOpen.emit();\n this.term$.next('');\n this.input?.classList.remove('select-input-transparent-caret');\n }\n }\n\n private hide() {\n if (this.state.isOpen) {\n this.patchState({ isOpen: false, activeOptionIndex: -1 });\n this.cleanupFloatingUi?.();\n this.cleanupFloatingUi = undefined;\n this.catClose.emit();\n return true;\n }\n return false;\n }\n\n private search(term: string) {\n this.patchState({ term, activeOptionIndex: -1, activeSelectionIndex: -1 });\n this.term$.next(term);\n }\n\n private isSelected(id: string) {\n return this.state.selection.findIndex(s => s.item.id === id) >= 0;\n }\n\n private select(item: { item: Item; render: RenderInfo }) {\n if (!this.isSelected(item.item.id)) {\n let newSelection;\n if (this.multiple) {\n newSelection = [...this.state.selection, item];\n } else {\n newSelection = [item];\n this.patchState({ term: item.render.label, activeOptionIndex: -1, activeSelectionIndex: -1 });\n }\n this.patchState({ selection: newSelection, tempSelection: [] });\n\n if (this.multiple && this.state.term.trim() && this.input) {\n this.patchState({ term: '', activeOptionIndex: -1 });\n this.term$.next('');\n this.input.value = '';\n }\n }\n this.setTransparentCaret();\n }\n\n private deselect(id: string) {\n if (this.isSelected(id)) {\n this.patchState({\n selection: this.state.selection.filter(item => item.item.id !== id),\n activeSelectionIndex: -1\n });\n }\n }\n\n private rerenderOptions() {\n const optionItems = this.state.options.map(o => o.item);\n const updatedOptions = this.toSelectItems(this.connector!, optionItems);\n\n this.patchState({ options: updatedOptions });\n }\n\n private toggle(item: { item: Item; render: RenderInfo }) {\n this.isSelected(item.item.id)\n ? this.deselect(item.item.id)\n : this.tags && this.isTagSelected(item.render.label)\n ? this.removeTag(item.render.label)\n : this.select(item);\n }\n\n private clearInput() {\n if (this.input && this.state.term) {\n this.patchState({ selection: [], term: '', activeOptionIndex: -1, tempSelection: [] });\n this.term$.next('');\n this.input.value = '';\n } else {\n this.patchState({ selection: [], tempSelection: [] });\n }\n }\n\n private reset(connector?: CatSelectConnector) {\n this.connector = connector ?? this.connector;\n this.subscription?.unsubscribe();\n this.subscription = undefined;\n this.renderSubscription?.unsubscribe();\n this.renderSubscription = undefined;\n this.state = INIT_STATE;\n }\n\n private onClick(event: MouseEvent) {\n if (this.disabled) {\n return;\n }\n const elem = event.target as Element;\n this.trigger?.setAttribute('tabindex', '0');\n this.input?.focus();\n if (\n elem === this.trigger ||\n elem === this.input ||\n elem.classList.contains('select-btn') ||\n elem.nodeName === 'SPAN'\n ) {\n this.state.isOpen ? this.hide() : this.show();\n }\n }\n\n private onInput() {\n this.search(this.input?.value.trim() || '');\n if (!this.multiple) {\n if (this.state.selection.length) {\n const selectionClone = [...this.state.selection];\n selectionClone.pop();\n this.patchState({ selection: selectionClone, tempSelection: [...this.state.selection] });\n }\n if (!this.required && !this.input?.value.trim()) {\n this.patchState({ tempSelection: [] });\n }\n }\n this.show();\n }\n\n private update() {\n if (this.trigger && this.dropdown) {\n computePosition(this.trigger, this.dropdown, {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [offset(CatSelect.DROPDOWN_OFFSET), flip()]\n }).then(({ x, y, placement }) => {\n if (this.dropdown) {\n this.dropdown.dataset.placement = placement;\n Object.assign(this.dropdown.style, {\n width: `${this.trigger?.clientWidth}px`,\n left: `${x}px`,\n top: `${y}px`\n });\n }\n });\n }\n }\n\n private patchState(update: Partial<CatSelectState>) {\n this.state = { ...this.state, ...update };\n }\n\n private isPillboxActive() {\n return this.state.activeSelectionIndex >= 0;\n }\n\n private get activeDescendant() {\n let activeDescendant = undefined;\n if (this.state.activeOptionIndex >= 0) {\n activeDescendant = `select-${this.id}-option-${this.state.activeOptionIndex}`;\n } else if (this.state.activeSelectionIndex >= 0) {\n activeDescendant = `select-${this.id}-selection-${this.state.activeSelectionIndex}`;\n }\n return activeDescendant;\n }\n\n private onArrowKeyDown(event: KeyboardEvent) {\n let preventDefault = false;\n this.input?.focus();\n\n switch (event.key) {\n case 'ArrowDown':\n preventDefault = true;\n this.state.isOpen\n ? this.patchState({\n activeOptionIndex: Math.min(this.state.activeOptionIndex + 1, this.state.options.length - 1),\n activeSelectionIndex: -1\n })\n : this.show();\n break;\n case 'ArrowUp':\n preventDefault = true;\n this.state.activeOptionIndex >= 0\n ? this.patchState({\n activeOptionIndex: Math.max(this.state.activeOptionIndex - 1, -1),\n activeSelectionIndex: -1\n })\n : this.hide();\n break;\n case 'ArrowLeft':\n if (this.input?.selectionStart === 0) {\n preventDefault = true;\n let index;\n this.state.activeSelectionIndex > 0\n ? (index = Math.max(this.state.activeSelectionIndex - 1, -1))\n : (index = this.state.selection.length - 1);\n this.patchState({ activeSelectionIndex: index, activeOptionIndex: -1 });\n }\n break;\n case 'ArrowRight':\n if (this.state.activeSelectionIndex >= 0) {\n preventDefault = true;\n let index = -1;\n if (this.state.activeSelectionIndex < this.state.selection.length - 1) {\n index = Math.min(this.state.activeSelectionIndex + 1, this.state.selection.length - 1);\n } else if (!this.state.term) {\n index = 0;\n }\n this.patchState({ activeSelectionIndex: index, activeOptionIndex: -1 });\n }\n }\n\n if (preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n private get tagTextHelp() {\n return this.tagHint && !this.isTagSelected(this.state.term) ? ' (' + this.tagHint + ')' : '';\n }\n\n private isTagSelected(term: string, selection: { item: Item; render: RenderInfo }[] = this.state.selection) {\n return selection.findIndex(item => item.render.label.toLowerCase() === term.toLowerCase()) >= 0;\n }\n\n private createTag(term: string) {\n if (term.trim().length && !this.isTagSelected(term)) {\n const value = this.value as CatSelectMultipleTaggingValue;\n const tags = value?.tags;\n const tag = { id: `select-${this.id}-tag-${tags?.length ? tags?.length + nextTagUniqueId++ : 0}`, name: term };\n this.select({ item: tag, render: { label: tag.name } });\n }\n this.setTransparentCaret();\n }\n\n private removeTag(label: string) {\n if (this.isTagSelected(label)) {\n const item = this.state.selection.find(item => item.render.label.toLowerCase() === label.toLowerCase());\n item && this.deselect(item.item.id);\n }\n }\n\n private toggleTag(item: { item: Item; render: RenderInfo }) {\n this.isTagSelected(item.render.label) ? this.removeTag(item.render.label) : this.createTag(item.render.label);\n }\n\n private initIds() {\n let ids: string[] = [];\n if (this.value) {\n if (!this.tags) {\n if (this.multiple) {\n ids = this.value as string[];\n } else {\n ids = [this.value as string];\n }\n } else {\n if (this.multiple) {\n const value = this.value as CatSelectMultipleTaggingValue;\n ids = value.ids ? value.ids : [];\n } else {\n const value = this.value as CatSelectTaggingValue;\n ids = value.id ? [value.id] : [];\n }\n }\n }\n return ids;\n }\n\n private initTags() {\n let tags: string[] = [];\n if (this.value) {\n if (this.multiple) {\n const value = this.value as CatSelectMultipleTaggingValue;\n tags = value.tags ? value.tags : [];\n } else {\n const value = this.value as CatSelectTaggingValue;\n tags = value.tag ? [value.tag] : [];\n }\n }\n return tags;\n }\n\n private setTransparentCaret() {\n if (!this.multiple) {\n this.hide();\n this.input?.classList.add('select-input-transparent-caret');\n }\n }\n\n private showErrors() {\n this.errorMap = this.errorMapSrc;\n }\n\n private errorUpdateTimeoutId?: number;\n private showErrorsIfTimeout() {\n const errorUpdate = coerceNumber(this.errorUpdate, null);\n if (errorUpdate !== null) {\n typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);\n this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);\n return true;\n }\n return false;\n }\n\n private showErrorsIfNoFocus() {\n const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.input;\n if (!hasFocus) {\n this.showErrors();\n }\n }\n}\n"]}
1
+ {"version":3,"file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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjmCuB,wBAAc,GAAG,CAAC,AAAJ,CAAK;AACnB,yBAAe,GAAG,CAAC,AAAJ,CAAK","sourcesContent":["import { autoUpdate, computePosition, flip, offset, Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport autosizeInput from 'autosize-input';\nimport {\n catchError,\n debounce,\n distinctUntilChanged,\n filter,\n first,\n Observable,\n of,\n scan,\n startWith,\n Subject,\n Subscription,\n switchMap,\n takeWhile,\n tap,\n timer\n} from 'rxjs';\nimport { coerceBoolean, coerceNumber } from '../../utils/coerce';\nimport { CatFormHint, ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nexport interface Item {\n id: string;\n}\n\nexport interface Page<T> {\n content: T[];\n last: boolean;\n totalElements?: number;\n}\n\nexport interface RenderInfo {\n label: string;\n description?: string;\n avatar?: {\n src?: string;\n round?: boolean;\n initials?: string;\n icon?: string;\n };\n}\n\n/**\n * @property customId - Change the ID of item for the given one.\n * @property resolve - Resolves the value of the select.\n * @property retrieve - Retrieves the options of the select.\n * @property render - Renders the items of the select.\n * @property renderOptions$ - Observable that triggers re-rendering of options when emitted (doesn't support tags).\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface CatSelectConnector<T extends Item = any> {\n customId?: (item: T) => string;\n resolve: (ids: string[]) => Observable<T[]>;\n retrieve: (term: string, page: number) => Observable<Page<T>>;\n render: (item: T) => RenderInfo;\n renderOptions$?: Observable<void>;\n}\n\nexport interface CatSelectState {\n term: string;\n isOpen: boolean;\n isLoading: boolean;\n isFirstLoading: boolean;\n isResolving: boolean;\n options: { item: Item; render: RenderInfo }[];\n tempSelection: { item: Item; render: RenderInfo }[];\n selection: { item: Item; render: RenderInfo }[];\n activeOptionIndex: number;\n activeSelectionIndex: number;\n totalElements?: number;\n}\n\nexport interface CatSelectMultipleTaggingValue {\n ids: string[];\n tags: string[];\n}\n\nexport interface CatSelectTaggingValue {\n id: string;\n tag: string;\n}\n\nconst INIT_STATE: CatSelectState = {\n term: '',\n isOpen: false,\n isLoading: false,\n isFirstLoading: true,\n isResolving: false,\n options: [],\n selection: [],\n tempSelection: [],\n activeOptionIndex: -1,\n activeSelectionIndex: -1\n};\n\nlet nextUniqueId = 0;\nlet nextTagUniqueId = 0;\n\nexport type CatSelectValue = string | string[] | CatSelectTaggingValue | CatSelectMultipleTaggingValue;\n\n/**\n * Select lets user choose one option from an options' menu.\n * Consider using select when you have 6 or more options. Select component supports any content type.\n *\n * @slot hint - Optional hint element to be displayed with the select.\n * @slot label - The slotted label. If both the label property and the label slot are present,\n * only the label slot will be displayed.\n * @part label - The native label element.\n * @part input - The native input element.\n */\n@Component({\n tag: 'cat-select',\n styleUrl: 'cat-select.scss',\n shadow: {\n delegatesFocus: true\n }\n})\nexport class CatSelect {\n private static readonly SKELETON_COUNT = 4;\n private static readonly DROPDOWN_OFFSET = 4;\n private readonly _id = `cat-input-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private dropdown?: HTMLElement;\n private trigger?: HTMLElement;\n private input?: HTMLInputElement;\n private errorMapSrc?: ErrorMap | true;\n\n private subscription?: Subscription;\n private renderSubscription?: Subscription;\n private term$: Subject<string> = new Subject();\n private more$: Subject<void> = new Subject();\n private valueChangedBySelection = false;\n private cleanupFloatingUi?: () => void;\n\n @Element() hostElement!: HTMLElement;\n\n @State() connector?: CatSelectConnector;\n\n @State() state: CatSelectState = INIT_STATE;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n @State() errorMap?: ErrorMap | true;\n\n /**\n * Whether the label need a marker to shown if the select is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal?: boolean;\n\n /**\n * If the horizontal value is not provided, this fallback value is used. Can be set by form-group.\n * @internal\n */\n @Prop() fallbackHorizontal?: boolean;\n\n /**\n * Enable multiple selection.\n */\n @Prop() multiple = false;\n\n /**\n * The debounce time for the search.\n */\n @Prop() debounce = 250;\n\n /**\n * The placement of the select.\n */\n @Prop() placement: Placement = 'bottom-start';\n\n /**\n * The value of the select. <br />\n * <br />\n * The value of the select depends on whether it is allowed to choose a single item or several items. <br />\n * When only one item can be selected, the value is the id of the item, in case several items can be selected, the value is an array of ids of the selected items. <br />\n * <br />\n * In case the user can add new items to the select (tags activated), the value in the single select is an object (CatSelectTaggingValue) with the id of the item or the name of the created item,\n * in the case of multiple select, it is an object (CatSelectMultipleTaggingValue) with the array of the ids of the items selected and the array of the names of the items created\n */\n @Prop({ mutable: true }) value?: CatSelectValue;\n\n /**\n * Whether the select is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The placeholder text to display within the select.\n */\n @Prop() placeholder?: string;\n\n /**\n * Optional hint text(s) to be displayed with the select.\n */\n @Prop() hint?: string | string[];\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the select.\n */\n @Prop() label = '';\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A value is required or must be checked for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Whether the select should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the select should add new items.\n */\n @Prop() tags = false;\n\n /**\n * Optional hint text to be displayed on the new item to be added.\n */\n @Prop() tagHint?: string;\n\n /**\n * The text to display in the dropdown if no results are found.\n */\n @Prop() noItems?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors change with the given delay in milliseconds or immediately on blur.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * A unique identifier for the underlying native element that is used for\n * testing purposes. The attribute is added as `data-test` attribute and acts\n * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`.\n */\n @Prop() testId?: string;\n\n @Watch('connector')\n onConnectorChanged(connector: CatSelectConnector) {\n this.reset(connector);\n this.resolve();\n }\n\n @Watch('value')\n onValueChanged() {\n !this.valueChangedBySelection ? this.resolve() : (this.valueChangedBySelection = false);\n }\n\n @Watch('errors')\n onErrorsChanged(newValue?: boolean | string[] | ErrorMap, _oldValue?: unknown, update: boolean = true) {\n if (!coerceBoolean(this.errorUpdate)) {\n this.errorMap = undefined;\n } else {\n this.errorMapSrc = Array.isArray(newValue)\n ? (newValue as string[]).reduce((acc, err) => ({ ...acc, [err]: undefined }), {})\n : newValue || undefined;\n if (update) {\n this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();\n }\n }\n }\n\n @Watch('state')\n onStateChanged(newState: CatSelectState, oldState: CatSelectState) {\n const changed = (key: keyof CatSelectState) => newState[key] !== oldState[key];\n if (changed('isOpen')) {\n this.update();\n }\n if (changed('activeOptionIndex') && this.state.activeOptionIndex >= 0) {\n this.dropdown\n ?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)\n ?.scrollIntoView({ block: 'nearest' });\n }\n\n if (changed('selection')) {\n let newValue;\n if (!this.multiple && this.state.selection.length) {\n this.hide();\n }\n const idsSelected = this.state.selection.map(item => item.item.id);\n if (!this.tags) {\n if (this.multiple) {\n newValue = idsSelected;\n } else {\n newValue = idsSelected.length ? idsSelected[0] : '';\n }\n } else {\n const ids = idsSelected.filter(id => !id.startsWith(`select-${this.id}-tag`));\n const tags = this.state.selection\n .filter(item => item.item.id.startsWith(`select-${this.id}-tag`))\n .map(item => item.render.label);\n if (this.multiple) {\n newValue = { ids, tags };\n } else {\n newValue = { id: ids.length ? ids[0] : '', tag: tags.length ? tags[0] : '' };\n }\n }\n\n if (!oldState.isResolving) {\n this.valueChangedBySelection = true;\n this.value = newValue;\n this.catChange.emit(newValue);\n }\n this.showErrorsIfTimeout();\n }\n }\n\n /**\n * Emitted when the select dropdown is opened.\n */\n @Event() catOpen!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the select dropdown is closed.\n */\n @Event() catClose!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter<CatSelectValue>;\n\n /**\n * Emitted when the select loses the focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n componentDidLoad(): void {\n if (this.input) {\n autosizeInput(this.input, { minWidth: true });\n }\n }\n\n componentWillLoad(): void {\n this.onErrorsChanged(this.errors, undefined, false);\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n @Listen('blur')\n onBlur(event: FocusEvent): void {\n if (!this.multiple && this.state.activeOptionIndex >= 0) {\n if (this.tags && this.state.options[this.state.activeOptionIndex].item.id === `select-${this.id}-option-tag`) {\n this.createTag(this.state.term);\n } else {\n this.select(this.state.options[this.state.activeOptionIndex]);\n }\n }\n this.hide();\n // Conditionally remove selection if the option was not manually selected through click or enter key press\n if (!this.multiple && (!this.tags || !this.state.selection?.length)) {\n if (this.state.tempSelection?.length) {\n this.patchState({\n activeSelectionIndex: -1,\n selection: this.state.tempSelection,\n tempSelection: [],\n options: [],\n term: this.state.tempSelection[0].render.label\n });\n } else if (!this.state.selection?.length) {\n this.patchState({\n activeSelectionIndex: -1,\n selection: [],\n tempSelection: [],\n options: [],\n term: ''\n });\n }\n } else {\n this.patchState({ activeSelectionIndex: -1 });\n }\n\n this.catBlur.emit(event);\n if (coerceBoolean(this.errorUpdate)) {\n this.showErrors();\n }\n }\n\n @Listen('keydown')\n onKeyDown(event: KeyboardEvent): void {\n const isInputFocused = this.hostElement.shadowRoot?.activeElement === this.input;\n\n if (['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {\n this.onArrowKeyDown(event);\n } else if (['Enter', ' '].includes(event.key) && isInputFocused) {\n if (\n this.tags &&\n this.state.activeOptionIndex === 0 &&\n this.state.options[0].item.id === `select-${this.id}-option-tag`\n ) {\n event.preventDefault();\n if (this.multiple) {\n this.toggleTag(this.state.options[0]);\n } else {\n this.createTag(this.state.options[0].render.label);\n }\n } else if (this.state.activeOptionIndex >= 0) {\n event.preventDefault();\n if (this.multiple) {\n this.toggle(this.state.options[this.state.activeOptionIndex]);\n } else {\n this.select(this.state.options[this.state.activeOptionIndex]);\n }\n } else if (this.tags && event.key === 'Enter' && this.state.activeOptionIndex < 0) {\n this.createTag(this.state.term);\n }\n } else if (event.key === 'Escape') {\n if (this.hide()) {\n event.stopPropagation();\n }\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n this.input?.focus();\n if (!this.multiple || !this.state.term || (this.input?.selectionStart === 0 && event.key === 'Backspace')) {\n if (this.state.activeSelectionIndex >= 0) {\n this.deselect(this.state.selection[this.state.activeSelectionIndex].item.id);\n } else if (this.state.selection.length) {\n const selectionClone = [...this.state.selection];\n selectionClone.pop();\n this.patchState({\n selection: selectionClone,\n tempSelection: this.state.term ? [...this.state.selection] : []\n });\n }\n }\n } else if (event.key === 'Tab') {\n this.trigger?.setAttribute('tabindex', '-1');\n if (this.multiple) {\n this.patchState({ activeSelectionIndex: -1, activeOptionIndex: -1 });\n } else if (this.state.activeOptionIndex >= 0) {\n if (this.tags && this.state.options[this.state.activeOptionIndex].item.id === `select-${this.id}-option-tag`) {\n this.createTag(this.state.term);\n } else {\n this.select(this.state.options[this.state.activeOptionIndex]);\n }\n }\n } else if (event.key.length === 1) {\n this.input?.focus();\n }\n }\n\n @Listen('keyup')\n onKeyUp(event: KeyboardEvent): void {\n if (event.key === 'Tab' && !event.shiftKey) {\n this.hostElement.shadowRoot?.activeElement === this.trigger && this.input?.focus();\n if (this.hostElement.shadowRoot?.activeElement === this.input) {\n this.show();\n }\n } else if (event.key === 'Tab' && event.shiftKey) {\n const clearButton = this.trigger?.querySelector(`#select-clear-btn-${this.id}`);\n\n if (clearButton) {\n this.hostElement.shadowRoot?.activeElement === clearButton && this.show();\n } else {\n this.show();\n }\n }\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise<void> {\n this.input?.focus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise<void> {\n this.input?.blur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise<void> {\n this.clearInput();\n }\n\n /**\n * Connect the functions of the select\n *\n * @param connector - The {@link CatSelectConnector} of the select.\n */\n @Method()\n async connect(connector: CatSelectConnector): Promise<void> {\n this.connector = connector;\n let number$: Observable<number>;\n this.subscription?.unsubscribe();\n this.subscription = this.term$\n .asObservable()\n .pipe(\n debounce(term => (term ? timer(this.debounce) : of(0))),\n distinctUntilChanged(),\n tap(\n () =>\n (number$ = this.more$.pipe(\n filter(() => !this.state.isLoading),\n scan(n => n + 1, 0),\n startWith(0)\n ))\n ),\n switchMap(term =>\n number$.pipe(\n tap(() => this.patchState({ isLoading: true })),\n switchMap(number => connector.retrieve(term, number)),\n tap(page =>\n this.patchState({ isLoading: false, totalElements: page.totalElements, isFirstLoading: false })\n ),\n takeWhile(page => !page.last, true),\n scan((items, page) => [...items, ...page.content], [] as Item[])\n )\n )\n )\n .subscribe(items => {\n const options = this.toSelectItems(connector, items);\n\n if (\n this.tags &&\n this.state.term.trim().length &&\n !options.find(value1 => value1.render.label.toLowerCase() === this.state.term.toLowerCase())\n ) {\n let label;\n if (this.isTagSelected(this.state.term)) {\n label = this.state.selection.find(item => item.render.label.toLowerCase() === this.state.term.toLowerCase())\n ?.render.label;\n }\n options.unshift({\n item: { id: `select-${this.id}-option-tag` },\n render: { label: label ? label : this.state.term }\n });\n }\n this.patchState({\n options\n });\n });\n\n this.renderSubscription?.unsubscribe();\n if (connector.renderOptions$) {\n this.renderSubscription = connector.renderOptions$.subscribe(() => {\n this.rerenderOptions();\n });\n }\n }\n\n render() {\n this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;\n return (\n <Host>\n <div\n class={{\n 'select-field': true,\n 'select-horizontal': this.horizontal ?? this.fallbackHorizontal ?? false,\n 'select-multiple': this.multiple\n }}\n >\n <div class={{ 'label-container': true, hidden: this.labelHidden }}>\n {(this.hasSlottedLabel || this.label) && (\n <label htmlFor={`select-${this.id}-input`} part=\"label\">\n <span class=\"label-wrapper\">\n {(this.hasSlottedLabel && <slot name=\"label\"></slot>) || this.label}\n <div class=\"label-metadata\">\n {!this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (\n <span class=\"label-optional\" aria-hidden=\"true\">\n ({i18n.t('input.optional')})\n </span>\n )}\n {this.required && this.requiredMarker?.startsWith('required') && (\n <span class=\"label-optional\" aria-hidden=\"true\">\n ({i18n.t('input.required')})\n </span>\n )}\n </div>\n </span>\n </label>\n )}\n </div>\n\n <div class=\"select-container\">\n <div\n class={{ 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }}\n ref={el => (this.trigger = el)}\n id={this.id}\n role=\"combobox\"\n aria-expanded={this.state.isOpen || this.isPillboxActive()}\n aria-controls={this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`}\n aria-required={this.required ? 'true' : false}\n aria-activedescendant={this.activeDescendant}\n onClick={e => this.onClick(e)}\n >\n <div class=\"select-wrapper-inner\">\n {this.multiple && this.state.selection.length ? (\n <div\n id={`select-pillbox-${this.id}`}\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n class=\"select-pills\"\n >\n {this.state.selection.map((item, i) => (\n <span\n class={{\n pill: true,\n 'select-no-open': true,\n 'select-option-active': this.state.activeSelectionIndex === i\n }}\n role=\"option\"\n aria-selected=\"true\"\n id={`select-${this.id}-selection-${i}`}\n >\n {item.render.avatar ? (\n <cat-avatar\n label={item.render.label}\n round={item.render.avatar.round}\n src={item.render.avatar.src}\n icon={item.render.avatar.icon}\n initials={item.render.avatar.initials ?? ''}\n ></cat-avatar>\n ) : null}\n <span>{item.render.label}</span>\n {!this.disabled && (\n <cat-button\n size=\"xs\"\n variant=\"text\"\n icon=\"$cat:select-clear\"\n iconOnly\n a11yLabel={i18n.t('select.deselect')}\n onClick={() => this.deselect(item.item.id)}\n tabIndex={-1}\n data-dropdown-no-close\n ></cat-button>\n )}\n </span>\n ))}\n </div>\n ) : this.state.selection.length && this.state.selection[0].render.avatar ? (\n <cat-avatar\n label={this.state.selection[0].render.label}\n round={this.state.selection[0].render.avatar.round}\n src={this.state.selection[0].render.avatar.src}\n icon={this.state.selection[0].render.avatar.icon}\n initials={this.state.selection[0].render.avatar.initials ?? ''}\n ></cat-avatar>\n ) : null}\n <input\n data-test={this.testId}\n {...this.nativeAttributes}\n part=\"input\"\n id={`select-${this.id}-input`}\n class=\"select-input\"\n role=\"combobox\"\n ref={el => (this.input = el)}\n aria-controls={this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`}\n aria-activedescendant={this.activeDescendant}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n aria-autocomplete=\"list\"\n onInput={this.onInput.bind(this)}\n value={!this.multiple ? this.state.term : undefined}\n placeholder={this.placeholder}\n disabled={this.disabled || this.state.isResolving}\n ></input>\n </div>\n {this.state.isResolving && <cat-spinner></cat-spinner>}\n {this.invalid && (\n <cat-icon icon=\"$cat:input-error\" class=\"icon-suffix cat-text-danger\" size=\"l\"></cat-icon>\n )}\n {(this.state.selection.length || this.state.term.length) &&\n !this.disabled &&\n !this.state.isResolving &&\n this.clearable ? (\n <cat-button\n id={`select-clear-btn-${this.id}`}\n iconOnly\n icon=\"$cat:input-close\"\n variant=\"text\"\n size=\"s\"\n a11yLabel={i18n.t('input.clear')}\n onCatClick={() => this.clearInput()}\n data-dropdown-no-close\n ></cat-button>\n ) : null}\n {!this.state.isResolving && (\n <cat-button\n iconOnly\n icon=\"$cat:select-open\"\n class={{ 'select-btn': true, 'select-btn-open': this.state.isOpen }}\n variant=\"text\"\n size=\"s\"\n a11yLabel={this.state.isOpen ? i18n.t('select.close') : i18n.t('select.open')}\n aria-controls={`select-listbox-${this.id}`}\n aria-expanded={this.state.isOpen}\n tabIndex={-1}\n disabled={this.disabled || this.state.isResolving}\n data-dropdown-no-close\n ></cat-button>\n )}\n </div>\n {this.hasHint && (\n <CatFormHint\n id={this.id}\n hint={this.hint}\n slottedHint={this.hasSlottedHint && <slot name=\"hint\"></slot>}\n errorMap={this.errorMap}\n />\n )}\n </div>\n </div>\n\n <div\n class=\"select-dropdown\"\n ref={el => (this.dropdown = el)}\n style={{ display: this.state.isOpen ? 'block' : undefined }}\n >\n {this.state.isOpen && (\n <cat-scrollable\n class=\"select-options-wrapper\"\n scrolledBuffer={56}\n noOverflowX\n noOverscroll\n noScrolledInit\n onScrolledBottom={() => this.more$.next()}\n >\n <ul\n class=\"select-options\"\n role=\"listbox\"\n aria-multiselectable={this.multiple}\n aria-setsize={this.state.totalElements}\n id={`select-listbox-${this.id}`}\n >\n {this.optionsList}\n {this.state.isFirstLoading\n ? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (\n <li class=\"select-option-loading\">\n <cat-skeleton variant=\"body\" lines={1}></cat-skeleton>\n <cat-skeleton variant=\"body\" lines={1}></cat-skeleton>\n </li>\n ))\n : !this.state.options.length &&\n !this.tags && (\n <li class=\"select-option-empty\">{this.noItems ? this.noItems : i18n.t('select.empty')}</li>\n )}\n </ul>\n </cat-scrollable>\n )}\n </div>\n </Host>\n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint || this.invalid;\n }\n\n private get invalid() {\n return this.errorMap === true || !!Object.keys(this.errorMap || {}).length;\n }\n\n private get optionsList() {\n return this.state.options.map((item, i) => {\n const isTagOption = this.tags && item.item.id === `select-${this.id}-option-tag`;\n\n const isOptionSelected = this.isSelected(item.item.id) || (this.tags && this.isTagSelected(item.render.label));\n\n const getLabel = () => {\n if (isTagOption) {\n return item.render.label + this.tagTextHelp;\n }\n return item.render.label;\n };\n\n return (\n <li\n role=\"option\"\n class=\"select-option\"\n id={`select-${this.id}-option-${i}`}\n aria-selected={isOptionSelected ? 'true' : 'false'}\n >\n {this.multiple ? (\n <cat-checkbox\n class={{ 'select-option-active': this.state.activeOptionIndex === i }}\n checked={isOptionSelected}\n tabIndex={-1}\n labelLeft\n onFocus={() => this.input?.focus()}\n onCatChange={e => {\n !isTagOption ? this.toggle(item) : this.toggleTag(item);\n e.stopPropagation();\n }}\n >\n <span slot=\"label\" class=\"select-option-inner\">\n {item.render.avatar ? (\n <cat-avatar\n label={item.render.label}\n round={item.render.avatar.round}\n src={item.render.avatar.src}\n icon={item.render.avatar.icon}\n initials={item.render.avatar.initials ?? ''}\n ></cat-avatar>\n ) : null}\n <span class=\"select-option-text\" part=\"option\">\n <span class=\"select-option-label\">{getLabel()}</span>\n <span class=\"select-option-description\">{item.render.description}</span>\n </span>\n </span>\n </cat-checkbox>\n ) : (\n <div\n class={{\n 'select-option-inner': true,\n 'select-option-single': true,\n 'select-option-active': this.state.activeOptionIndex === i\n }}\n onFocus={() => this.input?.focus()}\n onClick={() => (isTagOption ? this.createTag(item.render.label) : this.select(item))}\n tabIndex={-1}\n >\n {item.render.avatar ? (\n <cat-avatar\n label={item.render.label}\n round={item.render.avatar.round}\n src={item.render.avatar.src}\n icon={item.render.avatar.icon}\n initials={item.render.avatar.initials ?? ''}\n ></cat-avatar>\n ) : null}\n <span class=\"select-option-text\">\n <span class=\"select-option-label\">{getLabel()}</span>\n <span class=\"select-option-description\">{item.render.description}</span>\n </span>\n </div>\n )}\n </li>\n );\n });\n }\n\n private resolve() {\n const connector = this.connector;\n if (!connector) {\n return;\n }\n this.patchState({ isResolving: true });\n\n const ids = this.initIds();\n let tags: string[];\n\n if (this.tags) {\n tags = this.initTags();\n }\n\n const data$ = ids.length ? connector.resolve(ids).pipe(first()) : of([]);\n data$.pipe(catchError(() => of([]))).subscribe(items => {\n const selection = this.toSelectItems(connector, items);\n if (this.tags) {\n tags\n .filter(tag => !this.isTagSelected(tag, selection))\n .forEach((tag, index) => {\n const item = { id: `select-${this.id}-tag-${index}`, name: tag };\n selection.push({ item, render: { label: item.name } });\n });\n }\n const term = !this.multiple && selection.length ? selection[0].render.label : '';\n this.patchState({ isResolving: false, selection, term, activeOptionIndex: -1 });\n this.term$.next(term);\n this.input && (this.input.value = term);\n });\n }\n\n private toSelectItems(connector: CatSelectConnector, items: Item[]) {\n return items.map(item => ({\n item: { ...item, id: connector.customId ? connector.customId(item) : item.id },\n render: connector.render(item)\n }));\n }\n\n private show() {\n if (!this.state.isOpen && this.connector) {\n if (this.trigger && this.dropdown) {\n this.cleanupFloatingUi = autoUpdate(this.trigger, this.dropdown, () => this.update());\n }\n // reconnect to reset the connection, i.e. the pagination\n this.connect(this.connector);\n this.patchState({ isOpen: true, isFirstLoading: true, options: [] });\n this.catOpen.emit();\n this.term$.next('');\n this.input?.classList.remove('select-input-transparent-caret');\n }\n }\n\n private hide() {\n if (this.state.isOpen) {\n this.patchState({ isOpen: false, activeOptionIndex: -1 });\n this.cleanupFloatingUi?.();\n this.cleanupFloatingUi = undefined;\n this.catClose.emit();\n return true;\n }\n return false;\n }\n\n private search(term: string) {\n this.patchState({ term, activeOptionIndex: -1, activeSelectionIndex: -1 });\n this.term$.next(term);\n }\n\n private isSelected(id: string) {\n return this.state.selection.findIndex(s => s.item.id === id) >= 0;\n }\n\n private select(item: { item: Item; render: RenderInfo }) {\n if (!this.isSelected(item.item.id)) {\n let newSelection;\n if (this.multiple) {\n newSelection = [...this.state.selection, item];\n } else {\n newSelection = [item];\n this.patchState({ term: item.render.label, activeOptionIndex: -1, activeSelectionIndex: -1 });\n }\n this.patchState({ selection: newSelection, tempSelection: [] });\n\n if (this.multiple && this.state.term.trim() && this.input) {\n this.patchState({ term: '', activeOptionIndex: -1 });\n this.term$.next('');\n this.input.value = '';\n }\n }\n this.setTransparentCaret();\n }\n\n private deselect(id: string) {\n if (this.isSelected(id)) {\n this.patchState({\n selection: this.state.selection.filter(item => item.item.id !== id),\n activeSelectionIndex: -1\n });\n }\n }\n\n private rerenderOptions() {\n const optionItems = this.state.options.map(o => o.item);\n const updatedOptions = this.toSelectItems(this.connector!, optionItems);\n\n this.patchState({ options: updatedOptions });\n }\n\n private toggle(item: { item: Item; render: RenderInfo }) {\n this.isSelected(item.item.id)\n ? this.deselect(item.item.id)\n : this.tags && this.isTagSelected(item.render.label)\n ? this.removeTag(item.render.label)\n : this.select(item);\n }\n\n private clearInput() {\n if (this.input && this.state.term) {\n this.patchState({ selection: [], term: '', activeOptionIndex: -1, tempSelection: [] });\n this.term$.next('');\n this.input.value = '';\n } else {\n this.patchState({ selection: [], tempSelection: [] });\n }\n }\n\n private reset(connector?: CatSelectConnector) {\n this.connector = connector ?? this.connector;\n this.subscription?.unsubscribe();\n this.subscription = undefined;\n this.renderSubscription?.unsubscribe();\n this.renderSubscription = undefined;\n this.state = INIT_STATE;\n }\n\n private onClick(event: MouseEvent) {\n if (this.disabled) {\n return;\n }\n const elem = event.target as Element;\n this.trigger?.setAttribute('tabindex', '0');\n this.input?.focus();\n if (\n elem === this.trigger ||\n elem === this.input ||\n elem.classList.contains('select-btn') ||\n elem.nodeName === 'SPAN'\n ) {\n this.state.isOpen ? this.hide() : this.show();\n }\n }\n\n private onInput() {\n this.search(this.input?.value.trim() || '');\n if (!this.multiple) {\n if (this.state.selection.length) {\n const selectionClone = [...this.state.selection];\n selectionClone.pop();\n this.patchState({ selection: selectionClone, tempSelection: [...this.state.selection] });\n }\n if (!this.required && !this.input?.value.trim()) {\n this.patchState({ tempSelection: [] });\n }\n }\n this.show();\n }\n\n private update() {\n if (this.trigger && this.dropdown) {\n computePosition(this.trigger, this.dropdown, {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [offset(CatSelect.DROPDOWN_OFFSET), flip()]\n }).then(({ x, y, placement }) => {\n if (this.dropdown) {\n this.dropdown.dataset.placement = placement;\n Object.assign(this.dropdown.style, {\n width: `${this.trigger?.clientWidth}px`,\n left: `${x}px`,\n top: `${y}px`\n });\n }\n });\n }\n }\n\n private patchState(update: Partial<CatSelectState>) {\n this.state = { ...this.state, ...update };\n }\n\n private isPillboxActive() {\n return this.state.activeSelectionIndex >= 0;\n }\n\n private get activeDescendant() {\n let activeDescendant = undefined;\n if (this.state.activeOptionIndex >= 0) {\n activeDescendant = `select-${this.id}-option-${this.state.activeOptionIndex}`;\n } else if (this.state.activeSelectionIndex >= 0) {\n activeDescendant = `select-${this.id}-selection-${this.state.activeSelectionIndex}`;\n }\n return activeDescendant;\n }\n\n private onArrowKeyDown(event: KeyboardEvent) {\n let preventDefault = false;\n this.input?.focus();\n\n switch (event.key) {\n case 'ArrowDown':\n preventDefault = true;\n this.state.isOpen\n ? this.patchState({\n activeOptionIndex: Math.min(this.state.activeOptionIndex + 1, this.state.options.length - 1),\n activeSelectionIndex: -1\n })\n : this.show();\n break;\n case 'ArrowUp':\n preventDefault = true;\n this.state.activeOptionIndex >= 0\n ? this.patchState({\n activeOptionIndex: Math.max(this.state.activeOptionIndex - 1, -1),\n activeSelectionIndex: -1\n })\n : this.hide();\n break;\n case 'ArrowLeft':\n if (this.input?.selectionStart === 0) {\n preventDefault = true;\n let index;\n this.state.activeSelectionIndex > 0\n ? (index = Math.max(this.state.activeSelectionIndex - 1, -1))\n : (index = this.state.selection.length - 1);\n this.patchState({ activeSelectionIndex: index, activeOptionIndex: -1 });\n }\n break;\n case 'ArrowRight':\n if (this.state.activeSelectionIndex >= 0) {\n preventDefault = true;\n let index = -1;\n if (this.state.activeSelectionIndex < this.state.selection.length - 1) {\n index = Math.min(this.state.activeSelectionIndex + 1, this.state.selection.length - 1);\n } else if (!this.state.term) {\n index = 0;\n }\n this.patchState({ activeSelectionIndex: index, activeOptionIndex: -1 });\n }\n }\n\n if (preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n private get tagTextHelp() {\n return this.tagHint && !this.isTagSelected(this.state.term) ? ' (' + this.tagHint + ')' : '';\n }\n\n private isTagSelected(term: string, selection: { item: Item; render: RenderInfo }[] = this.state.selection) {\n return selection.findIndex(item => item.render.label.toLowerCase() === term.toLowerCase()) >= 0;\n }\n\n private createTag(term: string) {\n if (term.trim().length && !this.isTagSelected(term)) {\n const value = this.value as CatSelectMultipleTaggingValue;\n const tags = value?.tags;\n const tag = { id: `select-${this.id}-tag-${tags?.length ? tags?.length + nextTagUniqueId++ : 0}`, name: term };\n this.select({ item: tag, render: { label: tag.name } });\n }\n this.setTransparentCaret();\n }\n\n private removeTag(label: string) {\n if (this.isTagSelected(label)) {\n const item = this.state.selection.find(item => item.render.label.toLowerCase() === label.toLowerCase());\n item && this.deselect(item.item.id);\n }\n }\n\n private toggleTag(item: { item: Item; render: RenderInfo }) {\n this.isTagSelected(item.render.label) ? this.removeTag(item.render.label) : this.createTag(item.render.label);\n }\n\n private initIds() {\n let ids: string[] = [];\n if (this.value) {\n if (!this.tags) {\n if (this.multiple) {\n ids = this.value as string[];\n } else {\n ids = [this.value as string];\n }\n } else {\n if (this.multiple) {\n const value = this.value as CatSelectMultipleTaggingValue;\n ids = value.ids ? value.ids : [];\n } else {\n const value = this.value as CatSelectTaggingValue;\n ids = value.id ? [value.id] : [];\n }\n }\n }\n return ids;\n }\n\n private initTags() {\n let tags: string[] = [];\n if (this.value) {\n if (this.multiple) {\n const value = this.value as CatSelectMultipleTaggingValue;\n tags = value.tags ? value.tags : [];\n } else {\n const value = this.value as CatSelectTaggingValue;\n tags = value.tag ? [value.tag] : [];\n }\n }\n return tags;\n }\n\n private setTransparentCaret() {\n if (!this.multiple) {\n this.hide();\n this.input?.classList.add('select-input-transparent-caret');\n }\n }\n\n private showErrors() {\n this.errorMap = this.errorMapSrc;\n }\n\n private errorUpdateTimeoutId?: number;\n private showErrorsIfTimeout() {\n const errorUpdate = coerceNumber(this.errorUpdate, null);\n if (errorUpdate !== null) {\n typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);\n this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);\n return true;\n }\n return false;\n }\n\n private showErrorsIfNoFocus() {\n const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.input;\n if (!hasFocus) {\n this.showErrors();\n }\n }\n}\n"]}
@@ -139,7 +139,7 @@ export class CatSelectTest {
139
139
  setTimeout(() => this.multipleSelect && (this.multipleSelect.value = []), 5000);
140
140
  }
141
141
  render() {
142
- return (h(Host, { key: 'a67d8afd350d4dd87c98af1e1811adf9421e9758', style: { display: 'flex', flexDirection: 'column' }, class: "cat-form" }, h("cat-select", { key: '0f408fa2737fa2d8e0bae223f73cdf9c87e1b06e', label: "Multiple Select", hint: "This is a hint!", ref: el => (this.multipleSelect = el), value: ['1'], placeholder: "Hello World", onCatChange: () => console.log('Multiple change', this.multipleSelect?.value), onCatBlur: e => console.log('Multiple blur', e), multiple: true, noItems: "No results", clearable: true, errorUpdate: false }, h("span", { key: '8ed25b6300d1078327125799241713f2af05c65d', slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), h("cat-select", { key: 'a470242e781811524325e7f887b6389734d1bfec', label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), h("cat-select", { key: '6ea9ac8aed02b9f65571441a03de45c42f0a06e9', label: "Multiple with initials", ref: el => (this.multipleSelectAvatarInitials = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), h("cat-select", { key: 'a2bfa381f885bd2add969045ebf3b41155200a19', label: "Multiple with tagging support", hint: "This is a hint!", ref: el => (this.multipleSelectTagging = el), value: { ids: ['1'], tags: ['Test', 'Albania', 'Algeria'] }, placeholder: "Select country", onCatChange: () => console.log('Multiple tagging change', this.multipleSelectTagging?.value), multiple: true, tags: true, clearable: true, errorUpdate: false }), h("cat-select", { key: '5ac14c9554ac770b5a22cf8d0fa323465a5cd748', label: "Single Select", hint: "This is a hint!", ref: el => (this.singleSelect = el), placeholder: "Search for a country or capital", onCatBlur: e => console.log('Single blur', e), clearable: true, errorUpdate: false }), h("cat-select", { key: 'ce1dd654fb032a9e7a042627f49447621dcba078', label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', placeholder: "Search for a country or capital", clearable: true, errorUpdate: false }), h("cat-select", { key: '931e2a75552354348e8a202bc4ff3ee302dfcdc0', label: "Single with initials", ref: el => (this.singleSelectAvatarInitials = el), placeholder: "Hello World", clearable: true, errorUpdate: false }), h("cat-dropdown", { key: '2a6e57f17442e18efc7cf31e29dbf108c2938467', overflow: true }, h("cat-button", { key: 'd7f34c6ee8493df2693191ad9e257a8c56731d59', slot: "trigger", style: { width: '50%' } }, "Open select"), h("div", { key: '9935750f4063e8baf6b3e0e645b52f8143234d05', slot: "content", style: { width: '400px' } }, h("cat-select", { key: '5472f568bb7826b44ed8e997b5ed1fc624d81fce', label: "Single with tagging support", ref: el => (this.singleSelectTagging = el), value: { id: '', tag: 'Albania' }, placeholder: "Search for a country or capital", onCatChange: () => console.log('Single change', this.singleSelectTagging?.value), tagHint: "new country", tags: true, clearable: true, errorUpdate: false, style: { width: '90%' } })))));
142
+ return (h(Host, { key: '0b110383eafefbb51a89f8e4ffdcf135cc295c61', style: { display: 'flex', flexDirection: 'column' }, class: "cat-form" }, h("cat-select", { key: '4acd0e15ca9c1cc6d4dd61c99ddafe3c68076d9d', label: "Multiple Select", hint: "This is a hint!", ref: el => (this.multipleSelect = el), value: ['1'], placeholder: "Hello World", onCatChange: () => console.log('Multiple change', this.multipleSelect?.value), onCatBlur: e => console.log('Multiple blur', e), multiple: true, noItems: "No results", clearable: true, errorUpdate: false }, h("span", { key: '4a1d2877a54109202783e74eefac9c2c1a3855c9', slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), h("cat-select", { key: '223d911d289e35812d6d4c244f40e44bee1e6665', label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), h("cat-select", { key: '25efd965a37df80e7f047eaf234d53b2efc3a8e1', label: "Multiple with initials", ref: el => (this.multipleSelectAvatarInitials = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), h("cat-select", { key: 'c7305a291c8671b4c949aca1f218691a450f5892', label: "Multiple with tagging support", hint: "This is a hint!", ref: el => (this.multipleSelectTagging = el), value: { ids: ['1'], tags: ['Test', 'Albania', 'Algeria'] }, placeholder: "Select country", onCatChange: () => console.log('Multiple tagging change', this.multipleSelectTagging?.value), multiple: true, tags: true, clearable: true, errorUpdate: false }), h("cat-select", { key: 'e0a098e370475f37eb65445bce5213b2e631fb10', label: "Single Select", hint: "This is a hint!", ref: el => (this.singleSelect = el), placeholder: "Search for a country or capital", onCatBlur: e => console.log('Single blur', e), clearable: true, errorUpdate: false }), h("cat-select", { key: 'ec16873b5ddec4aa6ef5d228edf6c6fd4c6a544b', label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', placeholder: "Search for a country or capital", clearable: true, errorUpdate: false }), h("cat-select", { key: '822aa2fa1565b4e434c1746507d71fe5e9db250c', label: "Single with initials", ref: el => (this.singleSelectAvatarInitials = el), placeholder: "Hello World", clearable: true, errorUpdate: false }), h("cat-dropdown", { key: '9a72d5e8f6b732915ac8e2ba9299e4182b615037', overflow: true }, h("cat-button", { key: '37ed8862808033ef771388ee0c79e8aec2881d77', slot: "trigger", style: { width: '50%' } }, "Open select"), h("div", { key: '6399c1b3926dff5b70214edca7396c8712ee5930', slot: "content", style: { width: '400px' } }, h("cat-select", { key: 'd113eef5a77b89b531902fbef66e76e2aaf3bfb3', label: "Single with tagging support", ref: el => (this.singleSelectTagging = el), value: { id: '', tag: 'Albania' }, placeholder: "Search for a country or capital", onCatChange: () => console.log('Single change', this.singleSelectTagging?.value), tagHint: "new country", tags: true, clearable: true, errorUpdate: false, style: { width: '90%' } })))));
143
143
  }
144
144
  get countryConnector() {
145
145
  return {
@@ -19,7 +19,7 @@ export class CatSkeleton {
19
19
  this.size = 'm';
20
20
  }
21
21
  render() {
22
- return (h(Host, { key: '402c7d7bcd6e39164d2f7f22755bc0ebb20aed35' }, Array.from(Array(this.count)).map(() => (h("div", { style: this.style, class: {
22
+ return (h(Host, { key: '04a0e55776d02c7ceddaeab47e49de8bb9dd1c11' }, Array.from(Array(this.count)).map(() => (h("div", { style: this.style, class: {
23
23
  skeleton: true,
24
24
  [`skeleton-${this.effect}`]: Boolean(this.effect),
25
25
  [`skeleton-${this.variant}`]: Boolean(this.variant),
@@ -14,9 +14,9 @@ export class CatSpinner {
14
14
  this.value = 0;
15
15
  }
16
16
  render() {
17
- return (h("span", { key: 'b5994c1a40fef1a165d628e728b1cb8cdff866ea', role: "progressbar", tabindex: "-1", "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', "aria-valuenow": this.value, "aria-valuemin": "0", "aria-valuemax": "100", class: {
17
+ return (h("span", { key: 'de9a11a10c7299043402faf311fef09e90a0fc18', role: "progressbar", tabindex: "-1", "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', "aria-valuenow": this.value, "aria-valuemin": "0", "aria-valuemax": "100", class: {
18
18
  [`spinner-${this.size}`]: this.size !== 'inline'
19
- } }, h("svg", { key: '0cd336a98d08ac723d34c29895847010f49245fc', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, h("circle", { key: 'c634cc4a518a6733fd5e68859e2154384ac6a1d1', cx: "24", cy: "24", r: "21.5" }))));
19
+ } }, h("svg", { key: 'b1ecb51aeecde21f10f7e36951ff714e4e784d1b', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, h("circle", { key: '770e31b46e323e0f8a3fd47425da594d5c0d98e0', cx: "24", cy: "24", r: "21.5" }))));
20
20
  }
21
21
  static get is() { return "cat-spinner"; }
22
22
  static get encapsulation() { return "shadow"; }
@@ -50,7 +50,7 @@ export class CatTab {
50
50
  this.catClick.emit(event);
51
51
  }
52
52
  render() {
53
- return h(Host, { key: '954bacd020d1405745d1118cf5b09b9e8ddc93b0' });
53
+ return h(Host, { key: '4c98e5bc36165bb30551a78d85b1ed14bb26add3' });
54
54
  }
55
55
  static get is() { return "cat-tab"; }
56
56
  static get encapsulation() { return "shadow"; }
@@ -92,7 +92,7 @@ export class CatTabs {
92
92
  }
93
93
  render() {
94
94
  this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
95
- return (h(Host, { key: 'df60c82a35f848e88f75062a56ec258ba79c1891' }, h("div", { key: 'd3d003bce6f44045168e6f32db9eea9a2c5a6c27', role: "tablist", class: "cat-tab-list" }, this.tabs.map((tab, index) => {
95
+ return (h(Host, { key: '0be484a9645000026e230eef10f1031ad2f929ee' }, h("div", { key: '1f679c93dbbc5f066a8c890127c15d60d2a7ce5b', role: "tablist", class: "cat-tab-list" }, this.tabs.map((tab, index) => {
96
96
  return (h("cat-button", { buttonId: tab.id, part: "tab", class: {
97
97
  'cat-tab': true,
98
98
  'cat-tab-active': tab.id === this.activeTab,
@@ -95,7 +95,7 @@ export class CatTag {
95
95
  }
96
96
  render() {
97
97
  this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
98
- return (h(Host, { key: '334f8a2d604df123adb018f31b5528040d65180c' }, h("div", { key: '0140867da437b576a9b5593601abf65634badafe', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: '9c2284a03aa281bd1c5060684909afffcc3be519', htmlFor: `tags-${this.id}-input`, part: "label" }, h("span", { key: '2e8bab18e8c5b776ab7a7af2805a48f25380ca14', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: '285417cf1427d6bfab28f8e79d03d7ebb4a5581a', name: "label" })) || this.label, h("div", { key: '54284d1f7c2d39b3686471a77fe81cdff5a7ba6d', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: '2bbb1dd5fbf63c3a11e5072cedd0016fb52a8bbf', class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: 'b800283d2560b788c5de2186bb0657612bf5902b', class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.required'), ")"))))))), h("div", { key: '710a3d1df041fabfc099248a10fb581dc29867e8', class: { 'input-wrapper': true, 'input-disabled': this.disabled, 'input-invalid': this.invalid } }, this.value?.map(value => (h("div", { class: "tag-pill" }, h("span", null, value), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: i18n.t('select.deselect'), onClick: () => this.deselect(value), tabIndex: -1 }))))), h("div", { key: '8201854379fedd97152173c5383eeba5a93ff43e', class: "input-inner-wrapper" }, h("input", { key: '11ca4d750d8f36560e5ff1a2a336f83a481dd3be', "data-test": this.testId, ...this.nativeAttributes, part: "input", id: `tags-${this.id}-input`, class: "tags-input", role: "combobox", ref: el => (this.input = el), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, onInput: this.onInput.bind(this), onBlur: this.onBlur.bind(this), placeholder: this.placeholder, disabled: this.disabled }), this.clearable && !this.disabled && (this.value?.length ?? 0) > 0 && (h("cat-button", { key: 'af93bc6cdc41b7bfaacef19549093bf8dc85e000', class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": i18n.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true })), this.invalid && h("cat-icon", { key: '5df20d3094317ed268588a1cde317243e1390855', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" }))), this.hasHint && (h(CatFormHint, { key: 'c3fafb4299fc29ce029c92b34bc54df35a33ffb3', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap }))));
98
+ return (h(Host, { key: '171c329333cff7d1e8788f3c301c2294e3915ba1' }, h("div", { key: 'ed982ed87e1091055ad043019436fb7478d415b9', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: '75d6d6a0ded73c1220df5b5566e7f9529016897a', htmlFor: `tags-${this.id}-input`, part: "label" }, h("span", { key: '446f8af8fc443e5463b32542b360204d10a79298', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: 'ee1942db1d84db2ae8e84854dc4cff7af01b3716', name: "label" })) || this.label, h("div", { key: 'abe9779a7d02671a62cf21ace171fe9537d4918c', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: 'dbe700d2be221519264cc36c2f6aaf68fed937ae', class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '942db85ecf5b29bae16a2f13db9e4722e87de0a8', class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.required'), ")"))))))), h("div", { key: '4199a06b528424d114627a09613f2b33781e712e', class: { 'input-wrapper': true, 'input-disabled': this.disabled, 'input-invalid': this.invalid } }, this.value?.map(value => (h("div", { class: "tag-pill" }, h("span", null, value), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: i18n.t('select.deselect'), onClick: () => this.deselect(value), tabIndex: -1 }))))), h("div", { key: '48317c5e3925204e867fc367a71e4281b011e1e2', class: "input-inner-wrapper" }, h("input", { key: '5fc7eb50ad3ad93de37c9435789154a658418bdd', "data-test": this.testId, ...this.nativeAttributes, part: "input", id: `tags-${this.id}-input`, class: "tags-input", role: "combobox", ref: el => (this.input = el), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, onInput: this.onInput.bind(this), onBlur: this.onBlur.bind(this), placeholder: this.placeholder, disabled: this.disabled }), this.clearable && !this.disabled && (this.value?.length ?? 0) > 0 && (h("cat-button", { key: '9c215bbba9db2f0a9373388ac9189e831acd289f', class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": i18n.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true })), this.invalid && h("cat-icon", { key: 'dfdcb36c4b89ed056fa945a1a5056d533eb4fcfb', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" }))), this.hasHint && (h(CatFormHint, { key: 'bcd5d5e78a7ff3ff44b5590d95239a765b604520', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap }))));
99
99
  }
100
100
  get hasHint() {
101
101
  return !!this.hint || !!this.hasSlottedHint || this.invalid;