@ukic/web-components 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (328) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-498eb0e2.js → helpers-0d63359f.js} +36 -105
  3. package/dist/cjs/helpers-0d63359f.js.map +1 -0
  4. package/dist/cjs/ic-accordion.cjs.entry.js +5 -3
  5. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-badge.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-checkbox-group.cjs.entry.js +8 -1
  15. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -10
  17. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-dialog.cjs.entry.js +5 -4
  21. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  23. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +4 -3
  29. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-pagination.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-select.cjs.entry.js +18 -15
  47. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  49. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  51. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-switch.cjs.entry.js +7 -1
  53. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-tab-group.cjs.entry.js +2 -2
  55. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  57. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-text-field.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-toast-region.cjs.entry.js +20 -8
  61. package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-toast.cjs.entry.js +6 -5
  63. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  66. package/dist/cjs/loader.cjs.js +1 -1
  67. package/dist/collection/components/ic-accordion/ic-accordion.js +4 -2
  68. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  69. package/dist/collection/components/ic-badge/ic-badge.js +3 -0
  70. package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
  71. package/dist/collection/components/ic-checkbox/ic-checkbox.js +0 -9
  72. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  73. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +13 -0
  74. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  75. package/dist/collection/components/ic-dialog/ic-dialog.css +2 -1
  76. package/dist/collection/components/ic-dialog/ic-dialog.js +21 -2
  77. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  78. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js +16 -0
  79. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js.map +1 -1
  80. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +24 -2
  81. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
  82. package/dist/collection/components/ic-select/ic-select.css +1 -0
  83. package/dist/collection/components/ic-select/ic-select.js +16 -13
  84. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  85. package/dist/collection/components/ic-select/test/basic/ic-select.e2e.js +24 -0
  86. package/dist/collection/components/ic-select/test/basic/ic-select.e2e.js.map +1 -1
  87. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +10 -2
  88. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  89. package/dist/collection/components/ic-switch/ic-switch.js +9 -0
  90. package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
  91. package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.e2e.js +35 -0
  92. package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.e2e.js.map +1 -1
  93. package/dist/collection/components/ic-tab-group/ic-tab-group.js +1 -1
  94. package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
  95. package/dist/collection/components/ic-toast/ic-toast.js +9 -5
  96. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  97. package/dist/collection/components/ic-toast-region/ic-toast-region.js +53 -17
  98. package/dist/collection/components/ic-toast-region/ic-toast-region.js.map +1 -1
  99. package/dist/collection/components/ic-toast-region/test/basic/ic-toast-region.spec.js +23 -1
  100. package/dist/collection/components/ic-toast-region/test/basic/ic-toast-region.spec.js.map +1 -1
  101. package/dist/collection/utils/helpers.js +35 -104
  102. package/dist/collection/utils/helpers.js.map +1 -1
  103. package/dist/components/helpers.js +35 -104
  104. package/dist/components/helpers.js.map +1 -1
  105. package/dist/components/ic-accordion.js +4 -2
  106. package/dist/components/ic-accordion.js.map +1 -1
  107. package/dist/components/ic-badge.js.map +1 -1
  108. package/dist/components/ic-checkbox-group.js +8 -1
  109. package/dist/components/ic-checkbox-group.js.map +1 -1
  110. package/dist/components/ic-checkbox.js +0 -9
  111. package/dist/components/ic-checkbox.js.map +1 -1
  112. package/dist/components/ic-dialog.js +5 -3
  113. package/dist/components/ic-dialog.js.map +1 -1
  114. package/dist/components/ic-horizontal-scroll2.js +4 -2
  115. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  116. package/dist/components/ic-select.js +17 -14
  117. package/dist/components/ic-select.js.map +1 -1
  118. package/dist/components/ic-switch.js +8 -0
  119. package/dist/components/ic-switch.js.map +1 -1
  120. package/dist/components/ic-tab-group.js +1 -1
  121. package/dist/components/ic-tab-group.js.map +1 -1
  122. package/dist/components/ic-toast-region.js +24 -9
  123. package/dist/components/ic-toast-region.js.map +1 -1
  124. package/dist/components/ic-toast.js +6 -5
  125. package/dist/components/ic-toast.js.map +1 -1
  126. package/dist/core/core.esm.js +1 -1
  127. package/dist/core/core.esm.js.map +1 -1
  128. package/dist/core/{p-e71ec1fe.entry.js → p-025f9d2a.entry.js} +2 -2
  129. package/dist/core/p-025f9d2a.entry.js.map +1 -0
  130. package/dist/core/{p-65715458.entry.js → p-03329fd0.entry.js} +2 -2
  131. package/dist/core/{p-667711a8.entry.js → p-08b59078.entry.js} +2 -2
  132. package/dist/core/{p-f5d1a0d7.entry.js → p-0c82048e.entry.js} +2 -2
  133. package/dist/core/{p-30f9fabc.entry.js → p-0dc4f225.entry.js} +2 -2
  134. package/dist/core/{p-6286ad7b.entry.js → p-12124e24.entry.js} +2 -2
  135. package/dist/core/p-1cf2a6aa.entry.js +2 -0
  136. package/dist/core/p-1cf2a6aa.entry.js.map +1 -0
  137. package/dist/core/{p-7bc6eb83.entry.js → p-2265e418.entry.js} +2 -2
  138. package/dist/core/p-2265e418.entry.js.map +1 -0
  139. package/dist/core/{p-09022de8.entry.js → p-2c30b583.entry.js} +2 -2
  140. package/dist/core/{p-7c913098.entry.js → p-345fe84a.entry.js} +2 -2
  141. package/dist/core/{p-8fc9b82b.entry.js → p-39c8111d.entry.js} +2 -2
  142. package/dist/core/{p-a69c8001.entry.js → p-3a15202f.entry.js} +2 -2
  143. package/dist/core/{p-bb3e7ce5.entry.js → p-3a814fc4.entry.js} +2 -2
  144. package/dist/core/{p-6ce0a089.entry.js → p-3fd897c9.entry.js} +2 -2
  145. package/dist/core/{p-1a5353ed.entry.js → p-41c6eaa1.entry.js} +2 -2
  146. package/dist/core/{p-ae1ed418.entry.js → p-432f8ff0.entry.js} +2 -2
  147. package/dist/core/p-4559600a.entry.js +2 -0
  148. package/dist/core/p-4559600a.entry.js.map +1 -0
  149. package/dist/core/{p-5c722379.entry.js → p-475b7bd2.entry.js} +2 -2
  150. package/dist/core/{p-f2f8e4aa.entry.js → p-59bdafff.entry.js} +2 -2
  151. package/dist/core/{p-9ea62161.entry.js → p-5b487daa.entry.js} +2 -2
  152. package/dist/core/{p-4af7cb4c.entry.js → p-5ca39ed5.entry.js} +2 -2
  153. package/dist/core/{p-0dd70d92.entry.js → p-5fcd202e.entry.js} +2 -2
  154. package/dist/core/p-5fcd202e.entry.js.map +1 -0
  155. package/dist/core/{p-c08b5a9a.entry.js → p-752f0f9a.entry.js} +2 -2
  156. package/dist/core/{p-8ae11ca6.entry.js → p-763d0822.entry.js} +2 -2
  157. package/dist/core/{p-f62c902b.entry.js → p-76563540.entry.js} +2 -2
  158. package/dist/core/{p-500e8584.entry.js → p-7bb3c340.entry.js} +2 -2
  159. package/dist/core/{p-027ea4ff.entry.js → p-88ea1e49.entry.js} +2 -2
  160. package/dist/core/{p-c5b6d645.entry.js → p-8b18346a.entry.js} +2 -2
  161. package/dist/core/p-8b18346a.entry.js.map +1 -0
  162. package/dist/core/p-8fb4f0c0.js +2 -0
  163. package/dist/core/p-8fb4f0c0.js.map +1 -0
  164. package/dist/core/{p-72d6619c.entry.js → p-932fb4b7.entry.js} +2 -2
  165. package/dist/core/{p-5c9457e2.entry.js → p-9ccfb863.entry.js} +2 -2
  166. package/dist/core/{p-4164e7d5.entry.js → p-a4397df4.entry.js} +2 -2
  167. package/dist/core/{p-31236329.entry.js → p-a448d873.entry.js} +2 -2
  168. package/dist/core/{p-3758c2b5.entry.js → p-b0ce60a0.entry.js} +2 -2
  169. package/dist/core/{p-46053a32.entry.js → p-b77ab20a.entry.js} +2 -2
  170. package/dist/core/p-ba495175.entry.js +2 -0
  171. package/dist/core/p-ba495175.entry.js.map +1 -0
  172. package/dist/core/{p-134b407d.entry.js → p-c0c62df4.entry.js} +2 -2
  173. package/dist/core/{p-39db6642.entry.js → p-c36cbd8a.entry.js} +2 -2
  174. package/dist/core/{p-d8022cec.entry.js → p-c9ef9f5c.entry.js} +2 -2
  175. package/dist/core/{p-e465a208.entry.js → p-ccac1730.entry.js} +2 -2
  176. package/dist/core/{p-bb085716.entry.js → p-cf4bacee.entry.js} +2 -2
  177. package/dist/core/{p-f5947c60.entry.js → p-e2903ce9.entry.js} +2 -2
  178. package/dist/core/{p-f5947c60.entry.js.map → p-e2903ce9.entry.js.map} +1 -1
  179. package/dist/core/{p-53533992.entry.js → p-e2fd542e.entry.js} +2 -2
  180. package/dist/core/p-e2fd542e.entry.js.map +1 -0
  181. package/dist/core/{p-09eb825d.entry.js → p-e3bffcae.entry.js} +2 -2
  182. package/dist/core/{p-d4522596.entry.js → p-ea6ad791.entry.js} +2 -2
  183. package/dist/core/p-ea6ad791.entry.js.map +1 -0
  184. package/dist/core/{p-522947f5.entry.js → p-eb063498.entry.js} +2 -2
  185. package/dist/core/{p-c01d43cf.entry.js → p-ec82fa24.entry.js} +2 -2
  186. package/dist/core/{p-78f0118c.entry.js → p-f00e510b.entry.js} +2 -2
  187. package/dist/core/{p-b80520e9.entry.js → p-f019219c.entry.js} +2 -2
  188. package/dist/core/{p-ba25f08a.entry.js → p-f69fb26b.entry.js} +2 -2
  189. package/dist/core/{p-27b46a68.entry.js → p-fbc8a739.entry.js} +2 -2
  190. package/dist/core/p-fe6e0c0e.entry.js +2 -0
  191. package/dist/core/p-fe6e0c0e.entry.js.map +1 -0
  192. package/dist/esm/core.js +1 -1
  193. package/dist/esm/{helpers-c325e537.js → helpers-24f6e762.js} +36 -105
  194. package/dist/esm/helpers-24f6e762.js.map +1 -0
  195. package/dist/esm/ic-accordion.entry.js +5 -3
  196. package/dist/esm/ic-accordion.entry.js.map +1 -1
  197. package/dist/esm/ic-alert.entry.js +1 -1
  198. package/dist/esm/ic-back-to-top.entry.js +1 -1
  199. package/dist/esm/ic-badge.entry.js +1 -1
  200. package/dist/esm/ic-badge.entry.js.map +1 -1
  201. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  202. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  203. package/dist/esm/ic-button_3.entry.js +1 -1
  204. package/dist/esm/ic-card.entry.js +1 -1
  205. package/dist/esm/ic-checkbox-group.entry.js +8 -1
  206. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  207. package/dist/esm/ic-checkbox.entry.js +1 -10
  208. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  209. package/dist/esm/ic-chip.entry.js +1 -1
  210. package/dist/esm/ic-data-row.entry.js +1 -1
  211. package/dist/esm/ic-dialog.entry.js +5 -4
  212. package/dist/esm/ic-dialog.entry.js.map +1 -1
  213. package/dist/esm/ic-divider.entry.js +1 -1
  214. package/dist/esm/ic-empty-state.entry.js +1 -1
  215. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  216. package/dist/esm/ic-footer-link.entry.js +1 -1
  217. package/dist/esm/ic-footer.entry.js +1 -1
  218. package/dist/esm/ic-hero.entry.js +1 -1
  219. package/dist/esm/ic-horizontal-scroll.entry.js +4 -3
  220. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  221. package/dist/esm/ic-input-component-container_3.entry.js +1 -1
  222. package/dist/esm/ic-input-label_2.entry.js +1 -1
  223. package/dist/esm/ic-link.entry.js +1 -1
  224. package/dist/esm/ic-menu-group.entry.js +1 -1
  225. package/dist/esm/ic-menu-item.entry.js +1 -1
  226. package/dist/esm/ic-navigation-button.entry.js +1 -1
  227. package/dist/esm/ic-navigation-group.entry.js +1 -1
  228. package/dist/esm/ic-navigation-item.entry.js +1 -1
  229. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  230. package/dist/esm/ic-page-header.entry.js +1 -1
  231. package/dist/esm/ic-pagination-item.entry.js +1 -1
  232. package/dist/esm/ic-pagination.entry.js +1 -1
  233. package/dist/esm/ic-popover-menu.entry.js +1 -1
  234. package/dist/esm/ic-radio-group.entry.js +1 -1
  235. package/dist/esm/ic-radio-option.entry.js +1 -1
  236. package/dist/esm/ic-search-bar.entry.js +1 -1
  237. package/dist/esm/ic-select.entry.js +18 -15
  238. package/dist/esm/ic-select.entry.js.map +1 -1
  239. package/dist/esm/ic-side-navigation.entry.js +1 -1
  240. package/dist/esm/ic-status-tag.entry.js +1 -1
  241. package/dist/esm/ic-step.entry.js +1 -1
  242. package/dist/esm/ic-stepper.entry.js +1 -1
  243. package/dist/esm/ic-switch.entry.js +7 -1
  244. package/dist/esm/ic-switch.entry.js.map +1 -1
  245. package/dist/esm/ic-tab-group.entry.js +2 -2
  246. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  247. package/dist/esm/ic-tab-panel.entry.js +1 -1
  248. package/dist/esm/ic-tab.entry.js +1 -1
  249. package/dist/esm/ic-text-field.entry.js +1 -1
  250. package/dist/esm/ic-theme.entry.js +1 -1
  251. package/dist/esm/ic-toast-region.entry.js +20 -8
  252. package/dist/esm/ic-toast-region.entry.js.map +1 -1
  253. package/dist/esm/ic-toast.entry.js +6 -5
  254. package/dist/esm/ic-toast.entry.js.map +1 -1
  255. package/dist/esm/ic-top-navigation.entry.js +1 -1
  256. package/dist/esm/ic-typography.entry.js +1 -1
  257. package/dist/esm/loader.js +1 -1
  258. package/dist/types/components/ic-accordion/ic-accordion.d.ts +1 -0
  259. package/dist/types/components/ic-badge/ic-badge.d.ts +3 -0
  260. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +0 -1
  261. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -0
  262. package/dist/types/components/ic-dialog/ic-dialog.d.ts +4 -0
  263. package/dist/types/components/ic-horizontal-scroll/ic-horizontal-scroll.d.ts +4 -0
  264. package/dist/types/components/ic-switch/ic-switch.d.ts +1 -0
  265. package/dist/types/components/ic-toast/ic-toast.d.ts +1 -1
  266. package/dist/types/components/ic-toast-region/ic-toast-region.d.ts +7 -2
  267. package/dist/types/components.d.ts +18 -3
  268. package/dist/types/utils/helpers.d.ts +2 -2
  269. package/hydrate/index.js +109 -148
  270. package/package.json +2 -2
  271. package/dist/cjs/helpers-498eb0e2.js.map +0 -1
  272. package/dist/core/p-0baa2141.entry.js +0 -2
  273. package/dist/core/p-0baa2141.entry.js.map +0 -1
  274. package/dist/core/p-0dd70d92.entry.js.map +0 -1
  275. package/dist/core/p-409e437f.js +0 -2
  276. package/dist/core/p-409e437f.js.map +0 -1
  277. package/dist/core/p-53533992.entry.js.map +0 -1
  278. package/dist/core/p-6991655b.entry.js +0 -2
  279. package/dist/core/p-6991655b.entry.js.map +0 -1
  280. package/dist/core/p-700559ee.entry.js +0 -2
  281. package/dist/core/p-700559ee.entry.js.map +0 -1
  282. package/dist/core/p-7bc6eb83.entry.js.map +0 -1
  283. package/dist/core/p-c5b6d645.entry.js.map +0 -1
  284. package/dist/core/p-d4522596.entry.js.map +0 -1
  285. package/dist/core/p-e71ec1fe.entry.js.map +0 -1
  286. package/dist/core/p-fee7caf1.entry.js +0 -2
  287. package/dist/core/p-fee7caf1.entry.js.map +0 -1
  288. package/dist/esm/helpers-c325e537.js.map +0 -1
  289. /package/dist/core/{p-65715458.entry.js.map → p-03329fd0.entry.js.map} +0 -0
  290. /package/dist/core/{p-667711a8.entry.js.map → p-08b59078.entry.js.map} +0 -0
  291. /package/dist/core/{p-f5d1a0d7.entry.js.map → p-0c82048e.entry.js.map} +0 -0
  292. /package/dist/core/{p-30f9fabc.entry.js.map → p-0dc4f225.entry.js.map} +0 -0
  293. /package/dist/core/{p-6286ad7b.entry.js.map → p-12124e24.entry.js.map} +0 -0
  294. /package/dist/core/{p-09022de8.entry.js.map → p-2c30b583.entry.js.map} +0 -0
  295. /package/dist/core/{p-7c913098.entry.js.map → p-345fe84a.entry.js.map} +0 -0
  296. /package/dist/core/{p-8fc9b82b.entry.js.map → p-39c8111d.entry.js.map} +0 -0
  297. /package/dist/core/{p-a69c8001.entry.js.map → p-3a15202f.entry.js.map} +0 -0
  298. /package/dist/core/{p-bb3e7ce5.entry.js.map → p-3a814fc4.entry.js.map} +0 -0
  299. /package/dist/core/{p-6ce0a089.entry.js.map → p-3fd897c9.entry.js.map} +0 -0
  300. /package/dist/core/{p-1a5353ed.entry.js.map → p-41c6eaa1.entry.js.map} +0 -0
  301. /package/dist/core/{p-ae1ed418.entry.js.map → p-432f8ff0.entry.js.map} +0 -0
  302. /package/dist/core/{p-5c722379.entry.js.map → p-475b7bd2.entry.js.map} +0 -0
  303. /package/dist/core/{p-f2f8e4aa.entry.js.map → p-59bdafff.entry.js.map} +0 -0
  304. /package/dist/core/{p-9ea62161.entry.js.map → p-5b487daa.entry.js.map} +0 -0
  305. /package/dist/core/{p-4af7cb4c.entry.js.map → p-5ca39ed5.entry.js.map} +0 -0
  306. /package/dist/core/{p-c08b5a9a.entry.js.map → p-752f0f9a.entry.js.map} +0 -0
  307. /package/dist/core/{p-8ae11ca6.entry.js.map → p-763d0822.entry.js.map} +0 -0
  308. /package/dist/core/{p-f62c902b.entry.js.map → p-76563540.entry.js.map} +0 -0
  309. /package/dist/core/{p-500e8584.entry.js.map → p-7bb3c340.entry.js.map} +0 -0
  310. /package/dist/core/{p-027ea4ff.entry.js.map → p-88ea1e49.entry.js.map} +0 -0
  311. /package/dist/core/{p-72d6619c.entry.js.map → p-932fb4b7.entry.js.map} +0 -0
  312. /package/dist/core/{p-5c9457e2.entry.js.map → p-9ccfb863.entry.js.map} +0 -0
  313. /package/dist/core/{p-4164e7d5.entry.js.map → p-a4397df4.entry.js.map} +0 -0
  314. /package/dist/core/{p-31236329.entry.js.map → p-a448d873.entry.js.map} +0 -0
  315. /package/dist/core/{p-3758c2b5.entry.js.map → p-b0ce60a0.entry.js.map} +0 -0
  316. /package/dist/core/{p-46053a32.entry.js.map → p-b77ab20a.entry.js.map} +0 -0
  317. /package/dist/core/{p-134b407d.entry.js.map → p-c0c62df4.entry.js.map} +0 -0
  318. /package/dist/core/{p-39db6642.entry.js.map → p-c36cbd8a.entry.js.map} +0 -0
  319. /package/dist/core/{p-d8022cec.entry.js.map → p-c9ef9f5c.entry.js.map} +0 -0
  320. /package/dist/core/{p-e465a208.entry.js.map → p-ccac1730.entry.js.map} +0 -0
  321. /package/dist/core/{p-bb085716.entry.js.map → p-cf4bacee.entry.js.map} +0 -0
  322. /package/dist/core/{p-09eb825d.entry.js.map → p-e3bffcae.entry.js.map} +0 -0
  323. /package/dist/core/{p-522947f5.entry.js.map → p-eb063498.entry.js.map} +0 -0
  324. /package/dist/core/{p-c01d43cf.entry.js.map → p-ec82fa24.entry.js.map} +0 -0
  325. /package/dist/core/{p-78f0118c.entry.js.map → p-f00e510b.entry.js.map} +0 -0
  326. /package/dist/core/{p-b80520e9.entry.js.map → p-f019219c.entry.js.map} +0 -0
  327. /package/dist/core/{p-ba25f08a.entry.js.map → p-f69fb26b.entry.js.map} +0 -0
  328. /package/dist/core/{p-27b46a68.entry.js.map → p-fbc8a739.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-813020f1.js';
2
- import { m as removeFormResetListener, l as addFormResetListener, j as removeDisabledFalse, a as onComponentRequiredPropUndefined, n as renderHiddenInput, q as getInputDescribedByText } from './helpers-c325e537.js';
2
+ import { m as removeFormResetListener, l as addFormResetListener, j as removeDisabledFalse, a as onComponentRequiredPropUndefined, n as renderHiddenInput, q as getInputDescribedByText } from './helpers-24f6e762.js';
3
3
  import './types-b2398b37.js';
4
4
 
5
5
  const icSwitchCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block}input{overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ic-switch-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ic-space-xxs);cursor:pointer}.ic-switch-label{margin-left:var(--ic-space-xxs);margin-bottom:var(--ic-space-sm)}.ic-switch-label-small{margin-bottom:0.625rem}.ic-switch-toggle{display:flex;align-items:center;justify-content:space-around;width:4rem;height:var(--ic-space-xl);position:relative;border-radius:100vw;background-color:var(--ic-architectural-200);border:var(--ic-space-1px) solid var(--ic-architectural-700);box-sizing:border-box;transition:var(--ic-transition-duration-fast)}.ic-switch-line-break{flex:1 0 100%}.ic-switch-checked-status{padding-left:var(--ic-space-xxs)}.ic-switch-toggle::before{content:\"\";width:1.333rem;height:1.333rem;border-radius:50%;position:absolute;z-index:2;top:50%;left:0.333rem;transform:translate(0, -50%);background-color:var(--ic-architectural-700);transition:var(--ic-transition-duration-slow)}.ic-switch-icon{display:inline-block;vertical-align:middle;width:0.625rem;height:0.625rem}.ic-switch-icon-circle,.ic-switch-icon-line{stroke-width:1}.ic-switch-icon-circle{stroke:var(--ic-architectural-700)}.ic-switch-icon-line{stroke:var(--ic-architectural-white)}@media (prefers-reduced-motion: reduce){.ic-switch-toggle::before{transition-duration:0ms}}.ic-switch-input:checked+.ic-switch-toggle{background-color:var(--ic-action-default);border:none}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-xl), -50%);background-color:var(--ic-architectural-white)}.ic-switch-input:not([disabled])+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-action-dark-bg-hover)}.ic-switch-input:not([disabled])+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-action-dark-bg-active)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-action-default-bg-hover)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-action-default-bg-active)}.ic-switch-input:focus:not([disabled])+.ic-switch-toggle,.ic-switch-input:focus-visible:not([disabled])+.ic-switch-toggle{box-shadow:0 0 0 var(--ic-space-1px) var(--ic-architectural-white),\n 0 0 0 0.188rem var(--ic-action-default),\n 0 0 0 0.5rem var(--ic-action-default-active-alpha)}.ic-switch-disabled{cursor:default}.ic-switch-disabled .ic-switch-icon-circle{stroke:var(--ic-architectural-300)}.ic-switch-disabled .ic-switch-icon-line{stroke:var(--ic-action-default-bg-active)}.ic-switch-input:disabled+.ic-switch-toggle{background-color:var(--ic-architectural-80);border:var(--ic-border-disabled)}.ic-switch-input:disabled~.ic-switch-checked-status{color:var(--ic-architectural-300)}.ic-switch-input:disabled+.ic-switch-toggle::before{background-color:var(--ic-architectural-300)}.ic-switch-input:disabled:checked+.ic-switch-toggle{background-color:var(--ic-status-info-light);border:var(--ic-space-1px) dashed #98c9f5}.ic-switch-input:disabled:checked+.ic-switch-toggle::before{background-color:var(--ic-architectural-white)}.ic-switch-small{gap:var(--ic-space-xxxs)}.ic-switch-small .ic-switch-checked-status{padding-left:0.375rem}.ic-switch-small .ic-switch-toggle{width:var(--ic-space-xxl);height:var(--ic-space-lg)}.ic-switch-small .ic-switch-toggle::before{width:var(--ic-space-md);height:var(--ic-space-md);left:var(--ic-space-xxs)}.ic-switch-small .ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-lg), -50%)}::slotted(*){margin-left:var(--ic-space-sm)}::slotted(svg){fill:currentcolor}@media (forced-colors: active){.ic-switch-toggle::before,.ic-switch-input:checked+.ic-switch-toggle{border:var(--ic-hc-border)}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(calc(var(--ic-space-xl) - 0.125rem), -50%)}.ic-switch-input:disabled+.ic-switch-toggle,.ic-switch-input:disabled:checked+.ic-switch-toggle,.ic-switch-input:disabled+.ic-switch-toggle::before{border-color:GrayText}.ic-switch-input:disabled~.ic-switch-checked-status{color:GrayText}.ic-switch-disabled .ic-switch-icon-circle,.ic-switch-disabled .ic-switch-icon-line{stroke:GrayText}}";
@@ -41,6 +41,9 @@ const Switch = class {
41
41
  this.small = false;
42
42
  this.value = "on";
43
43
  }
44
+ checkedChangeHandler() {
45
+ this.checkedState = this.checked;
46
+ }
44
47
  disconnectedCallback() {
45
48
  removeFormResetListener(this.el, this.handleFormReset);
46
49
  }
@@ -75,6 +78,9 @@ const Switch = class {
75
78
  }
76
79
  static get delegatesFocus() { return true; }
77
80
  get el() { return getElement(this); }
81
+ static get watchers() { return {
82
+ "checked": ["checkedChangeHandler"]
83
+ }; }
78
84
  };
