@watermarkinsights/ripple 5.19.1-alpha.2 → 5.19.2-alpha.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 (194) hide show
  1. package/dist/cjs/{app-globals-ad5069a2.js → app-globals-1f3f0250.js} +19 -17
  2. package/dist/cjs/{chartFunctions-ce91b2c9.js → chartFunctions-ab373ead.js} +1 -1
  3. package/dist/cjs/{functions-ea3eae05.js → functions-2c94aae4.js} +2 -6
  4. package/dist/cjs/{intl-ea56dd40.js → intl-01be9673.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/priv-calendar.cjs.entry.js +1 -1
  7. package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
  8. package/dist/cjs/priv-option-list.cjs.entry.js +6 -4
  9. package/dist/cjs/ripple.cjs.js +2 -2
  10. package/dist/cjs/wm-action-menu_2.cjs.entry.js +1 -1
  11. package/dist/cjs/wm-button.cjs.entry.js +1 -1
  12. package/dist/cjs/wm-chart.cjs.entry.js +3 -3
  13. package/dist/cjs/wm-date-range.cjs.entry.js +1 -1
  14. package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
  15. package/dist/cjs/wm-file.cjs.entry.js +1 -1
  16. package/dist/cjs/wm-flyout.cjs.entry.js +2 -2
  17. package/dist/cjs/wm-input.cjs.entry.js +2 -2
  18. package/dist/cjs/wm-line-chart.cjs.entry.js +3 -3
  19. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +2 -2
  20. package/dist/cjs/wm-modal_3.cjs.entry.js +2 -2
  21. package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
  22. package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
  23. package/dist/cjs/wm-nested-select.cjs.entry.js +2 -2
  24. package/dist/cjs/wm-optgroup.cjs.entry.js +1 -1
  25. package/dist/cjs/wm-option_2.cjs.entry.js +97 -188
  26. package/dist/cjs/wm-pagination.cjs.entry.js +2 -2
  27. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
  28. package/dist/cjs/wm-search.cjs.entry.js +2 -2
  29. package/dist/cjs/wm-snackbar.cjs.entry.js +2 -2
  30. package/dist/cjs/wm-tab-item_3.cjs.entry.js +1 -1
  31. package/dist/cjs/wm-tag-input.cjs.entry.js +2 -2
  32. package/dist/cjs/wm-tag-option.cjs.entry.js +1 -1
  33. package/dist/cjs/wm-textarea.cjs.entry.js +2 -2
  34. package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
  35. package/dist/cjs/wm-toggletip.cjs.entry.js +5 -5
  36. package/dist/cjs/wm-uploader.cjs.entry.js +2 -2
  37. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +4 -2
  38. package/dist/collection/components/selects/wm-select/wm-select.css +51 -79
  39. package/dist/collection/components/selects/wm-select/wm-select.js +110 -197
  40. package/dist/collection/components/wm-toggletip/wm-toggletip.js +4 -4
  41. package/dist/collection/global/functions.js +2 -6
  42. package/dist/collection/global/global.js +18 -16
  43. package/dist/esm/{app-globals-14723564.js → app-globals-f5d40a5d.js} +19 -17
  44. package/dist/esm/{chartFunctions-613e9c87.js → chartFunctions-311cdb3b.js} +1 -1
  45. package/dist/esm/{functions-38e392cb.js → functions-e76f6f72.js} +3 -7
  46. package/dist/esm/{intl-0b8f342e.js → intl-506609bf.js} +1 -1
  47. package/dist/esm/loader.js +2 -2
  48. package/dist/esm/priv-calendar.entry.js +1 -1
  49. package/dist/esm/priv-chart-popover.entry.js +1 -1
  50. package/dist/esm/priv-option-list.entry.js +6 -4
  51. package/dist/esm/ripple.js +2 -2
  52. package/dist/esm/wm-action-menu_2.entry.js +1 -1
  53. package/dist/esm/wm-button.entry.js +1 -1
  54. package/dist/esm/wm-chart.entry.js +3 -3
  55. package/dist/esm/wm-date-range.entry.js +1 -1
  56. package/dist/esm/wm-datepicker.entry.js +1 -1
  57. package/dist/esm/wm-file.entry.js +1 -1
  58. package/dist/esm/wm-flyout.entry.js +2 -2
  59. package/dist/esm/wm-input.entry.js +2 -2
  60. package/dist/esm/wm-line-chart.entry.js +3 -3
  61. package/dist/esm/wm-modal-pss_3.entry.js +2 -2
  62. package/dist/esm/wm-modal_3.entry.js +2 -2
  63. package/dist/esm/wm-navigation_3.entry.js +2 -2
  64. package/dist/esm/wm-navigator.entry.js +1 -1
  65. package/dist/esm/wm-nested-select.entry.js +2 -2
  66. package/dist/esm/wm-optgroup.entry.js +1 -1
  67. package/dist/esm/wm-option_2.entry.js +97 -188
  68. package/dist/esm/wm-pagination.entry.js +2 -2
  69. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  70. package/dist/esm/wm-search.entry.js +2 -2
  71. package/dist/esm/wm-snackbar.entry.js +2 -2
  72. package/dist/esm/wm-tab-item_3.entry.js +1 -1
  73. package/dist/esm/wm-tag-input.entry.js +2 -2
  74. package/dist/esm/wm-tag-option.entry.js +1 -1
  75. package/dist/esm/wm-textarea.entry.js +2 -2
  76. package/dist/esm/wm-timepicker.entry.js +1 -1
  77. package/dist/esm/wm-toggletip.entry.js +5 -5
  78. package/dist/esm/wm-uploader.entry.js +2 -2
  79. package/dist/esm-es5/app-globals-f5d40a5d.js +1 -0
  80. package/dist/esm-es5/{chartFunctions-613e9c87.js → chartFunctions-311cdb3b.js} +1 -1
  81. package/dist/esm-es5/{functions-38e392cb.js → functions-e76f6f72.js} +1 -1
  82. package/dist/esm-es5/{intl-0b8f342e.js → intl-506609bf.js} +1 -1
  83. package/dist/esm-es5/loader.js +1 -1
  84. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  85. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  86. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  87. package/dist/esm-es5/ripple.js +1 -1
  88. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  89. package/dist/esm-es5/wm-button.entry.js +1 -1
  90. package/dist/esm-es5/wm-chart.entry.js +1 -1
  91. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  92. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  93. package/dist/esm-es5/wm-file.entry.js +1 -1
  94. package/dist/esm-es5/wm-flyout.entry.js +1 -1
  95. package/dist/esm-es5/wm-input.entry.js +1 -1
  96. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  97. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
  98. package/dist/esm-es5/wm-modal_3.entry.js +1 -1
  99. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  100. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  101. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  102. package/dist/esm-es5/wm-optgroup.entry.js +1 -1
  103. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  104. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  105. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  106. package/dist/esm-es5/wm-search.entry.js +1 -1
  107. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  108. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  109. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  110. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  111. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  112. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  113. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  114. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  115. package/dist/ripple/{p-86a61a2a.entry.js → p-0456a50d.entry.js} +1 -1
  116. package/dist/ripple/{p-a14dee02.system.entry.js → p-05958c57.system.entry.js} +1 -1
  117. package/dist/ripple/{p-a5c5c64c.entry.js → p-0681ae2e.entry.js} +1 -1
  118. package/dist/ripple/p-0b4b139c.system.js +1 -0
  119. package/dist/ripple/{p-908057b2.entry.js → p-0c64a185.entry.js} +1 -1
  120. package/dist/ripple/p-0feb88f9.entry.js +1 -0
  121. package/dist/ripple/{p-7134a305.system.entry.js → p-17291d8e.system.entry.js} +1 -1
  122. package/dist/ripple/{p-65abcbb4.system.js → p-1782d5b2.system.js} +1 -1
  123. package/dist/ripple/{p-f4390a0a.system.entry.js → p-1d88dc34.system.entry.js} +1 -1
  124. package/dist/ripple/{p-fbad04d7.system.entry.js → p-2a4a0d9d.system.entry.js} +1 -1
  125. package/dist/ripple/{p-2508b801.entry.js → p-36d3af93.entry.js} +1 -1
  126. package/dist/ripple/{p-f91fc18d.entry.js → p-36fd0ca5.entry.js} +1 -1
  127. package/dist/ripple/{p-1de87de8.system.entry.js → p-379ac7b3.system.entry.js} +1 -1
  128. package/dist/ripple/{p-be87d02c.entry.js → p-408b25f3.entry.js} +1 -1
  129. package/dist/ripple/{p-0825151e.entry.js → p-44f0c380.entry.js} +1 -1
  130. package/dist/ripple/{p-2db6573e.system.entry.js → p-464f6757.system.entry.js} +1 -1
  131. package/dist/ripple/{p-4602304a.system.entry.js → p-4a73b304.system.entry.js} +1 -1
  132. package/dist/ripple/{p-700ca4a0.entry.js → p-514d3726.entry.js} +1 -1
  133. package/dist/ripple/{p-0bce3f83.entry.js → p-5a9bf0e0.entry.js} +1 -1
  134. package/dist/ripple/{p-ce9bb8ac.system.entry.js → p-5b9b1b50.system.entry.js} +1 -1
  135. package/dist/ripple/{p-c7f3ef7f.system.entry.js → p-5eaa2b5d.system.entry.js} +1 -1
  136. package/dist/ripple/{p-9e89655f.entry.js → p-63dfc933.entry.js} +1 -1
  137. package/dist/ripple/{p-31bac55d.entry.js → p-6614468e.entry.js} +1 -1
  138. package/dist/ripple/{p-d815809f.js → p-684e7777.js} +1 -1
  139. package/dist/ripple/{p-4b8f7d1e.entry.js → p-6c3ae5b5.entry.js} +1 -1
  140. package/dist/ripple/{p-e5c34af5.system.entry.js → p-6d4cc246.system.entry.js} +1 -1
  141. package/dist/ripple/{p-e660d0b8.system.entry.js → p-7b9121f4.system.entry.js} +1 -1
  142. package/dist/ripple/{p-7edd25f7.system.js → p-80ea7a4d.system.js} +1 -1
  143. package/dist/ripple/{p-63233a4b.system.entry.js → p-85972d48.system.entry.js} +1 -1
  144. package/dist/ripple/{p-3133ce3c.system.entry.js → p-8cde5d2b.system.entry.js} +1 -1
  145. package/dist/ripple/{p-85830dbc.system.entry.js → p-8e8f78e7.system.entry.js} +1 -1
  146. package/dist/ripple/{p-118093e1.entry.js → p-93dfab08.entry.js} +1 -1
  147. package/dist/ripple/p-976fc44a.entry.js +1 -0
  148. package/dist/ripple/{p-bde7e77b.system.entry.js → p-97bed286.system.entry.js} +1 -1
  149. package/dist/ripple/{p-4d0abf7a.entry.js → p-9e0b95a7.entry.js} +1 -1
  150. package/dist/ripple/{p-6f38976c.entry.js → p-a1b7e69a.entry.js} +1 -1
  151. package/dist/ripple/{p-ecd1c2ba.entry.js → p-ac40ffce.entry.js} +1 -1
  152. package/dist/ripple/{p-60e16c79.entry.js → p-ad31cee9.entry.js} +1 -1
  153. package/dist/ripple/{p-2f82bfb9.system.entry.js → p-ad8a733b.system.entry.js} +1 -1
  154. package/dist/ripple/{p-b1fb99e4.system.entry.js → p-ae86ca36.system.entry.js} +1 -1
  155. package/dist/ripple/{p-26667070.entry.js → p-b1e17bb6.entry.js} +1 -1
  156. package/dist/ripple/{p-8ec6ec53.entry.js → p-bcb5c9fe.entry.js} +1 -1
  157. package/dist/ripple/{p-374f46f4.entry.js → p-be5b0eaa.entry.js} +1 -1
  158. package/dist/ripple/{p-7c3bf608.entry.js → p-c364a1e1.entry.js} +1 -1
  159. package/dist/ripple/{p-abcdd7be.system.entry.js → p-c3c603a1.system.entry.js} +1 -1
  160. package/dist/ripple/{p-a7cde3fc.entry.js → p-c3fe83ad.entry.js} +1 -1
  161. package/dist/ripple/{p-957f13fb.entry.js → p-c4d8e040.entry.js} +1 -1
  162. package/dist/ripple/{p-9609d8e7.entry.js → p-c58f0620.entry.js} +1 -1
  163. package/dist/ripple/{p-f9bbb123.system.entry.js → p-c5cffa46.system.entry.js} +1 -1
  164. package/dist/ripple/{p-667fdcbb.system.entry.js → p-cc096873.system.entry.js} +1 -1
  165. package/dist/ripple/{p-6a70dc0b.system.entry.js → p-cc92d61f.system.entry.js} +1 -1
  166. package/dist/ripple/{p-8e2f3a45.entry.js → p-cff18ef4.entry.js} +1 -1
  167. package/dist/ripple/{p-39a4934f.entry.js → p-d1d9bbe6.entry.js} +1 -1
  168. package/dist/ripple/{p-96f86eb4.system.entry.js → p-d92edd52.system.entry.js} +1 -1
  169. package/dist/ripple/{p-5405df80.system.entry.js → p-db950d3f.system.entry.js} +1 -1
  170. package/dist/ripple/{p-2b7259cb.system.entry.js → p-de9a368b.system.entry.js} +1 -1
  171. package/dist/ripple/{p-44cc05f6.system.entry.js → p-e6c271f2.system.entry.js} +1 -1
  172. package/dist/ripple/{p-b511ebfd.js → p-e8290b83.js} +1 -1
  173. package/dist/ripple/{p-41664372.entry.js → p-e8bbb8e3.entry.js} +1 -1
  174. package/dist/ripple/{p-92c8361f.js → p-e9843e06.js} +1 -1
  175. package/dist/ripple/p-e9fdbdbc.system.entry.js +1 -0
  176. package/dist/ripple/{p-9202d9e9.entry.js → p-eae2a07a.entry.js} +1 -1
  177. package/dist/ripple/{p-960d2cf0.system.entry.js → p-eb2705a9.system.entry.js} +1 -1
  178. package/dist/ripple/{p-608971f2.system.js → p-ed022fc4.system.js} +1 -1
  179. package/dist/ripple/p-ef51b5d3.js +1 -0
  180. package/dist/ripple/p-f5255c71.system.js +1 -0
  181. package/dist/ripple/{p-00eaa361.system.entry.js → p-f787d875.system.entry.js} +1 -1
  182. package/dist/ripple/{p-3d8754ba.system.entry.js → p-f87dc782.system.entry.js} +1 -1
  183. package/dist/ripple/{p-1a89139d.system.entry.js → p-f95cb0a1.system.entry.js} +1 -1
  184. package/dist/ripple/ripple.esm.js +1 -1
  185. package/dist/ripple/ripple.js +1 -1
  186. package/dist/types/components/selects/wm-select/wm-select.d.ts +9 -17
  187. package/package.json +2 -2
  188. package/dist/esm-es5/app-globals-14723564.js +0 -1
  189. package/dist/ripple/p-0a46b050.entry.js +0 -1
  190. package/dist/ripple/p-39936fc9.system.entry.js +0 -1
  191. package/dist/ripple/p-4b322285.entry.js +0 -1
  192. package/dist/ripple/p-95d0c131.system.js +0 -1
  193. package/dist/ripple/p-b0e81de1.js +0 -1
  194. package/dist/ripple/p-bcb953cf.system.js +0 -1
@@ -878,10 +878,6 @@
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
- --button-width: auto;
882
- --dropdown-left: 0;
883
- --dropdown-translate-y: 0;
884
- --dropdown-max-height: none;
885
881
  position: relative;
886
882
  display: block;
887
883
  box-sizing: border-box;
@@ -979,16 +975,14 @@
979
975
  margin-left: 0.75rem;
980
976
  }
