@ukic/web-components 2.0.0-alpha.122 → 2.0.0-alpha.125

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-9d4961dc.js → helpers-ea79c7b0.js} +41 -2
  3. package/dist/cjs/helpers-ea79c7b0.js.map +1 -0
  4. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  6. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-breadcrumbs.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-button_3.cjs.entry.js +2 -2
  9. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-card.cjs.entry.js +2 -2
  11. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  15. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-hero.cjs.entry.js +3 -3
  20. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +78 -24
  22. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-search-bar.cjs.entry.js +3 -5
  33. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-select.cjs.entry.js +216 -23
  35. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-tab-list.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-text-field.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  49. package/dist/cjs/loader.cjs.js +1 -1
  50. package/dist/collection/components/ic-button/ic-button.css +0 -6
  51. package/dist/collection/components/ic-card/ic-card.js +1 -1
  52. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  53. package/dist/collection/components/ic-hero/ic-hero.css +5 -0
  54. package/dist/collection/components/ic-hero/ic-hero.js +1 -1
  55. package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
  56. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +4 -3
  57. package/dist/collection/components/ic-menu/ic-menu.css +3 -2
  58. package/dist/collection/components/ic-menu/ic-menu.js +78 -21
  59. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  60. package/dist/collection/components/ic-menu/ic-menu.types.js.map +1 -1
  61. package/dist/collection/components/ic-search-bar/ic-search-bar.css +6 -0
  62. package/dist/collection/components/ic-search-bar/ic-search-bar.js +2 -4
  63. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  64. package/dist/collection/components/ic-select/ic-select.css +70 -9
  65. package/dist/collection/components/ic-select/ic-select.js +337 -24
  66. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  67. package/dist/collection/components/ic-typography/ic-typography.css +11 -4
  68. package/dist/collection/components/ic-typography/ic-typography.js +1 -1
  69. package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
  70. package/dist/collection/utils/helpers.js +39 -1
  71. package/dist/collection/utils/helpers.js.map +1 -1
  72. package/dist/collection/utils/types.js.map +1 -1
  73. package/dist/components/helpers.js +40 -2
  74. package/dist/components/helpers.js.map +1 -1
  75. package/dist/components/ic-button2.js +2 -2
  76. package/dist/components/ic-button2.js.map +1 -1
  77. package/dist/components/ic-card.js +1 -1
  78. package/dist/components/ic-card.js.map +1 -1
  79. package/dist/components/ic-hero.js +2 -2
  80. package/dist/components/ic-hero.js.map +1 -1
  81. package/dist/components/ic-input-component-container2.js +2 -2
  82. package/dist/components/ic-input-component-container2.js.map +1 -1
  83. package/dist/components/ic-input-label2.js +1 -1
  84. package/dist/components/ic-input-validation2.js +1 -1
  85. package/dist/components/ic-link2.js +1 -1
  86. package/dist/components/ic-menu2.js +76 -22
  87. package/dist/components/ic-menu2.js.map +1 -1
  88. package/dist/components/ic-navigation-menu2.js +1 -1
  89. package/dist/components/ic-search-bar.js +3 -5
  90. package/dist/components/ic-search-bar.js.map +1 -1
  91. package/dist/components/ic-select.js +226 -23
  92. package/dist/components/ic-select.js.map +1 -1
  93. package/dist/components/ic-side-navigation.js +1 -1
  94. package/dist/components/ic-tab-list.js +1 -1
  95. package/dist/components/ic-text-field2.js +1 -1
  96. package/dist/components/ic-theme.js +1 -1
  97. package/dist/components/ic-top-navigation.js +1 -1
  98. package/dist/components/ic-typography2.js +1 -1
  99. package/dist/components/ic-typography2.js.map +1 -1
  100. package/dist/core/core.css +1 -1
  101. package/dist/core/core.esm.js +1 -1
  102. package/dist/core/core.esm.js.map +1 -1
  103. package/dist/core/{p-8af2a343.entry.js → p-01450166.entry.js} +2 -2
  104. package/dist/core/{p-8af2a343.entry.js.map → p-01450166.entry.js.map} +0 -0
  105. package/dist/core/{p-016fcce8.entry.js → p-01a17304.entry.js} +2 -2
  106. package/dist/core/{p-016fcce8.entry.js.map → p-01a17304.entry.js.map} +0 -0
  107. package/dist/core/{p-5e0b88fa.entry.js → p-08239789.entry.js} +2 -2
  108. package/dist/core/{p-5e0b88fa.entry.js.map → p-08239789.entry.js.map} +0 -0
  109. package/dist/core/{p-44af91df.entry.js → p-09c0cd28.entry.js} +2 -2
  110. package/dist/core/{p-44af91df.entry.js.map → p-09c0cd28.entry.js.map} +0 -0
  111. package/dist/core/{p-44355e34.entry.js → p-0cf51da5.entry.js} +2 -2
  112. package/dist/core/{p-44355e34.entry.js.map → p-0cf51da5.entry.js.map} +0 -0
  113. package/dist/core/{p-bbe0b521.entry.js → p-10531d9a.entry.js} +2 -2
  114. package/dist/core/{p-bbe0b521.entry.js.map → p-10531d9a.entry.js.map} +0 -0
  115. package/dist/core/p-14ba2f18.js +2 -0
  116. package/dist/core/p-14ba2f18.js.map +1 -0
  117. package/dist/core/{p-0d4ac3c9.entry.js → p-211465cf.entry.js} +2 -2
  118. package/dist/core/{p-0d4ac3c9.entry.js.map → p-211465cf.entry.js.map} +0 -0
  119. package/dist/core/{p-13854b65.entry.js → p-2c687b76.entry.js} +2 -2
  120. package/dist/core/{p-13854b65.entry.js.map → p-2c687b76.entry.js.map} +0 -0
  121. package/dist/core/p-2d5824f1.entry.js +2 -0
  122. package/dist/core/p-2d5824f1.entry.js.map +1 -0
  123. package/dist/core/{p-17420c90.entry.js → p-34e5ee10.entry.js} +2 -2
  124. package/dist/core/{p-17420c90.entry.js.map → p-34e5ee10.entry.js.map} +0 -0
  125. package/dist/core/{p-17f3a2bd.entry.js → p-35b91376.entry.js} +2 -2
  126. package/dist/core/{p-17f3a2bd.entry.js.map → p-35b91376.entry.js.map} +0 -0
  127. package/dist/core/{p-7152788d.entry.js → p-36e9f6ff.entry.js} +2 -2
  128. package/dist/core/{p-7152788d.entry.js.map → p-36e9f6ff.entry.js.map} +0 -0
  129. package/dist/core/{p-85a32ec7.entry.js → p-3a7725ed.entry.js} +2 -2
  130. package/dist/core/{p-85a32ec7.entry.js.map → p-3a7725ed.entry.js.map} +0 -0
  131. package/dist/core/{p-85436343.entry.js → p-3d95b097.entry.js} +2 -2
  132. package/dist/core/{p-85436343.entry.js.map → p-3d95b097.entry.js.map} +0 -0
  133. package/dist/core/p-40a17d61.entry.js +2 -0
  134. package/dist/core/p-40a17d61.entry.js.map +1 -0
  135. package/dist/core/{p-a3df537f.entry.js → p-41dab885.entry.js} +2 -2
  136. package/dist/core/{p-a3df537f.entry.js.map → p-41dab885.entry.js.map} +0 -0
  137. package/dist/core/{p-ed1d8712.entry.js → p-42876f02.entry.js} +2 -2
  138. package/dist/core/{p-ed1d8712.entry.js.map → p-42876f02.entry.js.map} +0 -0
  139. package/dist/core/{p-bddb885a.entry.js → p-483ba0f6.entry.js} +2 -2
  140. package/dist/core/{p-bddb885a.entry.js.map → p-483ba0f6.entry.js.map} +0 -0
  141. package/dist/core/{p-bdd2f166.entry.js → p-49831676.entry.js} +2 -2
  142. package/dist/core/{p-bdd2f166.entry.js.map → p-49831676.entry.js.map} +0 -0
  143. package/dist/core/p-55a8f5b6.entry.js +2 -0
  144. package/dist/core/p-55a8f5b6.entry.js.map +1 -0
  145. package/dist/core/{p-7ed79493.entry.js → p-5928296a.entry.js} +2 -2
  146. package/dist/core/p-5928296a.entry.js.map +1 -0
  147. package/dist/core/{p-4b1b46f5.entry.js → p-66800ec4.entry.js} +2 -2
  148. package/dist/core/p-66800ec4.entry.js.map +1 -0
  149. package/dist/core/{p-dc79694a.entry.js → p-7c207056.entry.js} +2 -2
  150. package/dist/core/{p-dc79694a.entry.js.map → p-7c207056.entry.js.map} +0 -0
  151. package/dist/core/{p-3b9d4007.entry.js → p-7f27efda.entry.js} +2 -2
  152. package/dist/core/{p-3b9d4007.entry.js.map → p-7f27efda.entry.js.map} +0 -0
  153. package/dist/core/{p-263018da.entry.js → p-87fc80f1.entry.js} +2 -2
  154. package/dist/core/{p-263018da.entry.js.map → p-87fc80f1.entry.js.map} +0 -0
  155. package/dist/core/{p-ea93611e.entry.js → p-886e7a24.entry.js} +2 -2
  156. package/dist/core/{p-ea93611e.entry.js.map → p-886e7a24.entry.js.map} +0 -0
  157. package/dist/core/{p-012dc33c.entry.js → p-889744b7.entry.js} +2 -2
  158. package/dist/core/{p-012dc33c.entry.js.map → p-889744b7.entry.js.map} +0 -0
  159. package/dist/core/{p-836c93b1.entry.js → p-92cc098f.entry.js} +2 -2
  160. package/dist/core/{p-836c93b1.entry.js.map → p-92cc098f.entry.js.map} +0 -0
  161. package/dist/core/{p-a968ff18.entry.js → p-961c9038.entry.js} +2 -2
  162. package/dist/core/{p-a968ff18.entry.js.map → p-961c9038.entry.js.map} +0 -0
  163. package/dist/core/{p-c09e9589.entry.js → p-9753e5f2.entry.js} +2 -2
  164. package/dist/core/{p-c09e9589.entry.js.map → p-9753e5f2.entry.js.map} +0 -0
  165. package/dist/core/{p-7f6ba60a.entry.js → p-a334ed34.entry.js} +2 -2
  166. package/dist/core/{p-7f6ba60a.entry.js.map → p-a334ed34.entry.js.map} +0 -0
  167. package/dist/core/p-b70f2538.entry.js +2 -0
  168. package/dist/core/p-b70f2538.entry.js.map +1 -0
  169. package/dist/core/{p-d198ae1f.entry.js → p-bbff1667.entry.js} +2 -2
  170. package/dist/core/{p-d198ae1f.entry.js.map → p-bbff1667.entry.js.map} +0 -0
  171. package/dist/core/{p-d10ce0a7.entry.js → p-c0bfb272.entry.js} +2 -2
  172. package/dist/core/{p-d10ce0a7.entry.js.map → p-c0bfb272.entry.js.map} +0 -0
  173. package/dist/core/{p-4fba6cae.entry.js → p-cd14a9dc.entry.js} +2 -2
  174. package/dist/core/{p-4fba6cae.entry.js.map → p-cd14a9dc.entry.js.map} +0 -0
  175. package/dist/core/{p-4cf60a22.entry.js → p-d7af7446.entry.js} +2 -2
  176. package/dist/core/{p-4cf60a22.entry.js.map → p-d7af7446.entry.js.map} +0 -0
  177. package/dist/core/{p-5d3dd182.entry.js → p-e2304886.entry.js} +2 -2
  178. package/dist/core/{p-5d3dd182.entry.js.map → p-e2304886.entry.js.map} +0 -0
  179. package/dist/core/p-f90ce9ca.entry.js +2 -0
  180. package/dist/core/p-f90ce9ca.entry.js.map +1 -0
  181. package/dist/esm/core.js +1 -1
  182. package/dist/esm/{helpers-db00eae1.js → helpers-63cb8828.js} +41 -3
  183. package/dist/esm/helpers-63cb8828.js.map +1 -0
  184. package/dist/esm/ic-alert.entry.js +1 -1
  185. package/dist/esm/ic-back-to-top.entry.js +1 -1
  186. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  187. package/dist/esm/ic-breadcrumbs.entry.js +1 -1
  188. package/dist/esm/ic-button_3.entry.js +2 -2
  189. package/dist/esm/ic-button_3.entry.js.map +1 -1
  190. package/dist/esm/ic-card.entry.js +2 -2
  191. package/dist/esm/ic-card.entry.js.map +1 -1
  192. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  193. package/dist/esm/ic-checkbox.entry.js +1 -1
  194. package/dist/esm/ic-data-row.entry.js +1 -1
  195. package/dist/esm/ic-divider.entry.js +1 -1
  196. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  197. package/dist/esm/ic-footer-link.entry.js +1 -1
  198. package/dist/esm/ic-footer.entry.js +1 -1
  199. package/dist/esm/ic-hero.entry.js +3 -3
  200. package/dist/esm/ic-hero.entry.js.map +1 -1
  201. package/dist/esm/ic-input-component-container_3.entry.js +78 -24
  202. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  203. package/dist/esm/ic-input-label_2.entry.js +1 -1
  204. package/dist/esm/ic-link.entry.js +1 -1
  205. package/dist/esm/ic-navigation-button.entry.js +1 -1
  206. package/dist/esm/ic-navigation-group.entry.js +1 -1
  207. package/dist/esm/ic-navigation-item.entry.js +1 -1
  208. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  209. package/dist/esm/ic-page-header.entry.js +1 -1
  210. package/dist/esm/ic-radio-group.entry.js +1 -1
  211. package/dist/esm/ic-radio-option.entry.js +1 -1
  212. package/dist/esm/ic-search-bar.entry.js +3 -5
  213. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  214. package/dist/esm/ic-select.entry.js +216 -23
  215. package/dist/esm/ic-select.entry.js.map +1 -1
  216. package/dist/esm/ic-side-navigation.entry.js +1 -1
  217. package/dist/esm/ic-status-tag.entry.js +1 -1
  218. package/dist/esm/ic-step.entry.js +1 -1
  219. package/dist/esm/ic-stepper.entry.js +1 -1
  220. package/dist/esm/ic-switch.entry.js +1 -1
  221. package/dist/esm/ic-tab-list.entry.js +1 -1
  222. package/dist/esm/ic-tab-panel.entry.js +1 -1
  223. package/dist/esm/ic-tab.entry.js +1 -1
  224. package/dist/esm/ic-text-field.entry.js +1 -1
  225. package/dist/esm/ic-theme.entry.js +1 -1
  226. package/dist/esm/ic-top-navigation.entry.js +1 -1
  227. package/dist/esm/ic-typography.entry.js +1 -1
  228. package/dist/esm/ic-typography.entry.js.map +1 -1
  229. package/dist/esm/loader.js +1 -1
  230. package/dist/types/components/ic-menu/ic-menu.d.ts +2 -0
  231. package/dist/types/components/ic-menu/ic-menu.types.d.ts +1 -0
  232. package/dist/types/components/ic-select/ic-select.d.ts +44 -2
  233. package/dist/types/components/ic-typography/ic-typography.d.ts +1 -1
  234. package/dist/types/components.d.ts +53 -5
  235. package/dist/types/utils/helpers.d.ts +11 -2
  236. package/dist/types/utils/types.d.ts +1 -0
  237. package/hydrate/index.js +348 -55
  238. package/package.json +3 -3
  239. package/README.md +0 -8
  240. package/dist/cjs/helpers-9d4961dc.js.map +0 -1
  241. package/dist/core/p-16a81e12.entry.js +0 -2
  242. package/dist/core/p-16a81e12.entry.js.map +0 -1
  243. package/dist/core/p-22eb7fc8.entry.js +0 -2
  244. package/dist/core/p-22eb7fc8.entry.js.map +0 -1
  245. package/dist/core/p-4b1b46f5.entry.js.map +0 -1
  246. package/dist/core/p-6238313f.entry.js +0 -2
  247. package/dist/core/p-6238313f.entry.js.map +0 -1
  248. package/dist/core/p-7ed79493.entry.js.map +0 -1
  249. package/dist/core/p-856d9516.entry.js +0 -2
  250. package/dist/core/p-856d9516.entry.js.map +0 -1
  251. package/dist/core/p-8a677ff1.entry.js +0 -2
  252. package/dist/core/p-8a677ff1.entry.js.map +0 -1
  253. package/dist/core/p-e5a09372.js +0 -2
  254. package/dist/core/p-e5a09372.js.map +0 -1
  255. package/dist/esm/helpers-db00eae1.js.map +0 -1
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3ef30d9d.js');
6
- const helpers = require('./helpers-9d4961dc.js');
6
+ const helpers = require('./helpers-ea79c7b0.js');
7
7
 
