@ukic/web-components 2.32.0 → 2.33.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (424) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-94b33ab0.js → helpers-df61b63f.js} +5 -1
  3. package/dist/cjs/helpers-df61b63f.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-accordion.cjs.entry.js +8 -1
  6. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-badge.cjs.entry.js +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 +7 -1
  14. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +5 -1
  18. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-chip.cjs.entry.js +9 -4
  20. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  23. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +11 -2
  31. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-menu-item.cjs.entry.js +7 -1
  36. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-pagination-item.cjs.entry.js +5 -1
  43. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-pagination.cjs.entry.js +5 -1
  45. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-radio-group.cjs.entry.js +2 -1
  48. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-radio-option.cjs.entry.js +5 -1
  50. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-search-bar.cjs.entry.js +5 -1
  52. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-select.cjs.entry.js +5 -1
  54. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-side-navigation.cjs.entry.js +13 -9
  56. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-switch.cjs.entry.js +6 -2
  61. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-tab.cjs.entry.js +5 -2
  64. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-text-field.cjs.entry.js +18 -10
  66. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +9 -0
  70. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-toggle-button.cjs.entry.js +7 -1
  72. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  75. package/dist/cjs/loader.cjs.js +1 -1
  76. package/dist/collection/components/ic-accordion/ic-accordion.js +10 -1
  77. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  78. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js +3 -0
  79. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js.map +1 -1
  80. package/dist/collection/components/ic-card/ic-card.js +9 -0
  81. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  82. package/dist/collection/components/ic-card/test/basic/ic-card.spec.js +10 -0
  83. package/dist/collection/components/ic-card/test/basic/ic-card.spec.js.map +1 -1
  84. package/dist/collection/components/ic-checkbox/ic-checkbox.js +6 -0
  85. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  86. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +6 -0
  87. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  88. package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js +3 -0
  89. package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js.map +1 -1
  90. package/dist/collection/components/ic-chip/ic-chip.js +27 -2
  91. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  92. package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js +3 -0
  93. package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js.map +1 -1
  94. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +15 -3
  95. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  96. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +9 -0
  97. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
  98. package/dist/collection/components/ic-menu-item/ic-menu-item.js +9 -0
  99. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  100. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js +13 -0
  101. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js.map +1 -1
  102. package/dist/collection/components/ic-pagination/ic-pagination.js +6 -0
  103. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  104. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +10 -0
  105. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -1
  106. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +6 -0
  107. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
  108. package/dist/collection/components/ic-pagination-item/test/basic/ic-pagination-item.spec.js +3 -0
  109. package/dist/collection/components/ic-pagination-item/test/basic/ic-pagination-item.spec.js.map +1 -1
  110. package/dist/collection/components/ic-radio-group/ic-radio-group.js +1 -0
  111. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  112. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js +6 -0
  113. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js.map +1 -1
  114. package/dist/collection/components/ic-radio-option/ic-radio-option.js +6 -0
  115. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  116. package/dist/collection/components/ic-search-bar/ic-search-bar.js +6 -0
  117. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  118. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js +3 -0
  119. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js.map +1 -1
  120. package/dist/collection/components/ic-select/ic-select.js +6 -0
  121. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  122. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +10 -0
  123. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  124. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +12 -8
  125. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  126. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js +107 -0
  127. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js.map +1 -1
  128. package/dist/collection/components/ic-switch/ic-switch.js +6 -0
  129. package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
  130. package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js +3 -0
  131. package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js.map +1 -1
  132. package/dist/collection/components/ic-tab/ic-tab.js +6 -0
  133. package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
  134. package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js +16 -0
  135. package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js.map +1 -1
  136. package/dist/collection/components/ic-text-field/ic-text-field.js +19 -9
  137. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  138. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js +3 -0
  139. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js.map +1 -1
  140. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +9 -0
  141. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  142. package/dist/collection/components/ic-toggle-button/test/basic/ic-toggle-button.spec.js +10 -0
  143. package/dist/collection/components/ic-toggle-button/test/basic/ic-toggle-button.spec.js.map +1 -1
  144. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +11 -0
  145. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
  146. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +104 -0
  147. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -1
  148. package/dist/collection/utils/helpers.js +4 -0
  149. package/dist/collection/utils/helpers.js.map +1 -1
  150. package/dist/components/helpers.js +5 -1
  151. package/dist/components/helpers.js.map +1 -1
  152. package/dist/components/ic-accordion.js +9 -1
  153. package/dist/components/ic-accordion.js.map +1 -1
  154. package/dist/components/ic-card.js +9 -1
  155. package/dist/components/ic-card.js.map +1 -1
  156. package/dist/components/ic-checkbox-group.js +5 -0
  157. package/dist/components/ic-checkbox-group.js.map +1 -1
  158. package/dist/components/ic-checkbox.js +5 -0
  159. package/dist/components/ic-checkbox.js.map +1 -1
  160. package/dist/components/ic-chip.js +11 -4
  161. package/dist/components/ic-chip.js.map +1 -1
  162. package/dist/components/ic-input-component-container2.js +13 -2
  163. package/dist/components/ic-input-component-container2.js.map +1 -1
  164. package/dist/components/ic-menu-item2.js +9 -1
  165. package/dist/components/ic-menu-item2.js.map +1 -1
  166. package/dist/components/ic-pagination-item2.js +6 -1
  167. package/dist/components/ic-pagination-item2.js.map +1 -1
  168. package/dist/components/ic-pagination.js +5 -0
  169. package/dist/components/ic-pagination.js.map +1 -1
  170. package/dist/components/ic-radio-group.js +1 -0
  171. package/dist/components/ic-radio-group.js.map +1 -1
  172. package/dist/components/ic-radio-option.js +6 -1
  173. package/dist/components/ic-radio-option.js.map +1 -1
  174. package/dist/components/ic-search-bar.js +6 -1
  175. package/dist/components/ic-search-bar.js.map +1 -1
  176. package/dist/components/ic-select.js +6 -1
  177. package/dist/components/ic-select.js.map +1 -1
  178. package/dist/components/ic-side-navigation.js +13 -9
  179. package/dist/components/ic-side-navigation.js.map +1 -1
  180. package/dist/components/ic-switch.js +8 -3
  181. package/dist/components/ic-switch.js.map +1 -1
  182. package/dist/components/ic-tab.js +5 -2
  183. package/dist/components/ic-tab.js.map +1 -1
  184. package/dist/components/ic-text-field2.js +19 -10
  185. package/dist/components/ic-text-field2.js.map +1 -1
  186. package/dist/components/ic-toggle-button-group.js +11 -1
  187. package/dist/components/ic-toggle-button-group.js.map +1 -1
  188. package/dist/components/ic-toggle-button.js +9 -1
  189. package/dist/components/ic-toggle-button.js.map +1 -1
  190. package/dist/components/ic-top-navigation.js +1 -1
  191. package/dist/core/core.esm.js +1 -1
  192. package/dist/core/core.esm.js.map +1 -1
  193. package/dist/core/{p-22ef3303.entry.js → p-04876964.entry.js} +2 -2
  194. package/dist/core/p-04876964.entry.js.map +1 -0
  195. package/dist/core/p-050dc124.entry.js +2 -0
  196. package/dist/core/p-050dc124.entry.js.map +1 -0
  197. package/dist/core/{p-230187a8.entry.js → p-0bd82370.entry.js} +2 -2
  198. package/dist/core/{p-1d6e6ebe.entry.js → p-145a4619.entry.js} +2 -2
  199. package/dist/core/{p-96505636.entry.js → p-1ee0b4eb.entry.js} +2 -2
  200. package/dist/core/p-1ee0b4eb.entry.js.map +1 -0
  201. package/dist/core/{p-3b4c9571.entry.js → p-20203682.entry.js} +2 -2
  202. package/dist/core/p-20203682.entry.js.map +1 -0
  203. package/dist/core/{p-2d930c9c.entry.js → p-2c93290d.entry.js} +2 -2
  204. package/dist/core/p-2c93290d.entry.js.map +1 -0
  205. package/dist/core/{p-7591805d.entry.js → p-350d89d0.entry.js} +2 -2
  206. package/dist/core/p-45b9b893.entry.js +2 -0
  207. package/dist/core/p-45b9b893.entry.js.map +1 -0
  208. package/dist/core/{p-74a7b421.entry.js → p-48922e0a.entry.js} +2 -2
  209. package/dist/core/p-48922e0a.entry.js.map +1 -0
  210. package/dist/core/{p-570f1930.entry.js → p-4bb9c52f.entry.js} +2 -2
  211. package/dist/core/{p-223889da.entry.js → p-5739e0a9.entry.js} +2 -2
  212. package/dist/core/{p-d638d75d.entry.js → p-5a7fd661.entry.js} +2 -2
  213. package/dist/core/p-5a7fd661.entry.js.map +1 -0
  214. package/dist/core/{p-60f7f555.entry.js → p-5ec8938f.entry.js} +2 -2
  215. package/dist/core/{p-02262e76.entry.js → p-614cb828.entry.js} +2 -2
  216. package/dist/core/p-614cb828.entry.js.map +1 -0
  217. package/dist/core/{p-be5d5f93.entry.js → p-618a0098.entry.js} +2 -2
  218. package/dist/core/{p-ea58ae1d.entry.js → p-63b88ad2.entry.js} +2 -2
  219. package/dist/core/{p-03f23a55.entry.js → p-649bd0e1.entry.js} +2 -2
  220. package/dist/core/{p-843ed766.entry.js → p-6c31fd9f.entry.js} +2 -2
  221. package/dist/core/{p-fef9e8c9.js → p-6d23ec8e.js} +2 -2
  222. package/dist/core/{p-fef9e8c9.js.map → p-6d23ec8e.js.map} +1 -1
  223. package/dist/core/{p-c1d5e7f2.entry.js → p-72a854dd.entry.js} +2 -2
  224. package/dist/core/{p-78605899.entry.js → p-742189ad.entry.js} +2 -2
  225. package/dist/core/{p-dd9d8e68.entry.js → p-7e6fa0ea.entry.js} +2 -2
  226. package/dist/core/{p-e1def80b.entry.js → p-7ef7adc4.entry.js} +2 -2
  227. package/dist/core/p-8920ebe6.entry.js +2 -0
  228. package/dist/core/p-8920ebe6.entry.js.map +1 -0
  229. package/dist/core/{p-85f30b1c.entry.js → p-90e4679d.entry.js} +2 -2
  230. package/dist/core/{p-def5ba6b.entry.js → p-9ab3b47e.entry.js} +2 -2
  231. package/dist/core/{p-5fad22f1.entry.js → p-a15dfa51.entry.js} +2 -2
  232. package/dist/core/{p-69576aa0.entry.js → p-a4f42217.entry.js} +2 -2
  233. package/dist/core/p-ac39415d.entry.js +2 -0
  234. package/dist/core/p-ac39415d.entry.js.map +1 -0
  235. package/dist/core/{p-77d49138.entry.js → p-ad2a8eab.entry.js} +2 -2
  236. package/dist/core/{p-5ccd3703.entry.js → p-ae89e61c.entry.js} +2 -2
  237. package/dist/core/{p-55b11f6f.entry.js → p-b8de998d.entry.js} +2 -2
  238. package/dist/core/{p-13a6e7ea.entry.js → p-bb21769c.entry.js} +2 -2
  239. package/dist/core/p-bdb77a91.entry.js +2 -0
  240. package/dist/core/p-bdb77a91.entry.js.map +1 -0
  241. package/dist/core/{p-0a20131b.entry.js → p-c02f2a47.entry.js} +2 -2
  242. package/dist/core/p-c02f2a47.entry.js.map +1 -0
  243. package/dist/core/{p-dd4ef67f.entry.js → p-c0885ea6.entry.js} +2 -2
  244. package/dist/core/{p-8c325d9b.entry.js → p-c8b56283.entry.js} +2 -2
  245. package/dist/core/{p-2c587c73.entry.js → p-cb344d95.entry.js} +2 -2
  246. package/dist/core/{p-c1a74ee4.entry.js → p-cb5f7b90.entry.js} +2 -2
  247. package/dist/core/p-cc6a677b.entry.js +2 -0
  248. package/dist/core/p-cc6a677b.entry.js.map +1 -0
  249. package/dist/core/{p-0aed0cee.entry.js → p-d4d4b392.entry.js} +2 -2
  250. package/dist/core/{p-9c9ba3cd.entry.js → p-d9e36712.entry.js} +2 -2
  251. package/dist/core/p-de3d293b.entry.js +2 -0
  252. package/dist/core/p-de3d293b.entry.js.map +1 -0
  253. package/dist/core/{p-13ec2a00.entry.js → p-e218165c.entry.js} +2 -2
  254. package/dist/core/{p-ee1c9f20.entry.js → p-ec15bf1b.entry.js} +2 -2
  255. package/dist/core/{p-9feec47e.entry.js → p-ef4acad9.entry.js} +2 -2
  256. package/dist/core/p-f1583332.entry.js +2 -0
  257. package/dist/core/p-f1583332.entry.js.map +1 -0
  258. package/dist/core/{p-0677ee1e.entry.js → p-f1bf36e4.entry.js} +2 -2
  259. package/dist/core/p-f1bf36e4.entry.js.map +1 -0
  260. package/dist/core/{p-604e72ac.entry.js → p-f53503ca.entry.js} +2 -2
  261. package/dist/core/{p-457a4c63.entry.js → p-f61a4e8d.entry.js} +2 -2
  262. package/dist/core/p-f61a4e8d.entry.js.map +1 -0
  263. package/dist/core/{p-3af60dee.entry.js → p-f73cb96b.entry.js} +2 -2
  264. package/dist/core/{p-de0afa78.entry.js → p-fa83d7c2.entry.js} +2 -2
  265. package/dist/core/p-fa83d7c2.entry.js.map +1 -0
  266. package/dist/esm/core.js +1 -1
  267. package/dist/esm/{helpers-3905ccc4.js → helpers-b0150c61.js} +6 -2
  268. package/dist/esm/helpers-b0150c61.js.map +1 -0
  269. package/dist/esm/ic-accordion-group.entry.js +1 -1
  270. package/dist/esm/ic-accordion.entry.js +8 -1
  271. package/dist/esm/ic-accordion.entry.js.map +1 -1
  272. package/dist/esm/ic-alert.entry.js +1 -1
  273. package/dist/esm/ic-back-to-top.entry.js +1 -1
  274. package/dist/esm/ic-badge.entry.js +1 -1
  275. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  276. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  277. package/dist/esm/ic-button_3.entry.js +1 -1
  278. package/dist/esm/ic-card.entry.js +7 -1
  279. package/dist/esm/ic-card.entry.js.map +1 -1
  280. package/dist/esm/ic-checkbox-group.entry.js +5 -1
  281. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  282. package/dist/esm/ic-checkbox.entry.js +5 -1
  283. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  284. package/dist/esm/ic-chip.entry.js +9 -4
  285. package/dist/esm/ic-chip.entry.js.map +1 -1
  286. package/dist/esm/ic-data-row.entry.js +1 -1
  287. package/dist/esm/ic-dialog.entry.js +1 -1
  288. package/dist/esm/ic-divider.entry.js +1 -1
  289. package/dist/esm/ic-empty-state.entry.js +1 -1
  290. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  291. package/dist/esm/ic-footer-link.entry.js +1 -1
  292. package/dist/esm/ic-footer.entry.js +1 -1
  293. package/dist/esm/ic-hero.entry.js +1 -1
  294. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  295. package/dist/esm/ic-input-component-container_3.entry.js +11 -2
  296. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  297. package/dist/esm/ic-input-label_2.entry.js +1 -1
  298. package/dist/esm/ic-link.entry.js +1 -1
  299. package/dist/esm/ic-menu-group.entry.js +1 -1
  300. package/dist/esm/ic-menu-item.entry.js +7 -1
  301. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  302. package/dist/esm/ic-navigation-button.entry.js +1 -1
  303. package/dist/esm/ic-navigation-group.entry.js +1 -1
  304. package/dist/esm/ic-navigation-item.entry.js +1 -1
  305. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  306. package/dist/esm/ic-page-header.entry.js +1 -1
  307. package/dist/esm/ic-pagination-item.entry.js +5 -1
  308. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  309. package/dist/esm/ic-pagination.entry.js +5 -1
  310. package/dist/esm/ic-pagination.entry.js.map +1 -1
  311. package/dist/esm/ic-popover-menu.entry.js +1 -1
  312. package/dist/esm/ic-radio-group.entry.js +2 -1
  313. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  314. package/dist/esm/ic-radio-option.entry.js +5 -1
  315. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  316. package/dist/esm/ic-search-bar.entry.js +5 -1
  317. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  318. package/dist/esm/ic-select.entry.js +5 -1
  319. package/dist/esm/ic-select.entry.js.map +1 -1
  320. package/dist/esm/ic-side-navigation.entry.js +13 -9
  321. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  322. package/dist/esm/ic-status-tag.entry.js +1 -1
  323. package/dist/esm/ic-step.entry.js +1 -1
  324. package/dist/esm/ic-stepper.entry.js +1 -1
  325. package/dist/esm/ic-switch.entry.js +6 -2
  326. package/dist/esm/ic-switch.entry.js.map +1 -1
  327. package/dist/esm/ic-tab-group.entry.js +1 -1
  328. package/dist/esm/ic-tab.entry.js +5 -2
  329. package/dist/esm/ic-tab.entry.js.map +1 -1
  330. package/dist/esm/ic-text-field.entry.js +18 -10
  331. package/dist/esm/ic-text-field.entry.js.map +1 -1
  332. package/dist/esm/ic-theme.entry.js +1 -1
  333. package/dist/esm/ic-toast.entry.js +1 -1
  334. package/dist/esm/ic-toggle-button-group.entry.js +9 -0
  335. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  336. package/dist/esm/ic-toggle-button.entry.js +7 -1
  337. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  338. package/dist/esm/ic-top-navigation.entry.js +1 -1
  339. package/dist/esm/ic-typography.entry.js +1 -1
  340. package/dist/esm/loader.js +1 -1
  341. package/dist/types/components/ic-accordion/ic-accordion.d.ts +2 -0
  342. package/dist/types/components/ic-card/ic-card.d.ts +1 -0
  343. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +1 -0
  344. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -0
  345. package/dist/types/components/ic-chip/ic-chip.d.ts +5 -0
  346. package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +2 -0
  347. package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +1 -0
  348. package/dist/types/components/ic-pagination/ic-pagination.d.ts +1 -0
  349. package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +1 -0
  350. package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +1 -0
  351. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -0
  352. package/dist/types/components/ic-select/ic-select.d.ts +1 -0
  353. package/dist/types/components/ic-switch/ic-switch.d.ts +1 -0
  354. package/dist/types/components/ic-tab/ic-tab.d.ts +1 -0
  355. package/dist/types/components/ic-text-field/ic-text-field.d.ts +2 -0
  356. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +1 -0
  357. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +1 -0
  358. package/dist/types/components.d.ts +8 -0
  359. package/dist/types/utils/helpers.d.ts +4 -0
  360. package/hydrate/index.js +122 -23
  361. package/package.json +4 -9
  362. package/vscode-data.json +4 -0
  363. package/dist/cjs/helpers-94b33ab0.js.map +0 -1
  364. package/dist/core/p-02262e76.entry.js.map +0 -1
  365. package/dist/core/p-0677ee1e.entry.js.map +0 -1
  366. package/dist/core/p-07514ea0.entry.js +0 -2
  367. package/dist/core/p-07514ea0.entry.js.map +0 -1
  368. package/dist/core/p-0a20131b.entry.js.map +0 -1
  369. package/dist/core/p-22ef3303.entry.js.map +0 -1
  370. package/dist/core/p-2889cc17.entry.js +0 -2
  371. package/dist/core/p-2889cc17.entry.js.map +0 -1
  372. package/dist/core/p-2d930c9c.entry.js.map +0 -1
  373. package/dist/core/p-3b4c9571.entry.js.map +0 -1
  374. package/dist/core/p-457a4c63.entry.js.map +0 -1
  375. package/dist/core/p-74a7b421.entry.js.map +0 -1
  376. package/dist/core/p-81deed36.entry.js +0 -2
  377. package/dist/core/p-81deed36.entry.js.map +0 -1
  378. package/dist/core/p-94d5aa77.entry.js +0 -2
  379. package/dist/core/p-94d5aa77.entry.js.map +0 -1
  380. package/dist/core/p-96505636.entry.js.map +0 -1
  381. package/dist/core/p-b1879a44.entry.js +0 -2
  382. package/dist/core/p-b1879a44.entry.js.map +0 -1
  383. package/dist/core/p-cdf6e902.entry.js +0 -2
  384. package/dist/core/p-cdf6e902.entry.js.map +0 -1
  385. package/dist/core/p-d638d75d.entry.js.map +0 -1
  386. package/dist/core/p-da5098db.entry.js +0 -2
  387. package/dist/core/p-da5098db.entry.js.map +0 -1
  388. package/dist/core/p-dbc0f5da.entry.js +0 -2
  389. package/dist/core/p-dbc0f5da.entry.js.map +0 -1
  390. package/dist/core/p-de0afa78.entry.js.map +0 -1
  391. package/dist/esm/helpers-3905ccc4.js.map +0 -1
  392. /package/dist/core/{p-230187a8.entry.js.map → p-0bd82370.entry.js.map} +0 -0
  393. /package/dist/core/{p-1d6e6ebe.entry.js.map → p-145a4619.entry.js.map} +0 -0
  394. /package/dist/core/{p-7591805d.entry.js.map → p-350d89d0.entry.js.map} +0 -0
  395. /package/dist/core/{p-570f1930.entry.js.map → p-4bb9c52f.entry.js.map} +0 -0
  396. /package/dist/core/{p-223889da.entry.js.map → p-5739e0a9.entry.js.map} +0 -0
  397. /package/dist/core/{p-60f7f555.entry.js.map → p-5ec8938f.entry.js.map} +0 -0
  398. /package/dist/core/{p-be5d5f93.entry.js.map → p-618a0098.entry.js.map} +0 -0
  399. /package/dist/core/{p-ea58ae1d.entry.js.map → p-63b88ad2.entry.js.map} +0 -0
  400. /package/dist/core/{p-03f23a55.entry.js.map → p-649bd0e1.entry.js.map} +0 -0
  401. /package/dist/core/{p-843ed766.entry.js.map → p-6c31fd9f.entry.js.map} +0 -0
  402. /package/dist/core/{p-c1d5e7f2.entry.js.map → p-72a854dd.entry.js.map} +0 -0
  403. /package/dist/core/{p-78605899.entry.js.map → p-742189ad.entry.js.map} +0 -0
  404. /package/dist/core/{p-dd9d8e68.entry.js.map → p-7e6fa0ea.entry.js.map} +0 -0
  405. /package/dist/core/{p-e1def80b.entry.js.map → p-7ef7adc4.entry.js.map} +0 -0
  406. /package/dist/core/{p-85f30b1c.entry.js.map → p-90e4679d.entry.js.map} +0 -0
  407. /package/dist/core/{p-def5ba6b.entry.js.map → p-9ab3b47e.entry.js.map} +0 -0
  408. /package/dist/core/{p-5fad22f1.entry.js.map → p-a15dfa51.entry.js.map} +0 -0
  409. /package/dist/core/{p-69576aa0.entry.js.map → p-a4f42217.entry.js.map} +0 -0
  410. /package/dist/core/{p-77d49138.entry.js.map → p-ad2a8eab.entry.js.map} +0 -0
  411. /package/dist/core/{p-5ccd3703.entry.js.map → p-ae89e61c.entry.js.map} +0 -0
  412. /package/dist/core/{p-55b11f6f.entry.js.map → p-b8de998d.entry.js.map} +0 -0
  413. /package/dist/core/{p-13a6e7ea.entry.js.map → p-bb21769c.entry.js.map} +0 -0
  414. /package/dist/core/{p-dd4ef67f.entry.js.map → p-c0885ea6.entry.js.map} +0 -0
  415. /package/dist/core/{p-8c325d9b.entry.js.map → p-c8b56283.entry.js.map} +0 -0
  416. /package/dist/core/{p-2c587c73.entry.js.map → p-cb344d95.entry.js.map} +0 -0
  417. /package/dist/core/{p-c1a74ee4.entry.js.map → p-cb5f7b90.entry.js.map} +0 -0
  418. /package/dist/core/{p-0aed0cee.entry.js.map → p-d4d4b392.entry.js.map} +0 -0
  419. /package/dist/core/{p-9c9ba3cd.entry.js.map → p-d9e36712.entry.js.map} +0 -0
  420. /package/dist/core/{p-13ec2a00.entry.js.map → p-e218165c.entry.js.map} +0 -0
  421. /package/dist/core/{p-ee1c9f20.entry.js.map → p-ec15bf1b.entry.js.map} +0 -0
  422. /package/dist/core/{p-9feec47e.entry.js.map → p-ef4acad9.entry.js.map} +0 -0
  423. /package/dist/core/{p-604e72ac.entry.js.map → p-f53503ca.entry.js.map} +0 -0
  424. /package/dist/core/{p-3af60dee.entry.js.map → p-f73cb96b.entry.js.map} +0 -0
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f982899d.js');
6
6
  const types = require('./types-dc22e301.js');
