@ukic/web-components 2.1.0-beta.3 → 2.1.0-beta.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (329) hide show
  1. package/README.md +8 -0
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/{helpers-8bc3b6d2.js → helpers-81484ceb.js} +2 -2
  4. package/dist/cjs/helpers-81484ceb.js.map +1 -0
  5. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js +17 -4
  14. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +9 -4
  36. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-radio-option.cjs.entry.js +2 -2
  52. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-search-bar.cjs.entry.js +15 -18
  54. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-select.cjs.entry.js +2 -2
  57. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-status-tag.cjs.entry.js +4 -3
  61. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-text-field.cjs.entry.js +2 -2
  68. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  70. package/dist/cjs/ic-top-navigation.cjs.entry.js +3 -3
  71. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  73. package/dist/cjs/loader.cjs.js +1 -1
  74. package/dist/collection/components/ic-card/ic-card.css +58 -14
  75. package/dist/collection/components/ic-card/ic-card.js +62 -6
  76. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  77. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +1 -1
  78. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
  79. package/dist/collection/components/ic-menu/ic-menu.js +8 -3
  80. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  81. package/dist/collection/components/ic-radio-option/ic-radio-option.css +7 -8
  82. package/dist/collection/components/ic-search-bar/ic-search-bar.js +16 -21
  83. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  84. package/dist/collection/components/ic-select/ic-select.css +4 -0
  85. package/dist/collection/components/ic-status-tag/ic-status-tag.js +21 -2
  86. package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
  87. package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js +1 -1
  88. package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js.map +1 -1
  89. package/dist/collection/components/ic-text-field/ic-text-field.css +1 -0
  90. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +7 -2
  91. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +1 -1
  92. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  93. package/dist/collection/normalize.css +440 -0
  94. package/dist/collection/utils/helpers.js +1 -1
  95. package/dist/collection/utils/helpers.js.map +1 -1
  96. package/dist/components/helpers.js +2 -2
  97. package/dist/components/helpers.js.map +1 -1
  98. package/dist/components/ic-alert.js.map +1 -1
  99. package/dist/components/ic-back-to-top.js.map +1 -1
  100. package/dist/components/ic-button2.js.map +1 -1
  101. package/dist/components/ic-card.js +39 -5
  102. package/dist/components/ic-card.js.map +1 -1
  103. package/dist/components/ic-checkbox-group.js.map +1 -1
  104. package/dist/components/ic-checkbox.js.map +1 -1
  105. package/dist/components/ic-chip.js.map +1 -1
  106. package/dist/components/ic-classification-banner.js +1 -1
  107. package/dist/components/ic-classification-banner.js.map +1 -1
  108. package/dist/components/ic-data-entity.js.map +1 -1
  109. package/dist/components/ic-data-row.js.map +1 -1
  110. package/dist/components/ic-footer-link-group.js.map +1 -1
  111. package/dist/components/ic-footer-link.js.map +1 -1
  112. package/dist/components/ic-footer.js.map +1 -1
  113. package/dist/components/ic-hero.js.map +1 -1
  114. package/dist/components/ic-input-label2.js +1 -1
  115. package/dist/components/ic-input-validation2.js +1 -1
  116. package/dist/components/ic-link2.js.map +1 -1
  117. package/dist/components/ic-loading-indicator2.js.map +1 -1
  118. package/dist/components/ic-menu2.js +8 -3
  119. package/dist/components/ic-menu2.js.map +1 -1
  120. package/dist/components/ic-navigation-button.js.map +1 -1
  121. package/dist/components/ic-navigation-group.js.map +1 -1
  122. package/dist/components/ic-navigation-item.js.map +1 -1
  123. package/dist/components/ic-navigation-menu2.js +1 -1
  124. package/dist/components/ic-page-header.js.map +1 -1
  125. package/dist/components/ic-radio-group.js.map +1 -1
  126. package/dist/components/ic-radio-option.js +1 -1
  127. package/dist/components/ic-radio-option.js.map +1 -1
  128. package/dist/components/ic-search-bar.js +16 -19
  129. package/dist/components/ic-search-bar.js.map +1 -1
  130. package/dist/components/ic-section-container2.js.map +1 -1
  131. package/dist/components/ic-select.js +2 -2
  132. package/dist/components/ic-select.js.map +1 -1
  133. package/dist/components/ic-side-navigation.js +1 -1
  134. package/dist/components/ic-skeleton.js.map +1 -1
  135. package/dist/components/ic-status-tag.js +5 -3
  136. package/dist/components/ic-status-tag.js.map +1 -1
  137. package/dist/components/ic-switch.js.map +1 -1
  138. package/dist/components/ic-tab-group.js +1 -1
  139. package/dist/components/ic-tab.js.map +1 -1
  140. package/dist/components/ic-text-field2.js +2 -2
  141. package/dist/components/ic-text-field2.js.map +1 -1
  142. package/dist/components/ic-theme.js +1 -1
  143. package/dist/components/ic-tooltip2.js.map +1 -1
  144. package/dist/components/ic-top-navigation.js +3 -3
  145. package/dist/components/ic-top-navigation.js.map +1 -1
  146. package/dist/components/ic-typography2.js.map +1 -1
  147. package/dist/core/core.css +1 -1
  148. package/dist/core/core.esm.js +1 -1
  149. package/dist/core/core.esm.js.map +1 -1
  150. package/dist/core/normalize.css +440 -0
  151. package/dist/core/{p-5831bb8e.entry.js → p-050e1e7b.entry.js} +2 -2
  152. package/dist/core/{p-5831bb8e.entry.js.map → p-050e1e7b.entry.js.map} +1 -1
  153. package/dist/core/{p-31a8595f.entry.js → p-09592918.entry.js} +2 -2
  154. package/dist/core/{p-31a8595f.entry.js.map → p-09592918.entry.js.map} +0 -0
  155. package/dist/core/{p-bf89bcd3.entry.js → p-0b00f848.entry.js} +2 -2
  156. package/dist/core/{p-bf89bcd3.entry.js.map → p-0b00f848.entry.js.map} +1 -1
  157. package/dist/core/p-16698d3e.entry.js +2 -0
  158. package/dist/core/p-16698d3e.entry.js.map +1 -0
  159. package/dist/core/p-18a9beea.entry.js +2 -0
  160. package/dist/core/p-18a9beea.entry.js.map +1 -0
  161. package/dist/core/{p-3a068a45.entry.js → p-1da1f2f3.entry.js} +2 -2
  162. package/dist/core/{p-3a068a45.entry.js.map → p-1da1f2f3.entry.js.map} +1 -1
  163. package/dist/core/p-204f6315.entry.js +2 -0
  164. package/dist/core/p-204f6315.entry.js.map +1 -0
  165. package/dist/core/{p-2f114521.entry.js → p-217fa7de.entry.js} +2 -2
  166. package/dist/core/{p-2f114521.entry.js.map → p-217fa7de.entry.js.map} +1 -1
  167. package/dist/core/{p-cc83692e.entry.js → p-23bf0b7a.entry.js} +2 -2
  168. package/dist/core/{p-cc83692e.entry.js.map → p-23bf0b7a.entry.js.map} +1 -1
  169. package/dist/core/{p-7881b94e.entry.js → p-27554319.entry.js} +2 -2
  170. package/dist/core/{p-7881b94e.entry.js.map → p-27554319.entry.js.map} +1 -1
  171. package/dist/core/{p-fbde8a26.entry.js → p-2ca96f69.entry.js} +2 -2
  172. package/dist/core/{p-fbde8a26.entry.js.map → p-2ca96f69.entry.js.map} +1 -1
  173. package/dist/core/p-3efa7f8b.entry.js +2 -0
  174. package/dist/core/p-3efa7f8b.entry.js.map +1 -0
  175. package/dist/core/{p-dd3c3e3c.entry.js → p-3f4d632c.entry.js} +2 -2
  176. package/dist/core/{p-dd3c3e3c.entry.js.map → p-3f4d632c.entry.js.map} +0 -0
  177. package/dist/core/p-3f9cdcdd.entry.js +2 -0
  178. package/dist/core/{p-c4d3c18c.entry.js.map → p-3f9cdcdd.entry.js.map} +1 -1
  179. package/dist/core/{p-c8ce6147.entry.js → p-4f1a7195.entry.js} +2 -2
  180. package/dist/core/{p-c8ce6147.entry.js.map → p-4f1a7195.entry.js.map} +0 -0
  181. package/dist/core/p-5616cfb8.entry.js +2 -0
  182. package/dist/core/p-5616cfb8.entry.js.map +1 -0
  183. package/dist/core/p-66cad84e.entry.js +2 -0
  184. package/dist/core/p-66cad84e.entry.js.map +1 -0
  185. package/dist/core/p-6be5e06b.entry.js.map +1 -1
  186. package/dist/core/p-6d0eaaeb.entry.js.map +1 -1
  187. package/dist/core/{p-5d76bbad.entry.js → p-6f442942.entry.js} +2 -2
  188. package/dist/core/{p-5d76bbad.entry.js.map → p-6f442942.entry.js.map} +0 -0
  189. package/dist/core/{p-4c72f3a9.entry.js → p-7ba184da.entry.js} +2 -2
  190. package/dist/core/{p-4c72f3a9.entry.js.map → p-7ba184da.entry.js.map} +0 -0
  191. package/dist/core/{p-2b5c9143.entry.js → p-8470c255.entry.js} +2 -2
  192. package/dist/core/{p-2b5c9143.entry.js.map → p-8470c255.entry.js.map} +0 -0
  193. package/dist/core/{p-b24145f7.entry.js → p-89a925f8.entry.js} +2 -2
  194. package/dist/core/{p-b24145f7.entry.js.map → p-89a925f8.entry.js.map} +1 -1
  195. package/dist/core/{p-ecfb2e6b.entry.js → p-930cd4cc.entry.js} +2 -2
  196. package/dist/core/{p-ecfb2e6b.entry.js.map → p-930cd4cc.entry.js.map} +1 -1
  197. package/dist/core/{p-0118400b.entry.js → p-9b4022d7.entry.js} +2 -2
  198. package/dist/core/p-9b4022d7.entry.js.map +1 -0
  199. package/dist/core/{p-5e261268.entry.js → p-9fbceeb2.entry.js} +2 -2
  200. package/dist/core/{p-5e261268.entry.js.map → p-9fbceeb2.entry.js.map} +0 -0
  201. package/dist/core/p-a2d3e955.entry.js.map +1 -1
  202. package/dist/core/{p-9cd04875.entry.js → p-a5948fc3.entry.js} +2 -2
  203. package/dist/core/{p-9cd04875.entry.js.map → p-a5948fc3.entry.js.map} +1 -1
  204. package/dist/core/{p-23831891.js → p-a8ac8f72.js} +2 -2
  205. package/dist/core/p-a8ac8f72.js.map +1 -0
  206. package/dist/core/{p-6b34d98f.entry.js → p-ae02b008.entry.js} +2 -2
  207. package/dist/core/{p-6b34d98f.entry.js.map → p-ae02b008.entry.js.map} +1 -1
  208. package/dist/core/p-bb106092.entry.js +2 -0
  209. package/dist/core/p-bb106092.entry.js.map +1 -0
  210. package/dist/core/{p-6fba90ee.entry.js → p-bbe00cb1.entry.js} +2 -2
  211. package/dist/core/{p-6fba90ee.entry.js.map → p-bbe00cb1.entry.js.map} +1 -1
  212. package/dist/core/{p-b3dec76d.entry.js → p-c1d78a64.entry.js} +2 -2
  213. package/dist/core/{p-b3dec76d.entry.js.map → p-c1d78a64.entry.js.map} +1 -1
  214. package/dist/core/{p-0b125f26.entry.js → p-c320fa70.entry.js} +2 -2
  215. package/dist/core/{p-0b125f26.entry.js.map → p-c320fa70.entry.js.map} +0 -0
  216. package/dist/core/p-cadb531f.entry.js.map +1 -1
  217. package/dist/core/p-d599cf4f.entry.js +2 -0
  218. package/dist/core/p-d599cf4f.entry.js.map +1 -0
  219. package/dist/core/{p-6f6bd657.entry.js → p-e192e25d.entry.js} +2 -2
  220. package/dist/core/{p-6f6bd657.entry.js.map → p-e192e25d.entry.js.map} +1 -1
  221. package/dist/core/{p-7f04e382.entry.js → p-e810f48c.entry.js} +2 -2
  222. package/dist/core/{p-7f04e382.entry.js.map → p-e810f48c.entry.js.map} +1 -1
  223. package/dist/core/p-e93e9aa3.entry.js.map +1 -1
  224. package/dist/core/{p-c85689e3.entry.js → p-eaea567e.entry.js} +2 -2
  225. package/dist/core/{p-c85689e3.entry.js.map → p-eaea567e.entry.js.map} +1 -1
  226. package/dist/core/{p-10da19d2.entry.js → p-f760198e.entry.js} +2 -2
  227. package/dist/core/{p-10da19d2.entry.js.map → p-f760198e.entry.js.map} +0 -0
  228. package/dist/core/{p-66f3f02b.entry.js → p-fd0c6039.entry.js} +2 -2
  229. package/dist/core/{p-66f3f02b.entry.js.map → p-fd0c6039.entry.js.map} +1 -1
  230. package/dist/esm/core.js +1 -1
  231. package/dist/esm/{helpers-3d41833c.js → helpers-46e5291b.js} +3 -3
  232. package/dist/esm/helpers-46e5291b.js.map +1 -0
  233. package/dist/esm/ic-alert.entry.js +1 -1
  234. package/dist/esm/ic-alert.entry.js.map +1 -1
  235. package/dist/esm/ic-back-to-top.entry.js +1 -1
  236. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  237. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  238. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  239. package/dist/esm/ic-button_3.entry.js +1 -1
  240. package/dist/esm/ic-button_3.entry.js.map +1 -1
  241. package/dist/esm/ic-card.entry.js +17 -4
  242. package/dist/esm/ic-card.entry.js.map +1 -1
  243. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  244. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  245. package/dist/esm/ic-checkbox.entry.js +1 -1
  246. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  247. package/dist/esm/ic-chip.entry.js +1 -1
  248. package/dist/esm/ic-chip.entry.js.map +1 -1
  249. package/dist/esm/ic-classification-banner.entry.js +1 -1
  250. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  251. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  252. package/dist/esm/ic-data-row.entry.js +1 -1
  253. package/dist/esm/ic-data-row.entry.js.map +1 -1
  254. package/dist/esm/ic-divider.entry.js +1 -1
  255. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  256. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  257. package/dist/esm/ic-footer-link.entry.js +1 -1
  258. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  259. package/dist/esm/ic-footer.entry.js +1 -1
  260. package/dist/esm/ic-footer.entry.js.map +1 -1
  261. package/dist/esm/ic-hero.entry.js +1 -1
  262. package/dist/esm/ic-hero.entry.js.map +1 -1
  263. package/dist/esm/ic-input-component-container_3.entry.js +9 -4
  264. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  265. package/dist/esm/ic-input-label_2.entry.js +1 -1
  266. package/dist/esm/ic-link.entry.js +1 -1
  267. package/dist/esm/ic-link.entry.js.map +1 -1
  268. package/dist/esm/ic-navigation-button.entry.js +1 -1
  269. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  270. package/dist/esm/ic-navigation-group.entry.js +1 -1
  271. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  272. package/dist/esm/ic-navigation-item.entry.js +1 -1
  273. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  274. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  275. package/dist/esm/ic-page-header.entry.js +1 -1
  276. package/dist/esm/ic-page-header.entry.js.map +1 -1
  277. package/dist/esm/ic-radio-group.entry.js +1 -1
  278. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  279. package/dist/esm/ic-radio-option.entry.js +2 -2
  280. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  281. package/dist/esm/ic-search-bar.entry.js +15 -18
  282. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  283. package/dist/esm/ic-section-container.entry.js.map +1 -1
  284. package/dist/esm/ic-select.entry.js +2 -2
  285. package/dist/esm/ic-select.entry.js.map +1 -1
  286. package/dist/esm/ic-side-navigation.entry.js +1 -1
  287. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  288. package/dist/esm/ic-status-tag.entry.js +4 -3
  289. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  290. package/dist/esm/ic-stepper.entry.js +1 -1
  291. package/dist/esm/ic-switch.entry.js +1 -1
  292. package/dist/esm/ic-switch.entry.js.map +1 -1
  293. package/dist/esm/ic-tab-group.entry.js +1 -1
  294. package/dist/esm/ic-tab.entry.js.map +1 -1
  295. package/dist/esm/ic-text-field.entry.js +2 -2
  296. package/dist/esm/ic-text-field.entry.js.map +1 -1
  297. package/dist/esm/ic-theme.entry.js +1 -1
  298. package/dist/esm/ic-top-navigation.entry.js +3 -3
  299. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  300. package/dist/esm/ic-typography.entry.js.map +1 -1
  301. package/dist/esm/loader.js +1 -1
  302. package/dist/types/components/ic-card/ic-card.d.ts +20 -3
  303. package/dist/types/components/ic-menu/ic-menu.d.ts +1 -0
  304. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -2
  305. package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +4 -0
  306. package/dist/types/components.d.ts +27 -3
  307. package/hydrate/index.js +62 -36
  308. package/package.json +3 -3
  309. package/dist/cjs/helpers-8bc3b6d2.js.map +0 -1
  310. package/dist/core/p-0118400b.entry.js.map +0 -1
  311. package/dist/core/p-07cd789d.entry.js +0 -2
  312. package/dist/core/p-07cd789d.entry.js.map +0 -1
  313. package/dist/core/p-0d77bd0c.entry.js +0 -2
  314. package/dist/core/p-0d77bd0c.entry.js.map +0 -1
  315. package/dist/core/p-23831891.js.map +0 -1
  316. package/dist/core/p-60ffb73e.entry.js +0 -2
  317. package/dist/core/p-60ffb73e.entry.js.map +0 -1
  318. package/dist/core/p-6308f1f2.entry.js +0 -2
  319. package/dist/core/p-6308f1f2.entry.js.map +0 -1
  320. package/dist/core/p-69650186.entry.js +0 -2
  321. package/dist/core/p-69650186.entry.js.map +0 -1
  322. package/dist/core/p-7f632414.entry.js +0 -2
  323. package/dist/core/p-7f632414.entry.js.map +0 -1
  324. package/dist/core/p-8144e941.entry.js +0 -2
  325. package/dist/core/p-8144e941.entry.js.map +0 -1
  326. package/dist/core/p-c4d3c18c.entry.js +0 -2
  327. package/dist/core/p-fa7bc907.entry.js +0 -2
  328. package/dist/core/p-fa7bc907.entry.js.map +0 -1
  329. package/dist/esm/helpers-3d41833c.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i,H as a,g as s}from"./p-f9370be6.js";import{a as o}from"./p-6f57b13c.js";import{G as n,m as r,d as l,a as c,r as h,h as d,e as u,H as p,n as b}from"./p-a8ac8f72.js";const f='/*! 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:block;width:100%}::-moz-placeholder{color:var(--ic-color-tertiary-text);opacity:1}::placeholder{color:var(--ic-color-tertiary-text);opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs)}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:6px}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(--ic-architectural-200)}input.readonly,textarea.readonly{color:var(--ic-color-primary-text)}.fullwidth{position:relative;width:100%}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type="number"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.maxlengthtext{color:var(--ic-color-secondary-text)}.exceeded{color:var(--ic-status-error)}.disabled{color:var(--ic-architectural-200)}.no-left-pad{padding-left:0}::slotted([slot="icon"]){fill:var(--ic-color-tertiary-text)}.has-value ::slotted([slot="icon"]){fill:var(--ic-color-primary-text)}.charcount{margin-right:calc(-1 * var(--ic-space-xxxs))}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{display:none}input[type="search"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot="icon"]){fill:currentcolor}}';let m=0;const y=class{constructor(i){t(this,i);this.icKeydown=e(this,"icKeydown",7);this.icInput=e(this,"icInput",7);this.icBlur=e(this,"icBlur",7);this.icFocus=e(this,"icFocus",7);this.icChange=e(this,"icChange",7);this.inheritedAttributes={};this.showLeftIcon=this.hasLeftIconSlot();this.onInput=t=>{this.value=t.target.value;this.icInput.emit({value:this.value})};this.onBlur=t=>{const e=t.target.value;this.icBlur.emit({value:e})};this.onFocus=t=>{const e=t.target.value;this.icFocus.emit({value:e})};this.isTextArea=()=>this.rows>1;this.hasStatus=t=>t!==""&&!this.disabled;this.showStatusText=t=>{if(this.hasStatus(t)&&!(t==o.Success&&this.validationInline)){return true}return false};this.handleFormReset=()=>{this.value=this.initialValue};this.inputId=`ic-text-field-input-${m++}`;this.label=undefined;this.required=false;this.disabled=false;this.readonly=false;this.placeholder="";this.fullWidth=false;this.hideLabel=false;this.helperText="";this.rows=1;this.resize=false;this.small=false;this.value="";this.maxLength=0;this.validationStatus="";this.validationText="";this.validationInline=false;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autoFocus=false;this.debounce=0;this.type="text";this.inputmode="text";this.name=this.inputId;this.spellcheck=false;this.ariaActiveDescendant=undefined;this.truncateValue=undefined;this.ariaExpanded=undefined;this.ariaOwns=undefined;this.ariaAutocomplete=undefined;this.role=undefined;this.hiddenInput=true;this.numChars=0;this.maxLengthExceeded=false;this.initialValue=this.value}debounceChanged(){this.icChange=n(this.icChange,this.debounce)}watchValueHandler(t){if(this.inputEl&&this.inputEl.value!==t){this.inputEl.value=t}if(this.maxLength>0){this.numChars=t.length;if(t.length>this.maxLength){this.maxLengthExceeded=true}else{this.maxLengthExceeded=false}}this.icChange.emit({value:t})}async setFocus(){if(this.inputEl){this.inputEl.focus()}}handleKeyDown(t){this.icKeydown.emit({event:t});t.cancelBubble=true}hasLeftIconSlot(){const t=this.el.querySelector(`[slot="icon"]`);if(t!=null){return true}return false}connectedCallback(){this.debounceChanged()}componentWillLoad(){this.watchValueHandler(this.value);this.inheritedAttributes=r(this.el,[...b,"title","aria-autocomplete","aria-haspopup"]);if(this.readonly){this.maxLengthExceeded=false}l(this.el,this.handleFormReset)}componentDidLoad(){c([{prop:this.label,propName:"label"}],"Text Field")}disconnectedCallback(){h(this.el,this.handleFormReset)}render(){const{inputId:t,name:e,label:s,required:n,small:r,placeholder:l,helperText:c,rows:h,resize:b,disabled:f,value:m,maxLength:y,numChars:g,readonly:v,maxLengthExceeded:x,validationStatus:w,validationText:k,validationInline:z,spellcheck:I,inputmode:F,fullWidth:L,truncateValue:j,hiddenInput:q}=this;const C=v?true:f;const T=f?"":l;const B=x?o.Error:w;const H=x?"Maximum length exceeded":k;const W=v?0:y;const M=x||y===0&&B===o.Error?"assertive":"polite";const S=this.showStatusText(B);const V=this.isTextArea();const D=y>0?t+"-charcount-desc":"";const K=(D+" "+d(t,c!=="",S)).trim();if(this.showLeftIcon){if(!v&&C){this.showLeftIcon=false}}const O=B===o.Error?"true":"false";const $=C&&!v;if(q){u(true,this.el,e,m,C)}return i(a,{class:{["fullwidth"]:L}},i("ic-input-container",{readonly:v,disabled:C},!this.hideLabel&&i("ic-input-label",{for:t,label:s,helperText:c,required:n,disabled:$,readonly:v}),i("ic-input-component-container",{small:r,validationStatus:B,multiLine:V,disabled:C,readonly:v,validationInline:z,fullWidth:L},this.showLeftIcon&&i("span",{class:{["readonly"]:v,["has-value"]:m.length>0},slot:"left-icon"},i("slot",{name:"icon"})),!V&&i("input",Object.assign({id:t,name:e,ref:t=>this.inputEl=t,type:this.type,value:m,class:{["no-left-pad"]:!this.showLeftIcon&&v,["readonly"]:v,["truncate-value"]:j},placeholder:T,required:n,disabled:C,readonly:v,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":s,"aria-describedby":K,"aria-invalid":O,"aria-activedescendant":this.ariaActiveDescendant,"aria-expanded":this.ariaExpanded,"aria-owns":this.ariaOwns,autocomplete:this.autocomplete,autocapitalize:this.autocapitalize,autoFocus:this.autoFocus,spellcheck:I,inputmode:F,role:this.role},this.inheritedAttributes)),V&&i("textarea",Object.assign({id:t,class:{["no-resize"]:b===false||v,["no-left-pad"]:!this.showLeftIcon&&v,["readonly"]:v},name:e,ref:t=>this.inputEl=t,value:m,rows:h,required:n,disabled:C,placeholder:T,readonly:v,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":s,"aria-describedby":K,"aria-invalid":O,autocapitalize:this.autocapitalize,autoFocus:this.autoFocus,spellcheck:I,inputmode:F},this.inheritedAttributes)),i("slot",{name:"clear-button"}),i("slot",{name:"search-submit-button"})),i("slot",{name:"menu"}),(!p(w)||!p(k)||W>0)&&i("ic-input-validation",{status:this.hasStatus(B)===false||B===o.Success&&z?"":B,message:S?H:"",ariaLiveMode:M,for:t,fullWidth:L},!v&&W>0&&i("div",{slot:"validation-message-adornment"},i("ic-typography",{variant:"caption",class:{["maxlengthtext"]:true,["exceeded"]:x,["disabled"]:$}},i("span",{"aria-live":"polite",id:`${t}-charcount`,class:"charcount"},g,"/",W),i("span",{hidden:true,id:D},"Field can contain a maximum of ",W," characters."))))))}get el(){return s(this)}static get watchers(){return{debounce:["debounceChanged"],value:["watchValueHandler"]}}};y.style=f;export{y as ic_text_field};
