@watermarkinsights/ripple 5.19.0-alpha.12 → 5.19.0-alpha.15

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 (172) hide show
  1. package/dist/cjs/{app-globals-28c37887.js → app-globals-f3086de8.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/priv-option-list.cjs.entry.js +2 -4
  4. package/dist/cjs/ripple.cjs.js +2 -2
  5. package/dist/cjs/wm-option_2.cjs.entry.js +94 -137
  6. package/dist/cjs/wm-tag-input.cjs.entry.js +20 -11
  7. package/dist/cjs/wm-textarea.cjs.entry.js +1 -1
  8. package/dist/cjs/wm-timepicker.cjs.entry.js +2 -2
  9. package/dist/cjs/wm-toggletip.cjs.entry.js +3 -3
  10. package/dist/cjs/wm-uploader.cjs.entry.js +15 -11
  11. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +2 -4
  12. package/dist/collection/components/selects/wm-select/wm-select.css +16 -18
  13. package/dist/collection/components/selects/wm-select/wm-select.js +94 -149
  14. package/dist/collection/components/wm-tag-input/wm-tag-input.css +9 -8
  15. package/dist/collection/components/wm-tag-input/wm-tag-input.js +19 -10
  16. package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
  17. package/dist/collection/components/wm-timepicker/wm-timepicker.js +2 -2
  18. package/dist/collection/components/wm-toggletip/wm-toggletip.js +3 -3
  19. package/dist/collection/components/wm-uploader/wm-uploader.js +15 -11
  20. package/dist/collection/dev/uploader.js +4 -4
  21. package/dist/esm/{app-globals-03f5963e.js → app-globals-2efc7f7e.js} +1 -1
  22. package/dist/esm/{chartFunctions-3a54f8ac.js → chartFunctions-613e9c87.js} +1 -1
  23. package/dist/esm/{functions-669184a6.js → functions-38e392cb.js} +1 -1
  24. package/dist/esm/{intl-7906e2d7.js → intl-0b8f342e.js} +1 -1
  25. package/dist/esm/loader.js +2 -2
  26. package/dist/esm/priv-calendar.entry.js +1 -1
  27. package/dist/esm/priv-chart-popover.entry.js +1 -1
  28. package/dist/esm/priv-option-list.entry.js +4 -6
  29. package/dist/esm/ripple.js +2 -2
  30. package/dist/esm/wm-action-menu_2.entry.js +1 -1
  31. package/dist/esm/wm-button.entry.js +1 -1
  32. package/dist/esm/wm-chart.entry.js +3 -3
  33. package/dist/esm/wm-date-range.entry.js +1 -1
  34. package/dist/esm/wm-datepicker.entry.js +1 -1
  35. package/dist/esm/wm-file.entry.js +1 -1
  36. package/dist/esm/wm-flyout.entry.js +2 -2
  37. package/dist/esm/wm-input.entry.js +2 -2
  38. package/dist/esm/wm-line-chart.entry.js +3 -3
  39. package/dist/esm/wm-modal-pss_3.entry.js +2 -2
  40. package/dist/esm/wm-modal_3.entry.js +2 -2
  41. package/dist/esm/wm-navigation_3.entry.js +2 -2
  42. package/dist/esm/wm-navigator.entry.js +1 -1
  43. package/dist/esm/wm-nested-select.entry.js +2 -2
  44. package/dist/esm/wm-optgroup.entry.js +1 -1
  45. package/dist/esm/wm-option_2.entry.js +96 -139
  46. package/dist/esm/wm-pagination.entry.js +2 -2
  47. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  48. package/dist/esm/wm-search.entry.js +2 -2
  49. package/dist/esm/wm-snackbar.entry.js +2 -2
  50. package/dist/esm/wm-tab-item_3.entry.js +1 -1
  51. package/dist/esm/wm-tag-input.entry.js +22 -13
  52. package/dist/esm/wm-tag-option.entry.js +1 -1
  53. package/dist/esm/wm-textarea.entry.js +3 -3
  54. package/dist/esm/wm-timepicker.entry.js +3 -3
  55. package/dist/esm/wm-toggletip.entry.js +4 -4
  56. package/dist/esm/wm-uploader.entry.js +17 -13
  57. package/dist/esm-es5/{app-globals-03f5963e.js → app-globals-2efc7f7e.js} +1 -1
  58. package/dist/esm-es5/{chartFunctions-3a54f8ac.js → chartFunctions-613e9c87.js} +1 -1
  59. package/dist/esm-es5/{functions-669184a6.js → functions-38e392cb.js} +1 -1
  60. package/dist/esm-es5/{intl-7906e2d7.js → intl-0b8f342e.js} +1 -1
  61. package/dist/esm-es5/loader.js +1 -1
  62. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  63. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  64. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  65. package/dist/esm-es5/ripple.js +1 -1
  66. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  67. package/dist/esm-es5/wm-button.entry.js +1 -1
  68. package/dist/esm-es5/wm-chart.entry.js +1 -1
  69. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  70. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  71. package/dist/esm-es5/wm-file.entry.js +1 -1
  72. package/dist/esm-es5/wm-flyout.entry.js +1 -1
  73. package/dist/esm-es5/wm-input.entry.js +1 -1
  74. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  75. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
  76. package/dist/esm-es5/wm-modal_3.entry.js +1 -1
  77. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  78. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  79. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  80. package/dist/esm-es5/wm-optgroup.entry.js +1 -1
  81. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  82. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  83. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  84. package/dist/esm-es5/wm-search.entry.js +1 -1
  85. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  86. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  87. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  88. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  89. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  90. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  91. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  92. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  93. package/dist/ripple/{p-6d32911c.system.entry.js → p-00eaa361.system.entry.js} +1 -1
  94. package/dist/ripple/{p-c85dae6b.entry.js → p-0825151e.entry.js} +1 -1
  95. package/dist/ripple/{p-7a21aa55.entry.js → p-0a46b050.entry.js} +1 -1
  96. package/dist/ripple/{p-c70fa14f.entry.js → p-0bce3f83.entry.js} +1 -1
  97. package/dist/ripple/{p-69b38da5.entry.js → p-118093e1.entry.js} +1 -1
  98. package/dist/ripple/{p-1eb2ec31.system.entry.js → p-1de87de8.system.entry.js} +1 -1
  99. package/dist/ripple/{p-ec9f782e.entry.js → p-26667070.entry.js} +1 -1
  100. package/dist/ripple/{p-55cdfcb4.system.entry.js → p-2b7259cb.system.entry.js} +1 -1
  101. package/dist/ripple/{p-ff6b7376.system.entry.js → p-2db6573e.system.entry.js} +1 -1
  102. package/dist/ripple/{p-4175c4b0.system.entry.js → p-2f82bfb9.system.entry.js} +1 -1
  103. package/dist/ripple/{p-6bf103b8.system.entry.js → p-303bf140.system.entry.js} +1 -1
  104. package/dist/ripple/{p-1efa25b5.system.entry.js → p-3133ce3c.system.entry.js} +1 -1
  105. package/dist/ripple/{p-9ac6957b.entry.js → p-31bac55d.entry.js} +1 -1
  106. package/dist/ripple/{p-57f9c7c3.entry.js → p-35d93c19.entry.js} +1 -1
  107. package/dist/ripple/p-374f46f4.entry.js +1 -0
  108. package/dist/ripple/{p-21c100d8.entry.js → p-39a4934f.entry.js} +1 -1
  109. package/dist/ripple/{p-138491c8.system.entry.js → p-3d8754ba.system.entry.js} +1 -1
  110. package/dist/ripple/p-4006f9ed.entry.js +1 -0
  111. package/dist/ripple/{p-c8dfc321.system.entry.js → p-44cc05f6.system.entry.js} +1 -1
  112. package/dist/ripple/{p-c73882de.system.entry.js → p-4602304a.system.entry.js} +1 -1
  113. package/dist/ripple/{p-bb364d6b.entry.js → p-4b8f7d1e.entry.js} +1 -1
  114. package/dist/ripple/{p-b55883ee.entry.js → p-4d0abf7a.entry.js} +1 -1
  115. package/dist/ripple/{p-26ab5004.system.entry.js → p-5405df80.system.entry.js} +1 -1
  116. package/dist/ripple/{p-88a7ccee.system.js → p-608971f2.system.js} +1 -1
  117. package/dist/ripple/{p-6ec4129b.entry.js → p-60e16c79.entry.js} +1 -1
  118. package/dist/ripple/{p-561d1898.system.entry.js → p-63233a4b.system.entry.js} +1 -1
  119. package/dist/ripple/{p-95f19440.system.js → p-65abcbb4.system.js} +1 -1
  120. package/dist/ripple/{p-65d3f9c4.system.entry.js → p-667fdcbb.system.entry.js} +1 -1
  121. package/dist/ripple/{p-68e90b50.system.entry.js → p-6a70dc0b.system.entry.js} +1 -1
  122. package/dist/ripple/p-6f38976c.entry.js +1 -0
  123. package/dist/ripple/p-700ca4a0.entry.js +1 -0
  124. package/dist/ripple/{p-7394f4e9.system.entry.js → p-7134a305.system.entry.js} +1 -1
  125. package/dist/ripple/p-78e8372a.system.entry.js +1 -0
  126. package/dist/ripple/{p-047e510d.entry.js → p-7c3bf608.entry.js} +1 -1
  127. package/dist/ripple/{p-176dcfc0.system.js → p-7edd25f7.system.js} +1 -1
  128. package/dist/ripple/{p-350f9314.system.entry.js → p-85830dbc.system.entry.js} +1 -1
  129. package/dist/ripple/{p-ebfa5876.entry.js → p-86a61a2a.entry.js} +1 -1
  130. package/dist/ripple/{p-009a6e5a.entry.js → p-8e2f3a45.entry.js} +1 -1
  131. package/dist/ripple/{p-a0ef456d.entry.js → p-8ec6ec53.entry.js} +1 -1
  132. package/dist/ripple/{p-71cc21a4.entry.js → p-908057b2.entry.js} +1 -1
  133. package/dist/ripple/{p-dbc3a44d.entry.js → p-9202d9e9.entry.js} +1 -1
  134. package/dist/ripple/{p-0ae9b6d3.js → p-92c8361f.js} +1 -1
  135. package/dist/ripple/{p-ad10664f.entry.js → p-957f13fb.entry.js} +1 -1
  136. package/dist/ripple/{p-1ad6c15b.entry.js → p-9609d8e7.entry.js} +1 -1
  137. package/dist/ripple/{p-3c9972a6.system.entry.js → p-960d2cf0.system.entry.js} +1 -1
  138. package/dist/ripple/{p-22d4c7e0.system.entry.js → p-96f86eb4.system.entry.js} +1 -1
  139. package/dist/ripple/{p-ea10c498.entry.js → p-9e89655f.entry.js} +1 -1
  140. package/dist/ripple/{p-f8fd7172.system.entry.js → p-a14dee02.system.entry.js} +1 -1
  141. package/dist/ripple/{p-1462c221.js → p-a16ee361.js} +1 -1
  142. package/dist/ripple/{p-f26ff1bf.system.js → p-a531b4f7.system.js} +1 -1
  143. package/dist/ripple/{p-222624ae.entry.js → p-a5c5c64c.entry.js} +1 -1
  144. package/dist/ripple/{p-dfa30c3d.entry.js → p-a7cde3fc.entry.js} +1 -1
  145. package/dist/ripple/{p-acb4d87c.system.entry.js → p-abcdd7be.system.entry.js} +1 -1
  146. package/dist/ripple/{p-6a40014e.system.entry.js → p-b1fb99e4.system.entry.js} +1 -1
  147. package/dist/ripple/{p-91669f66.js → p-b511ebfd.js} +1 -1
  148. package/dist/ripple/{p-95ce8c39.entry.js → p-be87d02c.entry.js} +1 -1
  149. package/dist/ripple/{p-c0f4f1ea.system.entry.js → p-c7f3ef7f.system.entry.js} +1 -1
  150. package/dist/ripple/{p-a6f4dd01.system.entry.js → p-ce9bb8ac.system.entry.js} +1 -1
  151. package/dist/ripple/{p-1806e50b.js → p-d815809f.js} +1 -1
  152. package/dist/ripple/{p-fb61a10e.system.entry.js → p-e5c34af5.system.entry.js} +1 -1
  153. package/dist/ripple/{p-e1a15515.system.entry.js → p-e660d0b8.system.entry.js} +1 -1
  154. package/dist/ripple/{p-66489ded.entry.js → p-ecd1c2ba.entry.js} +1 -1
  155. package/dist/ripple/{p-9ade9fe3.entry.js → p-edb265f7.entry.js} +1 -1
  156. package/dist/ripple/{p-4f2d8487.system.entry.js → p-f1a193f0.system.entry.js} +1 -1
  157. package/dist/ripple/{p-5bf2eb50.system.entry.js → p-f4390a0a.system.entry.js} +1 -1
  158. package/dist/ripple/p-f6a9fe1d.system.js +1 -0
  159. package/dist/ripple/{p-ae2520e4.entry.js → p-f91fc18d.entry.js} +1 -1
  160. package/dist/ripple/{p-1841c319.system.entry.js → p-f9bbb123.system.entry.js} +1 -1
  161. package/dist/ripple/{p-25c17efe.system.entry.js → p-fbad04d7.system.entry.js} +1 -1
  162. package/dist/ripple/ripple.esm.js +1 -1
  163. package/dist/ripple/ripple.js +1 -1
  164. package/dist/types/components/selects/wm-select/wm-select.d.ts +8 -14
  165. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +3 -1
  166. package/package.json +2 -2
  167. package/dist/ripple/p-02a15884.entry.js +0 -1
  168. package/dist/ripple/p-4831fb1f.system.js +0 -1
  169. package/dist/ripple/p-6238044b.system.entry.js +0 -1
  170. package/dist/ripple/p-7180e24a.entry.js +0 -1
  171. package/dist/ripple/p-8e694216.entry.js +0 -1
  172. package/dist/ripple/p-b40454d2.entry.js +0 -1
@@ -238,11 +238,11 @@ const Toggletip = class {
238
238
  }
239
239
  }