7
- const helpers = require('./helpers-94b33ab0.js');
7
+ const helpers = require('./helpers-df61b63f.js');
8
8
 
9
9
  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;--ic-input-label-helpertext-padding:var(--ic-space-xxs)}: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);padding-right:var(--ic-space-xxxs)}.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}}";
10
10
 
@@ -74,6 +74,17 @@ const TextField = class {
74
74
  index.forceUpdate(this);
75
75
  }
76
76
  };
77
+ this.showValidation = () => {
78
+ const maxNumChars = this.readonly ? 0 : this.maxLength;
79
+ const emptyString = helpers.isEmptyString(this.validationStatus) ||
80
+ helpers.isEmptyString(this.validationText);
81
+ const valueOutsideRange = this.minValueUnattained || this.maxValueExceeded;
82
+ const charOutsideRange = maxNumChars > 0 ||
83
+ this.maxCharactersError ||
84
+ this.minCharactersUnattained;
85
+ return ((!emptyString || valueOutsideRange || charOutsideRange) &&
86
+ !this.validationInlineInternal);
87
+ };
77
88
  this.numChars = 0;
78
89
  this.maxCharactersReached = false;
79
90
  this.maxCharactersError = false;
@@ -123,6 +134,9 @@ const TextField = class {
123
134
  this.value = "";
124
135
  this.initialValue = this.value;
125
136
  }
