@ukic/canary-web-components 3.0.0-canary.5 → 3.0.0-canary.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (536) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/{helpers-c80f6ce4.js → helpers-02b23286.js} +41 -19
  4. package/dist/cjs/helpers-02b23286.js.map +1 -0
  5. package/dist/cjs/{helpers-55099147.js → helpers-4190b7f2.js} +56 -29
  6. package/dist/cjs/helpers-4190b7f2.js.map +1 -0
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +8 -1
  9. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-alert.cjs.entry.js +3 -10
  11. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-badge.cjs.entry.js +2 -2
  14. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-button_3.cjs.entry.js +10 -7
  18. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-card-horizontal.cjs.entry.js +18 -15
  20. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-card-vertical.cjs.entry.js +26 -24
  22. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -1
  24. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-checkbox.cjs.entry.js +5 -1
  26. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-chip.cjs.entry.js +9 -4
  28. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-data-table.cjs.entry.js +277 -100
  32. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-date-input.cjs.entry.js +7 -2
  34. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-date-picker.cjs.entry.js +6 -1
  36. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-divider.cjs.entry.js +3 -3
  39. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-empty-state_2.cjs.entry.js +24 -15
  41. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-footer-link-group.cjs.entry.js +4 -5
  43. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-footer-link.cjs.entry.js +4 -5
  45. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-footer.cjs.entry.js +24 -14
  47. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-hero.cjs.entry.js +7 -15
  49. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +3 -3
  51. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +39 -24
  53. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-link.cjs.entry.js +9 -6
  56. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-menu-item.cjs.entry.js +7 -1
  59. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-navigation-button.cjs.entry.js +6 -7
  61. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-navigation-group.cjs.entry.js +5 -6
  63. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-navigation-item.cjs.entry.js +4 -4
  65. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-pagination_4.cjs.entry.js +85 -42
  69. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  71. package/dist/cjs/ic-radio-group.cjs.entry.js +9 -1
  72. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-radio-option.cjs.entry.js +5 -1
  74. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-search-bar.cjs.entry.js +37 -29
  76. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-side-navigation.cjs.entry.js +5 -5
  78. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  80. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  81. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  82. package/dist/cjs/ic-switch.cjs.entry.js +6 -2
  83. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  84. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  85. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  86. package/dist/cjs/ic-tab.cjs.entry.js +5 -2
  87. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-theme.cjs.entry.js +20 -20
  89. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  91. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +29 -10
  92. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  93. package/dist/cjs/ic-toggle-button.cjs.entry.js +57 -5
  94. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  95. package/dist/cjs/ic-top-navigation.cjs.entry.js +10 -6
  96. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  97. package/dist/cjs/ic-tree-item.cjs.entry.js +14 -12
  98. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
  99. package/dist/cjs/ic-tree-view.cjs.entry.js +17 -12
  100. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
  101. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  102. package/dist/cjs/loader.cjs.js +1 -1
  103. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +4 -1
  104. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +24 -18
  105. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
  106. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +10 -0
  107. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -1
  108. package/dist/collection/components/ic-data-table/ic-data-table.css +92 -2
  109. package/dist/collection/components/ic-data-table/ic-data-table.js +312 -102
  110. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  111. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  112. package/dist/collection/components/ic-data-table/story-data.js +293 -2
  113. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  114. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +102 -1
  115. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  116. package/dist/collection/components/ic-date-input/ic-date-input.css +2 -1
  117. package/dist/collection/components/ic-date-input/ic-date-input.js +8 -1
  118. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  119. package/dist/collection/components/ic-date-picker/ic-date-picker.js +8 -1
  120. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  121. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +40 -1
  122. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  123. package/dist/collection/components/ic-tree-item/ic-tree-item.css +20 -3
  124. package/dist/collection/components/ic-tree-item/ic-tree-item.js +33 -12
  125. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
  126. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +3 -0
  127. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -1
  128. package/dist/collection/components/ic-tree-view/ic-tree-view.css +16 -2
  129. package/dist/collection/components/ic-tree-view/ic-tree-view.js +54 -11
  130. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
  131. package/dist/collection/utils/helpers.js +42 -25
  132. package/dist/collection/utils/helpers.js.map +1 -1
  133. package/dist/collection/utils/types.js +6 -6
  134. package/dist/collection/utils/types.js.map +1 -1
  135. package/dist/components/helpers.js +51 -26
  136. package/dist/components/helpers.js.map +1 -1
  137. package/dist/components/helpers2.js +37 -17
  138. package/dist/components/helpers2.js.map +1 -1
  139. package/dist/components/ic-accordion.js +9 -1
  140. package/dist/components/ic-accordion.js.map +1 -1
  141. package/dist/components/ic-alert.js +4 -11
  142. package/dist/components/ic-alert.js.map +1 -1
  143. package/dist/components/ic-badge.js +2 -2
  144. package/dist/components/ic-badge.js.map +1 -1
  145. package/dist/components/ic-button2.js +11 -8
  146. package/dist/components/ic-button2.js.map +1 -1
  147. package/dist/components/ic-card-horizontal.js +22 -17
  148. package/dist/components/ic-card-horizontal.js.map +1 -1
  149. package/dist/components/ic-card-vertical.js +30 -26
  150. package/dist/components/ic-card-vertical.js.map +1 -1
  151. package/dist/components/ic-checkbox-group.js +5 -0
  152. package/dist/components/ic-checkbox-group.js.map +1 -1
  153. package/dist/components/ic-checkbox.js +5 -0
  154. package/dist/components/ic-checkbox.js.map +1 -1
  155. package/dist/components/ic-chip.js +11 -4
  156. package/dist/components/ic-chip.js.map +1 -1
  157. package/dist/components/ic-data-table.js +278 -100
  158. package/dist/components/ic-data-table.js.map +1 -1
  159. package/dist/components/ic-date-input2.js +8 -2
  160. package/dist/components/ic-date-input2.js.map +1 -1
  161. package/dist/components/ic-date-picker.js +7 -1
  162. package/dist/components/ic-date-picker.js.map +1 -1
  163. package/dist/components/ic-divider2.js +4 -4
  164. package/dist/components/ic-divider2.js.map +1 -1
  165. package/dist/components/ic-empty-state2.js +3 -13
  166. package/dist/components/ic-empty-state2.js.map +1 -1
  167. package/dist/components/ic-footer-link-group.js +5 -6
  168. package/dist/components/ic-footer-link-group.js.map +1 -1
  169. package/dist/components/ic-footer-link.js +5 -6
  170. package/dist/components/ic-footer-link.js.map +1 -1
  171. package/dist/components/ic-footer.js +25 -15
  172. package/dist/components/ic-footer.js.map +1 -1
  173. package/dist/components/ic-hero.js +9 -17
  174. package/dist/components/ic-hero.js.map +1 -1
  175. package/dist/components/ic-horizontal-scroll2.js +3 -3
  176. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  177. package/dist/components/ic-input-component-container2.js +15 -11
  178. package/dist/components/ic-input-component-container2.js.map +1 -1
  179. package/dist/components/ic-link2.js +10 -7
  180. package/dist/components/ic-link2.js.map +1 -1
  181. package/dist/components/ic-menu-item2.js +9 -1
  182. package/dist/components/ic-menu-item2.js.map +1 -1
  183. package/dist/components/ic-menu2.js +28 -15
  184. package/dist/components/ic-menu2.js.map +1 -1
  185. package/dist/components/ic-navigation-button.js +7 -8
  186. package/dist/components/ic-navigation-button.js.map +1 -1
  187. package/dist/components/ic-navigation-group.js +6 -7
  188. package/dist/components/ic-navigation-group.js.map +1 -1
  189. package/dist/components/ic-navigation-item.js +5 -5
  190. package/dist/components/ic-navigation-item.js.map +1 -1
  191. package/dist/components/ic-navigation-menu2.js +1 -1
  192. package/dist/components/ic-pagination-bar2.js +25 -4
  193. package/dist/components/ic-pagination-bar2.js.map +1 -1
  194. package/dist/components/ic-pagination-item2.js +6 -1
  195. package/dist/components/ic-pagination-item2.js.map +1 -1
  196. package/dist/components/ic-pagination2.js +5 -0
  197. package/dist/components/ic-pagination2.js.map +1 -1
  198. package/dist/components/ic-popover-menu.js +1 -1
  199. package/dist/components/ic-radio-group.js +8 -0
  200. package/dist/components/ic-radio-group.js.map +1 -1
  201. package/dist/components/ic-radio-option.js +6 -1
  202. package/dist/components/ic-radio-option.js.map +1 -1
  203. package/dist/components/ic-search-bar.js +52 -54
  204. package/dist/components/ic-search-bar.js.map +1 -1
  205. package/dist/components/ic-select2.js +54 -35
  206. package/dist/components/ic-select2.js.map +1 -1
  207. package/dist/components/ic-side-navigation.js +6 -6
  208. package/dist/components/ic-side-navigation.js.map +1 -1
  209. package/dist/components/ic-stepper.js +1 -1
  210. package/dist/components/ic-switch.js +8 -3
  211. package/dist/components/ic-switch.js.map +1 -1
  212. package/dist/components/ic-tab.js +5 -2
  213. package/dist/components/ic-tab.js.map +1 -1
  214. package/dist/components/ic-text-field2.js +28 -10
  215. package/dist/components/ic-text-field2.js.map +1 -1
  216. package/dist/components/ic-theme.js +22 -22
  217. package/dist/components/ic-theme.js.map +1 -1
  218. package/dist/components/ic-toast.js +1 -1
  219. package/dist/components/ic-toggle-button-group.js +34 -11
  220. package/dist/components/ic-toggle-button-group.js.map +1 -1
  221. package/dist/components/ic-toggle-button.js +67 -13
  222. package/dist/components/ic-toggle-button.js.map +1 -1
  223. package/dist/components/ic-top-navigation.js +11 -7
  224. package/dist/components/ic-top-navigation.js.map +1 -1
  225. package/dist/components/ic-tree-item.js +17 -13
  226. package/dist/components/ic-tree-item.js.map +1 -1
  227. package/dist/components/ic-tree-view.js +22 -14
  228. package/dist/components/ic-tree-view.js.map +1 -1
  229. package/dist/core/core.css +78 -46
  230. package/dist/core/core.esm.js +1 -1
  231. package/dist/core/core.esm.js.map +1 -1
  232. package/dist/core/{p-9da6df82.entry.js → p-01034ef4.entry.js} +2 -2
  233. package/dist/core/p-033f3971.entry.js +2 -0
  234. package/dist/core/p-033f3971.entry.js.map +1 -0
  235. package/dist/core/{p-f5d1e747.entry.js → p-03d51c20.entry.js} +2 -2
  236. package/dist/core/{p-a67c358a.entry.js → p-05890d1e.entry.js} +2 -2
  237. package/dist/core/{p-dd3a9cb1.entry.js → p-07bcfaef.entry.js} +2 -2
  238. package/dist/core/{p-a0c3f221.entry.js → p-0d918e59.entry.js} +2 -2
  239. package/dist/core/p-0d918e59.entry.js.map +1 -0
  240. package/dist/core/p-10640219.entry.js +2 -0
  241. package/dist/core/p-10640219.entry.js.map +1 -0
  242. package/dist/core/p-15e382a4.entry.js +2 -0
  243. package/dist/core/p-15e382a4.entry.js.map +1 -0
  244. package/dist/core/p-16b64836.entry.js +2 -0
  245. package/dist/core/p-16b64836.entry.js.map +1 -0
  246. package/dist/core/p-186edbae.entry.js +2 -0
  247. package/dist/core/p-186edbae.entry.js.map +1 -0
  248. package/dist/core/p-1c94e08c.entry.js +2 -0
  249. package/dist/core/p-1c94e08c.entry.js.map +1 -0
  250. package/dist/core/p-1d3f7a04.entry.js +2 -0
  251. package/dist/core/p-1d3f7a04.entry.js.map +1 -0
  252. package/dist/core/{p-10afa533.entry.js → p-22708591.entry.js} +2 -2
  253. package/dist/core/p-23afb7d0.entry.js +2 -0
  254. package/dist/core/p-23afb7d0.entry.js.map +1 -0
  255. package/dist/core/p-289fff24.entry.js +2 -0
  256. package/dist/core/p-289fff24.entry.js.map +1 -0
  257. package/dist/core/{p-40f94113.entry.js → p-2fd78585.entry.js} +2 -2
  258. package/dist/core/{p-3d478ba9.entry.js → p-345a88a7.entry.js} +2 -2
  259. package/dist/core/{p-3d478ba9.entry.js.map → p-345a88a7.entry.js.map} +1 -1
  260. package/dist/core/p-361da840.entry.js +2 -0
  261. package/dist/core/p-361da840.entry.js.map +1 -0
  262. package/dist/core/p-3f182d5d.entry.js +2 -0
  263. package/dist/core/p-3f182d5d.entry.js.map +1 -0
  264. package/dist/core/{p-0687cc81.entry.js → p-49bf3a47.entry.js} +2 -2
  265. package/dist/core/p-49bf3a47.entry.js.map +1 -0
  266. package/dist/core/p-4abbdbbc.entry.js +2 -0
  267. package/dist/core/p-4abbdbbc.entry.js.map +1 -0
  268. package/dist/core/p-5193184c.entry.js +2 -0
  269. package/dist/core/p-5193184c.entry.js.map +1 -0
  270. package/dist/core/{p-c894bc8f.entry.js → p-51fd68b7.entry.js} +2 -2
  271. package/dist/core/p-51fd68b7.entry.js.map +1 -0
  272. package/dist/core/p-563392e4.entry.js +2 -0
  273. package/dist/core/p-563392e4.entry.js.map +1 -0
  274. package/dist/core/p-5a48839e.entry.js +2 -0
  275. package/dist/core/p-5a48839e.entry.js.map +1 -0
  276. package/dist/core/p-5cbf0885.entry.js +2 -0
  277. package/dist/core/p-5cbf0885.entry.js.map +1 -0
  278. package/dist/core/{p-6f92ee7a.entry.js → p-5dcee0aa.entry.js} +2 -2
  279. package/dist/core/{p-b4eb1c6d.entry.js → p-646f21ff.entry.js} +2 -2
  280. package/dist/core/{p-c4dc8fdf.entry.js → p-74b676a6.entry.js} +2 -2
  281. package/dist/core/{p-acb0eddb.entry.js → p-74e63f4d.entry.js} +2 -2
  282. package/dist/core/{p-df05b999.entry.js → p-77f26d29.entry.js} +2 -2
  283. package/dist/core/p-77f26d29.entry.js.map +1 -0
  284. package/dist/core/{p-e4b9221b.entry.js → p-792ec0a3.entry.js} +2 -2
  285. package/dist/core/p-792ec0a3.entry.js.map +1 -0
  286. package/dist/core/{p-bd5aada7.entry.js → p-79c8879c.entry.js} +2 -2
  287. package/dist/core/{p-3b3a8108.entry.js → p-7d5a0251.entry.js} +2 -2
  288. package/dist/core/{p-160de322.entry.js → p-7eef69d7.entry.js} +2 -2
  289. package/dist/core/p-8167f2e0.entry.js +2 -0
  290. package/dist/core/p-8167f2e0.entry.js.map +1 -0
  291. package/dist/core/p-8576281d.entry.js +2 -0
  292. package/dist/core/p-8576281d.entry.js.map +1 -0
  293. package/dist/core/{p-fca3589b.entry.js → p-87cd3985.entry.js} +2 -2
  294. package/dist/core/p-8d3e250a.entry.js +2 -0
  295. package/dist/core/p-8d3e250a.entry.js.map +1 -0
  296. package/dist/core/p-8eb30ebf.entry.js +2 -0
  297. package/dist/core/p-8eb30ebf.entry.js.map +1 -0
  298. package/dist/core/{p-ffe923ae.entry.js → p-901879b8.entry.js} +2 -2
  299. package/dist/core/p-92bb5fe9.entry.js +2 -0
  300. package/dist/core/p-92bb5fe9.entry.js.map +1 -0
  301. package/dist/core/p-94efa0d2.entry.js +2 -0
  302. package/dist/core/p-94efa0d2.entry.js.map +1 -0
  303. package/dist/core/p-9f5071bd.entry.js +2 -0
  304. package/dist/core/p-9f5071bd.entry.js.map +1 -0
  305. package/dist/core/p-a04712b9.js +2 -0
  306. package/dist/core/p-a04712b9.js.map +1 -0
  307. package/dist/core/{p-29623ad5.entry.js → p-a683fd94.entry.js} +2 -2
  308. package/dist/core/p-a683fd94.entry.js.map +1 -0
  309. package/dist/core/{p-70543f44.entry.js → p-b2a6f0dd.entry.js} +2 -2
  310. package/dist/core/p-be6d9ab9.entry.js +2 -0
  311. package/dist/core/p-be6d9ab9.entry.js.map +1 -0
  312. package/dist/core/{p-91cf88d6.entry.js → p-d0c7bc04.entry.js} +2 -2
  313. package/dist/core/p-d0c7bc04.entry.js.map +1 -0
  314. package/dist/core/{p-3106c4fd.entry.js → p-d1b8e306.entry.js} +2 -2
  315. package/dist/core/{p-bc7d33e1.entry.js → p-db924212.entry.js} +2 -2
  316. package/dist/core/p-db924212.entry.js.map +1 -0
  317. package/dist/core/p-dd5daf97.entry.js +2 -0
  318. package/dist/core/p-dd5daf97.entry.js.map +1 -0
  319. package/dist/core/{p-9235425c.entry.js → p-dedca102.entry.js} +2 -2
  320. package/dist/core/{p-f08723ca.entry.js → p-eb09d6af.entry.js} +2 -2
  321. package/dist/core/p-ee5388e6.entry.js +2 -0
  322. package/dist/core/p-ee5388e6.entry.js.map +1 -0
  323. package/dist/core/p-f1fcc442.entry.js +2 -0
  324. package/dist/core/p-f1fcc442.entry.js.map +1 -0
  325. package/dist/core/{p-3bbfefcc.entry.js → p-f3995b20.entry.js} +2 -2
  326. package/dist/core/p-f3995b20.entry.js.map +1 -0
  327. package/dist/core/p-fa002d21.js +2 -0
  328. package/dist/core/p-fa002d21.js.map +1 -0
  329. package/dist/core/{p-e532fa26.entry.js → p-faae4ac4.entry.js} +2 -2
  330. package/dist/core/p-faae4ac4.entry.js.map +1 -0
  331. package/dist/esm/core.js +1 -1
  332. package/dist/esm/{helpers-d399f9c8.js → helpers-0f42cb46.js} +38 -18
  333. package/dist/esm/helpers-0f42cb46.js.map +1 -0
  334. package/dist/esm/{helpers-d3091c8c.js → helpers-96838a0a.js} +52 -27
  335. package/dist/esm/helpers-96838a0a.js.map +1 -0
  336. package/dist/esm/ic-accordion-group.entry.js +1 -1
  337. package/dist/esm/ic-accordion.entry.js +8 -1
  338. package/dist/esm/ic-accordion.entry.js.map +1 -1
  339. package/dist/esm/ic-alert.entry.js +4 -11
  340. package/dist/esm/ic-alert.entry.js.map +1 -1
  341. package/dist/esm/ic-back-to-top.entry.js +1 -1
  342. package/dist/esm/ic-badge.entry.js +2 -2
  343. package/dist/esm/ic-badge.entry.js.map +1 -1
  344. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  345. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  346. package/dist/esm/ic-button_3.entry.js +10 -7
  347. package/dist/esm/ic-button_3.entry.js.map +1 -1
  348. package/dist/esm/ic-card-horizontal.entry.js +19 -16
  349. package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
  350. package/dist/esm/ic-card-vertical.entry.js +27 -25
  351. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  352. package/dist/esm/ic-checkbox-group.entry.js +5 -1
  353. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  354. package/dist/esm/ic-checkbox.entry.js +5 -1
  355. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  356. package/dist/esm/ic-chip.entry.js +9 -4
  357. package/dist/esm/ic-chip.entry.js.map +1 -1
  358. package/dist/esm/ic-data-row.entry.js +1 -1
  359. package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
  360. package/dist/esm/ic-data-table.entry.js +277 -100
  361. package/dist/esm/ic-data-table.entry.js.map +1 -1
  362. package/dist/esm/ic-date-input.entry.js +7 -2
  363. package/dist/esm/ic-date-input.entry.js.map +1 -1
  364. package/dist/esm/ic-date-picker.entry.js +6 -1
  365. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  366. package/dist/esm/ic-dialog.entry.js +1 -1
  367. package/dist/esm/ic-divider.entry.js +3 -3
  368. package/dist/esm/ic-divider.entry.js.map +1 -1
  369. package/dist/esm/ic-empty-state_2.entry.js +25 -16
  370. package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
  371. package/dist/esm/ic-footer-link-group.entry.js +4 -5
  372. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  373. package/dist/esm/ic-footer-link.entry.js +4 -5
  374. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  375. package/dist/esm/ic-footer.entry.js +24 -14
  376. package/dist/esm/ic-footer.entry.js.map +1 -1
  377. package/dist/esm/ic-hero.entry.js +8 -16
  378. package/dist/esm/ic-hero.entry.js.map +1 -1
  379. package/dist/esm/ic-horizontal-scroll.entry.js +3 -3
  380. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  381. package/dist/esm/ic-input-component-container_3.entry.js +40 -25
  382. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  383. package/dist/esm/ic-input-label_2.entry.js +1 -1
  384. package/dist/esm/ic-link.entry.js +9 -6
  385. package/dist/esm/ic-link.entry.js.map +1 -1
  386. package/dist/esm/ic-menu-group.entry.js +1 -1
  387. package/dist/esm/ic-menu-item.entry.js +7 -1
  388. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  389. package/dist/esm/ic-navigation-button.entry.js +6 -7
  390. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  391. package/dist/esm/ic-navigation-group.entry.js +5 -6
  392. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  393. package/dist/esm/ic-navigation-item.entry.js +4 -4
  394. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  395. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  396. package/dist/esm/ic-page-header.entry.js +1 -1
  397. package/dist/esm/ic-pagination_4.entry.js +85 -42
  398. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  399. package/dist/esm/ic-popover-menu.entry.js +1 -1
  400. package/dist/esm/ic-radio-group.entry.js +9 -1
  401. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  402. package/dist/esm/ic-radio-option.entry.js +5 -1
  403. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  404. package/dist/esm/ic-search-bar.entry.js +37 -29
  405. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  406. package/dist/esm/ic-side-navigation.entry.js +5 -5
  407. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  408. package/dist/esm/ic-status-tag.entry.js +1 -1
  409. package/dist/esm/ic-step.entry.js +1 -1
  410. package/dist/esm/ic-stepper.entry.js +1 -1
  411. package/dist/esm/ic-switch.entry.js +6 -2
  412. package/dist/esm/ic-switch.entry.js.map +1 -1
  413. package/dist/esm/ic-tab-group.entry.js +1 -1
  414. package/dist/esm/ic-tab-panel.entry.js +1 -1
  415. package/dist/esm/ic-tab.entry.js +5 -2
  416. package/dist/esm/ic-tab.entry.js.map +1 -1
  417. package/dist/esm/ic-theme.entry.js +20 -20
  418. package/dist/esm/ic-theme.entry.js.map +1 -1
  419. package/dist/esm/ic-toast.entry.js +1 -1
  420. package/dist/esm/ic-toggle-button-group.entry.js +29 -10
  421. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  422. package/dist/esm/ic-toggle-button.entry.js +57 -5
  423. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  424. package/dist/esm/ic-top-navigation.entry.js +10 -6
  425. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  426. package/dist/esm/ic-tree-item.entry.js +15 -13
  427. package/dist/esm/ic-tree-item.entry.js.map +1 -1
  428. package/dist/esm/ic-tree-view.entry.js +18 -13
  429. package/dist/esm/ic-tree-view.entry.js.map +1 -1
  430. package/dist/esm/ic-typography.entry.js +1 -1
  431. package/dist/esm/loader.js +1 -1
  432. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +4 -4
  433. package/dist/types/components/ic-data-table/ic-data-table.d.ts +25 -0
  434. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +11 -0
  435. package/dist/types/components/ic-data-table/story-data.d.ts +181 -0
  436. package/dist/types/components/ic-date-input/ic-date-input.d.ts +1 -0
  437. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +1 -0
  438. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +6 -0
  439. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +6 -1
  440. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +9 -1
  441. package/dist/types/components.d.ts +47 -0
  442. package/dist/types/utils/helpers.d.ts +13 -10
  443. package/dist/types/utils/types.d.ts +6 -5
  444. package/hydrate/index.js +897 -448
  445. package/package.json +3 -10
  446. package/dist/cjs/helpers-55099147.js.map +0 -1
  447. package/dist/cjs/helpers-c80f6ce4.js.map +0 -1
  448. package/dist/core/p-006afa83.entry.js +0 -2
  449. package/dist/core/p-006afa83.entry.js.map +0 -1
  450. package/dist/core/p-0687cc81.entry.js.map +0 -1
  451. package/dist/core/p-12b1db1b.entry.js +0 -2
  452. package/dist/core/p-12b1db1b.entry.js.map +0 -1
  453. package/dist/core/p-199ce579.entry.js +0 -2
  454. package/dist/core/p-199ce579.entry.js.map +0 -1
  455. package/dist/core/p-25597c03.js +0 -2
  456. package/dist/core/p-25597c03.js.map +0 -1
  457. package/dist/core/p-29623ad5.entry.js.map +0 -1
  458. package/dist/core/p-2d6fffa4.entry.js +0 -2
  459. package/dist/core/p-2d6fffa4.entry.js.map +0 -1
  460. package/dist/core/p-31082e64.entry.js +0 -2
  461. package/dist/core/p-31082e64.entry.js.map +0 -1
  462. package/dist/core/p-3bbfefcc.entry.js.map +0 -1
  463. package/dist/core/p-43891495.entry.js +0 -2
  464. package/dist/core/p-43891495.entry.js.map +0 -1
  465. package/dist/core/p-47ae7d10.entry.js +0 -2
  466. package/dist/core/p-47ae7d10.entry.js.map +0 -1
  467. package/dist/core/p-59d48811.entry.js +0 -2
  468. package/dist/core/p-59d48811.entry.js.map +0 -1
  469. package/dist/core/p-690d0bbd.entry.js +0 -2
  470. package/dist/core/p-690d0bbd.entry.js.map +0 -1
  471. package/dist/core/p-6f7cf143.entry.js +0 -2
  472. package/dist/core/p-6f7cf143.entry.js.map +0 -1
  473. package/dist/core/p-7a1f1e0d.entry.js +0 -2
  474. package/dist/core/p-7a1f1e0d.entry.js.map +0 -1
  475. package/dist/core/p-7c843bc8.entry.js +0 -2
  476. package/dist/core/p-7c843bc8.entry.js.map +0 -1
  477. package/dist/core/p-7e358f32.entry.js +0 -2
  478. package/dist/core/p-7e358f32.entry.js.map +0 -1
  479. package/dist/core/p-81da002e.entry.js +0 -2
  480. package/dist/core/p-81da002e.entry.js.map +0 -1
  481. package/dist/core/p-83c09d8d.entry.js +0 -2
  482. package/dist/core/p-83c09d8d.entry.js.map +0 -1
  483. package/dist/core/p-8d933976.entry.js +0 -2
  484. package/dist/core/p-8d933976.entry.js.map +0 -1
  485. package/dist/core/p-91cf88d6.entry.js.map +0 -1
  486. package/dist/core/p-92f443aa.entry.js +0 -2
  487. package/dist/core/p-92f443aa.entry.js.map +0 -1
  488. package/dist/core/p-982deb94.entry.js +0 -2
  489. package/dist/core/p-982deb94.entry.js.map +0 -1
  490. package/dist/core/p-99c76218.entry.js +0 -2
  491. package/dist/core/p-99c76218.entry.js.map +0 -1
  492. package/dist/core/p-9ae77f11.entry.js +0 -2
  493. package/dist/core/p-9ae77f11.entry.js.map +0 -1
  494. package/dist/core/p-a0c3f221.entry.js.map +0 -1
  495. package/dist/core/p-b2389339.js +0 -2
  496. package/dist/core/p-b2389339.js.map +0 -1
  497. package/dist/core/p-b4dd4835.entry.js +0 -2
  498. package/dist/core/p-b4dd4835.entry.js.map +0 -1
  499. package/dist/core/p-bc7d33e1.entry.js.map +0 -1
  500. package/dist/core/p-bdce46ca.entry.js +0 -2
  501. package/dist/core/p-bdce46ca.entry.js.map +0 -1
  502. package/dist/core/p-be7bc371.entry.js +0 -2
  503. package/dist/core/p-be7bc371.entry.js.map +0 -1
  504. package/dist/core/p-c12f3582.entry.js +0 -2
  505. package/dist/core/p-c12f3582.entry.js.map +0 -1
  506. package/dist/core/p-c5ea1e19.entry.js +0 -2
  507. package/dist/core/p-c5ea1e19.entry.js.map +0 -1
  508. package/dist/core/p-c894bc8f.entry.js.map +0 -1
  509. package/dist/core/p-df05b999.entry.js.map +0 -1
  510. package/dist/core/p-e4b9221b.entry.js.map +0 -1
  511. package/dist/core/p-e532fa26.entry.js.map +0 -1
  512. package/dist/core/p-e89e5ec8.entry.js +0 -2
  513. package/dist/core/p-e89e5ec8.entry.js.map +0 -1
  514. package/dist/core/p-f4414801.entry.js +0 -2
  515. package/dist/core/p-f4414801.entry.js.map +0 -1
  516. package/dist/esm/helpers-d3091c8c.js.map +0 -1
  517. package/dist/esm/helpers-d399f9c8.js.map +0 -1
  518. /package/dist/core/{p-9da6df82.entry.js.map → p-01034ef4.entry.js.map} +0 -0
  519. /package/dist/core/{p-f5d1e747.entry.js.map → p-03d51c20.entry.js.map} +0 -0
  520. /package/dist/core/{p-a67c358a.entry.js.map → p-05890d1e.entry.js.map} +0 -0
  521. /package/dist/core/{p-dd3a9cb1.entry.js.map → p-07bcfaef.entry.js.map} +0 -0
  522. /package/dist/core/{p-10afa533.entry.js.map → p-22708591.entry.js.map} +0 -0
  523. /package/dist/core/{p-40f94113.entry.js.map → p-2fd78585.entry.js.map} +0 -0
  524. /package/dist/core/{p-6f92ee7a.entry.js.map → p-5dcee0aa.entry.js.map} +0 -0
  525. /package/dist/core/{p-b4eb1c6d.entry.js.map → p-646f21ff.entry.js.map} +0 -0
  526. /package/dist/core/{p-c4dc8fdf.entry.js.map → p-74b676a6.entry.js.map} +0 -0
  527. /package/dist/core/{p-acb0eddb.entry.js.map → p-74e63f4d.entry.js.map} +0 -0
  528. /package/dist/core/{p-bd5aada7.entry.js.map → p-79c8879c.entry.js.map} +0 -0
  529. /package/dist/core/{p-3b3a8108.entry.js.map → p-7d5a0251.entry.js.map} +0 -0
  530. /package/dist/core/{p-160de322.entry.js.map → p-7eef69d7.entry.js.map} +0 -0
  531. /package/dist/core/{p-fca3589b.entry.js.map → p-87cd3985.entry.js.map} +0 -0
  532. /package/dist/core/{p-ffe923ae.entry.js.map → p-901879b8.entry.js.map} +0 -0
  533. /package/dist/core/{p-70543f44.entry.js.map → p-b2a6f0dd.entry.js.map} +0 -0
  534. /package/dist/core/{p-3106c4fd.entry.js.map → p-d1b8e306.entry.js.map} +0 -0
  535. /package/dist/core/{p-9235425c.entry.js.map → p-dedca102.entry.js.map} +0 -0
  536. /package/dist/core/{p-f08723ca.entry.js.map → p-eb09d6af.entry.js.map} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-93509377.js';