240
240
  render() {
241
- return (index.h(index.Host, { key: '07c2a62e81a2df15f667ca84d440c96dc21a89f7', class: `size-${this.targetSize}` }, index.h("button", { key: 'd0cb8080843aa0c61fbc2a8280b12e25707ba79a', ref: (el) => (this.buttonEl = el), class: "button", type: "button", "aria-label": this.label, popoverTarget: "toggletip", popoverTargetAction: "toggle", onClick: () => this.open(),
241
+ return (index.h(index.Host, { key: '2127bc9c0e5bebbf58fce82b7ea772a3b6fe2ada', class: `size-${this.targetSize}` }, index.h("button", { key: '55335d84975af0a4e6928b71d08745050454d4e4', ref: (el) => (this.buttonEl = el), class: "button", type: "button", "aria-label": this.label, popoverTarget: "toggletip", popoverTargetAction: "toggle", onClick: () => this.open(),
242
242
  // In order to position the tooltip identically to the toggletip, its presence is determined by these four events
243
- onMouseEnter: () => !this.isOpen && functions.showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onMouseLeave: () => functions.hideTooltip(), onFocus: () => !this.isOpen && functions.showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onBlur: () => this.handleBlur() }, this.renderIcon()), index.h("div", { key: '1b082071110727cf565df491c69b8f2a7c58a3d4', popover: "", ref: (el) => (this.toggletipEl = el), class: `toggletip ${this.targetSize} ${this.isHidden ? "hidden" : ""}`, id: "toggletip",
243
+ onMouseEnter: () => !this.isOpen && functions.showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onMouseLeave: () => functions.hideTooltip(), onFocus: () => !this.isOpen && functions.showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onBlur: () => this.handleBlur() }, this.renderIcon()), index.h("div", { key: 'de52ea584962f47a035c900af10e31951ec49ef6', popover: "", ref: (el) => (this.toggletipEl = el), class: `toggletip ${this.targetSize} ${this.isHidden ? "hidden" : ""}`, id: "toggletip",
244
244
  // @ts-ignore - despite what Typescript says, this is a valid event for popover elements
245
- onToggle: (ev) => this.handlePopoverToggle(ev) }, this.tooltip), index.h("div", { key: '140540c39e67e60d63ed8c6e4435a7063a2bb16d', ref: (el) => (this.liveRegionEl = el), class: "live-region sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" })));
245
+ onToggle: (ev) => this.handlePopoverToggle(ev) }, this.tooltip), index.h("div", { key: '88e8da7742e5aa390fd17be1efd6067d25f71209', ref: (el) => (this.liveRegionEl = el), class: "live-region sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" })));
246
246
  }