137
+ watchDisabledHandler() {
138
+ helpers.removeDisabledFalse(this.disabled, this.el);
139
+ }
126
140
  debounceChanged() {
127
141
  this.icChange = helpers.debounceEvent(this.icChange, this.debounce);
128
142
  }
@@ -180,7 +194,7 @@ const TextField = class {
180
194
  (_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
181
195
  }
182
196
  render() {
183
- const { inputId, name, label, required, size, small, placeholder, helperText, rows, resize, disabled, value, min, max, maxLength, numChars, readonly, maxLengthExceeded, maxCharacters, maxCharactersError, maxCharactersReached, minCharacters, minCharactersUnattained, minValueUnattained, maxValueExceeded, validationStatus, validationText, validationInline, validationInlineInternal, spellcheck, inputmode, fullWidth, truncateValue, hiddenInput, } = this;
197
+ const { inputId, name, label, required, size, small, placeholder, helperText, rows, resize, disabled, value, min, max, maxLength, numChars, readonly, maxLengthExceeded, maxCharacters, maxCharactersError, maxCharactersReached, minCharacters, minCharactersUnattained, minValueUnattained, maxValueExceeded, validationStatus, validationText, validationInline, validationInlineInternal, spellcheck, inputmode, fullWidth, truncateValue, hiddenInput, showValidation, } = this;
184
198
  const disabledMode = readonly || disabled;
185
199
  const currentStatus = maxLengthExceeded ||
186
200
  maxValueExceeded ||
@@ -233,14 +247,7 @@ const TextField = class {
233
247
  ["no-resize"]: resize === false || readonly,
234
248
  ["no-left-pad"]: !showLeftIcon && readonly,
235
249
  ["readonly"]: readonly,
236
- }, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder ? placeholder : "", readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocapitalize: this.autocapitalize, autoFocus: this.autoFocus, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : null, minlength: minCharactersUnattained ? minCharacters : null }, this.inheritedAttributes))), helpers.isSlotUsed(this.el, "clear-button") && (index.h("slot", { name: "clear-button" })), helpers.isSlotUsed(this.el, "search-submit-button") && (index.h("slot", { name: "search-submit-button" }))), helpers.isSlotUsed(this.el, "menu") && index.h("slot", { name: "menu" }), (!helpers.isEmptyString(validationStatus) ||
237
- !helpers.isEmptyString(validationText) ||
238
- maxNumChars > 0 ||
239
- maxValueExceeded ||
240
- maxCharactersError ||
241
- minCharactersUnattained ||
242
- minValueUnattained) &&
243
- !validationInlineInternal && (index.h("ic-input-validation", { status: this.hasStatus(currentStatus) === false ||
250
+ }, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder ? placeholder : "", readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocapitalize: this.autocapitalize, autoFocus: this.autoFocus, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : null, minlength: minCharactersUnattained ? minCharacters : null }, this.inheritedAttributes))), helpers.isSlotUsed(this.el, "clear-button") && (index.h("slot", { name: "clear-button" })), helpers.isSlotUsed(this.el, "search-submit-button") && (index.h("slot", { name: "search-submit-button" }))), helpers.isSlotUsed(this.el, "menu") && index.h("slot", { name: "menu" }), showValidation() && (index.h("ic-input-validation", { status: this.hasStatus(currentStatus) === false ||
244
251
  (currentStatus === types.IcInformationStatus.Success &&
245
252
  validationInline) ||
246
253
  validationInlineInternal
@@ -253,6 +260,7 @@ const TextField = class {
253
260
  }
254
261
  get el() { return index.getElement(this); }
255
262
  static get watchers() { return {
263
+ "disabled": ["watchDisabledHandler"],
256
264
  "debounce": ["debounceChanged"],
257
265
  "value": ["watchValueHandler"]
258
266
  }; }
@@ -1 +1 @@
1
- {"file":"ic-text-field.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,ygIAAygI;;AC0ChiI,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,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AG,OAAO,YAAY,EAC1B,KAAK,EAAC,WAAW,IAEhB,QAAQ,OAAG,WAAW,CAClB,EACPA,kBAAM,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,qBAAqB,uCACX,WAAW,iBACtC,CACO,CACZ,CACP,CACmB,CACvB,CACgB,CAChB,EACP;KACH;;;;;;;;;;;","names":["IC_INHERITED_ARIA","checkSlotInChildMutations","forceUpdate","debounceEvent","removeFormResetListener","inheritAttributes","addFormResetListener","removeDisabledFalse","onComponentRequiredPropUndefined","IcInformationStatus","getInputDescribedByText","renderHiddenInput","h","Host","isSlotUsed","isEmptyString"],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n}\n\n:host(.fullwidth) {\n width: 100%;\n}\n\n::placeholder {\n color: var(--ic-color-tertiary-text);\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--ic-architectural-200);\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-primary-text);\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.maxlengthtext {\n color: var(--ic-color-secondary-text);\n padding-right: var(--ic-space-xxxs);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-primary-text);\n}\n\n.charcount {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n} from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n isSlotUsed,\n removeDisabledFalse,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n private inheritedAttributes: { [k: string]: string } = {};\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersError: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxLengthExceeded: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * 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 * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * The maximum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of max value in `helperText` or `label`)\n */\n @Prop() max: string | number = undefined;\n\n /**\n * The maximum number of characters that can be entered in the field. Will display an error if too many characters are entered.\n */\n @Prop() maxCharacters: number = 0;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached.\n */\n @Prop() maxLength: number = 0;\n\n /**\n * The text to display as the validation message when the maximum length is exceeded.\n */\n @Prop() maxLengthMessage: string = \"Maximum length exceeded\";\n\n /**\n * The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)\n */\n @Prop() min: string | number = undefined;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters: number = 0;\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 * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * The size of the text field 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 * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal: boolean = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n if (this.inputEl && this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n\n this.getMaxLengthExceeded(newValue);\n\n this.getMaxCharactersReached(newValue);\n\n this.icChange.emit({ value: newValue });\n }\n\n /**\n * @internal Emitted when the validationInlineInternal is `true`\n */\n @Event() getValidationText: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n }\n\n this.getMaxLengthExceeded(this.value);\n\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n\n if (this.readonly) {\n this.maxLengthExceeded = false;\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n if (this.validationInlineInternal) {\n this.getValidationText.emit({ value: this.validationText });\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n }\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n this.maxCharactersError = this.maxCharactersReached;\n }\n\n /**\n * Sets focus on the native `input`.\n */\n\n @Method()\n async setFocus(): Promise<void> {\n this.inputEl?.focus();\n }\n\n private getMaxLengthExceeded = (value: string) => {\n this.numChars = value.length;\n\n if (this.type === \"number\") {\n this.minValueUnattained = value && Number(value) < Number(this.min);\n this.maxValueExceeded = Number(value) > Number(this.max);\n }\n\n if (this.maxLength > 0) {\n this.maxLengthExceeded = this.numChars > this.maxLength;\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = value.length;\n this.maxCharactersReached =\n this.maxCharacters > 0 ? this.numChars >= this.maxCharacters : false;\n\n if (this.maxCharactersError && !this.maxCharactersReached) {\n this.maxCharactersError = false;\n }\n };\n\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 ? this.numChars < this.minCharacters : false;\n this.icBlur.emit({ value: value });\n };\n\n private onFocus = (ev: Event) => {\n this.icFocus.emit({ value: (ev.target as HTMLInputElement).value });\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] =\n this.el.getAttribute(attributeName);\n forceComponentUpdate = true;\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n size,\n small,\n placeholder,\n helperText,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n maxLength,\n numChars,\n readonly,\n maxLengthExceeded,\n maxCharacters,\n maxCharactersError,\n maxCharactersReached,\n minCharacters,\n minCharactersUnattained,\n minValueUnattained,\n maxValueExceeded,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly || disabled;\n\n const currentStatus =\n maxLengthExceeded ||\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersError\n ? maxCharactersError\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxLengthExceeded\n ? this.maxLengthMessage\n : maxCharactersError\n ? `Maximum input is ${maxCharacters} characters`\n : maxValueExceeded\n ? `Maximum value of ${max} exceeded`\n : minValueUnattained\n ? `Minimum value of ${min} not met`\n : minCharactersUnattained\n ? `Minimum input is ${minCharacters} characters`\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxLength;\n const messageAriaLive =\n maxLengthExceeded ||\n maxCharactersError ||\n maxValueExceeded ||\n minValueUnattained ||\n (maxLength === 0 && currentStatus === IcInformationStatus.Error)\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n const hiddenCharCountDescId =\n maxLength > 0 ? `${inputId}-charcount-desc` : \"\";\n\n const describedBy = `${hiddenCharCountDescId} ${getInputDescribedByText(\n inputId,\n helperText !== \"\",\n showStatusText\n )}`.trim();\n\n const disabledText = disabledMode && !readonly;\n const showLeftIcon =\n !!this.el.querySelector(`[slot=\"icon\"]`) && !disabledText;\n\n const invalid = `${currentStatus === IcInformationStatus.Error}`;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n return (\n <Host class={{ [\"fullwidth\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n size={small ? \"small\" : size}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {showLeftIcon && (\n <span\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline ? (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n min={min}\n max={max}\n value={value}\n class={{\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n [\"truncate-value\"]: truncateValue,\n }}\n placeholder={placeholder ? placeholder : \"\"}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></input>\n ) : (\n <textarea\n id={inputId}\n class={{\n [\"no-resize\"]: resize === false || readonly,\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholder ? placeholder : \"\"}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(this.el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(this.el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(this.el, \"menu\") && <slot name=\"menu\"></slot>}\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0 ||\n maxValueExceeded ||\n maxCharactersError ||\n minCharactersUnattained ||\n minValueUnattained) &&\n !validationInlineInternal && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline) ||\n validationInlineInternal\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n <ic-typography\n variant=\"caption\"\n class={{\n [\"maxlengthtext\"]: true,\n [\"error\"]: maxLengthExceeded,\n [\"disabled\"]: disabledText,\n }}\n >\n <span\n aria-live=\"polite\"\n id={`${inputId}-charcount`}\n class=\"charcount\"\n >\n {numChars}/{maxNumChars}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </ic-typography>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-text-field.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,ygIAAygI;;AC0ChiI,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,kBAAkB,GAAG,CAAC,GAAGA,yBAAiB,EAAE,OAAO,CAAC,CAAC;MAU9C,SAAS;;;;;;;;;QACZ,wBAAmB,GAA4B,EAAE,CAAC;QAElD,yBAAoB,GAAqB,IAAI,CAAC;QAgV9C,yBAAoB,GAAG,CAAC,KAAa;YAC3C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;YAE7B,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC1B,IAAI,CAAC,kBAAkB,GAA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eAAe,GAAG,IAAI;gBACvB,CAAC,OAAO,GAAG,iBAAiB;gBAC5B,CAAC,UAAU,GAAG,YAAY;aAC3B,IAEDA,+BACY,QAAQ,EAClB,EAAE,EAAE,GAAG,OAAO,YAAY,EAC1B,KAAK,EAAC,WAAW,IAEhB,QAAQ,OAAG,WAAW,CAClB,EACPA,kBAAM,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,qBAAqB,uCACX,WAAW,iBACtC,CACO,CACZ,CACP,CACmB,CACvB,CACkB,CAChB,EACP;KACH;;;;;;;;;;;;","names":["IC_INHERITED_ARIA","checkSlotInChildMutations","forceUpdate","isEmptyString","removeDisabledFalse","debounceEvent","removeFormResetListener","inheritAttributes","addFormResetListener","onComponentRequiredPropUndefined","IcInformationStatus","getInputDescribedByText","renderHiddenInput","h","Host","isSlotUsed"],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n}\n\n:host(.fullwidth) {\n width: 100%;\n}\n\n::placeholder {\n color: var(--ic-color-tertiary-text);\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--ic-architectural-200);\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-primary-text);\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.maxlengthtext {\n color: var(--ic-color-secondary-text);\n padding-right: var(--ic-space-xxxs);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-primary-text);\n}\n\n.charcount {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n} from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n isSlotUsed,\n removeDisabledFalse,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n private inheritedAttributes: { [k: string]: string } = {};\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersError: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxLengthExceeded: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * 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 * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * The maximum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of max value in `helperText` or `label`)\n */\n @Prop() max: string | number = undefined;\n\n /**\n * The maximum number of characters that can be entered in the field. Will display an error if too many characters are entered.\n */\n @Prop() maxCharacters: number = 0;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached.\n */\n @Prop() maxLength: number = 0;\n\n /**\n * The text to display as the validation message when the maximum length is exceeded.\n */\n @Prop() maxLengthMessage: string = \"Maximum length exceeded\";\n\n /**\n * The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)\n */\n @Prop() min: string | number = undefined;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters: number = 0;\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 * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * The size of the text field 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 * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal: boolean = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n if (this.inputEl && this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n\n this.getMaxLengthExceeded(newValue);\n\n this.getMaxCharactersReached(newValue);\n\n this.icChange.emit({ value: newValue });\n }\n\n /**\n * @internal Emitted when the validationInlineInternal is `true`\n */\n @Event() getValidationText: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n }\n\n this.getMaxLengthExceeded(this.value);\n\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n\n if (this.readonly) {\n this.maxLengthExceeded = false;\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n if (this.validationInlineInternal) {\n this.getValidationText.emit({ value: this.validationText });\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n }\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n this.maxCharactersError = this.maxCharactersReached;\n }\n\n /**\n * Sets focus on the native `input`.\n */\n\n @Method()\n async setFocus(): Promise<void> {\n this.inputEl?.focus();\n }\n\n private getMaxLengthExceeded = (value: string) => {\n this.numChars = value.length;\n\n if (this.type === \"number\") {\n this.minValueUnattained = value && Number(value) < Number(this.min);\n this.maxValueExceeded = Number(value) > Number(this.max);\n }\n\n if (this.maxLength > 0) {\n this.maxLengthExceeded = this.numChars > this.maxLength;\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = value.length;\n this.maxCharactersReached =\n this.maxCharacters > 0 ? this.numChars >= this.maxCharacters : false;\n\n if (this.maxCharactersError && !this.maxCharactersReached) {\n this.maxCharactersError = false;\n }\n };\n\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 ? this.numChars < this.minCharacters : false;\n this.icBlur.emit({ value: value });\n };\n\n private onFocus = (ev: Event) => {\n this.icFocus.emit({ value: (ev.target as HTMLInputElement).value });\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] =\n this.el.getAttribute(attributeName);\n forceComponentUpdate = true;\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private showValidation = (): boolean => {\n const maxNumChars = this.readonly ? 0 : this.maxLength;\n const emptyString =\n isEmptyString(this.validationStatus) ||\n isEmptyString(this.validationText);\n const valueOutsideRange = this.minValueUnattained || this.maxValueExceeded;\n const charOutsideRange =\n maxNumChars > 0 ||\n this.maxCharactersError ||\n this.minCharactersUnattained;\n return (\n (!emptyString || valueOutsideRange || charOutsideRange) &&\n !this.validationInlineInternal\n );\n };\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n size,\n small,\n placeholder,\n helperText,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n maxLength,\n numChars,\n readonly,\n maxLengthExceeded,\n maxCharacters,\n maxCharactersError,\n maxCharactersReached,\n minCharacters,\n minCharactersUnattained,\n minValueUnattained,\n maxValueExceeded,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n showValidation,\n } = this;\n\n const disabledMode = readonly || disabled;\n\n const currentStatus =\n maxLengthExceeded ||\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersError\n ? maxCharactersError\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxLengthExceeded\n ? this.maxLengthMessage\n : maxCharactersError\n ? `Maximum input is ${maxCharacters} characters`\n : maxValueExceeded\n ? `Maximum value of ${max} exceeded`\n : minValueUnattained\n ? `Minimum value of ${min} not met`\n : minCharactersUnattained\n ? `Minimum input is ${minCharacters} characters`\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxLength;\n const messageAriaLive =\n maxLengthExceeded ||\n maxCharactersError ||\n maxValueExceeded ||\n minValueUnattained ||\n (maxLength === 0 && currentStatus === IcInformationStatus.Error)\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n const hiddenCharCountDescId =\n maxLength > 0 ? `${inputId}-charcount-desc` : \"\";\n\n const describedBy = `${hiddenCharCountDescId} ${getInputDescribedByText(\n inputId,\n helperText !== \"\",\n showStatusText\n )}`.trim();\n\n const disabledText = disabledMode && !readonly;\n const showLeftIcon =\n !!this.el.querySelector(`[slot=\"icon\"]`) && !disabledText;\n\n const invalid = `${currentStatus === IcInformationStatus.Error}`;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n return (\n <Host class={{ [\"fullwidth\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n size={small ? \"small\" : size}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {showLeftIcon && (\n <span\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline ? (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n min={min}\n max={max}\n value={value}\n class={{\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n [\"truncate-value\"]: truncateValue,\n }}\n placeholder={placeholder ? placeholder : \"\"}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></input>\n ) : (\n <textarea\n id={inputId}\n class={{\n [\"no-resize\"]: resize === false || readonly,\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholder ? placeholder : \"\"}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(this.el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(this.el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(this.el, \"menu\") && <slot name=\"menu\"></slot>}\n {showValidation() && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline) ||\n validationInlineInternal\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n <ic-typography\n variant=\"caption\"\n class={{\n [\"maxlengthtext\"]: true,\n [\"error\"]: maxLengthExceeded,\n [\"disabled\"]: disabledText,\n }}\n >\n <span\n aria-live=\"polite\"\n id={`${inputId}-charcount`}\n class=\"charcount\"\n >\n {numChars}/{maxNumChars}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </ic-typography>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f982899d.js');
6
- const helpers = require('./helpers-94b33ab0.js');
6
+ const helpers = require('./helpers-df61b63f.js');
7
7
  require('./types-dc22e301.js');