2
+ //# sourceMappingURL=p-204f6315.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"names":["icTextFieldCss","inputIds","TextField","this","inheritedAttributes","showLeftIcon","hasLeftIconSlot","onInput","ev","value","target","icInput","emit","onBlur","icBlur","onFocus","icFocus","isTextArea","rows","hasStatus","status","disabled","showStatusText","IcInformationStatus","Success","validationInline","handleFormReset","initialValue","inputId","undefined","[object Object]","icChange","debounceEvent","debounce","newValue","inputEl","maxLength","numChars","length","maxLengthExceeded","focus","icKeydown","event","cancelBubble","iconEl","el","querySelector","debounceChanged","watchValueHandler","inheritAttributes","IC_INHERITED_ARIA","readonly","addFormResetListener","onComponentRequiredPropUndefined","prop","label","propName","removeFormResetListener","name","required","small","placeholder","helperText","resize","validationStatus","validationText","spellcheck","inputmode","fullWidth","truncateValue","hiddenInput","disabledMode","placeholderText","currentStatus","Error","currentValidationText","maxNumChars","messageAriaLive","multiline","hiddenCharCountDescId","describedBy","getInputDescribedByText","trim","invalid","disabledText","renderHiddenInput","h","Host","class","hideLabel","for","multiLine","slot","Object","assign","id","ref","type","aria-label","aria-describedby","aria-invalid","aria-activedescendant","ariaActiveDescendant","aria-expanded","ariaExpanded","aria-owns","ariaOwns","autocomplete","autocapitalize","autoFocus","role","isEmptyString","message","ariaLiveMode","variant","aria-live","hidden"],"mappings":"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","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field \n */\n display: block;\n width: 100%;\n}\n\n::placeholder {\n color: var(--ic-color-tertiary-text);\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 6px;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--ic-architectural-200);\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-primary-text);\n}\n\n.fullwidth {\n position: relative;\n width: 100%;\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.maxlengthtext {\n color: var(--ic-color-secondary-text);\n}\n\n.exceeded {\n color: var(--ic-status-error);\n}\n\n.disabled {\n color: var(--ic-architectural-200);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-primary-text);\n}\n\n.charcount {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n} from \"@stencil/core\";\n\nimport {\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n} from \"../../interface\";\nimport { IcInformationStatus } from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n @Element() el: HTMLIcTextFieldElement;\n\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private inheritedAttributes: { [k: string]: unknown } = {};\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * If `true`, the small styling will be applied to the text field.\n */\n @Prop({ reflect: true }) small: boolean = false;\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n\n /**\n * The maximum number of characters that can be entered in the field.\n */\n @Prop() maxLength: number = 0;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n private showLeftIcon: boolean = this.hasLeftIconSlot();\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\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 * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n @State() numChars: number = 0;\n @State() maxLengthExceeded: boolean = false;\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n watchValueHandler(newValue: string): void {\n if (this.inputEl && this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n\n if (this.maxLength > 0) {\n this.numChars = newValue.length;\n if (newValue.length > this.maxLength) {\n this.maxLengthExceeded = true;\n } else {\n this.maxLengthExceeded = false;\n }\n }\n this.icChange.emit({ value: newValue });\n }\n\n /**\n * Sets focus on the native `input`\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.inputEl) {\n this.inputEl.focus();\n }\n }\n\n //stop keydown event bubbling up to storybook\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n ev.cancelBubble = true;\n }\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.icBlur.emit({ value: value });\n };\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n private onFocus = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.icFocus.emit({ value: value });\n };\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n private isTextArea = (): boolean => {\n return this.rows > 1;\n };\n\n private hasLeftIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n if (iconEl != null) {\n return true;\n }\n return false;\n }\n\n private hasStatus = (status: IcInformationStatusOrEmpty): boolean => {\n return status !== \"\" && !this.disabled;\n };\n\n private showStatusText = (status: IcInformationStatusOrEmpty): boolean => {\n if (\n this.hasStatus(status) &&\n !(status == IcInformationStatus.Success && this.validationInline)\n ) {\n return true;\n }\n return false;\n };\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n componentWillLoad(): void {\n this.watchValueHandler(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"title\",\n \"aria-autocomplete\",\n \"aria-haspopup\",\n ]);\n\n if (this.readonly) {\n this.maxLengthExceeded = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n small,\n placeholder,\n helperText,\n rows,\n resize,\n disabled,\n value,\n maxLength,\n numChars,\n readonly,\n maxLengthExceeded,\n validationStatus,\n validationText,\n validationInline,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly ? true : disabled;\n\n const placeholderText = disabled ? \"\" : placeholder;\n\n const currentStatus = maxLengthExceeded\n ? IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxLengthExceeded\n ? \"Maximum length exceeded\"\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxLength;\n\n const messageAriaLive =\n maxLengthExceeded ||\n (maxLength === 0 && currentStatus === IcInformationStatus.Error)\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText = this.showStatusText(currentStatus);\n const multiline = this.isTextArea();\n const hiddenCharCountDescId =\n maxLength > 0 ? inputId + \"-charcount-desc\" : \"\";\n const describedBy = (\n hiddenCharCountDescId +\n \" \" +\n getInputDescribedByText(inputId, helperText !== \"\", showStatusText)\n ).trim();\n\n if (this.showLeftIcon) {\n if (!readonly && disabledMode) {\n this.showLeftIcon = false;\n }\n }\n\n const invalid =\n currentStatus === IcInformationStatus.Error ? \"true\" : \"false\";\n const disabledText = disabledMode && !readonly;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n\n return (\n <Host class={{ [\"fullwidth\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n small={small}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {this.showLeftIcon && (\n <span\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline && (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n value={value}\n class={{\n [\"no-left-pad\"]: !this.showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n [\"truncate-value\"]: truncateValue,\n }}\n placeholder={placeholderText}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n {...this.inheritedAttributes}\n ></input>\n )}\n {multiline && (\n <textarea\n id={inputId}\n class={{\n [\"no-resize\"]: resize === false || readonly,\n [\"no-left-pad\"]: !this.showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholderText}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n <slot name=\"clear-button\"></slot>\n <slot name=\"search-submit-button\"></slot>\n </ic-input-component-container>\n <slot name=\"menu\"></slot>\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0) && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline)\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n <ic-typography\n variant=\"caption\"\n class={{\n [\"maxlengthtext\"]: true,\n [\"exceeded\"]: maxLengthExceeded,\n [\"disabled\"]: disabledText,\n }}\n >\n <span\n aria-live=\"polite\"\n id={`${inputId}-charcount`}\n class=\"charcount\"\n >\n {numChars}/{maxNumChars}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </ic-typography>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,H as i,g as a}from"./p-f9370be6.js";import{g as s,D as n,c as o,i as r}from"./p-23831891.js";import"./p-6f57b13c.js";const l='/*! 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:block}:host(.sticky){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}header{background-color:var(--ic-architectural-40)}header.border-bottom{border-bottom:1px solid var(--ic-architectural-300)}header.tabs{padding-top:var(--ic-space-md)}.breadcrumb-area{margin-bottom:var(--ic-space-md)}.main-content{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"title-area action-area"\n "input-area action-area";-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md);justify-content:space-between;width:100%}.title-area{display:flex;flex-direction:column;flex:1;min-width:304px;grid-area:title-area}.header-content{display:flex;align-items:center;width:100%;flex-wrap:wrap;row-gap:var(--ic-space-xs);-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md)}.heading{display:inline-block;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}.subheading.small{margin-top:var(--ic-space-xs)}.action-area{display:flex;gap:var(--ic-space-md);flex-flow:row wrap;justify-self:end;justify-content:flex-end;height:-moz-fit-content;height:fit-content;grid-area:action-area}.input-area,.navigation-area{margin-top:var(--ic-space-md);width:100%}.tabs-slot{display:flex;overflow-x:auto;padding:8px;margin:-8px}.input-area{grid-area:input-area}@media screen and (max-width: 576px){::slotted(ic-text-field){--input-width:100%;max-width:320px}.main-content{grid-template-areas:"title-area"\n "action-area"\n "input-area";justify-content:flex-start}.title-area{min-width:0}.action-area{min-width:100%;margin-top:var(--ic-space-md);justify-content:start}}@media screen and (min-width: 992px){:host(.sticky-desktop){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}}';const d=class{constructor(e){t(this,e);this.resizeObserver=null;this.resizeObserverCallback=()=>{if(this.reverseOrder){this.applyReverseOrder()}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.applyReverseOrder=()=>{const t=s();if(t!==this.deviceSize){this.deviceSize=t}const e=this.el.shadowRoot.querySelector("div.action-area");const i=[];for(let t=0;t<this.actionContent.length;t++){const e=this.actionContent[t];let a=e.offsetHeight;if(a===undefined){a=0}i.push(a)}const a=Math.max(...i);let o=e.offsetHeight;if(o===undefined){o=0}if(this.deviceSize>n.S&&o<=a&&!this.areButtonsReversed){this.actionContent=this.actionContent.reverse();this.actionContent.forEach((t=>{this.el.append(t)}));this.areButtonsReversed=!this.areButtonsReversed}else if((this.deviceSize>n.S&&o>a||this.deviceSize<=n.S)&&this.areButtonsReversed){this.actionContent=this.actionContent.reverse();this.actionContent.forEach((t=>{this.el.append(t)}));this.areButtonsReversed=!this.areButtonsReversed}};this.heading=undefined;this.subheading=undefined;this.aligned="left";this.small=false;this.border=true;this.sticky=false;this.stickyDesktopOnly=false;this.reverseOrder=false;this.deviceSize=n.XL;this.areButtonsReversed=false;this.actionContent=undefined}componentWillLoad(){this.actionContent=Array.from(this.el.querySelectorAll(`[slot="actions"]`))}componentDidLoad(){o(this.runResizeObserver)}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}render(){const{small:t,border:a,heading:s,subheading:n,aligned:o,sticky:l,stickyDesktopOnly:d}=this;return e(i,{class:{["sticky"]:l,["sticky-desktop"]:!l&&d}},e("header",{class:{["border-bottom"]:a,["tabs"]:r(this.el,"tabs")}},e("ic-section-container",{aligned:o,fullHeight:r(this.el,"tabs")},r(this.el,"breadcrumbs")&&e("div",{class:"breadcrumb-area"},e("slot",{name:"breadcrumbs"})),e("div",{class:"main-content"},e("div",{class:"title-area"},e("div",{class:"header-content"},e("slot",{name:"heading"},e("ic-typography",{variant:t?"h4":"h2",class:"heading"},e("h2",null,s))),e("slot",{name:"heading-adornment"})),e("div",null,e("slot",{name:"subheading"},n&&e("ic-typography",{variant:"body",class:{["subheading"]:true,["small"]:t}},n)))),r(this.el,"actions")&&e("div",{class:"action-area"},e("slot",{name:"actions"})),r(this.el,"input")&&e("div",{class:"input-area"},e("slot",{name:"input"}))),(r(this.el,"stepper")||r(this.el,"tabs"))&&e("div",{class:"navigation-area"},r(this.el,"stepper")&&!r(this.el,"tabs")&&e("slot",{name:"stepper"}),r(this.el,"tabs")&&e("nav",{class:"tabs-slot","aria-label":"navigation-landmark-page-header"},e("slot",{name:"tabs"}))))))}get el(){return a(this)}};d.style=l;export{d as ic_page_header};
2
- //# sourceMappingURL=p-2f114521.entry.js.map
1
+ import{r as t,h as e,H as i,g as a}from"./p-f9370be6.js";import{g as s,D as n,c as o,i as r}from"./p-a8ac8f72.js";import"./p-6f57b13c.js";const l='/*! 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:block}:host(.sticky){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}header{background-color:var(--ic-architectural-40)}header.border-bottom{border-bottom:1px solid var(--ic-architectural-300)}header.tabs{padding-top:var(--ic-space-md)}.breadcrumb-area{margin-bottom:var(--ic-space-md)}.main-content{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"title-area action-area"\n "input-area action-area";-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md);justify-content:space-between;width:100%}.title-area{display:flex;flex-direction:column;flex:1;min-width:304px;grid-area:title-area}.header-content{display:flex;align-items:center;width:100%;flex-wrap:wrap;row-gap:var(--ic-space-xs);-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md)}.heading{display:inline-block;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}.subheading.small{margin-top:var(--ic-space-xs)}.action-area{display:flex;gap:var(--ic-space-md);flex-flow:row wrap;justify-self:end;justify-content:flex-end;height:-moz-fit-content;height:fit-content;grid-area:action-area}.input-area,.navigation-area{margin-top:var(--ic-space-md);width:100%}.tabs-slot{display:flex;overflow-x:auto;padding:8px;margin:-8px}.input-area{grid-area:input-area}@media screen and (max-width: 576px){::slotted(ic-text-field){--input-width:100%;max-width:320px}.main-content{grid-template-areas:"title-area"\n "action-area"\n "input-area";justify-content:flex-start}.title-area{min-width:0}.action-area{min-width:100%;margin-top:var(--ic-space-md);justify-content:start}}@media screen and (min-width: 992px){:host(.sticky-desktop){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}}';const d=class{constructor(e){t(this,e);this.resizeObserver=null;this.resizeObserverCallback=()=>{if(this.reverseOrder){this.applyReverseOrder()}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.applyReverseOrder=()=>{const t=s();if(t!==this.deviceSize){this.deviceSize=t}const e=this.el.shadowRoot.querySelector("div.action-area");const i=[];for(let t=0;t<this.actionContent.length;t++){const e=this.actionContent[t];let a=e.offsetHeight;if(a===undefined){a=0}i.push(a)}const a=Math.max(...i);let o=e.offsetHeight;if(o===undefined){o=0}if(this.deviceSize>n.S&&o<=a&&!this.areButtonsReversed){this.actionContent=this.actionContent.reverse();this.actionContent.forEach((t=>{this.el.append(t)}));this.areButtonsReversed=!this.areButtonsReversed}else if((this.deviceSize>n.S&&o>a||this.deviceSize<=n.S)&&this.areButtonsReversed){this.actionContent=this.actionContent.reverse();this.actionContent.forEach((t=>{this.el.append(t)}));this.areButtonsReversed=!this.areButtonsReversed}};this.heading=undefined;this.subheading=undefined;this.aligned="left";this.small=false;this.border=true;this.sticky=false;this.stickyDesktopOnly=false;this.reverseOrder=false;this.deviceSize=n.XL;this.areButtonsReversed=false;this.actionContent=undefined}componentWillLoad(){this.actionContent=Array.from(this.el.querySelectorAll(`[slot="actions"]`))}componentDidLoad(){o(this.runResizeObserver)}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}render(){const{small:t,border:a,heading:s,subheading:n,aligned:o,sticky:l,stickyDesktopOnly:d}=this;return e(i,{class:{["sticky"]:l,["sticky-desktop"]:!l&&d}},e("header",{class:{["border-bottom"]:a,["tabs"]:r(this.el,"tabs")}},e("ic-section-container",{aligned:o,fullHeight:r(this.el,"tabs")},r(this.el,"breadcrumbs")&&e("div",{class:"breadcrumb-area"},e("slot",{name:"breadcrumbs"})),e("div",{class:"main-content"},e("div",{class:"title-area"},e("div",{class:"header-content"},e("slot",{name:"heading"},e("ic-typography",{variant:t?"h4":"h2",class:"heading"},e("h2",null,s))),e("slot",{name:"heading-adornment"})),e("div",null,e("slot",{name:"subheading"},n&&e("ic-typography",{variant:"body",class:{["subheading"]:true,["small"]:t}},n)))),r(this.el,"actions")&&e("div",{class:"action-area"},e("slot",{name:"actions"})),r(this.el,"input")&&e("div",{class:"input-area"},e("slot",{name:"input"}))),(r(this.el,"stepper")||r(this.el,"tabs"))&&e("div",{class:"navigation-area"},r(this.el,"stepper")&&!r(this.el,"tabs")&&e("slot",{name:"stepper"}),r(this.el,"tabs")&&e("nav",{class:"tabs-slot","aria-label":"navigation-landmark-page-header"},e("slot",{name:"tabs"}))))))}get el(){return a(this)}};d.style=l;export{d as ic_page_header};
2
+ //# sourceMappingURL=p-217fa7de.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-page-header/ic-page-header.css?tag=ic-page-header&encapsulation=shadow","src/components/ic-page-header/ic-page-header.tsx"],"names":["icPageHeaderCss","PageHeader","this","resizeObserver","resizeObserverCallback","reverseOrder","applyReverseOrder","runResizeObserver","ResizeObserver","observe","el","currSize","getCurrentDeviceSize","deviceSize","actionArea","shadowRoot","querySelector","actionHeights","i","actionContent","length","action","actionHeight","offsetHeight","undefined","push","max","Math","actionAreaHeight","DEVICE_SIZES","S","areButtonsReversed","reverse","forEach","btn","append","XL","[object Object]","Array","from","querySelectorAll","checkResizeObserver","disconnect","small","border","heading","subheading","aligned","sticky","stickyDesktopOnly","h","Host","class","isSlotUsed","fullHeight","name","variant","aria-label"],"mappings":"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","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: block;\n}\n\n:host(.sticky) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n}\n\nheader {\n background-color: var(--ic-architectural-40);\n}\n\nheader.border-bottom {\n border-bottom: 1px solid var(--ic-architectural-300);\n}\n\nheader.tabs {\n padding-top: var(--ic-space-md);\n}\n\n.breadcrumb-area {\n margin-bottom: var(--ic-space-md);\n}\n\n.main-content {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas:\n \"title-area action-area\"\n \"input-area action-area\";\n column-gap: var(--ic-space-md);\n justify-content: space-between;\n width: 100%;\n}\n\n.title-area {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 304px;\n grid-area: title-area;\n}\n\n.header-content {\n display: flex;\n align-items: center;\n width: 100%;\n flex-wrap: wrap;\n row-gap: var(--ic-space-xs);\n column-gap: var(--ic-space-md);\n}\n\n.heading {\n display: inline-block;\n overflow-wrap: break-word;\n hyphens: auto;\n}\n\n.subheading.small {\n margin-top: var(--ic-space-xs);\n}\n\n.action-area {\n display: flex;\n gap: var(--ic-space-md);\n flex-flow: row wrap;\n justify-self: end;\n justify-content: flex-end;\n height: fit-content;\n grid-area: action-area;\n}\n\n.input-area,\n.navigation-area {\n margin-top: var(--ic-space-md);\n width: 100%;\n}\n\n.tabs-slot {\n display: flex;\n overflow-x: auto;\n padding: 8px;\n margin: -8px;\n}\n\n.input-area {\n grid-area: input-area;\n}\n\n@media screen and (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n\n max-width: 320px;\n }\n\n .main-content {\n grid-template-areas:\n \"title-area\"\n \"action-area\"\n \"input-area\";\n justify-content: flex-start;\n }\n\n .title-area {\n min-width: 0;\n }\n\n .action-area {\n min-width: 100%;\n margin-top: var(--ic-space-md);\n justify-content: start;\n }\n}\n\n@media screen and (min-width: 992px) {\n :host(.sticky-desktop) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n }\n}\n","import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { IcAlignment } from \"../../utils/types\";\n\nimport {\n isSlotUsed,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n checkResizeObserver,\n} from \"../../utils/helpers\";\n\n/**\n * @slot breadcrumbs - Content will be rendered in the breadcrumb area, above the title and action areas.\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot heading-adornment - Content will be rendered in the title area, adjacent to the heading.\n * @slot actions - Content will be rendered in the action area, adjacent to the title area.\n * @slot input - Content will be rendered in the input area, below the title area and adjacent to the action area.\n * @slot stepper - Content will be rendered in the navigation area, below the title and action areas. Note: stepper slot cannot be used when the tabs slot is being used.\n * @slot tabs - Content will be rendered in the navigation area, below the title and action areas. Note: the stepper slot cannot be used when the tabs slot is being used.\n */\n\n@Component({\n tag: \"ic-page-header\",\n styleUrl: \"ic-page-header.css\",\n shadow: true,\n})\nexport class PageHeader {\n @Element() el: HTMLIcPageHeaderElement;\n /**\n * The title to render on the page header.\n */\n @Prop() heading?: string;\n /**\n * The subtitle to render on the page header.\n */\n @Prop() subheading?: string;\n /**\n * The alignment of the page header.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n /**\n * If `true`, the small styling will be applied to the page header.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, a border will be displayed along the bottom of the page header.\n */\n @Prop() border?: boolean = true;\n /**\n * If `true`, the page header will be sticky at all breakpoints.\n */\n @Prop() sticky?: boolean = false;\n /**\n * If `true`, the page header will only be sticky for viewport widths of 992px and above.\n */\n @Prop() stickyDesktopOnly?: boolean = false;\n /**\n * If `true`, the reading pattern and tab order will change in the action area for viewport widths of above 576px and when actions have not wrapped.\n */\n @Prop() reverseOrder?: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() areButtonsReversed: boolean = false;\n\n @State() actionContent: Node[];\n\n private resizeObserver: ResizeObserver = null;\n\n private resizeObserverCallback = () => {\n if (this.reverseOrder) {\n this.applyReverseOrder();\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private applyReverseOrder = (): void => {\n const currSize = getCurrentDeviceSize();\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n\n const actionArea = this.el.shadowRoot.querySelector(\n \"div.action-area\"\n ) as HTMLElement;\n const actionHeights: number[] = [];\n\n /* For each button in the actions slot, check the height of the button and push this number into the actionHeights array and then find the greatest number in this array (i.e. find the height of the tallest button) */\n for (let i = 0; i < this.actionContent.length; i++) {\n const action = this.actionContent[i] as HTMLElement;\n let actionHeight = action.offsetHeight;\n if (actionHeight === undefined) {\n actionHeight = 0;\n }\n actionHeights.push(actionHeight);\n }\n\n const max = Math.max(...actionHeights);\n\n /* The smallest breakpoint displays buttons in the same order the user has slotted them in. When the device size is larger than the small breakpoiint then the order of the button reverses due to best practice for reading patterns. If the device size is larger than the small breakpoint and the buttons have started to wrap then they follow the order the user has slotted them in. This logic is programmed based on the height of the action-area div that wraps the actions slot. If the height of the action-area div is taller than the height of the tallest button, then it is assumed that the taller height is caused by the buttons wrapping */\n let actionAreaHeight = actionArea.offsetHeight;\n\n if (actionAreaHeight === undefined) {\n actionAreaHeight = 0;\n }\n\n if (\n this.deviceSize > DEVICE_SIZES.S &&\n actionAreaHeight <= max &&\n !this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n } else if (\n ((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||\n this.deviceSize <= DEVICE_SIZES.S) &&\n this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n }\n };\n\n componentWillLoad(): void {\n this.actionContent = Array.from(\n this.el.querySelectorAll(`[slot=\"actions\"]`)\n );\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const {\n small,\n border,\n heading,\n subheading,\n aligned,\n sticky,\n stickyDesktopOnly,\n } = this;\n\n return (\n <Host\n class={{\n [\"sticky\"]: sticky,\n [\"sticky-desktop\"]: !sticky && stickyDesktopOnly,\n }}\n >\n <header\n class={{\n [\"border-bottom\"]: border,\n [\"tabs\"]: isSlotUsed(this.el, \"tabs\"),\n }}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight={isSlotUsed(this.el, \"tabs\")}\n >\n {isSlotUsed(this.el, \"breadcrumbs\") && (\n <div class=\"breadcrumb-area\">\n <slot name=\"breadcrumbs\" />\n </div>\n )}\n <div class=\"main-content\">\n <div class=\"title-area\">\n <div class=\"header-content\">\n <slot name=\"heading\">\n <ic-typography\n variant={small ? \"h4\" : \"h2\"}\n class=\"heading\"\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n <slot name=\"heading-adornment\" />\n </div>\n <div>\n <slot name=\"subheading\">\n {subheading && (\n <ic-typography\n variant=\"body\"\n class={{ [\"subheading\"]: true, [\"small\"]: small }}\n >\n {subheading}\n </ic-typography>\n )}\n </slot>\n </div>\n </div>\n {isSlotUsed(this.el, \"actions\") && (\n <div class=\"action-area\">\n <slot name=\"actions\" />\n </div>\n )}\n {isSlotUsed(this.el, \"input\") && (\n <div class=\"input-area\">\n <slot name=\"input\" />\n </div>\n )}\n </div>\n\n {(isSlotUsed(this.el, \"stepper\") ||\n isSlotUsed(this.el, \"tabs\")) && (\n <div class=\"navigation-area\">\n {isSlotUsed(this.el, \"stepper\") &&\n !isSlotUsed(this.el, \"tabs\") && <slot name=\"stepper\" />}\n {isSlotUsed(this.el, \"tabs\") && (\n <nav\n class=\"tabs-slot\"\n aria-label=\"navigation-landmark-page-header\"\n >\n <slot name=\"tabs\" />\n </nav>\n )}\n </div>\n )}\n </ic-section-container>\n </header>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-page-header/ic-page-header.css?tag=ic-page-header&encapsulation=shadow","src/components/ic-page-header/ic-page-header.tsx"],"names":["icPageHeaderCss","PageHeader","this","resizeObserver","resizeObserverCallback","reverseOrder","applyReverseOrder","runResizeObserver","ResizeObserver","observe","el","currSize","getCurrentDeviceSize","deviceSize","actionArea","shadowRoot","querySelector","actionHeights","i","actionContent","length","action","actionHeight","offsetHeight","undefined","push","max","Math","actionAreaHeight","DEVICE_SIZES","S","areButtonsReversed","reverse","forEach","btn","append","XL","[object Object]","Array","from","querySelectorAll","checkResizeObserver","disconnect","small","border","heading","subheading","aligned","sticky","stickyDesktopOnly","h","Host","class","isSlotUsed","fullHeight","name","variant","aria-label"],"mappings":"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","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n:host(.sticky) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n}\n\nheader {\n background-color: var(--ic-architectural-40);\n}\n\nheader.border-bottom {\n border-bottom: 1px solid var(--ic-architectural-300);\n}\n\nheader.tabs {\n padding-top: var(--ic-space-md);\n}\n\n.breadcrumb-area {\n margin-bottom: var(--ic-space-md);\n}\n\n.main-content {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas:\n \"title-area action-area\"\n \"input-area action-area\";\n column-gap: var(--ic-space-md);\n justify-content: space-between;\n width: 100%;\n}\n\n.title-area {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 304px;\n grid-area: title-area;\n}\n\n.header-content {\n display: flex;\n align-items: center;\n width: 100%;\n flex-wrap: wrap;\n row-gap: var(--ic-space-xs);\n column-gap: var(--ic-space-md);\n}\n\n.heading {\n display: inline-block;\n overflow-wrap: break-word;\n hyphens: auto;\n}\n\n.subheading.small {\n margin-top: var(--ic-space-xs);\n}\n\n.action-area {\n display: flex;\n gap: var(--ic-space-md);\n flex-flow: row wrap;\n justify-self: end;\n justify-content: flex-end;\n height: fit-content;\n grid-area: action-area;\n}\n\n.input-area,\n.navigation-area {\n margin-top: var(--ic-space-md);\n width: 100%;\n}\n\n.tabs-slot {\n display: flex;\n overflow-x: auto;\n padding: 8px;\n margin: -8px;\n}\n\n.input-area {\n grid-area: input-area;\n}\n\n@media screen and (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n\n max-width: 320px;\n }\n\n .main-content {\n grid-template-areas:\n \"title-area\"\n \"action-area\"\n \"input-area\";\n justify-content: flex-start;\n }\n\n .title-area {\n min-width: 0;\n }\n\n .action-area {\n min-width: 100%;\n margin-top: var(--ic-space-md);\n justify-content: start;\n }\n}\n\n@media screen and (min-width: 992px) {\n :host(.sticky-desktop) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n }\n}\n","import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { IcAlignment } from \"../../utils/types\";\n\nimport {\n isSlotUsed,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n checkResizeObserver,\n} from \"../../utils/helpers\";\n\n/**\n * @slot breadcrumbs - Content will be rendered in the breadcrumb area, above the title and action areas.\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot heading-adornment - Content will be rendered in the title area, adjacent to the heading.\n * @slot actions - Content will be rendered in the action area, adjacent to the title area.\n * @slot input - Content will be rendered in the input area, below the title area and adjacent to the action area.\n * @slot stepper - Content will be rendered in the navigation area, below the title and action areas. Note: stepper slot cannot be used when the tabs slot is being used.\n * @slot tabs - Content will be rendered in the navigation area, below the title and action areas. Note: the stepper slot cannot be used when the tabs slot is being used.\n */\n\n@Component({\n tag: \"ic-page-header\",\n styleUrl: \"ic-page-header.css\",\n shadow: true,\n})\nexport class PageHeader {\n @Element() el: HTMLIcPageHeaderElement;\n /**\n * The title to render on the page header.\n */\n @Prop() heading?: string;\n /**\n * The subtitle to render on the page header.\n */\n @Prop() subheading?: string;\n /**\n * The alignment of the page header.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n /**\n * If `true`, the small styling will be applied to the page header.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, a border will be displayed along the bottom of the page header.\n */\n @Prop() border?: boolean = true;\n /**\n * If `true`, the page header will be sticky at all breakpoints.\n */\n @Prop() sticky?: boolean = false;\n /**\n * If `true`, the page header will only be sticky for viewport widths of 992px and above.\n */\n @Prop() stickyDesktopOnly?: boolean = false;\n /**\n * If `true`, the reading pattern and tab order will change in the action area for viewport widths of above 576px and when actions have not wrapped.\n */\n @Prop() reverseOrder?: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() areButtonsReversed: boolean = false;\n\n @State() actionContent: Node[];\n\n private resizeObserver: ResizeObserver = null;\n\n private resizeObserverCallback = () => {\n if (this.reverseOrder) {\n this.applyReverseOrder();\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private applyReverseOrder = (): void => {\n const currSize = getCurrentDeviceSize();\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n\n const actionArea = this.el.shadowRoot.querySelector(\n \"div.action-area\"\n ) as HTMLElement;\n const actionHeights: number[] = [];\n\n /* For each button in the actions slot, check the height of the button and push this number into the actionHeights array and then find the greatest number in this array (i.e. find the height of the tallest button) */\n for (let i = 0; i < this.actionContent.length; i++) {\n const action = this.actionContent[i] as HTMLElement;\n let actionHeight = action.offsetHeight;\n if (actionHeight === undefined) {\n actionHeight = 0;\n }\n actionHeights.push(actionHeight);\n }\n\n const max = Math.max(...actionHeights);\n\n /* The smallest breakpoint displays buttons in the same order the user has slotted them in. When the device size is larger than the small breakpoiint then the order of the button reverses due to best practice for reading patterns. If the device size is larger than the small breakpoint and the buttons have started to wrap then they follow the order the user has slotted them in. This logic is programmed based on the height of the action-area div that wraps the actions slot. If the height of the action-area div is taller than the height of the tallest button, then it is assumed that the taller height is caused by the buttons wrapping */\n let actionAreaHeight = actionArea.offsetHeight;\n\n if (actionAreaHeight === undefined) {\n actionAreaHeight = 0;\n }\n\n if (\n this.deviceSize > DEVICE_SIZES.S &&\n actionAreaHeight <= max &&\n !this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n } else if (\n ((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||\n this.deviceSize <= DEVICE_SIZES.S) &&\n this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n }\n };\n\n componentWillLoad(): void {\n this.actionContent = Array.from(\n this.el.querySelectorAll(`[slot=\"actions\"]`)\n );\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const {\n small,\n border,\n heading,\n subheading,\n aligned,\n sticky,\n stickyDesktopOnly,\n } = this;\n\n return (\n <Host\n class={{\n [\"sticky\"]: sticky,\n [\"sticky-desktop\"]: !sticky && stickyDesktopOnly,\n }}\n >\n <header\n class={{\n [\"border-bottom\"]: border,\n [\"tabs\"]: isSlotUsed(this.el, \"tabs\"),\n }}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight={isSlotUsed(this.el, \"tabs\")}\n >\n {isSlotUsed(this.el, \"breadcrumbs\") && (\n <div class=\"breadcrumb-area\">\n <slot name=\"breadcrumbs\" />\n </div>\n )}\n <div class=\"main-content\">\n <div class=\"title-area\">\n <div class=\"header-content\">\n <slot name=\"heading\">\n <ic-typography\n variant={small ? \"h4\" : \"h2\"}\n class=\"heading\"\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n <slot name=\"heading-adornment\" />\n </div>\n <div>\n <slot name=\"subheading\">\n {subheading && (\n <ic-typography\n variant=\"body\"\n class={{ [\"subheading\"]: true, [\"small\"]: small }}\n >\n {subheading}\n </ic-typography>\n )}\n </slot>\n </div>\n </div>\n {isSlotUsed(this.el, \"actions\") && (\n <div class=\"action-area\">\n <slot name=\"actions\" />\n </div>\n )}\n {isSlotUsed(this.el, \"input\") && (\n <div class=\"input-area\">\n <slot name=\"input\" />\n </div>\n )}\n </div>\n\n {(isSlotUsed(this.el, \"stepper\") ||\n isSlotUsed(this.el, \"tabs\")) && (\n <div class=\"navigation-area\">\n {isSlotUsed(this.el, \"stepper\") &&\n !isSlotUsed(this.el, \"tabs\") && <slot name=\"stepper\" />}\n {isSlotUsed(this.el, \"tabs\") && (\n <nav\n class=\"tabs-slot\"\n aria-label=\"navigation-landmark-page-header\"\n >\n <slot name=\"tabs\" />\n </nav>\n )}\n </div>\n )}\n </ic-section-container>\n </header>\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as e,h as i,H as t,g as n}from"./p-f9370be6.js";import{b as o,m as l,n as r}from"./p-23831891.js";import{I as s}from"./p-6f57b13c.js";const a=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></svg>`;const c='/*! 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(.link) .ic-link,:host(.link) ::slotted(a){color:var(--ic-hyperlink);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}:host(.link.dark) .ic-link.dark,:host(.link.dark) ::slotted(a){color:var(--ic-color-primary-text)}:host(.link.light) .ic-link.light,:host(.link.light) ::slotted(a){color:var(--ic-color-white-text)}:host(.link) .ic-link:visited,:host(.link) ::slotted(a:visited){color:var(--ic-hyperlink-visited)}:host(.link) .ic-link:hover,:host(.link) .ic-link:focus,:host(.link) ::slotted(a:hover),:host(.link) ::slotted(a:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%}:host(.link) .ic-link:hover,:host(.link) ::slotted(a:hover){outline:none}:host(.link) .ic-link:focus,:host(.link) ::slotted(a:focus){outline:var(--ic-hc-focus-outline)}:host(.link) .ic-link:active,:host(.link) .ic-link:focus:active,:host(.link) .ic-link:visited:active,:host(.link) ::slotted(a:active),:host(.link) ::slotted(a:focus:active),:host(.link) ::slotted(a:visited:active){text-decoration:none}.ic-link-open-in-new-icon{vertical-align:middle;margin-left:var(--ic-space-xxs)}.ic-link>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink)}.ic-link.dark>.ic-link-open-in-new-icon{fill:var(--ic-color-primary-text)}.ic-link.light>.ic-link-open-in-new-icon{fill:var(--ic-color-white-text)}.ic-link-open-in-new-icon>svg{width:var(--ic-space-md);height:var(--ic-space-md);fill:currentcolor}.ic-link:visited>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink-visited)}.ic-link.light:visited>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink-contrast-visited)}:host(.breadcrumb-link) .ic-link{display:var(--breadcrumb-link-display);align-items:var(--breadcrumb-link-align-items);gap:var(--breadcrumb-link-gap)}:host(.breadcrumb-link) .ic-link ::slotted(.back-icon){height:var(--ic-space-lg);width:var(--ic-space-lg)}:host(.breadcrumb-link.current-page) a,:host(.breadcrumb-link.current-page) ::slotted(a){font-weight:normal;color:inherit;text-decoration:none;display:flex;align-items:center}:host(.breadcrumb-link.current-page) .ic-link,:host(.breadcrumb-link.current-page) ::slotted(a:focus){outline:var(--ic-hc-focus-outline);text-decoration:none}:host(.breadcrumb-link.current-page) .ic-link:visited{color:var(--ic-color-primary-text)}';const d=class{constructor(i){e(this,i);this.inheritedAttributes={};this.download=false;this.href=null;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.target=undefined;this.showIcon=undefined;this.appearance="default"}themeChangeHandler(e){const i=e.detail;this.updateTheme(i.mode)}updateTheme(e=null){const i=o(this.el,e||null);switch(i){case s.Light:this.appearance=s.Light;break;case s.Dark:this.appearance=s.Dark;break}}componentWillLoad(){this.inheritedAttributes=l(this.el,[...r,"aria-expanded"])}componentDidLoad(){this.updateTheme()}hasRouterSlot(){this.routerSlot=this.el.querySelector('[slot="router-item"]');if(this.routerSlot){this.routerSlot.ariaLabel=this.routerSlot.textContent}return!!this.routerSlot}render(){const{download:e,href:n,hreflang:o,referrerpolicy:l,rel:r,target:s,showIcon:c,appearance:d}=this;return i(t,{class:{["link"]:true,[`${d}`]:true}},this.hasRouterSlot()?i("slot",{name:"router-item"}):i("a",Object.assign({class:{["ic-link"]:n!==null,[`${d}`]:n!==null},download:e!==false?e:null,href:n,hrefLang:o,referrerPolicy:l,rel:r,target:s,tabindex:n!==null?"0":"-1"},this.inheritedAttributes),i("slot",null),c&&i("span",{class:"ic-link-open-in-new-icon",innerHTML:a})))}get el(){return n(this)}};d.style=c;export{d as ic_link};
2
- //# sourceMappingURL=p-cc83692e.entry.js.map
1
+ import{r as e,h as i,H as t,g as n}from"./p-f9370be6.js";import{b as o,m as l,n as r}from"./p-a8ac8f72.js";import{I as s}from"./p-6f57b13c.js";const a=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></svg>`;const c='/*! 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(.link) .ic-link,:host(.link) ::slotted(a){color:var(--ic-hyperlink);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}:host(.link.dark) .ic-link.dark,:host(.link.dark) ::slotted(a){color:var(--ic-color-primary-text)}:host(.link.light) .ic-link.light,:host(.link.light) ::slotted(a){color:var(--ic-color-white-text)}:host(.link) .ic-link:visited,:host(.link) ::slotted(a:visited){color:var(--ic-hyperlink-visited)}:host(.link) .ic-link:hover,:host(.link) .ic-link:focus,:host(.link) ::slotted(a:hover),:host(.link) ::slotted(a:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%}:host(.link) .ic-link:hover,:host(.link) ::slotted(a:hover){outline:none}:host(.link) .ic-link:focus,:host(.link) ::slotted(a:focus){outline:var(--ic-hc-focus-outline)}:host(.link) .ic-link:active,:host(.link) .ic-link:focus:active,:host(.link) .ic-link:visited:active,:host(.link) ::slotted(a:active),:host(.link) ::slotted(a:focus:active),:host(.link) ::slotted(a:visited:active){text-decoration:none}.ic-link-open-in-new-icon{vertical-align:middle;margin-left:var(--ic-space-xxs)}.ic-link>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink)}.ic-link.dark>.ic-link-open-in-new-icon{fill:var(--ic-color-primary-text)}.ic-link.light>.ic-link-open-in-new-icon{fill:var(--ic-color-white-text)}.ic-link-open-in-new-icon>svg{width:var(--ic-space-md);height:var(--ic-space-md);fill:currentcolor}.ic-link:visited>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink-visited)}.ic-link.light:visited>.ic-link-open-in-new-icon{fill:var(--ic-hyperlink-contrast-visited)}:host(.breadcrumb-link) .ic-link{display:var(--breadcrumb-link-display);align-items:var(--breadcrumb-link-align-items);gap:var(--breadcrumb-link-gap)}:host(.breadcrumb-link) .ic-link ::slotted(.back-icon){height:var(--ic-space-lg);width:var(--ic-space-lg)}:host(.breadcrumb-link.current-page) a,:host(.breadcrumb-link.current-page) ::slotted(a){font-weight:normal;color:inherit;text-decoration:none;display:flex;align-items:center}:host(.breadcrumb-link.current-page) .ic-link,:host(.breadcrumb-link.current-page) ::slotted(a:focus){outline:var(--ic-hc-focus-outline);text-decoration:none}:host(.breadcrumb-link.current-page) .ic-link:visited{color:var(--ic-color-primary-text)}';const d=class{constructor(i){e(this,i);this.inheritedAttributes={};this.download=false;this.href=null;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.target=undefined;this.showIcon=undefined;this.appearance="default"}themeChangeHandler(e){const i=e.detail;this.updateTheme(i.mode)}updateTheme(e=null){const i=o(this.el,e||null);switch(i){case s.Light:this.appearance=s.Light;break;case s.Dark:this.appearance=s.Dark;break}}componentWillLoad(){this.inheritedAttributes=l(this.el,[...r,"aria-expanded"])}componentDidLoad(){this.updateTheme()}hasRouterSlot(){this.routerSlot=this.el.querySelector('[slot="router-item"]');if(this.routerSlot){this.routerSlot.ariaLabel=this.routerSlot.textContent}return!!this.routerSlot}render(){const{download:e,href:n,hreflang:o,referrerpolicy:l,rel:r,target:s,showIcon:c,appearance:d}=this;return i(t,{class:{["link"]:true,[`${d}`]:true}},this.hasRouterSlot()?i("slot",{name:"router-item"}):i("a",Object.assign({class:{["ic-link"]:n!==null,[`${d}`]:n!==null},download:e!==false?e:null,href:n,hrefLang:o,referrerPolicy:l,rel:r,target:s,tabindex:n!==null?"0":"-1"},this.inheritedAttributes),i("slot",null),c&&i("span",{class:"ic-link-open-in-new-icon",innerHTML:a})))}get el(){return n(this)}};d.style=c;export{d as ic_link};
2
+ //# sourceMappingURL=p-23bf0b7a.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-link/ic-link.css?tag=ic-link&encapsulation=shadow","src/components/ic-link/ic-link.tsx"],"names":["icLinkCss","Link","this","inheritedAttributes","[object Object]","ev","theme","detail","updateTheme","mode","newTheme","getThemeFromContext","el","IcThemeForegroundEnum","Light","appearance","Dark","inheritAttributes","IC_INHERITED_ARIA","routerSlot","querySelector","ariaLabel","textContent","download","href","hreflang","referrerpolicy","rel","target","showIcon","h","Host","class","hasRouterSlot","name","Object","assign","hrefLang","referrerPolicy","tabindex","innerHTML","OpenInNew"],"mappings":"0aAAA,MAAMA,EAAY,ynJCoBLC,EAAI,+BACPC,KAAAC,oBAAgD,iBAQlB,gBAKd,4IA8BkC,UAG1DC,mBAAmBC,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BL,KAAKM,YAAYF,EAAMG,MAGjBL,YAAYM,EAA8B,MAChD,MAAMJ,EAAQK,EAAoBT,KAAKU,GAAIF,GAAY,MAEvD,OAAQJ,GACN,KAAKO,EAAsBC,MACzBZ,KAAKa,WAAaF,EAAsBC,MACxC,MACF,KAAKD,EAAsBG,KACzBd,KAAKa,WAAaF,EAAsBG,KACxC,OAINZ,oBACEF,KAAKC,oBAAsBc,EAAkBf,KAAKU,GAAI,IACjDM,EACH,kBAIJd,mBACEF,KAAKM,cAGCJ,gBACNF,KAAKiB,WAAajB,KAAKU,GAAGQ,cAAc,wBACxC,GAAIlB,KAAKiB,WAAY,CACnBjB,KAAKiB,WAAWE,UAAYnB,KAAKiB,WAAWG,YAE9C,QAASpB,KAAKiB,WAGhBf,SACE,MAAMmB,SACJA,EAAQC,KACRA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,IACdA,EAAGC,OACHA,EAAMC,SACNA,EAAQd,WACRA,GACEb,KAEJ,OACE4B,EAACC,EAAI,CAACC,MAAO,CAAE5B,CAAC,QAAS,KAAMA,CAAC,GAAGW,KAAe,OAC/Cb,KAAK+B,gBACJH,EAAA,OAAA,CAAMI,KAAK,gBAEXJ,EAAA,IAAAK,OAAAC,OAAA,CACEJ,MAAO,CACL5B,CAAC,WAAYoB,IAAS,KACtBpB,CAAC,GAAGW,KAAeS,IAAS,MAE9BD,SAAUA,IAAa,MAAQA,EAAW,KAC1CC,KAAMA,EACNa,SAAUZ,EACVa,eAAgBZ,EAChBC,IAAKA,EACLC,OAAQA,EACRW,SAAUf,IAAS,KAAO,IAAM,MAC5BtB,KAAKC,qBAET2B,EAAA,OAAA,MACCD,GACCC,EAAA,OAAA,CAAME,MAAM,2BAA2BQ,UAAWC","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host(.link) .ic-link,\n:host(.link) ::slotted(a) {\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n:host(.link.dark) .ic-link.dark,\n:host(.link.dark) ::slotted(a) {\n color: var(--ic-color-primary-text);\n}\n\n:host(.link.light) .ic-link.light,\n:host(.link.light) ::slotted(a) {\n color: var(--ic-color-white-text);\n}\n\n:host(.link) .ic-link:visited,\n:host(.link) ::slotted(a:visited) {\n color: var(--ic-hyperlink-visited);\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:hover),\n:host(.link) ::slotted(a:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) ::slotted(a:hover) {\n outline: none;\n}\n\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.link) .ic-link:active,\n:host(.link) .ic-link:focus:active,\n:host(.link) .ic-link:visited:active,\n:host(.link) ::slotted(a:active),\n:host(.link) ::slotted(a:focus:active),\n:host(.link) ::slotted(a:visited:active) {\n text-decoration: none;\n}\n\n.ic-link-open-in-new-icon {\n vertical-align: middle;\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-link > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink);\n}\n\n.ic-link.dark > .ic-link-open-in-new-icon {\n fill: var(--ic-color-primary-text);\n}\n\n.ic-link.light > .ic-link-open-in-new-icon {\n fill: var(--ic-color-white-text);\n}\n\n.ic-link-open-in-new-icon > svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n fill: currentcolor;\n}\n\n.ic-link:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-visited);\n}\n\n.ic-link.light:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-contrast-visited);\n}\n\n:host(.breadcrumb-link) .ic-link {\n display: var(--breadcrumb-link-display);\n align-items: var(--breadcrumb-link-align-items);\n gap: var(--breadcrumb-link-gap);\n}\n\n:host(.breadcrumb-link) .ic-link ::slotted(.back-icon) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host(.breadcrumb-link.current-page) a,\n:host(.breadcrumb-link.current-page) ::slotted(a) {\n font-weight: normal;\n color: inherit;\n text-decoration: none;\n display: flex;\n align-items: center;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link,\n:host(.breadcrumb-link.current-page) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration: none;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link:visited {\n color: var(--ic-color-primary-text);\n}\n","import { Component, Element, Prop, h, Host, Listen } from \"@stencil/core\";\n\nimport OpenInNew from \"./assets/OpenInNew.svg\";\nimport { getThemeFromContext, inheritAttributes } from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\n/**\n * @slot router-item - Handle routing by nesting your routes in this slot.\n */\n\n@Component({\n tag: \"ic-link\",\n styleUrl: \"ic-link.css\",\n shadow: true,\n})\nexport class Link {\n private inheritedAttributes: { [k: string]: unknown } = {};\n private routerSlot: HTMLElement;\n\n @Element() el: HTMLIcLinkElement;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The URL that the link points to.\n */\n @Prop() href?: string = null;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * If `true`, the 'open in new tab/window' icon will be displayed.\n */\n @Prop() showIcon?: boolean;\n\n /**\n * The appearance of the link, e.g. dark, light, or default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const theme = getThemeFromContext(this.el, newTheme || null);\n\n switch (theme) {\n case IcThemeForegroundEnum.Light:\n this.appearance = IcThemeForegroundEnum.Light;\n break;\n case IcThemeForegroundEnum.Dark:\n this.appearance = IcThemeForegroundEnum.Dark;\n break;\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"aria-expanded\",\n ]);\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n render() {\n const {\n download,\n href,\n hreflang,\n referrerpolicy,\n rel,\n target,\n showIcon,\n appearance,\n } = this;\n\n return (\n <Host class={{ [\"link\"]: true, [`${appearance}`]: true }}>\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <a\n class={{\n [\"ic-link\"]: href !== null,\n [`${appearance}`]: href !== null,\n }}\n download={download !== false ? download : null}\n href={href}\n hrefLang={hreflang}\n referrerPolicy={referrerpolicy}\n rel={rel}\n target={target}\n tabindex={href !== null ? \"0\" : \"-1\"}\n {...this.inheritedAttributes}\n >\n <slot />\n {showIcon && (\n <span class=\"ic-link-open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-link/ic-link.css?tag=ic-link&encapsulation=shadow","src/components/ic-link/ic-link.tsx"],"names":["icLinkCss","Link","this","inheritedAttributes","[object Object]","ev","theme","detail","updateTheme","mode","newTheme","getThemeFromContext","el","IcThemeForegroundEnum","Light","appearance","Dark","inheritAttributes","IC_INHERITED_ARIA","routerSlot","querySelector","ariaLabel","textContent","download","href","hreflang","referrerpolicy","rel","target","showIcon","h","Host","class","hasRouterSlot","name","Object","assign","hrefLang","referrerPolicy","tabindex","innerHTML","OpenInNew"],"mappings":"0aAAA,MAAMA,EAAY,ynJCoBLC,EAAI,+BACPC,KAAAC,oBAAgD,iBAQlB,gBAKd,4IA8BkC,UAG1DC,mBAAmBC,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BL,KAAKM,YAAYF,EAAMG,MAGjBL,YAAYM,EAA8B,MAChD,MAAMJ,EAAQK,EAAoBT,KAAKU,GAAIF,GAAY,MAEvD,OAAQJ,GACN,KAAKO,EAAsBC,MACzBZ,KAAKa,WAAaF,EAAsBC,MACxC,MACF,KAAKD,EAAsBG,KACzBd,KAAKa,WAAaF,EAAsBG,KACxC,OAINZ,oBACEF,KAAKC,oBAAsBc,EAAkBf,KAAKU,GAAI,IACjDM,EACH,kBAIJd,mBACEF,KAAKM,cAGCJ,gBACNF,KAAKiB,WAAajB,KAAKU,GAAGQ,cAAc,wBACxC,GAAIlB,KAAKiB,WAAY,CACnBjB,KAAKiB,WAAWE,UAAYnB,KAAKiB,WAAWG,YAE9C,QAASpB,KAAKiB,WAGhBf,SACE,MAAMmB,SACJA,EAAQC,KACRA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,IACdA,EAAGC,OACHA,EAAMC,SACNA,EAAQd,WACRA,GACEb,KAEJ,OACE4B,EAACC,EAAI,CAACC,MAAO,CAAE5B,CAAC,QAAS,KAAMA,CAAC,GAAGW,KAAe,OAC/Cb,KAAK+B,gBACJH,EAAA,OAAA,CAAMI,KAAK,gBAEXJ,EAAA,IAAAK,OAAAC,OAAA,CACEJ,MAAO,CACL5B,CAAC,WAAYoB,IAAS,KACtBpB,CAAC,GAAGW,KAAeS,IAAS,MAE9BD,SAAUA,IAAa,MAAQA,EAAW,KAC1CC,KAAMA,EACNa,SAAUZ,EACVa,eAAgBZ,EAChBC,IAAKA,EACLC,OAAQA,EACRW,SAAUf,IAAS,KAAO,IAAM,MAC5BtB,KAAKC,qBAET2B,EAAA,OAAA,MACCD,GACCC,EAAA,OAAA,CAAME,MAAM,2BAA2BQ,UAAWC","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.link) .ic-link,\n:host(.link) ::slotted(a) {\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n:host(.link.dark) .ic-link.dark,\n:host(.link.dark) ::slotted(a) {\n color: var(--ic-color-primary-text);\n}\n\n:host(.link.light) .ic-link.light,\n:host(.link.light) ::slotted(a) {\n color: var(--ic-color-white-text);\n}\n\n:host(.link) .ic-link:visited,\n:host(.link) ::slotted(a:visited) {\n color: var(--ic-hyperlink-visited);\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:hover),\n:host(.link) ::slotted(a:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) ::slotted(a:hover) {\n outline: none;\n}\n\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.link) .ic-link:active,\n:host(.link) .ic-link:focus:active,\n:host(.link) .ic-link:visited:active,\n:host(.link) ::slotted(a:active),\n:host(.link) ::slotted(a:focus:active),\n:host(.link) ::slotted(a:visited:active) {\n text-decoration: none;\n}\n\n.ic-link-open-in-new-icon {\n vertical-align: middle;\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-link > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink);\n}\n\n.ic-link.dark > .ic-link-open-in-new-icon {\n fill: var(--ic-color-primary-text);\n}\n\n.ic-link.light > .ic-link-open-in-new-icon {\n fill: var(--ic-color-white-text);\n}\n\n.ic-link-open-in-new-icon > svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n fill: currentcolor;\n}\n\n.ic-link:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-visited);\n}\n\n.ic-link.light:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-contrast-visited);\n}\n\n:host(.breadcrumb-link) .ic-link {\n display: var(--breadcrumb-link-display);\n align-items: var(--breadcrumb-link-align-items);\n gap: var(--breadcrumb-link-gap);\n}\n\n:host(.breadcrumb-link) .ic-link ::slotted(.back-icon) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host(.breadcrumb-link.current-page) a,\n:host(.breadcrumb-link.current-page) ::slotted(a) {\n font-weight: normal;\n color: inherit;\n text-decoration: none;\n display: flex;\n align-items: center;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link,\n:host(.breadcrumb-link.current-page) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration: none;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link:visited {\n color: var(--ic-color-primary-text);\n}\n","import { Component, Element, Prop, h, Host, Listen } from \"@stencil/core\";\n\nimport OpenInNew from \"./assets/OpenInNew.svg\";\nimport { getThemeFromContext, inheritAttributes } from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\n/**\n * @slot router-item - Handle routing by nesting your routes in this slot.\n */\n\n@Component({\n tag: \"ic-link\",\n styleUrl: \"ic-link.css\",\n shadow: true,\n})\nexport class Link {\n private inheritedAttributes: { [k: string]: unknown } = {};\n private routerSlot: HTMLElement;\n\n @Element() el: HTMLIcLinkElement;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The URL that the link points to.\n */\n @Prop() href?: string = null;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * If `true`, the 'open in new tab/window' icon will be displayed.\n */\n @Prop() showIcon?: boolean;\n\n /**\n * The appearance of the link, e.g. dark, light, or default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const theme = getThemeFromContext(this.el, newTheme || null);\n\n switch (theme) {\n case IcThemeForegroundEnum.Light:\n this.appearance = IcThemeForegroundEnum.Light;\n break;\n case IcThemeForegroundEnum.Dark:\n this.appearance = IcThemeForegroundEnum.Dark;\n break;\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"aria-expanded\",\n ]);\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n render() {\n const {\n download,\n href,\n hreflang,\n referrerpolicy,\n rel,\n target,\n showIcon,\n appearance,\n } = this;\n\n return (\n <Host class={{ [\"link\"]: true, [`${appearance}`]: true }}>\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <a\n class={{\n [\"ic-link\"]: href !== null,\n [`${appearance}`]: href !== null,\n }}\n download={download !== false ? download : null}\n href={href}\n hrefLang={hreflang}\n referrerPolicy={referrerpolicy}\n rel={rel}\n target={target}\n tabindex={href !== null ? \"0\" : \"-1\"}\n {...this.inheritedAttributes}\n >\n <slot />\n {showIcon && (\n <span class=\"ic-link-open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as i,H as a,g as r}from"./p-f9370be6.js";import{w as s,e as n}from"./p-bf5717ca.js";import{s as o}from"./p-ae6aa67f.js";import{c}from"./p-44512ebe.js";import{i as l}from"./p-23831891.js";import{I as d}from"./p-6f57b13c.js";const p=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/>\n <title>neutral icon</title>\n</svg>`;const u=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>\n <title>info icon</title>\n</svg>`;const m='/*! 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:block}.container{min-height:56px;border-radius:var(--ic-border-radius);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-architectural-40)}.container-info{background-color:var(--ic-status-info-background)}.container-warning{background-color:var(--ic-status-warning-background)}.container-error{background-color:var(--ic-status-error-background)}.container-success{background-color:var(--ic-status-success-background)}.alert-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-architectural-500)}.divider-info{background-color:var(--ic-status-info)}.divider-warning{background-color:var(--ic-status-warning-mid)}.divider-error{background-color:var(--ic-status-error)}.divider-success{background-color:var(--ic-status-success)}.alert-icon{height:var(--ic-space-lg);width:22px;margin-left:18px}.icon-neutral>svg{fill:var(--ic-architectural-500)}:host([variant="info"]) .alert-icon svg{fill:var(--ic-status-info)}:host([variant="warning"]) .alert-icon svg{fill:var(--ic-status-warning-mid)}:host([variant="error"]) .alert-icon svg{fill:var(--ic-status-error)}:host([variant="success"]) .alert-icon svg{fill:var(--ic-status-success)}.alert-content{display:flex;align-items:center;margin-left:10px;width:100%}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1}.alert-message-title-above{display:inline;font-size:0}.alert-title{margin-right:var(--ic-space-xs)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-6px;padding:6px;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon svg{width:18px;height:18px}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-content{display:flex;flex-direction:column;align-items:flex-start}.alert-message{display:flex;flex-direction:column;align-items:flex-start;font-size:1px}.alert-title{white-space:normal}.alert-action-container{margin-bottom:14px}}@media (forced-colors: active){.container{border:var(--ic-hc-border)}}';const h={neutral:p,info:u,warning:s,error:n,success:o};const g=class{constructor(i){e(this,i);this.dismiss=t(this,"dismiss",7);this.icDismiss=t(this,"icDismiss",7);this.dismissAction=()=>{this.dismiss.emit();this.icDismiss.emit()};this.variant="neutral";this.heading="";this.message=undefined;this.titleAbove=false;this.dismissible=false;this.announced=true;this.visible=true;this.alertTitleWrap=false}handleClick(){this.visible=!this.visible}alertTitleShouldWrap(){var e;const t=(e=this.el.shadowRoot.querySelector(".alert-title"))===null||e===void 0?void 0:e.clientHeight;if(t>24)this.alertTitleWrap=true}componentDidLoad(){this.alertTitleShouldWrap()}render(){const{variant:e,heading:t,message:r,titleAbove:s,dismissible:n,announced:o,visible:p}=this;return p&&i(a,{role:o&&"alert",class:{[d.Dark]:true}},i("div",{class:{["container"]:true,[`container-${e}`]:true}},i("div",{class:"alert-icon-container"},i("div",{class:{["divider"]:true,[`divider-${e}`]:true}}),i("span",{class:{["alert-icon"]:true,["svg-container"]:true,[`icon-${e}`]:true},innerHTML:h[e]})),i("div",{class:"alert-content"},i("div",{class:{["alert-message"]:true,["alert-message-title-above"]:s||this.alertTitleWrap}},t&&i("ic-typography",{class:{["alert-title"]:true,["alert-title-above"]:s||this.alertTitleWrap},variant:"subtitle-large"},i("p",null,t)),i("slot",{name:"message"},i("ic-typography",{variant:"body"},r))),l(this.el,"action")&&i("div",{class:"alert-action-container"},i("slot",{name:"action"}))),i("div",{class:"dismiss-icon-container"},n&&i("ic-button",{class:{["svg-container"]:true,["dismiss-icon"]:true},innerHTML:c,onClick:this.dismissAction,variant:"icon",appearance:d.Dark,title:"dismiss"}))))}get el(){return r(this)}};g.style=m;export{g as ic_alert};
2
- //# sourceMappingURL=p-7881b94e.entry.js.map
1
+ import{r as e,c as t,h as i,H as a,g as r}from"./p-f9370be6.js";import{w as s,e as n}from"./p-bf5717ca.js";import{s as o}from"./p-ae6aa67f.js";import{c}from"./p-44512ebe.js";import{i as l}from"./p-a8ac8f72.js";import{I as d}from"./p-6f57b13c.js";const p=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/>\n <title>neutral icon</title>\n</svg>`;const u=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>\n <title>info icon</title>\n</svg>`;const m='/*! 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:block}.container{min-height:56px;border-radius:var(--ic-border-radius);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-architectural-40)}.container-info{background-color:var(--ic-status-info-background)}.container-warning{background-color:var(--ic-status-warning-background)}.container-error{background-color:var(--ic-status-error-background)}.container-success{background-color:var(--ic-status-success-background)}.alert-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-architectural-500)}.divider-info{background-color:var(--ic-status-info)}.divider-warning{background-color:var(--ic-status-warning-mid)}.divider-error{background-color:var(--ic-status-error)}.divider-success{background-color:var(--ic-status-success)}.alert-icon{height:var(--ic-space-lg);width:22px;margin-left:18px}.icon-neutral>svg{fill:var(--ic-architectural-500)}:host([variant="info"]) .alert-icon svg{fill:var(--ic-status-info)}:host([variant="warning"]) .alert-icon svg{fill:var(--ic-status-warning-mid)}:host([variant="error"]) .alert-icon svg{fill:var(--ic-status-error)}:host([variant="success"]) .alert-icon svg{fill:var(--ic-status-success)}.alert-content{display:flex;align-items:center;margin-left:10px;width:100%}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1}.alert-message-title-above{display:inline;font-size:0}.alert-title{margin-right:var(--ic-space-xs)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-6px;padding:6px;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon svg{width:18px;height:18px}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-content{display:flex;flex-direction:column;align-items:flex-start}.alert-message{display:flex;flex-direction:column;align-items:flex-start;font-size:1px}.alert-title{white-space:normal}.alert-action-container{margin-bottom:14px}}@media (forced-colors: active){.container{border:var(--ic-hc-border)}}';const h={neutral:p,info:u,warning:s,error:n,success:o};const g=class{constructor(i){e(this,i);this.dismiss=t(this,"dismiss",7);this.icDismiss=t(this,"icDismiss",7);this.dismissAction=()=>{this.dismiss.emit();this.icDismiss.emit()};this.variant="neutral";this.heading="";this.message=undefined;this.titleAbove=false;this.dismissible=false;this.announced=true;this.visible=true;this.alertTitleWrap=false}handleClick(){this.visible=!this.visible}alertTitleShouldWrap(){var e;const t=(e=this.el.shadowRoot.querySelector(".alert-title"))===null||e===void 0?void 0:e.clientHeight;if(t>24)this.alertTitleWrap=true}componentDidLoad(){this.alertTitleShouldWrap()}render(){const{variant:e,heading:t,message:r,titleAbove:s,dismissible:n,announced:o,visible:p}=this;return p&&i(a,{role:o&&"alert",class:{[d.Dark]:true}},i("div",{class:{["container"]:true,[`container-${e}`]:true}},i("div",{class:"alert-icon-container"},i("div",{class:{["divider"]:true,[`divider-${e}`]:true}}),i("span",{class:{["alert-icon"]:true,["svg-container"]:true,[`icon-${e}`]:true},innerHTML:h[e]})),i("div",{class:"alert-content"},i("div",{class:{["alert-message"]:true,["alert-message-title-above"]:s||this.alertTitleWrap}},t&&i("ic-typography",{class:{["alert-title"]:true,["alert-title-above"]:s||this.alertTitleWrap},variant:"subtitle-large"},i("p",null,t)),i("slot",{name:"message"},i("ic-typography",{variant:"body"},r))),l(this.el,"action")&&i("div",{class:"alert-action-container"},i("slot",{name:"action"}))),i("div",{class:"dismiss-icon-container"},n&&i("ic-button",{class:{["svg-container"]:true,["dismiss-icon"]:true},innerHTML:c,onClick:this.dismissAction,variant:"icon",appearance:d.Dark,title:"dismiss"}))))}get el(){return r(this)}};g.style=m;export{g as ic_alert};
2
+ //# sourceMappingURL=p-27554319.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","src/components/ic-alert/ic-alert.tsx"],"names":["icAlertCss","icon","neutral","neutralIcon","info","infoIcon","warning","warningIcon","error","errorIcon","success","successIcon","Alert","this","dismissAction","dismiss","emit","icDismiss","[object Object]","visible","titleHeight","_a","el","shadowRoot","querySelector","clientHeight","alertTitleWrap","alertTitleShouldWrap","variant","heading","message","titleAbove","dismissible","announced","h","Host","role","class","IcThemeForegroundEnum","Dark","innerHTML","name","isSlotUsed","closeIcon","onClick","appearance","title"],"mappings":"6gCAAA,MAAMA,EAAa,6qJCqBnB,MAAMC,EAAO,CACXC,QAASC,EACTC,KAAMC,EACNC,QAASC,EACTC,MAAOC,EACPC,QAASC,SAYEC,EAAK,qGA8CRC,KAAAC,cAAgB,KACtBD,KAAKE,QAAQC,OACbH,KAAKI,UAAUD,qBA1CmB,uBAIT,0CAQI,uBAIC,qBAIF,kBAEF,yBAEO,MAGnCE,cACEL,KAAKM,SAAWN,KAAKM,QAiBfD,6BACN,MAAME,GACJC,EAAAR,KAAKS,GAAGC,WAAWC,cAAc,mBAAe,MAAAH,SAAA,OAAA,EAAAA,EAAEI,aACpD,GAAIL,EAAc,GAAIP,KAAKa,eAAiB,KAG9CR,mBACEL,KAAKc,uBAGPT,SACE,MAAMU,QACJA,EAAOC,QACPA,EAAOC,QACPA,EAAOC,WACPA,EAAUC,YACVA,EAAWC,UACXA,EAASd,QACTA,GACEN,KAEJ,OACEM,GACEe,EAACC,EAAI,CACHC,KAAMH,GAAa,QACnBI,MAAO,CACLnB,CAACoB,EAAsBC,MAAO,OAGhCL,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,aAAc,KACfA,CAAC,aAAaU,KAAY,OAG5BM,EAAA,MAAA,CAAKG,MAAM,wBACTH,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,WAAY,KACbA,CAAC,WAAWU,KAAY,QAG5BM,EAAA,OAAA,CACEG,MAAO,CACLnB,CAAC,cAAe,KAChBA,CAAC,iBAAkB,KACnBA,CAAC,QAAQU,KAAY,MAEvBY,UAAWvC,EAAK2B,MAGpBM,EAAA,MAAA,CAAKG,MAAM,iBACTH,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,iBAAkB,KACnBA,CAAC,6BACCa,GAAclB,KAAKa,iBAGtBG,GACCK,EAAA,gBAAA,CACEG,MAAO,CACLnB,CAAC,eAAgB,KACjBA,CAAC,qBAAsBa,GAAclB,KAAKa,gBAE5CE,QAAQ,kBAERM,EAAA,IAAA,KAAIL,IAGRK,EAAA,OAAA,CAAMO,KAAK,WACTP,EAAA,gBAAA,CAAeN,QAAQ,QAAQE,KAGlCY,EAAW7B,KAAKS,GAAI,WACnBY,EAAA,MAAA,CAAKG,MAAM,0BACTH,EAAA,OAAA,CAAMO,KAAK,aAIjBP,EAAA,MAAA,CAAKG,MAAM,0BACRL,GACCE,EAAA,YAAA,CACEG,MAAO,CACLnB,CAAC,iBAAkB,KACnBA,CAAC,gBAAiB,MAEpBsB,UAAWG,EACXC,QAAS/B,KAAKC,cACdc,QAAQ,OACRiB,WAAYP,EAAsBC,KAClCO,MAAM","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: block;\n}\n\n.container {\n min-height: 56px;\n border-radius: var(--ic-border-radius);\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.container-neutral {\n background-color: var(--ic-architectural-40);\n}\n\n.container-info {\n background-color: var(--ic-status-info-background);\n}\n\n.container-warning {\n background-color: var(--ic-status-warning-background);\n}\n\n.container-error {\n background-color: var(--ic-status-error-background);\n}\n\n.container-success {\n background-color: var(--ic-status-success-background);\n}\n\n.alert-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n position: absolute;\n}\n\n.divider-neutral {\n background-color: var(--ic-architectural-500);\n}\n\n.divider-info {\n background-color: var(--ic-status-info);\n}\n\n.divider-warning {\n background-color: var(--ic-status-warning-mid);\n}\n\n.divider-error {\n background-color: var(--ic-status-error);\n}\n\n.divider-success {\n background-color: var(--ic-status-success);\n}\n\n.alert-icon {\n height: var(--ic-space-lg);\n width: 22px;\n margin-left: 18px;\n}\n\n.icon-neutral > svg {\n fill: var(--ic-architectural-500);\n}\n\n:host([variant=\"info\"]) .alert-icon svg {\n fill: var(--ic-status-info);\n}\n\n:host([variant=\"warning\"]) .alert-icon svg {\n fill: var(--ic-status-warning-mid);\n}\n\n:host([variant=\"error\"]) .alert-icon svg {\n fill: var(--ic-status-error);\n}\n\n:host([variant=\"success\"]) .alert-icon svg {\n fill: var(--ic-status-success);\n}\n\n.alert-content {\n display: flex;\n align-items: center;\n margin-left: 10px;\n width: 100%;\n}\n\n.alert-message {\n display: flex;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n flex: 1;\n}\n\n.alert-message-title-above {\n display: inline;\n font-size: 0;\n}\n\n.alert-title {\n margin-right: var(--ic-space-xs);\n}\n\n.alert-title-above {\n white-space: normal;\n}\n\n.alert-action-container {\n margin-right: var(--ic-space-xs);\n display: flex;\n align-items: center;\n}\n\n.dismiss-icon {\n margin-right: var(--ic-space-xxxs);\n margin-left: -6px;\n padding: 6px;\n border: none;\n border-radius: 50%;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dismiss-icon svg {\n width: 18px;\n height: 18px;\n}\n\n.dismiss-icon:hover {\n cursor: pointer;\n}\n\n@media (max-width: 628px) {\n .alert-content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-message {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n font-size: 1px;\n }\n\n .alert-title {\n white-space: normal;\n }\n\n .alert-action-container {\n margin-bottom: 14px;\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-hc-border);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n} from \"@stencil/core\";\nimport neutralIcon from \"../../assets/neutral-icon.svg\";\nimport infoIcon from \"../../assets/info-icon.svg\";\nimport warningIcon from \"../../assets/warning-icon.svg\";\nimport errorIcon from \"../../assets/error-icon.svg\";\nimport successIcon from \"../../assets/success-icon.svg\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { IcAlertVariants } from \"./ic-alert.types\";\nimport { isSlotUsed } from \"../../utils/helpers\";\nimport { IcThemeForegroundEnum } from \"../../utils/types\";\n\nconst icon = {\n neutral: neutralIcon,\n info: infoIcon,\n warning: warningIcon,\n error: errorIcon,\n success: successIcon,\n};\n\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n @Element() el: HTMLIcAlertElement;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant?: IcAlertVariants = \"neutral\";\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading?: string = \"\";\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n /**\n * If `true`, the title and message will appear inline instead of above and below.\n */\n @Prop() titleAbove?: boolean = false;\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced?: boolean = true;\n\n @State() visible: boolean = true;\n\n @State() alertTitleWrap: boolean = false;\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n /**\n * @deprecated This event should not be used anymore. Use icDismiss instead.\n */\n @Event() dismiss: EventEmitter<void>;\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n\n private alertTitleShouldWrap() {\n const titleHeight =\n this.el.shadowRoot.querySelector(\".alert-title\")?.clientHeight;\n if (titleHeight > 24) this.alertTitleWrap = true;\n }\n\n componentDidLoad(): void {\n this.alertTitleShouldWrap();\n }\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n } = this;\n\n return (\n visible && (\n <Host\n role={announced && \"alert\"}\n class={{\n [IcThemeForegroundEnum.Dark]: true,\n }}\n >\n <div\n class={{\n [\"container\"]: true,\n [`container-${variant}`]: true,\n }}\n >\n <div class=\"alert-icon-container\">\n <div\n class={{\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n }}\n ></div>\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={icon[variant]}\n ></span>\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n [\"alert-message\"]: true,\n [\"alert-message-title-above\"]:\n titleAbove || this.alertTitleWrap,\n }}\n >\n {heading && (\n <ic-typography\n class={{\n [\"alert-title\"]: true,\n [\"alert-title-above\"]: titleAbove || this.alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{\n [\"svg-container\"]: true,\n [\"dismiss-icon\"]: true,\n }}\n innerHTML={closeIcon}\n onClick={this.dismissAction}\n variant=\"icon\"\n appearance={IcThemeForegroundEnum.Dark}\n title=\"dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","src/components/ic-alert/ic-alert.tsx"],"names":["icAlertCss","icon","neutral","neutralIcon","info","infoIcon","warning","warningIcon","error","errorIcon","success","successIcon","Alert","this","dismissAction","dismiss","emit","icDismiss","[object Object]","visible","titleHeight","_a","el","shadowRoot","querySelector","clientHeight","alertTitleWrap","alertTitleShouldWrap","variant","heading","message","titleAbove","dismissible","announced","h","Host","role","class","IcThemeForegroundEnum","Dark","innerHTML","name","isSlotUsed","closeIcon","onClick","appearance","title"],"mappings":"6gCAAA,MAAMA,EAAa,6qJCqBnB,MAAMC,EAAO,CACXC,QAASC,EACTC,KAAMC,EACNC,QAASC,EACTC,MAAOC,EACPC,QAASC,SAYEC,EAAK,qGA8CRC,KAAAC,cAAgB,KACtBD,KAAKE,QAAQC,OACbH,KAAKI,UAAUD,qBA1CmB,uBAIT,0CAQI,uBAIC,qBAIF,kBAEF,yBAEO,MAGnCE,cACEL,KAAKM,SAAWN,KAAKM,QAiBfD,6BACN,MAAME,GACJC,EAAAR,KAAKS,GAAGC,WAAWC,cAAc,mBAAe,MAAAH,SAAA,OAAA,EAAAA,EAAEI,aACpD,GAAIL,EAAc,GAAIP,KAAKa,eAAiB,KAG9CR,mBACEL,KAAKc,uBAGPT,SACE,MAAMU,QACJA,EAAOC,QACPA,EAAOC,QACPA,EAAOC,WACPA,EAAUC,YACVA,EAAWC,UACXA,EAASd,QACTA,GACEN,KAEJ,OACEM,GACEe,EAACC,EAAI,CACHC,KAAMH,GAAa,QACnBI,MAAO,CACLnB,CAACoB,EAAsBC,MAAO,OAGhCL,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,aAAc,KACfA,CAAC,aAAaU,KAAY,OAG5BM,EAAA,MAAA,CAAKG,MAAM,wBACTH,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,WAAY,KACbA,CAAC,WAAWU,KAAY,QAG5BM,EAAA,OAAA,CACEG,MAAO,CACLnB,CAAC,cAAe,KAChBA,CAAC,iBAAkB,KACnBA,CAAC,QAAQU,KAAY,MAEvBY,UAAWvC,EAAK2B,MAGpBM,EAAA,MAAA,CAAKG,MAAM,iBACTH,EAAA,MAAA,CACEG,MAAO,CACLnB,CAAC,iBAAkB,KACnBA,CAAC,6BACCa,GAAclB,KAAKa,iBAGtBG,GACCK,EAAA,gBAAA,CACEG,MAAO,CACLnB,CAAC,eAAgB,KACjBA,CAAC,qBAAsBa,GAAclB,KAAKa,gBAE5CE,QAAQ,kBAERM,EAAA,IAAA,KAAIL,IAGRK,EAAA,OAAA,CAAMO,KAAK,WACTP,EAAA,gBAAA,CAAeN,QAAQ,QAAQE,KAGlCY,EAAW7B,KAAKS,GAAI,WACnBY,EAAA,MAAA,CAAKG,MAAM,0BACTH,EAAA,OAAA,CAAMO,KAAK,aAIjBP,EAAA,MAAA,CAAKG,MAAM,0BACRL,GACCE,EAAA,YAAA,CACEG,MAAO,CACLnB,CAAC,iBAAkB,KACnBA,CAAC,gBAAiB,MAEpBsB,UAAWG,EACXC,QAAS/B,KAAKC,cACdc,QAAQ,OACRiB,WAAYP,EAAsBC,KAClCO,MAAM","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n.container {\n min-height: 56px;\n border-radius: var(--ic-border-radius);\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.container-neutral {\n background-color: var(--ic-architectural-40);\n}\n\n.container-info {\n background-color: var(--ic-status-info-background);\n}\n\n.container-warning {\n background-color: var(--ic-status-warning-background);\n}\n\n.container-error {\n background-color: var(--ic-status-error-background);\n}\n\n.container-success {\n background-color: var(--ic-status-success-background);\n}\n\n.alert-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n position: absolute;\n}\n\n.divider-neutral {\n background-color: var(--ic-architectural-500);\n}\n\n.divider-info {\n background-color: var(--ic-status-info);\n}\n\n.divider-warning {\n background-color: var(--ic-status-warning-mid);\n}\n\n.divider-error {\n background-color: var(--ic-status-error);\n}\n\n.divider-success {\n background-color: var(--ic-status-success);\n}\n\n.alert-icon {\n height: var(--ic-space-lg);\n width: 22px;\n margin-left: 18px;\n}\n\n.icon-neutral > svg {\n fill: var(--ic-architectural-500);\n}\n\n:host([variant=\"info\"]) .alert-icon svg {\n fill: var(--ic-status-info);\n}\n\n:host([variant=\"warning\"]) .alert-icon svg {\n fill: var(--ic-status-warning-mid);\n}\n\n:host([variant=\"error\"]) .alert-icon svg {\n fill: var(--ic-status-error);\n}\n\n:host([variant=\"success\"]) .alert-icon svg {\n fill: var(--ic-status-success);\n}\n\n.alert-content {\n display: flex;\n align-items: center;\n margin-left: 10px;\n width: 100%;\n}\n\n.alert-message {\n display: flex;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n flex: 1;\n}\n\n.alert-message-title-above {\n display: inline;\n font-size: 0;\n}\n\n.alert-title {\n margin-right: var(--ic-space-xs);\n}\n\n.alert-title-above {\n white-space: normal;\n}\n\n.alert-action-container {\n margin-right: var(--ic-space-xs);\n display: flex;\n align-items: center;\n}\n\n.dismiss-icon {\n margin-right: var(--ic-space-xxxs);\n margin-left: -6px;\n padding: 6px;\n border: none;\n border-radius: 50%;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dismiss-icon svg {\n width: 18px;\n height: 18px;\n}\n\n.dismiss-icon:hover {\n cursor: pointer;\n}\n\n@media (max-width: 628px) {\n .alert-content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-message {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n font-size: 1px;\n }\n\n .alert-title {\n white-space: normal;\n }\n\n .alert-action-container {\n margin-bottom: 14px;\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-hc-border);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n} from \"@stencil/core\";\nimport neutralIcon from \"../../assets/neutral-icon.svg\";\nimport infoIcon from \"../../assets/info-icon.svg\";\nimport warningIcon from \"../../assets/warning-icon.svg\";\nimport errorIcon from \"../../assets/error-icon.svg\";\nimport successIcon from \"../../assets/success-icon.svg\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { IcAlertVariants } from \"./ic-alert.types\";\nimport { isSlotUsed } from \"../../utils/helpers\";\nimport { IcThemeForegroundEnum } from \"../../utils/types\";\n\nconst icon = {\n neutral: neutralIcon,\n info: infoIcon,\n warning: warningIcon,\n error: errorIcon,\n success: successIcon,\n};\n\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n @Element() el: HTMLIcAlertElement;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant?: IcAlertVariants = \"neutral\";\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading?: string = \"\";\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n /**\n * If `true`, the title and message will appear inline instead of above and below.\n */\n @Prop() titleAbove?: boolean = false;\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced?: boolean = true;\n\n @State() visible: boolean = true;\n\n @State() alertTitleWrap: boolean = false;\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n /**\n * @deprecated This event should not be used anymore. Use icDismiss instead.\n */\n @Event() dismiss: EventEmitter<void>;\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n\n private alertTitleShouldWrap() {\n const titleHeight =\n this.el.shadowRoot.querySelector(\".alert-title\")?.clientHeight;\n if (titleHeight > 24) this.alertTitleWrap = true;\n }\n\n componentDidLoad(): void {\n this.alertTitleShouldWrap();\n }\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n } = this;\n\n return (\n visible && (\n <Host\n role={announced && \"alert\"}\n class={{\n [IcThemeForegroundEnum.Dark]: true,\n }}\n >\n <div\n class={{\n [\"container\"]: true,\n [`container-${variant}`]: true,\n }}\n >\n <div class=\"alert-icon-container\">\n <div\n class={{\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n }}\n ></div>\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={icon[variant]}\n ></span>\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n [\"alert-message\"]: true,\n [\"alert-message-title-above\"]:\n titleAbove || this.alertTitleWrap,\n }}\n >\n {heading && (\n <ic-typography\n class={{\n [\"alert-title\"]: true,\n [\"alert-title-above\"]: titleAbove || this.alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{\n [\"svg-container\"]: true,\n [\"dismiss-icon\"]: true,\n }}\n innerHTML={closeIcon}\n onClick={this.dismissAction}\n variant=\"icon\"\n appearance={IcThemeForegroundEnum.Dark}\n title=\"dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as i,c as e,h as t,g as o}from"./p-f9370be6.js";import{a,i as s}from"./p-23831891.js";import"./p-6f57b13c.js";const n=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM15 13.59L13.59 15L10 11.41L6.41 15L5 13.59L8.59 10L5 6.41L6.41 5L10 8.59L13.59 5L15 6.41L11.41 10L15 13.59Z" fill="currentColor"/>\n</svg>\n`;const r='/*! 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}.chip{display:flex;padding:var(--ic-space-xxs);font-size:14px;border-radius:80px;text-align:center;align-items:center;text-decoration:none;transition:var(--ic-easing-transition-fast);position:relative}.chip.small{padding:var(--ic-space-xxxs)}.chip.large{padding:var(--ic-space-xs)}.label{padding:0 var(--ic-space-xs)}.chip.hovered:not(:focus-within){background-color:var(--ic-architectural-300)}.chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}.chip.outline.hovered:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}ic-tooltip:focus-within{z-index:1}.filled{background-color:var(--ic-architectural-200);color:black;border:none}.filled.disabled{background-color:var(--ic-architectural-100)}.outline{color:var(--ic-architectural-900);border:1px solid var(--ic-architectural-900);padding:calc(var(--ic-space-xxs) - 1px)}.outline.small{padding:calc(var(--ic-space-xxxs) - 1px)}.outline.large{padding:calc(var(--ic-space-xs) - 1px)}.outline.disabled{border:var(--ic-border-disabled);background:none}.chip.disabled ic-typography{color:var(--ic-architectural-200)}.dismiss-icon{border:none;border-radius:50%;padding:0;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:20px}.dismiss-icon:focus{outline:var(--ic-hc-focus-outline)}.dismiss-icon[disabled]{pointer-events:none;color:var(--ic-architectural-200)}.icon{padding:var(--ic-space-xxxs);box-sizing:border-box}.icon,ic-tooltip{width:var(--ic-space-lg);height:var(--ic-space-lg)}.chip.disabled path,.chip.disabled ::slotted(svg){fill:var(--ic-architectural-200)}@media (forced-colors: active){.chip{border:var(--ic-hc-border)}.filled.small{padding:calc(var(--ic-space-xxxs) - 1px)}.filled{padding:calc(var(--ic-space-xxxs) + 1px)}.filled.large{padding:calc(var(--ic-space-xs) - 1px)}.chip.disabled{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.chip.disabled ic-typography{color:GrayText}.chip.disabled path,.chip.disabled ::slotted(svg){fill:GrayText}.chip:focus-within{outline:none;border-color:Highlight}}';const c=class{constructor(t){i(this,t);this.dismiss=e(this,"dismiss",7);this.dismissAction=()=>{this.dismiss.emit()};this.mouseEnterHandler=()=>{this.isHovered=true};this.mouseLeaveHandler=()=>{this.isHovered=false};this.label=undefined;this.appearance="filled";this.size="default";this.dismissible=false;this.disabled=false;this.visible=true;this.isHovered=false}handleClick(){this.visible=!this.visible}componentDidLoad(){var i;this.dismissible&&((i=this.el.shadowRoot.querySelector("span.ic-tooltip-label"))===null||i===void 0?void 0:i.setAttribute("aria-hidden","true"));a([{prop:this.label,propName:"label"}],"Chip")}render(){const{label:i,appearance:e,size:o,dismissible:a,visible:r,disabled:c,isHovered:l}=this;return r&&t("div",{class:{["chip"]:true,[`${e}`]:true,[`${o}`]:true,["disabled"]:c,["dismissible"]:a,["hovered"]:l}},s(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("ic-typography",{variant:"label","apply-vertical-margins":false,class:"label"},t("span",null,i)),a&&t("ic-tooltip",{label:"Dismiss",target:"dismiss-icon",class:{["tooltip-disabled"]:c}},t("button",{id:"dismiss-icon",class:{["dismiss-icon"]:true},"aria-label":`Dismiss ${i} chip`,disabled:c,tabindex:c?-1:0,onClick:this.dismissAction,onMouseEnter:this.mouseEnterHandler,onMouseLeave:this.mouseLeaveHandler,innerHTML:n})))}get el(){return o(this)}};c.style=r;export{c as ic_chip};
2
- //# sourceMappingURL=p-fbde8a26.entry.js.map
1
+ import{r as i,c as e,h as t,g as o}from"./p-f9370be6.js";import{a,i as s}from"./p-a8ac8f72.js";import"./p-6f57b13c.js";const n=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM15 13.59L13.59 15L10 11.41L6.41 15L5 13.59L8.59 10L5 6.41L6.41 5L10 8.59L13.59 5L15 6.41L11.41 10L15 13.59Z" fill="currentColor"/>\n</svg>\n`;const r='/*! 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}.chip{display:flex;padding:var(--ic-space-xxs);font-size:14px;border-radius:80px;text-align:center;align-items:center;text-decoration:none;transition:var(--ic-easing-transition-fast);position:relative}.chip.small{padding:var(--ic-space-xxxs)}.chip.large{padding:var(--ic-space-xs)}.label{padding:0 var(--ic-space-xs)}.chip.hovered:not(:focus-within){background-color:var(--ic-architectural-300)}.chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}.chip.outline.hovered:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}ic-tooltip:focus-within{z-index:1}.filled{background-color:var(--ic-architectural-200);color:black;border:none}.filled.disabled{background-color:var(--ic-architectural-100)}.outline{color:var(--ic-architectural-900);border:1px solid var(--ic-architectural-900);padding:calc(var(--ic-space-xxs) - 1px)}.outline.small{padding:calc(var(--ic-space-xxxs) - 1px)}.outline.large{padding:calc(var(--ic-space-xs) - 1px)}.outline.disabled{border:var(--ic-border-disabled);background:none}.chip.disabled ic-typography{color:var(--ic-architectural-200)}.dismiss-icon{border:none;border-radius:50%;padding:0;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:20px}.dismiss-icon:focus{outline:var(--ic-hc-focus-outline)}.dismiss-icon[disabled]{pointer-events:none;color:var(--ic-architectural-200)}.icon{padding:var(--ic-space-xxxs);box-sizing:border-box}.icon,ic-tooltip{width:var(--ic-space-lg);height:var(--ic-space-lg)}.chip.disabled path,.chip.disabled ::slotted(svg){fill:var(--ic-architectural-200)}@media (forced-colors: active){.chip{border:var(--ic-hc-border)}.filled.small{padding:calc(var(--ic-space-xxxs) - 1px)}.filled{padding:calc(var(--ic-space-xxxs) + 1px)}.filled.large{padding:calc(var(--ic-space-xs) - 1px)}.chip.disabled{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.chip.disabled ic-typography{color:GrayText}.chip.disabled path,.chip.disabled ::slotted(svg){fill:GrayText}.chip:focus-within{outline:none;border-color:Highlight}}';const c=class{constructor(t){i(this,t);this.dismiss=e(this,"dismiss",7);this.dismissAction=()=>{this.dismiss.emit()};this.mouseEnterHandler=()=>{this.isHovered=true};this.mouseLeaveHandler=()=>{this.isHovered=false};this.label=undefined;this.appearance="filled";this.size="default";this.dismissible=false;this.disabled=false;this.visible=true;this.isHovered=false}handleClick(){this.visible=!this.visible}componentDidLoad(){var i;this.dismissible&&((i=this.el.shadowRoot.querySelector("span.ic-tooltip-label"))===null||i===void 0?void 0:i.setAttribute("aria-hidden","true"));a([{prop:this.label,propName:"label"}],"Chip")}render(){const{label:i,appearance:e,size:o,dismissible:a,visible:r,disabled:c,isHovered:l}=this;return r&&t("div",{class:{["chip"]:true,[`${e}`]:true,[`${o}`]:true,["disabled"]:c,["dismissible"]:a,["hovered"]:l}},s(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("ic-typography",{variant:"label","apply-vertical-margins":false,class:"label"},t("span",null,i)),a&&t("ic-tooltip",{label:"Dismiss",target:"dismiss-icon",class:{["tooltip-disabled"]:c}},t("button",{id:"dismiss-icon",class:{["dismiss-icon"]:true},"aria-label":`Dismiss ${i} chip`,disabled:c,tabindex:c?-1:0,onClick:this.dismissAction,onMouseEnter:this.mouseEnterHandler,onMouseLeave:this.mouseLeaveHandler,innerHTML:n})))}get el(){return o(this)}};c.style=r;export{c as ic_chip};
2
+ //# sourceMappingURL=p-2ca96f69.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/ic-chip/ic-chip.css?tag=ic-chip&encapsulation=shadow","src/components/ic-chip/ic-chip.tsx"],"names":["icChipCss","Chip","this","dismissAction","dismiss","emit","mouseEnterHandler","isHovered","mouseLeaveHandler","[object Object]","visible","dismissible","_a","el","shadowRoot","querySelector","setAttribute","onComponentRequiredPropUndefined","prop","label","propName","appearance","size","disabled","h","class","isSlotUsed","name","variant","apply-vertical-margins","target","id","aria-label","tabindex","onClick","onMouseEnter","onMouseLeave","innerHTML","dismissIcon"],"mappings":"qdAAA,MAAMA,EAAY,65ICyBLC,EAAI,gEAqCPC,KAAAC,cAAgB,KACtBD,KAAKE,QAAQC,QAGPH,KAAAI,kBAAoB,KAC1BJ,KAAKK,UAAY,MAGXL,KAAAM,kBAAoB,KAC1BN,KAAKK,UAAY,4CApCqB,mBAIX,2BAIG,oBAIH,mBAED,oBAEE,MAG9BE,cACEP,KAAKQ,SAAWR,KAAKQ,QAmBvBD,yBACEP,KAAKS,eACHC,EAAAV,KAAKW,GAAGC,WACLC,cAAc,4BAAwB,MAAAH,SAAA,OAAA,EAAAA,EACrCI,aAAa,cAAe,SAClCC,EACE,CAAC,CAAEC,KAAMhB,KAAKiB,MAAOC,SAAU,UAC/B,QAIJX,SACE,MAAMU,MACJA,EAAKE,WACLA,EAAUC,KACVA,EAAIX,YACJA,EAAWD,QACXA,EAAOa,SACPA,EAAQhB,UACRA,GACEL,KAEJ,OACEQ,GACEc,EAAA,MAAA,CACEC,MAAO,CACLhB,CAAC,QAAS,KACVA,CAAC,GAAGY,KAAe,KACnBZ,CAAC,GAAGa,KAAS,KACbb,CAAC,YAAac,EACdd,CAAC,eAAgBE,EACjBF,CAAC,WAAYF,IAGdmB,EAAWxB,KAAKW,GAAI,SACnBW,EAAA,MAAA,CAAKC,MAAM,QACTD,EAAA,OAAA,CAAMG,KAAK,UAGfH,EAAA,gBAAA,CACEI,QAAQ,QAAOC,yBACS,MACxBJ,MAAM,SAEND,EAAA,OAAA,KAAOL,IAERR,GACCa,EAAA,aAAA,CACEL,MAAM,UACNW,OAAO,eACPL,MAAO,CAAEhB,CAAC,oBAAqBc,IAE/BC,EAAA,SAAA,CACEO,GAAG,eACHN,MAAO,CACLhB,CAAC,gBAAiB,MACnBuB,aACW,WAAWb,SACvBI,SAAUA,EACVU,SAAUV,GAAY,EAAI,EAC1BW,QAAShC,KAAKC,cACdgC,aAAcjC,KAAKI,kBACnB8B,aAAclC,KAAKM,kBACnB6B,UAAWC","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n display: inline-block;\n}\n\n.chip {\n display: flex;\n padding: var(--ic-space-xxs);\n font-size: 14px;\n border-radius: 80px;\n text-align: center;\n align-items: center;\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n}\n\n.chip.small {\n padding: var(--ic-space-xxxs);\n}\n\n.chip.large {\n padding: var(--ic-space-xs);\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip.hovered:not(:focus-within) {\n background-color: var(--ic-architectural-300);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n.chip.outline.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n background-color: var(--ic-architectural-200);\n color: black;\n border: none;\n}\n\n.filled.disabled {\n background-color: var(--ic-architectural-100);\n}\n\n.outline {\n color: var(--ic-architectural-900);\n border: 1px solid var(--ic-architectural-900);\n padding: calc(var(--ic-space-xxs) - 1px);\n}\n\n.outline.small {\n padding: calc(var(--ic-space-xxxs) - 1px);\n}\n\n.outline.large {\n padding: calc(var(--ic-space-xs) - 1px);\n}\n\n.outline.disabled {\n border: var(--ic-border-disabled);\n background: none;\n}\n\n.chip.disabled ic-typography {\n color: var(--ic-architectural-200);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: 20px;\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-architectural-200);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-architectural-200);\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-hc-border);\n }\n\n .filled.small {\n padding: calc(var(--ic-space-xxxs) - 1px);\n }\n\n .filled {\n padding: calc(var(--ic-space-xxxs) + 1px);\n }\n\n .filled.large {\n padding: calc(var(--ic-space-xs) - 1px);\n }\n\n .chip.disabled {\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Element,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n} from \"../../utils/helpers\";\nimport { IcChipAppearance, IcChipSizes } from \"./ic-chip.types\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n */\n@Component({\n tag: \"ic-chip\",\n styleUrl: \"ic-chip.css\",\n shadow: true,\n})\nexport class Chip {\n @Element() el: HTMLIcChipElement;\n\n /**\n * The text rendered within the chip.\n */\n @Prop() label!: string;\n /**\n * The emphasis of the chip.\n */\n @Prop() appearance?: IcChipAppearance = \"filled\";\n /**\n * The size of the chip.\n */\n @Prop() size?: IcChipSizes = \"default\";\n /**\n * If `true`, the chip will have a close button at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n /**\n * If `true`, the chip will appear disabled.\n */\n @Prop() disabled?: boolean = false;\n\n @State() visible: boolean = true;\n\n @State() isHovered: boolean = false;\n\n @Listen(\"dismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n /**\n * Is emitted when the user dismisses the chip.\n */\n @Event() dismiss: EventEmitter<void>;\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n };\n\n private mouseEnterHandler = (): void => {\n this.isHovered = true;\n };\n\n private mouseLeaveHandler = (): void => {\n this.isHovered = false;\n };\n\n componentDidLoad(): void {\n this.dismissible &&\n this.el.shadowRoot\n .querySelector(\"span.ic-tooltip-label\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Chip\"\n );\n }\n\n render() {\n const {\n label,\n appearance,\n size,\n dismissible,\n visible,\n disabled,\n isHovered,\n } = this;\n\n return (\n visible && (\n <div\n class={{\n [\"chip\"]: true,\n [`${appearance}`]: true,\n [`${size}`]: true,\n [\"disabled\"]: disabled,\n [\"dismissible\"]: dismissible,\n [\"hovered\"]: isHovered,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"label\"\n apply-vertical-margins={false}\n class=\"label\"\n >\n <span>{label}</span>\n </ic-typography>\n {dismissible && (\n <ic-tooltip\n label=\"Dismiss\"\n target=\"dismiss-icon\"\n class={{ [\"tooltip-disabled\"]: disabled }}\n >\n <button\n id=\"dismiss-icon\"\n class={{\n [\"dismiss-icon\"]: true,\n }}\n aria-label={`Dismiss ${label} chip`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n onClick={this.dismissAction}\n onMouseEnter={this.mouseEnterHandler}\n onMouseLeave={this.mouseLeaveHandler}\n innerHTML={dismissIcon}\n ></button>\n </ic-tooltip>\n )}\n </div>\n )\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/ic-chip/ic-chip.css?tag=ic-chip&encapsulation=shadow","src/components/ic-chip/ic-chip.tsx"],"names":["icChipCss","Chip","this","dismissAction","dismiss","emit","mouseEnterHandler","isHovered","mouseLeaveHandler","[object Object]","visible","dismissible","_a","el","shadowRoot","querySelector","setAttribute","onComponentRequiredPropUndefined","prop","label","propName","appearance","size","disabled","h","class","isSlotUsed","name","variant","apply-vertical-margins","target","id","aria-label","tabindex","onClick","onMouseEnter","onMouseLeave","innerHTML","dismissIcon"],"mappings":"qdAAA,MAAMA,EAAY,65ICyBLC,EAAI,gEAqCPC,KAAAC,cAAgB,KACtBD,KAAKE,QAAQC,QAGPH,KAAAI,kBAAoB,KAC1BJ,KAAKK,UAAY,MAGXL,KAAAM,kBAAoB,KAC1BN,KAAKK,UAAY,4CApCqB,mBAIX,2BAIG,oBAIH,mBAED,oBAEE,MAG9BE,cACEP,KAAKQ,SAAWR,KAAKQ,QAmBvBD,yBACEP,KAAKS,eACHC,EAAAV,KAAKW,GAAGC,WACLC,cAAc,4BAAwB,MAAAH,SAAA,OAAA,EAAAA,EACrCI,aAAa,cAAe,SAClCC,EACE,CAAC,CAAEC,KAAMhB,KAAKiB,MAAOC,SAAU,UAC/B,QAIJX,SACE,MAAMU,MACJA,EAAKE,WACLA,EAAUC,KACVA,EAAIX,YACJA,EAAWD,QACXA,EAAOa,SACPA,EAAQhB,UACRA,GACEL,KAEJ,OACEQ,GACEc,EAAA,MAAA,CACEC,MAAO,CACLhB,CAAC,QAAS,KACVA,CAAC,GAAGY,KAAe,KACnBZ,CAAC,GAAGa,KAAS,KACbb,CAAC,YAAac,EACdd,CAAC,eAAgBE,EACjBF,CAAC,WAAYF,IAGdmB,EAAWxB,KAAKW,GAAI,SACnBW,EAAA,MAAA,CAAKC,MAAM,QACTD,EAAA,OAAA,CAAMG,KAAK,UAGfH,EAAA,gBAAA,CACEI,QAAQ,QAAOC,yBACS,MACxBJ,MAAM,SAEND,EAAA,OAAA,KAAOL,IAERR,GACCa,EAAA,aAAA,CACEL,MAAM,UACNW,OAAO,eACPL,MAAO,CAAEhB,CAAC,oBAAqBc,IAE/BC,EAAA,SAAA,CACEO,GAAG,eACHN,MAAO,CACLhB,CAAC,gBAAiB,MACnBuB,aACW,WAAWb,SACvBI,SAAUA,EACVU,SAAUV,GAAY,EAAI,EAC1BW,QAAShC,KAAKC,cACdgC,aAAcjC,KAAKI,kBACnB8B,aAAclC,KAAKM,kBACnB6B,UAAWC","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n}\n\n.chip {\n display: flex;\n padding: var(--ic-space-xxs);\n font-size: 14px;\n border-radius: 80px;\n text-align: center;\n align-items: center;\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n}\n\n.chip.small {\n padding: var(--ic-space-xxxs);\n}\n\n.chip.large {\n padding: var(--ic-space-xs);\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip.hovered:not(:focus-within) {\n background-color: var(--ic-architectural-300);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n.chip.outline.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n background-color: var(--ic-architectural-200);\n color: black;\n border: none;\n}\n\n.filled.disabled {\n background-color: var(--ic-architectural-100);\n}\n\n.outline {\n color: var(--ic-architectural-900);\n border: 1px solid var(--ic-architectural-900);\n padding: calc(var(--ic-space-xxs) - 1px);\n}\n\n.outline.small {\n padding: calc(var(--ic-space-xxxs) - 1px);\n}\n\n.outline.large {\n padding: calc(var(--ic-space-xs) - 1px);\n}\n\n.outline.disabled {\n border: var(--ic-border-disabled);\n background: none;\n}\n\n.chip.disabled ic-typography {\n color: var(--ic-architectural-200);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: 20px;\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-architectural-200);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-architectural-200);\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-hc-border);\n }\n\n .filled.small {\n padding: calc(var(--ic-space-xxxs) - 1px);\n }\n\n .filled {\n padding: calc(var(--ic-space-xxxs) + 1px);\n }\n\n .filled.large {\n padding: calc(var(--ic-space-xs) - 1px);\n }\n\n .chip.disabled {\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Element,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n} from \"../../utils/helpers\";\nimport { IcChipAppearance, IcChipSizes } from \"./ic-chip.types\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n */\n@Component({\n tag: \"ic-chip\",\n styleUrl: \"ic-chip.css\",\n shadow: true,\n})\nexport class Chip {\n @Element() el: HTMLIcChipElement;\n\n /**\n * The text rendered within the chip.\n */\n @Prop() label!: string;\n /**\n * The emphasis of the chip.\n */\n @Prop() appearance?: IcChipAppearance = \"filled\";\n /**\n * The size of the chip.\n */\n @Prop() size?: IcChipSizes = \"default\";\n /**\n * If `true`, the chip will have a close button at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n /**\n * If `true`, the chip will appear disabled.\n */\n @Prop() disabled?: boolean = false;\n\n @State() visible: boolean = true;\n\n @State() isHovered: boolean = false;\n\n @Listen(\"dismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n /**\n * Is emitted when the user dismisses the chip.\n */\n @Event() dismiss: EventEmitter<void>;\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n };\n\n private mouseEnterHandler = (): void => {\n this.isHovered = true;\n };\n\n private mouseLeaveHandler = (): void => {\n this.isHovered = false;\n };\n\n componentDidLoad(): void {\n this.dismissible &&\n this.el.shadowRoot\n .querySelector(\"span.ic-tooltip-label\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Chip\"\n );\n }\n\n render() {\n const {\n label,\n appearance,\n size,\n dismissible,\n visible,\n disabled,\n isHovered,\n } = this;\n\n return (\n visible && (\n <div\n class={{\n [\"chip\"]: true,\n [`${appearance}`]: true,\n [`${size}`]: true,\n [\"disabled\"]: disabled,\n [\"dismissible\"]: dismissible,\n [\"hovered\"]: isHovered,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"label\"\n apply-vertical-margins={false}\n class=\"label\"\n >\n <span>{label}</span>\n </ic-typography>\n {dismissible && (\n <ic-tooltip\n label=\"Dismiss\"\n target=\"dismiss-icon\"\n class={{ [\"tooltip-disabled\"]: disabled }}\n >\n <button\n id=\"dismiss-icon\"\n class={{\n [\"dismiss-icon\"]: true,\n }}\n aria-label={`Dismiss ${label} chip`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n onClick={this.dismissAction}\n onMouseEnter={this.mouseEnterHandler}\n onMouseLeave={this.mouseLeaveHandler}\n innerHTML={dismissIcon}\n ></button>\n </ic-tooltip>\n )}\n </div>\n )\n );\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as e,H as s,g as a}from"./p-f9370be6.js";import{w as n,v as o,m as l,d as r,a as h,r as c,e as d,h as u,j as p,x as b,n as f}from"./p-a8ac8f72.js";import{I as v,a as m}from"./p-6f57b13c.js";const g=`<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />\n</svg>\n`;const x=`<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n<path d="M12.6666 4.27334L11.7266 3.33334L7.99998 7.06001L4.27331 3.33334L3.33331 4.27334L7.05998 8.00001L3.33331 11.7267L4.27331 12.6667L7.99998 8.94001L11.7266 12.6667L12.6666 11.7267L8.93998 8.00001L12.6666 4.27334Z" fill="currentColor" />\n</svg>\n`;const w='/*! 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{width:100%}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:var(--ic-hc-focus-outline)}: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(--ic-action-dark)}: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([small]) .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([small]) .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}';let y=0;const k=class{constructor(e){t(this,e);this.icChange=i(this,"icChange",7);this.icFocus=i(this,"icFocus",7);this.icBlur=i(this,"icBlur",7);this.inputId=`ic-select-input-${y++}`;this.menuId=`${this.inputId}-menu`;this.inheritedAttributes={};this.isMenuEnabled=()=>(this.searchableSelectInputValue===null||this.searchableSelectInputValue==="")&&this.charactersUntilSuggestions===0||this.searchableSelectInputValue&&this.searchableSelectInputValue.length>=this.charactersUntilSuggestions;this.setOptionsValuesFromLabels=()=>{if(this.options.length>0){this.options.map((t=>{if(!t.value){t.value=t.label}}))}};this.setTextColor=()=>{if(this.nativeSelectElement.selectedIndex===0){this.nativeSelectElement.className="placeholder"}else{this.nativeSelectElement.className="select-option-selected"}};this.setMenuChange=t=>{if(this.open!==t){this.open=t}};this.getLabelFromValue=t=>n(t,this.options);this.getValueFromLabel=t=>{var i;const e=(i=this.options.find((i=>i.label===t)))===null||i===void 0?void 0:i.value;return e};this.getFilteredChildMenuOptions=t=>{let i=t.children;i=o(t.children,this.includeDescriptionsInSearch,this.searchableSelectInputValue,this.searchMatchPosition);const e=Object.assign({},t);e.children=i;return e};this.handleNativeSelectChange=()=>{this.icChange.emit({value:this.nativeSelectElement.value});this.setTextColor()};this.handleCustomSelectChange=t=>{if(this.searchable&&t.detail.label===this.emptyOptionListText){this.searchableSelectElement.focus();return}if(this.searchable){this.searchableSelectInputValue=this.getLabelFromValue(t.detail.value)}this.ariaActiveDescendant=t.detail.optionId;this.icChange.emit({value:t.detail.value})};this.handleMenuChange=t=>{this.open=t.detail.open;this.searchable&&this.handleFocusIndicatorDisplay()};this.handleFocusIndicatorDisplay=()=>{const t=this.host.shadowRoot.querySelector(".focus-indicator");if(this.open){t.classList.add("focus-indicator-enabled")}else{t.classList.remove("focus-indicator-enabled")}};this.handleMouseDown=t=>{if(!this.open){t.preventDefault()}};this.handleClick=t=>{this.noOptions=null;this.menu.options=this.options;if(t.detail!==0&&this.isMenuEnabled()){this.menu.handleClickOpen()}};this.handleExpandIconMouseDown=t=>{if(!this.disabled){t.preventDefault();this.searchableSelectElement.focus();this.handleClick(t)}};this.handleClear=t=>{t.stopPropagation();this.noOptions=null;this.icChange.emit({value:null});if(this.searchable){this.searchableSelectElement.value=null;this.searchableSelectInputValue=null;this.menu.options=this.options;this.searchableSelectElement.focus();if(!this.isMenuEnabled()){this.setMenuChange(false)}}else{this.customSelectElement.focus()}};this.handleKeyDown=t=>{t.cancelBubble=true;if(!this.open){this.noOptions=null;this.menu.options=this.options}if(this.open&&t.key==="Enter"){this.setMenuChange(false)}else{if(!((t.key==="ArrowDown"||t.key==="ArrowUp")&&this.noOptions!==null)&&this.isMenuEnabled()){this.menu.handleKeyboardOpen(t)}}};this.handleClearButtonFocus=()=>{this.clearButtonFocused=true};this.handleClearButtonBlur=()=>{this.clearButtonFocused=false};this.handleSearchableSelectInput=t=>{this.searchableSelectInputValue=t.target.value;if(this.getValueFromLabel(this.searchableSelectInputValue)===undefined){this.icChange.emit({value:null})}if(this.isMenuEnabled()){this.setMenuChange(true)}else{this.setMenuChange(false)}const i=[...this.options];let e=false;let s=[];i.map((t=>{if(t.children)e=true}));const a=o(i,this.includeDescriptionsInSearch,this.searchableSelectInputValue,this.searchMatchPosition);if(!e){s=a}else{i.map((t=>{if(this.includeGroupTitlesInSearch){if(a.indexOf(t)!==-1){s.push(t)}else{s.push(this.getFilteredChildMenuOptions(t))}}else{s.push(this.getFilteredChildMenuOptions(t))}}))}let n=false;if(e){n=true;s.map((t=>{if(t.children.length>0){n=false}}))}const l=[{label:this.emptyOptionListText,value:""}];if(s.length>0&&!n){this.noOptions=null;this.filteredOptions=s}else{this.noOptions=l;this.filteredOptions=this.noOptions}this.debounceAriaLiveUpdate()};this.updateSearchableSelectResultAriaLive=()=>{const t=this.host.shadowRoot.querySelector(".searchable-select-results-status");if(this.noOptions!==null){t.innerText=this.emptyOptionListText}else{t.innerText=""}};this.onFocus=()=>{this.icFocus.emit()};this.onBlur=t=>{if(this.searchable&&t.relatedTarget!==this.menu&&!(this.clearButton&&t.relatedTarget===this.clearButton)){this.setMenuChange(false);this.handleFocusIndicatorDisplay()}this.icBlur.emit()};this.handleFormReset=()=>{this.value=this.initialValue;if(this.searchable){this.searchableSelectInputValue=null}};this.label=undefined;this.options=[];this.required=false;this.hideLabel=false;this.disabled=false;this.readonly=false;this.placeholder="Select an option";this.helperText="";this.small=false;this.fullWidth=false;this.validationStatus="";this.validationText="";this.value=undefined;this.name=this.inputId;this.showClearButton=false;this.searchable=false;this.includeDescriptionsInSearch=false;this.includeGroupTitlesInSearch=false;this.searchMatchPosition="anywhere";this.charactersUntilSuggestions=0;this.emptyOptionListText="No results found";this.open=false;this.clearButtonFocused=false;this.searchableSelectInputValue=null;this.filteredOptions=this.options;this.ariaActiveDescendant=undefined;this.noOptions=null;this.initialValue=this.value}watchOptionsHandler(){this.setOptionsValuesFromLabels();this.filteredOptions=this.options}async setFocus(){if(this.nativeSelectElement){this.nativeSelectElement.focus()}else if(this.customSelectElement){this.customSelectElement.focus()}else if(this.searchableSelectElement){this.searchableSelectElement.focus()}}debounceAriaLiveUpdate(){clearTimeout(this.debounce);window.setTimeout((()=>{this.updateSearchableSelectResultAriaLive()}),800)}componentWillLoad(){this.inheritedAttributes=l(this.host,[...f,"tabindex","title"]);this.setOptionsValuesFromLabels();r(this.host,this.handleFormReset)}componentDidRender(){if(this.nativeSelectElement&&!this.disabled){this.setTextColor()}}componentDidLoad(){h([{prop:this.label,propName:"label"}],"Select")}disconnectedCallback(){c(this.host,this.handleFormReset)}render(){const{small:t,disabled:i,fullWidth:a,helperText:n,hideLabel:o,label:l,menuId:r,name:h,options:c,placeholder:f,readonly:w,required:y,searchable:k,showClearButton:z,validationStatus:L,validationText:M,value:C}=this;d(true,this.host,h,C,i);const B=L===m.Error?"true":"false";const H=u(this.inputId,n!=="",p(this.validationStatus,this.disabled)).trim();return e(s,null,e("ic-input-container",{readonly:w},!o&&e("ic-input-label",{for:this.inputId,label:l,helperText:n,required:y,disabled:i,readonly:w}),e("ic-input-component-container",{ref:t=>this.anchorEl=t,class:{"menu-open":this.open},small:t,fullWidth:a,disabled:i,readonly:w,validationStatus:L},w?e("ic-typography",null,e("p",null,this.getLabelFromValue(C))):b()?e("select",Object.assign({ref:t=>this.nativeSelectElement=t,disabled:i,onChange:this.handleNativeSelectChange,required:y,id:this.inputId,"aria-label":l,"aria-describedby":H,"aria-invalid":B,onBlur:this.onBlur,onFocus:this.onFocus},this.inheritedAttributes),e("option",{value:"",selected:true,disabled:!z},f),c.map((t=>{if(t.children){return e("optgroup",{label:t.label},t.children.map((t=>e("option",{value:t.value,disabled:t.disabled,selected:t.value===C},t.label))))}else{return e("option",{value:t.value,disabled:t.disabled,selected:t.value===C},t.label)}}))):k?e("div",{class:"searchable-select-container"},e("input",{class:"select-input",role:"combobox","aria-label":l,"aria-describedby":H,"aria-activedescendant":this.ariaActiveDescendant,"aria-autocomplete":"list","aria-expanded":this.open?"true":"false","aria-invalid":B,"aria-required":y?"true":"false","aria-controls":r,ref:t=>this.searchableSelectElement=t,id:this.inputId,value:this.searchableSelectInputValue,placeholder:f,disabled:i,onInput:this.handleSearchableSelectInput,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onFocus:this.onFocus,onBlur:this.onBlur}),this.searchableSelectInputValue&&(z||k)&&e("div",{class:"clear-button-container"},e("ic-button",{id:"clear-button",ref:t=>this.clearButton=t,"aria-label":this.searchableSelectInputValue&&C===null?"Clear input":"Clear selection",class:"clear-button",innerHTML:x,onClick:this.handleClear,onFocus:this.handleClearButtonFocus,onBlur:this.handleClearButtonBlur,size:t?"small":"default",variant:"icon",appearance:this.clearButtonFocused?v.Light:v.Dark}),e("div",{class:"divider"})),e("span",{onMouseDown:this.handleExpandIconMouseDown,class:{"expand-icon":true,"expand-icon-open":this.open,"expand-icon-filled":!(C==null||C===""),"expand-icon-disabled":!this.isMenuEnabled()},innerHTML:g,"aria-hidden":"true"}),e("div",{"aria-live":"polite",role:"status",class:"searchable-select-results-status"})):e("div",{class:"select-container"},e("button",{class:"select-input",ref:t=>this.customSelectElement=t,id:this.inputId,"aria-label":`${l}, ${this.getLabelFromValue(C)||f}${y?", required":""}`,"aria-describedby":H,"aria-invalid":B,"aria-haspopup":"listbox","aria-expanded":this.open?"true":"false","aria-owns":r,"aria-controls":r,disabled:i,onBlur:this.onBlur,onFocus:this.onFocus,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown},e("ic-typography",{variant:"body",class:{"value-text":true,placeholder:this.getLabelFromValue(C)===undefined}},e("p",null,this.getLabelFromValue(C)||f)),e("div",{class:"select-input-end"},C&&z&&e("div",{class:"divider"}),e("span",{class:{"expand-icon":true,"expand-icon-open":this.open,"expand-icon-filled":!(C==null||C==="")},innerHTML:g,"aria-hidden":"true"}))),C&&z&&e("ic-button",{id:"clear-button","aria-label":"Clear selection",class:"clear-button",innerHTML:x,onClick:this.handleClear,onFocus:this.handleClearButtonFocus,onBlur:this.handleClearButtonBlur,size:t?"small":"default",variant:"icon",appearance:this.clearButtonFocused?v.Light:v.Dark}))),!b()&&e("ic-menu",{class:{"no-results":this.noOptions!==null},ref:t=>this.menu=t,inputEl:k?this.searchableSelectElement:this.customSelectElement,inputLabel:l,anchorEl:this.anchorEl,small:t,menuId:r,open:this.open,options:k?this.filteredOptions:c,value:C,fullWidth:a,onIcMenuStateChange:this.handleMenuChange,onIcOptionSelect:this.handleCustomSelectChange,parentEl:this.host}),p(this.validationStatus,this.disabled)&&e("ic-input-validation",{class:{"menu-open":this.open},ariaLiveMode:"polite",status:L,message:M,for:this.inputId})))}get host(){return a(this)}static get watchers(){return{options:["watchOptionsHandler"]}}};k.style=w;export{k as ic_select};
2
+ //# sourceMappingURL=p-3efa7f8b.entry.js.map