247
247
  static get delegatesFocus() { return true; }
248
248
  get el() { return index.getElement(this); }
@@ -173,24 +173,28 @@ const Uploader = class {
173
173
  }
174
174
  }
175
175
  handleProgressUpdate(mutationRecord) {
176
- if (this.inProgressFileEls.length !== 0) {
177
- const changeInUploadingFiles = this.prevUploadCount !== this.inProgressFileEls.length;
176
+ const uploadCount = this.inProgressFileEls.length;
177
+ if (uploadCount !== 0) {
178
+ const changeInUploadingFiles = this.prevUploadCount !== uploadCount;
178
179
  changeInUploadingFiles &&
179
- this.announce(intl.uploaderMessages.getFilesUploading(this.inProgressFileEls.length), this.assertiveLiveRegionEl);
180
- this.notif = intl.uploaderMessages.getFilesUploading(this.inProgressFileEls.length);
181
- this.prevUploadCount = this.inProgressFileEls.length;
180
+ this.announce(intl.uploaderMessages.getFilesUploading(uploadCount), this.assertiveLiveRegionEl);
181
+ this.notif = intl.uploaderMessages.getFilesUploading(uploadCount);
182
+ this.prevUploadCount = uploadCount;
183
+ if (this.batchCount < uploadCount) {
184
+ this.batchCount = uploadCount;
185
+ }
182
186
  if (!this.srProgress) {
183
187
  this.srProgress = setInterval(() => {
184
188
  const aggregate = this.fileEls.reduce((avg, item) => (item.progress ? avg + item.progress : avg), 0);
185
- this.announce(intl.uploaderMessages.getUploadProgress(Math.floor(aggregate / this.batchCount)), this.assertiveLiveRegionEl);
189
+ const percentage = this.batchCount > 0 ? Math.floor(aggregate / this.batchCount) : 0;
190
+ this.announce(intl.uploaderMessages.getUploadProgress(percentage), this.assertiveLiveRegionEl);
186
191
  }, 5000);
187
192
  }
188
193
  }
189
- else if (this.inProgressFileEls.length === 0 &&
190
- mutationRecord.oldValue &&
191
- parseInt(mutationRecord.oldValue) < 100) {
194
+ else if (uploadCount === 0 && mutationRecord.oldValue && parseInt(mutationRecord.oldValue) < 100) {
192
195
  // if final file progress completes
193
196
  this.uploadButtonEl.value = "";
197
+ this.batchCount = 0;
194
198
  this.notif = intl.uploaderMessages.finishedUploading;
195
199
  this.announce(intl.uploaderMessages.finishedUploading, this.assertiveLiveRegionEl);
196
200
  clearInterval(this.srProgress);
@@ -319,9 +323,9 @@ const Uploader = class {
319
323
  return (index.h("div", { class: `drop-area -${this.dropArea}`, ref: (el) => (this.dropAreaEl = el), onDragEnter: (ev) => this.handleDragEnter(ev), onDragOver: (ev) => this.handleDragOver(ev), onDragLeave: (ev) => this.handleDragLeave(ev), onDrop: (ev) => this.handleDrop(ev) }, this.dropArea == "page" && (index.h("div", { ref: (el) => (this.dropOverlayEl = el), class: "drop-overlay", popover: "manual" }, index.h("span", { class: "upload-arrow" }), index.h("span", null, "Drop to Upload")))));
320
324
  }
321
325
  render() {
322
- return (index.h(index.Host, { key: 'b58548a627b616f7baf9e2218140583b42d2eeff', class: `-${this.dropArea}` }, this.uploaderType == "drop" && this.renderDropArea(), this.label && this.renderLabel(), this.renderHeader(), this.renderListContainer(), index.h("div", { key: '4325b5923dd0879157bd0d0370ff2e9011fc3e89', ref: (el) => (this.assertiveLiveRegionEl = el), class: "live-region sr-only", "aria-live": "assertive" // since it's directly linked to the action the user took, it should be read in priority. With polite, some messages get dismissed in favor of the page title
326
+ return (index.h(index.Host, { key: '480a7275b0ebb68564f92433c8c522769ce60bc3', class: `-${this.dropArea}` }, this.uploaderType == "drop" && this.renderDropArea(), this.label && this.renderLabel(), this.renderHeader(), this.renderListContainer(), index.h("div", { key: 'b2cec25d91186e5c8a8b7b851fe116bdfdd8c174', ref: (el) => (this.assertiveLiveRegionEl = el), class: "live-region sr-only", "aria-live": "assertive" // since it's directly linked to the action the user took, it should be read in priority. With polite, some messages get dismissed in favor of the page title
323
327
  ,
324
- "aria-atomic": "true" }), index.h("div", { key: '4431d6e65f0b13f02a1b91c35a4fae6953c95a97', ref: (el) => (this.politeLiveRegionEl = el), class: "live-region sr-only", "aria-live": "polite", "aria-atomic": "true" })));
328
+ "aria-atomic": "true" }), index.h("div", { key: 'eeb50c37630ba08df7e6be89ec30a55cefeafd9a', ref: (el) => (this.politeLiveRegionEl = el), class: "live-region sr-only", "aria-live": "polite", "aria-atomic": "true" })));
325
329
  }
326
330
  static get delegatesFocus() { return true; }
327
331
  get el() { return index.getElement(this); }
@@ -349,9 +349,7 @@ export class PrivOptionList {
349
349
  : selectMessages.optgroupSingleSelectionCount())))));
