@watermarkinsights/ripple 4.0.0-9 → 4.0.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 (217) hide show
  1. package/dist/cjs/{chartFunctions-33cb3097.js → chartFunctions-f5ded027.js} +1 -1
  2. package/dist/cjs/{functions-833ccc83.js → functions-e7db4a26.js} +67 -824
  3. package/dist/cjs/{global-d57c118b.js → global-b33cf49b.js} +1 -1
  4. package/dist/cjs/{intl-ab07bd0b.js → intl-9ef93563.js} +3 -3
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
  7. package/dist/cjs/priv-datepicker.cjs.entry.js +1 -1
  8. package/dist/cjs/ripple.cjs.js +3 -3
  9. package/dist/cjs/wm-action-menu_2.cjs.entry.js +2 -2
  10. package/dist/cjs/wm-button.cjs.entry.js +1 -1
  11. package/dist/cjs/wm-chart.cjs.entry.js +4 -4
  12. package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
  13. package/dist/cjs/wm-file.cjs.entry.js +7 -4
  14. package/dist/cjs/wm-input.cjs.entry.js +4 -9
  15. package/dist/cjs/wm-line-chart.cjs.entry.js +3 -3
  16. package/dist/cjs/wm-modal-header.cjs.entry.js +2 -2
  17. package/dist/cjs/wm-modal.cjs.entry.js +1 -1
  18. package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
  19. package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
  20. package/dist/cjs/wm-option_2.cjs.entry.js +68 -119
  21. package/dist/cjs/wm-pagination.cjs.entry.js +1 -1
  22. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +4 -4
  23. package/dist/cjs/wm-search.cjs.entry.js +2 -2
  24. package/dist/cjs/wm-snackbar.cjs.entry.js +2 -2
  25. package/dist/cjs/wm-tab-item_3.cjs.entry.js +2 -2
  26. package/dist/cjs/wm-tag-input.cjs.entry.js +521 -617
  27. package/dist/cjs/wm-tag-option.cjs.entry.js +43 -0
  28. package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
  29. package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
  30. package/dist/cjs/wm-uploader.cjs.entry.js +2 -2
  31. package/dist/collection/collection-manifest.json +3 -3
  32. package/dist/collection/components/charts/wm-chart/wm-chart.css +0 -1
  33. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +0 -1
  34. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +9 -1
  35. package/dist/collection/components/wm-file/wm-file.js +23 -3
  36. package/dist/collection/components/wm-file/wm-file.spec.js +83 -34
  37. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +32 -59
  38. package/dist/collection/components/wm-input/wm-input.js +1 -8
  39. package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
  40. package/dist/collection/components/wm-option/wm-option.css +6 -6
  41. package/dist/collection/components/wm-option/wm-option.js +47 -3
  42. package/dist/collection/components/wm-select/wm-select.e2e.js +60 -114
  43. package/dist/collection/components/wm-select/wm-select.js +80 -141
  44. package/dist/collection/components/wm-select/wm-select.spec.js +9 -11
  45. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +0 -1
  46. package/dist/collection/components/wm-tag-input/wm-tag-input.css +19 -22
  47. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +3 -3
  48. package/dist/collection/components/wm-tag-input/wm-tag-input.js +597 -726
  49. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +241 -0
  50. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +26 -47
  51. package/dist/collection/components/wm-uploader/wm-uploader.js +3 -3
  52. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +67 -140
  53. package/dist/collection/global/functions.js +22 -10
  54. package/dist/collection/global/intl.js +2 -2
  55. package/dist/collection/lang/lang.spec.js +2 -2
  56. package/dist/esm/{chartFunctions-36eb2d1a.js → chartFunctions-2a4603c6.js} +1 -1
  57. package/dist/esm/{functions-061ab506.js → functions-358a1a02.js} +66 -824
  58. package/dist/esm/{global-509460f7.js → global-ba03a879.js} +1 -1
  59. package/dist/esm/{intl-d698d52f.js → intl-48057c4d.js} +3 -3
  60. package/dist/esm/loader.js +3 -3
  61. package/dist/esm/polyfills/core-js.js +0 -0
  62. package/dist/esm/polyfills/dom.js +0 -0
  63. package/dist/esm/polyfills/es5-html-element.js +0 -0
  64. package/dist/esm/polyfills/index.js +0 -0
  65. package/dist/esm/polyfills/system.js +0 -0
  66. package/dist/esm/priv-chart-popover.entry.js +1 -1
  67. package/dist/esm/priv-datepicker.entry.js +1 -1
  68. package/dist/esm/ripple.js +3 -3
  69. package/dist/esm/wm-action-menu_2.entry.js +2 -2
  70. package/dist/esm/wm-button.entry.js +1 -1
  71. package/dist/esm/wm-chart.entry.js +4 -4
  72. package/dist/esm/wm-datepicker.entry.js +1 -1
  73. package/dist/esm/wm-file.entry.js +7 -4
  74. package/dist/esm/wm-input.entry.js +4 -9
  75. package/dist/esm/wm-line-chart.entry.js +3 -3
  76. package/dist/esm/wm-modal-header.entry.js +2 -2
  77. package/dist/esm/wm-modal.entry.js +1 -1
  78. package/dist/esm/wm-navigation_3.entry.js +2 -2
  79. package/dist/esm/wm-navigator.entry.js +1 -1
  80. package/dist/esm/wm-option_2.entry.js +68 -119
  81. package/dist/esm/wm-pagination.entry.js +1 -1
  82. package/dist/esm/wm-progress-indicator_3.entry.js +4 -4
  83. package/dist/esm/wm-search.entry.js +2 -2
  84. package/dist/esm/wm-snackbar.entry.js +2 -2
  85. package/dist/esm/wm-tab-item_3.entry.js +2 -2
  86. package/dist/esm/wm-tag-input.entry.js +522 -618
  87. package/dist/esm/wm-tag-option.entry.js +39 -0
  88. package/dist/esm/wm-timepicker.entry.js +1 -1
  89. package/dist/esm/wm-toggletip.entry.js +1 -1
  90. package/dist/esm/wm-uploader.entry.js +2 -2
  91. package/dist/esm-es5/{chartFunctions-36eb2d1a.js → chartFunctions-2a4603c6.js} +1 -1
  92. package/dist/esm-es5/functions-358a1a02.js +1 -0
  93. package/dist/esm-es5/global-ba03a879.js +1 -0
  94. package/dist/esm-es5/{intl-d698d52f.js → intl-48057c4d.js} +1 -1
  95. package/dist/esm-es5/loader.js +1 -1
  96. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  97. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  98. package/dist/esm-es5/ripple.js +1 -1
  99. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  100. package/dist/esm-es5/wm-button.entry.js +1 -1
  101. package/dist/esm-es5/wm-chart.entry.js +1 -1
  102. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  103. package/dist/esm-es5/wm-file.entry.js +1 -1
  104. package/dist/esm-es5/wm-input.entry.js +1 -1
  105. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  106. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  107. package/dist/esm-es5/wm-modal.entry.js +1 -1
  108. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  109. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  110. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  111. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  112. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  113. package/dist/esm-es5/wm-search.entry.js +1 -1
  114. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  115. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  116. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  117. package/dist/esm-es5/wm-tag-option.entry.js +1 -0
  118. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  119. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  120. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  121. package/dist/ripple/{p-3f159fa3.entry.js → p-05ef4092.entry.js} +1 -1
  122. package/dist/ripple/p-11d629cb.system.entry.js +1 -0
  123. package/dist/ripple/p-126fbcdb.entry.js +1 -0
  124. package/dist/ripple/p-12a140e0.system.entry.js +1 -0
  125. package/dist/ripple/{p-e61e2d7f.entry.js → p-191fafc6.entry.js} +1 -1
  126. package/dist/ripple/p-1ab62a21.system.entry.js +1 -0
  127. package/dist/ripple/{p-d8287161.entry.js → p-1e7e2ca4.entry.js} +1 -1
  128. package/dist/ripple/{p-fef28649.system.entry.js → p-1ee49e28.system.entry.js} +1 -1
  129. package/dist/ripple/{p-e82eae12.entry.js → p-299bf10c.entry.js} +1 -1
  130. package/dist/ripple/{p-c20c248a.entry.js → p-2d6bb6d7.entry.js} +1 -1
  131. package/dist/ripple/{p-a31e736a.entry.js → p-366a9608.entry.js} +1 -1
  132. package/dist/ripple/p-3a20b1ed.system.entry.js +1 -0
  133. package/dist/ripple/p-3bb79457.entry.js +1 -0
  134. package/dist/ripple/{p-1f7a67cc.system.js → p-426fa249.system.js} +1 -1
  135. package/dist/ripple/p-44d4705c.system.js +1 -0
  136. package/dist/ripple/p-492dd748.system.entry.js +1 -0
  137. package/dist/ripple/p-4aa8e2cf.entry.js +1 -0
  138. package/dist/ripple/{p-ff891d67.js → p-52f5ec85.js} +1 -1
  139. package/dist/ripple/{p-484d57e1.entry.js → p-546d5c1d.entry.js} +1 -1
  140. package/dist/ripple/{p-d231aed1.system.entry.js → p-585732f7.system.entry.js} +1 -1
  141. package/dist/ripple/p-6767b009.system.js +1 -0
  142. package/dist/ripple/{p-c6ba5d3d.system.entry.js → p-681c9539.system.entry.js} +1 -1
  143. package/dist/ripple/{p-d2c9264d.entry.js → p-68cade03.entry.js} +1 -1
  144. package/dist/ripple/{p-260fd686.system.entry.js → p-6c27afee.system.entry.js} +1 -1
  145. package/dist/ripple/{p-d108107c.entry.js → p-7740db9a.entry.js} +1 -1
  146. package/dist/ripple/{p-055d1c23.system.entry.js → p-7d005413.system.entry.js} +1 -1
  147. package/dist/ripple/{p-c9830db6.system.entry.js → p-7e2c2c46.system.entry.js} +1 -1
  148. package/dist/ripple/p-7fa84884.system.entry.js +1 -0
  149. package/dist/ripple/{p-9a3d8f0b.system.entry.js → p-8b143e9d.system.entry.js} +1 -1
  150. package/dist/ripple/{p-0790bfed.entry.js → p-8ea235b6.entry.js} +1 -1
  151. package/dist/ripple/{p-4eae76a6.entry.js → p-8fadf5dd.entry.js} +1 -1
  152. package/dist/ripple/{p-8df34bf3.system.entry.js → p-94c65a69.system.entry.js} +1 -1
  153. package/dist/ripple/{p-3bd6839a.entry.js → p-9690de6c.entry.js} +1 -1
  154. package/dist/ripple/p-acb0156f.system.entry.js +1 -0
  155. package/dist/ripple/p-ae7290c2.entry.js +1 -0
  156. package/dist/ripple/{p-030b527a.js → p-aea9a33a.js} +1 -1
  157. package/dist/ripple/p-b6e5408c.js +1 -0
  158. package/dist/ripple/p-b75c0973.system.js +1 -0
  159. package/dist/ripple/{p-21f73fee.system.entry.js → p-b858d526.system.entry.js} +1 -1
  160. package/dist/ripple/{p-40b5b7d1.system.entry.js → p-b92c2e16.system.entry.js} +1 -1
  161. package/dist/ripple/p-be79e95d.entry.js +1 -0
  162. package/dist/ripple/{p-b623fdc8.entry.js → p-bfff12b4.entry.js} +1 -1
  163. package/dist/ripple/{p-68d7cf2b.entry.js → p-c028f29c.entry.js} +1 -1
  164. package/dist/ripple/p-c19ed569.entry.js +1 -0
  165. package/dist/ripple/{p-f42031f5.system.js → p-c3da681d.system.js} +1 -1
  166. package/dist/ripple/{p-9b94467e.entry.js → p-c5105455.entry.js} +1 -1
  167. package/dist/ripple/{p-15457a4b.system.entry.js → p-c86a7f4d.system.entry.js} +1 -1
  168. package/dist/ripple/{p-b9283910.entry.js → p-db58d96b.entry.js} +1 -1
  169. package/dist/ripple/p-dd92850a.js +1 -0
  170. package/dist/ripple/p-e39e6c2b.entry.js +1 -0
  171. package/dist/ripple/{p-a8ea87d1.system.entry.js → p-ec831e59.system.entry.js} +1 -1
  172. package/dist/ripple/{p-f1029090.system.entry.js → p-ee51efe0.system.entry.js} +1 -1
  173. package/dist/ripple/{p-777ced5b.entry.js → p-eec01bbe.entry.js} +1 -1
  174. package/dist/ripple/{p-5ed1b0a2.system.entry.js → p-f339d590.system.entry.js} +1 -1
  175. package/dist/ripple/{p-5b593411.system.entry.js → p-f3407959.system.entry.js} +1 -1
  176. package/dist/ripple/{p-da727af8.system.entry.js → p-f3a374ff.system.entry.js} +1 -1
  177. package/dist/ripple/{p-867b20a9.system.entry.js → p-f43fda55.system.entry.js} +1 -1
  178. package/dist/ripple/ripple.esm.js +1 -1
  179. package/dist/ripple/ripple.js +1 -1
  180. package/dist/types/components/wm-file/wm-file.d.ts +1 -1
  181. package/dist/types/components/wm-input/wm-input.d.ts +0 -1
  182. package/dist/types/components/wm-option/wm-option.d.ts +2 -0
  183. package/dist/types/components/wm-select/wm-select.d.ts +7 -7
  184. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +65 -85
  185. package/dist/types/components/wm-tag-input/wm-tag-option/wm-tag-option.d.ts +18 -0
  186. package/dist/types/components/wm-uploader/wm-uploader.d.ts +1 -1
  187. package/dist/types/components.d.ts +30 -27
  188. package/dist/types/global/functions.d.ts +2 -1
  189. package/dist/types/global/intl.d.ts +2 -2
  190. package/package.json +1 -1
  191. package/dist/cjs/wm-tag-input-row.cjs.entry.js +0 -23
  192. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js +0 -122
  193. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +0 -1039
  194. package/dist/esm/wm-tag-input-row.entry.js +0 -19
  195. package/dist/esm-es5/functions-061ab506.js +0 -1
  196. package/dist/esm-es5/global-509460f7.js +0 -1
  197. package/dist/esm-es5/wm-tag-input-row.entry.js +0 -1
  198. package/dist/ripple/p-1c3ba701.system.entry.js +0 -1
  199. package/dist/ripple/p-4a8c95b9.system.entry.js +0 -1
  200. package/dist/ripple/p-5f2c09f6.entry.js +0 -1
  201. package/dist/ripple/p-647a4a4a.system.entry.js +0 -1
  202. package/dist/ripple/p-7011accc.entry.js +0 -1
  203. package/dist/ripple/p-707383d5.system.js +0 -1
  204. package/dist/ripple/p-7c2e47bc.system.entry.js +0 -1
  205. package/dist/ripple/p-839d7e0f.system.js +0 -1
  206. package/dist/ripple/p-928cc755.system.entry.js +0 -1
  207. package/dist/ripple/p-9888c825.js +0 -1
  208. package/dist/ripple/p-a5308115.js +0 -1
  209. package/dist/ripple/p-b45a2fc3.entry.js +0 -1
  210. package/dist/ripple/p-b4b57baf.system.entry.js +0 -1
  211. package/dist/ripple/p-c15f29e5.system.js +0 -1
  212. package/dist/ripple/p-d38882eb.entry.js +0 -1
  213. package/dist/ripple/p-d601c5a1.entry.js +0 -1
  214. package/dist/ripple/p-d68678d2.entry.js +0 -1
  215. package/dist/ripple/p-e703d9cd.entry.js +0 -1
  216. package/dist/ripple/p-eb0d569a.system.entry.js +0 -1
  217. package/dist/types/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.d.ts +0 -11