79
85
  Switch.style = icSwitchCss;
80
86
 
@@ -1 +1 @@
1
- {"file":"ic-switch.entry.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,+hNAA+hN;;ACsBnjN,IAAI,QAAQ,GAAG,CAAC,CAAC;MAYJ,MAAM;;;;;;IACT,YAAO,GAAG,mBAAmB,QAAQ,EAAE,EAAE,CAAC;IAuG1C,iBAAY,GAAG;MACrB,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;MACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACjB,OAAO,EAAE,IAAI,CAAC,YAAY;QAC1B,KAAK,EAAE,IAAI,CAAC,KAAK;OAClB,CAAC,CAAC;KACJ,CAAC;IAEM,YAAO,GAAG;MAChB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;KACrB,CAAC;IAEM,WAAM,GAAG;MACf,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KACpB,CAAC;IAEM,oBAAe,GAAG;MACxB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC;KAC3C,CAAC;wBArH+B,KAAK;4BACV,IAAI,CAAC,OAAO;mBAKZ,KAAK;oBAKJ,KAAK;sBAKJ,EAAE;qBAKF,KAAK;;gBAUX,IAAI,CAAC,OAAO;qBAKN,KAAK;gBAKH,SAAS;iBAKf,KAAK;iBASC,IAAI;;EAiBpC,oBAAoB;IAClB,uBAAuB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;GACxD;EAED,iBAAiB;IACf,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC;IACjC,oBAAoB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC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OAAO,EAAC,OAAO,EACf,KAAK,EAAC,0BAA0B,IAE/B,YAAY,GAAG,IAAI,GAAG,KAAK,CACd,CACjB,CACK,CACH,EACP;GACH;;;;;;;;","names":[],"sources":["src/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","src/components/ic-switch/ic-switch.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n}\n\ninput {\n overflow: hidden;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--ic-space-xxs);\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-sm);\n}\n\n.ic-switch-label-small {\n margin-bottom: 0.625rem;\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 4rem;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-architectural-200);\n border: var(--ic-space-1px) solid var(--ic-architectural-700);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-checked-status {\n padding-left: var(--ic-space-xxs);\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 1.333rem;\n height: 1.333rem;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 0.333rem;\n transform: translate(0, -50%);\n background-color: var(--ic-architectural-700);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 0.625rem;\n height: 0.625rem;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-architectural-700);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-architectural-white);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-action-default);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-active);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: 0 0 0 var(--ic-space-1px) var(--ic-architectural-white),\n 0 0 0 0.188rem var(--ic-action-default),\n 0 0 0 0.5rem var(--ic-action-default-active-alpha);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-architectural-300);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-architectural-80);\n border: var(--ic-border-disabled);\n}\n\n.ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-status-info-light);\n border: var(--ic-space-1px) dashed #98c9f5;\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-small {\n gap: var(--ic-space-xxxs);\n}\n\n.ic-switch-small .ic-switch-checked-status {\n padding-left: 0.375rem;\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted(*) {\n margin-left: var(--ic-space-sm);\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-hc-border);\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 0.125rem), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcSwitchChangeEventDetail } from \"./ic-switch.types\";\nimport { IcSizesNoLarge } from \"../../utils/types\";\n\nlet inputIds = 0;\n\n/**\n * @slot right-adornment - Content is placed to the right of switch before state label.\n */\n@Component({\n tag: \"ic-switch\",\n styleUrl: \"ic-switch.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Switch {\n private inputId = `ic-switch-input-${inputIds++}`;\n\n @Element() el: HTMLIcSwitchElement;\n\n @State() checkedState: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the switch will display as checked.\n */\n @Prop() checked?: boolean = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\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 aria-label applied to the switch when no visual 'name' is provided.\n */\n @Prop() label!: string;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * If `true`, the switch will render the On/Off state text.\n */\n @Prop() showState?: boolean = false;\n\n /**\n * The size of the switch component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a `<input type=\"checkbox\">`,\n * it's only used when the toggle participates in a native `<form>`.\n */\n @Prop() value?: string | null = \"on\";\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() icChange!: EventEmitter<IcSwitchChangeEventDetail>;\n\n /**\n * Emitted when the toggle has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.checkedState = this.checked;\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Switch\"\n );\n }\n\n /**\n * Sets focus on the switch.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"input\")) {\n this.el.shadowRoot.querySelector(\"input\").focus();\n }\n }\n\n private handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value,\n });\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private handleFormReset = (): void => {\n this.checkedState = this.initiallyChecked;\n };\n\n render() {\n const {\n label,\n checkedState,\n small,\n size,\n disabled,\n name,\n showState,\n value,\n hideLabel,\n helperText,\n inputId,\n } = this;\n\n renderHiddenInput(true, this.el, name, checkedState ? value : \"\", disabled);\n\n const describedBy = getInputDescribedByText(\n inputId,\n helperText !== \"\",\n false\n );\n\n return (\n <Host>\n <label\n class={{\n [\"ic-switch-container\"]: true,\n [\"ic-switch-disabled\"]: disabled,\n [\"ic-switch-small\"]: small || size === \"small\",\n }}\n htmlFor={inputId}\n >\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n readonly={true}\n disabled={disabled}\n class={{\n [\"ic-switch-label\"]: true,\n [\"ic-switch-label-small\"]: small || size === \"small\",\n }}\n ></ic-input-label>\n )}\n {!hideLabel && <span class=\"ic-switch-line-break\"></span>}\n <input\n checked={checkedState}\n disabled={disabled}\n aria-label={label}\n aria-checked={checkedState ? \"true\" : \"false\"}\n aria-describedby={describedBy}\n role=\"switch\"\n class=\"ic-switch-input\"\n type=\"checkbox\"\n name=\"toggle\"\n id={inputId}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.handleChange}\n />\n <span class=\"ic-switch-toggle\">\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n class=\"ic-switch-icon-line\"\n x1=\"9\"\n y1={small || size === \"small\" ? \"2\" : \"1\"}\n x2=\"9\"\n y2={small || size === \"small\" ? \"8\" : \"9\"}\n />\n </svg>\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"ic-switch-icon-circle\"\n fill=\"none\"\n cx=\"5\"\n cy=\"5\"\n r={small || size === \"small\" ? \"3.335\" : \"4.445\"}\n />\n </svg>\n </span>\n <slot name=\"right-adornment\"></slot>\n {showState && (\n <ic-typography\n aria-hidden=\"true\"\n variant=\"label\"\n class=\"ic-switch-checked-status\"\n >\n {checkedState ? \"On\" : \"Off\"}\n </ic-typography>\n )}\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-switch.entry.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,+hNAA+hN;;ACuBnjN,IAAI,QAAQ,GAAG,CAAC,CAAC;MAYJ,MAAM;;;;;;IACT,YAAO,GAAG,mBAAmB,QAAQ,EAAE,EAAE,CAAC;IA4G1C,iBAAY,GAAG;MACrB,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;MACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACjB,OAAO,EAAE,IAAI,CAAC,YAAY;QAC1B,KAAK,EAAE,IAAI,CAAC,KAAK;OAClB,CAAC,CAAC;KACJ,CAAC;IAEM,YAAO,GAAG;MAChB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;KACrB,CAAC;IAEM,WAAM,GAAG;MACf,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KACpB,CAAC;IAEM,oBAAe,GAAG;MACxB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC;KAC3C,CAAC;wBA1H+B,KAAK;4BACV,IAAI,CAAC,OAAO;mBAKZ,KAAK;oBAUJ,KAAK;sBAKJ,EAAE;qBAKF,KAAK;;gBAUX,IAAI,CAAC,OAAO;qBAKN,KAAK;gBAKH,SAAS;iBAKf,KAAK;iBASC,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EACjB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,IAElC,cACE,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAE,KAAK,IAAI,IAAI,KAAK,OAAO,GAAG,OAAO,GAAG,OAAO,GAChD,CACE,CACD,EACP,YAAM,IAAI,EAAC,iBAAiB,GAAQ,EACnC,SAAS,KACR,oCACc,MAAM,EAClB,OAAO,EAAC,OAAO,EACf,KAAK,EAAC,0BAA0B,IAE/B,YAAY,GAAG,IAAI,GAAG,KAAK,CACd,CACjB,CACK,CACH,EACP;GACH;;;;;;;;;;;","names":[],"sources":["src/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","src/components/ic-switch/ic-switch.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n}\n\ninput {\n overflow: hidden;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--ic-space-xxs);\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-sm);\n}\n\n.ic-switch-label-small {\n margin-bottom: 0.625rem;\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 4rem;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-architectural-200);\n border: var(--ic-space-1px) solid var(--ic-architectural-700);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-checked-status {\n padding-left: var(--ic-space-xxs);\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 1.333rem;\n height: 1.333rem;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 0.333rem;\n transform: translate(0, -50%);\n background-color: var(--ic-architectural-700);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 0.625rem;\n height: 0.625rem;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-architectural-700);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-architectural-white);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-action-default);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-active);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: 0 0 0 var(--ic-space-1px) var(--ic-architectural-white),\n 0 0 0 0.188rem var(--ic-action-default),\n 0 0 0 0.5rem var(--ic-action-default-active-alpha);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-architectural-300);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-architectural-80);\n border: var(--ic-border-disabled);\n}\n\n.ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-status-info-light);\n border: var(--ic-space-1px) dashed #98c9f5;\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-small {\n gap: var(--ic-space-xxxs);\n}\n\n.ic-switch-small .ic-switch-checked-status {\n padding-left: 0.375rem;\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted(*) {\n margin-left: var(--ic-space-sm);\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-hc-border);\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 0.125rem), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcSwitchChangeEventDetail } from \"./ic-switch.types\";\nimport { IcSizesNoLarge } from \"../../utils/types\";\n\nlet inputIds = 0;\n\n/**\n * @slot right-adornment - Content is placed to the right of switch before state label.\n */\n@Component({\n tag: \"ic-switch\",\n styleUrl: \"ic-switch.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Switch {\n private inputId = `ic-switch-input-${inputIds++}`;\n\n @Element() el: HTMLIcSwitchElement;\n\n @State() checkedState: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the switch will display as checked.\n */\n @Prop() checked?: boolean = false;\n\n @Watch(\"checked\")\n checkedChangeHandler(): void {\n this.checkedState = this.checked;\n }\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\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 aria-label applied to the switch when no visual 'name' is provided.\n */\n @Prop() label!: string;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * If `true`, the switch will render the On/Off state text.\n */\n @Prop() showState?: boolean = false;\n\n /**\n * The size of the switch component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a `<input type=\"checkbox\">`,\n * it's only used when the toggle participates in a native `<form>`.\n */\n @Prop() value?: string | null = \"on\";\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() icChange!: EventEmitter<IcSwitchChangeEventDetail>;\n\n /**\n * Emitted when the toggle has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.checkedState = this.checked;\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Switch\"\n );\n }\n\n /**\n * Sets focus on the switch.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"input\")) {\n this.el.shadowRoot.querySelector(\"input\").focus();\n }\n }\n\n private handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value,\n });\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private handleFormReset = (): void => {\n this.checkedState = this.initiallyChecked;\n };\n\n render() {\n const {\n label,\n checkedState,\n small,\n size,\n disabled,\n name,\n showState,\n value,\n hideLabel,\n helperText,\n inputId,\n } = this;\n\n renderHiddenInput(true, this.el, name, checkedState ? value : \"\", disabled);\n\n const describedBy = getInputDescribedByText(\n inputId,\n helperText !== \"\",\n false\n );\n\n return (\n <Host>\n <label\n class={{\n [\"ic-switch-container\"]: true,\n [\"ic-switch-disabled\"]: disabled,\n [\"ic-switch-small\"]: small || size === \"small\",\n }}\n htmlFor={inputId}\n >\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n readonly={true}\n disabled={disabled}\n class={{\n [\"ic-switch-label\"]: true,\n [\"ic-switch-label-small\"]: small || size === \"small\",\n }}\n ></ic-input-label>\n )}\n {!hideLabel && <span class=\"ic-switch-line-break\"></span>}\n <input\n checked={checkedState}\n disabled={disabled}\n aria-label={label}\n aria-checked={checkedState ? \"true\" : \"false\"}\n aria-describedby={describedBy}\n role=\"switch\"\n class=\"ic-switch-input\"\n type=\"checkbox\"\n name=\"toggle\"\n id={inputId}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.handleChange}\n />\n <span class=\"ic-switch-toggle\">\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n class=\"ic-switch-icon-line\"\n x1=\"9\"\n y1={small || size === \"small\" ? \"2\" : \"1\"}\n x2=\"9\"\n y2={small || size === \"small\" ? \"8\" : \"9\"}\n />\n </svg>\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"ic-switch-icon-circle\"\n fill=\"none\"\n cx=\"5\"\n cy=\"5\"\n r={small || size === \"small\" ? \"3.335\" : \"4.445\"}\n />\n </svg>\n </span>\n <slot name=\"right-adornment\"></slot>\n {showState && (\n <ic-typography\n aria-hidden=\"true\"\n variant=\"label\"\n class=\"ic-switch-checked-status\"\n >\n {checkedState ? \"On\" : \"Off\"}\n </ic-typography>\n )}\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-813020f1.js';
2
- import { a as onComponentRequiredPropUndefined } from './helpers-c325e537.js';
2
+ import { a as onComponentRequiredPropUndefined } from './helpers-24f6e762.js';
3
3
  import { I as IcThemeForegroundEnum } from './types-b2398b37.js';
4
4
 
5
5
  const icTabGroupCss = ":host{--border-bottom-color:var(--ic-architectural-300);display:block;margin-bottom:var(--ic-space-md);border-bottom:var(--ic-border-default)}:host(.inline){margin-bottom:0;border-bottom:none}.light{border-bottom:var(--ic-space-1px) solid var(--ic-architectural-white)}.tabs-container{display:flex;flex-direction:row}.tabs-container::-webkit-scrollbar{display:none}";
@@ -22,7 +22,7 @@ const TabGroup = class {
22
22
  ["inline"]: this.inline,
23
23
  } }, h("ic-horizontal-scroll", { appearance: appearance === IcThemeForegroundEnum.Dark
24
24
  ? IcThemeForegroundEnum.Default
25
- : appearance }, h("div", { class: "tabs-container" }, h("slot", null)))));
25
+ : appearance, "focus-trigger": "tabFocus" }, h("div", { class: "tabs-container" }, h("slot", null)))));
26
26
  }