2
+ import { r as removeDisabledFalse } from './helpers-96838a0a.js';
2
3
 
3
4
  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-toggle-button-unselected-border);border-radius:var(--ic-border-radius)}:host(.ic-toggle-button-group-full-width){width:100%;max-width:100%}:host(.ic-toggle-button-group-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 !important;--toggle-button-border-hover:none !important;--toggle-button-border-active:none !important}::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border)}:host(.ic-toggle-button-group-disabled){border:var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);pointer-events:none}:host(.ic-toggle-button-group-disabled) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled)}:host(.ic-toggle-button-group-monochrome){border:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome)}:host(.ic-toggle-button-group-monochrome) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome)}:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome){border:var(--ic-border-width) dashed\n var(--ic-toggle-button-unselected-border-disabled-monochrome)}:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-disabled-monochrome)}";
4
5
 
@@ -100,17 +101,38 @@ const ToggleButtonGroup = class {
100
101
  this.getAllToggleButtons().forEach((el) => {
101
102
  el.disabled = this.disabled;
102
103
  });
104
+ removeDisabledFalse(this.disabled, this.el);
105
+ }
106
+ watchFullWidthHandler() {
107
+ this.getAllToggleButtons().forEach((el) => {
108
+ el.fullWidth = this.fullWidth;
109
+ });
110
+ }
111
+ watchLoadingHandler() {
112
+ this.getAllToggleButtons().forEach((el) => {
113
+ el.loading = this.loading;
114
+ });
103
115
  }