@@ -41,7 +41,6 @@ export class Select {
41
41
  }
42
42
  }, 150);
43
43
  this.disabled = false;
44
- this.invalid = false;
45
44
  this.maxHeight = undefined;
46
45
  this.label = undefined;
47
46
  this.labelPosition = "top";
@@ -72,12 +71,12 @@ export class Select {
72
71
  get childOptions() {
73
72
  return Array.from(this.el.querySelectorAll("wm-option"));
74
73
  }
75
- get duplicateOptions() {
74
+ get cloneOptions() {
76
75
  return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"));
77
76
  }
78
77
  get allOptionEls() {
79
78
  // this includes both slotted wm-options and internally created wm-options
80
- return this.duplicateOptions.concat(this.childOptions);
79
+ return this.cloneOptions.concat(this.childOptions);
81
80
  }
82
81
  get visibleOptionEls() {
83
82
  return this.allOptionEls.filter((option) => !option.classList.contains("hidden") && !option.classList.contains("filtered-out"));
@@ -100,6 +99,9 @@ export class Select {
100
99
  get allSelected() {
101
100
  return this.childOptions.every((option) => option.selected);
102
101
  }
102
+ get visibleSelectAllButton() {
103
+ return this.selectAll && this.multiple && this.searchTerm === "";
104
+ }
103
105
  //////////////////////////////////////
104
106
  get resultsFoundMessage() {
105
107
  return intl.formatMessage({
@@ -122,39 +124,14 @@ export class Select {
122
124
  this.isTabbing = false;
123
125
  }
124
126
  handleOptionSelection(ev) {
125
- const option = ev.detail;
126
- this.focusOption(option);
127
+ this.focusOption(ev.detail);
127
128
  if (!this.multiple) {
128
- // if the option was already selected, leave selected states untouched and don't fire the event
129
- if (!option.selected) {
130
- this.selectOption(option);
131
- const detail = { changedOption: option, selectedOptions: [option] };
132
- this.wmSelectChanged.emit(detail);
133
- // change is deprecated in favor of wmSelectChanged
134
- // because of issues with React wrappers when using native events name
135
- const event = new CustomEvent("change", { detail: detail });
136
- // @ts-ignore
137
- this.el.dispatchEvent(event);
138
- }
139
129
  this.close();
140
130
  }
141
- else {
142
- this.selectOption(option);
143
- // we pass the original option with the event, as it's the only one the devs know or care about
144
- // devs will typically set a `value` on the option, which is not copied over
145
- // we could have taken the value and put it on the duplicate option,
146
- // but this approach is more flexible (what if they want to have a data attribute?)
147
- const isDuplicate = option.classList.contains("duplicate");
148
- const originalOption = isDuplicate ? this.findCorrespondingOption(option) : option;
149
- const selectedOptions = this.childOptions.filter((o) => o.selected);
150
- const detail = { changedOption: originalOption, selectedOptions: selectedOptions };
151
- this.wmSelectChanged.emit(detail);
152
- // change is deprecated in favor of wmSelectChanged
153
- // because of issues with React wrappers when using native events name
154
- const event = new CustomEvent("change", { detail: detail });
155
- // @ts-ignore
156
- this.el.dispatchEvent(event);
157
- }
131
+ }
132
+ handleOptionCloneSelection(ev) {
133
+ const correspondingOption = this.findCorrespondingOption(ev.detail);
134
+ correspondingOption.click();
158
135
  }
159
136
  handleChildEnter() {
160
137
  // only occurs for multiselects. handle the click, then close
@@ -194,18 +171,12 @@ export class Select {
194
171
  this.allSelected ? this.deselectAllOptions() : this.selectAllOptions();
195
172
  }
196
173
  selectAllOptions() {
197
- this.allOptionEls.forEach((o) => (o.selected = true));
198
- this.setSelectAllButton();
199
- this.setButtonText();
200
- const detail = { changedOption: null, selectedOptions: this.childOptions };
201
- this.wmSelectChanged.emit(detail);
174
+ this.announce(this.allOptionsSelectedMessage);
175
+ this.wmSelectAllSelected.emit();
202
176
  }
203
177
  deselectAllOptions() {
204
- this.allOptionEls.forEach((o) => (o.selected = false));
205
- this.setSelectAllButton();
206
- this.setButtonText();
207
- const detail = { changedOption: null, selectedOptions: [] };
208
- this.wmSelectChanged.emit(detail);
178
+ this.announce(this.allOptionsDeselectedMessage);
179
+ this.wmSelectAllDeselected.emit();
209
180
  }
210
181
  handleButtonBlur(ev) {
211
182
  if (this.isElOrChild(ev.relatedTarget)) {
@@ -240,21 +211,25 @@ export class Select {
240
211
  if (!this.label) {
241
212
  console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).");
242
213
  }
243
- this.uid = this.el.id ? this.el.id : generateId();
214
+ if (!this.multiple && this.selectedOptions.length === 0) {
215
+ console.error("wm-select should have one initial option selected");
216
+ }
244
217
  if (document.body.classList.contains("wmcl-user-is-tabbing")) {
245
218
  this.toggleTabbingOn();
246
219
  }
247
- // set initial selections
248
- if (this.selectedOptions.length > 0) {
249
- this.selectedOptions.forEach((x) => {
250
- this.displayedOptions.push(x);
251
- });
252
- // single Select only, pre-select if no default option from dev
253
- }
254
- else if (!this.multiple) {
255
- this.selectOption(this.allOptionEls[0]);
256
- }
257
220
  handleDisabledAttribute(this.el, this.isDisabled);
221
+ const mutationObserver = new MutationObserver((mutationRecordList) => mutationRecordList.forEach((mutationRecord) => this.handleChildChange(mutationRecord)));
222
+ mutationObserver.observe(this.el, {
223
+ childList: true,
224
+ attributes: true,
225
+ subtree: true,
226
+ attributeFilter: ["selected"],
227
+ });
228
+ }
229
+ handleChildChange(_) {
230
+ // on update of children or children selected state, reset button text and rerender
231
+ this.setButtonText();
232
+ forceUpdate(this.el);
258
233
  }
259
234
  componentDidLoad() {
260
235
  this.wmSelectDidLoad.emit();
@@ -271,10 +246,10 @@ export class Select {
271
246
  }
272
247
  componentWillUpdate() {
273
248
  if (this.multiple) {
274
- // find last visible duplicate option and apply .last class
275
- const visibleDuplicateOptions = this.visibleOptionEls.filter((option) => option.classList.contains("duplicate"));
276
- visibleDuplicateOptions.forEach((option, idx) => {
277
- if (idx === visibleDuplicateOptions.length - 1) {
249
+ // find last visible clone option and apply .last class
250
+ const visibleCloneOptions = this.visibleOptionEls.filter((option) => option.classList.contains("clone"));
251
+ visibleCloneOptions.forEach((option, idx) => {
252
+ if (idx === visibleCloneOptions.length - 1) {
278
253
  option.classList.add("last");
279
254
  }
280
255
  else {
@@ -388,16 +363,16 @@ export class Select {
388
363
  }
389
364
  updateOptionVisibility() {
390
365
  // this runs for search multiselects, where selected options are rendered at the top of the dropdown list
391
- // slotted wm-options are hidden if selected, and duplicate wm-options are made visible if selected
366
+ // slotted wm-options are hidden if selected, and clone wm-options are made visible if selected
392
367
  this.childOptions.forEach((option, idx) => {
393
- const duplicateOption = this.duplicateOptions[idx];
368
+ const cloneOption = this.cloneOptions[idx];
394
369
  if (option.selected) {
395
370
  option.classList.add("hidden");
396
- duplicateOption.classList.remove("hidden");
371
+ cloneOption.classList.remove("hidden");
397
372
  }
398
373
  else {
399
374
  option.classList.remove("hidden");
400
- duplicateOption.classList.add("hidden");
375
+ cloneOption.classList.add("hidden");
401
376
  }
402
377
  });
403
378
  }
@@ -412,27 +387,6 @@ export class Select {
412
387
  window.setTimeout(() => option.scrollIntoView({ block: "nearest" }), 60);
413
388
  option.focus();
414
389
  }
415
- selectOption(option) {
416
- // beware of this function's name. For multiselect it actually toggles the selected state, so it can also deselect the option
417
- if (option.classList.contains("duplicate")) {
418
- // if clicking on a duplicate option, toggle selected property of real one, then rerender
419
- const correspondingOption = this.findCorrespondingOption(option);
420
- correspondingOption.selected = !correspondingOption.selected;
421
- forceUpdate(this.el);
422
- }
423
- else if (this.multiple) {
424
- option.selected = !option.selected;
425
- }
426
- else {
427
- this.childOptions.forEach((x) => (x.selected = x === option));
428
- }
429
- // update the selectAll checkbox when an option is de/selected
430
- // checking is the el is present, implies that this.multiple and this.selectAll are true
431
- if (this.selectAllEl) {
432
- this.setSelectAllButton();
433
- }
434
- this.setButtonText();
435
- }
436
390
  findAndFocusOption(ev) {
437
391
  const character = ev.detail.toLowerCase();
438
392
  if (!this.keysSoFar) {
@@ -469,12 +423,12 @@ export class Select {
469
423
  return match;
470
424
  }
471
425
  findCorrespondingOption(el) {
472
- // if duplicate, returns the child wm-option
473
- // if child wm-option, returns duplicate
474
- const isDuplicate = el.classList.contains("duplicate");
475
- return isDuplicate
476
- ? this.childOptions[this.duplicateOptions.indexOf(el)]
477
- : this.duplicateOptions[this.childOptions.indexOf(el)];
426
+ // if clone, returns the child wm-option
427
+ // if child wm-option, returns clone
428
+ const isClone = el.classList.contains("clone");
429
+ return isClone
430
+ ? this.childOptions[this.cloneOptions.indexOf(el)]
431
+ : this.cloneOptions[this.childOptions.indexOf(el)];
478
432
  }
479
433
  isElOrChild(el) {
480
434
  var _a;
@@ -555,18 +509,6 @@ export class Select {
555
509
  }
556
510
  }
557
511
  }
558
- setSelectAllButton() {
559
- if (this.allSelected) {
560
- this.selectAllEl.textContent = this.deselectAllMessage;
561
- this.announce(this.allOptionsSelectedMessage);
562
- }
563
- else {
564
- this.selectAllEl.textContent = this.selectAllMessage;
565
- if (this.selectedOptions.length === 0) {
566
- this.announce(this.allOptionsDeselectedMessage);
567
- }
568
- }
569
- }
570
512
  announce(message) {
571
513
  // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
572
514
  if (this.liveRegionEl.textContent === message) {
@@ -597,36 +539,34 @@ export class Select {
597
539
  }
598
540
  }
599
541
  renderSearchField() {
600
- return (h("div", { class: "search" }, h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, h("div", { class: "icon" }), h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": `list-${this.uid}`, "aria-expanded": this.isExpanded ? "true" : "false", onKeyDown: (ev) => this.handleKeyDown(ev), onFocus: () => this.searchFieldWrapperEl.classList.add("focus"), onBlur: (ev) => this.handleSearchFieldBlur(ev), onInput: () => this.debouncedSearch(), placeholder: this.searchPlaceholder }))));
542
+ return (h("div", { class: "search" }, h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, h("div", { class: "icon" }), h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": "list", "aria-expanded": this.isExpanded ? "true" : "false", onKeyDown: (ev) => this.handleKeyDown(ev), onFocus: () => this.searchFieldWrapperEl.classList.add("focus"), onBlur: (ev) => this.handleSearchFieldBlur(ev), onInput: () => this.debouncedSearch(), placeholder: this.searchPlaceholder }))));
601
543
  }
602
544
  renderSearchFailedMessage() {
603
545
  return h("div", { class: "search-results-message" }, this.noResultsFoundMessage);
604
546
  }
605
547
  renderSelectAllButton() {
606
- if (this.selectAll && this.multiple && this.searchTerm == "") {
607
- return (h("button", { ref: (el) => (this.selectAllEl = el), class: "select-all", onClick: () => this.handleSelectAllClick(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: "-1" }, this.allSelected ? this.deselectAllMessage : this.selectAllMessage));
608
- }
548
+ return (h("button", { ref: (el) => (this.selectAllEl = el), class: "select-all", onClick: () => this.handleSelectAllClick(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: "-1" }, this.allSelected ? this.deselectAllMessage : this.selectAllMessage));
609
549
  }
610
- renderDuplicateOptions() {
550
+ renderCloneOptions() {
611
551
  return Array.from(this.el.children).map((option) => {
612
- return (h("wm-option", { class: "duplicate", selected: option.selected }, option.textContent));
552
+ return (h("wm-option", { class: "clone", selected: option.selected }, option.textContent));
613
553
  });
614
554
  }
615
555
  render() {
616
556
  const buttonProps = {
617
- id: `selectbtn-${this.uid}`,
557
+ id: "selectbtn",
618
558
  ["disabled"]: this.isDisabled,
619
- ["aria-controls"]: `list-${this.uid}`,
620
- ["aria-labelledby"]: `label-${this.uid} selectbtn-${this.uid}`,
559
+ ["aria-controls"]: "list",
560
+ ["aria-labelledby"]: "label selectbtn",
621
561
  ["aria-describedby"]: "wm-errors",
622
562
  ["aria-expanded"]: this.isExpanded ? "true" : "false",
623
563
  onClick: () => (this.isExpanded ? this.close() : this.open()),
624
564
  };
625
- return (h(Host, { onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.invalid || this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper" }, h("label", { class: "label", id: `label-${this.uid}`, htmlFor: `selectbtn-${this.uid}` }, this.label,
565
+ return (h(Host, { onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper" }, h("label", { class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
626
566
  // we can't use aria-required or required attributes because it's invalid on the elements we're using (button controlling a listbox)
627
567
  this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", { class: "button-wrapper" }, h("button", Object.assign({}, buttonProps, { class: `displayedoption ${this.isTabbing ? "user-is-tabbing" : ""}`, ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev), onFocus: () => this.close() }), h("span", { class: this.selectedOptions.length > 0 && this.selectedOptions.filter((x) => x.subinfo).length > 0
628
568
  ? "overflowcontrol hassubinfo"
629
- : "overflowcontrol" }, h("span", { class: "button-text" }, this.renderButtonText()), this.renderSubinfo()), this.renderOverflowCount()), h("div", { class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, this.search && this.renderSearchField(), h("div", { id: `list-${this.uid}`, class: "options-wrapper", tabindex: -1, role: "listbox", "aria-multiselectable": this.multiple ? "true" : null, "aria-labelledby": `label-${this.uid}`, ref: (el) => (this.listboxEl = el) }, this.search && this.filteredOptions.length === 0 && this.renderSearchFailedMessage(), this.renderSelectAllButton(), this.multiple && this.renderDuplicateOptions(), h("slot", null))), this.renderErrorContainer(), h("div", { id: "announcement", "aria-live": "polite", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
569
+ : "overflowcontrol" }, h("span", { class: "button-text" }, this.renderButtonText()), this.renderSubinfo()), this.renderOverflowCount()), h("div", { class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, this.search && this.renderSearchField(), this.visibleSelectAllButton && this.renderSelectAllButton(), h("div", { id: "list", class: "options-wrapper", tabindex: -1, role: "listbox", "aria-multiselectable": this.multiple ? "true" : null, "aria-labelledby": "label", ref: (el) => (this.listboxEl = el) }, this.search && this.filteredOptions.length === 0 && this.renderSearchFailedMessage(), this.multiple && this.renderCloneOptions(), h("slot", null))), this.renderErrorContainer(), h("div", { id: "announcement", "aria-live": "polite", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
630
570
  }
631
571
  static get is() { return "wm-select"; }
632
572
  static get encapsulation() { return "shadow"; }
@@ -661,24 +601,6 @@ export class Select {
661
601
  "reflect": true,
662
602
  "defaultValue": "false"
663
603
  },
664
- "invalid": {
665
- "type": "boolean",
666
- "mutable": true,
667
- "complexType": {
668
- "original": "boolean",
669
- "resolved": "boolean",
670
- "references": {}
671
- },
672
- "required": false,
673
- "optional": false,
674
- "docs": {
675
- "tags": [],
676
- "text": ""
677
- },
678
- "attribute": "invalid",
679
- "reflect": false,
680
- "defaultValue": "false"
681
- },
682
604
  "maxHeight": {
683
605
  "type": "string",
684
606
  "mutable": false,
@@ -916,8 +838,8 @@ export class Select {
916
838
  "references": {}
917
839
  }
918
840
  }, {
919
- "method": "wmSelectChanged",
920
- "name": "wmSelectChanged",
841
+ "method": "wmSelectSearchChanged",
842
+ "name": "wmSelectSearchChanged",
921
843
  "bubbles": true,
922
844
  "cancelable": true,
923
845
  "composed": true,
@@ -935,8 +857,8 @@ export class Select {
935
857
  }
936
858
  }
937
859
  }, {
938
- "method": "wmSelectSearchChanged",
939
- "name": "wmSelectSearchChanged",
860
+ "method": "wmSelectAllSelected",
861
+ "name": "wmSelectAllSelected",
940
862
  "bubbles": true,
941
863
  "cancelable": true,
942
864
  "composed": true,
@@ -945,13 +867,24 @@ export class Select {
945
867
  "text": ""
946
868
  },
947
869
  "complexType": {
948
- "original": "Object",
949
- "resolved": "Object",
950
- "references": {
951
- "Object": {
952
- "location": "global"
953
- }
954
- }
870
+ "original": "any",
871
+ "resolved": "any",
872
+ "references": {}
873
+ }
874
+ }, {
875
+ "method": "wmSelectAllDeselected",
876
+ "name": "wmSelectAllDeselected",
877
+ "bubbles": true,
878
+ "cancelable": true,
879
+ "composed": true,
880
+ "docs": {
881
+ "tags": [],
882
+ "text": ""
883
+ },
884
+ "complexType": {
885
+ "original": "any",
886
+ "resolved": "any",
887
+ "references": {}
955
888
  }
956
889
  }];
957
890
  }
@@ -984,6 +917,12 @@ export class Select {
984
917
  "target": undefined,
985
918
  "capture": false,
986
919
  "passive": false
920
+ }, {
921
+ "name": "intCloneClicked",
922
+ "method": "handleOptionCloneSelection",
923
+ "target": undefined,
924
+ "capture": false,
925
+ "passive": false
987
926
  }, {
988
927
  "name": "wmEnterKeyPressed",
989
928
  "method": "handleChildEnter",
@@ -1,6 +1,5 @@
1
1
  import { newSpecPage } from "@stencil/core/testing";
2
2
  import * as globalFuncs from "../../global/functions";
3
- jest.spyOn(globalFuncs, "generateId").mockImplementation(() => "random-id");
4
3
  jest.spyOn(globalFuncs, "getTextDir").mockImplementation(() => "rtl");
5
4
  import { Select } from "./wm-select";
6
5
  import { Option } from "../wm-option/wm-option";
@@ -14,7 +13,7 @@ describe("wm-select", () => {
14
13
  it("builds", async () => {
15
14
  const comp = await newSpecPage({
16
15
  components: [Select, Option],
17
- html: '<wm-select label="mock label"><wm-option></wm-option></wm-select>',
16
+ html: '<wm-select label="mock label"><wm-option selected></wm-option></wm-select>',
18
17
  });
19
18
  expect(comp.root).toMatchSnapshot();
20
19
  });
@@ -24,7 +23,6 @@ describe("wm-select", () => {
24
23
  expect(select).toHaveProperty("labelPosition");
25
24
  expect(select).toHaveProperty("maxHeight");
26
25
  expect(select).toHaveProperty("requiredField");
27
- expect(select).toHaveProperty("invalid");
28
26
  expect(select).toHaveProperty("errorMessage");
29
27
  expect(select).toHaveProperty("disabled");
30
28
  expect(select).toHaveProperty("multiple");
@@ -39,26 +37,26 @@ describe("wm-select", () => {
39
37
  it("has the right roles", async () => {
40
38
  const page = await newSpecPage({
41
39
  components: [Select, Option],
42
- html: '<wm-select search label="mock label"><wm-option>First option</wm-option></wm-select>',
40
+ html: '<wm-select id="random-id" search label="mock label"><wm-option selected>First option</wm-option></wm-select>',
43
41
  });
44
42
  const searchFieldEl = await page.root.shadowRoot.querySelector(".searchfield");
45
- const listboxEl = await page.root.shadowRoot.querySelector("#list-random-id");
43
+ const listboxEl = await page.root.shadowRoot.querySelector("#list");
46
44
  expect(listboxEl).toEqualAttribute("role", "listbox");
47
45
  expect(listboxEl).not.toHaveAttribute("aria-multiselectable"); // only multiselect
48
46
  expect(searchFieldEl).toEqualAttribute("role", "combobox");
49
47
  });
50
48
  it("multiselect has multiselectable aria attr", async () => {
51
49
  const page = await newSpecPage({
52
- components: [Select],
50
+ components: [Select, Option],
53
51
  html: '<wm-select multiple label="mock label"><wm-option>1</wm-option></wm-select>',
54
52
  });
55
- const listboxEl = await page.root.shadowRoot.querySelector("#list-random-id");
53
+ const listboxEl = await page.root.shadowRoot.querySelector("#list");
56
54
  expect(listboxEl).toHaveAttribute("aria-multiselectable");
57
55
  });
58
56
  it("displays error message", async () => {
59
57
  const page = await newSpecPage({
60
- components: [Select],
61
- html: '<wm-select error-message="test error" label="mock label"><wm-option></wm-option></wm-select>',
58
+ components: [Select, Option],
59
+ html: '<wm-select error-message="test error" label="mock label"><wm-option selected></wm-option></wm-select>',
62
60
  });
63
61
  const errorMessage = await page.root.shadowRoot.querySelector(".error-message");
64
62
  expect(errorMessage.textContent).toBe("test error");
@@ -242,7 +240,7 @@ describe("wm-select", () => {
242
240
  it("doesn't show select-all button when prop is not set", async () => {
243
241
  const page = await newSpecPage({
244
242
  components: [Select, Option],
245
- html: '<wm-select label="mock label"><wm-option></wm-option></wm-select>',
243
+ html: '<wm-select label="mock label"><wm-option selected></wm-option></wm-select>',
246
244
  });
247
245
  const btn = page.root.shadowRoot.querySelector(".select-all");
248
246
  expect(btn).toBeNull();
@@ -250,7 +248,7 @@ describe("wm-select", () => {
250
248
  it("doesn't show select-all button when prop is set but multiple is not", async () => {
251
249
  const page = await newSpecPage({
252
250
  components: [Select, Option],
253
- html: '<wm-select select-all label="mock label"><wm-option></wm-option></wm-select>',
251
+ html: '<wm-select select-all label="mock label"><wm-option selected></wm-option></wm-select>',
254
252
  });
255
253
  const btn = page.root.shadowRoot.querySelector(".select-all");
256
254
  expect(btn).toBeNull();
@@ -45,7 +45,6 @@
45
45
  :host .tabcontainer {
46
46
  background: var(--wmcolor-tab-background);
47
47
  margin: 0;
48
- margin-left: -24px;
49
48
  width: 100%;
50
49
  height: 4.0625rem;
51
50
  display: flex;
@@ -234,7 +234,7 @@
234
234
  :host .tag-area:focus {
235
235
  outline: none;
236
236
  }
237
- :host .tag-area [role=option] {
237
+ :host .tag-area li {
238
238
  display: inline-flex;
239
239
  align-items: center;
240
240
  height: 1.75rem;
@@ -245,7 +245,7 @@
245
245
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
246
246
  white-space: pre;
247
247
  }
248
- :host .tag-area [role=option].highlight {
248
+ :host .tag-area li.highlight {
249
249
  animation: fadeIn 1s;
250
250
  }
251
251
  @keyframes fadeIn {
@@ -259,14 +259,14 @@
259
259
  background-color: var(--wmcolor-taginput-tag-background);
260
260
  }
261
261
  }
262
- :host .tag-area [role=option].focused {
262
+ :host .tag-area li.focused {
263
263
  background-color: var(--wmcolor-taginput-tag-background-focus);
264
264
  }
265
- :host .tag-area [role=option].locked {
265
+ :host .tag-area li.locked {
266
266
  background-color: var(--wmcolor-taginput-tag-background-locked);
267
267
  color: var(--wmcolor-taginput-tag-text-locked);
268
268
  }
269
- :host .tag-area [role=option] .icon {
269
+ :host .tag-area li .icon {
270
270
  display: inline-flex;
271
271
  justify-content: center;
272
272
  align-items: center;
@@ -275,18 +275,18 @@
275
275
  padding: 0;
276
276
  margin-left: 0.5rem;
277
277
  }
278
- :host .tag-area [role=option] .icon.remove-btn {
278
+ :host .tag-area li .icon.remove-btn {
279
279
  border: 1px solid var(--wmcolor-taginput-tagbutton-border);
280
280
  color: var(--wmcolor-taginput-tagbutton-icon);
281
281
  border-radius: 50%;
282
282
  cursor: pointer;
283
283
  transition: background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1);
284
284
  }
285
- :host .tag-area [role=option] .icon.remove-btn:hover {
285
+ :host .tag-area li .icon.remove-btn:hover {
286
286
  color: var(--wmcolor-taginput-tagbutton-icon-hover);
287
287
  background-color: var(--wmcolor-taginput-tagbutton-background-hover);
288
288
  }
289
- :host .tag-area [role=option] .icon.remove-btn:before {
289
+ :host .tag-area li .icon.remove-btn:before {
290
290
  display: inline-block;
291
291
  font: normal normal normal 24px/1 "Material Design Icons";
292
292
  font-size: inherit;
@@ -296,10 +296,10 @@
296
296
  -moz-osx-font-smoothing: grayscale;
297
297
  content: "\f156";
298
298
  }
299
- :host .tag-area [role=option] .icon.lock {
299
+ :host .tag-area li .icon.lock {
300
300
  color: var(--wmcolor-taginput-tag-text-locked);
301
301
  }
302
- :host .tag-area [role=option] .icon.lock:before {
302
+ :host .tag-area li .icon.lock:before {
303
303
  display: inline-block;
304
304
  font: normal normal normal 24px/1 "Material Design Icons";
305
305
  font-size: inherit;
@@ -317,13 +317,10 @@
317
317
  margin: 0;
318
318
  right: 8px;
319
319
  }
320
- :host .input.hidden {
321
- display: none;
322
- }
323
320
  :host .input:focus {
324
321
  outline: none;
325
322
  }
326
- :host .tag-area + .input.extended {
323
+ :host .tag-area:not(.empty) + .input.extended {
327
324
  margin-block-start: 8px;
328
325
  }
329
326
  :host .dropdown-wrapper {
@@ -387,8 +384,8 @@
387
384
  white-space: pre-wrap;
388
385
  overflow-wrap: anywhere;
389
386
  }
390
- :host .dropdown-wrapper li[role=option], :host .dropdown-wrapper li.add-new-btn,
391
- :host .dropdown-wrapper div[role=option],
387
+ :host .dropdown-wrapper li.option, :host .dropdown-wrapper li.add-new-btn,
388
+ :host .dropdown-wrapper div.option,
392
389
  :host .dropdown-wrapper div.add-new-btn {
393
390
  cursor: pointer;
394
391
  color: var(--wmcolor-taginput-option-text);
@@ -396,17 +393,17 @@
396
393
  width: 100%;
397
394
  border: none;
398
395
  }
399
- :host .dropdown-wrapper li[role=option][aria-selected=true], :host .dropdown-wrapper li.add-new-btn[aria-selected=true],
400
- :host .dropdown-wrapper div[role=option][aria-selected=true],
396
+ :host .dropdown-wrapper li.option[aria-selected=true], :host .dropdown-wrapper li.add-new-btn[aria-selected=true],
397
+ :host .dropdown-wrapper div.option[aria-selected=true],
401
398
  :host .dropdown-wrapper div.add-new-btn[aria-selected=true] {
402
399
  color: var(--wmcolor-taginput-option-text-selected);
403
400
  font-style: italic;
404
401
  font-weight: normal;
405
402
  cursor: unset;
406
403
  }
407
- :host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]), :host .dropdown-wrapper li[role=option].focused, :host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]), :host .dropdown-wrapper li.add-new-btn.focused,
408
- :host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),
409
- :host .dropdown-wrapper div[role=option].focused,
404
+ :host .dropdown-wrapper li.option:hover:not([aria-selected=true]), :host .dropdown-wrapper li.option.focused, :host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]), :host .dropdown-wrapper li.add-new-btn.focused,
405
+ :host .dropdown-wrapper div.option:hover:not([aria-selected=true]),
406
+ :host .dropdown-wrapper div.option.focused,
410
407
  :host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),
411
408
  :host .dropdown-wrapper div.add-new-btn.focused {
412
409
  outline: none;
@@ -454,7 +451,7 @@
454
451
  :host .table-wrapper tr:nth-child(even) {
455
452
  background-color: var(--wmcolor-taginput-altrow-background-table);
456
453
  }
457
- :host .table-wrapper tr.selected {
454
+ :host .table-wrapper tr.selected, :host .table-wrapper tr.locked {
458
455
  background-color: var(--wmcolor-taginput-row-background-selected);
459
456
  box-shadow: inset 0 0 0 1px var(--wmcolor-taginput-row-border-selected);
460
457
  font-weight: 500;
@@ -77,9 +77,9 @@ describe("wm-tag-input", () => {
77
77
  col-wrap="wrap,trunc,wrap"
78
78
  selected-tags="johnprice1"
79
79
  >
80
- <wm-tag-input-row id="johnprice1" col1="John Price" col2="john.price1@university.edu" col3="Admin" locked></wm-tag-input-row>
81
- <wm-tag-input-row id="johnprice2" col1="John Price" col2="john.price2@university.edu" col3="Faculty"></wm-tag-input-row>
82
- <wm-tag-input-row id="samsandwich" col1="Sam Sandwich" col2="sam.sandwich@university.edu" col3="Faculty"></wm-tag-input-row>
80
+ <wm-tag-option id="johnprice1" col1="John Price" col2="john.price1@university.edu" col3="Admin" locked></wm-tag-option>
81
+ <wm-tag-option id="johnprice2" col1="John Price" col2="john.price2@university.edu" col3="Faculty"></wm-tag-option>
82
+ <wm-tag-option id="samsandwich" col1="Sam Sandwich" col2="sam.sandwich@university.edu" col3="Faculty"></wm-tag-option>
83
83
  </wm-tag-input>
84
84
  </main></body></html>`);
85
85
  await page.waitForChanges();