8
8
 
9
9
  const Theme = class {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f982899d.js');
6
6
  const closeIcon = require('./close-icon-7f6ef8e4.js');
7
- const helpers = require('./helpers-94b33ab0.js');
7
+ const helpers = require('./helpers-df61b63f.js');
8
8
  const types = require('./types-dc22e301.js');
9
9
 
10
10
  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}@media (prefers-reduced-motion: no-preference){:host{animation:fadein var(--ic-transition-duration-slow) ease-in-out}:host(.hidden){animation:fadeout var(--ic-transition-duration-slow) ease-in-out}}:host{--bottom-position:var(--ic-space-xl);position:fixed;bottom:var(--bottom-position);left:50%;transform:translate(-50%);z-index:var(--ic-z-index-toast)}:host(.hidden){display:none}.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}}";
@@ -3,6 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f982899d.js');
6
+ const helpers = require('./helpers-df61b63f.js');
7
+ require('./types-dc22e301.js');
6
8
 
7
9
  const icToggleButtonGroupCss = "/*! 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}:root{display:block}:host{display:flex;flex-direction:row;width:-moz-fit-content;width:fit-content;min-width:-moz-min-content;min-width:min-content;border:var(--ic-border-width) solid var(--ic-action-default);border-radius:var(--ic-border-radius)}:host(.full-width){width:100%;max-width:100%}:host(.loading){min-width:-moz-max-content;min-width:max-content}:host(:focus){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast);outline:none}::slotted(ic-toggle-button){flex-grow:1;width:-moz-min-content;width:min-content;--toggle-button-border:none}::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid var(--ic-action-default)}:host(.disabled){border:var(--ic-border-disabled);pointer-events:none}:host(.disabled) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-disabled)}:host(.dark){border:var(--ic-border-width) solid var(--ic-action-dark)}:host(.dark) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid var(--ic-action-dark)}:host(.light) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid var(--ic-action-light)}:host(.light){border:var(--ic-border-width) solid var(--ic-action-light)}";
8
10
 
@@ -99,6 +101,9 @@ const ToggleButtonGroup = class {
99
101
  this.size = "default";
100
102
  this.variant = "default";
101
103
  }