981
977
 
982
- .button-wrapper {
978
+ .wrapper .button-wrapper {
983
979
  position: relative;
984
980
  flex: 1;
985
981
  font-size: 1.125rem;
986
982
  color: var(--wmcolor-select-text);
987
983
  min-width: 8.75rem;
988
984
  }
989
-
990
- .displayedoption {
991
- anchor-name: --select-button;
985
+ .wrapper .button-wrapper .displayedoption {
992
986
  -webkit-border-radius: 3px;
993
987
  -moz-border-radius: 3px;
994
988
  -ms-border-radius: 3px;
@@ -1015,124 +1009,118 @@
1015
1009
  text-align: left;
1016
1010
  }
1017
1011
  @media only screen and (max-width: 768px) {
1018
- .displayedoption {
1012
+ .wrapper .button-wrapper .displayedoption {
1019
1013
  height: 2.75rem;
1020
1014
  }
1021
1015
  }
1022
- .displayedoption .expand-icon {
1016
+ .wrapper .button-wrapper .displayedoption .expand-icon {
1023
1017
  --icon-size: 1.125rem;
1024
1018
  position: absolute;
1025
1019
  inset-inline-end: 0.5625rem;
1026
1020
  }
1027
- .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised) {
1021
+ .wrapper .button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised) {
1028
1022
  background: var(--wmcolor-select-background);
1029
1023
  text-decoration: none;
1030
1024
  }
1031
- .displayedoption:active {
1025
+ .wrapper .button-wrapper .displayedoption:active {
1032
1026
  -ms-transform: initial;
1033
1027
  transform: initial;
1034
1028
  }
1035
- .displayedoption:focus {
1029
+ .wrapper .button-wrapper .displayedoption:focus {
1036
1030
  outline: none;
1037
1031
  }
1038
- .displayedoption::-moz-focus-inner {
1032
+ .wrapper .button-wrapper .displayedoption::-moz-focus-inner {
1039
1033
  border: 0;
1040
1034
  }
1041
- .displayedoption:focus-visible {
1035
+ .wrapper .button-wrapper .displayedoption:focus-visible {
1042
1036
  outline: 3px solid var(--wmcolor-interactive-focus);
1043
1037
  outline-offset: 2px;
1044
1038
  }
1045
- .displayedoption .overflowcontrol {
1039
+ .wrapper .button-wrapper .displayedoption .overflowcontrol {
1046
1040
  display: block;
1047
1041
  white-space: nowrap;
1048
1042
  text-overflow: ellipsis;
1049
1043
  overflow: hidden;
1050
1044
  flex: 1;
1051
1045
  }
1052
- .displayedoption .overflowcontrol.hassubinfo {
1046
+ .wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo {
1053
1047
  display: flex;
1054
1048
  }
1055
- .displayedoption .overflowcontrol.hassubinfo .button-text {
1049
+ .wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text {
1056
1050
  flex: 1;
1057
1051
  text-overflow: ellipsis;
1058
1052
  overflow: hidden;
1059
1053
  min-width: 0;
1060
1054
  }
1061
- .displayedoption .overflowcontrol.hassubinfo .subinfo {
1055
+ .wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo {
1062
1056
  flex: none;
1063
1057
  font-style: italic;
1064
1058
  }
1065
- .displayedoption .overflow-counter {
1059
+ .wrapper .button-wrapper .displayedoption .overflow-counter {
1066
1060
  font-weight: bold;
1067
1061
  margin-left: 0.5rem;
1068
1062
  }
1069
-
1070
- .displayedoption[disabled] {
1063
+ .wrapper .button-wrapper > .displayedoption[disabled] {
1071
1064
  color: var(--wmcolor-select-option-text-disabled);
1072
1065
  border-color: var(--wmcolor-border-dark);
1073
1066
  background: var(--wmcolor-select-option-background-disabled);
1074
1067
  cursor: default;
1075
1068
  }
1076
-
1077
- .dropdown {
1078
- margin: 0;
1079
- padding: 0;
1080
- width: unset;
1069
+ .wrapper .button-wrapper > .dropdown {
1070
+ -webkit-overflow-scrolling: touch;
1081
1071
  -webkit-box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.2);
1082
1072
  -moz-box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.2);
1083
1073
  box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.2);
1084
- border: none;
1074
+ -ms-transition: transform 0.25s ease;
1075
+ -webkit-transition: transform 0.25s ease;
1076
+ -moz-transition: transform 0.25s ease;
1077
+ transition: transform 0.25s ease;
1078
+ -ms-transform: scale(1, 0);
1079
+ -webkit-transform: scale(1, 0);
1080
+ -moz-transform: scale(1, 0);
1081
+ transform: scale(1, 0);
1082
+ -ms-transform-origin: center top;
1083
+ -webkit-transform-origin: center top;
1084
+ -moz-transform-origin: center top;
1085
+ transform-origin: center top;
1085
1086
  -webkit-border-radius: 3px;
1086
1087
  -moz-border-radius: 3px;
1087
1088
  -ms-border-radius: 3px;
1088
1089
  border-radius: 3px;
1089
- -webkit-overflow-scrolling: touch;
1090
+ position: absolute;
1091
+ top: 40px;
1092
+ right: 0;
1090
1093
  background: var(--wmcolor-select-option-background);
1094
+ z-index: 100;
1095
+ width: 100%;
1091
1096
  font-size: 0.875rem;
1092
1097
  max-height: var(--max-height);
1093
1098
  overflow-y: auto;
1094
1099
  }
1095
- .dropdown.hidden {
1100
+ .wrapper .button-wrapper > .dropdown.upwards {
1101
+ top: unset;
1102
+ bottom: 100%;
1103
+ -ms-transform-origin: center bottom;
1104
+ -webkit-transform-origin: center bottom;
1105
+ -moz-transform-origin: center bottom;
1106
+ transform-origin: center bottom;
1107
+ }
1108
+ .wrapper .button-wrapper > .dropdown.hidden {
1096
1109
  visibility: hidden;
1097
1110
  }
1098
-
1099
- @supports (top: anchor(bottom)) {
1100
- .dropdown:popover-open {
1101
- transform: scaleY(1);
1102
- transition: transform 0.25s ease;
1103
- position: absolute;
1104
- position-anchor: --select-button;
1105
- top: anchor(bottom);
1106
- left: anchor(left);
1107
- right: anchor(right);
1108
- position-try-fallbacks: --pop-downward, --pop-upward;
1109
- transform-origin: center top;
1110
- }
1111
- .dropdown:popover-open.upward {
1112
- transform-origin: center bottom;
1113
- }
1114
- @starting-style {
1115
- .dropdown:popover-open {
1116
- transform: scaleY(0);
1117
- }
1118
- }
1119
- @position-try --pop-downward {
1120
- bottom: unset;
1121
- top: anchor(bottom);
1122
- }
1123
- @position-try --pop-upward {
1124
- top: unset;
1125
- bottom: anchor(top);
1126
- }
1111
+ .wrapper .button-wrapper > .dropdown.open {
1112
+ -ms-transform: scale(1, 1);
1113
+ -webkit-transform: scale(1, 1);
1114
+ -moz-transform: scale(1, 1);
1115
+ transform: scale(1, 1);
1127
1116
  }
1128
- .invalid .displayedoption {
1117
+ .wrapper.invalid .button-wrapper .displayedoption {
1129
1118
  -webkit-box-shadow: 0 0 0 1px var(--wmcolor-border-error);
1130
1119
  -moz-box-shadow: 0 0 0 1px var(--wmcolor-border-error);
1131
1120
  box-shadow: 0 0 0 1px var(--wmcolor-border-error);
1132
1121
  border-color: var(--wmcolor-border-error);
1133
1122
  }
1134
-
1135
- .error-message {
1123
+ .wrapper .error-message {
1136
1124
  display: block;
1137
1125
  font-style: italic;
1138
1126
  color: var(--wmcolor-text-error);
@@ -1141,7 +1129,7 @@
1141
1129
  top: 100%;
1142
1130
  left: 0;
1143
1131
  }
1144
- .error-message:not(:empty) {
1132
+ .wrapper .error-message:not(:empty) {
1145
1133
  margin-top: 0.25rem;
1146
1134
  }
1147
1135
 
@@ -1171,20 +1159,4 @@
1171
1159
  .rtl > .displayedoption:before {
1172
1160
  right: auto;
1173
1161
  left: 0.5625rem;
1174
- }
1175
-
1176
- @supports not (top: anchor(bottom)) {
1177
- .dropdown {
1178
- position: fixed !important;
1179
- z-index: 30;
1180
- inset: auto;
1181
- width: var(--button-width, auto) !important;
1182
- top: 0 !important;
1183
- left: var(--dropdown-left, 0) !important;
1184
- transform: translate(0, var(--dropdown-translate-y, 0)) !important;
1185
- max-height: var(--dropdown-max-height, none) !important;
1186
- }
1187
- .dropdown.hidden {
1188
- visibility: hidden;
1189
- }
1190
1162
  }
@@ -1,34 +1,14 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { forceUpdate } from "@stencil/core";
3
- import { getTextDir, toBool, handleDisabledAttribute, showTooltip, hideTooltip, debounce, findAllScrollableParents, } from "../../../global/functions";
3
+ import { getTextDir, shouldOpenUp, isElOrChild, toBool, handleDisabledAttribute, showTooltip, hideTooltip } from "../../../global/functions";
4
4
  import { globalMessages, selectMessages } from "../../../global/intl";
5
5
  export class Select {
6
6
  constructor() {
7
- this.scrollableParents = [];
8
- this.returnFocus = false;
9
- this.hasAnchor = CSS.supports("top", "anchor(bottom)"); // for FF polyfill
7
+ this.openUp = false;
10
8
  //////////////////////////////////////
11
9
  // for multiselect button text
12
10
  this.overflowCount = 0;
13
11
  this.displayedOptions = [];
14
- this.previousDisplayedOptions = [];
15
- this.debouncedScroll = debounce(() => {
16
- if (this.hasAnchor) {
17
- const popoverRect = this.dropdownEl.getBoundingClientRect();
18
- const anchorRect = this.buttonEl.getBoundingClientRect();
19
- // Heuristic: Popover is ABOVE the anchor (it opened upwards)
20
- this.isUp = popoverRect.bottom < anchorRect.top;
21
- this.isExpanded = true;
22
- this.optionListEl.handleInitialFocus(this.elToFocus);
23
- this.elToFocus = undefined;
24
- }
25
- else {
26
- this.dropdownPosition();
27
- }
28
- }, 100);
29
- this.debouncedResize = debounce(() => {
30
- this.dropdownPosition();
31
- }, 100);
32
12
  this.disabled = false;
33
13
  this.maxHeight = "200px";
34
14
  this.label = undefined;
@@ -42,8 +22,6 @@ export class Select {
42
22
  this.searchPlaceholder = selectMessages.searchPlaceholder;
43
23
  this.allSelectedMessage = selectMessages.allSelected;
44
24
  this.isExpanded = false;
45
- this.isUp = false;
46
- this.isHidden = false;
47
25
  this.announcement = "";
48
26
  }
49
27
  get childOptions() {
@@ -62,149 +40,58 @@ export class Select {
62
40
  //////////////////////////////////////
63
41
  handleOptionSelection() {
64
42
  if (!this.multiple) {
65
- this.returnFocus = true;
66
- this.dropdownEl.hidePopover();
43
+ this.close();
67
44
  }
68
45
  }
69
46
  handleChildEnter() {
70
47
  // only occurs for multiselects. handle the click, then close
71
- this.returnFocus = true;
72
- this.dropdownEl.hidePopover();
73
- }
74
- closeDropdownOnEscape() {
75
- this.returnFocus = true;
76
- this.dropdownEl.hidePopover();
77
- }
78
- handleBeforeToggle() {
79
- if (!this.hasAnchor) {
80
- // Start hidden to prevent flash during positioning calculation
81
- this.isHidden = true;
82
- }
83
- }
84
- handleToggle(ev) {
85
- ev.newState === "open" ? this.open() : this.close();
86
- }
87
- dropdownPosition() {
88
- // polyfill for opening up or down + positioning according to screen
89
- // (must recalculate on scroll, resize)
90
- // Using transform for better performance - only affects composite layer, no layout recalculation
91
- const buttonElRect = this.buttonEl.getBoundingClientRect();
92
- const spaceAbove = buttonElRect.top;
93
- const spaceBelow = document.documentElement.clientHeight - buttonElRect.bottom;
94
- const dropdownHeight = this.dropdownEl.clientHeight;
95
- // Clear any previously set positioning properties
96
- this.el.style.removeProperty("--dropdown-translate-y");
97
- this.el.style.removeProperty("--dropdown-max-height");
98
- this.el.style.removeProperty("--dropdown-left");
99
- // Set horizontal position and width to match button
100
- this.el.style.setProperty("--dropdown-left", buttonElRect.left + "px");
101
- this.el.style.setProperty("--button-width", buttonElRect.width + "px");
102
- if (dropdownHeight <= spaceBelow) {
103
- // Case 1: Enough space below - position dropdown below the button
104
- this.el.style.setProperty("--dropdown-translate-y", buttonElRect.bottom + "px");
105
- }
106
- else if (dropdownHeight <= spaceAbove) {
107
- // Case 2: Not enough space below, but enough above - position dropdown above the button
108
- this.el.style.setProperty("--dropdown-translate-y", buttonElRect.top - dropdownHeight + "px");
109
- }
110
- else {
111
- // Case 3: Not enough space in either direction - use the larger available space and constrain height
112
- if (spaceBelow >= spaceAbove) {
113
- // Use space below and constrain dropdown height
114
- this.el.style.setProperty("--dropdown-translate-y", buttonElRect.bottom + "px");
115
- this.el.style.setProperty("--dropdown-max-height", spaceBelow + "px");
116
- }
117
- else {
118
- // Use space above and constrain dropdown height
119
- this.el.style.setProperty("--dropdown-translate-y", "0px");
120
- this.el.style.setProperty("--dropdown-max-height", spaceAbove + "px");
121
- }
48
+ this.close();
49
+ }
50
+ closePopupOnEscape() {
51
+ this.close();
52
+ }
53
+ handleOptionBlur(ev) {
54
+ // if the Option is blurred to something other than the component emit a blur event with the appropriate relatedTarget
55
+ // keeps our component's blur events accurate, and closes when focusing browser address bar
56
+ if (!isElOrChild(this.el, ev.detail.relatedTarget)) {
57
+ const event = new CustomEvent("blur");
58
+ // @ts-ignore
59
+ event.relatedTarget = ev.detail.relatedTarget;
60
+ this.el.dispatchEvent(event);
122
61
  }
123
- this.isHidden = false;
124
62
  }
125
- open() {
126
- if (!this.isExpanded && !this.isDisabled) {
127
- // polyfill for browsers without anchor() support (FF)
128
- if (!this.hasAnchor) {
129
- this.dropdownPosition();
130
- }
131
- requestAnimationFrame(() => {
132
- const popoverRect = this.dropdownEl.getBoundingClientRect();
133
- const anchorRect = this.buttonEl.getBoundingClientRect();
134
- // Heuristic: Popover is ABOVE the anchor (it opened upwards)
135
- this.isUp = popoverRect.top < anchorRect.top;
136
- this.isExpanded = true;
137
- this.optionListEl.handleInitialFocus(this.elToFocus);
138
- this.elToFocus = undefined;
139
- });
63
+ handleClick(ev) {
64
+ if (!isElOrChild(this.el, ev.target)) {
65
+ this.close();
140
66
  }
141
67
  }
142
- close() {
143
- if (this.isExpanded) {
144
- this.isExpanded = false;
145
- this.optionListEl.unfocusAll();
146
- window.setTimeout(() => {
147
- if (!this.hasAnchor) {
148
- this.isHidden = true;
149
- }
150
- if (this.optionListEl.multiple) {
151
- this.optionListEl.updateOptionVisibility();
152
- }
153
- // clear search field, reset filtered / bolded state of wm-options
154
- if (this.search) {
155
- this.optionListEl.clearSearch();
156
- }
157
- }, 150);
158
- if (this.returnFocus) {
159
- requestAnimationFrame(() => {
160
- this.buttonEl.focus();
161
- this.returnFocus = false;
162
- });
163
- }
68
+ handleButtonBlur(ev) {
69
+ if (isElOrChild(this.el, ev.relatedTarget)) {
70
+ // do not emit a blur event when opening the dropdown and focusing the Options
71
+ ev.stopPropagation();
164
72
  }
165
73
  }
166
74
  handleKey(ev) {
167
75
  switch (ev.key) {
168
76
  case "Tab":
169
77
  // if tabbing backwards, close and return focus to button. Otherwise, close but do not redirect focus.
170
- if (this.isExpanded && ev.shiftKey) {
171
- this.returnFocus = true;
172
- }
173
- this.dropdownEl.hidePopover();
78
+ this.close(ev.shiftKey ? true : false);
174
79
  break;
175
80
  case "ArrowDown":
176
81
  if (this.isExpanded === false) {
177
82
  ev.preventDefault();
178
- this.elToFocus = "next";
179
- this.dropdownEl.showPopover();
83
+ this.open("next");
180
84
  }
181
85
  break;
182
86
  case "ArrowUp":
183
87
  if (this.isExpanded === false) {
184
88
  ev.preventDefault();
185
- this.elToFocus = "previous";
186
- this.dropdownEl.showPopover();
89
+ this.open("previous");
187
90
  }
188
91
  break;
189
92
  }
190
93
  }
191
- handleResize() {
192
- if (!this.hasAnchor && this.isExpanded) {
193
- this.isHidden = true;
194
- this.debouncedResize();
195
- }
196
- }
197
- handleScroll() {
198
- if (this.isExpanded) {
199
- this.isHidden = true;
200
- this.debouncedScroll();
201
- }
202
- }
203
94
  componentWillLoad() {
204
- if (!this.hasAnchor) {
205
- // Start hidden to prevent flash on first load
206
- this.isHidden = true;
207
- }
208
95
  if (!this.label) {
209
96
  console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).");
210
97
  }
@@ -221,6 +108,8 @@ export class Select {
221
108
  });
222
109
  }
223
110
  handleChildChange() {
111
+ // on update of children or children selected state, reset button text and rerender
112
+ this.setButtonText();
224
113
  forceUpdate(this.el);
225
114
  if (this.multiple) {
226
115
  // update state of clone options
@@ -229,19 +118,43 @@ export class Select {
229
118
  }
230
119
  componentDidLoad() {
231
120
  this.wmSelectDidLoad.emit();
232
- if (!this.hasAnchor) {
233
- this.scrollableParents = findAllScrollableParents(this.el);
234
- // Add scroll listeners to all scrollable parents
235
- this.scrollableParents.forEach((parent) => {
236
- if (parent === document.documentElement) {
237
- // For document element, listen to window scroll event
238
- window.addEventListener("scroll", () => this.handleScroll());
121
+ this.dropdownEl.classList.add("hidden");
122
+ forceUpdate(this.el);
123
+ this.setButtonText();
124
+ }
125
+ open(optionToSelect) {
126
+ if (!this.isDisabled) {
127
+ this.openUp = shouldOpenUp(this.el, this.dropdownEl.clientHeight, this.labelEl.clientHeight);
128
+ this.isExpanded = true;
129
+ this.dropdownEl.classList.add("open");
130
+ this.dropdownEl.classList.remove("hidden");
131
+ window.requestAnimationFrame(() => {
132
+ this.optionListEl.handleInitialFocus(optionToSelect);
133
+ });
134
+ }
135
+ }
136
+ close(returnFocus = true) {
137
+ if (this.isExpanded) {
138
+ this.isExpanded = false;
139
+ this.optionListEl.unfocusAll();
140
+ this.dropdownEl.classList.remove("open");
141
+ window.setTimeout(() => {
142
+ this.dropdownEl.classList.add("hidden");
143
+ if (this.optionListEl.multiple) {
144
+ this.optionListEl.updateOptionVisibility();
239
145
  }
240
- else {
241
- // For regular elements, listen to their scroll event
242
- parent.addEventListener("scroll", () => this.handleScroll());
146
+ // clear search field, reset filtered / bolded state of wm-options
147
+ if (this.search) {
148
+ this.optionListEl.clearSearch();
243
149
  }
244
- });
150
+ // Returns focus to button after popup closes (no need if user is tabbing)
151
+ // Delay is necessary for screenreader to get new expanded state before focus
152
+ // window.requestAnimationFrame is probably enough, but since we are already using setTimeout it may as well be here
153
+ // also UX wise, it makes sense for the button to only be focused after the animation is complete
154
+ if (returnFocus) {
155
+ this.buttonEl.focus();
156
+ }
157
+ }, 150);
245
158
  }
246
159
  }
247
160
  announceError() {
@@ -255,6 +168,7 @@ export class Select {
255
168
  handleComponentBlur(ev) {
256
169
  // Do not close or emit custom blur event when blurring to an element inside (wm-option)
257
170
  if (!this.el.contains(ev.relatedTarget)) {
171
+ this.close(false);
258
172
  this.wmSelectBlurred.emit();
259
173
  }
260
174
  }
@@ -264,6 +178,28 @@ export class Select {
264
178
  showTooltip("right", ev.target, this.label);
265
179
  }
266
180
  }
181
+ setButtonText() {
182
+ this.displayedOptions = this.childOptions.filter((x) => x.selected);
183
+ // handle overflow + counter for multiselect
184
+ if (this.multiple) {
185
+ // this is a fixed measurement accounting for the max width of a 3 character overflow counter
186
+ const overflowCounterWidth = 38;
187
+ const computedStyle = window.getComputedStyle(this.buttonEl);
188
+ // there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
189
+ const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
190
+ const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
191
+ const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
192
+ this.overflowCount = 0;
193
+ this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
194
+ let optionsTotalWidth = this.measurementAreaEl.clientWidth;
195
+ while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
196
+ this.overflowCount++;
197
+ this.displayedOptions.pop();
198
+ this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
199
+ optionsTotalWidth = this.measurementAreaEl.clientWidth;
200
+ }
201
+ }
202
+ }
267
203
  announce(message) {
268
204
  // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
269
205
  if (this.liveRegionEl.textContent === message) {
@@ -272,7 +208,6 @@ export class Select {
272
208
  this.announcement = message;
273
209
  }
274
210
  renderButtonText() {
275
- this.displayedOptions = this.childOptions.filter((x) => x.selected);
276
211
  if (this.multiple && this.displayedOptions.length < 1) {
277
212
  return h("span", null, this.placeholder);
278
213
  }
@@ -280,28 +215,6 @@ export class Select {
280
215
  return this.allSelectedMessage;
281
216
  }
282
217
  else {
283
- // handle overflow + counter for multiselect
284
- // only bother if things have changed
285
- const hasChanged = this.displayedOptions !== this.previousDisplayedOptions;
286
- if (this.multiple && hasChanged) {
287
- // this is a fixed measurement accounting for the max width of a 3 character overflow counter
288
- const overflowCounterWidth = 38;
289
- const computedStyle = window.getComputedStyle(this.buttonEl);
290
- // there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
291
- const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
292
- const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
293
- const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
294
- this.overflowCount = 0;
295
- this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
296
- let optionsTotalWidth = this.measurementAreaEl.clientWidth;
297
- while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
298
- this.overflowCount++;
299
- this.displayedOptions.pop();
300
- this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
301
- optionsTotalWidth = this.measurementAreaEl.clientWidth;
302
- }
303
- this.previousDisplayedOptions = this.displayedOptions;
304
- }
305
218
  return this.displayedOptions.map((x, idx) => (h("span", null, idx > 0 ? ", " : "", x.textContent)));
306
219
  }
307
220
  }
@@ -312,22 +225,18 @@ export class Select {
312
225
  }
313
226
  render() {
314
227
  const showSubinfo = !this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo;
315
- return (h(Host, { key: 'f73046e3e0d19f90e1de9f6c104b186159e08551', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: '78f69feb04ef0436bb3b7f0bdeb08c67c69aa025', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: 'a3a54f3c4b01271bb472a2dcaeff653ae37191b8', class: "label-wrapper" }, h("label", { key: 'fac48d7e7a6ee92a6c28bcc6d76aa9b0358cb2fa', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
228
+ const buttonProps = {
229
+ id: "selectbtn",
230
+ ["disabled"]: this.isDisabled,
231
+ ["aria-controls"]: "list",
232
+ ["aria-labelledby"]: "label selectbtn",
233
+ ["aria-describedby"]: "error",
234
+ ["aria-expanded"]: this.isExpanded ? "true" : "false",
235
+ onClick: () => (this.isExpanded ? this.close() : this.open()),
236
+ };
237
+ return (h(Host, { key: '27f57d30b836eac8dc27ae98a425015d86a0948b', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: '8f48d8e8d616244350e61d6e81f350640131bbf0', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '39d3bcec9b67d671a6bdbb6a3ee738832189ea51', ref: (el) => (this.labelEl = el), class: "label-wrapper" }, h("label", { key: 'b0bb90a215ac20de94afa8dba56e839bdc590dc1', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
316
238
  // we can't use aria-required because the listbox is in a sub-component and it is not announced
317
- this.requiredField && (h("span", { key: 'a78da94fc8742122542de24709dae541058aeab1', class: "required" }, h("span", { key: '055fb76d88b0680ede31d3c700a640b5c1cb498f', class: "sr-only" }, globalMessages.requiredField), h("span", { key: 'e1db2d800c6b5789d8a50ce73b02899b4c8cf105', "aria-hidden": "true" }, "*")))), h("div", { key: '9a1b34ee65e711a6bfd55149af12ed03899294cc', class: "button-wrapper" }, h("button", { key: 'b7c86d83006cb532787d3f1df0c9c9f3b54470e7', 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: 'ed2cc72a353f2bae29fdd5d8ea3f5b5dedc85c6b', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: 'cd68f6e2d0200649a57bb8f8c9c7ad423c551848', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: '2501335ceaa6612cd720c71b0ea3c6efb68fa698', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: 'dacf8d5e2223a9700854ef4fac3ecabf1c8702a2', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: '161a40394450b4bac8ac91435a2b03ef9a0f8277', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: 'ed6cdbdfe2d290440b1bd33938b4cee31a70047e',
318
- // is-open is for the CSS transition in modern browsers
319
- // hidden is to wait for position calculations in Firefox
320
- class: `dropdown ${this.isExpanded ? "is-open" : ""} ${this.isHidden ? "hidden" : ""} ${this.isUp ? "upward" : ""}`, id: "dropdown", popover: "auto", ref: (el) => (this.dropdownEl = el),
321
- // @ts-ignore -- don't tell typescript but we're in the future
322
- onToggle: (ev) => this.handleToggle(ev) }, h("priv-option-list", { key: '14ab958ca5cb5a3ac3fa970ed138ec5b47089779', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => {
323
- this.dropdownEl.hidePopover();
324
- }, onOptionListAllSelected: () => {
325
- this.returnFocus = true;
326
- this.wmSelectAllSelected.emit();
327
- }, onOptionListAllDeselected: () => {
328
- this.returnFocus = true;
329
- this.wmSelectAllDeselected.emit();
330
- } }, h("slot", { key: '98699fb0f36674cbae13f226fa923d6228fdad97' }))), h("div", { key: '69a49e6a2fe618bf9ce1a7e08527630a2d48cb8b', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: '374538b9eb797924abfe74049fec191a41ae7501', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
239
+ this.requiredField && (h("span", { key: '4a5648503a023ff1eba34db936d49709e14da9f1', class: "required" }, h("span", { key: '3fe783c7174d3d827b20589cad412d32fa4cd978', class: "sr-only" }, globalMessages.requiredField), h("span", { key: '85ac4ca35f1077ade1bdda403b8888cc206ff28e', "aria-hidden": "true" }, "*")))), h("div", { key: 'c2e70d87db2d533713ac9c5a877ddba98a9a9a2f', class: "button-wrapper" }, h("button", Object.assign({ key: '460c6ac5cde8637b0098201966ca4268301ac2b7' }, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev) }), h("span", { key: '3af3357f45ceacc5689e90e2bdc6459cab591c2f', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: 'bd9869db1146e54cc47c2965ebe2776873e2a18e', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: 'b22d952625e93fab98ebb1b688101fd8891a4af7', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: '1f6448ee167d1847eff8fb5bc7a30e0a964e6efe', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: '0d550b97a3e08e9b708f2f4c3d91f9cac76ba5d8', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: '59cc7fcfa25d9d3eab8e4d70cdcd365e36e160ad', class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, h("priv-option-list", { key: '9fb7d0396527bc18bb8f5d00d64c858470d0698d', 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: '4c307bca5104ec962ca050b46adf882fb78bb74a' }))), h("div", { key: '06f11b61b475cc6cd78c2a8278b8455a79405e17', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: '86cf865fbb7fd0e2c88290fe92e6062ada7d9ab6', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
331
240
  }
332
241
  static get is() { return "wm-select"; }
333
242
  static get encapsulation() { return "shadow"; }
@@ -563,8 +472,6 @@ export class Select {
563
472
  static get states() {
564
473
  return {
565
474
  "isExpanded": {},
566
- "isUp": {},
567
- "isHidden": {},
568
475
  "announcement": {}
569
476
  };
570
477
  }
@@ -656,22 +563,28 @@ export class Select {
656
563
  "passive": false
657
564
  }, {
658
565
  "name": "wmEscKeyPressed",
659
- "method": "closeDropdownOnEscape",
566
+ "method": "closePopupOnEscape",
660
567
  "target": undefined,
661
568
  "capture": false,
662
569
  "passive": false
663
570
  }, {
664
- "name": "keydown",
665
- "method": "handleKey",
571
+ "name": "wmOptionBlurred",
572
+ "method": "handleOptionBlur",
666
573
  "target": undefined,
667
574
  "capture": false,
668
575
  "passive": false
669
576
  }, {
670
- "name": "resize",
671
- "method": "handleResize",
672
- "target": "window",
577
+ "name": "click",
578
+ "method": "handleClick",
579
+ "target": "document",
580
+ "capture": true,
581
+ "passive": false
582
+ }, {
583
+ "name": "keydown",
584
+ "method": "handleKey",
585
+ "target": undefined,
673
586
  "capture": false,
674
- "passive": true
587
+ "passive": false
675
588
  }];
676
589
  }
677
590
  }