8
8
  const Expand = `<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
9
9
  <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />
@@ -15,7 +15,7 @@ const Clear = `<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www
15
15
  </svg>
16
16
  `;
17
17
 
18
- const icSelectCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}ic-input-component-container:hover{--border-color:var(--ic-action-dark-hover)}ic-input-component-container:active{--border-color:var(--ic-action-dark-active);color:var(--ic-action-dark-active)}ic-input-component-container.menu-open{--border-color:var(--ic-architectural-400);color:var(--ic-action-dark)}ic-input-validation .status-icon,ic-input-validation .statustext{visibility:visible;transition:visibility 0s 149ms}ic-input-validation.menu-open .status-icon,ic-input-validation.menu-open .statustext{visibility:hidden;transition:visibility 0s}select{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);color:var(--ic-color-primary-text);line-height:1.5rem;letter-spacing:0.005rem;width:100%;height:100%;padding-left:6px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-position:right 6px center;background-image:url(\"data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select option,.select-option-selected{color:var(--ic-color-primary-text)}select:disabled{color:var(--ic-architectural-200);background-image:url(\"data:image/svg+xml;utf8,<svg fill='grey' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select:focus{border:0;outline:0}select:not([disabled]){cursor:pointer}.select-input{width:100%;height:100%;padding:0 6px;display:flex;cursor:pointer;align-items:center;justify-content:space-between;background:none;border:none}.select-input:focus{outline:none}:host(:not([disabled])) ic-input-component-container:hover .select-input{background-color:var(--ic-architectural-white)}:host([disabled]) .select-input{pointer-events:none}.expand-icon{height:var(--ic-space-lg);padding-left:var(--ic-space-xs);color:var(--expand-icon-hover, var(--ic-architectural-400))}:host([disabled]) .expand-icon,:host([disabled]) .expand-icon>svg>path{color:var(--ic-architectural-200)}.expand-icon-open{transform:rotateX(180deg);color:var(--ic-action-dark)}.expand-icon-filled{padding-left:var(--ic-space-xxs);color:var(--ic-action-dark)}.placeholder{color:var(--ic-color-tertiary-text)}:host([disabled]) .value-text{color:var(--ic-architectural-200)}.select-input-end{display:flex;align-items:center}.clear-button-container{display:flex;gap:var(--ic-space-xxs);padding-left:var(--ic-space-xs)}.divider{width:1px;background-color:var(--ic-architectural-400);margin:var(--ic-space-xxs) 0;border-radius:1px}:host :focus-within .clear-button:focus{background-color:var(--ic-focus-blue);box-shadow:inset 0 0 0 2px var(--ic-focus-glow);border-radius:4px}.clear-button:focus *{fill:white}";
18
+ const icSelectCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}ic-input-component-container:hover{--border-color:var(--ic-action-dark-hover)}ic-input-component-container:active{--border-color:var(--ic-action-dark-active);color:var(--ic-action-dark-active)}ic-input-component-container.menu-open{--border-color:var(--ic-architectural-400);color:var(--ic-action-dark)}ic-input-validation .status-icon,ic-input-validation .statustext{visibility:visible}ic-input-validation.menu-open .status-icon,ic-input-validation.menu-open .statustext{visibility:hidden;transition:visibility 0s}ic-input-label{margin-bottom:var(--ic-space-xs) !important}select{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);color:var(--ic-color-primary-text);line-height:1.5rem;letter-spacing:0.005rem;width:100%;height:100%;padding-left:6px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-position:right 6px center;background-image:url(\"data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select option,.select-option-selected{color:var(--ic-color-primary-text)}select:disabled{color:var(--ic-architectural-200);background-image:url(\"data:image/svg+xml;utf8,<svg fill='grey' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select:focus{border:0;outline:0}select:not([disabled]){cursor:pointer}.select-container{width:100%;display:flex;align-items:center}.select-input{width:100%;height:100%;padding:0 6px;display:flex;cursor:pointer;align-items:center;justify-content:space-between;background:none;border:none}.select-input:focus{outline:none}:host(:not([disabled])) ic-input-component-container:hover .select-input{background-color:var(--ic-architectural-white)}:host([disabled]) .select-input{pointer-events:none}:host([searchable]) .select-input{cursor:auto}.searchable-select-container{align-items:center;display:flex;width:100%}.expand-icon{height:var(--ic-space-lg);padding-left:var(--ic-space-xs);color:var(--expand-icon-hover, var(--ic-architectural-400))}:host([disabled]) .expand-icon,:host([disabled]) .expand-icon>svg>path{color:var(--ic-architectural-200)}:host([searchable]) .expand-icon{padding-left:var(--ic-space-xxs);height:36px}:host([searchable]) .expand-icon>svg{height:36px;padding:0 6px}:host([searchable]:not([disabled])) .expand-icon>svg{cursor:pointer}.expand-icon-open{color:var(--ic-action-dark)}.expand-icon-filled{color:var(--ic-action-dark)}.expand-icon-open,:host([searchable]) .expand-icon-open{transform:rotateX(180deg)}:host([disabled]) .value-text,.placeholder{color:var(--ic-color-tertiary-text)}.select-input-end{display:flex;align-items:center}.clear-button-container{display:flex;gap:var(--ic-space-xxs);padding-left:38px}:host([dense]) .clear-button-container{padding-left:30px}.divider{width:1px;background-color:var(--ic-architectural-400);margin:var(--ic-space-xxs) 0;border-radius:1px;height:var(--ic-space-lg)}:host([dense]) .divider{height:var(--ic-space-md)}.clear-button{position:absolute;right:44px;border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition)}.clear-button:focus{background-color:var(--ic-focus-blue);box-shadow:inset 0 0 0 2px var(--ic-focus-glow);border-radius:4px}.clear-button:focus *{fill:white}.searchable-select-results-status{border:0;clip:rect(0, 0, 0, 0, 0);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
19
19
 
20
20
  let inputIds = 0;
21
21
  const Select = class {
@@ -27,6 +27,23 @@ const Select = class {
27
27
  this.inputId = `ic-select-input-${inputIds++}`;
28
28
  this.menuId = `${this.inputId}-menu`;
29
29
  this.inheritedAttributes = {};
30
+ this.isMenuEnabled = () => {
31
+ return (((this.searchableSelectInputValue === null ||
32
+ this.searchableSelectInputValue === "") &&
33
+ this.charactersUntilSuggestions === 0) ||
34
+ (this.searchableSelectInputValue &&
35
+ this.searchableSelectInputValue.length >=
36
+ this.charactersUntilSuggestions));
37
+ };
38
+ this.setOptionsValuesFromLabels = () => {
39
+ if (this.options.length > 0) {
40
+ this.options.map((option) => {
41
+ if (!option.value) {
42
+ option.value = option.label;
43
+ }
44
+ });
45
+ }
46
+ };
30
47
  this.setTextColor = () => {
31
48
  if (this.nativeSelectElement.selectedIndex === 0) {
32
49
  this.nativeSelectElement.className = "placeholder";
@@ -35,18 +52,53 @@ const Select = class {
35
52
  this.nativeSelectElement.className = "select-option-selected";
36
53
  }
37
54
  };
55
+ this.setMenuChange = (open) => {
56
+ if (this.open !== open) {
57
+ this.open = open;
58
+ }
59
+ };
38
60
  this.getLabelFromValue = (value) => {
39
61
  return helpers.getLabelFromValue(value, this.options);
40
62
  };
63
+ this.getValueFromLabel = (label) => {
64
+ var _a;
65
+ const value = (_a = this.options.find((option) => option.label === label)) === null || _a === void 0 ? void 0 : _a.value;
66
+ return value;
67
+ };
68
+ this.getFilteredChildMenuOptions = (option) => {
69
+ let children = option.children;
70
+ children = helpers.getFilteredMenuOptions(option.children, this.includeDescriptionsInSearch, this.searchableSelectInputValue, this.searchMatchPosition);
71
+ const newOption = Object.assign({}, option);
72
+ newOption.children = children;
73
+ return newOption;
74
+ };
41
75
  this.handleNativeSelectChange = () => {
42
76
  this.icChange.emit({ value: this.nativeSelectElement.value });
43
77
  this.setTextColor();
44
78
  };
45
79
  this.handleCustomSelectChange = (event) => {
80
+ if (this.searchable && event.detail.label === this.emptyOptionListText) {
81
+ this.searchableSelectElement.focus();
82
+ return;
83
+ }
84
+ if (this.searchable) {
85
+ this.searchableSelectInputValue = this.getLabelFromValue(event.detail.value);
86
+ }
87
+ this.ariaActiveDescendant = event.detail.optionId;
46
88
  this.icChange.emit({ value: event.detail.value });
47
89
  };
48
90
  this.handleMenuChange = (event) => {
49
91
  this.open = event.detail.open;
92
+ this.searchable && this.handleFocusIndicatorDisplay();
93
+ };
94
+ this.handleFocusIndicatorDisplay = () => {
95
+ const focusIndicator = this.host.shadowRoot.querySelector(".focus-indicator");
96
+ if (this.open) {
97
+ focusIndicator.classList.add("focus-indicator-enabled");
98
+ }
99
+ else {
100
+ focusIndicator.classList.remove("focus-indicator-enabled");
101
+ }
50
102
  };
51
103
  this.handleMouseDown = (event) => {
52
104
  if (!this.open) {
@@ -54,17 +106,52 @@ const Select = class {
54
106
  }
55
107
  };
56
108
  this.handleClick = (event) => {
57
- if (event.detail !== 0) {
109
+ this.noOptions = null;
110
+ this.menu.options = this.options;
111
+ if (event.detail !== 0 && this.isMenuEnabled()) {
58
112
  this.menu.handleClickOpen();
59
113
  }
60
114
  };
115
+ this.handleExpandIconMouseDown = (event) => {
116
+ if (!this.disabled) {
117
+ event.preventDefault();
118
+ this.searchableSelectElement.focus();
119
+ this.handleClick(event);
120
+ }
121
+ };
61
122
  this.handleClear = (event) => {
62
123
  event.stopPropagation();
124
+ this.noOptions = null;
63
125
  this.icChange.emit({ value: null });
64
- this.customSelectElement.focus();
126
+ if (this.searchable) {
127
+ this.searchableSelectElement.value = null;
128
+ this.searchableSelectInputValue = null;
129
+ this.menu.options = this.options;
130
+ this.searchableSelectElement.focus();
131
+ if (!this.isMenuEnabled()) {
132
+ this.setMenuChange(false);
133
+ }
134
+ }
135
+ else {
136
+ this.customSelectElement.focus();
137
+ }
65
138
  };
66
139
  this.handleKeyDown = (event) => {
67
- this.menu.handleKeyboardOpen(event);
140
+ event.cancelBubble = true;
141
+ if (!this.open) {
142
+ this.noOptions = null;
143
+ this.menu.options = this.options;
144
+ }
145
+ if (this.open && event.key === "Enter") {
146
+ this.setMenuChange(false);
147
+ }
148
+ else {
149
+ if (!((event.key === "ArrowDown" || event.key === "ArrowUp") &&
150
+ this.noOptions !== null) &&
151
+ this.isMenuEnabled()) {
152
+ this.menu.handleKeyboardOpen(event);
153
+ }
154
+ }
68
155
  };
69
156
  this.handleClearButtonFocus = () => {
70
157
  this.clearButtonFocused = true;
@@ -72,10 +159,82 @@ const Select = class {
72
159
  this.handleClearButtonBlur = () => {
73
160
  this.clearButtonFocused = false;
74
161
  };
162
+ this.handleSearchableSelectInput = (event) => {
163
+ this.searchableSelectInputValue = event.target.value;
164
+ if (this.getValueFromLabel(this.searchableSelectInputValue) === undefined) {
165
+ this.icChange.emit({ value: null });
166
+ }
167
+ if (this.isMenuEnabled()) {
168
+ this.setMenuChange(true);
169
+ }
170
+ else {
171
+ this.setMenuChange(false);
172
+ }
173
+ const options = [...this.options];
174
+ let isGrouped = false;
175
+ let newFilteredOptions = [];
176
+ options.map((option) => {
177
+ if (option.children)
178
+ isGrouped = true;
179
+ });
180
+ const menuOptionsFiltered = helpers.getFilteredMenuOptions(options, this.includeDescriptionsInSearch, this.searchableSelectInputValue, this.searchMatchPosition);
181
+ if (!isGrouped) {
182
+ newFilteredOptions = menuOptionsFiltered;
183
+ }
184
+ else {
185
+ options.map((option) => {
186
+ if (this.includeGroupTitlesInSearch) {
187
+ if (menuOptionsFiltered.indexOf(option) !== -1) {
188
+ newFilteredOptions.push(option);
189
+ }
190
+ else {
191
+ newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
192
+ }
193
+ }
194
+ else {
195
+ newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
196
+ }
197
+ });
198
+ }
199
+ let noChildOptionsWhenFiltered = false;
200
+ if (isGrouped) {
201
+ noChildOptionsWhenFiltered = true;
202
+ newFilteredOptions.map((option) => {
203
+ if (option.children.length > 0) {
204
+ noChildOptionsWhenFiltered = false;
205
+ }
206
+ });
207
+ }
208
+ const noOptions = [{ label: this.emptyOptionListText, value: "" }];
209
+ if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {
210
+ this.noOptions = null;
211
+ this.filteredOptions = newFilteredOptions;
212
+ }
213
+ else {
214
+ this.noOptions = noOptions;
215
+ this.filteredOptions = this.noOptions;
216
+ }
217
+ this.debounceAriaLiveUpdate();
218
+ };
219
+ this.updateSearchableSelectResultAriaLive = () => {
220
+ const searchableSelectResultsStatusEl = this.host.shadowRoot.querySelector(".searchable-select-results-status");
221
+ if (this.noOptions !== null) {
222
+ searchableSelectResultsStatusEl.innerText = this.emptyOptionListText;
223
+ }
224
+ else {
225
+ searchableSelectResultsStatusEl.innerText = "";
226
+ }
227
+ };
75
228
  this.onFocus = () => {
76
229
  this.icFocus.emit();
77
230
  };
78
- this.onBlur = () => {
231
+ this.onBlur = (event) => {
232
+ if (this.searchable &&
233
+ event.relatedTarget !== this.menu &&
234
+ !(this.clearButton && event.relatedTarget === this.clearButton)) {
235
+ this.setMenuChange(false);
236
+ this.handleFocusIndicatorDisplay();
237
+ }
79
238
  this.icBlur.emit();
80
239
  };
81
240
  this.label = undefined;
@@ -93,8 +252,22 @@ const Select = class {
93
252
  this.value = undefined;
94
253
  this.name = this.inputId;
95
254
  this.showClearButton = false;
255
+ this.searchable = false;
256
+ this.includeDescriptionsInSearch = false;
257
+ this.includeGroupTitlesInSearch = false;
258
+ this.searchMatchPosition = "anywhere";
259
+ this.charactersUntilSuggestions = 0;
260
+ this.emptyOptionListText = "No results found";
96
261
  this.open = false;
97
262
  this.clearButtonFocused = false;
263
+ this.searchableSelectInputValue = null;
264
+ this.filteredOptions = this.options;
265
+ this.ariaActiveDescendant = undefined;
266
+ this.noOptions = null;
267
+ }
268
+ watchOptionsHandler() {
269
+ this.setOptionsValuesFromLabels();
270
+ this.filteredOptions = this.options;
98
271
  }
99
272
  /**
100
273
  * Sets focus on the input box.
@@ -106,6 +279,15 @@ const Select = class {
106
279
  else if (this.customSelectElement) {
107
280
  this.customSelectElement.focus();
108
281
  }
282
+ else if (this.searchableSelectElement) {
283
+ this.searchableSelectElement.focus();
284
+ }
285
+ }
286
+ debounceAriaLiveUpdate() {
287
+ clearTimeout(this.debounce);
288
+ window.setTimeout(() => {
289
+ this.updateSearchableSelectResultAriaLive();
290
+ }, 800);
109
291
  }
110
292
  componentWillLoad() {
111
293
  this.inheritedAttributes = helpers.inheritAttributes(this.host, [
@@ -113,13 +295,7 @@ const Select = class {
113
295
  "tabindex",
114
296
  "title",
115
297
  ]);
116
- if (this.options.length > 0) {
117
- this.options.map((option) => {
118
- if (!option.value) {
119
- option.value = option.label;
120
- }
121
- });
122
- }
298
+ this.setOptionsValuesFromLabels();
123
299
  }
124
300
  componentDidRender() {
125
301
  if (this.nativeSelectElement && !this.disabled) {
@@ -130,34 +306,51 @@ const Select = class {
130
306
  helpers.onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Select");
131
307
  }
132
308
  render() {
133
- const { dense, disabled, fullWidth, helperText, hideLabel, host, inputId, label, name, open, options, menuId, placeholder, readonly, required, showClearButton, validationStatus, validationText, value, } = this;
309
+ const { dense, disabled, fullWidth, helperText, hideLabel, label, menuId, name, options, placeholder, readonly, required, searchable, showClearButton, validationStatus, validationText, value, } = this;
134
310
  helpers.renderHiddenInput(true, this.host, name, value, disabled);
135
311
  const invalid = validationStatus === helpers.IcInformationStatus.Error ? "true" : "false";
136
- const describedBy = helpers.getInputDescribedByText(inputId, helperText !== "", helpers.hasValidationStatus(this.validationStatus, this.disabled)).trim();
137
- return (index.h(index.Host, null, index.h("ic-input-container", { readonly: readonly }, !hideLabel && (index.h("ic-input-label", { for: inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly })), index.h("ic-input-component-container", { ref: (el) => (this.anchorEl = el), class: { "menu-open": open }, dense: dense, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, readonly ? (index.h("ic-typography", null, index.h("p", null, this.getLabelFromValue(value)))) : helpers.isMobileOrTablet() ? (index.h("select", Object.assign({ ref: (el) => (this.nativeSelectElement = el), disabled: disabled, onChange: this.handleNativeSelectChange, required: required, id: inputId, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, onBlur: this.onBlur, onFocus: this.onFocus }, this.inheritedAttributes), index.h("option", { value: "", selected: true, disabled: !this.showClearButton }, placeholder), options.map((option) => {
312
+ const describedBy = helpers.getInputDescribedByText(this.inputId, helperText !== "", helpers.hasValidationStatus(this.validationStatus, this.disabled)).trim();
313
+ return (index.h(index.Host, null, index.h("ic-input-container", { readonly: readonly }, !hideLabel && (index.h("ic-input-label", { for: this.inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly })), index.h("ic-input-component-container", { ref: (el) => (this.anchorEl = el), class: { "menu-open": this.open }, dense: dense, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, readonly ? (index.h("ic-typography", null, index.h("p", null, this.getLabelFromValue(value)))) : helpers.isMobileOrTablet() ? (index.h("select", Object.assign({ ref: (el) => (this.nativeSelectElement = el), disabled: disabled, onChange: this.handleNativeSelectChange, required: required, id: this.inputId, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, onBlur: this.onBlur, onFocus: this.onFocus }, this.inheritedAttributes), index.h("option", { value: "", selected: true, disabled: !showClearButton }, placeholder), options.map((option) => {
138
314
  if (option.children) {
139
315
  return (index.h("optgroup", { label: option.label }, option.children.map((option) => (index.h("option", { value: option.value, disabled: option.disabled, selected: option.value === value }, option.label)))));
140
316
  }
141
317
  else {
142
318
  return (index.h("option", { value: option.value, disabled: option.disabled, selected: option.value === value }, option.label));
143
319
  }
144
- }))) : (index.h("button", { class: "select-input", ref: (el) => (this.customSelectElement = el), id: inputId, "aria-label": `${label}, ${this.getLabelFromValue(value) || placeholder}${required ? ", required" : ""}`, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-haspopup": "listbox", "aria-expanded": open ? "true" : "false", "aria-owns": menuId, "aria-controls": menuId, disabled: disabled, onBlur: this.onBlur, onFocus: this.onFocus, onClick: this.handleClick, onMouseDown: this.handleMouseDown, onKeyDown: this.handleKeyDown }, index.h("ic-typography", { variant: "body", class: {
320
+ }))) : searchable ? (index.h("div", { class: "searchable-select-container" }, index.h("input", { class: "select-input", role: "combobox", "aria-label": label, "aria-describedby": describedBy, "aria-activedescendant": this.ariaActiveDescendant, "aria-autocomplete": "list", "aria-expanded": this.open ? "true" : "false", "aria-invalid": invalid, "aria-required": required ? "true" : "false", "aria-controls": menuId, ref: (el) => (this.searchableSelectElement = el), id: this.inputId, value: this.searchableSelectInputValue, placeholder: placeholder, disabled: disabled, onInput: this.handleSearchableSelectInput, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onFocus: this.onFocus, onBlur: this.onBlur }), this.searchableSelectInputValue &&
321
+ (showClearButton || searchable) && (index.h("div", { class: "clear-button-container" }, index.h("ic-button", { id: "clear-button", ref: (el) => (this.clearButton = el), "aria-label": this.searchableSelectInputValue && value === null
322
+ ? "Clear input"
323
+ : "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: dense ? "dense" : "default", variant: "icon", buttonStyle: this.clearButtonFocused
324
+ ? helpers.IcThemeForegroundEnum.Light
325
+ : helpers.IcThemeForegroundEnum.Dark }), index.h("div", { class: "divider" }))), index.h("span", { onMouseDown: this.handleExpandIconMouseDown, class: {
326
+ "expand-icon": true,
327
+ "expand-icon-open": this.open,
328
+ "expand-icon-filled": !(value == null || value === ""),
329
+ "expand-icon-disabled": !this.isMenuEnabled(),
330
+ }, innerHTML: Expand, "aria-hidden": "true" }), index.h("div", { "aria-live": "polite", role: "status", class: "searchable-select-results-status" }))) : (index.h("div", { class: "select-container" }, index.h("button", { class: "select-input", ref: (el) => (this.customSelectElement = el), id: this.inputId, "aria-label": `${label}, ${this.getLabelFromValue(value) || placeholder}${required ? ", required" : ""}`, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-haspopup": "listbox", "aria-expanded": this.open ? "true" : "false", "aria-owns": menuId, "aria-controls": menuId, disabled: disabled, onBlur: this.onBlur, onFocus: this.onFocus, onClick: this.handleClick, onMouseDown: this.handleMouseDown, onKeyDown: this.handleKeyDown }, index.h("ic-typography", { variant: "body", class: {
145
331
  "value-text": true,
146
332
  placeholder: this.getLabelFromValue(value) === undefined,
147
- } }, index.h("p", null, this.getLabelFromValue(value) || placeholder)), index.h("div", { class: "select-input-end" }, value && showClearButton && (index.h("div", { class: "clear-button-container" }, index.h("ic-button", { id: "clear-button", "aria-label": "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: dense ? "dense" : "default", variant: "icon", buttonStyle: this.clearButtonFocused
148
- ? helpers.IcThemeForegroundEnum.Light
149
- : helpers.IcThemeForegroundEnum.Dark }), index.h("div", { class: "divider" }))), index.h("span", { class: {
333
+ } }, index.h("p", null, this.getLabelFromValue(value) || placeholder)), index.h("div", { class: "select-input-end" }, value && showClearButton && index.h("div", { class: "divider" }), index.h("span", { class: {
150
334
  "expand-icon": true,
151
335
  "expand-icon-open": this.open,
152
- "expand-icon-filled": !(this.value == null || this.value === ""),
153
- }, innerHTML: Expand, "aria-hidden": "true" }))))), !helpers.isMobileOrTablet() && (index.h("ic-menu", { ref: (el) => (this.menu = el), inputEl: this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, dense: dense, menuId: menuId, open: open, options: options, value: value, fullWidth: fullWidth, onMenuChange: this.handleMenuChange, onOptionSelect: this.handleCustomSelectChange, parentEl: host })), index.h("ic-input-validation", { class: { "menu-open": open }, ariaLiveMode: "polite", status: helpers.hasValidationStatus(this.validationStatus, this.disabled) ===
336
+ "expand-icon-filled": !(value == null || value === ""),
337
+ }, innerHTML: Expand, "aria-hidden": "true" }))), value && showClearButton && (index.h("ic-button", { id: "clear-button", "aria-label": "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: dense ? "dense" : "default", variant: "icon", buttonStyle: this.clearButtonFocused
338
+ ? helpers.IcThemeForegroundEnum.Light
339
+ : helpers.IcThemeForegroundEnum.Dark }))))), !helpers.isMobileOrTablet() && (index.h("ic-menu", { class: {
340
+ "no-results": this.noOptions !== null,
341
+ }, ref: (el) => (this.menu = el), inputEl: searchable
342
+ ? this.searchableSelectElement
343
+ : this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, dense: dense, menuId: menuId, open: this.open, options: searchable ? this.filteredOptions : options, value: value, fullWidth: fullWidth, onMenuChange: this.handleMenuChange, onOptionSelect: this.handleCustomSelectChange, parentEl: this.host })), index.h("ic-input-validation", { class: { "menu-open": this.open }, ariaLiveMode: "polite", status: helpers.hasValidationStatus(this.validationStatus, this.disabled) ===
154
344
  false
155
345
  ? ""
156
346
  : validationStatus, message: helpers.hasValidationStatus(this.validationStatus, this.disabled)
157
347
  ? validationText
158
- : "", for: inputId }))));
348
+ : "", for: this.inputId }))));
159
349
  }
160
350
  get host() { return index.getElement(this); }
351
+ static get watchers() { return {
352
+ "options": ["watchOptionsHandler"]
353
+ }; }
161
354
  };
162
355
  Select.style = icSelectCss;
163
356
 
@@ -1 +1 @@
1
- {"file":"ic-select.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,0nKAA0nK;;ACgC9oK,IAAI,QAAQ,GAAG,CAAC,CAAC;MAOJ,MAAM;;;;;;IAMT,YAAO,GAAG,mBAAmB,QAAQ,EAAE,EAAE,CAAC;IAC1C,WAAM,GAAG,GAAG,IAAI,CAAC,OAAO,OAAO,CAAC;IAEhC,wBAAmB,GAA6B,EAAE,CAAC;IA8GnD,iBAAY,GAAG;MACrB,IAAI,IAAI,CAAC,mBAAmB,CAAC,aAAa,KAAK,CAAC,EAAE;QAChD,IAAI,CAAC,mBAAmB,CAAC,SAAS,GAAG,aAAa,CAAC;OACpD;WAAM;QACL,IAAI,CAAC,mBAAmB,CAAC,SAAS,GAAG,wBAAwB,CAAC;OAC/D;KACF,CAAC;IAEM,sBAAiB,GAAG,CAAC,KAAa;MACxC,OAAOA,yBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,O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B,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,EAAE,CACxC;OACF,EACD,SAAS,EAAE,MAAM,iBACL,MAAM,GAClB,CACE,CACC,CACV,CAC4B,EAC9B,CAACE,wBAAgB,EAAE,KAClBF,qBACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAC7B,OAAO,EAAE,IAAI,CAAC,mBAAmB,EACjC,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,cAAc,EAAE,IAAI,CAAC,wBAAwB,EAC7C,QAAQ,EAAE,IAAI,GACL,CACZ,EACDA,iCACE,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAC5B,YAAY,EAAC,QAAQ,EACrB,MAAM,EACJD,2BAAmB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC;QACzD,KAAK;UACD,EAAE;UACF,gBAAgB,EAEtB,OAAO,EACLA,2BAAmB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC;UACrD,cAAc;UACd,EAAE,EAER,GAAG,EAAE,OAAO,GACS,CACJ,CAChB,EACP;GACH;;;;;;;","names":["getLabelFromValue","inheritAttributes","IC_INHERITED_ARIA","onComponentRequiredPropUndefined","renderHiddenInput","IcInformationStatus","getInputDescribedByText","hasValidationStatus","h","Host","isMobileOrTablet","IcThemeForegroundEnum"],"sources":["./src/components/ic-select/ic-select.css?tag=ic-select&encapsulation=shadow","./src/components/ic-select/ic-select.tsx"],"sourcesContent":["@import \"../../global/normalise.css\";\n\n/**\n * @prop --input-width: Width of the input field\n*/\n\nic-input-component-container:hover {\n --border-color: var(--ic-action-dark-hover);\n}\n\nic-input-component-container:active {\n --border-color: var(--ic-action-dark-active);\n\n color: var(--ic-action-dark-active);\n}\n\nic-input-component-container.menu-open {\n --border-color: var(--ic-architectural-400);\n\n color: var(--ic-action-dark);\n}\n\nic-input-validation .status-icon,\nic-input-validation .statustext {\n visibility: visible;\n transition: visibility 0s 149ms;\n}\n\nic-input-validation.menu-open .status-icon,\nic-input-validation.menu-open .statustext {\n visibility: hidden;\n transition: visibility 0s;\n}\n\nselect {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n color: var(--ic-color-primary-text);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n height: 100%;\n padding-left: 6px;\n appearance: none;\n background-repeat: no-repeat;\n background-position: right 6px center;\n background-image: url(\"data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\");\n}\n\nselect option,\n.select-option-selected {\n color: var(--ic-color-primary-text);\n}\n\nselect:disabled {\n color: var(--ic-architectural-200);\n background-image: url(\"data:image/svg+xml;utf8,<svg fill='grey' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\");\n}\n\nselect:focus {\n border: 0;\n outline: 0;\n}\n\nselect:not([disabled]) {\n cursor: pointer;\n}\n\n.select-input {\n width: 100%;\n height: 100%;\n padding: 0 6px;\n display: flex;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n background: none;\n border: none;\n}\n\n.select-input:focus {\n outline: none;\n}\n\n:host(:not([disabled])) ic-input-component-container:hover .select-input {\n background-color: var(--ic-architectural-white);\n}\n\n:host([disabled]) .select-input {\n pointer-events: none;\n}\n\n.expand-icon {\n height: var(--ic-space-lg);\n padding-left: var(--ic-space-xs);\n color: var(--expand-icon-hover, var(--ic-architectural-400));\n}\n\n:host([disabled]) .expand-icon,\n:host([disabled]) .expand-icon > svg > path {\n color: var(--ic-architectural-200);\n}\n\n.expand-icon-open {\n transform: rotateX(180deg);\n color: var(--ic-action-dark);\n}\n\n.expand-icon-filled {\n padding-left: var(--ic-space-xxs);\n color: var(--ic-action-dark);\n}\n\n.placeholder {\n color: var(--ic-color-tertiary-text);\n}\n\n:host([disabled]) .value-text {\n color: var(--ic-architectural-200);\n}\n\n.select-input-end {\n display: flex;\n align-items: center;\n}\n\n.clear-button-container {\n display: flex;\n gap: var(--ic-space-xxs);\n padding-left: var(--ic-space-xs);\n}\n\n.divider {\n width: 1px;\n background-color: var(--ic-architectural-400);\n margin: var(--ic-space-xxs) 0;\n border-radius: 1px;\n}\n\n:host :focus-within .clear-button:focus {\n background-color: var(--ic-focus-blue);\n box-shadow: inset 0 0 0 2px var(--ic-focus-glow);\n border-radius: 4px;\n}\n\n.clear-button:focus * {\n fill: white;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n h,\n State,\n} from \"@stencil/core\";\n\nimport {\n getInputDescribedByText,\n getLabelFromValue,\n hasValidationStatus,\n inheritAttributes,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n isMobileOrTablet,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n IcThemeForegroundEnum,\n IcMenuOption,\n} from \"../../utils/types\";\nimport Expand from \"./assets/Expand.svg\";\nimport Clear from \"./assets/Clear.svg\";\nimport { IcValueEventDetail } from \"../../interface\";\n\nlet inputIds = 0;\n\n@Component({\n tag: \"ic-select\",\n styleUrl: \"ic-select.css\",\n shadow: true,\n})\nexport class Select {\n private nativeSelectElement: HTMLSelectElement;\n private customSelectElement: HTMLButtonElement;\n private menu: HTMLIcMenuElement;\n private anchorEl: HTMLElement;\n\n private inputId = `ic-select-input-${inputIds++}`;\n private menuId = `${this.inputId}-menu`;\n\n private inheritedAttributes: { [k: string]: unknown } = {};\n\n /**\n * Provide a label for the input.\n */\n @Prop() label!: string;\n\n /**\n * Provide the possible selection options.\n */\n @Prop() options?: IcMenuOption[] = [];\n\n /**\n * Specify if the input requires a value.\n */\n @Prop() required?: boolean = false;\n\n /**\n * Hides the label and applies the required label value as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Specify whether the input is disabled.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * Specify whether the input is read only.\n */\n @Prop() readonly?: boolean = false;\n\n /**\n * Provide a placeholder value to display.\n */\n @Prop() placeholder?: string = \"Select an option\";\n\n /**\n * Provide helper text to display additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n\n /**\n * Specify whether dense styling is to be applied to the element.\n */\n @Prop() dense?: boolean = false;\n\n /**\n * If true, then fill width of container.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * Provide a validation status.\n */\n @Prop() validationStatus?: IcInformationStatusOrEmpty = \"\";\n\n /**\n * Provide the text to display as the validation message.\n */\n @Prop() validationText?: string = \"\";\n\n /**\n * The value of the currently selected option.\n */\n @Prop() value?: string;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * Display a button which clears the input when clicked.\n */\n @Prop() showClearButton?: boolean = false;\n\n @State() open: boolean = false;\n\n @State() clearButtonFocused: boolean = false;\n\n /**\n * Emitted when a value is selected.\n */\n @Event() icChange!: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when select has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n /**\n * Emitted when select has blur.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n @Element() host!: HTMLIcSelectElement;\n\n /**\n * Sets focus on the input box.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.nativeSelectElement) {\n this.nativeSelectElement.focus();\n } else if (this.customSelectElement) {\n this.customSelectElement.focus();\n }\n }\n\n private setTextColor = (): void => {\n if (this.nativeSelectElement.selectedIndex === 0) {\n this.nativeSelectElement.className = \"placeholder\";\n } else {\n this.nativeSelectElement.className = \"select-option-selected\";\n }\n };\n\n private getLabelFromValue = (value: string): string | undefined => {\n return getLabelFromValue(value, this.options);\n };\n\n private handleNativeSelectChange = (): void => {\n this.icChange.emit({ value: this.nativeSelectElement.value });\n this.setTextColor();\n };\n\n private handleCustomSelectChange = (event: CustomEvent): void => {\n this.icChange.emit({ value: event.detail.value });\n };\n\n private handleMenuChange = (event: CustomEvent): void => {\n this.open = event.detail.open;\n };\n\n private handleMouseDown = (event: Event): void => {\n if (!this.open) {\n event.preventDefault();\n }\n };\n\n private handleClick = (event: MouseEvent): void => {\n if (event.detail !== 0) {\n this.menu.handleClickOpen();\n }\n };\n\n private handleClear = (event: Event): void => {\n event.stopPropagation();\n this.icChange.emit({ value: null });\n this.customSelectElement.focus();\n };\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n this.menu.handleKeyboardOpen(event);\n };\n\n private handleClearButtonFocus = (): void => {\n this.clearButtonFocused = true;\n };\n\n private handleClearButtonBlur = (): void => {\n this.clearButtonFocused = false;\n };\n\n private onFocus = (): void => {\n this.icFocus.emit();\n };\n\n private onBlur = (): void => {\n this.icBlur.emit();\n };\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.host, [\n ...IC_INHERITED_ARIA,\n \"tabindex\",\n \"title\",\n ]);\n\n if (this.options.length > 0) {\n this.options.map((option) => {\n if (!option.value) {\n option.value = option.label;\n }\n });\n }\n }\n\n componentDidRender(): void {\n if (this.nativeSelectElement && !this.disabled) {\n this.setTextColor();\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Select\"\n );\n }\n\n render() {\n const {\n dense,\n disabled,\n fullWidth,\n helperText,\n hideLabel,\n host,\n inputId,\n label,\n name,\n open,\n options,\n menuId,\n placeholder,\n readonly,\n required,\n showClearButton,\n validationStatus,\n validationText,\n value,\n } = this;\n\n renderHiddenInput(true, this.host, name, value, disabled);\n\n const invalid =\n validationStatus === IcInformationStatus.Error ? \"true\" : \"false\";\n\n const describedBy = getInputDescribedByText(\n inputId,\n helperText !== \"\",\n hasValidationStatus(this.validationStatus, this.disabled)\n ).trim();\n\n return (\n <Host>\n <ic-input-container readonly={readonly}>\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n readonly={readonly}\n ></ic-input-label>\n )}\n <ic-input-component-container\n ref={(el) => (this.anchorEl = el)}\n class={{ \"menu-open\": open }}\n dense={dense}\n fullWidth={fullWidth}\n disabled={disabled}\n readonly={readonly}\n validationStatus={validationStatus}\n >\n {readonly ? (\n <ic-typography>\n <p>{this.getLabelFromValue(value)}</p>\n </ic-typography>\n ) : isMobileOrTablet() ? (\n <select\n ref={(el) => (this.nativeSelectElement = el)}\n disabled={disabled}\n onChange={this.handleNativeSelectChange}\n required={required}\n id={inputId}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n {...this.inheritedAttributes}\n >\n <option value=\"\" selected disabled={!this.showClearButton}>\n {placeholder}\n </option>\n {options.map((option) => {\n if (option.children) {\n return (\n <optgroup label={option.label}>\n {option.children.map((option) => (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === value}\n >\n {option.label}\n </option>\n ))}\n </optgroup>\n );\n } else {\n return (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === value}\n >\n {option.label}\n </option>\n );\n }\n })}\n </select>\n ) : (\n <button\n class=\"select-input\"\n ref={(el) => (this.customSelectElement = el)}\n id={inputId}\n aria-label={`${label}, ${\n this.getLabelFromValue(value) || placeholder\n }${required ? \", required\" : \"\"}`}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-haspopup=\"listbox\"\n aria-expanded={open ? \"true\" : \"false\"}\n aria-owns={menuId}\n aria-controls={menuId}\n disabled={disabled}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.handleClick}\n onMouseDown={this.handleMouseDown}\n onKeyDown={this.handleKeyDown}\n >\n <ic-typography\n variant=\"body\"\n class={{\n \"value-text\": true,\n placeholder: this.getLabelFromValue(value) === undefined,\n }}\n >\n <p>{this.getLabelFromValue(value) || placeholder}</p>\n </ic-typography>\n <div class=\"select-input-end\">\n {value && showClearButton && (\n <div class=\"clear-button-container\">\n <ic-button\n id=\"clear-button\"\n aria-label=\"Clear selection\"\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearButtonFocus}\n onBlur={this.handleClearButtonBlur}\n size={dense ? \"dense\" : \"default\"}\n variant=\"icon\"\n buttonStyle={\n this.clearButtonFocused\n ? IcThemeForegroundEnum.Light\n : IcThemeForegroundEnum.Dark\n }\n ></ic-button>\n <div class=\"divider\"></div>\n </div>\n )}\n <span\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": this.open,\n \"expand-icon-filled\": !(\n this.value == null || this.value === \"\"\n ),\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n </div>\n </button>\n )}\n </ic-input-component-container>\n {!isMobileOrTablet() && (\n <ic-menu\n ref={(el) => (this.menu = el)}\n inputEl={this.customSelectElement}\n inputLabel={label}\n anchorEl={this.anchorEl}\n dense={dense}\n menuId={menuId}\n open={open}\n options={options}\n value={value}\n fullWidth={fullWidth}\n onMenuChange={this.handleMenuChange}\n onOptionSelect={this.handleCustomSelectChange}\n parentEl={host}\n ></ic-menu>\n )}\n <ic-input-validation\n class={{ \"menu-open\": open }}\n ariaLiveMode=\"polite\"\n status={\n hasValidationStatus(this.validationStatus, this.disabled) ===\n false\n ? \"\"\n : validationStatus\n }\n message={\n hasValidationStatus(this.validationStatus, this.disabled)\n ? validationText\n : \"\"\n }\n for={inputId}\n ></ic-input-validation>\n </ic-input-container>\n </Host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,kBAAkB;UACnBG,6BAAqB,CAAC,KAAK;UAC3BA,6BAAqB,CAAC,IAAI,GAErB,CACd,CACG,CACP,CAC4B,EAC9B,CAACD,wBAAgB,EAAE,KAClBF,qBACE,KAAK,EAAE;QACL,YAAY,EAAE,IAAI,CAAC,SAAS,KAAK,IAAI;OACtC,EACD,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAC7B,OAAO,EACL,UAAU;UACN,IAAI,CAAC,uBAAuB;UAC5B,IAAI,CAAC,mBAAmB,EAE9B,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC,eAAe,GAAG,OAAO,EACpD,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,cAAc,EAAE,IAAI,CAAC,wBAAwB,EAC7C,QAAQ,EAAE,IAAI,CAAC,IAAI,GACV,CACZ,EACDA,iCACE,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,EACjC,YAAY,EAAC,QAAQ,EACrB,MAAM,EACJD,2BAAmB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC;QACzD,KAAK;UACD,EAAE;UACF,gBAAgB,EAEtB,OAAO,EACLA,2BAAmB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC;UACrD,cAAc;UACd,EAAE,EAER,GAAG,EAAE,IAAI,CAAC,OAAO,GACI,CACJ,CAChB,EACP;GACH;;;;;;;;;;","names":["getLabelFromValue","getFilteredMenuOptions","inheritAttributes","IC_INHERITED_ARIA","onComponentRequiredPropUndefined","renderHiddenInput","IcInformationStatus","getInputDescribedByText","hasValidationStatus","h","Host","isMobileOrTablet","IcThemeForegroundEnum"],"sources":["./src/components/ic-select/ic-select.css?tag=ic-select&encapsulation=shadow","./src/components/ic-select/ic-select.tsx"],"sourcesContent":["@import \"../../global/normalise.css\";\n\n/**\n * @prop --input-width: Width of the input field\n*/\n\nic-input-component-container:hover {\n --border-color: var(--ic-action-dark-hover);\n}\n\nic-input-component-container:active {\n --border-color: var(--ic-action-dark-active);\n\n color: var(--ic-action-dark-active);\n}\n\nic-input-component-container.menu-open {\n --border-color: var(--ic-architectural-400);\n\n color: var(--ic-action-dark);\n}\n\nic-input-validation .status-icon,\nic-input-validation .statustext {\n visibility: visible;\n}\n\nic-input-validation.menu-open .status-icon,\nic-input-validation.menu-open .statustext {\n visibility: hidden;\n transition: visibility 0s;\n}\n\nic-input-label {\n margin-bottom: var(--ic-space-xs) !important;\n}\n\nselect {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n color: var(--ic-color-primary-text);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n height: 100%;\n padding-left: 6px;\n appearance: none;\n background-repeat: no-repeat;\n background-position: right 6px center;\n background-image: url(\"data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\");\n}\n\nselect option,\n.select-option-selected {\n color: var(--ic-color-primary-text);\n}\n\nselect:disabled {\n color: var(--ic-architectural-200);\n background-image: url(\"data:image/svg+xml;utf8,<svg fill='grey' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\");\n}\n\nselect:focus {\n border: 0;\n outline: 0;\n}\n\nselect:not([disabled]) {\n cursor: pointer;\n}\n\n.select-container {\n width: 100%;\n display: flex;\n align-items: center;\n}\n\n.select-input {\n width: 100%;\n height: 100%;\n padding: 0 6px;\n display: flex;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n background: none;\n border: none;\n}\n\n.select-input:focus {\n outline: none;\n}\n\n:host(:not([disabled])) ic-input-component-container:hover .select-input {\n background-color: var(--ic-architectural-white);\n}\n\n:host([disabled]) .select-input {\n pointer-events: none;\n}\n\n:host([searchable]) .select-input {\n cursor: auto;\n}\n\n.searchable-select-container {\n align-items: center;\n display: flex;\n width: 100%;\n}\n\n.expand-icon {\n height: var(--ic-space-lg);\n padding-left: var(--ic-space-xs);\n color: var(--expand-icon-hover, var(--ic-architectural-400));\n}\n\n:host([disabled]) .expand-icon,\n:host([disabled]) .expand-icon > svg > path {\n color: var(--ic-architectural-200);\n}\n\n:host([searchable]) .expand-icon {\n padding-left: var(--ic-space-xxs);\n height: 36px;\n}\n\n:host([searchable]) .expand-icon > svg {\n height: 36px;\n padding: 0 6px;\n}\n\n:host([searchable]:not([disabled])) .expand-icon > svg {\n cursor: pointer;\n}\n\n.expand-icon-open {\n color: var(--ic-action-dark);\n}\n\n.expand-icon-filled {\n color: var(--ic-action-dark);\n}\n\n.expand-icon-open,\n:host([searchable]) .expand-icon-open {\n transform: rotateX(180deg);\n}\n\n:host([disabled]) .value-text,\n.placeholder {\n color: var(--ic-color-tertiary-text);\n}\n\n.select-input-end {\n display: flex;\n align-items: center;\n}\n\n.clear-button-container {\n display: flex;\n gap: var(--ic-space-xxs);\n padding-left: 38px;\n}\n\n:host([dense]) .clear-button-container {\n padding-left: 30px;\n}\n\n.divider {\n width: 1px;\n background-color: var(--ic-architectural-400);\n margin: var(--ic-space-xxs) 0;\n border-radius: 1px;\n height: var(--ic-space-lg);\n}\n\n:host([dense]) .divider {\n height: var(--ic-space-md);\n}\n\n.clear-button {\n position: absolute;\n right: 44px;\n border-radius: var(--ic-border-radius);\n transition: box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);\n}\n\n.clear-button:focus {\n background-color: var(--ic-focus-blue);\n box-shadow: inset 0 0 0 2px var(--ic-focus-glow);\n border-radius: 4px;\n}\n\n.clear-button:focus * {\n fill: white;\n}\n\n.searchable-select-results-status {\n border: 0;\n clip: rect(0, 0, 0, 0, 0);\n height: 1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n h,\n State,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n getInputDescribedByText,\n getLabelFromValue,\n hasValidationStatus,\n inheritAttributes,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n isMobileOrTablet,\n getFilteredMenuOptions,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n IcThemeForegroundEnum,\n IcMenuOption,\n IcSearchMatchPositions,\n} from \"../../utils/types\";\nimport Expand from \"./assets/Expand.svg\";\nimport Clear from \"./assets/Clear.svg\";\nimport { IcValueEventDetail } from \"../../interface\";\n\nlet inputIds = 0;\n\n@Component({\n tag: \"ic-select\",\n styleUrl: \"ic-select.css\",\n shadow: true,\n})\nexport class Select {\n private nativeSelectElement: HTMLSelectElement;\n private customSelectElement: HTMLButtonElement;\n private searchableSelectElement: HTMLInputElement;\n private menu: HTMLIcMenuElement;\n private anchorEl: HTMLElement;\n private clearButton: HTMLIcButtonElement;\n\n private inputId = `ic-select-input-${inputIds++}`;\n private menuId = `${this.inputId}-menu`;\n\n private inheritedAttributes: { [k: string]: unknown } = {};\n\n private debounce: number;\n\n /**\n * Provide a label for the input.\n */\n @Prop() label!: string;\n\n /**\n * Provide the possible selection options.\n */\n @Prop() options?: IcMenuOption[] = [];\n\n /**\n * Specify if the input requires a value.\n */\n @Prop() required?: boolean = false;\n\n /**\n * Hides the label and applies the required label value as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Specify whether the input is disabled.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * Specify whether the input is read only.\n */\n @Prop() readonly?: boolean = false;\n\n /**\n * Provide a placeholder value to display.\n */\n @Prop() placeholder?: string = \"Select an option\";\n\n /**\n * Provide helper text to display additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n\n /**\n * Specify whether dense styling is to be applied to the element.\n */\n @Prop() dense?: boolean = false;\n\n /**\n * If true, then fill width of container.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * Provide a validation status.\n */\n @Prop() validationStatus?: IcInformationStatusOrEmpty = \"\";\n\n /**\n * Provide the text to display as the validation message.\n */\n @Prop() validationText?: string = \"\";\n\n /**\n * The value of the currently selected option.\n */\n @Prop() value?: string;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * Display a button which clears the input when clicked. The button will always appear on the searchable select.\n */\n @Prop() showClearButton?: boolean = false;\n\n /**\n * If true, the select can be typed in to filter options.\n */\n @Prop() searchable?: boolean = false;\n\n /**\n * If true, descriptions of options are included when filtering options in a searchable select.\n */\n @Prop() includeDescriptionsInSearch?: boolean = false;\n\n /**\n * If true, group titles of grouped options are included when filtering options in a searchable select.\n */\n @Prop() includeGroupTitlesInSearch?: boolean = false;\n\n /**\n * Whether the search string of the searchable select should match the start of or anywhere in the options.\n */\n @Prop() searchMatchPosition?: IcSearchMatchPositions = \"anywhere\";\n\n /**\n * Number of characters until suggestions appear for a searchable select.\n */\n @Prop() charactersUntilSuggestions?: number = 0;\n\n /**\n * Provide text for empty results list\n */\n @Prop() emptyOptionListText = \"No results found\";\n\n @State() open: boolean = false;\n\n @State() clearButtonFocused: boolean = false;\n\n @State() searchableSelectInputValue: string = null;\n\n @State() filteredOptions: IcMenuOption[] = this.options;\n\n @State() ariaActiveDescendant: string;\n\n @State() noOptions: IcMenuOption[] = null;\n\n @Watch(\"options\")\n watchOptionsHandler(): void {\n this.setOptionsValuesFromLabels();\n this.filteredOptions = this.options;\n }\n\n /**\n * Emitted when a value is selected.\n */\n @Event() icChange!: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when select has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n /**\n * Emitted when select has blur.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n @Element() host!: HTMLIcSelectElement;\n\n /**\n * Sets focus on the input box.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.nativeSelectElement) {\n this.nativeSelectElement.focus();\n } else if (this.customSelectElement) {\n this.customSelectElement.focus();\n } else if (this.searchableSelectElement) {\n this.searchableSelectElement.focus();\n }\n }\n\n private isMenuEnabled = () => {\n return (\n ((this.searchableSelectInputValue === null ||\n this.searchableSelectInputValue === \"\") &&\n this.charactersUntilSuggestions === 0) ||\n (this.searchableSelectInputValue &&\n this.searchableSelectInputValue.length >=\n this.charactersUntilSuggestions)\n );\n };\n\n private setOptionsValuesFromLabels = (): void => {\n if (this.options.length > 0) {\n this.options.map((option) => {\n if (!option.value) {\n option.value = option.label;\n }\n });\n }\n };\n\n private setTextColor = (): void => {\n if (this.nativeSelectElement.selectedIndex === 0) {\n this.nativeSelectElement.className = \"placeholder\";\n } else {\n this.nativeSelectElement.className = \"select-option-selected\";\n }\n };\n\n private setMenuChange = (open: boolean) => {\n if (this.open !== open) {\n this.open = open;\n }\n };\n\n private getLabelFromValue = (value: string): string | undefined => {\n return getLabelFromValue(value, this.options);\n };\n\n private getValueFromLabel = (label: string): string | undefined => {\n const value = this.options.find((option) => option.label === label)?.value;\n return value;\n };\n\n private getFilteredChildMenuOptions = (option: IcMenuOption) => {\n let children = option.children;\n\n children = getFilteredMenuOptions(\n option.children,\n this.includeDescriptionsInSearch,\n this.searchableSelectInputValue,\n this.searchMatchPosition\n );\n\n const newOption = { ...option };\n newOption.children = children;\n return newOption;\n };\n\n private handleNativeSelectChange = (): void => {\n this.icChange.emit({ value: this.nativeSelectElement.value });\n this.setTextColor();\n };\n\n private handleCustomSelectChange = (event: CustomEvent): void => {\n if (this.searchable && event.detail.label === this.emptyOptionListText) {\n this.searchableSelectElement.focus();\n return;\n }\n\n if (this.searchable) {\n this.searchableSelectInputValue = this.getLabelFromValue(\n event.detail.value\n );\n }\n\n this.ariaActiveDescendant = event.detail.optionId;\n this.icChange.emit({ value: event.detail.value });\n };\n\n private handleMenuChange = (event: CustomEvent): void => {\n this.open = event.detail.open;\n\n this.searchable && this.handleFocusIndicatorDisplay();\n };\n\n private handleFocusIndicatorDisplay = () => {\n const focusIndicator =\n this.host.shadowRoot.querySelector(\".focus-indicator\");\n\n if (this.open) {\n focusIndicator.classList.add(\"focus-indicator-enabled\");\n } else {\n focusIndicator.classList.remove(\"focus-indicator-enabled\");\n }\n };\n\n private handleMouseDown = (event: Event): void => {\n if (!this.open) {\n event.preventDefault();\n }\n };\n\n private handleClick = (event: MouseEvent): void => {\n this.noOptions = null;\n this.menu.options = this.options;\n\n if (event.detail !== 0 && this.isMenuEnabled()) {\n this.menu.handleClickOpen();\n }\n };\n\n private handleExpandIconMouseDown = (event: MouseEvent) => {\n if (!this.disabled) {\n event.preventDefault();\n this.searchableSelectElement.focus();\n this.handleClick(event);\n }\n };\n\n private handleClear = (event: Event): void => {\n event.stopPropagation();\n this.noOptions = null;\n this.icChange.emit({ value: null });\n\n if (this.searchable) {\n this.searchableSelectElement.value = null;\n this.searchableSelectInputValue = null;\n this.menu.options = this.options;\n this.searchableSelectElement.focus();\n\n if (!this.isMenuEnabled()) {\n this.setMenuChange(false);\n }\n } else {\n this.customSelectElement.focus();\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n event.cancelBubble = true;\n\n if (!this.open) {\n this.noOptions = null;\n this.menu.options = this.options;\n }\n\n if (this.open && event.key === \"Enter\") {\n this.setMenuChange(false);\n } else {\n if (\n !(\n (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") &&\n this.noOptions !== null\n ) &&\n this.isMenuEnabled()\n ) {\n this.menu.handleKeyboardOpen(event);\n }\n }\n };\n\n private handleClearButtonFocus = (): void => {\n this.clearButtonFocused = true;\n };\n\n private handleClearButtonBlur = (): void => {\n this.clearButtonFocused = false;\n };\n\n private handleSearchableSelectInput = (event: Event): void => {\n this.searchableSelectInputValue = (event.target as HTMLInputElement).value;\n\n if (this.getValueFromLabel(this.searchableSelectInputValue) === undefined) {\n this.icChange.emit({ value: null });\n }\n\n if (this.isMenuEnabled()) {\n this.setMenuChange(true);\n } else {\n this.setMenuChange(false);\n }\n\n const options = [...this.options];\n\n let isGrouped = false;\n let newFilteredOptions: IcMenuOption[] = [];\n\n options.map((option) => {\n if (option.children) isGrouped = true;\n });\n\n const menuOptionsFiltered = getFilteredMenuOptions(\n options,\n this.includeDescriptionsInSearch,\n this.searchableSelectInputValue,\n this.searchMatchPosition\n );\n\n if (!isGrouped) {\n newFilteredOptions = menuOptionsFiltered;\n } else {\n options.map((option) => {\n if (this.includeGroupTitlesInSearch) {\n if (menuOptionsFiltered.indexOf(option) !== -1) {\n newFilteredOptions.push(option);\n } else {\n newFilteredOptions.push(this.getFilteredChildMenuOptions(option));\n }\n } else {\n newFilteredOptions.push(this.getFilteredChildMenuOptions(option));\n }\n });\n }\n\n let noChildOptionsWhenFiltered = false;\n\n if (isGrouped) {\n noChildOptionsWhenFiltered = true;\n newFilteredOptions.map((option) => {\n if (option.children.length > 0) {\n noChildOptionsWhenFiltered = false;\n }\n });\n }\n\n const noOptions = [{ label: this.emptyOptionListText, value: \"\" }];\n\n if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {\n this.noOptions = null;\n this.filteredOptions = newFilteredOptions;\n } else {\n this.noOptions = noOptions;\n this.filteredOptions = this.noOptions;\n }\n\n this.debounceAriaLiveUpdate();\n };\n\n private updateSearchableSelectResultAriaLive = (): void => {\n const searchableSelectResultsStatusEl = this.host.shadowRoot.querySelector(\n \".searchable-select-results-status\"\n ) as HTMLDivElement;\n\n if (this.noOptions !== null) {\n searchableSelectResultsStatusEl.innerText = this.emptyOptionListText;\n } else {\n searchableSelectResultsStatusEl.innerText = \"\";\n }\n };\n\n private debounceAriaLiveUpdate() {\n clearTimeout(this.debounce);\n\n window.setTimeout(() => {\n this.updateSearchableSelectResultAriaLive();\n }, 800);\n }\n\n private onFocus = (): void => {\n this.icFocus.emit();\n };\n\n private onBlur = (event: FocusEvent): void => {\n if (\n this.searchable &&\n event.relatedTarget !== this.menu &&\n !(this.clearButton && event.relatedTarget === this.clearButton)\n ) {\n this.setMenuChange(false);\n this.handleFocusIndicatorDisplay();\n }\n\n this.icBlur.emit();\n };\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.host, [\n ...IC_INHERITED_ARIA,\n \"tabindex\",\n \"title\",\n ]);\n\n this.setOptionsValuesFromLabels();\n }\n\n componentDidRender(): void {\n if (this.nativeSelectElement && !this.disabled) {\n this.setTextColor();\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Select\"\n );\n }\n\n render() {\n const {\n dense,\n disabled,\n fullWidth,\n helperText,\n hideLabel,\n label,\n menuId,\n name,\n options,\n placeholder,\n readonly,\n required,\n searchable,\n showClearButton,\n validationStatus,\n validationText,\n value,\n } = this;\n\n renderHiddenInput(true, this.host, name, value, disabled);\n\n const invalid =\n validationStatus === IcInformationStatus.Error ? \"true\" : \"false\";\n\n const describedBy = getInputDescribedByText(\n this.inputId,\n helperText !== \"\",\n hasValidationStatus(this.validationStatus, this.disabled)\n ).trim();\n\n return (\n <Host>\n <ic-input-container readonly={readonly}>\n {!hideLabel && (\n <ic-input-label\n for={this.inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n readonly={readonly}\n ></ic-input-label>\n )}\n <ic-input-component-container\n ref={(el) => (this.anchorEl = el)}\n class={{ \"menu-open\": this.open }}\n dense={dense}\n fullWidth={fullWidth}\n disabled={disabled}\n readonly={readonly}\n validationStatus={validationStatus}\n >\n {readonly ? (\n <ic-typography>\n <p>{this.getLabelFromValue(value)}</p>\n </ic-typography>\n ) : isMobileOrTablet() ? (\n <select\n ref={(el) => (this.nativeSelectElement = el)}\n disabled={disabled}\n onChange={this.handleNativeSelectChange}\n required={required}\n id={this.inputId}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n {...this.inheritedAttributes}\n >\n <option value=\"\" selected disabled={!showClearButton}>\n {placeholder}\n </option>\n {options.map((option) => {\n if (option.children) {\n return (\n <optgroup label={option.label}>\n {option.children.map((option) => (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === value}\n >\n {option.label}\n </option>\n ))}\n </optgroup>\n );\n } else {\n return (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === value}\n >\n {option.label}\n </option>\n );\n }\n })}\n </select>\n ) : searchable ? (\n <div class=\"searchable-select-container\">\n <input\n class=\"select-input\"\n role=\"combobox\"\n aria-label={label}\n aria-describedby={describedBy}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-autocomplete=\"list\"\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-invalid={invalid}\n aria-required={required ? \"true\" : \"false\"}\n aria-controls={menuId}\n ref={(el) => (this.searchableSelectElement = el)}\n id={this.inputId}\n value={this.searchableSelectInputValue}\n placeholder={placeholder}\n disabled={disabled}\n onInput={this.handleSearchableSelectInput}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ></input>\n {this.searchableSelectInputValue &&\n (showClearButton || searchable) && (\n <div class=\"clear-button-container\">\n <ic-button\n id=\"clear-button\"\n ref={(el) => (this.clearButton = el)}\n aria-label={\n this.searchableSelectInputValue && value === null\n ? \"Clear input\"\n : \"Clear selection\"\n }\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearButtonFocus}\n onBlur={this.handleClearButtonBlur}\n size={dense ? \"dense\" : \"default\"}\n variant=\"icon\"\n buttonStyle={\n this.clearButtonFocused\n ? IcThemeForegroundEnum.Light\n : IcThemeForegroundEnum.Dark\n }\n ></ic-button>\n <div class=\"divider\"></div>\n </div>\n )}\n <span\n onMouseDown={this.handleExpandIconMouseDown}\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": this.open,\n \"expand-icon-filled\": !(value == null || value === \"\"),\n \"expand-icon-disabled\": !this.isMenuEnabled(),\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n <div\n aria-live=\"polite\"\n role=\"status\"\n class=\"searchable-select-results-status\"\n ></div>\n </div>\n ) : (\n <div class=\"select-container\">\n <button\n class=\"select-input\"\n ref={(el) => (this.customSelectElement = el)}\n id={this.inputId}\n aria-label={`${label}, ${\n this.getLabelFromValue(value) || placeholder\n }${required ? \", required\" : \"\"}`}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-haspopup=\"listbox\"\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-owns={menuId}\n aria-controls={menuId}\n disabled={disabled}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.handleClick}\n onMouseDown={this.handleMouseDown}\n onKeyDown={this.handleKeyDown}\n >\n <ic-typography\n variant=\"body\"\n class={{\n \"value-text\": true,\n placeholder: this.getLabelFromValue(value) === undefined,\n }}\n >\n <p>{this.getLabelFromValue(value) || placeholder}</p>\n </ic-typography>\n <div class=\"select-input-end\">\n {value && showClearButton && <div class=\"divider\"></div>}\n <span\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": this.open,\n \"expand-icon-filled\": !(value == null || value === \"\"),\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n </div>\n </button>\n {value && showClearButton && (\n <ic-button\n id=\"clear-button\"\n aria-label=\"Clear selection\"\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearButtonFocus}\n onBlur={this.handleClearButtonBlur}\n size={dense ? \"dense\" : \"default\"}\n variant=\"icon\"\n buttonStyle={\n this.clearButtonFocused\n ? IcThemeForegroundEnum.Light\n : IcThemeForegroundEnum.Dark\n }\n ></ic-button>\n )}\n </div>\n )}\n </ic-input-component-container>\n {!isMobileOrTablet() && (\n <ic-menu\n class={{\n \"no-results\": this.noOptions !== null,\n }}\n ref={(el) => (this.menu = el)}\n inputEl={\n searchable\n ? this.searchableSelectElement\n : this.customSelectElement\n }\n inputLabel={label}\n anchorEl={this.anchorEl}\n dense={dense}\n menuId={menuId}\n open={this.open}\n options={searchable ? this.filteredOptions : options}\n value={value}\n fullWidth={fullWidth}\n onMenuChange={this.handleMenuChange}\n onOptionSelect={this.handleCustomSelectChange}\n parentEl={this.host}\n ></ic-menu>\n )}\n <ic-input-validation\n class={{ \"menu-open\": this.open }}\n ariaLiveMode=\"polite\"\n status={\n hasValidationStatus(this.validationStatus, this.disabled) ===\n false\n ? \"\"\n : validationStatus\n }\n message={\n hasValidationStatus(this.validationStatus, this.disabled)\n ? validationText\n : \"\"\n }\n for={this.inputId}\n ></ic-input-validation>\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-3ef30d9d.js');
6
6
  const closeIcon = require('./close-icon-8ccb0163.js');
7
7
  const chevronIcon = require('./chevron-icon-d175fe66.js');
8
- const helpers = require('./helpers-9d4961dc.js');
8
+ const helpers = require('./helpers-ea79c7b0.js');
9
9
 
10
10
  const menuIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
11
11
  <path d="M0 0h24v24H0V0z" fill="none" />
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3ef30d9d.js');
6
- const helpers = require('./helpers-9d4961dc.js');
6
+ const helpers = require('./helpers-ea79c7b0.js');
7
7
 
8
8
  const icStatusTagCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}.tag{padding:var(--ic-space-xs) var(--ic-space-sm);font-size:14px;border-radius:80px;display:inline-block;min-width:40px;text-align:center}.dense{padding:var(--ic-space-xxs) var(--ic-space-sm)}.primary-neutral{background-color:var(--ic-architectural-600);color:var(--ic-architectural-white)}.primary-success{background-color:var(--ic-status-success);color:var(--ic-architectural-white)}.primary-warning{background-color:var(--ic-status-warning);color:var(--ic-color-primary-text)}.primary-danger{background-color:var(--ic-status-error);color:var(--ic-architectural-white)}.secondary-neutral{background-color:var(--ic-architectural-200);color:var(--ic-color-secondary-text);border:1px solid var(--ic-architectural-400)}.secondary-success{background-color:var(--ic-status-success-background);color:var(--ic-status-success);border:1px solid var(--ic-status-success)}.secondary-warning{background-color:var(--ic-status-warning-background);color:var(--ic-status-warning-dark);border:1px solid var(--ic-status-warning-dark)}.secondary-danger{background-color:var(--ic-status-error-background);color:var(--ic-status-error);border:1px solid var(--ic-status-error)}";
9
9
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3ef30d9d.js');
6
6
  const checkIcon = require('./check-icon-999d9877.js');
7
- const helpers = require('./helpers-9d4961dc.js');
7
+ const helpers = require('./helpers-ea79c7b0.js');
8
8
 
9
9
  const icStepCss = ":host{display:flex;flex:auto}:host(.last-step){flex-grow:initial}.step{display:flex;flex-direction:column;flex:1 1 0}.step-top{display:flex;width:100%;align-items:center;align-self:flex-start;height:40px}.step-icon{display:flex;justify-content:center;align-items:center;border-radius:50%}.step-icon-inner{width:var(--ic-space-xl);height:var(--ic-space-xl);display:flex;justify-content:center;align-items:center;border-radius:50%}.current{color:var(--ic-theme-primary)}.step-title-area{margin:var(--ic-space-xs) 0;padding-right:var(--ic-space-xs)}.step-title,.step-subtitle{width:-moz-fit-content;width:fit-content}.step-subtitle{color:var(--ic-color-tertiary-text)}.current .step-subtitle{color:var(--ic-color-primary-text)}.completed{color:var(--ic-status-success)}.active .step-icon-inner{box-shadow:inset var(--ic-architectural-200) 0 0 0 2px}.current .step-icon-inner{background-color:var(--ic-theme-primary);color:white}.disabled{color:var(--ic-architectural-200)}.disabled .step-icon-inner{border:1px dashed var(--ic-architectural-200);width:calc(var(--ic-space-xl) - var(--ic-space-xxxs));height:calc(var(--ic-space-xl) - var(--ic-space-xxxs))}.disabled .step-title-area{color:var(--ic-color-tertiary-text)}.completed .step-icon-inner{background:var(--ic-status-success);box-shadow:inset var(--ic-status-success) 0 0 0 var(--ic-space-xxxs);border-radius:100%}.current .step-icon{border:var(--ic-space-xxxs) solid var(--ic-theme-primary);padding:var(--ic-space-xxxs);margin:0 calc(-1 * var(--ic-space-xxxs));}.step-connect{height:var(--ic-space-xxxs);background-color:var(--ic-architectural-200);margin:0 var(--ic-space-xs);border-radius:var(--ic-space-xxs);width:100%}.aligned-full-width.step-connect{min-width:100px;width:100%}.disabled .step-connect{height:0;background-color:rgb(0 0 0 / 0%);border-top:2px dashed var(--ic-architectural-200);border-radius:0}.completed .step-connect{background-color:var(--ic-status-success)}.step-connect-inner{width:70%;display:flex;flex:auto;height:var(--ic-space-xxxs);border-radius:var(--ic-space-xxs);background-color:var(--ic-theme-primary)}.check-icon{padding-top:var(--ic-space-xxs)}.check-icon svg{width:16px;height:16px}.check-icon>svg>path{fill:white}";
10
10
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3ef30d9d.js');
6
- const helpers = require('./helpers-9d4961dc.js');
6
+ const helpers = require('./helpers-ea79c7b0.js');
7
7
 
8
8
  const icStepperCss = ":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.aligned-full-width) .step-item-list{flex:auto}";
9
9
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3ef30d9d.js');
6
- const helpers = require('./helpers-9d4961dc.js');
6
+ const helpers = require('./helpers-ea79c7b0.js');
7
7
 
8
8
  const icSwitchCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block}input{overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ic-switch-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ic-space-xxs);cursor:pointer}.ic-switch-label{margin-left:var(--ic-space-xxs);margin-bottom:var(--ic-space-sm)}.ic-switch-label-dense{margin-bottom:10px}.ic-switch-toggle{display:flex;align-items:center;justify-content:space-around;width:64px;height:var(--ic-space-xl);position:relative;border-radius:100vw;background-color:var(--ic-architectural-200);border:1px solid var(--ic-architectural-700);box-sizing:border-box;transition:var(--ic-transition-duration-fast)}.ic-switch-line-break{flex:1 0 100%}.ic-switch-checked-status{padding-left:var(--ic-space-xxs)}.ic-switch-toggle::before{content:\"\";width:21.33px;height:21.33px;border-radius:50%;position:absolute;z-index:2;top:50%;left:5.33px;transform:translate(0, -50%);background-color:var(--ic-architectural-700);transition:var(--ic-transition-duration-slow)}.ic-switch-icon{display:inline-block;vertical-align:middle;width:10px;height:10px}.ic-switch-icon-circle,.ic-switch-icon-line{stroke-width:1}.ic-switch-icon-circle{stroke:var(--ic-architectural-700)}.ic-switch-icon-line{stroke:var(--ic-architectural-white)}@media (prefers-reduced-motion: reduce){.ic-switch-toggle::before{transition-duration:0ms}}.ic-switch-input:checked+.ic-switch-toggle{background-color:var(--ic-action-default);border:none}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-xl), -50%);background-color:var(--ic-architectural-white)}.ic-switch-input:not([disabled])+.ic-switch-toggle:hover::before{box-shadow:0 0 0 12px var(--ic-action-dark-bg-hover)}.ic-switch-input:not([disabled])+.ic-switch-toggle:active::before{box-shadow:0 0 0 12px var(--ic-action-dark-bg-active)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:hover::before{box-shadow:0 0 0 12px var(--ic-action-default-bg-hover)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:active::before{box-shadow:0 0 0 12px var(--ic-action-default-bg-active)}.ic-switch-input:focus:not([disabled])+.ic-switch-toggle,.ic-switch-input:focus-visible:not([disabled])+.ic-switch-toggle{box-shadow:0 0 0 1px var(--ic-architectural-white),\n 0 0 0 3px var(--ic-action-default),\n 0 0 0 8px var(--ic-action-default-active-alpha)}.ic-switch-disabled{cursor:default}.ic-switch-disabled .ic-switch-icon-circle{stroke:var(--ic-architectural-300)}.ic-switch-disabled .ic-switch-icon-line{stroke:var(--ic-action-default-bg-active)}.ic-switch-input:disabled+.ic-switch-toggle{background-color:var(--ic-architectural-80);border:1px dashed var(--ic-architectural-300)}.ic-switch-input:disabled~.ic-switch-checked-status{color:var(--ic-architectural-300)}.ic-switch-input:disabled+.ic-switch-toggle::before{background-color:var(--ic-architectural-300)}.ic-switch-input:disabled:checked+.ic-switch-toggle{background-color:var(--ic-status-info-background);border:1px dashed #98c9f5}.ic-switch-input:disabled:checked+.ic-switch-toggle::before{background-color:var(--ic-architectural-white)}.ic-switch-dense{gap:var(--ic-space-xxxs)}.ic-switch-dense .ic-switch-checked-status{padding-left:6px}.ic-switch-dense .ic-switch-toggle{width:var(--ic-space-xxl);height:var(--ic-space-lg)}.ic-switch-dense .ic-switch-toggle::before{width:var(--ic-space-md);height:var(--ic-space-md);left:var(--ic-space-xxs)}.ic-switch-dense .ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-lg), -50%)}::slotted(*){margin-left:var(--ic-space-sm)}";
9
9