27
27
  static get delegatesFocus() { return true; }
28
28
  };
@@ -1 +1 @@
1
- {"file":"ic-tab-group.entry.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,+WAA+W;;MCexX,QAAQ;;;sBAI+B,MAAM;qBAMV,SAAS;kBAKX,KAAK;;;EAOjD,gBAAgB;IACd,gCAAgC,CAC9B,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EACzC,WAAW,CACZ,CAAC;GACH;EAED,MAAM;IACJ,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAEnC,QACE,EAAC,IAAI,IACH,IAAI,EAAC,SAAS,gBACF,KAAK,EACjB,KAAK,EAAE;QACL,CAAC,OAAO,GAAG,UAAU,KAAK,qBAAqB,CAAC,KAAK;QACrD,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM;OACxB,IAED,4BACE,UAAU,EACR,UAAU,KAAK,qBAAqB,CAAC,IAAI;UACrC,qBAAqB,CAAC,OAAO;UAC7B,UAAU,IAGhB,WAAK,KAAK,EAAC,gBAAgB,IACzB,eAAa,CACT,CACe,CAClB,EACP;GACH;;;;;;;","names":[],"sources":["src/components/ic-tab-group/ic-tab-group.css?tag=ic-tab-group&encapsulation=shadow","src/components/ic-tab-group/ic-tab-group.tsx"],"sourcesContent":[":host {\n --border-bottom-color: var(--ic-architectural-300);\n\n display: block;\n margin-bottom: var(--ic-space-md);\n border-bottom: var(--ic-border-default);\n}\n\n:host(.inline) {\n margin-bottom: 0;\n border-bottom: none;\n}\n\n.light {\n border-bottom: var(--ic-space-1px) solid var(--ic-architectural-white);\n}\n\n.tabs-container {\n display: flex;\n flex-direction: row;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n","import { Component, Host, Prop, h } from \"@stencil/core\";\n\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport {\n IcThemeForegroundNoDefault,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\n@Component({\n tag: \"ic-tab-group\",\n styleUrl: \"ic-tab-group.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class TabGroup {\n /**\n * @internal The appearance of the tab group, e.g dark, or light.\n */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n /**\n * @deprecated This is no longer required.\n * The context id is passed down from `ic-tab-context`\n */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * If `true`, the tabs and tab panels will be positioned separately.\n */\n @Prop({ reflect: true }) inline?: boolean = false;\n\n /**\n * The label to describe the purpose of the set of tabs to screen reader users.\n */\n @Prop() label!: string;\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tab Group\"\n );\n }\n\n render() {\n const { appearance, label } = this;\n\n return (\n <Host\n role=\"tablist\"\n aria-label={label}\n class={{\n [\"light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"inline\"]: this.inline,\n }}\n >\n <ic-horizontal-scroll\n appearance={\n appearance === IcThemeForegroundEnum.Dark\n ? IcThemeForegroundEnum.Default\n : appearance\n }\n >\n <div class=\"tabs-container\">\n <slot></slot>\n </div>\n </ic-horizontal-scroll>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-tab-group.entry.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,+WAA+W;;MCexX,QAAQ;;;sBAI+B,MAAM;qBAMV,SAAS;kBAKX,KAAK;;;EAOjD,gBAAgB;IACd,gCAAgC,CAC9B,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EACzC,WAAW,CACZ,CAAC;GACH;EAED,MAAM;IACJ,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAEnC,QACE,EAAC,IAAI,IACH,IAAI,EAAC,SAAS,gBACF,KAAK,EACjB,KAAK,EAAE;QACL,CAAC,OAAO,GAAG,UAAU,KAAK,qBAAqB,CAAC,KAAK;QACrD,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM;OACxB,IAED,4BACE,UAAU,EACR,UAAU,KAAK,qBAAqB,CAAC,IAAI;UACrC,qBAAqB,CAAC,OAAO;UAC7B,UAAU,mBAEF,UAAU,IAExB,WAAK,KAAK,EAAC,gBAAgB,IACzB,eAAa,CACT,CACe,CAClB,EACP;GACH;;;;;;;","names":[],"sources":["src/components/ic-tab-group/ic-tab-group.css?tag=ic-tab-group&encapsulation=shadow","src/components/ic-tab-group/ic-tab-group.tsx"],"sourcesContent":[":host {\n --border-bottom-color: var(--ic-architectural-300);\n\n display: block;\n margin-bottom: var(--ic-space-md);\n border-bottom: var(--ic-border-default);\n}\n\n:host(.inline) {\n margin-bottom: 0;\n border-bottom: none;\n}\n\n.light {\n border-bottom: var(--ic-space-1px) solid var(--ic-architectural-white);\n}\n\n.tabs-container {\n display: flex;\n flex-direction: row;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n","import { Component, Host, Prop, h } from \"@stencil/core\";\n\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport {\n IcThemeForegroundNoDefault,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\n@Component({\n tag: \"ic-tab-group\",\n styleUrl: \"ic-tab-group.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class TabGroup {\n /**\n * @internal The appearance of the tab group, e.g dark, or light.\n */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n /**\n * @deprecated This is no longer required.\n * The context id is passed down from `ic-tab-context`\n */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * If `true`, the tabs and tab panels will be positioned separately.\n */\n @Prop({ reflect: true }) inline?: boolean = false;\n\n /**\n * The label to describe the purpose of the set of tabs to screen reader users.\n */\n @Prop() label!: string;\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tab Group\"\n );\n }\n\n render() {\n const { appearance, label } = this;\n\n return (\n <Host\n role=\"tablist\"\n aria-label={label}\n class={{\n [\"light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"inline\"]: this.inline,\n }}\n >\n <ic-horizontal-scroll\n appearance={\n appearance === IcThemeForegroundEnum.Dark\n ? IcThemeForegroundEnum.Default\n : appearance\n }\n focus-trigger=\"tabFocus\"\n >\n <div class=\"tabs-container\">\n <slot></slot>\n </div>\n </ic-horizontal-scroll>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-813020f1.js';
2
2
  import { I as IcThemeForegroundEnum } from './types-b2398b37.js';
3
- import { d as isPropDefined } from './helpers-c325e537.js';
3
+ import { d as isPropDefined } from './helpers-24f6e762.js';
4
4
 
5
5
  const icTabPanelCss = ":host{display:block}:host(.ic-tab-panel-light){color:white}";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-813020f1.js';
2
2
  import { I as IcThemeForegroundEnum } from './types-b2398b37.js';
3
- import { j as removeDisabledFalse, i as isSlotUsed } from './helpers-c325e537.js';
3
+ import { j as removeDisabledFalse, i as isSlotUsed } from './helpers-24f6e762.js';
4
4
 
5
5
  const icTabCss = "/*! 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{--indicator-initial-color:rgba(23 89 188 / 0%);--indicator-color:var(--ic-action-default);--focus-indicator:var(--ic-border-focus);--label-color:var(--ic-color-primary-text);--background-color-hover:var(--ic-action-default-bg-hover);--background-color-active:var(--ic-action-default-bg-active);display:flex;align-items:center;border-radius:0;color:var(--label-color);height:2.5rem;padding:0 var(--ic-space-md);cursor:pointer;position:relative;border-bottom:var(--ic-space-xxs) solid var(--indicator-initial-color);gap:var(--ic-space-xs);transition:all var(--ic-easing-transition-fast)}:host(:focus){box-shadow:var(--focus-indicator);border-radius:var(--ic-border-radius)}:host(:focus-visible){outline:var(--ic-hc-focus-outline)}:host(:hover){background-color:var(--background-color-hover)}:host(:active){background-color:var(--background-color-active)}:host(.ic-tab-light){--indicator-initial-color:rgb(255 255 255 / 0%);--indicator-color:rgb(255 255 255 / 100%);--focus-indicator:var(--ic-border-focus);--label-color:white;--background-color-hover:var(--ic-action-dark-bg-hover);--background-color-active:var(--ic-action-dark-bg-active)}:host(.selected){border-bottom:var(--ic-space-xxs) solid var(--indicator-color)}:host(.disabled){pointer-events:none;color:var(--ic-architectural-300)}:host(.selected.with-transition){transition:all var(--ic-easing-transition-slow),\n border-color var(--ic-transition-duration-slow)}.ic-tab-label{pointer-events:none}::slotted(svg){fill:currentcolor}@media (forced-colors: active){:host{border-bottom:var(--ic-space-xxs) solid canvas}:host(.disabled){color:GrayText}}";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-813020f1.js';
2
2
  import { a as IcInformationStatus } from './types-b2398b37.js';
3
- import { M as debounceEvent, m as removeFormResetListener, w as inheritAttributes, l as addFormResetListener, j as removeDisabledFalse, a as onComponentRequiredPropUndefined, q as getInputDescribedByText, n as renderHiddenInput, i as isSlotUsed, G as isEmptyString, x as IC_INHERITED_ARIA } from './helpers-c325e537.js';
3
+ import { M as debounceEvent, m as removeFormResetListener, w as inheritAttributes, l as addFormResetListener, j as removeDisabledFalse, a as onComponentRequiredPropUndefined, q as getInputDescribedByText, n as renderHiddenInput, i as isSlotUsed, G as isEmptyString, x as IC_INHERITED_ARIA } from './helpers-24f6e762.js';
4
4
 
5
5
  const icTextFieldCss = "/*! 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(.fullwidth){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:0.375rem}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)}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)}.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}}";
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-813020f1.js';
2
- import { J as getThemeColorBrightness, K as BLACK_MIN_COLOR_BRIGHTNESS, W as WHITE_MAX_COLOR_BRIGHTNESS, h as hexToRgba, r as rgbaStrToObj, u as getThemeForegroundColor } from './helpers-c325e537.js';
2
+ import { J as getThemeColorBrightness, K as BLACK_MIN_COLOR_BRIGHTNESS, W as WHITE_MAX_COLOR_BRIGHTNESS, h as hexToRgba, r as rgbaStrToObj, u as getThemeForegroundColor } from './helpers-24f6e762.js';
3
3
  import './types-b2398b37.js';
4
4
 
5
5
  const Theme = class {
@@ -4,6 +4,21 @@ const ToastRegion = class {
4
4
  constructor(hostRef) {
5
5
  registerInstance(this, hostRef);
6
6
  this.pendingVisibility = [];
7
+ this.showToast = (toast) => {
8
+ const visibleToasts = Array.from(document.querySelectorAll("ic-toast")).filter((el) => window.getComputedStyle(el).display !== "none");
9
+ if (visibleToasts.indexOf(toast) === -1 && visibleToasts.length <= 0) {
10
+ toast.setVisible().then((res) => (this.previouslyFocused = res));
11
+ }
12
+ if (visibleToasts.length > 0)
13
+ this.pendingVisibility.push(toast);
14
+ };
15
+ this.openToast = undefined;
16
+ }
17
+ watchOpenToastHandler(newValue) {
18
+ if (this.openToast !== undefined) {
19
+ this.showToast(newValue);
20
+ this.openToast = undefined;
21
+ }
7
22
  }
8
23
  handleDismissedToast() {
9
24
  var _a;
@@ -22,21 +37,18 @@ const ToastRegion = class {
22
37
  }
23
38
  }
24
39
  /**
25
- * Handles setting the visibility of various toasts based on what is already visible
26
- * @param toast The toast element being requested to display
40
+ * @deprecated Use openToast prop to display toast instead.
27
41
  */
28
42
  async setVisible(toast) {
29
- const visibleToasts = Array.from(document.querySelectorAll("ic-toast")).filter((el) => window.getComputedStyle(el).display !== "none");
30
- if (visibleToasts.indexOf(toast) === -1 && visibleToasts.length <= 0) {
31
- toast.setVisible().then((res) => (this.previouslyFocused = res));
32
- }
33
- if (visibleToasts.length > 0)
34
- this.pendingVisibility.push(toast);
43
+ this.showToast(toast);
35
44
  }
36
45
  render() {
37
46
  return h("slot", null);
38
47
  }
39
48
  get el() { return getElement(this); }
49
+ static get watchers() { return {
50
+ "openToast": ["watchOpenToastHandler"]
51
+ }; }
40
52
  };
41
53
 
42
54
  export { ToastRegion as ic_toast_region };
@@ -1 +1 @@
1
- {"file":"ic-toast-region.entry.js","mappings":";;MAIa,WAAW;EADxB;;IAEU,sBAAiB,GAAyB,EAAE,CAAC;GAqCtD;EA/BC,oBAAoB;;IAClB,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;MACrC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACtB,UAAU,EAAE;SACZ,IAAI,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,iBAAiB,GAAG,GAAG,CAAC,CAAC,CAAC;MACjD,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;KAChC;SAAM;MACL,IAAI,IAAI,CAAC,iBAAiB,IAAI,UAAU,IAAI,IAAI,CAAC,iBAAiB,EAAE;QACjE,IAAI,CAAC,iBAA2C,CAAC,QAAQ,EAAE,CAAC;OAC9D;;QAAM,MAAA,IAAI,CAAC,iBAAiB,0CAAE,KAAK,EAAE,CAAC;KACxC;GACF;;;;;EAOD,MAAM,UAAU,CAAC,KAAyB;IACxC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAC9B,QAAQ,CAAC,gBAAgB,CAAC,UAAU,CAAC,CACtC,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC;IACjE,IAAI,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,aAAa,CAAC,MAAM,IAAI,CAAC,EAAE;MACpE,KAAK,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,iBAAiB,GAAG,GAAG,CAAC,CAAC,CAAC;KAClE;IACD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC;MAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAClE;EAED,MAAM;IACJ,OAAO,eAAa,CAAC;GACtB;;;;;;","names":[],"sources":["src/components/ic-toast-region/ic-toast-region.tsx"],"sourcesContent":["import { Component, Element, h, Listen, Method } from \"@stencil/core\";\nimport { IcFocusableComponents } from \"../../utils/types\";\n\n@Component({ tag: \"ic-toast-region\" })\nexport class ToastRegion {\n private pendingVisibility: HTMLIcToastElement[] = [];\n private previouslyFocused: HTMLElement;\n\n @Element() el: HTMLIcToastRegionElement;\n\n @Listen(\"icDismiss\", { capture: true })\n handleDismissedToast(): void {\n if (this.pendingVisibility.length > 0) {\n this.pendingVisibility[0]\n .setVisible()\n .then((res) => (this.previouslyFocused = res));\n this.pendingVisibility.shift();\n } else {\n if (this.previouslyFocused && \"setFocus\" in this.previouslyFocused) {\n (this.previouslyFocused as IcFocusableComponents).setFocus();\n } else this.previouslyFocused?.focus();\n }\n }\n\n /**\n * Handles setting the visibility of various toasts based on what is already visible\n * @param toast The toast element being requested to display\n */\n @Method()\n async setVisible(toast: HTMLIcToastElement): Promise<void> {\n const visibleToasts = Array.from(\n document.querySelectorAll(\"ic-toast\")\n ).filter((el) => window.getComputedStyle(el).display !== \"none\");\n if (visibleToasts.indexOf(toast) === -1 && visibleToasts.length <= 0) {\n toast.setVisible().then((res) => (this.previouslyFocused = res));\n }\n if (visibleToasts.length > 0) this.pendingVisibility.push(toast);\n }\n\n render() {\n return <slot></slot>;\n }\n}\n"],"version":3}
1
+ {"file":"ic-toast-region.entry.js","mappings":";;MAYa,WAAW;;;IACd,sBAAiB,GAAyB,EAAE,CAAC;IA+B7C,cAAS,GAAG,CAAC,KAAyB;MAC5C,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAC9B,QAAQ,CAAC,gBAAgB,CAAC,UAAU,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ACvB;EAED,MAAM;IACJ,OAAO,eAAa,CAAC;GACtB;;;;;;;;;","names":[],"sources":["src/components/ic-toast-region/ic-toast-region.tsx"],"sourcesContent":["import {\n Component,\n Element,\n h,\n Listen,\n Method,\n Prop,\n Watch,\n} from \"@stencil/core\";\nimport { IcFocusableComponents } from \"../../utils/types\";\n\n@Component({ tag: \"ic-toast-region\" })\nexport class ToastRegion {\n private pendingVisibility: HTMLIcToastElement[] = [];\n private previouslyFocused: HTMLElement;\n\n @Element() el: HTMLIcToastRegionElement;\n\n /**\n * The toast element to be displayed.\n */\n @Prop({ mutable: true }) openToast: HTMLIcToastElement;\n @Watch(\"openToast\")\n watchOpenToastHandler(newValue: HTMLIcToastElement): void {\n if (this.openToast !== undefined) {\n this.showToast(newValue);\n this.openToast = undefined;\n }\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleDismissedToast(): void {\n if (this.pendingVisibility.length > 0) {\n this.pendingVisibility[0]\n .setVisible()\n .then((res) => (this.previouslyFocused = res));\n this.pendingVisibility.shift();\n } else {\n if (this.previouslyFocused && \"setFocus\" in this.previouslyFocused) {\n (this.previouslyFocused as IcFocusableComponents).setFocus();\n } else this.previouslyFocused?.focus();\n }\n }\n\n private showToast = (toast: HTMLIcToastElement) => {\n const visibleToasts = Array.from(\n document.querySelectorAll(\"ic-toast\")\n ).filter((el) => window.getComputedStyle(el).display !== \"none\");\n if (visibleToasts.indexOf(toast) === -1 && visibleToasts.length <= 0) {\n toast.setVisible().then((res) => (this.previouslyFocused = res));\n }\n if (visibleToasts.length > 0) this.pendingVisibility.push(toast);\n };\n\n /**\n * @deprecated Use openToast prop to display toast instead.\n */\n @Method()\n async setVisible(toast: HTMLIcToastElement): Promise<void> {\n this.showToast(toast);\n }\n\n render() {\n return <slot></slot>;\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-813020f1.js';
2
2
  import { c as closeIcon } from './close-icon-539ec8d1.js';
3
- import { i as isSlotUsed, V as VARIANT_ICONS, d as isPropDefined, a as onComponentRequiredPropUndefined, L as getSlot } from './helpers-c325e537.js';
3
+ import { i as isSlotUsed, V as VARIANT_ICONS, a as onComponentRequiredPropUndefined, L as getSlot, d as isPropDefined } from './helpers-24f6e762.js';
4
4
  import { I as IcThemeForegroundEnum } from './types-b2398b37.js';
5
5
 
6
6
  const icToastCss = "/*! 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{--bottom-position:var(--ic-space-xl);position:fixed;bottom:var(--bottom-position);left:50%;transform:translate(-50%);animation:fadein var(--ic-transition-duration-slow) ease-in-out;z-index:var(--ic-z-index-toast)}:host(.hidden){display:none;animation:fadeout var(--ic-transition-duration-slow) ease-in-out}.container{max-width:32.5rem;min-width:18rem;box-shadow:var(--ic-elevation-overlay);min-height:3.5rem;background-color:var(--ic-architectural-800);color:var(--ic-color-white-text);display:flex;align-items:center;position:relative;border-radius:var(--ic-border-radius)}.toast-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);position:absolute;border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs)}.divider-neutral{background-color:var(--ic-status-unknown)}.divider-info{background-color:var(--ic-status-info-contrast)}.divider-warning{background-color:var(--ic-status-warning-contrast)}.divider-error{background-color:var(--ic-status-error-contrast)}.divider-success{background-color:var(--ic-status-success-contrast)}.toast-icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-md)}:host([variant=\"neutral\"]) .toast-icon svg,::slotted(svg){fill:var(--ic-status-unknown)}:host([variant=\"info\"]) .toast-icon svg{fill:var(--ic-status-info-contrast)}:host([variant=\"warning\"]) .toast-icon svg{fill:var(--ic-status-warning-contrast)}:host([variant=\"error\"]) .toast-icon svg{fill:var(--ic-status-error-contrast)}:host([variant=\"success\"]) .toast-icon svg{fill:var(--ic-status-success-contrast)}.toast-content{margin-left:var(--ic-space-xs);width:100%}.no-icon{margin-left:var(--ic-space-md)}.toast-message{padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}.toast-action-container{padding-bottom:var(--ic-space-md)}ic-button,.toast-dismiss-timer{padding:var(--ic-space-xs)}@media (max-width: 576px){:host{--bottom-position:var(--ic-space-lg);width:calc(100% - 2 * var(--ic-space-md))}}@media (min-width: 993px){:host{--bottom-position:calc(var(--ic-space-xl) + var(--ic-space-xs))}}@media (forced-colors: active){.container{border:var(--ic-hc-border)}}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:var(--bottom-position);opacity:1}}@keyframes fadeout{from{bottom:var(--bottom-position);opacity:1}to{bottom:0;opacity:0}}";
@@ -49,13 +49,14 @@ const Toast = class {
49
49
  (_b = this.neutralIconAriaLabel) !== null && _b !== void 0 ? _b : VARIANT_ICONS[this.variant].ariaLabel;
50
50
  }
51
51
  if (this.isManual) {
52
+ const toastMessage = isPropDefined(this.message)
53
+ ? `. ${this.message}`
54
+ : "";
52
55
  this.el.setAttribute("aria-label", this.variant
53
56
  ? this.neutralVariantLabel || VARIANT_ICONS[this.variant].ariaLabel
54
57
  : this.heading);
55
58
  (this.variant || this.message) &&
56
- this.el.setAttribute("aria-description", this.variant
57
- ? `${this.heading}${isPropDefined(this.message) ? `. ${this.message}` : ""}`
58
- : this.message);
59
+ this.el.setAttribute("aria-description", this.variant ? `${this.heading}${toastMessage}` : this.message);
59
60
  }
60
61
  }
61
62
  componentDidLoad() {
@@ -102,7 +103,7 @@ const Toast = class {
102
103
  }
103
104
  }
104
105
  /**
105
- * Used to display the individual toast
106
+ * @internal Used to display the individual toast.
106
107
  * @returns The element that previously had focus before the toast appeared
107
108
  */
108
109
  async setVisible() {
@@ -1 +1 @@
1
- {"file":"ic-toast.entry.js","mappings":";;;;;AAAA,M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,EACf,OAAO,KACN,qBAAe,OAAO,EAAC,MAAM,IAC1B,OAAO,IAAI,aAAI,OAAO,CAAK,CACd,CACjB,CACG,EACL,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,KAC5B,WAAK,KAAK,EAAC,wBAAwB,IACjC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,EACL,CAAC,QAAQ,IACR,4BACE,KAAK,EAAC,qBAAqB,EAC3B,UAAU,EAAC,OAAO,EAClB,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,IAAI,CAAC,aAAa,GACN,KAExB,iBACE,EAAE,EAAC,gBAAgB,EACnB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,OAAO,EAAC,MAAM,EACd,UAAU,EAAE,qBAAqB,CAAC,KAAK,gBAC3B,sBAAsB,GACvB,CACd,CACG,CACD,EACP;GACH;;;;;;;","names":[],"sources":["src/components/ic-toast/ic-toast.css?tag=ic-toast&encapsulation=shadow","src/components/ic-toast/ic-toast.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-toast: z-index of toast\n */\n\n:host {\n --bottom-position: var(--ic-space-xl);\n\n position: fixed;\n bottom: var(--bottom-position);\n left: 50%;\n transform: translate(-50%);\n animation: fadein var(--ic-transition-duration-slow) ease-in-out;\n z-index: var(--ic-z-index-toast);\n}\n\n:host(.hidden) {\n display: none;\n animation: fadeout var(--ic-transition-duration-slow) ease-in-out;\n}\n\n.container {\n max-width: 32.5rem;\n min-width: 18rem;\n box-shadow: var(--ic-elevation-overlay);\n min-height: 3.5rem;\n background-color: var(--ic-architectural-800);\n color: var(--ic-color-white-text);\n display: flex;\n align-items: center;\n position: relative;\n border-radius: var(--ic-border-radius);\n}\n\n.toast-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 position: absolute;\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n}\n\n.divider-neutral {\n background-color: var(--ic-status-unknown);\n}\n\n.divider-info {\n background-color: var(--ic-status-info-contrast);\n}\n\n.divider-warning {\n background-color: var(--ic-status-warning-contrast);\n}\n\n.divider-error {\n background-color: var(--ic-status-error-contrast);\n}\n\n.divider-success {\n background-color: var(--ic-status-success-contrast);\n}\n\n.toast-icon,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n}\n\n:host([variant=\"neutral\"]) .toast-icon svg,\n::slotted(svg) {\n fill: var(--ic-status-unknown);\n}\n\n:host([variant=\"info\"]) .toast-icon svg {\n fill: var(--ic-status-info-contrast);\n}\n\n:host([variant=\"warning\"]) .toast-icon svg {\n fill: var(--ic-status-warning-contrast);\n}\n\n:host([variant=\"error\"]) .toast-icon svg {\n fill: var(--ic-status-error-contrast);\n}\n\n:host([variant=\"success\"]) .toast-icon svg {\n fill: var(--ic-status-success-contrast);\n}\n\n.toast-content {\n margin-left: var(--ic-space-xs);\n width: 100%;\n}\n\n.no-icon {\n margin-left: var(--ic-space-md);\n}\n\n.toast-message {\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n.toast-action-container {\n padding-bottom: var(--ic-space-md);\n}\n\nic-button,\n.toast-dismiss-timer {\n padding: var(--ic-space-xs);\n}\n\n@media (max-width: 576px) {\n :host {\n --bottom-position: var(--ic-space-lg);\n\n width: calc(100% - 2 * var(--ic-space-md));\n }\n}\n\n@media (min-width: 993px) {\n :host {\n --bottom-position: calc(var(--ic-space-xl) + var(--ic-space-xs));\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-hc-border);\n }\n}\n\n@keyframes fadein {\n from {\n bottom: 0;\n opacity: 0;\n }\n\n to {\n bottom: var(--bottom-position);\n opacity: 1;\n }\n}\n\n@keyframes fadeout {\n from {\n bottom: var(--bottom-position);\n opacity: 1;\n }\n\n to {\n bottom: 0;\n opacity: 0;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Method,\n Prop,\n State,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\nimport {\n getSlot,\n isPropDefined,\n isSlotUsed,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport {\n IcActivationTypes,\n IcStatusVariants,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { ActionAreaElementTypes } from \"./ic-toast.types\";\n\nconst AUTO_DISMISS_TIMER_REFRESH_RATE_MS = 1000;\nconst TOAST_HEADING_CHAR_LIMIT = 70;\nconst TOAST_MESSAGE_CHAR_LIMIT = 140;\n\n/**\n * @slot action - IcButton or IcLink is placed below header and message. If used will default toast to manual `dismiss` type.\n * @slot neutral-icon - A custom neutral icon is placed on the left side of the component. If used will default toast to `neutral` variant.\n */\n@Component({\n tag: \"ic-toast\",\n styleUrl: \"ic-toast.css\",\n shadow: true,\n})\nexport class Toast {\n private dismissTimeout: number;\n private interactiveElements: ActionAreaElementTypes[] = [];\n private isManual: boolean;\n private neutralVariantLabel: string;\n private timerRefreshInterval: number;\n\n @Element() el: HTMLIcToastElement;\n\n @State() timerProgress = 100;\n @State() visible = false;\n\n /**\n * If toast dismissMode is set to `automatic`, use this prop to define the time before the toast dismisses (in MILLISECONDS)\n * (NOTE: Has a minimum value of `5000ms`)\n */\n @Prop({ mutable: true }) autoDismissTimeout? = 5000;\n\n /**\n * If toast can be manually dismissed, this prop sets a custom aria-label for the ic-button component\n */\n @Prop() dismissButtonAriaLabel? = \"dismiss\";\n\n /**\n * How the toast will be dismissed. If manual will display a dismiss button.\n */\n @Prop({ mutable: true }) dismissMode?: IcActivationTypes = \"manual\";\n\n /**\n * The title to display at the start of the toast. (NOTE: Should be no more than `70` characters)\n */\n @Prop() heading!: string;\n\n /**\n * The main body message of the toast. (NOTE: Should be no more than `140` characters)\n */\n @Prop() message?: string;\n\n /**\n * Provides a custom alt-text to be announced to screen readers, if slotting a custom neutral icon\n */\n @Prop() neutralIconAriaLabel?: string;\n\n /**\n * The variant of the toast being rendered\n */\n @Prop({ mutable: true }) variant?: IcStatusVariants;\n\n /**\n * Is emitted when the user dismisses the toast\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n window.clearTimeout(this.dismissTimeout);\n window.clearInterval(this.timerRefreshInterval);\n }\n\n componentWillLoad(): void {\n this.handleLongText(\n this.heading.length > TOAST_HEADING_CHAR_LIMIT,\n this.message?.length > TOAST_MESSAGE_CHAR_LIMIT\n );\n\n if (this.autoDismissTimeout < 5000) this.autoDismissTimeout = 5000;\n\n if (isSlotUsed(this.el, \"action\")) this.dismissMode = \"manual\";\n this.isManual = this.dismissMode === \"manual\";\n\n if (isSlotUsed(this.el, \"neutral-icon\")) this.variant = \"neutral\";\n if (this.variant === \"neutral\") {\n this.neutralVariantLabel =\n this.neutralIconAriaLabel ?? VARIANT_ICONS[this.variant].ariaLabel;\n }\n\n if (this.isManual) {\n this.el.setAttribute(\n \"aria-label\",\n this.variant\n ? this.neutralVariantLabel || VARIANT_ICONS[this.variant].ariaLabel\n : this.heading\n );\n (this.variant || this.message) &&\n this.el.setAttribute(\n \"aria-description\",\n this.variant\n ? `${this.heading}${\n isPropDefined(this.message) ? `. ${this.message}` : \"\"\n }`\n : this.message\n );\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Toast\"\n );\n const actionContent = getSlot(this.el, \"action\") as ActionAreaElementTypes;\n const dismissButton = this.el.shadowRoot.querySelector(\"ic-button\");\n if (actionContent) this.interactiveElements.push(actionContent);\n if (dismissButton) this.interactiveElements.push(dismissButton);\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleDismiss(): void {\n this.visible = false;\n clearInterval(this.timerRefreshInterval);\n this.timerProgress = 100;\n }\n\n @Listen(\"keydown\", { target: \"document\" })\n handleKeyboard(ev: KeyboardEvent): void {\n if (this.isManual && this.visible) {\n switch (ev.key) {\n case \"Tab\":\n ev.preventDefault();\n this.findNextInteractiveElement(ev.shiftKey).setFocus();\n break;\n case \"Escape\":\n !ev.repeat && this.dismissAction();\n ev.stopImmediatePropagation();\n break;\n }\n }\n }\n\n @Listen(\"mouseenter\")\n @Listen(\"mouseleave\")\n handleTimer(ev: MouseEvent): void {\n if (!this.isManual) {\n switch (ev.type) {\n case \"mouseenter\":\n window.clearTimeout(this.dismissTimeout);\n window.clearInterval(this.timerRefreshInterval);\n this.timerProgress = 100;\n break;\n case \"mouseleave\":\n this.dismissTimeout = window.setTimeout(\n this.dismissAction,\n this.autoDismissTimeout\n );\n this.timerRefreshInterval = window.setInterval(\n this.handleProgressChange,\n AUTO_DISMISS_TIMER_REFRESH_RATE_MS\n );\n break;\n }\n }\n }\n\n /**\n * Used to display the individual toast\n * @returns The element that previously had focus before the toast appeared\n */\n @Method()\n async setVisible(): Promise<HTMLElement> {\n if (!this.visible) this.visible = true;\n if (!this.isManual) {\n this.dismissTimeout = window.setTimeout(\n this.dismissAction,\n this.autoDismissTimeout\n );\n this.timerRefreshInterval = window.setInterval(\n this.handleProgressChange,\n AUTO_DISMISS_TIMER_REFRESH_RATE_MS\n );\n return null;\n } else {\n window.setTimeout(() => this.interactiveElements[0].setFocus(), 200);\n return document.activeElement as HTMLElement;\n }\n }\n\n private dismissAction = (): void => {\n this.icDismiss.emit();\n };\n\n private handleProgressChange = () => {\n this.timerProgress -=\n (AUTO_DISMISS_TIMER_REFRESH_RATE_MS / this.autoDismissTimeout) * 100;\n };\n\n private handleLongText(\n headingTooLong: boolean,\n messageTooLong?: boolean\n ): void {\n if (messageTooLong || headingTooLong) {\n console.error(\n `Too many characters in toast ${headingTooLong ? \"heading\" : \"\"}${\n headingTooLong && messageTooLong ? \" and \" : \"\"\n }${\n messageTooLong ? \"message\" : \"\"\n }. Refer to character limits specified in the prop description`\n );\n }\n }\n\n private findNextInteractiveElement(\n isBackwards: boolean\n ): ActionAreaElementTypes {\n const first = this.interactiveElements[0];\n const last = this.interactiveElements[this.interactiveElements.length - 1];\n\n const source = isBackwards ? first : last;\n const target = isBackwards ? last : first;\n if (this.isActive(source)) return target;\n\n let currentIndex: number;\n const found = this.interactiveElements.some((el, index) => {\n if (!this.isActive(el)) return false;\n currentIndex = index;\n return true;\n });\n\n if (!found) return first;\n return this.interactiveElements[currentIndex + (isBackwards ? -1 : 1)];\n }\n\n private isActive(targetEl: HTMLElement): boolean {\n if (targetEl === this.el) return !!this.el.shadowRoot.activeElement;\n return document.activeElement === targetEl;\n }\n\n render() {\n const {\n variant,\n heading,\n message,\n visible,\n isManual,\n dismissButtonAriaLabel,\n } = this;\n return (\n <Host\n class={{ [\"hidden\"]: !visible }}\n role={isManual ? \"dialog\" : \"status\"}\n >\n <div class=\"container\">\n {variant && visible && (\n <div class=\"toast-icon-container\">\n <div\n class={{\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n }}\n ></div>\n {variant === \"neutral\" ? (\n <slot name=\"neutral-icon\" />\n ) : (\n <span\n class=\"toast-icon\"\n innerHTML={VARIANT_ICONS[variant].icon}\n ></span>\n )}\n </div>\n )}\n <div\n class={{\n [\"toast-content\"]: true,\n [\"no-icon\"]:\n variant === \"neutral\" && !isSlotUsed(this.el, \"neutral-icon\"),\n }}\n >\n <div class=\"toast-message\">\n <ic-typography variant=\"subtitle-large\">\n {visible && <h5>{heading}</h5>}\n </ic-typography>\n {message && (\n <ic-typography variant=\"body\">\n {visible && <p>{message}</p>}\n </ic-typography>\n )}\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"toast-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n {!isManual ? (\n <ic-loading-indicator\n class=\"toast-dismiss-timer\"\n appearance=\"light\"\n size=\"icon\"\n progress={this.timerProgress}\n ></ic-loading-indicator>\n ) : (\n <ic-button\n id=\"dismiss-button\"\n innerHTML={closeIcon}\n onClick={this.dismissAction}\n variant=\"icon\"\n appearance={IcThemeForegroundEnum.Light}\n aria-label={dismissButtonAriaLabel}\n ></ic-button>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-toast.entry.js","mappings":";;;;;AAAA,MAAM,UAAU,GAAG,4rJAA4rJ;;AC2B/sJ,MAAM,kCAAkC,GAAG,IAAI,CAAC;AAChD,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,wBAAwB,GAAG,GAAG,CAAC;MAWxB,KAAK;;;;IAER,wBAAmB,GAA6B,EAAE,CAAC;IA4KnD,kBAAa,GAAG;MACtB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACvB,CAAC;IAEM,yBAAoB,GAAG;MAC7B,IAAI,CAAC,aAAa;QAChB,CAAC,kCAAkC,GAAG,IAAI,CAAC,kBAAkB,IAAI,GAAG,CAAC;KACxE,CAAC;yBA5KuB,GAAG;mBACT,KAAK;8BAMuB,IAAI;kCAKjB,SAAS;uBAKgB,QAAQ;;;;;;EA2BnE,oBAAoB;IAClB,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACzC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;GACjD;EAED,iBAAiB;;IACf,IAAI,CAAC,cAAc,CACjB,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,wBAAwB,EAC9C,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,IAAG,wBAAwB,CAChD,CAAC;IAEF,IAAI,IAAI,CAAC,kBAAkB,GAAG,IAAI;MAAE,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAEnE,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC;MAAE,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;IAC/D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC;IAE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QACvB,CAAC,SAAS,GACR,OAAO,KAAK,SAAS,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC;OAChE,IAED,WAAK,KAAK,EAAC,eAAe,IACxB,qBAAe,OAAO,EAAC,gBAAgB,IACpC,OAAO,IAAI,cAAK,OAAO,CAAM,CAChB,EACf,OAAO,KACN,qBAAe,OAAO,EAAC,MAAM,IAC1B,OAAO,IAAI,aAAI,OAAO,CAAK,CACd,CACjB,CACG,EACL,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,KAC5B,WAAK,KAAK,EAAC,wBAAwB,IACjC,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,EACL,CAAC,QAAQ,IACR,4BACE,KAAK,EAAC,qBAAqB,EAC3B,UAAU,EAAC,OAAO,EAClB,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,IAAI,CAAC,aAAa,GACN,KAExB,iBACE,EAAE,EAAC,gBAAgB,EACnB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,OAAO,EAAC,MAAM,EACd,UAAU,EAAE,qBAAqB,CAAC,KAAK,gBAC3B,sBAAsB,GACvB,CACd,CACG,CACD,EACP;GACH;;;;;;;","names":[],"sources":["src/components/ic-toast/ic-toast.css?tag=ic-toast&encapsulation=shadow","src/components/ic-toast/ic-toast.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-toast: z-index of toast\n */\n\n:host {\n --bottom-position: var(--ic-space-xl);\n\n position: fixed;\n bottom: var(--bottom-position);\n left: 50%;\n transform: translate(-50%);\n animation: fadein var(--ic-transition-duration-slow) ease-in-out;\n z-index: var(--ic-z-index-toast);\n}\n\n:host(.hidden) {\n display: none;\n animation: fadeout var(--ic-transition-duration-slow) ease-in-out;\n}\n\n.container {\n max-width: 32.5rem;\n min-width: 18rem;\n box-shadow: var(--ic-elevation-overlay);\n min-height: 3.5rem;\n background-color: var(--ic-architectural-800);\n color: var(--ic-color-white-text);\n display: flex;\n align-items: center;\n position: relative;\n border-radius: var(--ic-border-radius);\n}\n\n.toast-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 position: absolute;\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n}\n\n.divider-neutral {\n background-color: var(--ic-status-unknown);\n}\n\n.divider-info {\n background-color: var(--ic-status-info-contrast);\n}\n\n.divider-warning {\n background-color: var(--ic-status-warning-contrast);\n}\n\n.divider-error {\n background-color: var(--ic-status-error-contrast);\n}\n\n.divider-success {\n background-color: var(--ic-status-success-contrast);\n}\n\n.toast-icon,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n}\n\n:host([variant=\"neutral\"]) .toast-icon svg,\n::slotted(svg) {\n fill: var(--ic-status-unknown);\n}\n\n:host([variant=\"info\"]) .toast-icon svg {\n fill: var(--ic-status-info-contrast);\n}\n\n:host([variant=\"warning\"]) .toast-icon svg {\n fill: var(--ic-status-warning-contrast);\n}\n\n:host([variant=\"error\"]) .toast-icon svg {\n fill: var(--ic-status-error-contrast);\n}\n\n:host([variant=\"success\"]) .toast-icon svg {\n fill: var(--ic-status-success-contrast);\n}\n\n.toast-content {\n margin-left: var(--ic-space-xs);\n width: 100%;\n}\n\n.no-icon {\n margin-left: var(--ic-space-md);\n}\n\n.toast-message {\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n.toast-action-container {\n padding-bottom: var(--ic-space-md);\n}\n\nic-button,\n.toast-dismiss-timer {\n padding: var(--ic-space-xs);\n}\n\n@media (max-width: 576px) {\n :host {\n --bottom-position: var(--ic-space-lg);\n\n width: calc(100% - 2 * var(--ic-space-md));\n }\n}\n\n@media (min-width: 993px) {\n :host {\n --bottom-position: calc(var(--ic-space-xl) + var(--ic-space-xs));\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-hc-border);\n }\n}\n\n@keyframes fadein {\n from {\n bottom: 0;\n opacity: 0;\n }\n\n to {\n bottom: var(--bottom-position);\n opacity: 1;\n }\n}\n\n@keyframes fadeout {\n from {\n bottom: var(--bottom-position);\n opacity: 1;\n }\n\n to {\n bottom: 0;\n opacity: 0;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Method,\n Prop,\n State,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\nimport {\n getSlot,\n isPropDefined,\n isSlotUsed,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport {\n IcActivationTypes,\n IcStatusVariants,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { ActionAreaElementTypes } from \"./ic-toast.types\";\n\nconst AUTO_DISMISS_TIMER_REFRESH_RATE_MS = 1000;\nconst TOAST_HEADING_CHAR_LIMIT = 70;\nconst TOAST_MESSAGE_CHAR_LIMIT = 140;\n\n/**\n * @slot action - IcButton or IcLink is placed below header and message. If used will default toast to manual `dismiss` type.\n * @slot neutral-icon - A custom neutral icon is placed on the left side of the component. If used will default toast to `neutral` variant.\n */\n@Component({\n tag: \"ic-toast\",\n styleUrl: \"ic-toast.css\",\n shadow: true,\n})\nexport class Toast {\n private dismissTimeout: number;\n private interactiveElements: ActionAreaElementTypes[] = [];\n private isManual: boolean;\n private neutralVariantLabel: string;\n private timerRefreshInterval: number;\n\n @Element() el: HTMLIcToastElement;\n\n @State() timerProgress = 100;\n @State() visible = false;\n\n /**\n * If toast dismissMode is set to `automatic`, use this prop to define the time before the toast dismisses (in MILLISECONDS)\n * (NOTE: Has a minimum value of `5000ms`)\n */\n @Prop({ mutable: true }) autoDismissTimeout? = 5000;\n\n /**\n * If toast can be manually dismissed, this prop sets a custom aria-label for the ic-button component\n */\n @Prop() dismissButtonAriaLabel? = \"dismiss\";\n\n /**\n * How the toast will be dismissed. If manual will display a dismiss button.\n */\n @Prop({ mutable: true }) dismissMode?: IcActivationTypes = \"manual\";\n\n /**\n * The title to display at the start of the toast. (NOTE: Should be no more than `70` characters)\n */\n @Prop() heading!: string;\n\n /**\n * The main body message of the toast. (NOTE: Should be no more than `140` characters)\n */\n @Prop() message?: string;\n\n /**\n * Provides a custom alt-text to be announced to screen readers, if slotting a custom neutral icon\n */\n @Prop() neutralIconAriaLabel?: string;\n\n /**\n * The variant of the toast being rendered\n */\n @Prop({ mutable: true }) variant?: IcStatusVariants;\n\n /**\n * Is emitted when the user dismisses the toast\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n window.clearTimeout(this.dismissTimeout);\n window.clearInterval(this.timerRefreshInterval);\n }\n\n componentWillLoad(): void {\n this.handleLongText(\n this.heading.length > TOAST_HEADING_CHAR_LIMIT,\n this.message?.length > TOAST_MESSAGE_CHAR_LIMIT\n );\n\n if (this.autoDismissTimeout < 5000) this.autoDismissTimeout = 5000;\n\n if (isSlotUsed(this.el, \"action\")) this.dismissMode = \"manual\";\n this.isManual = this.dismissMode === \"manual\";\n\n if (isSlotUsed(this.el, \"neutral-icon\")) this.variant = \"neutral\";\n if (this.variant === \"neutral\") {\n this.neutralVariantLabel =\n this.neutralIconAriaLabel ?? VARIANT_ICONS[this.variant].ariaLabel;\n }\n\n if (this.isManual) {\n const toastMessage: string = isPropDefined(this.message)\n ? `. ${this.message}`\n : \"\";\n this.el.setAttribute(\n \"aria-label\",\n this.variant\n ? this.neutralVariantLabel || VARIANT_ICONS[this.variant].ariaLabel\n : this.heading\n );\n (this.variant || this.message) &&\n this.el.setAttribute(\n \"aria-description\",\n this.variant ? `${this.heading}${toastMessage}` : this.message\n );\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Toast\"\n );\n const actionContent = getSlot(this.el, \"action\") as ActionAreaElementTypes;\n const dismissButton = this.el.shadowRoot.querySelector(\"ic-button\");\n if (actionContent) this.interactiveElements.push(actionContent);\n if (dismissButton) this.interactiveElements.push(dismissButton);\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleDismiss(): void {\n this.visible = false;\n clearInterval(this.timerRefreshInterval);\n this.timerProgress = 100;\n }\n\n @Listen(\"keydown\", { target: \"document\" })\n handleKeyboard(ev: KeyboardEvent): void {\n if (this.isManual && this.visible) {\n switch (ev.key) {\n case \"Tab\":\n ev.preventDefault();\n this.findNextInteractiveElement(ev.shiftKey).setFocus();\n break;\n case \"Escape\":\n !ev.repeat && this.dismissAction();\n ev.stopImmediatePropagation();\n break;\n }\n }\n }\n\n @Listen(\"mouseenter\")\n @Listen(\"mouseleave\")\n handleTimer(ev: MouseEvent): void {\n if (!this.isManual) {\n switch (ev.type) {\n case \"mouseenter\":\n window.clearTimeout(this.dismissTimeout);\n window.clearInterval(this.timerRefreshInterval);\n this.timerProgress = 100;\n break;\n case \"mouseleave\":\n this.dismissTimeout = window.setTimeout(\n this.dismissAction,\n this.autoDismissTimeout\n );\n this.timerRefreshInterval = window.setInterval(\n this.handleProgressChange,\n AUTO_DISMISS_TIMER_REFRESH_RATE_MS\n );\n break;\n }\n }\n }\n\n /**\n * @internal Used to display the individual toast.\n * @returns The element that previously had focus before the toast appeared\n */\n @Method()\n async setVisible(): Promise<HTMLElement> {\n if (!this.visible) this.visible = true;\n if (!this.isManual) {\n this.dismissTimeout = window.setTimeout(\n this.dismissAction,\n this.autoDismissTimeout\n );\n this.timerRefreshInterval = window.setInterval(\n this.handleProgressChange,\n AUTO_DISMISS_TIMER_REFRESH_RATE_MS\n );\n return null;\n } else {\n window.setTimeout(() => this.interactiveElements[0].setFocus(), 200);\n return document.activeElement as HTMLElement;\n }\n }\n\n private dismissAction = (): void => {\n this.icDismiss.emit();\n };\n\n private handleProgressChange = () => {\n this.timerProgress -=\n (AUTO_DISMISS_TIMER_REFRESH_RATE_MS / this.autoDismissTimeout) * 100;\n };\n\n private handleLongText(\n headingTooLong: boolean,\n messageTooLong?: boolean\n ): void {\n if (messageTooLong || headingTooLong) {\n console.error(\n `Too many characters in toast ${headingTooLong ? \"heading\" : \"\"}${\n headingTooLong && messageTooLong ? \" and \" : \"\"\n }${\n messageTooLong ? \"message\" : \"\"\n }. Refer to character limits specified in the prop description`\n );\n }\n }\n\n private findNextInteractiveElement(\n isBackwards: boolean\n ): ActionAreaElementTypes {\n const first = this.interactiveElements[0];\n const last = this.interactiveElements[this.interactiveElements.length - 1];\n\n const source = isBackwards ? first : last;\n const target = isBackwards ? last : first;\n if (this.isActive(source)) return target;\n\n let currentIndex: number;\n const found = this.interactiveElements.some((el, index) => {\n if (!this.isActive(el)) return false;\n currentIndex = index;\n return true;\n });\n\n if (!found) return first;\n return this.interactiveElements[currentIndex + (isBackwards ? -1 : 1)];\n }\n\n private isActive(targetEl: HTMLElement): boolean {\n if (targetEl === this.el) return !!this.el.shadowRoot.activeElement;\n return document.activeElement === targetEl;\n }\n\n render() {\n const {\n variant,\n heading,\n message,\n visible,\n isManual,\n dismissButtonAriaLabel,\n } = this;\n return (\n <Host\n class={{ [\"hidden\"]: !visible }}\n role={isManual ? \"dialog\" : \"status\"}\n >\n <div class=\"container\">\n {variant && visible && (\n <div class=\"toast-icon-container\">\n <div\n class={{\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n }}\n ></div>\n {variant === \"neutral\" ? (\n <slot name=\"neutral-icon\" />\n ) : (\n <span\n class=\"toast-icon\"\n innerHTML={VARIANT_ICONS[variant].icon}\n ></span>\n )}\n </div>\n )}\n <div\n class={{\n [\"toast-content\"]: true,\n [\"no-icon\"]:\n variant === \"neutral\" && !isSlotUsed(this.el, \"neutral-icon\"),\n }}\n >\n <div class=\"toast-message\">\n <ic-typography variant=\"subtitle-large\">\n {visible && <h5>{heading}</h5>}\n </ic-typography>\n {message && (\n <ic-typography variant=\"body\">\n {visible && <p>{message}</p>}\n </ic-typography>\n )}\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"toast-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n {!isManual ? (\n <ic-loading-indicator\n class=\"toast-dismiss-timer\"\n appearance=\"light\"\n size=\"icon\"\n progress={this.timerProgress}\n ></ic-loading-indicator>\n ) : (\n <ic-button\n id=\"dismiss-button\"\n innerHTML={closeIcon}\n onClick={this.dismissAction}\n variant=\"icon\"\n appearance={IcThemeForegroundEnum.Light}\n aria-label={dismissButtonAriaLabel}\n ></ic-button>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-813020f1.js';
2
2
  import { I as IcThemeForegroundEnum } from './types-b2398b37.js';
3
- import { L as getSlot, D as DEVICE_SIZES, e as getCurrentDeviceSize, u as getThemeForegroundColor, o as onComponentPropUndefinedChange, i as isSlotUsed, f as checkResizeObserver, a as onComponentRequiredPropUndefined, G as isEmptyString, d as isPropDefined } from './helpers-c325e537.js';
3
+ import { L as getSlot, D as DEVICE_SIZES, e as getCurrentDeviceSize, u as getThemeForegroundColor, o as onComponentPropUndefinedChange, i as isSlotUsed, f as checkResizeObserver, a as onComponentRequiredPropUndefined, G as isEmptyString, d as isPropDefined } from './helpers-24f6e762.js';
4
4
 
5
5
  const icTopNavigationCss = "/*! 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;color:var(--ic-theme-text);width:100%;position:relative}:host .top-navigation{background-color:var(--ic-theme-primary);height:-moz-max-content;height:max-content}:host(.fullwidth-searchbar) slot[name=\"search\"]::slotted(form){width:100%}:host .title-link{display:inline-flex;align-items:center;text-decoration:none;padding:var(--ic-space-xxs);transition:var(--ic-easing-transition-fast)}:host .title-link,:host .title-link:visited,:host .title-link:active,:host .title-link ::slotted(a),:host .title-link:visited ::slotted(a),:host .title-link:active ::slotted(a){color:var(--ic-theme-text);text-decoration:none;outline:none}:host .title-link:hover:not(:focus){background-color:var(--ic-theme-hover)}:host .title-link:active:not(:focus){background-color:var(--ic-theme-active)}:host .title-link:hover{border-radius:var(--ic-border-radius)}:host .title-link:focus,:host .title-link:focus-within{border-radius:var(--ic-border-radius);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}:host .title-link ic-typography{font-weight:600}:host .nav-panel-container{border-top:var(--ic-keyline-lighten);padding:0 var(--ic-space-lg);margin-left:calc(-1 * var(--section-container-margin));margin-right:calc(-1 * var(--section-container-margin));display:flex}:host(.dark) .nav-panel-container{border-top:var(--ic-keyline-darken)}.top-panel-container{display:flex;padding-top:0.5rem;padding-bottom:0.5rem}.navigation-tabs{margin-top:calc(-1 * var(--ic-space-1px))}.app-details-container{display:flex;align-items:center;flex:1 1 auto;margin-right:var(--ic-space-md)}.app-icon-container{display:flex;padding-right:var(--ic-space-xs)}.icon-buttons-container{display:flex;margin-left:var(--ic-space-md)}.icon-buttons-container ::slotted(nav){display:flex}.title-wrap{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}:host .app-status{border-radius:var(--ic-space-md);background-color:var(--ic-architectural-white);color:var(--ic-color-primary-text);padding:var(--ic-space-xxs) var(--ic-space-lg);margin-left:var(--ic-space-md);flex:1 1 0;max-width:-moz-fit-content;max-width:fit-content}:host(.dark) .app-status{background-color:var(--ic-theme-text);color:var(--ic-color-white-text)}:host .app-version{border-radius:var(--ic-space-md);background-color:var(--ic-theme-active);padding:var(--ic-space-xxs) var(--ic-space-sm);margin-left:var(--ic-space-xs);flex:1 1 0;max-width:-moz-fit-content;max-width:fit-content}slot[name=\"app-icon\"]::slotted(svg){fill:var(--ic-theme-text);width:2em;height:2em}slot[name=\"toggle-icon\"] svg{fill:var(--ic-theme-text)}.search-menu-container{justify-content:right;display:flex;align-items:center}.menu-button-container{margin-left:var(--ic-space-md)}.menu-button-container .navigation-landmark-button-text{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.search-actions-container{display:flex}.menu-buttons-slot{display:flex;flex-direction:column}.navigation-landmark-text{position:absolute;width:var(--ic-space-1px);height:var(--ic-space-1px);padding:0;margin:calc(-1 * var(--ic-space-1px));overflow:hidden}.navigation-item-list{display:flex;list-style:none;height:2.75rem}.navigation-item-list::-webkit-scrollbar{display:none}:host ic-section-container{padding-bottom:0 !important;padding-top:0 !important}@media screen and (min-width: 993px){.app-details-container{margin-right:var(--ic-space-lg)}}@media screen and (max-width: 1200px){:host .nav-panel-container{padding:0 var(--ic-space-md)}}@media screen and (max-width: 992px){:host .nav-panel-container,:host .app-status,:host .app-version{display:none}:host .title-link{margin-right:var(--ic-space-xs)}.search-menu-container{max-width:10rem}.search-bar-container{display:flex;justify-content:center;align-items:center;border-top:var(--ic-keyline-darken);height:4rem;padding-left:var(--ic-space-md);padding-right:var(--ic-space-md);margin-left:calc(-1 * var(--section-container-margin));margin-right:calc(-1 * var(--section-container-margin))}}@media screen and (max-width: 576px){:host .title-link{margin-right:var(--ic-space-xxxs);word-break:break-word;-webkit-hyphens:none;hyphens:none}.top-panel-container{min-height:2.5rem}.searchbox-inline{display:none}.search-bar-container{margin-top:0;height:3.5rem;padding-left:var(--ic-space-xs);padding-right:var(--ic-space-xs)}.menu-button-container{margin-left:var(--ic-space-sm)}slot[name=\"app-icon\"]::slotted(svg){width:1.5em;height:1.5em}slot[name=\"toggle-icon\"] svg{width:1.5em;height:1.5em}}@media (forced-colors: active){:host .top-navigation{border-bottom:var(--ic-hc-border)}.app-status,.app-version{border:var(--ic-hc-border)}slot[name=\"app-icon\"]::slotted(svg){fill:currentcolor}}";
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-813020f1.js';
2
- import { f as checkResizeObserver } from './helpers-c325e537.js';
2
+ import { f as checkResizeObserver } from './helpers-24f6e762.js';
3
3
  import './types-b2398b37.js';
4
4
 
5
5
  const icTypographyCss = "/*! 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;position:relative}:host(.ic-typography-vertical-margins-h1){margin:0 0 var(--ic-space-xl)}:host(.ic-typography-vertical-margins-h2){margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}:host(.ic-typography-vertical-margins-h3){margin:var(--ic-space-xl) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-h4){margin:var(--ic-space-lg) 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-subtitle-large),:host(.ic-typography-vertical-margins-subtitle-small),:host(.ic-typography-vertical-margins-body),:host(.ic-typography-vertical-margins-code-large),:host(.ic-typography-vertical-margins-code-small),:host(.ic-typography-vertical-margins-code-extra-small){margin:0 0 var(--ic-space-md)}:host(.ic-typography-vertical-margins-caption),:host(.ic-typography-vertical-margins-caption-uppercase){margin:0 0 var(--ic-space-xs)}:host(.ic-typography-vertical-margins-h2:first-child),:host(.ic-typography-vertical-margins-h3:first-child),:host(.ic-typography-vertical-margins-h4:first-child){margin-top:0}:host(.ic-typography-h1){font:var(--ic-font-h1) !important}:host(.ic-typography-h2){font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-h3){font:var(--ic-font-h3)}:host(.ic-typography-h4){font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-large){font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-subtitle-small){font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}:host(.ic-typography-body){font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-caption){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-caption-uppercase){font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}:host(.ic-typography-label){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-label-uppercase){font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}:host(.ic-typography-code-large){font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-code-small){font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}:host(.ic-typography-code-extra-small){font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}:host(.ic-typography-badge){font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-badge-small){font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}:host(.ic-typography-no-wrap){white-space:nowrap}:host ::slotted(h1),:host ::slotted(h2),:host ::slotted(h3),:host ::slotted(h4),:host ::slotted(h5),:host ::slotted(h6),:host ::slotted(p),:host ::slotted(label){font:inherit;letter-spacing:inherit}.trunc-wrapper{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden}.trunc-btn{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}.trunc-btn:hover,.trunc-btn.focus{outline:none;border-bottom:var(--ic-space-xxs) solid !important;margin-bottom:calc(-1 * var(--ic-space-xxs)) !important;text-decoration:none;cursor:pointer}:host(.strikethrough){text-decoration:line-through}:host(.underline){text-decoration:underline}:host(.underline.strikethrough){text-decoration:line-through underline}:host(.italic){font-style:italic !important}:host(.bold){font-weight:var(--ic-font-weight-bold)}@supports (text-decoration-thickness: 25%){.trunc-btn:hover,.trunc-btn.focus{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";