350
350
  }
351
351
  renderSearchField() {
352
- return (h("div", { class: "search" }, h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, h("div", { class: "svg-icon svg-search" }), h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": "list",
353
- // aria-expanded={this.isExpanded ? "true" : "false"}
354
- onKeyDown: (ev) => this.handleKeyDown(ev), onFocus: () => this.searchFieldWrapperEl.classList.add("focus"), onBlur: (ev) => this.handleSearchFieldBlur(ev), onInput: () => this.debouncedSearch(), placeholder: this.searchPlaceholder }))));
352
+ return (h("div", { class: "search" }, h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, h("div", { class: "svg-icon svg-search" }), h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": "list", onKeyDown: (ev) => this.handleKeyDown(ev), onFocus: () => this.searchFieldWrapperEl.classList.add("focus"), onBlur: (ev) => this.handleSearchFieldBlur(ev), onInput: () => this.debouncedSearch(), placeholder: this.searchPlaceholder }))));
355
353
  }
356
354
  renderSearchFailedMessage() {
357
355
  return h("div", { class: "search-results-message" }, selectMessages.noSearchResults);
@@ -369,7 +367,7 @@ export class PrivOptionList {
369
367
  return (h("div", { class: "non-options-wrapper" }, this.isInNestedSelect && this.renderReturnBtn(), this.search && this.renderSearchField(), this.visibleSelectAllButton && this.renderSelectAllButton()));
370
368
  }
371
369
  render() {
372
- return (h("div", { key: '1b5a638b1ce9746eba27e3b106f910b6c08d59ed', class: "list-wrapper" }, (this.isInNestedSelect || this.search || this.visibleSelectAllButton) && this.renderNonOptions(), h("div", { key: '314e0a7234cdb65a636ea96bb9a5bc3ea94cf9aa', id: "list", class: "options-wrapper", tabindex: -1, role: "listbox", "aria-multiselectable": this.multiple ? "true" : null, "aria-labelledby": "label", ref: (el) => (this.listboxEl = el), style: { "--max-height": this.effectiveMaxHeight } }, this.searchTerm && this.filteredOptions.length === 0 && this.renderSearchFailedMessage(), this.multiple && this.renderCloneOptions(), h("slot", { key: '4399f882be1d24b5ee799126b1c8b7396f4985d7' })), h("div", { key: '4132af7d3529fdfa3ec301baa9aaf7ad460f9f5e', id: "optionlist-announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
370
+ return (h("div", { key: '9f19650526738eefcf2e2de58b812d9d0d3a21af', class: "list-wrapper" }, (this.isInNestedSelect || this.search || this.visibleSelectAllButton) && this.renderNonOptions(), h("div", { key: '381b60f8cb2dc58f7c268e75e6d0e78879393f0d', id: "list", class: "options-wrapper", tabindex: -1, role: "listbox", "aria-multiselectable": this.multiple ? "true" : null, "aria-labelledby": "label", ref: (el) => (this.listboxEl = el), style: { "--max-height": this.effectiveMaxHeight } }, this.searchTerm && this.filteredOptions.length === 0 && this.renderSearchFailedMessage(), this.multiple && this.renderCloneOptions(), h("slot", { key: '6a99161cdb2d3c4b6b1bfbe9b4af333daa4704de' })), h("div", { key: '8cee667df6aa79c7db5511858a73f68e911cc566', id: "optionlist-announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
373
371
  }
374
372
  static get is() { return "priv-option-list"; }
375
373
  static get originalStyleUrls() {
@@ -878,8 +878,7 @@
878
878
  --wmcolor-select-selectall-border: var(--wmcolor-select-option-border);
879
879
  --wmcolor-select-selectall-text: var(--wmcolor-interactive);
880
880
  --wmcolor-select-text: var(--wmcolor-interactive);
881
- --offset-x: 0px;
882
- --offset-y: 0px;
881
+ --button-width: auto;
883
882
  position: relative;
884
883
  display: block;
885
884
  box-sizing: border-box;
@@ -985,6 +984,7 @@
985
984
  min-width: 8.75rem;
986
985
  }
987
986
  .wrapper .button-wrapper .displayedoption {
987
+ anchor-name: --select-button;
988
988
  -webkit-border-radius: 3px;
989
989
  -moz-border-radius: 3px;
990
990
  -ms-border-radius: 3px;
@@ -1103,19 +1103,15 @@
1103
1103
  -webkit-transform: scale(1, 1);
1104
1104
  -moz-transform: scale(1, 1);
1105
1105
  transform: scale(1, 1);
1106
+ position: absolute;
1107
+ position-anchor: --select-button;
1106
1108
  margin: 0;
1109
+ padding: 0;
1107
1110
  width: unset;
1108
1111
  top: anchor(bottom);
1109
1112
  left: anchor(left);
1110
1113
  right: anchor(right);
1111
- }
1112
- .wrapper .button-wrapper > .dropdown:popover-open.upwards {
1113
- top: unset;
1114
- bottom: anchor(top);
1115
- -ms-transform-origin: center bottom;
1116
- -webkit-transform-origin: center bottom;
1117
- -moz-transform-origin: center bottom;
1118
- transform-origin: center bottom;
1114
+ position-try-fallbacks: --try-top;
1119
1115
  }
1120
1116
  .wrapper.invalid .button-wrapper .displayedoption {
1121
1117
  -webkit-box-shadow: 0 0 0 1px var(--wmcolor-border-error);
@@ -1164,16 +1160,18 @@
1164
1160
  left: 0.5625rem;
1165
1161
  }
1166
1162
 
1163
+ @position-try --try-top {
1164
+ top: unset;
1165
+ bottom: anchor(top);
1166
+ -ms-transform-origin: center bottom;
1167
+ -webkit-transform-origin: center bottom;
1168
+ -moz-transform-origin: center bottom;
1169
+ transform-origin: center bottom;
1170
+ }
1167
1171
  @supports not (top: anchor(bottom)) {
1168
- :host {
1169
- position: relative;
1170
- }
1171
- :host .button-wrapper {
1172
- position: unset;
1173
- }
1174
- :host .button-wrapper .dropdown {
1172
+ .dropdown {
1175
1173
  z-index: 30;
1176
1174
  inset: auto;
1177
- translate: var(--offset-x) var(--offset-y);
1175
+ width: var(--button-width, auto) !important;
1178
1176
  }
1179
1177
  }
@@ -1,24 +1,20 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { forceUpdate } from "@stencil/core";
3
- import { getTextDir, shouldOpenUp, isElOrChild, toBool, handleDisabledAttribute, showTooltip, hideTooltip, debounce, findAllScrollableParents, getCumulativeScrollOffset, } from "../../../global/functions";
3
+ import { getTextDir, toBool, handleDisabledAttribute, showTooltip, hideTooltip, debounce, } from "../../../global/functions";
4
4
  import { globalMessages, selectMessages } from "../../../global/intl";
5
5
  export class Select {
6
6
  constructor() {
7
- this.scrollableParents = [];
8
- this.openUp = false;
7
+ this.returnFocus = false;
9
8
  //////////////////////////////////////
10
9
  // for multiselect button text
11
10
  this.overflowCount = 0;
12
11
  this.displayedOptions = [];
13
- this.debouncedReveal = debounce(() => {
14
- const { x, y } = getCumulativeScrollOffset(this.el);
15
- this.el.style.setProperty("--offset-x", "-" + x + "px");
16
- this.el.style.setProperty("--offset-y", "-" + y + "px");
17
- this.isHidden = false;
18
- }, 100);
12
+ this.previousDisplayedOptions = [];
19
13
  this.debouncedResize = debounce(() => {
20
- this.scrollableParents = findAllScrollableParents(this.el);
21
- }, 200);
14
+ // Set the dropdown width to match the button width
15
+ const buttonWidth = this.buttonEl.getBoundingClientRect().width;
16
+ this.el.style.setProperty("--button-width", buttonWidth + "px");
17
+ }, 10);
22
18
  this.disabled = false;
23
19
  this.maxHeight = "200px";
24
20
  this.label = undefined;
@@ -31,15 +27,12 @@ export class Select {
31
27
  this.placeholder = selectMessages.multiPlaceholder;
32
28
  this.searchPlaceholder = selectMessages.searchPlaceholder;
33
29
  this.allSelectedMessage = selectMessages.allSelected;
34
- this.isHidden = true;
30
+ this.isExpanded = false;
35
31
  this.announcement = "";
36
32
  }
37
33
  get childOptions() {
38
34
  return Array.from(this.el.querySelectorAll("wm-option"));
39
35
  }
40
- get isExpanded() {
41
- return this.dropdownEl && this.dropdownEl.matches(":popover-open");
42
- }
43
36
  get isDisabled() {
44
37
  // string "false" needs to be treated as bool False because react wrappers convert bool to string.
45
38
  return toBool(this.disabled);
@@ -53,53 +46,79 @@ export class Select {
53
46
  //////////////////////////////////////
54
47
  handleOptionSelection() {
55
48
  if (!this.multiple) {
56
- this.close();
49
+ this.returnFocus = true;
50
+ this.dropdownEl.hidePopover();
57
51
  }
58
52
  }
59
53
  handleChildEnter() {
60
54
  // only occurs for multiselects. handle the click, then close
61
- this.close();
55
+ this.returnFocus = true;
56
+ this.dropdownEl.hidePopover();
62
57
  }
63
- closePopupOnEscape() {
64
- this.close();
58
+ closeDropdownOnEscape() {
59
+ this.returnFocus = true;
60
+ this.dropdownEl.hidePopover();
65
61
  }
66
- handleOptionBlur(ev) {
67
- // if the Option is blurred to something other than the component emit a blur event with the appropriate relatedTarget
68
- // keeps our component's blur events accurate, and closes when focusing browser address bar
69
- if (!isElOrChild(this.el, ev.detail.relatedTarget)) {
70
- const event = new CustomEvent("blur");
71
- // @ts-ignore
72
- event.relatedTarget = ev.detail.relatedTarget;
73
- this.el.dispatchEvent(event);
74
- }
62
+ handleToggle(ev) {
63
+ ev.newState === "open" ? this.open() : this.close();
75
64
  }
76
- handleClick(ev) {
77
- if (!isElOrChild(this.el, ev.target)) {
78
- this.close();
65
+ open() {
66
+ if (!this.isDisabled) {
67
+ this.isExpanded = true;
68
+ // polyfill for browsers without anchor() support (FF)
69
+ if (!CSS.supports("top", "anchor(bottom)")) {
70
+ // Set the dropdown width to match the button width
71
+ const buttonWidth = this.buttonEl.getBoundingClientRect().width;
72
+ this.el.style.setProperty("--button-width", buttonWidth + "px");
73
+ }
74
+ window.requestAnimationFrame(() => {
75
+ this.optionListEl.handleInitialFocus(this.elToFocus);
76
+ this.elToFocus = undefined;
77
+ });
79
78
  }
80
79
  }
81
- handleButtonBlur(ev) {
82
- if (isElOrChild(this.el, ev.relatedTarget)) {
83
- // do not emit a blur event when opening the dropdown and focusing the Options
84
- ev.stopPropagation();
80
+ close() {
81
+ if (this.isExpanded) {
82
+ this.isExpanded = false;
83
+ this.optionListEl.unfocusAll();
84
+ window.setTimeout(() => {
85
+ if (this.optionListEl.multiple) {
86
+ this.optionListEl.updateOptionVisibility();
87
+ }
88
+ // clear search field, reset filtered / bolded state of wm-options
89
+ if (this.search) {
90
+ this.optionListEl.clearSearch();
91
+ }
92
+ }, 150);
93
+ if (this.returnFocus) {
94
+ requestAnimationFrame(() => {
95
+ this.buttonEl.focus();
96
+ this.returnFocus = false;
97
+ });
98
+ }
85
99
  }
86
100
  }
87
101
  handleKey(ev) {
88
102
  switch (ev.key) {
89
103
  case "Tab":
90
104
  // if tabbing backwards, close and return focus to button. Otherwise, close but do not redirect focus.
91
- this.close(ev.shiftKey ? true : false);
105
+ if (this.isExpanded && ev.shiftKey) {
106
+ this.returnFocus = true;
107
+ }
108
+ this.dropdownEl.hidePopover();
92
109
  break;
93
110
  case "ArrowDown":
94
111
  if (this.isExpanded === false) {
95
112
  ev.preventDefault();
96
- this.open("next");
113
+ this.elToFocus = "next";
114
+ this.dropdownEl.showPopover();
97
115
  }
98
116
  break;
99
117
  case "ArrowUp":
100
118
  if (this.isExpanded === false) {
101
119
  ev.preventDefault();
102
- this.open("previous");
120
+ this.elToFocus = "previous";
121
+ this.dropdownEl.showPopover();
103
122
  }
104
123
  break;
105
124
  }
@@ -126,8 +145,6 @@ export class Select {
126
145
  });
127
146
  }
128
147
  handleChildChange() {
129
- // on update of children or children selected state, reset button text and rerender
130
- this.setButtonText();
131
148
  forceUpdate(this.el);
132
149
  if (this.multiple) {
133
150
  // update state of clone options
@@ -136,58 +153,6 @@ export class Select {
136
153
  }
137
154
  componentDidLoad() {
138
155
  this.wmSelectDidLoad.emit();
139
- this.setButtonText();
140
- if (!CSS.supports("top", "anchor(bottom)")) {
141
- this.scrollableParents = findAllScrollableParents(this.el);
142
- // Add scroll listeners to all scrollable parents
143
- this.scrollableParents.forEach((parent) => {
144
- if (parent === document.documentElement) {
145
- // For document element, listen to window scroll event
146
- window.addEventListener("scroll", () => this.handleScroll());
147
- }
148
- else {
149
- // For regular elements, listen to their scroll event
150
- parent.addEventListener("scroll", () => this.handleScroll());
151
- }
152
- });
153
- }
154
- }
155
- open(optionToSelect) {
156
- if (!this.isDisabled) {
157
- this.openUp = shouldOpenUp(this.el, this.dropdownEl.clientHeight, this.labelEl.clientHeight);
158
- // handling scroll offset for older browsers (currently FF and Safari)
159
- if (!CSS.supports("top", "anchor(bottom)")) {
160
- const { x, y } = getCumulativeScrollOffset(this.buttonEl);
161
- this.el.style.setProperty("--offset-x", "-" + x + "px");
162
- this.el.style.setProperty("--offset-y", "-" + y + "px");
163
- }
164
- this.isHidden = false;
165
- window.requestAnimationFrame(() => {
166
- this.optionListEl.handleInitialFocus(optionToSelect);
167
- });
168
- }
169
- }
170
- close(returnFocus = true) {
171
- if (this.isExpanded) {
172
- this.optionListEl.unfocusAll();
173
- window.setTimeout(() => {
174
- this.isHidden = true;
175
- if (this.optionListEl.multiple) {
176
- this.optionListEl.updateOptionVisibility();
177
- }
178
- // clear search field, reset filtered / bolded state of wm-options
179
- if (this.search) {
180
- this.optionListEl.clearSearch();
181
- }
182
- // Returns focus to button after popup closes (no need if user is tabbing)
183
- // Delay is necessary for screenreader to get new expanded state before focus
184
- // window.requestAnimationFrame is probably enough, but since we are already using setTimeout it may as well be here
185
- // also UX wise, it makes sense for the button to only be focused after the animation is complete
186
- if (returnFocus) {
187
- this.buttonEl.focus();
188
- }
189
- }, 150);
190
- }
191
156
  }
192
157
  announceError() {
193
158
  if (this.errorMessage) {
@@ -200,7 +165,6 @@ export class Select {
200
165
  handleComponentBlur(ev) {
201
166
  // Do not close or emit custom blur event when blurring to an element inside (wm-option)
202
167
  if (!this.el.contains(ev.relatedTarget)) {
203
- this.close(false);
204
168
  this.wmSelectBlurred.emit();
205
169
  }
206
170
  }
@@ -210,35 +174,6 @@ export class Select {
210
174
  showTooltip("right", ev.target, this.label);
211
175
  }
212
176
  }
213
- handleScroll() {
214
- if (this.isExpanded) {
215
- if (!this.isHidden)
216
- this.isHidden = true;
217
- this.debouncedReveal();
218
- }
219
- }
220
- setButtonText() {
221
- this.displayedOptions = this.childOptions.filter((x) => x.selected);
222
- // handle overflow + counter for multiselect
223
- if (this.multiple) {
224
- // this is a fixed measurement accounting for the max width of a 3 character overflow counter
225
- const overflowCounterWidth = 38;
226
- const computedStyle = window.getComputedStyle(this.buttonEl);
227
- // there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
228
- const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
229
- const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
230
- const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
231
- this.overflowCount = 0;
232
- this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
233
- let optionsTotalWidth = this.measurementAreaEl.clientWidth;
234
- while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
235
- this.overflowCount++;
236
- this.displayedOptions.pop();
237
- this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
238
- optionsTotalWidth = this.measurementAreaEl.clientWidth;
239
- }
240
- }
241
- }
242
177
  announce(message) {
243
178
  // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
244
179
  if (this.liveRegionEl.textContent === message) {
@@ -247,6 +182,7 @@ export class Select {
247
182
  this.announcement = message;
248
183
  }
249
184
  renderButtonText() {
185
+ this.displayedOptions = this.childOptions.filter((x) => x.selected);
250
186
  if (this.multiple && this.displayedOptions.length < 1) {
251
187
  return h("span", null, this.placeholder);
252
188
  }
@@ -254,6 +190,28 @@ export class Select {
254
190
  return this.allSelectedMessage;
255
191
  }
256
192
  else {
193
+ // handle overflow + counter for multiselect
194
+ // only bother if things have changed
195
+ const hasChanged = this.displayedOptions !== this.previousDisplayedOptions;
196
+ if (this.multiple && hasChanged) {
197
+ // this is a fixed measurement accounting for the max width of a 3 character overflow counter
198
+ const overflowCounterWidth = 38;
199
+ const computedStyle = window.getComputedStyle(this.buttonEl);
200
+ // there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
201
+ const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
202
+ const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
203
+ const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
204
+ this.overflowCount = 0;
205
+ this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
206
+ let optionsTotalWidth = this.measurementAreaEl.clientWidth;
207
+ while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
208
+ this.overflowCount++;
209
+ this.displayedOptions.pop();
210
+ this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
211
+ optionsTotalWidth = this.measurementAreaEl.clientWidth;
212
+ }
213
+ this.previousDisplayedOptions = this.displayedOptions;
214
+ }
257
215
  return this.displayedOptions.map((x, idx) => (h("span", null, idx > 0 ? ", " : "", x.textContent)));
258
216
  }
259
217
  }
@@ -264,20 +222,19 @@ export class Select {
264
222
  }
265
223
  render() {
266
224
  const showSubinfo = !this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo;
267
- const buttonProps = {
268
- id: "selectbtn",
269
- ["disabled"]: this.isDisabled,
270
- ["aria-controls"]: "list",
271
- ["aria-labelledby"]: "label selectbtn",
272
- ["aria-describedby"]: "error",
273
- ["aria-expanded"]: this.isExpanded ? "true" : "false",
274
- ["popovertarget"]: "dropdown",
275
- ["popovertargetaction"]: "toggle",
276
- onClick: () => (this.isExpanded ? this.close() : this.open()),
277
- };
278
- return (h(Host, { key: '330408045b96bb9d56e5998d50706e74b2b094a7', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: '82b457ba9b22107a26359d5f7f63c56333f33e46', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '9cfa0597409bd864b747b89ac2b843de0b085ca7', ref: (el) => (this.labelEl = el), class: "label-wrapper" }, h("label", { key: '7d0c9f4a985b6ab59a239d0cafa69d932125b91b', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
225
+ return (h(Host, { key: '21d95492d43ab9d1069bf1742d93071df9985dfe', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: 'eb131f027fcc63a0d7196f647ad6f8952bbc13de', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '41ce7e3027abf28c20927a3f4ad0efa2f8d79ffb', class: "label-wrapper" }, h("label", { key: 'deabf9ba353e261bb1f3d7dbf87be2ddd5d805f2', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
279
226
  // we can't use aria-required because the listbox is in a sub-component and it is not announced
280
- this.requiredField && (h("span", { key: '4a527a732bb04851b3d3fefc29bb4c317d3864b8', class: "required" }, h("span", { key: '8ac2a86df3f5b59d5275f55cca6c85d64c96559e', class: "sr-only" }, globalMessages.requiredField), h("span", { key: '023605d744293eaff5d924f23d5a604fd4fe8796', "aria-hidden": "true" }, "*")))), h("div", { key: '8d1a8b4e1499c3bc41af8231149c5be2da261fb5', class: "button-wrapper" }, h("button", Object.assign({ key: '2068a2077fb7e39c3c41b7e4bb2aa953bc60b9d8' }, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev) }), h("span", { key: '71fadfcbc3f77637af1ab24878fcce0507d59012', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: 'c770393cfe04bb2c107c3052f8b23c83ff581b00', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: 'e1087535c9c44974385e303ae928d76c071d555f', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: 'a3e291c520dd26a2512a59e3e3be95f6db72f17a', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: 'fd328a33e9c92561c1cd9ca0785349b12daa5cb7', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: '4d7308d974bd20a1fea40e946abdcd89247095a3', class: `dropdown ${this.isHidden ? "hidden" : ""} ${this.openUp ? "upwards" : ""}`, id: "dropdown", popover: "auto", ref: (el) => (this.dropdownEl = el) }, h("priv-option-list", { key: '1797c238d91272e4983b4e98f80bfd1519b4fc5f', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => this.close(), onOptionListAllSelected: () => this.wmSelectAllSelected.emit(), onOptionListAllDeselected: () => this.wmSelectAllDeselected.emit() }, h("slot", { key: 'de94c77063873993f52d46ab762b461cc3573f30' }))), h("div", { key: '717ee774cf69f04ad73825d717cec9c9e30adc6b', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: '053db243c037e395a41f0cb2eade700c600a903d', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
227
+ this.requiredField && (h("span", { key: '44ee2795454f9f3bee95ecc4f260b9d56527a108', class: "required" }, h("span", { key: 'defe21df63827aac177d52074e1242c32e98bcb3', class: "sr-only" }, globalMessages.requiredField), h("span", { key: 'a10f31be028d79e347d38b6226e64d11e67bcee4', "aria-hidden": "true" }, "*")))), h("div", { key: 'a7910f2d9180bb148b71ff30d91a4b32814720ab', class: "button-wrapper" }, h("button", { key: 'e346214e6aa3087126f48e831a1f4cf8ad47b374', id: "selectbtn", disabled: this.isDisabled, "aria-labelledby": "label selectbtn", "aria-describedby": "error", popoverTarget: "dropdown", popoverTargetAction: "toggle", class: "displayedoption", ref: (el) => (this.buttonEl = el) }, h("span", { key: '6774b180ebc5831316af4364e82b09811a040681', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: '70e0cc7710e6ca4eac93025dfc8c7c5241f5483d', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: '451817c953223b0443999e1414808d430a1cfd7a', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: '86db46ffc2455ec67a5a70f9a4e7a88541487473', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: '150324e049b4f37405c13b866edb6a09d13866b5', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: 'e0aeb5622be16c1bc89c03b10eb0c9bc71e6321c', class: "dropdown", id: "dropdown", popover: "auto", ref: (el) => (this.dropdownEl = el),
228
+ // @ts-ignore -- don't tell typescript but we're in the future
229
+ onToggle: (ev) => this.handleToggle(ev) }, h("priv-option-list", { key: '79f20c45531d18790a8527694fda90f26f84c4e6', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => {
230
+ this.dropdownEl.hidePopover();
231
+ }, onOptionListAllSelected: () => {
232
+ this.returnFocus = true;
233
+ this.wmSelectAllSelected.emit();
234
+ }, onOptionListAllDeselected: () => {
235
+ this.returnFocus = true;
236
+ this.wmSelectAllDeselected.emit();
237
+ } }, h("slot", { key: '04942d335177161673a0cb0e62bd509f418390a8' }))), h("div", { key: '2304a7f6e9f40a62a7a7d9b0ebe408dbfbb0c81d', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: '78bea4db879582d61cee9b5bf24bfa7b6286926e', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
281
238
  }
282
239
  static get is() { return "wm-select"; }
283
240
  static get encapsulation() { return "shadow"; }
@@ -512,7 +469,7 @@ export class Select {
512
469
  }
513
470
  static get states() {
514
471
  return {
515
- "isHidden": {},
472
+ "isExpanded": {},
516
473
  "announcement": {}
517
474
  };
518
475
  }
@@ -604,22 +561,10 @@ export class Select {
604
561
  "passive": false
605
562
  }, {
606
563
  "name": "wmEscKeyPressed",
607
- "method": "closePopupOnEscape",
608
- "target": undefined,
609
- "capture": false,
610
- "passive": false
611
- }, {
612
- "name": "wmOptionBlurred",
613
- "method": "handleOptionBlur",
564
+ "method": "closeDropdownOnEscape",
614
565
  "target": undefined,
615
566
  "capture": false,
616
567
  "passive": false
617
- }, {
618
- "name": "click",
619
- "method": "handleClick",
620
- "target": "document",
621
- "capture": true,
622
- "passive": false
623
568
  }, {
624
569
  "name": "keydown",
625
570
  "method": "handleKey",
@@ -882,13 +882,13 @@
882
882
  --wmcolor-taginput-option-text-selected: var(--wmcolor-option-text-disabled);
883
883
  --wmcolor-taginput-option-text: var(--wmcolor-interactive);
884
884
  --wmcolor-taginput-row-background-hover: var(--wmcolor-interactive-background-hover);
885
- --wmcolor-taginput-row-background-focus: var(--wmcolor-interactive-background-focus);
885
+ --wmcolor-taginput-row-background-focus: var(--wmcolor-background-selected);
886
886
  --wmcolor-taginput-row-background-selected: var(--wmcolor-table-row-background-selected);
887
887
  --wmcolor-taginput-row-background-table: var(--wmcolor-table-row-background);
888
888
  --wmcolor-taginput-row-border-selected: var(--wmcolor-table-row-border-selected);
889
889
  --wmcolor-taginput-tag-background-highlight: var(--wmcolor-interactive-background-highlight);
890
890
  --wmcolor-taginput-tag-background-locked: var(--wmcolor-interactive-disabled);
891
- --wmcolor-taginput-tag-background: var(--wmcolor-palelilacgray); /* EXCEPTION */
891
+ --wmcolor-taginput-tag-background: var(--wmcolor-lilacgray-30); /* EXCEPTION */
892
892
  --wmcolor-taginput-tag-text-locked: var(--wmcolor-text-ondark);
893
893
  --wmcolor-taginput-tag-text: var(--wmcolor-text);
894
894
  --wmcolor-taginput-tagbutton-background-hover: var(--wmcolor-interactive-hover);
@@ -1218,11 +1218,12 @@
1218
1218
  outline: none;
1219
1219
  background: var(--wmcolor-taginput-option-background-hover);
1220
1220
  }
1221
- :host .dropdown-wrapper li.option.focused, :host .dropdown-wrapper li.add-new-btn.focused,
1222
- :host .dropdown-wrapper div.option.focused,
1223
- :host .dropdown-wrapper div.add-new-btn.focused {
1221
+ :host .dropdown-wrapper li.option.focused:not(:hover), :host .dropdown-wrapper li.add-new-btn.focused:not(:hover),
1222
+ :host .dropdown-wrapper div.option.focused:not(:hover),
1223
+ :host .dropdown-wrapper div.add-new-btn.focused:not(:hover) {
1224
1224
  outline: none;
1225
1225
  background: var(--wmcolor-taginput-option-background-focus);
1226
+ color: var(--wmcolor-interactive-text);
1226
1227
  }
1227
1228
  :host .dropdown-wrapper li.help-text,
1228
1229
  :host .dropdown-wrapper div.help-text {
@@ -1245,9 +1246,6 @@
1245
1246
  overflow: auto;
1246
1247
  margin-block-start: 1.5rem;
1247
1248
  }
1248
- :host .table-wrapper:focus {
1249
- outline: none;
1250
- }
1251
1249
  :host .table-wrapper #table {
1252
1250
  width: 100%;
1253
1251
  border-spacing: 0px;
@@ -1266,6 +1264,9 @@
1266
1264
  text-transform: uppercase;
1267
1265
  padding: 0 1.5rem;
1268
1266
  }
1267
+ :host .table-wrapper #table:focus {
1268
+ outline: none;
1269
+ }
1269
1270
  :host .table-wrapper tr:nth-child(even) {
1270
1271
  background-color: var(--wmcolor-taginput-altrow-background-table);
1271
1272
  }