104
+ watchDisabledHandler() {
105
+ helpers.removeDisabledFalse(this.disabled, this.el);
106
+ }
102
107
  selectHandler(ev, tabTarget) {
103
108
  const allToggles = this.getAllToggleButtons();
104
109
  let clickedToggle = ev.target;
@@ -132,6 +137,7 @@ const ToggleButtonGroup = class {
132
137
  componentWillLoad() {
133
138
  this.selectType === "multi" && (this.selectMethod = "manual");
134
139
  document.addEventListener("keydown", this.keyListener);
140
+ helpers.removeDisabledFalse(this.disabled, this.el);
135
141
  }
136
142
  componentDidLoad() {
137
143
  this.getAllToggleButtons().forEach((el, i) => {
@@ -176,6 +182,9 @@ const ToggleButtonGroup = class {
176
182
  }, onFocus: this.handleHostFocus }, index.h("slot", null)));
177
183
  }
178
184
  get el() { return index.getElement(this); }
185
+ static get watchers() { return {
186
+ "disabled": ["watchDisabledHandler"]
187
+ }; }
179
188
  };
180
189
  ToggleButtonGroup.style = icToggleButtonGroupCss;
181
190
 
@@ -1 +1 @@
1
- {"file":"ic-toggle-button-group.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,sBAAsB,GAAG,6oHAA6oH;;ACwB5qH,MAAM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AAO,gBACA,IAAI,CAAC,eAAe,mBACjB,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,EAC/C,QAAQ,EAAE,CAAC,EACX,KAAK,EAAE;gBACL,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS;gBAC9B,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO;gBACzB,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ;gBAC3B,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI;aAC7B,EACD,OAAO,EAAE,IAAI,CAAC,eAAe,IAE7BD,qBAAa,CACR,EACP;KACH;;;;;;;","names":["h","Host"],"sources":["src/components/ic-toggle-button-group/ic-toggle-button-group.css?tag=ic-toggle-button-group&encapsulation=shadow","src/components/ic-toggle-button-group/ic-toggle-button-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/* PARENT HOST */\n\n:root {\n display: block;\n}\n\n:host {\n display: flex;\n flex-direction: row;\n width: fit-content;\n min-width: min-content;\n border: var(--ic-border-width) solid var(--ic-action-default);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.full-width) {\n width: 100%;\n max-width: 100%;\n}\n\n:host(.loading) {\n min-width: max-content;\n}\n\n:host(:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n outline: none;\n}\n\n/* CHILDREN SLOTTED */\n\n::slotted(ic-toggle-button) {\n flex-grow: 1;\n width: min-content;\n\n --toggle-button-border: none;\n}\n\n::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid var(--ic-action-default);\n}\n\n/* DISABLED */\n:host(.disabled) {\n border: var(--ic-border-disabled);\n pointer-events: none;\n}\n\n:host(.disabled) ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-disabled);\n}\n\n/* DARK */\n:host(.dark) {\n border: var(--ic-border-width) solid var(--ic-action-dark);\n}\n\n:host(.dark) ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid var(--ic-action-dark);\n}\n\n/* LIGHT */\n:host(.light) ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid var(--ic-action-light);\n}\n\n:host(.light) {\n border: var(--ic-border-width) solid var(--ic-action-light);\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Element,\n Event,\n EventEmitter,\n State,\n} from \"@stencil/core\";\nimport {\n IcSizes,\n IcThemeForeground,\n IcSelectTypes,\n IcSelectMethodTypes,\n} from \"../../utils/types\";\nimport { IcChangeEventDetail } from \"./ic-toggle-button-group.types\";\n\ninterface lastKey {\n key: string | null;\n shift: boolean;\n}\n\nconst TOGGLE_GROUP = \"IC-TOGGLE-BUTTON-GROUP\";\n\n@Component({\n tag: \"ic-toggle-button-group\",\n styleUrl: \"ic-toggle-button-group.css\",\n shadow: true,\n})\nexport class ToggleButtonGroup {\n @Element() el: HTMLIcToggleButtonGroupElement;\n\n @State() lastKeyPressed: lastKey = {\n key: null,\n shift: false,\n };\n\n /**\n * The accessible label of the toggle button group component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string = \"Toggle button group\";\n\n /**\n * The appearance of the toggle button group, e.g dark, or light.\n */\n @Prop() appearance: IcThemeForeground = \"default\";\n\n /**\n * If `true`, the toggle button group will be set to the disabled state.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * If `true`, the toggle button group will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The placement of the icons in relation to the toggle button labels.\n */\n @Prop() iconPlacement?: \"left\" | \"right\" | \"top\";\n\n /**\n * If `true`, the toggle button group will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * If `auto`, controls are toggled automatically when navigated to. If `manual`, the controls must be actioned to change their toggled state. The value of this prop is ignored if `selectType` is set to`multi`.\n */\n @Prop({ mutable: true }) selectMethod?: IcSelectMethodTypes = \"manual\";\n\n /**\n * Sets whether single or multiple options can be toggled. If `multi`, then the `selectMethod` is always `manual`.\n */\n @Prop() selectType?: IcSelectTypes = \"single\";\n\n /**\n * The size of the toggle buttons to be displayed. This does not affect the font size of the accessible label.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The variant of the toggle button.\n */\n @Prop({ reflect: true }) variant: \"default\" | \"icon\" = \"default\";\n\n /**\n * Emitted when a toggle button is selected.\n */\n @Event() icChange: EventEmitter<IcChangeEventDetail>;\n\n @Listen(\"icToggleChecked\")\n selectHandler(ev: CustomEvent, tabTarget?: HTMLIcToggleButtonElement): void {\n const allToggles = this.getAllToggleButtons();\n let clickedToggle = ev.target as HTMLIcToggleButtonElement;\n // tabTarget used in proxySelectHandler\n tabTarget && tabTarget.focus();\n if (this.selectType === \"single\") {\n if (!clickedToggle) {\n clickedToggle = tabTarget;\n }\n allToggles.forEach((el) => {\n if (el.id !== clickedToggle.id && el.toggleChecked) {\n el.toggleChecked = false;\n }\n });\n\n this.icChange.emit({\n toggleChecked: ev.detail.toggleChecked,\n selectedOption: clickedToggle,\n });\n } else {\n const toggledOptions = this.getAllToggleButtons().filter(\n (el) => el.toggleChecked && !el.disabled\n );\n\n this.icChange.emit({\n toggleChecked: toggledOptions.map((opt) => opt.toggleChecked),\n toggledOptions: toggledOptions.map((opt) => ({\n toggleButton: opt,\n })),\n selectedOption: clickedToggle,\n });\n }\n }\n\n componentWillLoad(): void {\n this.selectType === \"multi\" && (this.selectMethod = \"manual\");\n this.selectMethod === \"auto\" && this.selectType === \"single\";\n document.addEventListener(\"keydown\", this.keyListener);\n }\n\n componentDidLoad(): void {\n this.getAllToggleButtons().forEach((el, i) => {\n this.setSlottedAria(el);\n el.size = this.size;\n el.loading = this.loading;\n el.iconPlacement = this.iconPlacement;\n el.disabled ? null : (el.disabled = this.disabled);\n el.appearance = this.appearance;\n el.variant = this.variant;\n el.fullWidth = this.fullWidth;\n el.id = i.toString();\n el.tabIndex = -1;\n el.addEventListener(\"keydown\", (ev) => {\n this.handleKeyDown(ev);\n });\n el.classList.add(\"expand-toggle-group-child\");\n });\n }\n\n disconnectedCallback(): void {\n document?.removeEventListener(\"keydown\", this.keyListener);\n }\n\n private keyListener = (ev: KeyboardEvent) => {\n this.lastKeyPressed = {\n key: ev.key,\n shift: ev.shiftKey,\n };\n };\n\n private setSlottedAria = (el: HTMLIcToggleButtonElement) => {\n const btn = el.shadowRoot\n .querySelector(\"ic-button\")\n .shadowRoot.querySelector(\"button\") as HTMLButtonElement;\n let aria = btn.getAttribute(\"aria-label\");\n aria += \", \";\n aria += this.accessibleLabel;\n btn.setAttribute(\"aria-label\", aria);\n };\n\n private handleHostFocus = (ev: FocusEvent): void => {\n if (this.loading || this.disabled) {\n return null;\n }\n const el = ev.target as HTMLIcToggleButtonGroupElement;\n const relEl = ev.relatedTarget as HTMLIcToggleButtonElement;\n const toggleButtons = Array.from(el.querySelectorAll(\"ic-toggle-button\"));\n if (\n ((toggleButtons.every((el) => !el.toggleChecked) ||\n this.selectType !== \"single\") &&\n this.lastKeyPressed.shift === false) ||\n (toggleButtons.every((el) => !el.toggleChecked) &&\n this.lastKeyPressed.shift === true &&\n relEl.tagName == TOGGLE_GROUP)\n ) {\n toggleButtons[0].focus();\n } else if (\n this.lastKeyPressed.shift === false ||\n (this.lastKeyPressed.shift === true && relEl.tagName == TOGGLE_GROUP)\n ) {\n // if toggleChecked is true and selectMethod is \"single\", focus that toggle\n const toggledButton = toggleButtons.filter((el) => el.toggleChecked);\n toggledButton[0].focus();\n }\n };\n\n // trigger selectHandler when unable to add 'target'\n private proxySelectHandler(toggle: HTMLIcToggleButtonElement): void {\n toggle.toggleChecked = true;\n const customEv = new CustomEvent(\"icToggleChecked\", {\n detail: {\n toggleChecked: toggle.toggleChecked,\n },\n });\n this.selectHandler(customEv, toggle);\n }\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const focussedChild = toggleButtonOptions.indexOf(\n toggleButtonOptions.filter((el) => el === document.activeElement)[0]\n );\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.selectMethod === \"auto\"\n ? this.proxySelectHandler(\n toggleButtonOptions[this.getNextItemToSelect(focussedChild, true)]\n )\n : toggleButtonOptions[\n this.getNextItemToSelect(focussedChild, true)\n ].focus();\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.selectMethod === \"auto\"\n ? this.proxySelectHandler(\n toggleButtonOptions[\n this.getNextItemToSelect(focussedChild, false)\n ]\n )\n : toggleButtonOptions[\n this.getNextItemToSelect(focussedChild, false)\n ].focus();\n break;\n case \"Tab\":\n break;\n }\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const numToggles = toggleButtonOptions.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n if (nextItem < 0) {\n nextItem = numToggles;\n } else if (nextItem > numToggles) {\n nextItem = 0;\n }\n\n if (toggleButtonOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n\n return nextItem;\n };\n\n private getAllToggleButtons(): HTMLIcToggleButtonElement[] {\n return Array.from(this.el.querySelectorAll(\"ic-toggle-button\"));\n }\n\n render() {\n return (\n <Host\n role=\"group\"\n aria-label={this.accessibleLabel}\n aria-disabled={this.disabled ? \"true\" : \"false\"}\n tabindex={0}\n class={{\n [\"full-width\"]: this.fullWidth,\n [\"loading\"]: this.loading,\n [\"disabled\"]: this.disabled,\n [`${this.appearance}`]: true,\n }}\n onFocus={this.handleHostFocus}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-toggle-button-group.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,sBAAsB,GAAG,6oHAA6oH;;AC0B5qH,MAAM,YAAY,GAAG,wBAAwB,CAAC;MAOjC,iBAAiB;;;;QAoIpB,gBAAW,GAAG,CAAC,EAAiB;Y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,CAAC,kBAAkB,CAAC,CAAC,CAAC;KACjE;IAED,MAAM;QACJ,QACEC,QAACC,UAAI,IACH,IAAI,EAAC,OAAO,gBACA,IAAI,CAAC,eAAe,mBACjB,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,EAC/C,QAAQ,EAAE,CAAC,EACX,KAAK,EAAE;gBACL,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS;gBAC9B,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO;gBACzB,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ;gBAC3B,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI;aAC7B,EACD,OAAO,EAAE,IAAI,CAAC,eAAe,IAE7BD,qBAAa,CACR,EACP;KACH;;;;;;;;;;","names":["removeDisabledFalse","h","Host"],"sources":["src/components/ic-toggle-button-group/ic-toggle-button-group.css?tag=ic-toggle-button-group&encapsulation=shadow","src/components/ic-toggle-button-group/ic-toggle-button-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/* PARENT HOST */\n\n:root {\n display: block;\n}\n\n:host {\n display: flex;\n flex-direction: row;\n width: fit-content;\n min-width: min-content;\n border: var(--ic-border-width) solid var(--ic-action-default);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.full-width) {\n width: 100%;\n max-width: 100%;\n}\n\n:host(.loading) {\n min-width: max-content;\n}\n\n:host(:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n outline: none;\n}\n\n/* CHILDREN SLOTTED */\n\n::slotted(ic-toggle-button) {\n flex-grow: 1;\n width: min-content;\n\n --toggle-button-border: none;\n}\n\n::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid var(--ic-action-default);\n}\n\n/* DISABLED */\n:host(.disabled) {\n border: var(--ic-border-disabled);\n pointer-events: none;\n}\n\n:host(.disabled) ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-disabled);\n}\n\n/* DARK */\n:host(.dark) {\n border: var(--ic-border-width) solid var(--ic-action-dark);\n}\n\n:host(.dark) ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid var(--ic-action-dark);\n}\n\n/* LIGHT */\n:host(.light) ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid var(--ic-action-light);\n}\n\n:host(.light) {\n border: var(--ic-border-width) solid var(--ic-action-light);\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Element,\n Event,\n EventEmitter,\n State,\n Watch,\n} from \"@stencil/core\";\nimport {\n IcSizes,\n IcThemeForeground,\n IcSelectTypes,\n IcSelectMethodTypes,\n} from \"../../utils/types\";\nimport { IcChangeEventDetail } from \"./ic-toggle-button-group.types\";\nimport { removeDisabledFalse } from \"../../utils/helpers\";\n\ninterface lastKey {\n key: string | null;\n shift: boolean;\n}\n\nconst TOGGLE_GROUP = \"IC-TOGGLE-BUTTON-GROUP\";\n\n@Component({\n tag: \"ic-toggle-button-group\",\n styleUrl: \"ic-toggle-button-group.css\",\n shadow: true,\n})\nexport class ToggleButtonGroup {\n @Element() el: HTMLIcToggleButtonGroupElement;\n\n @State() lastKeyPressed: lastKey = {\n key: null,\n shift: false,\n };\n\n /**\n * The accessible label of the toggle button group component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string = \"Toggle button group\";\n\n /**\n * The appearance of the toggle button group, e.g dark, or light.\n */\n @Prop() appearance: IcThemeForeground = \"default\";\n\n /**\n * If `true`, the toggle button group will be set to the disabled state.\n */\n @Prop() disabled: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the toggle button group will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The placement of the icons in relation to the toggle button labels.\n */\n @Prop() iconPlacement?: \"left\" | \"right\" | \"top\";\n\n /**\n * If `true`, the toggle button group will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * If `auto`, controls are toggled automatically when navigated to. If `manual`, the controls must be actioned to change their toggled state. The value of this prop is ignored if `selectType` is set to`multi`.\n */\n @Prop({ mutable: true }) selectMethod?: IcSelectMethodTypes = \"manual\";\n\n /**\n * Sets whether single or multiple options can be toggled. If `multi`, then the `selectMethod` is always `manual`.\n */\n @Prop() selectType?: IcSelectTypes = \"single\";\n\n /**\n * The size of the toggle buttons to be displayed. This does not affect the font size of the accessible label.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The variant of the toggle button.\n */\n @Prop({ reflect: true }) variant: \"default\" | \"icon\" = \"default\";\n\n /**\n * Emitted when a toggle button is selected.\n */\n @Event() icChange: EventEmitter<IcChangeEventDetail>;\n\n @Listen(\"icToggleChecked\")\n selectHandler(ev: CustomEvent, tabTarget?: HTMLIcToggleButtonElement): void {\n const allToggles = this.getAllToggleButtons();\n let clickedToggle = ev.target as HTMLIcToggleButtonElement;\n // tabTarget used in proxySelectHandler\n tabTarget && tabTarget.focus();\n if (this.selectType === \"single\") {\n if (!clickedToggle) {\n clickedToggle = tabTarget;\n }\n allToggles.forEach((el) => {\n if (el.id !== clickedToggle.id && el.toggleChecked) {\n el.toggleChecked = false;\n }\n });\n\n this.icChange.emit({\n toggleChecked: ev.detail.toggleChecked,\n selectedOption: clickedToggle,\n });\n } else {\n const toggledOptions = this.getAllToggleButtons().filter(\n (el) => el.toggleChecked && !el.disabled\n );\n\n this.icChange.emit({\n toggleChecked: toggledOptions.map((opt) => opt.toggleChecked),\n toggledOptions: toggledOptions.map((opt) => ({\n toggleButton: opt,\n })),\n selectedOption: clickedToggle,\n });\n }\n }\n\n componentWillLoad(): void {\n this.selectType === \"multi\" && (this.selectMethod = \"manual\");\n this.selectMethod === \"auto\" && this.selectType === \"single\";\n document.addEventListener(\"keydown\", this.keyListener);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n this.getAllToggleButtons().forEach((el, i) => {\n this.setSlottedAria(el);\n el.size = this.size;\n el.loading = this.loading;\n el.iconPlacement = this.iconPlacement;\n el.disabled ? null : (el.disabled = this.disabled);\n el.appearance = this.appearance;\n el.variant = this.variant;\n el.fullWidth = this.fullWidth;\n el.id = i.toString();\n el.tabIndex = -1;\n el.addEventListener(\"keydown\", (ev) => {\n this.handleKeyDown(ev);\n });\n el.classList.add(\"expand-toggle-group-child\");\n });\n }\n\n disconnectedCallback(): void {\n document?.removeEventListener(\"keydown\", this.keyListener);\n }\n\n private keyListener = (ev: KeyboardEvent) => {\n this.lastKeyPressed = {\n key: ev.key,\n shift: ev.shiftKey,\n };\n };\n\n private setSlottedAria = (el: HTMLIcToggleButtonElement) => {\n const btn = el.shadowRoot\n .querySelector(\"ic-button\")\n .shadowRoot.querySelector(\"button\") as HTMLButtonElement;\n let aria = btn.getAttribute(\"aria-label\");\n aria += \", \";\n aria += this.accessibleLabel;\n btn.setAttribute(\"aria-label\", aria);\n };\n\n private handleHostFocus = (ev: FocusEvent): void => {\n if (this.loading || this.disabled) {\n return null;\n }\n const el = ev.target as HTMLIcToggleButtonGroupElement;\n const relEl = ev.relatedTarget as HTMLIcToggleButtonElement;\n const toggleButtons = Array.from(el.querySelectorAll(\"ic-toggle-button\"));\n if (\n ((toggleButtons.every((el) => !el.toggleChecked) ||\n this.selectType !== \"single\") &&\n this.lastKeyPressed.shift === false) ||\n (toggleButtons.every((el) => !el.toggleChecked) &&\n this.lastKeyPressed.shift === true &&\n relEl.tagName == TOGGLE_GROUP)\n ) {\n toggleButtons[0].focus();\n } else if (\n this.lastKeyPressed.shift === false ||\n (this.lastKeyPressed.shift === true && relEl.tagName == TOGGLE_GROUP)\n ) {\n // if toggleChecked is true and selectMethod is \"single\", focus that toggle\n const toggledButton = toggleButtons.filter((el) => el.toggleChecked);\n toggledButton[0].focus();\n }\n };\n\n // trigger selectHandler when unable to add 'target'\n private proxySelectHandler(toggle: HTMLIcToggleButtonElement): void {\n toggle.toggleChecked = true;\n const customEv = new CustomEvent(\"icToggleChecked\", {\n detail: {\n toggleChecked: toggle.toggleChecked,\n },\n });\n this.selectHandler(customEv, toggle);\n }\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const focussedChild = toggleButtonOptions.indexOf(\n toggleButtonOptions.filter((el) => el === document.activeElement)[0]\n );\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.selectMethod === \"auto\"\n ? this.proxySelectHandler(\n toggleButtonOptions[this.getNextItemToSelect(focussedChild, true)]\n )\n : toggleButtonOptions[\n this.getNextItemToSelect(focussedChild, true)\n ].focus();\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.selectMethod === \"auto\"\n ? this.proxySelectHandler(\n toggleButtonOptions[\n this.getNextItemToSelect(focussedChild, false)\n ]\n )\n : toggleButtonOptions[\n this.getNextItemToSelect(focussedChild, false)\n ].focus();\n break;\n case \"Tab\":\n break;\n }\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const numToggles = toggleButtonOptions.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n if (nextItem < 0) {\n nextItem = numToggles;\n } else if (nextItem > numToggles) {\n nextItem = 0;\n }\n\n if (toggleButtonOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n\n return nextItem;\n };\n\n private getAllToggleButtons(): HTMLIcToggleButtonElement[] {\n return Array.from(this.el.querySelectorAll(\"ic-toggle-button\"));\n }\n\n render() {\n return (\n <Host\n role=\"group\"\n aria-label={this.accessibleLabel}\n aria-disabled={this.disabled ? \"true\" : \"false\"}\n tabindex={0}\n class={{\n [\"full-width\"]: this.fullWidth,\n [\"loading\"]: this.loading,\n [\"disabled\"]: this.disabled,\n [`${this.appearance}`]: true,\n }}\n onFocus={this.handleHostFocus}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f982899d.js');
6
- const helpers = require('./helpers-94b33ab0.js');
6
+ const helpers = require('./helpers-df61b63f.js');
7
7
  require('./types-dc22e301.js');
8
8
 
9
9
  const icToggleButtonCss = "/*! 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{--button-border:var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-default)\n )}:host(.dark){--button-border:var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-dark)\n )}:host(.light){--button-border:var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-light)\n )}:host(.disabled){--button-border:var(--toggle-button-border, var(--ic-border-disabled))}:host(.expand-toggle-group-child) ::part(button){width:100%;min-height:inherit;white-space:inherit;height:inherit}:host ic-button{--icon-width:var(--ic-space-lg);--icon-height:var(--ic-space-lg)}:host(.expand-toggle-group-child) ic-button{min-width:100%;min-height:100%;white-space:normal;height:100%}:host(.expand-toggle-group-child) ::part(button):focus,:host(.expand-toggle-group-child.checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-default),\n var(--ic-border-focus)}:host(.expand-toggle-group-child.light) ::part(button):focus,:host(.expand-toggle-group-child.dark) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-dark),\n var(--ic-border-focus)}:host(:focus){z-index:1}:host ::part(button){border:var(--button-border)}:host(.checked) ::part(button){background-color:var(--ic-action-default);color:var(--ic-architectural-white);box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white)}:host(.checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus)}:host(.checked) ::part(button):hover{background-color:var(--button-default-hover)}:host(.checked) ::part(button):active,:host(.icon.checked) ::part(button):active{background-color:var(--ic-action-default-active)}:host(.dark.checked) ::part(button){background-color:var(--ic-action-dark)}:host(.dark.checked) ::part(button):hover{background-color:var(--ic-action-dark-hover)}:host(.dark.checked) ::part(button):active,:host(.icon.dark.checked) ::part(button):active{background-color:var(--ic-action-dark-active)}:host(.light.checked) ::part(button){background-color:var(--ic-action-light);color:var(--ic-color-primary-text);box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black)}:host(.light.checked) ::part(button):hover{background-color:var(--ic-action-light-hover)}:host(.light.checked) ::part(button):active,:host(.icon.light.checked) ::part(button):active{background-color:var(--ic-action-light-active)}:host(.light.checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black),\n var(--ic-border-focus)}:host(.disabled) ::part(button),:host(.icon.disabled) ::part(button){border:var(--button-border)}:host(.disabled.checked) ::part(button),:host(.icon.disabled.checked) ::part(button){background-color:transparent}:host(.disabled.checked) ::part(button),:host(.icon.disabled.checked) ::part(button)::before{background-image:radial-gradient(var(--ic-architectural-400) 95%, white 20%);background-repeat:no-repeat}:host(.icon) ::part(button){border:var(--button-border);height:calc(var(--ic-space-xl) + var(--ic-space-xs));width:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.icon) ::part(button):active{background-color:var(--ic-action-default-bg-active)}:host(.icon.dark) ::part(button):active{background-color:var(--ic-action-dark-bg-active)}:host(.icon.light) ::part(button):active{background-color:var(--ic-action-light-bg-active)}:host(.icon.small) ::part(button){height:var(--ic-space-xl);width:var(--ic-space-xl)}:host(.icon.large) ::part(button){height:var(--ic-space-xxl);width:var(--ic-space-xxl)}:host(.checked.loading) ::part(button){background-color:var(--button-default-active)}:host(.loading) ::part(ic-loading-container){--inner-color:var(--ic-architectural-white)}:host(.checked.loading.light) ::part(button){background-color:var(--ic-action-light-active)}:host(.checked.loading.dark) ::part(button){background-color:var(--ic-action-dark-active)}@media (forced-colors: active){:host(.checked) ::part(button),:host(.checked) ::part(button):hover{background-color:Highlight}:host(.checked.light) ::part(button),:host(.checked.light) ::part(button):hover{background-color:Highlight}:host(.checked.dark) ::part(button),:host(.checked.dark) ::part(button):hover{background-color:Highlight}:host(.checked.disabled) ::part(button){background-color:GrayText}}";
@@ -37,6 +37,9 @@ const ToggleButton = class {
37
37
  this.toggleChecked = false;
38
38
  this.variant = "default";
39
39
  }
40
+ watchDisabledHandler() {
41
+ helpers.removeDisabledFalse(this.disabled, this.el);
42
+ }
40
43
  componentWillLoad() {
41
44
  helpers.removeDisabledFalse(this.disabled, this.el);
42
45
  const parentIconPlacement = this.el.parentElement.iconPlacement;
@@ -82,6 +85,9 @@ const ToggleButton = class {
82
85
  }
83
86
  static get delegatesFocus() { return true; }
84
87
  get el() { return index.getElement(this); }
88
+ static get watchers() { return {
89
+ "disabled": ["watchDisabledHandler"]
90
+ }; }
85
91
  };
86
92
  ToggleButton.style = icToggleButtonCss;
87
93
 
@@ -1 +1 @@
1
- {"file":"ic-toggle-button.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,iBAAiB,GAAG,8sNAA8sN;;MC8B3tN,YAAY;;;;QAEf,yBAAoB,GAAqB,IAAI,CAAC;QAmG9C,yBAAoB,GAAG;YAC7BA,iBAAW,CAAC,IAAI,CAAC,CAAC;SACnB,CAAC;QAWM,gBAAW,GAAG,CAAC,EAAc;YACnC,EAAE,CAAC,wBAAwB,EAAE,CAAC;SAC/B,CAAC;QAEM,gBAAW,GAAG;YACpB,CAAC,IAAI,CAAC,OAAO;gBACX,CAAC,IAAI,CAAC,QAAQ;gBACd,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;oBACxB,OAAO,EAAE,IAAI,CAAC,aAAa;iBAC5B,CAAC,CAAC;SACN,CAAC;;0BA9GuC,SAAS;wBAKrB,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AO,CAAC,KAC3BF,kBAAM,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,GAAQ,CACxC,CACS,CACP,EACP;KACH;;;;;;;;","names":["forceUpdate","removeDisabledFalse","onComponentRequiredPropUndefined","h","Host","isSlotUsed"],"sources":["src/components/ic-toggle-button/ic-toggle-button.css?tag=ic-toggle-button&encapsulation=shadow","src/components/ic-toggle-button/ic-toggle-button.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/* VARIABLES FOR IC-TOGGLE-BUTTON-GROUP */\n:host {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-default)\n );\n}\n\n:host(.dark) {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-dark)\n );\n}\n\n:host(.light) {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-light)\n );\n}\n\n:host(.disabled) {\n --button-border: var(--toggle-button-border, var(--ic-border-disabled));\n}\n\n:host(.expand-toggle-group-child) ::part(button) {\n width: 100%;\n min-height: inherit;\n white-space: inherit;\n height: inherit;\n}\n\n:host ic-button {\n --icon-width: var(--ic-space-lg);\n --icon-height: var(--ic-space-lg);\n}\n\n:host(.expand-toggle-group-child) ic-button {\n min-width: 100%;\n min-height: 100%;\n white-space: normal;\n height: 100%;\n}\n\n:host(.expand-toggle-group-child) ::part(button):focus,\n:host(.expand-toggle-group-child.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-default),\n var(--ic-border-focus);\n}\n\n:host(.expand-toggle-group-child.light) ::part(button):focus,\n:host(.expand-toggle-group-child.dark) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-dark),\n var(--ic-border-focus);\n}\n\n:host(:focus) {\n z-index: 1;\n}\n\n:host ::part(button) {\n border: var(--button-border);\n}\n\n:host(.checked) ::part(button) {\n background-color: var(--ic-action-default);\n color: var(--ic-architectural-white);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white);\n}\n\n:host(.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus);\n}\n\n:host(.checked) ::part(button):hover {\n background-color: var(--button-default-hover);\n}\n\n:host(.checked) ::part(button):active,\n:host(.icon.checked) ::part(button):active {\n background-color: var(--ic-action-default-active);\n}\n\n:host(.dark.checked) ::part(button) {\n background-color: var(--ic-action-dark);\n}\n\n:host(.dark.checked) ::part(button):hover {\n background-color: var(--ic-action-dark-hover);\n}\n\n:host(.dark.checked) ::part(button):active,\n:host(.icon.dark.checked) ::part(button):active {\n background-color: var(--ic-action-dark-active);\n}\n\n:host(.light.checked) ::part(button) {\n background-color: var(--ic-action-light);\n color: var(--ic-color-primary-text);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black);\n}\n\n:host(.light.checked) ::part(button):hover {\n background-color: var(--ic-action-light-hover);\n}\n\n:host(.light.checked) ::part(button):active,\n:host(.icon.light.checked) ::part(button):active {\n background-color: var(--ic-action-light-active);\n}\n\n:host(.light.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black),\n var(--ic-border-focus);\n}\n\n:host(.disabled) ::part(button),\n:host(.icon.disabled) ::part(button) {\n border: var(--button-border);\n}\n\n:host(.disabled.checked) ::part(button),\n:host(.icon.disabled.checked) ::part(button) {\n background-color: transparent;\n}\n\n:host(.disabled.checked) ::part(button),\n:host(.icon.disabled.checked) ::part(button)::before {\n background-image: radial-gradient(var(--ic-architectural-400) 95%, white 20%);\n background-repeat: no-repeat;\n}\n\n:host(.icon) ::part(button) {\n border: var(--button-border);\n height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n width: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n:host(.icon) ::part(button):active {\n background-color: var(--ic-action-default-bg-active);\n}\n\n:host(.icon.dark) ::part(button):active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n:host(.icon.light) ::part(button):active {\n background-color: var(--ic-action-light-bg-active);\n}\n\n:host(.icon.small) ::part(button) {\n height: var(--ic-space-xl);\n width: var(--ic-space-xl);\n}\n\n:host(.icon.large) ::part(button) {\n height: var(--ic-space-xxl);\n width: var(--ic-space-xxl);\n}\n\n:host(.checked.loading) ::part(button) {\n background-color: var(--button-default-active);\n}\n\n:host(.loading) ::part(ic-loading-container) {\n --inner-color: var(--ic-architectural-white);\n}\n\n:host(.checked.loading.light) ::part(button) {\n background-color: var(--ic-action-light-active);\n}\n\n:host(.checked.loading.dark) ::part(button) {\n background-color: var(--ic-action-dark-active);\n}\n\n@media (forced-colors: active) {\n :host(.checked) ::part(button),\n :host(.checked) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.light) ::part(button),\n :host(.checked.light) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.dark) ::part(button),\n :host(.checked.dark) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.disabled) ::part(button) {\n background-color: GrayText;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n Event,\n EventEmitter,\n Listen,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcSizes, IcThemeForeground } from \"../../utils/types\";\n\n/**\n * @slot icon - Content will be displayed alongside the toggle button label.\n * @slot badge - Badge component overlaying the top right of the toggle button.\n */\n\n@Component({\n tag: \"ic-toggle-button\",\n styleUrl: \"ic-toggle-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class ToggleButton {\n private iconPosition: \"left\" | \"right\" | \"top\";\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcToggleButtonElement;\n\n /**\n * The accessible label that will be applied to the toggle button. This is required for the icon variant of toggle buttons.\n */\n @Prop() accessibleLabel?: string;\n\n /**\n * The appearance of the toggle button.\n */\n @Prop() appearance?: IcThemeForeground = \"default\";\n\n /**\n * If `true`, the toggle button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the toggle button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The placement of the icon in relation to the toggle button label.\n */\n @Prop() iconPlacement?: \"left\" | \"right\" | \"top\";\n\n /**\n * The label to display in the toggle button. This is required for the default variant of toggle buttons.\n */\n @Prop() label?: string;\n\n /**\n * If `true`, the toggle button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * The size of the toggle button to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * If `true`, the toggle button will be in a checked state.\n */\n @Prop({ mutable: true, reflect: true }) toggleChecked: boolean = false;\n\n /**\n * The variant of the toggle button.\n */\n @Prop({ reflect: true }) variant: \"default\" | \"icon\" = \"default\";\n\n /**\n * Emitted when the user clicks a toggle button.\n */\n @Event() icToggleChecked: EventEmitter<{\n checked: boolean;\n }>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n\n const parentIconPlacement = (\n this.el.parentElement as HTMLIcToggleButtonGroupElement\n ).iconPlacement;\n this.iconPosition = this.iconPlacement || parentIconPlacement;\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n {\n prop: this.variant === \"icon\" ? this.accessibleLabel : this.label,\n propName: this.variant === \"icon\" ? \"accessible-label\" : \"label\",\n },\n ],\n \"Toggle button\"\n );\n if (typeof MutationObserver !== \"undefined\") {\n this.hostMutationObserver = new MutationObserver(\n this.hostMutationCallback\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n }\n\n disconnectedCallback(): void {\n if (\n this.hostMutationObserver !== null &&\n this.hostMutationObserver !== undefined\n ) {\n this.hostMutationObserver.disconnect();\n }\n }\n\n private hostMutationCallback = (): void => {\n forceUpdate(this);\n };\n\n @Listen(\"click\", { capture: true })\n handleHostClick(e: Event): void {\n if (this.disabled) {\n e.stopImmediatePropagation();\n } else if (!this.loading) {\n this.toggleChecked = !this.toggleChecked;\n }\n }\n\n private handleFocus = (ev: FocusEvent) => {\n ev.stopImmediatePropagation();\n };\n\n private handleClick = (): void => {\n !this.loading &&\n !this.disabled &&\n this.icToggleChecked.emit({\n checked: this.toggleChecked,\n });\n };\n\n render() {\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled,\n [\"checked\"]: this.toggleChecked,\n [`${this.appearance}`]: true,\n [\"icon\"]: this.variant === \"icon\",\n [`${this.size}`]: true,\n [\"loading\"]: this.loading,\n }}\n onFocus={this.handleFocus}\n >\n <ic-button\n aria-pressed={this.toggleChecked.toString()}\n variant={this.variant === \"icon\" ? \"icon\" : \"secondary\"}\n onClick={this.handleClick}\n title={this.accessibleLabel}\n aria-label={`${\n this.accessibleLabel ? this.accessibleLabel : this.label\n }, ${this.toggleChecked ? \"ticked\" : \"unticked\"}`}\n disabled={this.disabled}\n appearance={this.appearance}\n size={this.size}\n fullWidth={this.fullWidth}\n loading={this.loading}\n aria-disabled={`${this.disabled}`}\n >\n {this.variant !== \"icon\" && this.label}\n <slot />\n {isSlotUsed(this.el, \"icon\") && (\n <slot\n name=\"icon\"\n slot={`${\n this.iconPosition ? `${this.iconPosition}-icon` : \"icon\"\n }`}\n ></slot>\n )}\n {isSlotUsed(this.el, \"badge\") && (\n <slot name=\"badge\" slot=\"badge\"></slot>\n )}\n </ic-button>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-toggle-button.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,iBAAiB,GAAG,8sNAA8sN;;MC+B3tN,YAAY;;;;QAEf,yBAAoB,GAAqB,IAAI,CAAC;QAuG9C,yBAAoB,GAAG;YAC7BA,iBAAW,CAAC,IAAI,CAAC,CAAC;SACnB,CAAC;QAWM,gBAAW,GAAG,CAAC,EAAc;YACnC,EAAE,CAAC,wBAAwB,EAAE,CAAC;SAC/B,CAAC;QAEM,gBAAW,GAAG;YACpB,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KAAK,MAAM,IAAI,IAAI,CAAC,KAAK,EACtCA,qBAAQ,EACPE,kBAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,KAC1BF,kBACE,IAAI,EAAC,MAAM,EACX,IAAI,EAAE,GACJ,IAAI,CAAC,YAAY,GAAG,GAAG,IAAI,CAAC,YAAY,OAAO,GAAG,MACpD,EAAE,GACI,CACT,EACAE,kBAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,KAC3BF,kBAAM,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,GAAQ,CACxC,CACS,CACP,EACP;KACH;;;;;;;;;;;","names":["forceUpdate","removeDisabledFalse","onComponentRequiredPropUndefined","h","Host","isSlotUsed"],"sources":["src/components/ic-toggle-button/ic-toggle-button.css?tag=ic-toggle-button&encapsulation=shadow","src/components/ic-toggle-button/ic-toggle-button.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/* VARIABLES FOR IC-TOGGLE-BUTTON-GROUP */\n:host {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-default)\n );\n}\n\n:host(.dark) {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-dark)\n );\n}\n\n:host(.light) {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-light)\n );\n}\n\n:host(.disabled) {\n --button-border: var(--toggle-button-border, var(--ic-border-disabled));\n}\n\n:host(.expand-toggle-group-child) ::part(button) {\n width: 100%;\n min-height: inherit;\n white-space: inherit;\n height: inherit;\n}\n\n:host ic-button {\n --icon-width: var(--ic-space-lg);\n --icon-height: var(--ic-space-lg);\n}\n\n:host(.expand-toggle-group-child) ic-button {\n min-width: 100%;\n min-height: 100%;\n white-space: normal;\n height: 100%;\n}\n\n:host(.expand-toggle-group-child) ::part(button):focus,\n:host(.expand-toggle-group-child.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-default),\n var(--ic-border-focus);\n}\n\n:host(.expand-toggle-group-child.light) ::part(button):focus,\n:host(.expand-toggle-group-child.dark) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-dark),\n var(--ic-border-focus);\n}\n\n:host(:focus) {\n z-index: 1;\n}\n\n:host ::part(button) {\n border: var(--button-border);\n}\n\n:host(.checked) ::part(button) {\n background-color: var(--ic-action-default);\n color: var(--ic-architectural-white);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white);\n}\n\n:host(.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus);\n}\n\n:host(.checked) ::part(button):hover {\n background-color: var(--button-default-hover);\n}\n\n:host(.checked) ::part(button):active,\n:host(.icon.checked) ::part(button):active {\n background-color: var(--ic-action-default-active);\n}\n\n:host(.dark.checked) ::part(button) {\n background-color: var(--ic-action-dark);\n}\n\n:host(.dark.checked) ::part(button):hover {\n background-color: var(--ic-action-dark-hover);\n}\n\n:host(.dark.checked) ::part(button):active,\n:host(.icon.dark.checked) ::part(button):active {\n background-color: var(--ic-action-dark-active);\n}\n\n:host(.light.checked) ::part(button) {\n background-color: var(--ic-action-light);\n color: var(--ic-color-primary-text);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black);\n}\n\n:host(.light.checked) ::part(button):hover {\n background-color: var(--ic-action-light-hover);\n}\n\n:host(.light.checked) ::part(button):active,\n:host(.icon.light.checked) ::part(button):active {\n background-color: var(--ic-action-light-active);\n}\n\n:host(.light.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black),\n var(--ic-border-focus);\n}\n\n:host(.disabled) ::part(button),\n:host(.icon.disabled) ::part(button) {\n border: var(--button-border);\n}\n\n:host(.disabled.checked) ::part(button),\n:host(.icon.disabled.checked) ::part(button) {\n background-color: transparent;\n}\n\n:host(.disabled.checked) ::part(button),\n:host(.icon.disabled.checked) ::part(button)::before {\n background-image: radial-gradient(var(--ic-architectural-400) 95%, white 20%);\n background-repeat: no-repeat;\n}\n\n:host(.icon) ::part(button) {\n border: var(--button-border);\n height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n width: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n:host(.icon) ::part(button):active {\n background-color: var(--ic-action-default-bg-active);\n}\n\n:host(.icon.dark) ::part(button):active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n:host(.icon.light) ::part(button):active {\n background-color: var(--ic-action-light-bg-active);\n}\n\n:host(.icon.small) ::part(button) {\n height: var(--ic-space-xl);\n width: var(--ic-space-xl);\n}\n\n:host(.icon.large) ::part(button) {\n height: var(--ic-space-xxl);\n width: var(--ic-space-xxl);\n}\n\n:host(.checked.loading) ::part(button) {\n background-color: var(--button-default-active);\n}\n\n:host(.loading) ::part(ic-loading-container) {\n --inner-color: var(--ic-architectural-white);\n}\n\n:host(.checked.loading.light) ::part(button) {\n background-color: var(--ic-action-light-active);\n}\n\n:host(.checked.loading.dark) ::part(button) {\n background-color: var(--ic-action-dark-active);\n}\n\n@media (forced-colors: active) {\n :host(.checked) ::part(button),\n :host(.checked) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.light) ::part(button),\n :host(.checked.light) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.dark) ::part(button),\n :host(.checked.dark) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.disabled) ::part(button) {\n background-color: GrayText;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n Event,\n EventEmitter,\n Listen,\n h,\n forceUpdate,\n Watch,\n} from \"@stencil/core\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcSizes, IcThemeForeground } from \"../../utils/types\";\n\n/**\n * @slot icon - Content will be displayed alongside the toggle button label.\n * @slot badge - Badge component overlaying the top right of the toggle button.\n */\n\n@Component({\n tag: \"ic-toggle-button\",\n styleUrl: \"ic-toggle-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class ToggleButton {\n private iconPosition: \"left\" | \"right\" | \"top\";\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcToggleButtonElement;\n\n /**\n * The accessible label that will be applied to the toggle button. This is required for the icon variant of toggle buttons.\n */\n @Prop() accessibleLabel?: string;\n\n /**\n * The appearance of the toggle button.\n */\n @Prop() appearance?: IcThemeForeground = \"default\";\n\n /**\n * If `true`, the toggle button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the toggle button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The placement of the icon in relation to the toggle button label.\n */\n @Prop() iconPlacement?: \"left\" | \"right\" | \"top\";\n\n /**\n * The label to display in the toggle button. This is required for the default variant of toggle buttons.\n */\n @Prop() label?: string;\n\n /**\n * If `true`, the toggle button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * The size of the toggle button to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * If `true`, the toggle button will be in a checked state.\n */\n @Prop({ mutable: true, reflect: true }) toggleChecked: boolean = false;\n\n /**\n * The variant of the toggle button.\n */\n @Prop({ reflect: true }) variant: \"default\" | \"icon\" = \"default\";\n\n /**\n * Emitted when the user clicks a toggle button.\n */\n @Event() icToggleChecked: EventEmitter<{\n checked: boolean;\n }>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n\n const parentIconPlacement = (\n this.el.parentElement as HTMLIcToggleButtonGroupElement\n ).iconPlacement;\n this.iconPosition = this.iconPlacement || parentIconPlacement;\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n {\n prop: this.variant === \"icon\" ? this.accessibleLabel : this.label,\n propName: this.variant === \"icon\" ? \"accessible-label\" : \"label\",\n },\n ],\n \"Toggle button\"\n );\n if (typeof MutationObserver !== \"undefined\") {\n this.hostMutationObserver = new MutationObserver(\n this.hostMutationCallback\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n }\n\n disconnectedCallback(): void {\n if (\n this.hostMutationObserver !== null &&\n this.hostMutationObserver !== undefined\n ) {\n this.hostMutationObserver.disconnect();\n }\n }\n\n private hostMutationCallback = (): void => {\n forceUpdate(this);\n };\n\n @Listen(\"click\", { capture: true })\n handleHostClick(e: Event): void {\n if (this.disabled) {\n e.stopImmediatePropagation();\n } else if (!this.loading) {\n this.toggleChecked = !this.toggleChecked;\n }\n }\n\n private handleFocus = (ev: FocusEvent) => {\n ev.stopImmediatePropagation();\n };\n\n private handleClick = (): void => {\n !this.loading &&\n !this.disabled &&\n this.icToggleChecked.emit({\n checked: this.toggleChecked,\n });\n };\n\n render() {\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled,\n [\"checked\"]: this.toggleChecked,\n [`${this.appearance}`]: true,\n [\"icon\"]: this.variant === \"icon\",\n [`${this.size}`]: true,\n [\"loading\"]: this.loading,\n }}\n onFocus={this.handleFocus}\n >\n <ic-button\n aria-pressed={this.toggleChecked.toString()}\n variant={this.variant === \"icon\" ? \"icon\" : \"secondary\"}\n onClick={this.handleClick}\n title={this.accessibleLabel}\n aria-label={`${\n this.accessibleLabel ? this.accessibleLabel : this.label\n }, ${this.toggleChecked ? \"ticked\" : \"unticked\"}`}\n disabled={this.disabled}\n appearance={this.appearance}\n size={this.size}\n fullWidth={this.fullWidth}\n loading={this.loading}\n aria-disabled={`${this.disabled}`}\n >\n {this.variant !== \"icon\" && this.label}\n <slot />\n {isSlotUsed(this.el, \"icon\") && (\n <slot\n name=\"icon\"\n slot={`${\n this.iconPosition ? `${this.iconPosition}-icon` : \"icon\"\n }`}\n ></slot>\n )}\n {isSlotUsed(this.el, \"badge\") && (\n <slot name=\"badge\" slot=\"badge\"></slot>\n )}\n </ic-button>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f982899d.js');
6
6
  const types = require('./types-dc22e301.js');
7
- const helpers = require('./helpers-94b33ab0.js');
7
+ const helpers = require('./helpers-df61b63f.js');
8
8
 
9
9
  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(*){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)}}:host(.mobile-mode) .app-status,:host(.mobile-mode) .app-version{display:none}:host(.mobile-mode) .title-link{margin-right:var(--ic-space-xs)}:host(.mobile-mode) .search-menu-container{max-width:10rem}:host(.mobile-mode) .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}.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(*){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(*){fill:currentcolor}}";
10
10
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f982899d.js');
6
- const helpers = require('./helpers-94b33ab0.js');
6
+ const helpers = require('./helpers-df61b63f.js');
7
7
  require('./types-dc22e301.js');
8
8
 
9
9
  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;padding-right:var(--ellipsis-padding-right, 0)}.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:0.25rem solid !important;margin-bottom:-0.25rem !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)}:host(.in-ag-grid),:host(.in-ag-grid) ::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@supports (text-underline-offset: 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}}";