104
116
  watchMonochromeHandler() {
105
117
  this.getAllToggleButtons().forEach((el) => {
106
118
  el.monochrome = this.monochrome;
107
119
  });
108
120
  }
121
+ watchSizeHandler() {
122
+ this.getAllToggleButtons().forEach((el) => {
123
+ el.size = this.size;
124
+ });
125
+ }
109
126
  watchThemeHandler() {
110
127
  this.getAllToggleButtons().forEach((el) => {
111
128
  el.theme = this.theme;
112
129
  });
113
130
  }
131
+ watchVariantHandler() {
132
+ this.getAllToggleButtons().forEach((el) => {
133
+ el.variant = this.variant;
134
+ });
135
+ }
114
136
  selectHandler(ev, tabTarget) {
115
137
  const allToggles = this.getAllToggleButtons();
116
138
  let clickedToggle = ev.target;
@@ -144,18 +166,11 @@ const ToggleButtonGroup = class {
144
166
  componentWillLoad() {
145
167
  this.selectType === "multi" && (this.selectMethod = "manual");
146
168
  document.addEventListener("keydown", this.keyListener);
169
+ removeDisabledFalse(this.disabled, this.el);
147
170
  }
148
171
  componentDidLoad() {
149
172
  this.getAllToggleButtons().forEach((el, i) => {
150
173
  this.setSlottedAria(el);
151
- el.size = this.size;
152
- el.loading = this.loading;
153
- el.iconPlacement = this.iconPlacement;
154
- el.disabled ? null : (el.disabled = this.disabled);
155
- el.theme = this.theme;
156
- el.monochrome = this.monochrome;
157
- el.variant = this.variant;
158
- el.fullWidth = this.fullWidth;
159
174
  el.id = i.toString();
160
175
  el.tabIndex = -1;
161
176
  el.addEventListener("keydown", (ev) => {
@@ -181,7 +196,7 @@ const ToggleButtonGroup = class {
181
196
  return Array.from(this.el.querySelectorAll("ic-toggle-button"));
182
197
  }
183
198
  render() {
184
- return (h(Host, { role: "group", "aria-label": this.accessibleLabel, "aria-disabled": this.disabled ? "true" : "false", tabindex: 0, class: {
199
+ return (h(Host, { role: "group", "aria-label": this.accessibleLabel, tabindex: 0, class: {
185
200
  [`ic-theme-${this.theme}`]: this.theme !== "inherit",
186
201
  ["ic-toggle-button-group-full-width"]: this.fullWidth,
187
202
  ["ic-toggle-button-group-loading"]: this.loading,
@@ -193,8 +208,12 @@ const ToggleButtonGroup = class {
193
208
  get el() { return getElement(this); }
194
209
  static get watchers() { return {
195
210
  "disabled": ["watchDisabledHandler"],
211
+ "fullWidth": ["watchFullWidthHandler"],
212
+ "loading": ["watchLoadingHandler"],
196
213
  "monochrome": ["watchMonochromeHandler"],
197
- "theme": ["watchThemeHandler"]
214
+ "size": ["watchSizeHandler"],
215
+ "theme": ["watchThemeHandler"],
216
+ "variant": ["watchVariantHandler"]
198
217
  }; }
199
218
  };
200
219
  ToggleButtonGroup.style = icToggleButtonGroupCss;
@@ -1 +1 @@
1
- {"file":"ic-toggle-button-group.entry.js","mappings":";;AAAA,MAAM,sBAAsB,GAAG,2zIAA2zI;;ACC11I,MAAM,YAAY,GAAG,wBAAwB,CAAC;MACjC,iBAAiB;IAC1B;;;QACI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE;YAClB,IAAI,CAAC,cAAc,GAAG;gBAClB,GAAG,EAAE,EAAE,CAAC,GAAG;gBACX,KAAK,EAAE,EAAE,CAAC,QAAQ;aACrB,CAAC;SACL,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,CAAC,EAAE;YACrB,MAAM,GAAG,GAAG,EAAE,CAAC,UAAU;iBACpB,aAAa,CAAC,WAAW,CAAC;iBAC1B,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YACxC,IAAI,IAAI,GAAG,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;YAC1C,IAAI,IAAI,IAAI,CAAC;YACb,IAAI,IAAI,IAAI,CAAC,eAAe,CAAC;YAC7B,GAAG,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;SACxC,CAAC;QACF,IAAI,CAAC,eAA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AAI,WAAW,CAAC,iBAAiB,EAAE;YAChD,MAAM,EAAE;gBACJ,OAAO,EAAE,MAAM,CAAC,OAAO;aAC1B;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;KACxC;IACD,mBAAmB;QACf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC;KACnE;IACD,MAAM;QACF,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,eAAe,EAAE,eAAe,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE;gBACpI,CAAC,YAAY,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS;gBACpD,CAAC,mCAAmC,GAAG,IAAI,CAAC,SAAS;gBACrD,CAAC,gCAAgC,GAAG,IAAI,CAAC,OAAO;gBAChD,CAAC,iCAAiC,GAAG,IAAI,CAAC,QAAQ;gBAClD,CAAC,mCAAmC,GAAG,IAAI,CAAC,UAAU;gBACtD,CAAC,YAAY,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS;aACvD,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE;KAC7D;;;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css?tag=ic-toggle-button-group&encapsulation=shadow","../web-components/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/* PARENT HOST */\n\n:root {\n display: block;\n}\n\n:host {\n display: flex;\n flex-direction: row;\n width: -moz-fit-content;\n width: fit-content;\n min-width: -moz-min-content;\n min-width: min-content;\n border: var(--ic-border-width) solid var(--ic-toggle-button-unselected-border);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.ic-toggle-button-group-full-width) {\n width: 100%;\n max-width: 100%;\n}\n\n:host(.ic-toggle-button-group-loading) {\n min-width: -moz-max-content;\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: -moz-min-content;\n width: min-content;\n\n --toggle-button-border: none !important;\n --toggle-button-border-hover: none !important;\n --toggle-button-border-active: none !important;\n}\n\n::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border);\n}\n\n/* DISABLED */\n:host(.ic-toggle-button-group-disabled) {\n border: var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);\n pointer-events: none;\n}\n\n:host(.ic-toggle-button-group-disabled)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);\n}\n\n:host(.ic-toggle-button-group-monochrome) {\n border: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome);\n}\n\n:host(.ic-toggle-button-group-monochrome)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome);\n}\n\n:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome) {\n border: var(--ic-border-width) dashed\n var(--ic-toggle-button-unselected-border-disabled-monochrome);\n}\n\n:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-disabled-monochrome);\n}\n","import { Host, h, } from \"@stencil/core\";\nconst TOGGLE_GROUP = \"IC-TOGGLE-BUTTON-GROUP\";\nexport class ToggleButtonGroup {\n constructor() {\n this.keyListener = (ev) => {\n this.lastKeyPressed = {\n key: ev.key,\n shift: ev.shiftKey,\n };\n };\n this.setSlottedAria = (el) => {\n const btn = el.shadowRoot\n .querySelector(\"ic-button\")\n .shadowRoot.querySelector(\"button\");\n let aria = btn.getAttribute(\"aria-label\");\n aria += \", \";\n aria += this.accessibleLabel;\n btn.setAttribute(\"aria-label\", aria);\n };\n this.handleHostFocus = (ev) => {\n if (this.loading || this.disabled) {\n return null;\n }\n const el = ev.target;\n const relEl = ev.relatedTarget;\n const toggleButtons = Array.from(el.querySelectorAll(\"ic-toggle-button\"));\n if (((toggleButtons.every((el) => !el.checked) ||\n this.selectType !== \"single\") &&\n this.lastKeyPressed.shift === false) ||\n (toggleButtons.every((el) => !el.checked) &&\n this.lastKeyPressed.shift === true &&\n relEl.tagName == TOGGLE_GROUP)) {\n toggleButtons[0].focus();\n }\n else if (this.lastKeyPressed.shift === false ||\n (this.lastKeyPressed.shift === true && relEl.tagName == TOGGLE_GROUP)) {\n // if checked is true and selectMethod is \"single\", focus that toggle\n const toggledButton = toggleButtons.filter((el) => el.checked);\n toggledButton[0].focus();\n }\n };\n this.handleKeyDown = (event) => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const focussedChild = toggleButtonOptions.indexOf(toggleButtonOptions.filter((el) => el === document.activeElement)[0]);\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.selectMethod === \"auto\"\n ? this.proxySelectHandler(toggleButtonOptions[this.getNextItemToSelect(focussedChild, true)])\n : toggleButtonOptions[this.getNextItemToSelect(focussedChild, true)].focus();\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.selectMethod === \"auto\"\n ? this.proxySelectHandler(toggleButtonOptions[this.getNextItemToSelect(focussedChild, false)])\n : toggleButtonOptions[this.getNextItemToSelect(focussedChild, false)].focus();\n break;\n case \"Tab\":\n break;\n }\n };\n this.getNextItemToSelect = (currentItem, movingDown) => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const numToggles = toggleButtonOptions.length - 1;\n if (currentItem < 1) {\n currentItem = 0;\n }\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n if (nextItem < 0) {\n nextItem = numToggles;\n }\n else if (nextItem > numToggles) {\n nextItem = 0;\n }\n if (toggleButtonOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n return nextItem;\n };\n this.lastKeyPressed = {\n key: null,\n shift: false,\n };\n this.accessibleLabel = \"Toggle button group\";\n this.disabled = false;\n this.fullWidth = false;\n this.iconPlacement = undefined;\n this.loading = false;\n this.monochrome = false;\n this.selectMethod = \"manual\";\n this.selectType = \"single\";\n this.size = \"medium\";\n this.theme = \"inherit\";\n this.variant = \"default\";\n }\n watchDisabledHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.disabled = this.disabled;\n });\n }\n watchMonochromeHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.monochrome = this.monochrome;\n });\n }\n watchThemeHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.theme = this.theme;\n });\n }\n selectHandler(ev, tabTarget) {\n const allToggles = this.getAllToggleButtons();\n let clickedToggle = ev.target;\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.checked) {\n el.checked = false;\n }\n });\n this.icChange.emit({\n checked: ev.detail.checked,\n selectedOption: clickedToggle,\n });\n }\n else {\n const toggledOptions = this.getAllToggleButtons().filter((el) => el.checked && !el.disabled);\n this.icChange.emit({\n checked: toggledOptions.map((opt) => opt.checked),\n toggledOptions: toggledOptions.map((opt) => ({\n toggleButton: opt,\n })),\n selectedOption: clickedToggle,\n });\n }\n }\n componentWillLoad() {\n this.selectType === \"multi\" && (this.selectMethod = \"manual\");\n this.selectMethod === \"auto\" && this.selectType === \"single\";\n document.addEventListener(\"keydown\", this.keyListener);\n }\n componentDidLoad() {\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.theme = this.theme;\n el.monochrome = this.monochrome;\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 disconnectedCallback() {\n document === null || document === void 0 ? void 0 : document.removeEventListener(\"keydown\", this.keyListener);\n }\n // trigger selectHandler when unable to add 'target'\n proxySelectHandler(toggle) {\n toggle.checked = true;\n const customEv = new CustomEvent(\"icToggleChecked\", {\n detail: {\n checked: toggle.checked,\n },\n });\n this.selectHandler(customEv, toggle);\n }\n getAllToggleButtons() {\n return Array.from(this.el.querySelectorAll(\"ic-toggle-button\"));\n }\n render() {\n return (h(Host, { role: \"group\", \"aria-label\": this.accessibleLabel, \"aria-disabled\": this.disabled ? \"true\" : \"false\", tabindex: 0, class: {\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n [\"ic-toggle-button-group-full-width\"]: this.fullWidth,\n [\"ic-toggle-button-group-loading\"]: this.loading,\n [\"ic-toggle-button-group-disabled\"]: this.disabled,\n [`ic-toggle-button-group-monochrome`]: this.monochrome,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }, onFocus: this.handleHostFocus }, h(\"slot\", null)));\n }\n static get is() { return \"ic-toggle-button-group\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toggle-button-group.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toggle-button-group.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label of the toggle button group component to provide context for screen reader users.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Toggle button group\\\"\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will be set to the disabled state.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"fullWidth\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will fill the width of the container.\"\n },\n \"attribute\": \"full-width\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"iconPlacement\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"resolved\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The placement of the icons in relation to the toggle button labels.\"\n },\n \"attribute\": \"icon-placement\",\n \"reflect\": false\n },\n \"loading\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will be in loading state.\"\n },\n \"attribute\": \"loading\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"monochrome\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will display as black in the light theme, and white in dark theme.\"\n },\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"selectMethod\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcSelectMethodTypes\",\n \"resolved\": \"\\\"auto\\\" | \\\"manual\\\"\",\n \"references\": {\n \"IcSelectMethodTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSelectMethodTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"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 \"attribute\": \"select-method\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"manual\\\"\"\n },\n \"selectType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSelectTypes\",\n \"resolved\": \"\\\"multi\\\" | \\\"single\\\"\",\n \"references\": {\n \"IcSelectTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSelectTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets whether single or multiple options can be toggled. If `multi`, then the `selectMethod` is always `manual`.\"\n },\n \"attribute\": \"select-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"single\\\"\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the toggle buttons to be displayed. This does not affect the font size of the accessible label.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toggle button.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"lastKeyPressed\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icChange\",\n \"name\": \"icChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when a toggle button is selected.\"\n },\n \"complexType\": {\n \"original\": \"IcChangeEventDetail\",\n \"resolved\": \"IcChangeEventDetail\",\n \"references\": {\n \"IcChangeEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-toggle-button-group.types\",\n \"id\": \"src/components/ic-toggle-button-group/ic-toggle-button-group.types.ts::IcChangeEventDetail\"\n }\n }\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"watchDisabledHandler\"\n }, {\n \"propName\": \"monochrome\",\n \"methodName\": \"watchMonochromeHandler\"\n }, {\n \"propName\": \"theme\",\n \"methodName\": \"watchThemeHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icToggleChecked\",\n \"method\": \"selectHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-toggle-button-group.js.map\n"],"version":3}
1
+ {"file":"ic-toggle-button-group.entry.js","mappings":";;;AAAA,MAAM,sBAAsB,GAAG,2zIAA2zI;;ACE11I,MAAM,YAAY,GAAG,wBAAwB,CAAC;MACjC,iBAAiB;IAC1B;;;QACI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE;YAClB,IAAI,CAAC,cAAc,GAAG;gBAClB,G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AY,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS;gBACpD,CAAC,mCAAmC,GAAG,IAAI,CAAC,SAAS;gBACrD,CAAC,gCAAgC,GAAG,IAAI,CAAC,OAAO;gBAChD,CAAC,iCAAiC,GAAG,IAAI,CAAC,QAAQ;gBAClD,CAAC,mCAAmC,GAAG,IAAI,CAAC,UAAU;gBACtD,CAAC,YAAY,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS;aACvD,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE;KAC7D;;;;;;;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css?tag=ic-toggle-button-group&encapsulation=shadow","../web-components/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/* PARENT HOST */\n\n:root {\n display: block;\n}\n\n:host {\n display: flex;\n flex-direction: row;\n width: -moz-fit-content;\n width: fit-content;\n min-width: -moz-min-content;\n min-width: min-content;\n border: var(--ic-border-width) solid var(--ic-toggle-button-unselected-border);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.ic-toggle-button-group-full-width) {\n width: 100%;\n max-width: 100%;\n}\n\n:host(.ic-toggle-button-group-loading) {\n min-width: -moz-max-content;\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: -moz-min-content;\n width: min-content;\n\n --toggle-button-border: none !important;\n --toggle-button-border-hover: none !important;\n --toggle-button-border-active: none !important;\n}\n\n::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border);\n}\n\n/* DISABLED */\n:host(.ic-toggle-button-group-disabled) {\n border: var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);\n pointer-events: none;\n}\n\n:host(.ic-toggle-button-group-disabled)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);\n}\n\n:host(.ic-toggle-button-group-monochrome) {\n border: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome);\n}\n\n:host(.ic-toggle-button-group-monochrome)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome);\n}\n\n:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome) {\n border: var(--ic-border-width) dashed\n var(--ic-toggle-button-unselected-border-disabled-monochrome);\n}\n\n:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-disabled-monochrome);\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { removeDisabledFalse } from \"../../utils/helpers\";\nconst TOGGLE_GROUP = \"IC-TOGGLE-BUTTON-GROUP\";\nexport class ToggleButtonGroup {\n constructor() {\n this.keyListener = (ev) => {\n this.lastKeyPressed = {\n key: ev.key,\n shift: ev.shiftKey,\n };\n };\n this.setSlottedAria = (el) => {\n const btn = el.shadowRoot\n .querySelector(\"ic-button\")\n .shadowRoot.querySelector(\"button\");\n let aria = btn.getAttribute(\"aria-label\");\n aria += \", \";\n aria += this.accessibleLabel;\n btn.setAttribute(\"aria-label\", aria);\n };\n this.handleHostFocus = (ev) => {\n if (this.loading || this.disabled) {\n return null;\n }\n const el = ev.target;\n const relEl = ev.relatedTarget;\n const toggleButtons = Array.from(el.querySelectorAll(\"ic-toggle-button\"));\n if (((toggleButtons.every((el) => !el.checked) ||\n this.selectType !== \"single\") &&\n this.lastKeyPressed.shift === false) ||\n (toggleButtons.every((el) => !el.checked) &&\n this.lastKeyPressed.shift === true &&\n relEl.tagName == TOGGLE_GROUP)) {\n toggleButtons[0].focus();\n }\n else if (this.lastKeyPressed.shift === false ||\n (this.lastKeyPressed.shift === true && relEl.tagName == TOGGLE_GROUP)) {\n // if checked is true and selectMethod is \"single\", focus that toggle\n const toggledButton = toggleButtons.filter((el) => el.checked);\n toggledButton[0].focus();\n }\n };\n this.handleKeyDown = (event) => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const focussedChild = toggleButtonOptions.indexOf(toggleButtonOptions.filter((el) => el === document.activeElement)[0]);\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.selectMethod === \"auto\"\n ? this.proxySelectHandler(toggleButtonOptions[this.getNextItemToSelect(focussedChild, true)])\n : toggleButtonOptions[this.getNextItemToSelect(focussedChild, true)].focus();\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.selectMethod === \"auto\"\n ? this.proxySelectHandler(toggleButtonOptions[this.getNextItemToSelect(focussedChild, false)])\n : toggleButtonOptions[this.getNextItemToSelect(focussedChild, false)].focus();\n break;\n case \"Tab\":\n break;\n }\n };\n this.getNextItemToSelect = (currentItem, movingDown) => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const numToggles = toggleButtonOptions.length - 1;\n if (currentItem < 1) {\n currentItem = 0;\n }\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n if (nextItem < 0) {\n nextItem = numToggles;\n }\n else if (nextItem > numToggles) {\n nextItem = 0;\n }\n if (toggleButtonOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n return nextItem;\n };\n this.lastKeyPressed = {\n key: null,\n shift: false,\n };\n this.accessibleLabel = \"Toggle button group\";\n this.disabled = false;\n this.fullWidth = false;\n this.iconPlacement = undefined;\n this.loading = false;\n this.monochrome = false;\n this.selectMethod = \"manual\";\n this.selectType = \"single\";\n this.size = \"medium\";\n this.theme = \"inherit\";\n this.variant = \"default\";\n }\n watchDisabledHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.disabled = this.disabled;\n });\n removeDisabledFalse(this.disabled, this.el);\n }\n watchFullWidthHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.fullWidth = this.fullWidth;\n });\n }\n watchLoadingHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.loading = this.loading;\n });\n }\n watchMonochromeHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.monochrome = this.monochrome;\n });\n }\n watchSizeHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.size = this.size;\n });\n }\n watchThemeHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.theme = this.theme;\n });\n }\n watchVariantHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.variant = this.variant;\n });\n }\n selectHandler(ev, tabTarget) {\n const allToggles = this.getAllToggleButtons();\n let clickedToggle = ev.target;\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.checked) {\n el.checked = false;\n }\n });\n this.icChange.emit({\n checked: ev.detail.checked,\n selectedOption: clickedToggle,\n });\n }\n else {\n const toggledOptions = this.getAllToggleButtons().filter((el) => el.checked && !el.disabled);\n this.icChange.emit({\n checked: toggledOptions.map((opt) => opt.checked),\n toggledOptions: toggledOptions.map((opt) => ({\n toggleButton: opt,\n })),\n selectedOption: clickedToggle,\n });\n }\n }\n componentWillLoad() {\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 componentDidLoad() {\n this.getAllToggleButtons().forEach((el, i) => {\n this.setSlottedAria(el);\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 disconnectedCallback() {\n document === null || document === void 0 ? void 0 : document.removeEventListener(\"keydown\", this.keyListener);\n }\n // trigger selectHandler when unable to add 'target'\n proxySelectHandler(toggle) {\n toggle.checked = true;\n const customEv = new CustomEvent(\"icToggleChecked\", {\n detail: {\n checked: toggle.checked,\n },\n });\n this.selectHandler(customEv, toggle);\n }\n getAllToggleButtons() {\n return Array.from(this.el.querySelectorAll(\"ic-toggle-button\"));\n }\n render() {\n return (h(Host, { role: \"group\", \"aria-label\": this.accessibleLabel, tabindex: 0, class: {\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n [\"ic-toggle-button-group-full-width\"]: this.fullWidth,\n [\"ic-toggle-button-group-loading\"]: this.loading,\n [\"ic-toggle-button-group-disabled\"]: this.disabled,\n [`ic-toggle-button-group-monochrome`]: this.monochrome,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }, onFocus: this.handleHostFocus }, h(\"slot\", null)));\n }\n static get is() { return \"ic-toggle-button-group\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toggle-button-group.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toggle-button-group.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label of the toggle button group component to provide context for screen reader users.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Toggle button group\\\"\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will be set to the disabled state.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"fullWidth\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will fill the width of the container.\"\n },\n \"attribute\": \"full-width\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"iconPlacement\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"resolved\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The placement of the icons in relation to the toggle button labels.\"\n },\n \"attribute\": \"icon-placement\",\n \"reflect\": false\n },\n \"loading\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will be in loading state.\"\n },\n \"attribute\": \"loading\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"monochrome\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will display as black in the light theme, and white in dark theme.\"\n },\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"selectMethod\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcSelectMethodTypes\",\n \"resolved\": \"\\\"auto\\\" | \\\"manual\\\"\",\n \"references\": {\n \"IcSelectMethodTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSelectMethodTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"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 \"attribute\": \"select-method\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"manual\\\"\"\n },\n \"selectType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSelectTypes\",\n \"resolved\": \"\\\"multi\\\" | \\\"single\\\"\",\n \"references\": {\n \"IcSelectTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSelectTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets whether single or multiple options can be toggled. If `multi`, then the `selectMethod` is always `manual`.\"\n },\n \"attribute\": \"select-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"single\\\"\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the toggle buttons to be displayed. This does not affect the font size of the accessible label.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toggle button.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"lastKeyPressed\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icChange\",\n \"name\": \"icChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when a toggle button is selected.\"\n },\n \"complexType\": {\n \"original\": \"IcChangeEventDetail\",\n \"resolved\": \"IcChangeEventDetail\",\n \"references\": {\n \"IcChangeEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-toggle-button-group.types\",\n \"id\": \"src/components/ic-toggle-button-group/ic-toggle-button-group.types.ts::IcChangeEventDetail\"\n }\n }\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"watchDisabledHandler\"\n }, {\n \"propName\": \"fullWidth\",\n \"methodName\": \"watchFullWidthHandler\"\n }, {\n \"propName\": \"loading\",\n \"methodName\": \"watchLoadingHandler\"\n }, {\n \"propName\": \"monochrome\",\n \"methodName\": \"watchMonochromeHandler\"\n }, {\n \"propName\": \"size\",\n \"methodName\": \"watchSizeHandler\"\n }, {\n \"propName\": \"theme\",\n \"methodName\": \"watchThemeHandler\"\n }, {\n \"propName\": \"variant\",\n \"methodName\": \"watchVariantHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icToggleChecked\",\n \"method\": \"selectHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-toggle-button-group.js.map\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-93509377.js';
2
- import { r as removeDisabledFalse, a as onComponentRequiredPropUndefined, i as isSlotUsed } from './helpers-d3091c8c.js';
2
+ import { r as removeDisabledFalse, L as isSlottedInGroup, b as onComponentRequiredPropUndefined, i as isSlotUsed } from './helpers-96838a0a.js';
3
3
 
4
4
  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{--toggle-button-border:var(--ic-toggle-button-unselected-border);--toggle-button-text-colour:var(--ic-toggle-button-unselected-text);--toggle-button-border-hover:var(--ic-toggle-button-unselected-border-hover);--toggle-button-text-colour-hover:var(\n --ic-toggle-button-unselected-text-hover\n );--toggle-button-border-active:var(\n --ic-toggle-button-unselected-border-pressed\n );--toggle-button-text-colour-active:var(\n --ic-toggle-button-unselected-text-pressed\n )}:host(.ic-toggle-button-checked){--toggle-button-border:var(--ic-toggle-button-selected-border);--toggle-button-text-colour:var(--ic-toggle-button-selected-text);--toggle-button-border-hover:var(--ic-toggle-button-selected-border-hover);--toggle-button-text-colour-hover:var(--ic-toggle-button-selected-text);--toggle-button-border-active:var(\n --ic-toggle-button-selected-border-pressed\n );--toggle-button-text-colour-active:var(--ic-toggle-button-selected-text)}:host(.ic-toggle-button-monochrome){--toggle-button-border:var(--ic-toggle-button-unselected-border-monochrome);--toggle-button-text-colour:var(\n --ic-toggle-button-unselected-text-monochrome\n );--toggle-button-border-hover:var(\n --ic-toggle-button-unselected-border-hover-monochrome\n );--toggle-button-text-colour-hover:var(\n --ic-toggle-button-unselected-text-monochrome\n );--toggle-button-border-active:var(\n --ic-toggle-button-unselected-border-pressed-monochrome\n );--toggle-button-text-colour-active:var(\n --ic-toggle-button-unselected-text-monochrome\n )}:host(.ic-toggle-button-monochrome.ic-toggle-button-checked){--toggle-button-border:var(--ic-toggle-button-selected-border-monochrome);--toggle-button-text-colour:var(--ic-toggle-button-selected-text-monochrome);--toggle-button-border-hover:var(\n --ic-toggle-button-selected-border-hover-monochrome\n );--toggle-button-text-colour-hover:var(\n --ic-toggle-button-selected-text-monochrome\n );--toggle-button-border-active:var(\n --ic-toggle-button-selected-border-pressed-monochrome\n );--toggle-button-text-colour-active:var(\n --ic-toggle-button-selected-text-monochrome\n )}:host(.ic-toggle-button-disabled){--toggle-button-border:var(--ic-toggle-button-unselected-border-disabled);--toggle-button-text-colour:var(--ic-toggle-button-unselected-text-disabled)}:host(.ic-toggle-button-disabled.ic-toggle-button-monochrome){--toggle-button-border:var(\n --ic-toggle-button-unselected-border-disabled-monochrome\n );--toggle-button-text-colour:var(\n --ic-toggle-button-unselected-text-disabled-monochrome\n )}:host(.ic-toggle-button-disabled.ic-toggle-button-checked){--toggle-button-border:var(--ic-toggle-button-selected-border-disabled);--toggle-button-text-colour:var(--ic-toggle-button-selected-text-disabled)}:host(.ic-toggle-button-disabled.ic-toggle-button-checked.ic-toggle-button-monochrome){--toggle-button-border:var(\n --ic-toggle-button-selected-border-disabled-monochrome\n );--toggle-button-text-colour:var(\n --ic-toggle-button-selected-text-disabled-monochrome\n )}: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.ic-toggle-button-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.ic-toggle-button-light) ::part(button):focus,:host(.expand-toggle-group-child.ic-toggle-button-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(--ic-border-width) solid var(--toggle-button-border);color:var(--toggle-button-text-colour)}:host ::part(button):hover{border:var(--ic-border-width) solid var(--toggle-button-border-hover);color:var(--toggle-button-text-colour-hover)}:host ::part(button):active{border:var(--ic-border-width) solid var(--toggle-button-border-active);color:var(--toggle-button-text-colour-active)}:host(.ic-toggle-button-disabled) ::part(button){border:var(--ic-space-1px) dashed var(--toggle-button-border);color:var(--toggle-button-text-colour)}:host(.ic-toggle-button-checked) ::part(button){background-color:var(--ic-toggle-button-selected-background);box-shadow:inset 0 0 0 var(--ic-space-xxxs)\n var(--ic-toggle-button-selected-text)}:host(.ic-toggle-button-checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus)}:host ::part(button):hover{background-color:var(--ic-toggle-button-unselected-background-hover)}:host ::part(button):active{background-color:var(--ic-toggle-button-unselected-background-pressed)}:host(.ic-toggle-button-checked) ::part(button):hover{background-color:var(--ic-toggle-button-selected-background-hover)}:host(.ic-toggle-button-checked) ::part(button):active,:host(.ic-toggle-button-icon.ic-toggle-button-checked) ::part(button):active{background-color:var(--ic-toggle-button-selected-background-pressed)}:host(.ic-toggle-button-monochrome) ::part(button):hover{background-color:var(\n --ic-toggle-button-unselected-background-hover-monochrome\n )}:host(.ic-toggle-button-monochrome) ::part(button):active{background-color:var(\n --ic-toggle-button-unselected-background-pressed-monochrome\n )}:host(.ic-toggle-button-monochrome.ic-toggle-button-checked) ::part(button){background-color:var(--ic-toggle-button-selected-background-monochrome)}:host(.ic-toggle-button-monochrome.ic-toggle-button-checked) ::part(button):hover{background-color:var(\n --ic-toggle-button-selected-background-hover-monochrome\n )}:host(.ic-toggle-button-monochrome.ic-toggle-button-checked) ::part(button):active,:host(.ic-toggle-button-icon.ic-toggle-button-monochrome.ic-toggle-button-checked) ::part(button):active{background-color:var(\n --ic-toggle-button-selected-background-pressed-monochrome\n )}:host(.ic-toggle-button-monochrome.ic-toggle-button-checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs)\n var(--ic-toggle-button-selected-text),\n var(--ic-border-focus)}:host(.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button),:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button){background-color:transparent}:host(.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button),:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button)::before{background-image:radial-gradient(\n var(--ic-toggle-button-selected-background-disabled) 95%,\n white 20%\n );background-repeat:no-repeat}:host(.ic-toggle-button-disabled.ic-toggle-button-checked.ic-toggle-button-monochrome) ::part(button),:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked.ic-toggle-button-monochrome) ::part(button)::before{background-image:radial-gradient(\n var(--ic-toggle-button-selected-background-disabled-monochrome) 95%,\n white 20%\n );background-repeat:no-repeat}:host(.ic-toggle-button-icon) ::part(button){height:calc(var(--ic-space-xl) + var(--ic-space-xs));width:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-toggle-button-icon) ::part(button):active{background-color:var(--ic-action-default-bg-pressed)}:host(.ic-toggle-button-icon.ic-toggle-button-dark) ::part(button):active{background-color:var(--ic-action-dark-bg-pressed)}:host(.ic-toggle-button-icon.ic-toggle-button-light) ::part(button):active{background-color:var(--ic-action-light-bg-pressed)}:host(.ic-toggle-button-icon.ic-toggle-button-small) ::part(button){height:var(--ic-space-xl);width:var(--ic-space-xl)}:host(.ic-toggle-button-icon.ic-toggle-button-large) ::part(button){height:var(--ic-space-xxl);width:var(--ic-space-xxl)}:host(.ic-toggle-button-checked.ic-toggle-button-loading) ::part(button){--loading-button-background:var(\n --ic-toggle-button-selected-background-pressed\n );background-color:var(--ic-toggle-button-selected-background-pressed)}:host(.ic-toggle-button-loading) ::part(button){--loading-button-background:var(\n --ic-toggle-button-unselected-background-pressed\n );background-color:var(--ic-toggle-button-unselected-background-pressed)}:host(.ic-toggle-button-checked.ic-toggle-button-loading) ::part(ic-loading-container){--inner-color:var(--ic-toggle-button-loading-bar)}:host(.ic-toggle-button-loading) ::part(ic-loading-container){--inner-color:var(--ic-toggle-button-selected-loading-bar)}:host(.ic-toggle-button-checked.ic-toggle-button-loading.ic-toggle-button-monochrome) ::part(button){--loading-button-background:var(\n --ic-toggle-button-selected-background-pressed-monochrome\n );background-color:var(\n --ic-toggle-button-selected-background-pressed-monochrome\n )}:host(.ic-toggle-button-loading.ic-toggle-button-monochrome) ::part(button){--loading-button-background:var(\n --ic-toggle-button-unselected-background-pressed-monochrome\n );background-color:var(\n --ic-toggle-button-unselected-background-pressed-monochrome\n )}@media (forced-colors: active){:host(.ic-toggle-button-checked) ::part(button),:host(.ic-toggle-button-checked) ::part(button):hover{background-color:Highlight}:host(.ic-toggle-button-checked.ic-toggle-button-light) ::part(button),:host(.ic-toggle-button-checked.ic-toggle-button-light) ::part(button):hover{background-color:Highlight}:host(.ic-toggle-button-checked.ic-toggle-button-dark) ::part(button),:host(.ic-toggle-button-checked.ic-toggle-button-dark) ::part(button):hover{background-color:Highlight}:host(.ic-toggle-button-checked.ic-toggle-button-disabled) ::part(button){background-color:GrayText}}";
5
5
 
@@ -7,6 +7,51 @@ const ToggleButton = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
9
  this.icToggleChecked = createEvent(this, "icToggleChecked", 7);
10
+ this.loopAttributes = () => {
11
+ const trackedAttributes = [
12
+ "loading",
13
+ "disabled",
14
+ "full-width",
15
+ "icon-placement",
16
+ "variant",
17
+ "size",
18
+ "theme",
19
+ "monochrome",
20
+ ];
21
+ const parentAttributes = this.el.parentElement.attributes;
22
+ for (let i = 0; i < trackedAttributes.length; i++) {
23
+ if (parentAttributes.getNamedItem(trackedAttributes[i]) !== null) {
24
+ const attribute = parentAttributes.getNamedItem(trackedAttributes[i]);
25
+ switch (attribute.name) {
26
+ case trackedAttributes[0]:
27
+ this.loading = attribute.value !== "false";
28
+ break;
29
+ case trackedAttributes[1]:
30
+ console.log(attribute.value);
31
+ this.disabled = attribute.value !== "false";
32
+ break;
33
+ case trackedAttributes[2]:
34
+ this.fullWidth = attribute.value !== "false";
35
+ break;
36
+ case trackedAttributes[3]:
37
+ this.iconPlacement = attribute.value;
38
+ break;
39
+ case trackedAttributes[4]:
40
+ this.variant = attribute.value;
41
+ break;
42
+ case trackedAttributes[5]:
43
+ this.size = attribute.value;
44
+ break;
45
+ case trackedAttributes[6]:
46
+ this.theme = attribute.value;
47
+ break;
48
+ case trackedAttributes[7]:
49
+ this.monochrome = attribute.value !== "false";
50
+ break;
51
+ }
52
+ }
53
+ }
54
+ };
10
55
  this.handleFocus = (ev) => {
11
56
  ev.stopImmediatePropagation();
12
57
  };
@@ -21,7 +66,7 @@ const ToggleButton = class {
21
66
  this.checked = false;
22
67
  this.disabled = false;
23
68
  this.fullWidth = false;
24
- this.iconPlacement = undefined;
69
+ this.iconPlacement = "left";
25
70
  this.label = undefined;
26
71
  this.loading = false;
27
72
  this.monochrome = false;
@@ -29,10 +74,14 @@ const ToggleButton = class {
29
74
  this.theme = "inherit";
30
75
  this.variant = "default";
31
76
  }
77
+ watchDisabledHandler() {
78
+ removeDisabledFalse(this.disabled, this.el);
79
+ }
32
80
  componentWillLoad() {
33
81
  removeDisabledFalse(this.disabled, this.el);
34
- const parentIconPlacement = this.el.parentElement.iconPlacement;
35
- this.iconPosition = this.iconPlacement || parentIconPlacement || "left";
82
+ if (isSlottedInGroup(this.el)) {
83
+ this.loopAttributes();
84
+ }
36
85
  }
37
86
  componentDidLoad() {
38
87
  onComponentRequiredPropUndefined([
@@ -60,10 +109,13 @@ const ToggleButton = class {
60
109
  ["ic-toggle-button-loading"]: this.loading,
61
110
  ["ic-toggle-button-monochrome"]: this.monochrome,
62
111
  [`ic-theme-${this.theme}`]: this.theme !== "inherit",
63
- }, onFocus: this.handleFocus }, h("ic-button", { "aria-pressed": this.checked.toString(), variant: this.variant === "icon" ? "icon" : "secondary", onClick: this.handleClick, title: this.accessibleLabel, "aria-label": `${this.accessibleLabel ? this.accessibleLabel : this.label}, ${this.checked ? "ticked" : "unticked"}`, disabled: this.disabled, size: this.size, fullWidth: this.fullWidth, loading: this.loading, "aria-disabled": `${this.disabled}` }, this.variant !== "icon" && this.label, h("slot", null), isSlotUsed(this.el, "icon") && (h("slot", { name: "icon", slot: `${this.iconPosition}-icon` })), isSlotUsed(this.el, "badge") && (h("slot", { name: "badge", slot: "badge" })))));
112
+ }, onFocus: this.handleFocus }, h("ic-button", { "aria-pressed": this.checked.toString(), variant: this.variant === "icon" ? "icon" : "secondary", onClick: this.handleClick, title: this.accessibleLabel, "aria-label": `${this.accessibleLabel ? this.accessibleLabel : this.label}, ${this.checked ? "ticked" : "unticked"}`, disabled: this.disabled, size: this.size, fullWidth: this.fullWidth, loading: this.loading }, this.variant !== "icon" && this.label, h("slot", null), isSlotUsed(this.el, "icon") && (h("slot", { name: "icon", slot: `${this.iconPlacement}-icon` })), isSlotUsed(this.el, "badge") && (h("slot", { name: "badge", slot: "badge" })))));
64
113
  }
65
114
  static get delegatesFocus() { return true; }
66
115
  get el() { return getElement(this); }
116
+ static get watchers() { return {
117
+ "disabled": ["watchDisabledHandler"]
118
+ }; }
67
119
  };
68
120
  ToggleButton.style = icToggleButtonCss;
69
121
 
@@ -1 +1 @@
1
- {"file":"ic-toggle-button.entry.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,ykYAAykY;;MCMtlY,YAAY;IACrB;;;QACI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE;YAClB,EAAE,CAAC,wBAAwB,EAAE,CAAC;SACjC,CAAC;QACF,IAAI,CAAC,WAAW,GAAG;YACf,CAAC,IAAI,CAAC,OAAO;gBACT,CAAC,IAAI,CAAC,QAAQ;gBACd,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;oBACtB,OAAO,EAAE,IAAI,CAAC,OAAO;iBACxB,CAAC,CAAC;SACV,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC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IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-toggle-button/ic-toggle-button.css?tag=ic-toggle-button&encapsulation=shadow","../web-components/dist/collection/components/ic-toggle-button/ic-toggle-button.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/* VARIABLES FOR IC-TOGGLE-BUTTON-GROUP */\n:host {\n --toggle-button-border: var(--ic-toggle-button-unselected-border);\n --toggle-button-text-colour: var(--ic-toggle-button-unselected-text);\n --toggle-button-border-hover: var(--ic-toggle-button-unselected-border-hover);\n --toggle-button-text-colour-hover: var(\n --ic-toggle-button-unselected-text-hover\n );\n --toggle-button-border-active: var(\n --ic-toggle-button-unselected-border-pressed\n );\n --toggle-button-text-colour-active: var(\n --ic-toggle-button-unselected-text-pressed\n );\n}\n\n:host(.ic-toggle-button-checked) {\n --toggle-button-border: var(--ic-toggle-button-selected-border);\n --toggle-button-text-colour: var(--ic-toggle-button-selected-text);\n --toggle-button-border-hover: var(--ic-toggle-button-selected-border-hover);\n --toggle-button-text-colour-hover: var(--ic-toggle-button-selected-text);\n --toggle-button-border-active: var(\n --ic-toggle-button-selected-border-pressed\n );\n --toggle-button-text-colour-active: var(--ic-toggle-button-selected-text);\n}\n\n:host(.ic-toggle-button-monochrome) {\n --toggle-button-border: var(--ic-toggle-button-unselected-border-monochrome);\n --toggle-button-text-colour: var(\n --ic-toggle-button-unselected-text-monochrome\n );\n --toggle-button-border-hover: var(\n --ic-toggle-button-unselected-border-hover-monochrome\n );\n --toggle-button-text-colour-hover: var(\n --ic-toggle-button-unselected-text-monochrome\n );\n --toggle-button-border-active: var(\n --ic-toggle-button-unselected-border-pressed-monochrome\n );\n --toggle-button-text-colour-active: var(\n --ic-toggle-button-unselected-text-monochrome\n );\n}\n\n:host(.ic-toggle-button-monochrome.ic-toggle-button-checked) {\n --toggle-button-border: var(--ic-toggle-button-selected-border-monochrome);\n --toggle-button-text-colour: var(--ic-toggle-button-selected-text-monochrome);\n --toggle-button-border-hover: var(\n --ic-toggle-button-selected-border-hover-monochrome\n );\n --toggle-button-text-colour-hover: var(\n --ic-toggle-button-selected-text-monochrome\n );\n --toggle-button-border-active: var(\n --ic-toggle-button-selected-border-pressed-monochrome\n );\n --toggle-button-text-colour-active: var(\n --ic-toggle-button-selected-text-monochrome\n );\n}\n\n:host(.ic-toggle-button-disabled) {\n --toggle-button-border: var(--ic-toggle-button-unselected-border-disabled);\n --toggle-button-text-colour: var(--ic-toggle-button-unselected-text-disabled);\n}\n\n:host(.ic-toggle-button-disabled.ic-toggle-button-monochrome) {\n --toggle-button-border: var(\n --ic-toggle-button-unselected-border-disabled-monochrome\n );\n --toggle-button-text-colour: var(\n --ic-toggle-button-unselected-text-disabled-monochrome\n );\n}\n\n:host(.ic-toggle-button-disabled.ic-toggle-button-checked) {\n --toggle-button-border: var(--ic-toggle-button-selected-border-disabled);\n --toggle-button-text-colour: var(--ic-toggle-button-selected-text-disabled);\n}\n\n:host(\n .ic-toggle-button-disabled.ic-toggle-button-checked.ic-toggle-button-monochrome\n ) {\n --toggle-button-border: var(\n --ic-toggle-button-selected-border-disabled-monochrome\n );\n --toggle-button-text-colour: var(\n --ic-toggle-button-selected-text-disabled-monochrome\n );\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.ic-toggle-button-checked)\n ::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.ic-toggle-button-light) ::part(button):focus,\n:host(.expand-toggle-group-child.ic-toggle-button-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(--ic-border-width) solid var(--toggle-button-border);\n color: var(--toggle-button-text-colour);\n}\n\n:host ::part(button):hover {\n border: var(--ic-border-width) solid var(--toggle-button-border-hover);\n color: var(--toggle-button-text-colour-hover);\n}\n\n:host ::part(button):active {\n border: var(--ic-border-width) solid var(--toggle-button-border-active);\n color: var(--toggle-button-text-colour-active);\n}\n\n:host(.ic-toggle-button-disabled) ::part(button) {\n border: var(--ic-space-1px) dashed var(--toggle-button-border);\n color: var(--toggle-button-text-colour);\n}\n\n:host(.ic-toggle-button-checked) ::part(button) {\n background-color: var(--ic-toggle-button-selected-background);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs)\n var(--ic-toggle-button-selected-text);\n}\n\n:host(.ic-toggle-button-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 ::part(button):hover {\n background-color: var(--ic-toggle-button-unselected-background-hover);\n}\n\n:host ::part(button):active {\n background-color: var(--ic-toggle-button-unselected-background-pressed);\n}\n\n:host(.ic-toggle-button-checked) ::part(button):hover {\n background-color: var(--ic-toggle-button-selected-background-hover);\n}\n\n:host(.ic-toggle-button-checked) ::part(button):active,\n:host(.ic-toggle-button-icon.ic-toggle-button-checked) ::part(button):active {\n background-color: var(--ic-toggle-button-selected-background-pressed);\n}\n\n:host(.ic-toggle-button-monochrome) ::part(button):hover {\n background-color: var(\n --ic-toggle-button-unselected-background-hover-monochrome\n );\n}\n\n:host(.ic-toggle-button-monochrome) ::part(button):active {\n background-color: var(\n --ic-toggle-button-unselected-background-pressed-monochrome\n );\n}\n\n:host(.ic-toggle-button-monochrome.ic-toggle-button-checked) ::part(button) {\n background-color: var(--ic-toggle-button-selected-background-monochrome);\n}\n\n:host(.ic-toggle-button-monochrome.ic-toggle-button-checked)\n ::part(button):hover {\n background-color: var(\n --ic-toggle-button-selected-background-hover-monochrome\n );\n}\n\n:host(.ic-toggle-button-monochrome.ic-toggle-button-checked)\n ::part(button):active,\n:host(\n .ic-toggle-button-icon.ic-toggle-button-monochrome.ic-toggle-button-checked\n )\n ::part(button):active {\n background-color: var(\n --ic-toggle-button-selected-background-pressed-monochrome\n );\n}\n\n:host(.ic-toggle-button-monochrome.ic-toggle-button-checked)\n ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs)\n var(--ic-toggle-button-selected-text),\n var(--ic-border-focus);\n}\n\n:host(.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button),\n:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked)\n ::part(button) {\n background-color: transparent;\n}\n\n:host(.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button),\n:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked)\n ::part(button)::before {\n background-image: radial-gradient(\n var(--ic-toggle-button-selected-background-disabled) 95%,\n white 20%\n );\n background-repeat: no-repeat;\n}\n\n:host(\n .ic-toggle-button-disabled.ic-toggle-button-checked.ic-toggle-button-monochrome\n )\n ::part(button),\n:host(\n .ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked.ic-toggle-button-monochrome\n )\n ::part(button)::before {\n background-image: radial-gradient(\n var(--ic-toggle-button-selected-background-disabled-monochrome) 95%,\n white 20%\n );\n background-repeat: no-repeat;\n}\n\n:host(.ic-toggle-button-icon) ::part(button) {\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(.ic-toggle-button-icon) ::part(button):active {\n background-color: var(--ic-action-default-bg-pressed);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-dark) ::part(button):active {\n background-color: var(--ic-action-dark-bg-pressed);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-light) ::part(button):active {\n background-color: var(--ic-action-light-bg-pressed);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-small) ::part(button) {\n height: var(--ic-space-xl);\n width: var(--ic-space-xl);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-large) ::part(button) {\n height: var(--ic-space-xxl);\n width: var(--ic-space-xxl);\n}\n\n:host(.ic-toggle-button-checked.ic-toggle-button-loading) ::part(button) {\n --loading-button-background: var(\n --ic-toggle-button-selected-background-pressed\n );\n background-color: var(--ic-toggle-button-selected-background-pressed);\n}\n\n:host(.ic-toggle-button-loading) ::part(button) {\n --loading-button-background: var(\n --ic-toggle-button-unselected-background-pressed\n );\n background-color: var(--ic-toggle-button-unselected-background-pressed);\n}\n\n:host(.ic-toggle-button-checked.ic-toggle-button-loading)\n ::part(ic-loading-container) {\n --inner-color: var(--ic-toggle-button-loading-bar);\n}\n\n:host(.ic-toggle-button-loading) ::part(ic-loading-container) {\n --inner-color: var(--ic-toggle-button-selected-loading-bar);\n}\n\n:host(\n .ic-toggle-button-checked.ic-toggle-button-loading.ic-toggle-button-monochrome\n )\n ::part(button) {\n --loading-button-background: var(\n --ic-toggle-button-selected-background-pressed-monochrome\n );\n background-color: var(\n --ic-toggle-button-selected-background-pressed-monochrome\n );\n}\n\n:host(.ic-toggle-button-loading.ic-toggle-button-monochrome) ::part(button) {\n --loading-button-background: var(\n --ic-toggle-button-unselected-background-pressed-monochrome\n );\n background-color: var(\n --ic-toggle-button-unselected-background-pressed-monochrome\n );\n}\n\n@media (forced-colors: active) {\n :host(.ic-toggle-button-checked) ::part(button),\n :host(.ic-toggle-button-checked) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.ic-toggle-button-checked.ic-toggle-button-light) ::part(button),\n :host(.ic-toggle-button-checked.ic-toggle-button-light) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.ic-toggle-button-checked.ic-toggle-button-dark) ::part(button),\n :host(.ic-toggle-button-checked.ic-toggle-button-dark) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.ic-toggle-button-checked.ic-toggle-button-disabled) ::part(button) {\n background-color: GrayText;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { isSlotUsed, onComponentRequiredPropUndefined, removeDisabledFalse, } from \"../../utils/helpers\";\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 */\nexport class ToggleButton {\n constructor() {\n this.handleFocus = (ev) => {\n ev.stopImmediatePropagation();\n };\n this.handleClick = () => {\n !this.loading &&\n !this.disabled &&\n this.icToggleChecked.emit({\n checked: this.checked,\n });\n };\n this.accessibleLabel = undefined;\n this.checked = false;\n this.disabled = false;\n this.fullWidth = false;\n this.iconPlacement = undefined;\n this.label = undefined;\n this.loading = false;\n this.monochrome = false;\n this.size = \"medium\";\n this.theme = \"inherit\";\n this.variant = \"default\";\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n const parentIconPlacement = this.el.parentElement.iconPlacement;\n this.iconPosition = this.iconPlacement || parentIconPlacement || \"left\";\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([\n {\n prop: this.variant === \"icon\" ? this.accessibleLabel : this.label,\n propName: this.variant === \"icon\" ? \"accessible-label\" : \"label\",\n },\n ], \"Toggle button\");\n }\n handleHostClick(e) {\n if (this.disabled) {\n e.stopImmediatePropagation();\n }\n else if (!this.loading) {\n this.checked = !this.checked;\n }\n }\n render() {\n return (h(Host, { class: {\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n [\"ic-toggle-button-disabled\"]: this.disabled,\n [\"ic-toggle-button-checked\"]: this.checked,\n [\"ic-toggle-button-icon\"]: this.variant === \"icon\",\n [`ic-toggle-button-${this.size}`]: true,\n [\"ic-toggle-button-loading\"]: this.loading,\n [\"ic-toggle-button-monochrome\"]: this.monochrome,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }, onFocus: this.handleFocus }, h(\"ic-button\", { \"aria-pressed\": this.checked.toString(), variant: this.variant === \"icon\" ? \"icon\" : \"secondary\", onClick: this.handleClick, title: this.accessibleLabel, \"aria-label\": `${this.accessibleLabel ? this.accessibleLabel : this.label}, ${this.checked ? \"ticked\" : \"unticked\"}`, disabled: this.disabled, size: this.size, fullWidth: this.fullWidth, loading: this.loading, \"aria-disabled\": `${this.disabled}` }, this.variant !== \"icon\" && this.label, h(\"slot\", null), isSlotUsed(this.el, \"icon\") && (h(\"slot\", { name: \"icon\", slot: `${this.iconPosition}-icon` })), isSlotUsed(this.el, \"badge\") && (h(\"slot\", { name: \"badge\", slot: \"badge\" })))));\n }\n static get is() { return \"ic-toggle-button\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toggle-button.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toggle-button.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label that will be applied to the toggle button. This is required for the icon variant of toggle buttons.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"checked\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in a checked state.\"\n },\n \"attribute\": \"checked\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in disabled state.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"fullWidth\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will fill the width of the container.\"\n },\n \"attribute\": \"full-width\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"iconPlacement\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"resolved\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The placement of the icon in relation to the toggle button label.\"\n },\n \"attribute\": \"icon-placement\",\n \"reflect\": false\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label to display in the toggle button. This is required for the default variant of toggle buttons.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"loading\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in loading state.\"\n },\n \"attribute\": \"loading\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"monochrome\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will display as black in the light theme, and white in dark theme.\"\n },\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the toggle button to be displayed.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toggle button.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"icToggleChecked\",\n \"name\": \"icToggleChecked\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the user clicks a toggle button.\"\n },\n \"complexType\": {\n \"original\": \"{\\n checked: boolean;\\n }\",\n \"resolved\": \"{ checked: boolean; }\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"click\",\n \"method\": \"handleHostClick\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-toggle-button.js.map\n"],"version":3}
1
+ {"file":"ic-toggle-button.entry.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,ykYAAykY;;MCMtlY,YAAY;IACrB;;;QACI,IAAI,CAAC,cAAc,GAAG;YAClB,MAAM,iBAAiB,GAAG;gBACtB,SAAS;gBACT,UAAU;gBACV,YAAY;gBACZ,gBAAgB;gBAChB,SAAS;gBACT,MAAM;gBACN,OAAO;gBACP,YAAY;aACf,CAAC;YACF,MAAM,gBAAgB,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC;YAC1D,KAAK,IAAI,CAAC,GAAG,CAAC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,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,GAAG,QAAQ,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,KAAK,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,aAAa,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;KACjpB;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-toggle-button/ic-toggle-button.css?tag=ic-toggle-button&encapsulation=shadow","../web-components/dist/collection/components/ic-toggle-button/ic-toggle-button.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/* VARIABLES FOR IC-TOGGLE-BUTTON-GROUP */\n:host {\n --toggle-button-border: var(--ic-toggle-button-unselected-border);\n --toggle-button-text-colour: var(--ic-toggle-button-unselected-text);\n --toggle-button-border-hover: var(--ic-toggle-button-unselected-border-hover);\n --toggle-button-text-colour-hover: var(\n --ic-toggle-button-unselected-text-hover\n );\n --toggle-button-border-active: var(\n --ic-toggle-button-unselected-border-pressed\n );\n --toggle-button-text-colour-active: var(\n --ic-toggle-button-unselected-text-pressed\n );\n}\n\n:host(.ic-toggle-button-checked) {\n --toggle-button-border: var(--ic-toggle-button-selected-border);\n --toggle-button-text-colour: var(--ic-toggle-button-selected-text);\n --toggle-button-border-hover: var(--ic-toggle-button-selected-border-hover);\n --toggle-button-text-colour-hover: var(--ic-toggle-button-selected-text);\n --toggle-button-border-active: var(\n --ic-toggle-button-selected-border-pressed\n );\n --toggle-button-text-colour-active: var(--ic-toggle-button-selected-text);\n}\n\n:host(.ic-toggle-button-monochrome) {\n --toggle-button-border: var(--ic-toggle-button-unselected-border-monochrome);\n --toggle-button-text-colour: var(\n --ic-toggle-button-unselected-text-monochrome\n );\n --toggle-button-border-hover: var(\n --ic-toggle-button-unselected-border-hover-monochrome\n );\n --toggle-button-text-colour-hover: var(\n --ic-toggle-button-unselected-text-monochrome\n );\n --toggle-button-border-active: var(\n --ic-toggle-button-unselected-border-pressed-monochrome\n );\n --toggle-button-text-colour-active: var(\n --ic-toggle-button-unselected-text-monochrome\n );\n}\n\n:host(.ic-toggle-button-monochrome.ic-toggle-button-checked) {\n --toggle-button-border: var(--ic-toggle-button-selected-border-monochrome);\n --toggle-button-text-colour: var(--ic-toggle-button-selected-text-monochrome);\n --toggle-button-border-hover: var(\n --ic-toggle-button-selected-border-hover-monochrome\n );\n --toggle-button-text-colour-hover: var(\n --ic-toggle-button-selected-text-monochrome\n );\n --toggle-button-border-active: var(\n --ic-toggle-button-selected-border-pressed-monochrome\n );\n --toggle-button-text-colour-active: var(\n --ic-toggle-button-selected-text-monochrome\n );\n}\n\n:host(.ic-toggle-button-disabled) {\n --toggle-button-border: var(--ic-toggle-button-unselected-border-disabled);\n --toggle-button-text-colour: var(--ic-toggle-button-unselected-text-disabled);\n}\n\n:host(.ic-toggle-button-disabled.ic-toggle-button-monochrome) {\n --toggle-button-border: var(\n --ic-toggle-button-unselected-border-disabled-monochrome\n );\n --toggle-button-text-colour: var(\n --ic-toggle-button-unselected-text-disabled-monochrome\n );\n}\n\n:host(.ic-toggle-button-disabled.ic-toggle-button-checked) {\n --toggle-button-border: var(--ic-toggle-button-selected-border-disabled);\n --toggle-button-text-colour: var(--ic-toggle-button-selected-text-disabled);\n}\n\n:host(\n .ic-toggle-button-disabled.ic-toggle-button-checked.ic-toggle-button-monochrome\n ) {\n --toggle-button-border: var(\n --ic-toggle-button-selected-border-disabled-monochrome\n );\n --toggle-button-text-colour: var(\n --ic-toggle-button-selected-text-disabled-monochrome\n );\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.ic-toggle-button-checked)\n ::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.ic-toggle-button-light) ::part(button):focus,\n:host(.expand-toggle-group-child.ic-toggle-button-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(--ic-border-width) solid var(--toggle-button-border);\n color: var(--toggle-button-text-colour);\n}\n\n:host ::part(button):hover {\n border: var(--ic-border-width) solid var(--toggle-button-border-hover);\n color: var(--toggle-button-text-colour-hover);\n}\n\n:host ::part(button):active {\n border: var(--ic-border-width) solid var(--toggle-button-border-active);\n color: var(--toggle-button-text-colour-active);\n}\n\n:host(.ic-toggle-button-disabled) ::part(button) {\n border: var(--ic-space-1px) dashed var(--toggle-button-border);\n color: var(--toggle-button-text-colour);\n}\n\n:host(.ic-toggle-button-checked) ::part(button) {\n background-color: var(--ic-toggle-button-selected-background);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs)\n var(--ic-toggle-button-selected-text);\n}\n\n:host(.ic-toggle-button-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 ::part(button):hover {\n background-color: var(--ic-toggle-button-unselected-background-hover);\n}\n\n:host ::part(button):active {\n background-color: var(--ic-toggle-button-unselected-background-pressed);\n}\n\n:host(.ic-toggle-button-checked) ::part(button):hover {\n background-color: var(--ic-toggle-button-selected-background-hover);\n}\n\n:host(.ic-toggle-button-checked) ::part(button):active,\n:host(.ic-toggle-button-icon.ic-toggle-button-checked) ::part(button):active {\n background-color: var(--ic-toggle-button-selected-background-pressed);\n}\n\n:host(.ic-toggle-button-monochrome) ::part(button):hover {\n background-color: var(\n --ic-toggle-button-unselected-background-hover-monochrome\n );\n}\n\n:host(.ic-toggle-button-monochrome) ::part(button):active {\n background-color: var(\n --ic-toggle-button-unselected-background-pressed-monochrome\n );\n}\n\n:host(.ic-toggle-button-monochrome.ic-toggle-button-checked) ::part(button) {\n background-color: var(--ic-toggle-button-selected-background-monochrome);\n}\n\n:host(.ic-toggle-button-monochrome.ic-toggle-button-checked)\n ::part(button):hover {\n background-color: var(\n --ic-toggle-button-selected-background-hover-monochrome\n );\n}\n\n:host(.ic-toggle-button-monochrome.ic-toggle-button-checked)\n ::part(button):active,\n:host(\n .ic-toggle-button-icon.ic-toggle-button-monochrome.ic-toggle-button-checked\n )\n ::part(button):active {\n background-color: var(\n --ic-toggle-button-selected-background-pressed-monochrome\n );\n}\n\n:host(.ic-toggle-button-monochrome.ic-toggle-button-checked)\n ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs)\n var(--ic-toggle-button-selected-text),\n var(--ic-border-focus);\n}\n\n:host(.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button),\n:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked)\n ::part(button) {\n background-color: transparent;\n}\n\n:host(.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button),\n:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked)\n ::part(button)::before {\n background-image: radial-gradient(\n var(--ic-toggle-button-selected-background-disabled) 95%,\n white 20%\n );\n background-repeat: no-repeat;\n}\n\n:host(\n .ic-toggle-button-disabled.ic-toggle-button-checked.ic-toggle-button-monochrome\n )\n ::part(button),\n:host(\n .ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked.ic-toggle-button-monochrome\n )\n ::part(button)::before {\n background-image: radial-gradient(\n var(--ic-toggle-button-selected-background-disabled-monochrome) 95%,\n white 20%\n );\n background-repeat: no-repeat;\n}\n\n:host(.ic-toggle-button-icon) ::part(button) {\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(.ic-toggle-button-icon) ::part(button):active {\n background-color: var(--ic-action-default-bg-pressed);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-dark) ::part(button):active {\n background-color: var(--ic-action-dark-bg-pressed);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-light) ::part(button):active {\n background-color: var(--ic-action-light-bg-pressed);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-small) ::part(button) {\n height: var(--ic-space-xl);\n width: var(--ic-space-xl);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-large) ::part(button) {\n height: var(--ic-space-xxl);\n width: var(--ic-space-xxl);\n}\n\n:host(.ic-toggle-button-checked.ic-toggle-button-loading) ::part(button) {\n --loading-button-background: var(\n --ic-toggle-button-selected-background-pressed\n );\n background-color: var(--ic-toggle-button-selected-background-pressed);\n}\n\n:host(.ic-toggle-button-loading) ::part(button) {\n --loading-button-background: var(\n --ic-toggle-button-unselected-background-pressed\n );\n background-color: var(--ic-toggle-button-unselected-background-pressed);\n}\n\n:host(.ic-toggle-button-checked.ic-toggle-button-loading)\n ::part(ic-loading-container) {\n --inner-color: var(--ic-toggle-button-loading-bar);\n}\n\n:host(.ic-toggle-button-loading) ::part(ic-loading-container) {\n --inner-color: var(--ic-toggle-button-selected-loading-bar);\n}\n\n:host(\n .ic-toggle-button-checked.ic-toggle-button-loading.ic-toggle-button-monochrome\n )\n ::part(button) {\n --loading-button-background: var(\n --ic-toggle-button-selected-background-pressed-monochrome\n );\n background-color: var(\n --ic-toggle-button-selected-background-pressed-monochrome\n );\n}\n\n:host(.ic-toggle-button-loading.ic-toggle-button-monochrome) ::part(button) {\n --loading-button-background: var(\n --ic-toggle-button-unselected-background-pressed-monochrome\n );\n background-color: var(\n --ic-toggle-button-unselected-background-pressed-monochrome\n );\n}\n\n@media (forced-colors: active) {\n :host(.ic-toggle-button-checked) ::part(button),\n :host(.ic-toggle-button-checked) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.ic-toggle-button-checked.ic-toggle-button-light) ::part(button),\n :host(.ic-toggle-button-checked.ic-toggle-button-light) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.ic-toggle-button-checked.ic-toggle-button-dark) ::part(button),\n :host(.ic-toggle-button-checked.ic-toggle-button-dark) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.ic-toggle-button-checked.ic-toggle-button-disabled) ::part(button) {\n background-color: GrayText;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { isSlotUsed, onComponentRequiredPropUndefined, removeDisabledFalse, isSlottedInGroup, } from \"../../utils/helpers\";\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 */\nexport class ToggleButton {\n constructor() {\n this.loopAttributes = () => {\n const trackedAttributes = [\n \"loading\",\n \"disabled\",\n \"full-width\",\n \"icon-placement\",\n \"variant\",\n \"size\",\n \"theme\",\n \"monochrome\",\n ];\n const parentAttributes = this.el.parentElement.attributes;\n for (let i = 0; i < trackedAttributes.length; i++) {\n if (parentAttributes.getNamedItem(trackedAttributes[i]) !== null) {\n const attribute = parentAttributes.getNamedItem(trackedAttributes[i]);\n switch (attribute.name) {\n case trackedAttributes[0]:\n this.loading = attribute.value !== \"false\";\n break;\n case trackedAttributes[1]:\n console.log(attribute.value);\n this.disabled = attribute.value !== \"false\";\n break;\n case trackedAttributes[2]:\n this.fullWidth = attribute.value !== \"false\";\n break;\n case trackedAttributes[3]:\n this.iconPlacement = attribute.value;\n break;\n case trackedAttributes[4]:\n this.variant = attribute.value;\n break;\n case trackedAttributes[5]:\n this.size = attribute.value;\n break;\n case trackedAttributes[6]:\n this.theme = attribute.value;\n break;\n case trackedAttributes[7]:\n this.monochrome = attribute.value !== \"false\";\n break;\n }\n }\n }\n };\n this.handleFocus = (ev) => {\n ev.stopImmediatePropagation();\n };\n this.handleClick = () => {\n !this.loading &&\n !this.disabled &&\n this.icToggleChecked.emit({\n checked: this.checked,\n });\n };\n this.accessibleLabel = undefined;\n this.checked = false;\n this.disabled = false;\n this.fullWidth = false;\n this.iconPlacement = \"left\";\n this.label = undefined;\n this.loading = false;\n this.monochrome = false;\n this.size = \"medium\";\n this.theme = \"inherit\";\n this.variant = \"default\";\n }\n watchDisabledHandler() {\n removeDisabledFalse(this.disabled, this.el);\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n if (isSlottedInGroup(this.el)) {\n this.loopAttributes();\n }\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([\n {\n prop: this.variant === \"icon\" ? this.accessibleLabel : this.label,\n propName: this.variant === \"icon\" ? \"accessible-label\" : \"label\",\n },\n ], \"Toggle button\");\n }\n handleHostClick(e) {\n if (this.disabled) {\n e.stopImmediatePropagation();\n }\n else if (!this.loading) {\n this.checked = !this.checked;\n }\n }\n render() {\n return (h(Host, { class: {\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n [\"ic-toggle-button-disabled\"]: this.disabled,\n [\"ic-toggle-button-checked\"]: this.checked,\n [\"ic-toggle-button-icon\"]: this.variant === \"icon\",\n [`ic-toggle-button-${this.size}`]: true,\n [\"ic-toggle-button-loading\"]: this.loading,\n [\"ic-toggle-button-monochrome\"]: this.monochrome,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }, onFocus: this.handleFocus }, h(\"ic-button\", { \"aria-pressed\": this.checked.toString(), variant: this.variant === \"icon\" ? \"icon\" : \"secondary\", onClick: this.handleClick, title: this.accessibleLabel, \"aria-label\": `${this.accessibleLabel ? this.accessibleLabel : this.label}, ${this.checked ? \"ticked\" : \"unticked\"}`, disabled: this.disabled, size: this.size, fullWidth: this.fullWidth, loading: this.loading }, this.variant !== \"icon\" && this.label, h(\"slot\", null), isSlotUsed(this.el, \"icon\") && (h(\"slot\", { name: \"icon\", slot: `${this.iconPlacement}-icon` })), isSlotUsed(this.el, \"badge\") && (h(\"slot\", { name: \"badge\", slot: \"badge\" })))));\n }\n static get is() { return \"ic-toggle-button\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toggle-button.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toggle-button.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label that will be applied to the toggle button. This is required for the icon variant of toggle buttons.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"checked\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in a checked state.\"\n },\n \"attribute\": \"checked\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in disabled state.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"fullWidth\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will fill the width of the container.\"\n },\n \"attribute\": \"full-width\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"iconPlacement\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcIconPlacementOptions\",\n \"resolved\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"references\": {\n \"IcIconPlacementOptions\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcIconPlacementOptions\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The placement of the icon in relation to the toggle button label.\"\n },\n \"attribute\": \"icon-placement\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"left\\\"\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label to display in the toggle button. This is required for the default variant of toggle buttons.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"loading\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in loading state.\"\n },\n \"attribute\": \"loading\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"monochrome\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will display as black in the light theme, and white in dark theme.\"\n },\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the toggle button to be displayed.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toggle button.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"icToggleChecked\",\n \"name\": \"icToggleChecked\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the user clicks a toggle button.\"\n },\n \"complexType\": {\n \"original\": \"{\\n checked: boolean;\\n }\",\n \"resolved\": \"{ checked: boolean; }\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"watchDisabledHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"click\",\n \"method\": \"handleHostClick\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-toggle-button.js.map\n"],"version":3}