@ukic/web-components 3.20.0 → 3.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (642) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-3a796e7a.js → helpers-81cd6930.js} +3 -16
  3. package/dist/cjs/helpers-81cd6930.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-accordion.cjs.entry.js +17 -10
  6. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-action-chip.cjs.entry.js +7 -3
  8. package/dist/cjs/ic-action-chip.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -2
  11. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-badge.cjs.entry.js +2 -2
  13. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -2
  15. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-button_3.cjs.entry.js +7 -7
  18. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-card-horizontal.cjs.entry.js +174 -0
  20. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
  21. package/dist/cjs/ic-card-vertical.cjs.entry.js +2 -2
  22. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-checkbox-group.cjs.entry.js +3 -3
  24. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-checkbox.cjs.entry.js +6 -6
  26. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-chip.cjs.entry.js +7 -3
  28. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-classification-banner.cjs.entry.js +13 -5
  30. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
  32. package/dist/cjs/ic-data-row.cjs.entry.js +3 -3
  33. package/dist/cjs/ic-dialog.cjs.entry.js +2 -2
  34. package/dist/cjs/ic-divider.cjs.entry.js +17 -8
  35. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-empty-state.cjs.entry.js +3 -3
  37. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-footer-link.cjs.entry.js +4 -4
  39. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-hero.cjs.entry.js +5 -5
  42. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +7 -7
  43. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +218 -86
  45. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-input-label_2.cjs.entry.js +17 -12
  47. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-layout-grid-item.cjs.entry.js +2 -2
  49. package/dist/cjs/ic-layout-grid.cjs.entry.js +2 -2
  50. package/dist/cjs/ic-link.cjs.entry.js +3 -3
  51. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  53. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-navigation-group.cjs.entry.js +3 -3
  56. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-navigation-item.cjs.entry.js +7 -5
  58. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  59. package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -5
  60. package/dist/cjs/ic-page-header.cjs.entry.js +8 -8
  61. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-pagination-bar.cjs.entry.js +389 -0
  63. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -0
  64. package/dist/cjs/ic-pagination-item.cjs.entry.js +3 -3
  65. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-pagination_3.cjs.entry.js +1412 -0
  67. package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -0
  68. package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
  69. package/dist/cjs/ic-radio-group.cjs.entry.js +5 -5
  70. package/dist/cjs/ic-radio-option.cjs.entry.js +6 -6
  71. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-search-bar.cjs.entry.js +12 -12
  73. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  75. package/dist/cjs/ic-side-navigation.cjs.entry.js +30 -15
  76. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  78. package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
  79. package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
  80. package/dist/cjs/ic-step.cjs.entry.js +14 -14
  81. package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
  82. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-switch.cjs.entry.js +6 -6
  84. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -2
  86. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  87. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
  88. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  89. package/dist/cjs/ic-tab.cjs.entry.js +2 -2
  90. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  91. package/dist/cjs/ic-theme.cjs.entry.js +2 -2
  92. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  93. package/dist/cjs/ic-toast.cjs.entry.js +8 -7
  94. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  95. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +4 -4
  96. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  97. package/dist/cjs/ic-toggle-button.cjs.entry.js +3 -3
  98. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  99. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-typography.cjs.entry.js +2 -2
  101. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  102. package/dist/cjs/index-d337cd8a.js +16 -16
  103. package/dist/cjs/loader.cjs.js +1 -1
  104. package/dist/collection/collection-manifest.json +3 -1
  105. package/dist/collection/components/ic-accordion/ic-accordion.css +6 -0
  106. package/dist/collection/components/ic-accordion/ic-accordion.js +15 -8
  107. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  108. package/dist/collection/components/ic-action-chip/ic-action-chip.css +15 -2
  109. package/dist/collection/components/ic-action-chip/ic-action-chip.js +5 -1
  110. package/dist/collection/components/ic-action-chip/ic-action-chip.js.map +1 -1
  111. package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +7 -0
  112. package/dist/collection/components/ic-badge/ic-badge.css +6 -0
  113. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.css +8 -0
  114. package/dist/collection/components/ic-button/ic-button.css +7 -0
  115. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +728 -0
  116. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +512 -0
  117. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -0
  118. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js +876 -0
  119. package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +7 -0
  120. package/dist/collection/components/ic-card-vertical/ic-card-vertical.stories.js +1 -1
  121. package/dist/collection/components/ic-checkbox/ic-checkbox.css +7 -5
  122. package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -5
  123. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  124. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +3 -3
  125. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  126. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +35 -0
  127. package/dist/collection/components/ic-chip/ic-chip.css +15 -3
  128. package/dist/collection/components/ic-chip/ic-chip.js +5 -1
  129. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  130. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +33 -5
  131. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
  132. package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +32 -0
  133. package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
  134. package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
  135. package/dist/collection/components/ic-dialog/ic-dialog.js +1 -1
  136. package/dist/collection/components/ic-divider/ic-divider.js +16 -7
  137. package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
  138. package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
  139. package/dist/collection/components/ic-footer-link/ic-footer-link.css +6 -0
  140. package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
  141. package/dist/collection/components/ic-hero/ic-hero.js +4 -4
  142. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.css +6 -0
  143. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +5 -5
  144. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +7 -0
  145. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -3
  146. package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
  147. package/dist/collection/components/ic-input-label/ic-input-label.js +16 -8
  148. package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
  149. package/dist/collection/components/ic-input-validation/ic-input-validation.js +3 -3
  150. package/dist/collection/components/ic-layout-grid/ic-layout-grid.js +2 -2
  151. package/dist/collection/components/ic-layout-grid-item/ic-layout-grid-item.js +2 -2
  152. package/dist/collection/components/ic-link/ic-link.css +7 -0
  153. package/dist/collection/components/ic-link/ic-link.js +1 -1
  154. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +5 -5
  155. package/dist/collection/components/ic-menu/ic-menu.css +12 -1
  156. package/dist/collection/components/ic-menu/ic-menu.js +184 -53
  157. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  158. package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
  159. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +9 -0
  160. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +1 -1
  161. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +41 -0
  162. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +5 -3
  163. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  164. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
  165. package/dist/collection/components/ic-page-header/ic-page-header.css +1 -2
  166. package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
  167. package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
  168. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +104 -0
  169. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +895 -0
  170. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -0
  171. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +215 -0
  172. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
  173. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
  174. package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +6 -0
  175. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
  176. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
  177. package/dist/collection/components/ic-radio-group/ic-radio-group.js +4 -4
  178. package/dist/collection/components/ic-radio-option/ic-radio-option.css +6 -0
  179. package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
  180. package/dist/collection/components/ic-search-bar/ic-search-bar.css +6 -0
  181. package/dist/collection/components/ic-search-bar/ic-search-bar.js +10 -11
  182. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  183. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
  184. package/dist/collection/components/ic-select/ic-select.css +9 -2
  185. package/dist/collection/components/ic-select/ic-select.js +414 -589
  186. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  187. package/dist/collection/components/ic-select/ic-select.types.js +2 -0
  188. package/dist/collection/components/ic-select/ic-select.types.js.map +1 -0
  189. package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +26 -21
  190. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +46 -21
  191. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +29 -14
  192. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  193. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
  194. package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
  195. package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
  196. package/dist/collection/components/ic-step/ic-step.js +13 -13
  197. package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
  198. package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
  199. package/dist/collection/components/ic-switch/ic-switch.css +7 -0
  200. package/dist/collection/components/ic-switch/ic-switch.js +4 -4
  201. package/dist/collection/components/ic-tab/ic-tab.css +6 -0
  202. package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -2
  203. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  204. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
  205. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
  206. package/dist/collection/components/ic-text-field/ic-text-field.js +5 -5
  207. package/dist/collection/components/ic-theme/ic-theme.js +1 -1
  208. package/dist/collection/components/ic-toast/ic-toast.js +7 -6
  209. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  210. package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
  211. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
  212. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css +6 -0
  213. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
  214. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +8 -4
  215. package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +100 -0
  216. package/dist/collection/components/ic-typography/ic-typography.css +6 -0
  217. package/dist/collection/utils/helpers.js +2 -15
  218. package/dist/collection/utils/helpers.js.map +1 -1
  219. package/dist/collection/utils/types.js.map +1 -1
  220. package/dist/components/helpers.js +3 -16
  221. package/dist/components/helpers.js.map +1 -1
  222. package/dist/components/ic-accordion.js +16 -9
  223. package/dist/components/ic-accordion.js.map +1 -1
  224. package/dist/components/ic-action-chip.js +6 -2
  225. package/dist/components/ic-action-chip.js.map +1 -1
  226. package/dist/components/ic-back-to-top.js +1 -1
  227. package/dist/components/ic-back-to-top.js.map +1 -1
  228. package/dist/components/ic-badge.js +1 -1
  229. package/dist/components/ic-badge.js.map +1 -1
  230. package/dist/components/ic-breadcrumb-group.js +1 -1
  231. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  232. package/dist/components/ic-button2.js +1 -1
  233. package/dist/components/ic-button2.js.map +1 -1
  234. package/dist/components/ic-card-horizontal.d.ts +11 -0
  235. package/dist/components/ic-card-horizontal.js +214 -0
  236. package/dist/components/ic-card-horizontal.js.map +1 -0
  237. package/dist/components/ic-card-vertical.js +1 -1
  238. package/dist/components/ic-card-vertical.js.map +1 -1
  239. package/dist/components/ic-checkbox-group.js +2 -2
  240. package/dist/components/ic-checkbox-group.js.map +1 -1
  241. package/dist/components/ic-checkbox.js +5 -5
  242. package/dist/components/ic-checkbox.js.map +1 -1
  243. package/dist/components/ic-chip.js +6 -2
  244. package/dist/components/ic-chip.js.map +1 -1
  245. package/dist/components/ic-classification-banner.js +14 -5
  246. package/dist/components/ic-classification-banner.js.map +1 -1
  247. package/dist/components/ic-data-list.js +2 -2
  248. package/dist/components/ic-data-row.js +2 -2
  249. package/dist/components/ic-dialog.js +1 -1
  250. package/dist/components/ic-divider2.js +17 -8
  251. package/dist/components/ic-divider2.js.map +1 -1
  252. package/dist/components/ic-empty-state.js +2 -2
  253. package/dist/components/ic-footer-link.js +3 -3
  254. package/dist/components/ic-footer-link.js.map +1 -1
  255. package/dist/components/ic-hero.js +4 -4
  256. package/dist/components/ic-horizontal-scroll2.js +6 -6
  257. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  258. package/dist/components/ic-input-component-container2.js +4 -4
  259. package/dist/components/ic-input-component-container2.js.map +1 -1
  260. package/dist/components/ic-input-container2.js +2 -2
  261. package/dist/components/ic-input-label2.js +13 -8
  262. package/dist/components/ic-input-label2.js.map +1 -1
  263. package/dist/components/ic-input-validation2.js +3 -3
  264. package/dist/components/ic-layout-grid-item.js +2 -2
  265. package/dist/components/ic-layout-grid.js +2 -2
  266. package/dist/components/ic-link2.js +2 -2
  267. package/dist/components/ic-link2.js.map +1 -1
  268. package/dist/components/ic-loading-indicator2.js +5 -5
  269. package/dist/components/ic-menu-group.js +1 -1
  270. package/dist/components/ic-menu2.js +213 -79
  271. package/dist/components/ic-menu2.js.map +1 -1
  272. package/dist/components/ic-navigation-group.js +2 -2
  273. package/dist/components/ic-navigation-group.js.map +1 -1
  274. package/dist/components/ic-navigation-item.js +6 -4
  275. package/dist/components/ic-navigation-item.js.map +1 -1
  276. package/dist/components/ic-navigation-menu2.js +4 -4
  277. package/dist/components/ic-page-header.js +7 -7
  278. package/dist/components/ic-page-header.js.map +1 -1
  279. package/dist/components/ic-pagination-bar.d.ts +11 -0
  280. package/dist/components/ic-pagination-bar.js +523 -0
  281. package/dist/components/ic-pagination-bar.js.map +1 -0
  282. package/dist/components/ic-pagination-item2.js +2 -2
  283. package/dist/components/ic-pagination-item2.js.map +1 -1
  284. package/dist/components/ic-pagination.js +1 -375
  285. package/dist/components/ic-pagination.js.map +1 -1
  286. package/dist/{esm/ic-pagination.entry.js → components/ic-pagination2.js} +86 -15
  287. package/dist/components/ic-pagination2.js.map +1 -0
  288. package/dist/components/ic-popover-menu.js +4 -4
  289. package/dist/components/ic-popover-menu.js.map +1 -1
  290. package/dist/components/ic-radio-group.js +4 -4
  291. package/dist/components/ic-radio-option.js +5 -5
  292. package/dist/components/ic-radio-option.js.map +1 -1
  293. package/dist/components/ic-search-bar.js +12 -12
  294. package/dist/components/ic-search-bar.js.map +1 -1
  295. package/dist/components/ic-section-container2.js +2 -2
  296. package/dist/components/ic-select.js +1 -994
  297. package/dist/components/ic-select.js.map +1 -1
  298. package/dist/components/ic-select2.js +804 -0
  299. package/dist/components/ic-select2.js.map +1 -0
  300. package/dist/components/ic-side-navigation.js +30 -15
  301. package/dist/components/ic-side-navigation.js.map +1 -1
  302. package/dist/components/ic-skeleton.js +2 -2
  303. package/dist/components/ic-skip-link.js +2 -2
  304. package/dist/components/ic-status-tag.js +2 -2
  305. package/dist/components/ic-step.js +13 -13
  306. package/dist/components/ic-stepper.js +2 -2
  307. package/dist/components/ic-stepper.js.map +1 -1
  308. package/dist/components/ic-switch.js +5 -5
  309. package/dist/components/ic-switch.js.map +1 -1
  310. package/dist/components/ic-tab-context.js +1 -2
  311. package/dist/components/ic-tab-context.js.map +1 -1
  312. package/dist/components/ic-tab-group.js +2 -2
  313. package/dist/components/ic-tab-panel.js +2 -2
  314. package/dist/components/ic-tab-panel.js.map +1 -1
  315. package/dist/components/ic-tab.js +1 -1
  316. package/dist/components/ic-tab.js.map +1 -1
  317. package/dist/components/ic-text-field.js +1 -528
  318. package/dist/components/ic-text-field.js.map +1 -1
  319. package/dist/{esm/ic-text-field.entry.js → components/ic-text-field2.js} +119 -16
  320. package/dist/components/ic-text-field2.js.map +1 -0
  321. package/dist/components/ic-theme.js +1 -1
  322. package/dist/components/ic-toast-region.js +1 -1
  323. package/dist/components/ic-toast.js +7 -6
  324. package/dist/components/ic-toast.js.map +1 -1
  325. package/dist/components/ic-toggle-button-group.js +3 -3
  326. package/dist/components/ic-toggle-button-group.js.map +1 -1
  327. package/dist/components/ic-toggle-button.js +2 -2
  328. package/dist/components/ic-top-navigation.js +1 -1
  329. package/dist/components/ic-top-navigation.js.map +1 -1
  330. package/dist/components/ic-typography2.js +1 -1
  331. package/dist/components/ic-typography2.js.map +1 -1
  332. package/dist/core/core.esm.js +1 -1
  333. package/dist/core/core.esm.js.map +1 -1
  334. package/dist/core/p-05fd2707.entry.js +2 -0
  335. package/dist/core/p-05fd2707.entry.js.map +1 -0
  336. package/dist/core/{p-ba4abeac.entry.js → p-09505807.entry.js} +2 -2
  337. package/dist/core/{p-8f45f956.entry.js → p-09caf7ed.entry.js} +2 -2
  338. package/dist/core/p-09caf7ed.entry.js.map +1 -0
  339. package/dist/core/{p-8b1567c9.entry.js → p-0b728f50.entry.js} +2 -2
  340. package/dist/core/p-0b728f50.entry.js.map +1 -0
  341. package/dist/core/p-0fb7f915.entry.js +2 -0
  342. package/dist/core/p-0fb7f915.entry.js.map +1 -0
  343. package/dist/core/p-1b81ec88.entry.js +2 -0
  344. package/dist/core/p-1b81ec88.entry.js.map +1 -0
  345. package/dist/core/{p-3582c7df.entry.js → p-2691cc80.entry.js} +2 -2
  346. package/dist/core/p-2691cc80.entry.js.map +1 -0
  347. package/dist/core/{p-fe0153ec.entry.js → p-2a124daf.entry.js} +2 -2
  348. package/dist/core/{p-f5fd4a76.entry.js → p-2b87c592.entry.js} +2 -2
  349. package/dist/core/p-2b87c592.entry.js.map +1 -0
  350. package/dist/core/{p-c7f8547d.entry.js → p-2bd80913.entry.js} +2 -2
  351. package/dist/core/p-2bd80913.entry.js.map +1 -0
  352. package/dist/core/{p-aed1c7e7.entry.js → p-347cc084.entry.js} +2 -2
  353. package/dist/core/p-393af2bc.entry.js +2 -0
  354. package/dist/core/p-393af2bc.entry.js.map +1 -0
  355. package/dist/core/{p-b5e39585.entry.js → p-3aed13ba.entry.js} +2 -2
  356. package/dist/core/{p-276a6c8f.entry.js → p-46fd555f.entry.js} +2 -2
  357. package/dist/core/p-48a628f0.entry.js +2 -0
  358. package/dist/core/{p-23dc27a8.entry.js.map → p-48a628f0.entry.js.map} +1 -1
  359. package/dist/core/p-4f56acff.entry.js +2 -0
  360. package/dist/core/p-4f56acff.entry.js.map +1 -0
  361. package/dist/core/{p-86989873.entry.js → p-506d428a.entry.js} +2 -2
  362. package/dist/core/p-506d428a.entry.js.map +1 -0
  363. package/dist/core/p-50dca790.entry.js +2 -0
  364. package/dist/core/p-50dca790.entry.js.map +1 -0
  365. package/dist/core/p-53ab3c0f.entry.js +2 -0
  366. package/dist/core/p-53ab3c0f.entry.js.map +1 -0
  367. package/dist/core/{p-889bb8db.entry.js → p-56de4f4b.entry.js} +2 -2
  368. package/dist/core/p-5900cb65.entry.js +2 -0
  369. package/dist/core/p-5900cb65.entry.js.map +1 -0
  370. package/dist/core/{p-608b4912.entry.js → p-5976de6e.entry.js} +2 -2
  371. package/dist/core/{p-cf056074.entry.js → p-61d79fc6.entry.js} +2 -2
  372. package/dist/core/{p-cf056074.entry.js.map → p-61d79fc6.entry.js.map} +1 -1
  373. package/dist/core/{p-45076d7e.entry.js → p-659d048d.entry.js} +2 -2
  374. package/dist/core/{p-1edf2689.entry.js → p-67de1290.entry.js} +2 -2
  375. package/dist/core/p-6b4ec95f.entry.js +3 -0
  376. package/dist/core/p-6b4ec95f.entry.js.map +1 -0
  377. package/dist/core/{p-f700b759.entry.js → p-73043f57.entry.js} +2 -2
  378. package/dist/core/{p-7b8e5926.entry.js → p-735d3096.entry.js} +2 -2
  379. package/dist/core/{p-0301d1c8.entry.js → p-7b538fd1.entry.js} +2 -2
  380. package/dist/core/{p-cdbbcef4.entry.js → p-80d85403.entry.js} +2 -2
  381. package/dist/core/p-80d85403.entry.js.map +1 -0
  382. package/dist/core/{p-09c31ac6.entry.js → p-83578f1d.entry.js} +2 -2
  383. package/dist/core/{p-09c31ac6.entry.js.map → p-83578f1d.entry.js.map} +1 -1
  384. package/dist/core/{p-b8c0c142.entry.js → p-880f7548.entry.js} +2 -2
  385. package/dist/core/p-880f7548.entry.js.map +1 -0
  386. package/dist/core/{p-0d711c6a.entry.js → p-8a833e82.entry.js} +2 -2
  387. package/dist/core/{p-c16e982c.entry.js → p-90678e67.entry.js} +2 -2
  388. package/dist/core/{p-93e1ba0a.entry.js → p-9502fb86.entry.js} +2 -2
  389. package/dist/core/{p-6740c915.entry.js → p-99433296.entry.js} +2 -2
  390. package/dist/core/p-99433296.entry.js.map +1 -0
  391. package/dist/core/{p-76e8df31.entry.js → p-9c2b2cb9.entry.js} +2 -2
  392. package/dist/core/{p-949d08d3.entry.js → p-9cb83a2e.entry.js} +2 -2
  393. package/dist/core/{p-d2d17d6d.entry.js → p-a08d6b46.entry.js} +2 -2
  394. package/dist/core/p-a08d6b46.entry.js.map +1 -0
  395. package/dist/core/p-a321feee.entry.js +2 -0
  396. package/dist/core/p-a321feee.entry.js.map +1 -0
  397. package/dist/core/{p-45c553db.entry.js → p-a780a34b.entry.js} +2 -2
  398. package/dist/core/{p-90814d32.entry.js → p-aad03a3c.entry.js} +2 -2
  399. package/dist/core/{p-ec14c783.entry.js → p-aaf4e367.entry.js} +2 -2
  400. package/dist/core/{p-8c00614c.entry.js → p-b52c44eb.entry.js} +2 -2
  401. package/dist/core/{p-0722d7b6.entry.js → p-b777f0a1.entry.js} +2 -2
  402. package/dist/core/p-b777f0a1.entry.js.map +1 -0
  403. package/dist/core/p-b77b1e1f.js +2 -0
  404. package/dist/core/p-b77b1e1f.js.map +1 -0
  405. package/dist/core/p-b997ad5e.entry.js +2 -0
  406. package/dist/core/p-b997ad5e.entry.js.map +1 -0
  407. package/dist/core/{p-a0af1b0a.entry.js → p-bb7652cd.entry.js} +2 -2
  408. package/dist/core/{p-1d8559f0.entry.js → p-c156e6e9.entry.js} +2 -2
  409. package/dist/core/{p-e1814e7e.entry.js → p-cad23b7d.entry.js} +2 -2
  410. package/dist/core/{p-6aa8d3ce.entry.js → p-cbca04bb.entry.js} +2 -2
  411. package/dist/core/p-cbca04bb.entry.js.map +1 -0
  412. package/dist/core/{p-e176881a.entry.js → p-cc64e5ef.entry.js} +2 -2
  413. package/dist/core/{p-d478d13e.entry.js → p-cfbacca1.entry.js} +2 -2
  414. package/dist/core/p-cfbacca1.entry.js.map +1 -0
  415. package/dist/core/{p-ebc47282.entry.js → p-daec7e69.entry.js} +2 -2
  416. package/dist/core/{p-5ac3adb9.entry.js → p-e7767c0d.entry.js} +2 -2
  417. package/dist/core/p-e7767c0d.entry.js.map +1 -0
  418. package/dist/core/p-e938eb31.entry.js +2 -0
  419. package/dist/core/p-e938eb31.entry.js.map +1 -0
  420. package/dist/core/{p-81f60443.entry.js → p-ea7a3d30.entry.js} +2 -2
  421. package/dist/core/p-ea7a3d30.entry.js.map +1 -0
  422. package/dist/core/{p-ad5aca6f.entry.js → p-ea890d3d.entry.js} +2 -2
  423. package/dist/core/{p-880afd4b.entry.js → p-ebd688b9.entry.js} +2 -2
  424. package/dist/core/p-ebd688b9.entry.js.map +1 -0
  425. package/dist/core/p-ef70ea50.entry.js +2 -0
  426. package/dist/core/p-ef70ea50.entry.js.map +1 -0
  427. package/dist/core/{p-1fc4b88f.entry.js → p-f64996f1.entry.js} +2 -2
  428. package/dist/core/p-f64996f1.entry.js.map +1 -0
  429. package/dist/core/{p-0f998905.entry.js → p-f661ba76.entry.js} +2 -2
  430. package/dist/core/p-f661ba76.entry.js.map +1 -0
  431. package/dist/core/{p-4e43b272.entry.js → p-f84ac9c6.entry.js} +2 -2
  432. package/dist/core/{p-df029b1b.entry.js → p-fb9376f0.entry.js} +2 -2
  433. package/dist/core/p-fb9376f0.entry.js.map +1 -0
  434. package/dist/esm/core.js +1 -1
  435. package/dist/esm/{helpers-0f85537f.js → helpers-66681c73.js} +4 -17
  436. package/dist/esm/helpers-66681c73.js.map +1 -0
  437. package/dist/esm/ic-accordion-group.entry.js +1 -1
  438. package/dist/esm/ic-accordion.entry.js +17 -10
  439. package/dist/esm/ic-accordion.entry.js.map +1 -1
  440. package/dist/esm/ic-action-chip.entry.js +7 -3
  441. package/dist/esm/ic-action-chip.entry.js.map +1 -1
  442. package/dist/esm/ic-alert.entry.js +1 -1
  443. package/dist/esm/ic-back-to-top.entry.js +2 -2
  444. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  445. package/dist/esm/ic-badge.entry.js +2 -2
  446. package/dist/esm/ic-badge.entry.js.map +1 -1
  447. package/dist/esm/ic-breadcrumb-group.entry.js +2 -2
  448. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  449. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  450. package/dist/esm/ic-button_3.entry.js +7 -7
  451. package/dist/esm/ic-button_3.entry.js.map +1 -1
  452. package/dist/esm/ic-card-horizontal.entry.js +170 -0
  453. package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
  454. package/dist/esm/ic-card-vertical.entry.js +2 -2
  455. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  456. package/dist/esm/ic-checkbox-group.entry.js +3 -3
  457. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  458. package/dist/esm/ic-checkbox.entry.js +6 -6
  459. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  460. package/dist/esm/ic-chip.entry.js +7 -3
  461. package/dist/esm/ic-chip.entry.js.map +1 -1
  462. package/dist/esm/ic-classification-banner.entry.js +13 -5
  463. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  464. package/dist/esm/ic-data-list.entry.js +2 -2
  465. package/dist/esm/ic-data-row.entry.js +3 -3
  466. package/dist/esm/ic-dialog.entry.js +2 -2
  467. package/dist/esm/ic-divider.entry.js +17 -8
  468. package/dist/esm/ic-divider.entry.js.map +1 -1
  469. package/dist/esm/ic-empty-state.entry.js +3 -3
  470. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  471. package/dist/esm/ic-footer-link.entry.js +4 -4
  472. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  473. package/dist/esm/ic-footer.entry.js +1 -1
  474. package/dist/esm/ic-hero.entry.js +5 -5
  475. package/dist/esm/ic-horizontal-scroll.entry.js +7 -7
  476. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  477. package/dist/esm/ic-input-component-container_3.entry.js +218 -86
  478. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  479. package/dist/esm/ic-input-label_2.entry.js +17 -12
  480. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  481. package/dist/esm/ic-layout-grid-item.entry.js +2 -2
  482. package/dist/esm/ic-layout-grid.entry.js +2 -2
  483. package/dist/esm/ic-link.entry.js +3 -3
  484. package/dist/esm/ic-link.entry.js.map +1 -1
  485. package/dist/esm/ic-menu-group.entry.js +2 -2
  486. package/dist/esm/ic-menu-item.entry.js +1 -1
  487. package/dist/esm/ic-navigation-button.entry.js +1 -1
  488. package/dist/esm/ic-navigation-group.entry.js +3 -3
  489. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  490. package/dist/esm/ic-navigation-item.entry.js +7 -5
  491. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  492. package/dist/esm/ic-navigation-menu.entry.js +5 -5
  493. package/dist/esm/ic-page-header.entry.js +8 -8
  494. package/dist/esm/ic-page-header.entry.js.map +1 -1
  495. package/dist/esm/ic-pagination-bar.entry.js +385 -0
  496. package/dist/esm/ic-pagination-bar.entry.js.map +1 -0
  497. package/dist/esm/ic-pagination-item.entry.js +3 -3
  498. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  499. package/dist/esm/ic-pagination_3.entry.js +1406 -0
  500. package/dist/esm/ic-pagination_3.entry.js.map +1 -0
  501. package/dist/esm/ic-popover-menu.entry.js +5 -5
  502. package/dist/esm/ic-radio-group.entry.js +5 -5
  503. package/dist/esm/ic-radio-option.entry.js +6 -6
  504. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  505. package/dist/esm/ic-search-bar.entry.js +12 -12
  506. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  507. package/dist/esm/ic-section-container.entry.js +2 -2
  508. package/dist/esm/ic-side-navigation.entry.js +30 -15
  509. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  510. package/dist/esm/ic-skeleton.entry.js +2 -2
  511. package/dist/esm/ic-skip-link.entry.js +2 -2
  512. package/dist/esm/ic-status-tag.entry.js +3 -3
  513. package/dist/esm/ic-step.entry.js +14 -14
  514. package/dist/esm/ic-stepper.entry.js +3 -3
  515. package/dist/esm/ic-stepper.entry.js.map +1 -1
  516. package/dist/esm/ic-switch.entry.js +6 -6
  517. package/dist/esm/ic-switch.entry.js.map +1 -1
  518. package/dist/esm/ic-tab-context.entry.js +1 -2
  519. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  520. package/dist/esm/ic-tab-group.entry.js +3 -3
  521. package/dist/esm/ic-tab-panel.entry.js +2 -2
  522. package/dist/esm/ic-tab.entry.js +2 -2
  523. package/dist/esm/ic-tab.entry.js.map +1 -1
  524. package/dist/esm/ic-theme.entry.js +2 -2
  525. package/dist/esm/ic-toast-region.entry.js +1 -1
  526. package/dist/esm/ic-toast.entry.js +8 -7
  527. package/dist/esm/ic-toast.entry.js.map +1 -1
  528. package/dist/esm/ic-toggle-button-group.entry.js +4 -4
  529. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  530. package/dist/esm/ic-toggle-button.entry.js +3 -3
  531. package/dist/esm/ic-top-navigation.entry.js +2 -2
  532. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  533. package/dist/esm/ic-typography.entry.js +2 -2
  534. package/dist/esm/ic-typography.entry.js.map +1 -1
  535. package/dist/esm/index-a7a720e7.js +16 -16
  536. package/dist/esm/loader.js +1 -1
  537. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +89 -0
  538. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -0
  539. package/dist/types/components/ic-classification-banner/ic-classification-banner.d.ts +4 -0
  540. package/dist/types/components/ic-divider/ic-divider.d.ts +2 -0
  541. package/dist/types/components/ic-input-label/ic-input-label.d.ts +4 -1
  542. package/dist/types/components/ic-menu/ic-menu.d.ts +11 -1
  543. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +162 -0
  544. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +8 -0
  545. package/dist/types/components/ic-select/ic-select.d.ts +53 -80
  546. package/dist/types/components/ic-select/ic-select.types.d.ts +43 -0
  547. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +3 -2
  548. package/dist/types/components.d.ts +357 -7
  549. package/dist/types/utils/helpers.d.ts +2 -4
  550. package/dist/types/utils/types.d.ts +1 -0
  551. package/hydrate/index.js +1504 -900
  552. package/hydrate/index.mjs +1504 -900
  553. package/package.json +2 -2
  554. package/vscode-data.json +248 -0
  555. package/dist/cjs/helpers-3a796e7a.js.map +0 -1
  556. package/dist/cjs/ic-pagination.cjs.entry.js +0 -312
  557. package/dist/cjs/ic-pagination.cjs.entry.js.map +0 -1
  558. package/dist/cjs/ic-select.cjs.entry.js +0 -879
  559. package/dist/cjs/ic-select.cjs.entry.js.map +0 -1
  560. package/dist/cjs/ic-text-field.cjs.entry.js +0 -433
  561. package/dist/cjs/ic-text-field.cjs.entry.js.map +0 -1
  562. package/dist/core/p-0722d7b6.entry.js.map +0 -1
  563. package/dist/core/p-0f6fd5d3.entry.js +0 -2
  564. package/dist/core/p-0f6fd5d3.entry.js.map +0 -1
  565. package/dist/core/p-0f998905.entry.js.map +0 -1
  566. package/dist/core/p-107281c4.entry.js +0 -2
  567. package/dist/core/p-107281c4.entry.js.map +0 -1
  568. package/dist/core/p-1fc4b88f.entry.js.map +0 -1
  569. package/dist/core/p-23dc27a8.entry.js +0 -2
  570. package/dist/core/p-3582c7df.entry.js.map +0 -1
  571. package/dist/core/p-3c7e90a7.entry.js +0 -2
  572. package/dist/core/p-3c7e90a7.entry.js.map +0 -1
  573. package/dist/core/p-57ce68e5.entry.js +0 -2
  574. package/dist/core/p-57ce68e5.entry.js.map +0 -1
  575. package/dist/core/p-5ac3adb9.entry.js.map +0 -1
  576. package/dist/core/p-656a9127.entry.js +0 -2
  577. package/dist/core/p-656a9127.entry.js.map +0 -1
  578. package/dist/core/p-6740c915.entry.js.map +0 -1
  579. package/dist/core/p-6aa8d3ce.entry.js.map +0 -1
  580. package/dist/core/p-72344764.entry.js +0 -2
  581. package/dist/core/p-72344764.entry.js.map +0 -1
  582. package/dist/core/p-7c38dd1f.entry.js +0 -2
  583. package/dist/core/p-7c38dd1f.entry.js.map +0 -1
  584. package/dist/core/p-81f60443.entry.js.map +0 -1
  585. package/dist/core/p-840c647f.entry.js +0 -2
  586. package/dist/core/p-840c647f.entry.js.map +0 -1
  587. package/dist/core/p-86989873.entry.js.map +0 -1
  588. package/dist/core/p-880afd4b.entry.js.map +0 -1
  589. package/dist/core/p-8b1567c9.entry.js.map +0 -1
  590. package/dist/core/p-8f45f956.entry.js.map +0 -1
  591. package/dist/core/p-9b60ca02.entry.js +0 -2
  592. package/dist/core/p-9b60ca02.entry.js.map +0 -1
  593. package/dist/core/p-a16415e4.entry.js +0 -3
  594. package/dist/core/p-a16415e4.entry.js.map +0 -1
  595. package/dist/core/p-b22fc28d.entry.js +0 -2
  596. package/dist/core/p-b22fc28d.entry.js.map +0 -1
  597. package/dist/core/p-b8c0c142.entry.js.map +0 -1
  598. package/dist/core/p-c3f5907e.entry.js +0 -2
  599. package/dist/core/p-c3f5907e.entry.js.map +0 -1
  600. package/dist/core/p-c7f8547d.entry.js.map +0 -1
  601. package/dist/core/p-cdbbcef4.entry.js.map +0 -1
  602. package/dist/core/p-d2d17d6d.entry.js.map +0 -1
  603. package/dist/core/p-d478d13e.entry.js.map +0 -1
  604. package/dist/core/p-dbc8bf0c.js +0 -2
  605. package/dist/core/p-dbc8bf0c.js.map +0 -1
  606. package/dist/core/p-df029b1b.entry.js.map +0 -1
  607. package/dist/core/p-f5fd4a76.entry.js.map +0 -1
  608. package/dist/core/p-fdb587ab.entry.js +0 -2
  609. package/dist/core/p-fdb587ab.entry.js.map +0 -1
  610. package/dist/esm/helpers-0f85537f.js.map +0 -1
  611. package/dist/esm/ic-pagination.entry.js.map +0 -1
  612. package/dist/esm/ic-select.entry.js +0 -875
  613. package/dist/esm/ic-select.entry.js.map +0 -1
  614. package/dist/esm/ic-text-field.entry.js.map +0 -1
  615. /package/dist/core/{p-ba4abeac.entry.js.map → p-09505807.entry.js.map} +0 -0
  616. /package/dist/core/{p-fe0153ec.entry.js.map → p-2a124daf.entry.js.map} +0 -0
  617. /package/dist/core/{p-aed1c7e7.entry.js.map → p-347cc084.entry.js.map} +0 -0
  618. /package/dist/core/{p-b5e39585.entry.js.map → p-3aed13ba.entry.js.map} +0 -0
  619. /package/dist/core/{p-276a6c8f.entry.js.map → p-46fd555f.entry.js.map} +0 -0
  620. /package/dist/core/{p-889bb8db.entry.js.map → p-56de4f4b.entry.js.map} +0 -0
  621. /package/dist/core/{p-608b4912.entry.js.map → p-5976de6e.entry.js.map} +0 -0
  622. /package/dist/core/{p-45076d7e.entry.js.map → p-659d048d.entry.js.map} +0 -0
  623. /package/dist/core/{p-1edf2689.entry.js.map → p-67de1290.entry.js.map} +0 -0
  624. /package/dist/core/{p-f700b759.entry.js.map → p-73043f57.entry.js.map} +0 -0
  625. /package/dist/core/{p-7b8e5926.entry.js.map → p-735d3096.entry.js.map} +0 -0
  626. /package/dist/core/{p-0301d1c8.entry.js.map → p-7b538fd1.entry.js.map} +0 -0
  627. /package/dist/core/{p-0d711c6a.entry.js.map → p-8a833e82.entry.js.map} +0 -0
  628. /package/dist/core/{p-c16e982c.entry.js.map → p-90678e67.entry.js.map} +0 -0
  629. /package/dist/core/{p-93e1ba0a.entry.js.map → p-9502fb86.entry.js.map} +0 -0
  630. /package/dist/core/{p-76e8df31.entry.js.map → p-9c2b2cb9.entry.js.map} +0 -0
  631. /package/dist/core/{p-949d08d3.entry.js.map → p-9cb83a2e.entry.js.map} +0 -0
  632. /package/dist/core/{p-45c553db.entry.js.map → p-a780a34b.entry.js.map} +0 -0
  633. /package/dist/core/{p-90814d32.entry.js.map → p-aad03a3c.entry.js.map} +0 -0
  634. /package/dist/core/{p-ec14c783.entry.js.map → p-aaf4e367.entry.js.map} +0 -0
  635. /package/dist/core/{p-8c00614c.entry.js.map → p-b52c44eb.entry.js.map} +0 -0
  636. /package/dist/core/{p-a0af1b0a.entry.js.map → p-bb7652cd.entry.js.map} +0 -0
  637. /package/dist/core/{p-1d8559f0.entry.js.map → p-c156e6e9.entry.js.map} +0 -0
  638. /package/dist/core/{p-e1814e7e.entry.js.map → p-cad23b7d.entry.js.map} +0 -0
  639. /package/dist/core/{p-e176881a.entry.js.map → p-cc64e5ef.entry.js.map} +0 -0
  640. /package/dist/core/{p-ebc47282.entry.js.map → p-daec7e69.entry.js.map} +0 -0
  641. /package/dist/core/{p-ad5aca6f.entry.js.map → p-ea890d3d.entry.js.map} +0 -0
  642. /package/dist/core/{p-4e43b272.entry.js.map → p-f84ac9c6.entry.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{f as n}from"./p-8e4e97b4.js";import{b as t,d as e,c as o,l as i,k as s,j as r,i as a,h as c,g as l}from"./p-6215e2ae.js";var u;(function(n){n["Warning"]="warning";n["Error"]="error";n["Success"]="success"})(u||(u={}));var d;(function(n){n["Default"]="default";n["Dark"]="dark";n["Light"]="light"})(d||(d={}));const f=133.3505;const p="ic-input";const v=(n,t=[])=>{const e={};t.forEach((t=>{const o=n.getAttribute(t);if(o!==null){e[t]=o;n.removeAttribute(t)}}));return e};const b=(n,t)=>{const e=n._original||n;return{_original:n,emit:m(e.emit.bind(e),t)}};const m=(n,t=0)=>{let e;return(...o)=>{clearTimeout(e);e=setTimeout(n,t,...o)}};const w=(n,t,e,o=false,i=true)=>{if(e&&(i||y(n))){let i=h(n);if(!i){i=n.ownerDocument.createElement("input");i.type="hidden";i.classList.add(p);n.appendChild(i)}i.disabled=o;i.name=e;i.value=t instanceof Date?t.toISOString():t||""}};const h=n=>Array.from(n.querySelectorAll(`input.${p}`)).filter((t=>n===t.parentElement))[0];const g=(n,t,e,o,i,s,r)=>{if(s!==undefined&&y(t)){let a=h(t);if(a===null||a===undefined){a=t.ownerDocument.createElement("input");a.classList.add(p);t.appendChild(a)}a.type="file";a.hidden=true;a.multiple=e;a.name=s;a.disabled=o;if(r)a.files=r;if(i)a.accept=i;a.onchange=()=>{n.emit(a.files)};a.click()}};const x=n=>{var t;(t=h(n))===null||t===void 0?void 0:t.remove()};const y=n=>!!n&&!!n.shadowRoot&&!!n.attachShadow;const A=n=>n+"-helper-text";const I=n=>n+"-validation-text";const k=(n,t,e,o)=>`${q(n,"helper-text")||e?A(t):""} ${o?I(t):""}`.trim();const N=(n,i=null)=>{var s;const r=n.parentElement||n.getRootNode().host.parentElement;const a=r===null||r===void 0?void 0:r.closest(t);if(!a)return d.Default;const c=a.tagName.toLowerCase();if((s=e[c])===null||s===void 0?void 0:s.includes(n.tagName.toLowerCase())){return d.Default}else if(i!==null&&!o.includes(c)){return i}else if(a.classList.contains(`${c}-${d.Dark}`)||a.classList.contains(d.Dark)){return d.Dark}else{return d.Light}};const $=()=>"maxTouchPoints"in navigator&&"userAgent"in navigator?navigator.maxTouchPoints>0&&/iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent):false;const E=(n,t)=>{var e,o,i,s,r,a,c;const l=t.type==="submit"||t.type==="reset"?`hidden-form-${t.type}-button`:"hidden-form-button";const u=(e=document.querySelector(`#${l}`))!==null&&e!==void 0?e:document.createElement("button");u.setAttribute("type",(o=t.type)!==null&&o!==void 0?o:"button");u.id=l;u.style.display="none";u.formAction=(i=t.formaction)!==null&&i!==void 0?i:"";u.formEnctype=(s=t.formenctype)!==null&&s!==void 0?s:"";u.formMethod=(r=t.formmethod)!==null&&r!==void 0?r:"";u.formNoValidate=(a=t.formnovalidate)!==null&&a!==void 0?a:false;u.formTarget=(c=t.formtarget)!==null&&c!==void 0?c:"";n===null||n===void 0?void 0:n.appendChild(u);u.click()};const O=n=>!n||n.trim().length===0;const T=n=>n!==undefined?n:undefined;const C=(n,t,e="value",o="label")=>{const i=[];if(t.length>0&&t.map){t.map((n=>{if(n.children){n.children.map((n=>i.push(n)))}else{i.push(n)}}));const s=i.find((t=>t[e]===n));if(s!==undefined)return s[o]}return undefined};const F=(n,t,e="label")=>n.filter((n=>{const o=n[e].toLowerCase();const i=t.toLowerCase();return o.includes(i)}));const M=n=>{const t=[];if(n.length>0&&n.map){n.map((n=>{if(n.children){n.children.map((n=>t.push(n)))}else{t.push(n)}}))}return t.length};const P=n=>window.matchMedia(`(max-width: ${n}px)`).matches;const D=()=>{if(P(W.S)){return W.S}if(P(W.M)){return W.M}if(P(W.L)){return W.L}if(P(W.XL)){return W.XL}return W.UNDEFINED};const S=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const G=()=>(parseInt(S("--ic-brand-color-primary-r"))*299+parseInt(S("--ic-brand-color-primary-g"))*587+parseInt(S("--ic-brand-color-primary-b"))*114)/1e3;const R=(n=G())=>n>f?d.Dark:d.Light;const L=(n,t)=>(n===null||n===void 0?void 0:n.querySelector(`[slot="${t}"]`))||null;const j=(n,t)=>L(n,t)!==null;const U=(n,t)=>{const e=L(n,t);return e?V(e):null};const V=n=>{const t=n.firstElementChild;if(t===null)return[n];const e=t.assignedElements?t.assignedElements():t.childNodes;return e.length?e:n.tagName?[n]:null};const B=({parentElement:n})=>{let t={navType:"",parent:null};if(n){switch(n.tagName){case"IC-NAVIGATION-GROUP":t=B(n);break;case"IC-TOP-NAVIGATION":t={navType:"top",parent:n};break;case"IC-SIDE-NAVIGATION":t={navType:"side",parent:n};break;case"IC-PAGE-HEADER":t={navType:"page-header",parent:null};break}}return t};const W={XS:Number(S("--ic-breakpoint-xs").replace("px","")),S:Number(S("--ic-breakpoint-sm").replace("px","")),M:Number(S("--ic-breakpoint-md").replace("px","")),L:Number(S("--ic-breakpoint-lg").replace("px","")),XL:Number(S("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200};const X=(n,t)=>!!n&&!t;const q=({children:n},t)=>Array.from(n).some((n=>n.getAttribute("slot")===t));const H=(n,t,e)=>{if(n===undefined&&t!==n){e()}};const z=(n,t)=>{n.forEach((({prop:n,propName:e})=>{if(n===null||n===undefined){console.error(`No ${e} specified for ${t} component - prop '${e}' (web components) / '${J(e)}' (react) required`)}}))};const J=n=>n.toLowerCase().split("-").map(((n,t)=>t===0?n:`${n.substring(0,1).toUpperCase()}${n.substring(1)}`)).join("");const K=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const Q=n=>parseInt(n,16);const Y=n=>{const t=n.replace("#","").split("").map((n=>n.repeat(2)));return{r:Q(n.length===4?t[0]:n.slice(1,3)),g:Q(n.length===4?t[1]:n.slice(3,5)),b:Q(n.length===4?t[2]:n.slice(5)),a:1}};const Z=n=>{const t=n.slice(3,4).toLowerCase()==="a";const e=n.substring(t?5:4,n.length-1).replace(/ /g,"").split(",").map(Number);return{r:e[0],g:e[1],b:e[2],a:t?e[3]:1}};const _=({scrollWidth:n,clientWidth:t})=>n>t;const nn=()=>!!document.querySelector("ic-classification-banner:not([inline='true'])");const tn=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.addEventListener("reset",t)};const en=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.removeEventListener("reset",t)};const on=(n,t=16)=>`${1/t*parseInt(n)}rem`;const sn=(n,t)=>{if(!n){t.removeAttribute("disabled")}};const rn=()=>window.navigator.userAgent.toUpperCase().indexOf("MAC")>=0;const an=n=>{const t=n===null||n===void 0?void 0:n.slice(0,1).toLowerCase();if(t!=="#"&&t!=="r")return null;return t==="#"?Y(n):Z(n)};const cn=n=>n.charAt(0).toUpperCase()+n.slice(1);const ln=(n,t,e)=>{const o=n=>Array.from(n).some((n=>Array.isArray(e)?e.some((t=>n.slot===t)):n.slot===e));return o(n)||o(t)};const un=n=>!!n.closest(".ag-cell")&&!!n.closest(".ag-root");const dn=n=>{var t;return((t=n.parentElement)===null||t===void 0?void 0:t.tagName)===`${n.tagName}-GROUP`};const fn=(n,t)=>n.some((({type:n,addedNodes:e,removedNodes:o})=>n==="childList"&&ln(e,o,t)));const pn=(t,e,o)=>{if(fn(t,e)){n(o)}};const vn=n=>{var e,o,i,s,r;const a=(o=(e=n.parentElement)===null||e===void 0?void 0:e.closest(t))===null||o===void 0?void 0:o.theme;if(a&&a!=="inherit")return a;const c=(s=(i=n.parentElement)===null||i===void 0?void 0:i.closest("ic-theme"))===null||s===void 0?void 0:s.theme;if(c&&c!=="system")return c;return((r=window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"};const bn=/safari/i.test(window.navigator.userAgent)&&!/Edge/i.test(window.navigator.userAgent)&&!/chrome/i.test(window.navigator.userAgent);const mn=(n,t,e,o=false)=>{const u=e[t];if(!u){return}let d=n;if(d++>e.length){return}let f=t;if(An(u)){f=hn(f,o);f=gn(f,e);return mn(d,f,e,o)}else{switch(u.tagName){case l:case c:case a:case r:case s:case i:u.setFocus();break;default:u.focus()}return{newFocusAttemptCount:d,newFocusedElementIndex:f}}};const wn=(n,t)=>{var e;for(let o=0;o<t.length;o++){if(t[o]===(((e=n.shadowRoot)===null||e===void 0?void 0:e.activeElement)||document.activeElement)){return o}}return null};const hn=(n,t)=>t?n-=1:n+=1;const gn=(n,t)=>{if(n>t.length-1){return 0}else if(n<0){return t.length-1}return n};function xn(n,t,e,o,i){var s;let a=t;let c=wn(n,o)||e;if(((s=o[e])===null||s===void 0?void 0:s.tagName)===r){return{newFocusAttemptCount:a,newFocusedElementIndex:c,preventDefault:false}}c=hn(c,i);c=gn(c,o);a=0;const l=mn(a,c,o,i);if(l){c=l.newFocusedElementIndex;a=l.newFocusAttemptCount}return{newFocusAttemptCount:a,newFocusedElementIndex:c,preventDefault:true}}const yn=(n,t)=>{var e;let o=null;let i=null;if(n){o=n.querySelector("slot");o===null||o===void 0?void 0:o.addEventListener("slotchange",t);i=new MutationObserver((()=>{t()}));(e=V(n))===null||e===void 0?void 0:e.forEach((n=>{i===null||i===void 0?void 0:i.observe(n,{childList:true,subtree:true})}))}return{contentAreaSlot:o,contentAreaMutationObserver:i}};const An=n=>{if(!n){return true}const t=getComputedStyle(n).visibility==="hidden"||n.offsetHeight===0||n.hasAttribute("disabled")||n.tagName===c&&n.hasAttribute("single-expansion");const e=n.closest("ic-radio-option");return t||n.getAttribute("type")==="radio"&&!!e&&!(e.hasAttribute("selected")||n.tabIndex===0)};const In=n=>Array.from(n.querySelectorAll(`a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex="-1"]),\n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-context,\n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible="true"], ic-footer-link, ic-link, ic-navigation-button,\n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion, ic-date-input, ic-date-picker, ic-action-chip, ic-time-input`));export{vn as A,B,S as C,W as D,cn as E,V as F,F as G,C as H,d as I,E as J,b as K,O as L,G as M,L as N,dn as O,U as P,ln as Q,$ as R,u as S,_ as T,rn as U,M as V,A as W,I as X,g as Y,bn as Z,pn as a,un as b,H as c,an as d,T as e,D as f,R as g,K as h,q as i,N as j,tn as k,en as l,w as m,x as n,z as o,on as p,k as q,sn as r,X as s,j as t,yn as u,mn as v,In as w,xn as x,nn as y,v as z};
2
+ //# sourceMappingURL=p-b77b1e1f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["IcInformationStatus","IcBrandForegroundEnum","DARK_MODE_THRESHOLD","icInput","inheritAttributes","element","attributes","attributeObject","forEach","attr","value","getAttribute","removeAttribute","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","clearTimeout","setTimeout","renderHiddenInput","container","name","disabled","always","hasShadowDom","input","getHiddenInputElement","ownerDocument","createElement","type","classList","add","appendChild","Date","toISOString","Array","from","querySelectorAll","filter","el","parentElement","renderFileHiddenInput","multiple","accept","undefined","hidden","files","onchange","click","removeHiddenInput","_a","remove","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","isSlotUsed","trim","getBrandFromContext","brandFromEvent","getRootNode","host","blockColorParent","closest","IC_BLOCK_COLOR_COMPONENTS","Default","parentTag","tagName","toLowerCase","IC_BLOCK_COLOR_EXCEPTIONS","includes","IC_FIXED_COLOR_COMPONENTS","contains","Dark","Light","isMobileOrTablet","navigator","maxTouchPoints","test","userAgent","handleHiddenFormButtonClick","form","button","hiddenFormButtonId","hiddenFormButton","document","querySelector","setAttribute","_b","style","display","formAction","_c","formaction","formEnctype","_d","formenctype","formMethod","_e","formmethod","formNoValidate","_f","formnovalidate","formTarget","_g","formtarget","isEmptyString","length","isPropDefined","prop","getLabelFromValue","options","valueField","labelField","ungroupedOptions","map","option","children","push","matchingValue","find","getFilteredMenuOptions","searchString","label","lowerSearchString","getOptionsWithoutGroupTitlesCount","optionsWithoutGroupTitles","deviceSizeMatches","size","window","matchMedia","matches","getCurrentDeviceSize","DEVICE_SIZES","S","M","L","XL","UNDEFINED","getCssProperty","cssVar","getComputedStyle","documentElement","getPropertyValue","getBrandColorBrightness","parseInt","getBrandForegroundAppearance","brightness","getSlot","slotHasContent","getSlotContent","slot","getSlotElements","slotContent","firstElementChild","elements","assignedElements","childNodes","getNavItemParentDetails","navType","parent","XS","Number","replace","hasValidationStatus","status","slotName","some","child","onComponentPropUndefinedChange","oldValue","newValue","callback","onComponentRequiredPropUndefined","props","component","propName","console","error","kebabToCamelCase","kebabCase","split","word","index","substring","toUpperCase","join","checkResizeObserver","callbackFn","ResizeObserver","hex2dec","v","hexToRgba","hex","hexChars","char","repeat","r","slice","g","b","a","rgbaStrToObj","rgbaStr","isRGBA","rgbValues","elementOverflowsX","scrollWidth","clientWidth","hasClassificationBanner","addFormResetListener","addEventListener","removeFormResetListener","removeEventListener","pxToRem","px","base","removeDisabledFalse","isMacDevice","indexOf","convertToRGBA","color","firstChar","capitalize","text","charAt","checkSlotInChildMutations","addedNodes","removedNodes","hasSlot","nodeList","node","isArray","isElInAGGrid","isSlottedInGroup","hasDynamicChildSlots","mutationList","slotNames","renderDynamicChildSlots","ref","forceUpdate","getElementInheritedTheme","blockParentTheme","theme","wrapperTheme","call","isSafari","focusElement","focusAttemptCount","focusedElementIndex","interactiveElementList","shiftKey","newFocusAttemptCount","newFocusedElementIndex","shouldSkipElement","getFocusIndexBasedOnShiftKey","getLoopedNextFocusIndexIfLastElement","IC_ACCORDION","IC_ACCORDION_GROUP","IC_CHECKBOX","IC_SEARCH_BAR","IC_TAB_CONTEXT","IC_TEXT_FIELD","setFocus","focus","getFocusedElementIndex","i","activeElement","handleFocusTrapTabKeyPress","preventDefault","focusElementResult","refreshInteractiveElementsOnSlotChange","contentWrapper","getInteractiveElements","contentAreaSlot","contentAreaMutationObserver","MutationObserver","observe","childList","subtree","isHidden","visibility","offsetHeight","hasAttribute","radioEl","tabIndex","slottedInteractiveElements"],"sources":["src/utils/types.ts","src/utils/helpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport type IcFocusableComponents =\n | HTMLIcBreadcrumbElement\n | HTMLIcButtonElement\n | HTMLIcCardVerticalElement\n | HTMLIcCheckboxElement\n | HTMLIcChipElement\n | HTMLIcLinkElement\n | HTMLIcNavigationButtonElement\n | HTMLIcNavigationGroupElement\n | HTMLIcNavigationItemElement\n | HTMLIcRadioOptionElement\n | HTMLIcSearchBarElement\n | HTMLIcSelectElement\n | HTMLIcSwitchElement\n | HTMLIcTabElement\n | HTMLIcTextFieldElement;\n\nexport type IcStatusVariants =\n | \"neutral\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\"\n | \"ai\";\n\nexport enum IcInformationStatus {\n Warning = \"warning\",\n Error = \"error\",\n Success = \"success\",\n}\n\nexport type IcSizes = \"medium\" | \"large\" | \"small\";\n\nexport type IcSizesNoLarge = \"medium\" | \"small\";\n\nexport type IcInformationStatusOrEmpty = \"warning\" | \"error\" | \"success\" | \"\";\n\nexport type IcNavType = \"side\" | \"top\" | \"page-header\";\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type IcAutocompleteTypes =\n | \"on\"\n | \"off\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level4\"\n | \"address-level3\"\n | \"address-level2\"\n | \"address-level1\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tel-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\nexport type IcAlignment = \"left\" | \"center\" | \"full-width\";\n\nexport enum IcBrandForegroundEnum {\n Default = \"default\",\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport type IcThemeMode = \"dark\" | \"light\" | \"inherit\";\n\nexport type IcBrandForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcBrandForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcBrand = {\n mode: IcBrandForeground;\n color: IcColorRGB;\n};\n\nexport type IcAdditionalFieldTypes = \"static\" | \"dynamic\";\n\nexport type IcColorRGB = {\n r: number;\n g: number;\n b: number;\n};\n\nexport type IcColorRGBA = IcColorRGB & {\n a: number;\n};\n\nexport type IcActivationTypes = \"automatic\" | \"manual\";\n\nexport type IcAutocorrectStates = \"on\" | \"off\";\n\nexport type IcNavParentDetails = {\n navType: IcNavType | \"\";\n parent: HTMLElement | null;\n};\n\nexport type IcTypographyVariants =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"subtitle-large\"\n | \"subtitle-small\"\n | \"body\"\n | \"label\"\n | \"label-uppercase\"\n | \"caption\"\n | \"caption-uppercase\"\n | \"code-large\"\n | \"code-small\"\n | \"code-extra-small\"\n | \"badge\"\n | \"badge-small\";\n\n/**\n * @interface IcMenuOption\n * Set \"label\" and \"value\" props to use as the option's label and value.\n * Alternatively, custom names for these props can be used e.g. by setting the \"labelField\" and \"valueField\" props on the relevant component.\n *\n * Any props supplied to the \"htmlProps\" object will be spread onto the option's underlying <li> element.\n */\nexport interface IcMenuOption {\n description?: string;\n disabled?: boolean;\n recommended?: boolean;\n children?: IcMenuOption[];\n loading?: boolean;\n timedOut?: boolean;\n [key: string]: any;\n element?: {\n component: any;\n ariaLabel: string;\n };\n icon?: any;\n hideLabel?: boolean;\n htmlProps?: Record<string, any>;\n}\n\nexport type IcSearchMatchPositions = \"start\" | \"anywhere\";\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcRequiredPropsTypes =\n | string\n | boolean\n | number\n | HTMLElement\n | IcMenuOption[]\n | undefined;\n\nexport type IcPropObject = { prop: IcRequiredPropsTypes; propName: string };\n\nexport type IcRelatedTarget = EventTarget | undefined;\n\nexport type IcOrientation = \"horizontal\" | \"vertical\";\n\nexport type IcEmphasisType = \"filled\" | \"outlined\";\n\nexport interface IcValueEventDetail {\n value: string;\n keyPressed?: string;\n}\n\nexport interface IcMultiValueEventDetail {\n value: string | string[] | null;\n keyPressed?: string;\n}\n\nexport interface IcBlurEventDetail {\n relatedTarget: IcRelatedTarget | null;\n}\n\nexport type IcSelectTypes = \"single\" | \"multi\";\n\nexport type IcSelectMethodTypes = \"auto\" | \"manual\";\n\nexport type IcDeviceSizes = 0 | 576 | 768 | 992 | 1200;\n\ntype RGB = `rgb(${string})`;\ntype RGBA = `rgba(${string})`;\ntype HEX = `#${string}`;\n\nexport type IcColor = RGB | RGBA | HEX;\n\nexport type IcIconPlacementOptions = \"left\" | \"right\" | \"top\";\n\nexport type IcButtonTooltipPlacement = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport type IcThemeSettings = \"dark\" | \"light\" | \"system\";\n\n// Matches HTML aria-live attribute options\nexport type IcAriaLive = \"polite\" | \"assertive\" | \"off\";\n\n// Includes 'default' option for when the aria-live value is handled within a component\nexport type IcValidationAriaLive = \"default\" | \"polite\" | \"assertive\" | \"off\";\n\nexport type IcPosition = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport type IcCardDensity = \"default\" | \"spacious\";\n","import { EventEmitter, forceUpdate } from \"@stencil/core\";\nimport {\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcBrandForegroundNoDefault,\n IcCallbackFunctionNoReturn,\n IcFocusableComponents,\n IcInformationStatusOrEmpty,\n IcMenuOption,\n IcNavParentDetails,\n IcPropObject,\n IcColorRGBA,\n IcDeviceSizes,\n IcColor,\n IcThemeMode,\n} from \"./types\";\nimport {\n IC_ACCORDION,\n IC_ACCORDION_GROUP,\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_CHECKBOX,\n IC_FIXED_COLOR_COMPONENTS,\n IC_SEARCH_BAR,\n IC_TAB_CONTEXT,\n IC_TEXT_FIELD,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\nconst icInput = \"ic-input\";\n\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (\n theEnum: Record<string, string | number>\n): string[] => {\n const arr: string[] = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val as string;\n arr.push(str);\n }\n });\n return arr;\n};\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: string } => {\n const attributeObject: { [key: string]: string } = {};\n\n attributes.forEach((attr) => {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param container The element where the input will be added\n * @param value The value of the input\n * @param name The name of the input\n * @param disabled If true, the input is disabled\n * @param always Add a hidden input even if the container does not use Shadow\n */\nexport const renderHiddenInput = (\n container: HTMLElement,\n value?: string | Date | null,\n name?: string,\n disabled = false,\n always = true\n): void => {\n if (name && (always || hasShadowDom(container))) {\n let input = getHiddenInputElement(container);\n\n if (!input) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value instanceof Date ? value.toISOString() : value || \"\";\n }\n};\n\nconst getHiddenInputElement = (container: HTMLElement) =>\n Array.from(\n container.querySelectorAll<HTMLInputElement>(`input.${icInput}`)\n ).filter((el) => container === el.parentElement)[0];\n\n/**\n * This method is used to add a hidden file input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\n * @param disabled If true, the input is disabled\n * @param accept A string of the accepted files\n * @param name The name of the input\n * @param value The value of the input\n */\nexport const renderFileHiddenInput = (\n event: EventEmitter,\n container: HTMLElement,\n multiple: boolean,\n disabled: boolean,\n accept?: string,\n name?: string,\n value?: FileList\n): void => {\n if (name !== undefined && hasShadowDom(container)) {\n let input = getHiddenInputElement(container);\n\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.disabled = disabled;\n\n if (value) input.files = value;\n if (accept) input.accept = accept;\n\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n getHiddenInputElement(container)?.remove();\n};\n\nexport const hasShadowDom = (el: HTMLElement | null | undefined): boolean =>\n !!el && !!el.shadowRoot && !!el.attachShadow;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n el: HTMLElement,\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${\n isSlotUsed(el, \"helper-text\") || helperText\n ? getInputHelperTextID(inputId)\n : \"\"\n } ${validationText ? getInputValidationTextID(inputId) : \"\"}`.trim();\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcBrandForeground depending on the context\n */\nexport const getBrandFromContext = (\n el: Element,\n brandFromEvent: IcBrandForeground | null = null\n): IcBrandForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement?.closest(IC_BLOCK_COLOR_COMPONENTS);\n\n if (!blockColorParent) return IcBrandForegroundEnum.Default;\n\n const parentTag = blockColorParent.tagName.toLowerCase();\n\n if (\n IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(el.tagName.toLowerCase())\n ) {\n return IcBrandForegroundEnum.Default;\n } else if (\n brandFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return brandFromEvent;\n } else if (\n blockColorParent.classList.contains(\n `${parentTag}-${IcBrandForegroundEnum.Dark}`\n ) ||\n blockColorParent.classList.contains(IcBrandForegroundEnum.Dark)\n ) {\n return IcBrandForegroundEnum.Dark;\n } else {\n return IcBrandForegroundEnum.Light;\n }\n};\n\n/**\n * Checks if the current device is a mobile or tablet device.\n * @returns {boolean} Returns true if the device is a mobile or tablet device, otherwise returns false.\n */\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator && \"userAgent\" in navigator\n ? navigator.maxTouchPoints > 0 &&\n /iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n : false;\n\n/**\n * Will create a button within the lightDOM which interacts with the form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - form element to associate button with\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement | null,\n button: HTMLIcButtonElement\n): void => {\n const hiddenFormButtonId =\n button.type === \"submit\" || button.type === \"reset\"\n ? `hidden-form-${button.type}-button`\n : \"hidden-form-button\";\n\n const hiddenFormButton =\n document.querySelector<HTMLButtonElement>(`#${hiddenFormButtonId}`) ??\n document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type ?? \"button\");\n hiddenFormButton.id = hiddenFormButtonId;\n hiddenFormButton.style.display = \"none\";\n\n hiddenFormButton.formAction = button.formaction ?? \"\";\n hiddenFormButton.formEnctype = button.formenctype ?? \"\";\n hiddenFormButton.formMethod = button.formmethod ?? \"\";\n hiddenFormButton.formNoValidate = button.formnovalidate ?? false;\n hiddenFormButton.formTarget = button.formtarget ?? \"\";\n\n form?.appendChild(hiddenFormButton);\n hiddenFormButton.click();\n};\n\nexport const isEmptyString = (value?: string): boolean =>\n !value || value.trim().length === 0;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop?: string): string | undefined =>\n prop !== undefined ? prop : undefined;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[],\n valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param searchString - string used to filter the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n searchString: string,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return label.includes(lowerSearchString);\n });\n\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (\n options: IcMenuOption[]\n): number => {\n const optionsWithoutGroupTitles: IcMenuOption[] = [];\n\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n } else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n\n return optionsWithoutGroupTitles.length;\n};\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string =>\n getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-brand-text-color\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getBrandColorBrightness = (): number =>\n (parseInt(getCssProperty(\"--ic-brand-color-primary-r\")) * 299 +\n parseInt(getCssProperty(\"--ic-brand-color-primary-g\")) * 587 +\n parseInt(getCssProperty(\"--ic-brand-color-primary-b\")) * 114) /\n 1000;\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n * @param brightness - Optional custom brightness value. Defaults to `getBrandColorBrightness`\n */\nexport const getBrandForegroundAppearance = (\n brightness = getBrandColorBrightness()\n): IcBrandForegroundNoDefault =>\n brightness > DARK_MODE_THRESHOLD\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n\nexport const getSlot = (\n element: HTMLElement | undefined,\n name: string\n): Element | null => element?.querySelector(`[slot=\"${name}\"]`) || null;\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n return slot ? getSlotElements(slot) : null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] | null => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent === null) return [slot];\n\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n};\n\nexport const getNavItemParentDetails = ({\n parentElement,\n}: HTMLElement): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n if (parentElement) {\n switch (parentElement.tagName) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: parentElement };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: parentElement };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n }\n\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(\n getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 0\n S: Number(\n getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 576\n M: Number(\n getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 768\n L: Number(\n getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 992\n XL: Number(\n getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status?: IcInformationStatusOrEmpty,\n disabled?: boolean\n): boolean => !!status && !disabled;\n\nexport const isSlotUsed = (\n { children }: HTMLElement,\n slotName: string\n): boolean =>\n Array.from(children).some((child) => child.getAttribute(\"slot\") === slotName);\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n props.forEach(({ prop, propName }) => {\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n });\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string =>\n kebabCase\n .toLowerCase()\n .split(\"-\")\n .map((word, index) =>\n index === 0\n ? word\n : `${word.substring(0, 1).toUpperCase()}${word.substring(1)}`\n )\n .join(\"\");\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nconst hex2dec = (v: string) => parseInt(v, 16);\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n const hexChars = hex\n .replace(\"#\", \"\")\n .split(\"\")\n .map((char) => char.repeat(2));\n return {\n r: hex2dec(hex.length === 4 ? hexChars[0] : hex.slice(1, 3)),\n g: hex2dec(hex.length === 4 ? hexChars[1] : hex.slice(3, 5)),\n b: hex2dec(hex.length === 4 ? hexChars[2] : hex.slice(5)),\n a: 1,\n };\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const isRGBA = rgbaStr.slice(3, 4).toLowerCase() === \"a\";\n const rgbValues = rgbaStr\n .substring(isRGBA ? 5 : 4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\")\n .map(Number);\n return {\n r: rgbValues[0],\n g: rgbValues[1],\n b: rgbValues[2],\n a: isRGBA ? rgbValues[3] : 1,\n };\n};\n\nexport const elementOverflowsX = ({\n scrollWidth,\n clientWidth,\n}: HTMLElement): boolean => scrollWidth > clientWidth;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.addEventListener(\"reset\", callbackFn);\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.removeEventListener(\"reset\", callbackFn);\n};\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\n/**\n * Removes the disabled attribute from the provided element when its value is set to false.\n * This effectively makes it null, to not confuse screen readers that cannot interpret the false value\n */\nexport const removeDisabledFalse = (\n disabled: boolean | undefined,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean =>\n window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n\nexport const isNumeric = (value: string): boolean => /^-?\\d+$/.test(value);\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n\nexport const convertToRGBA = (color: IcColor): IcColorRGBA | null => {\n const firstChar = color?.slice(0, 1).toLowerCase();\n\n if (firstChar !== \"#\" && firstChar !== \"r\") return null;\n return firstChar === \"#\" ? hexToRgba(color) : rgbaStrToObj(color);\n};\n\nexport const capitalize = (text: string): string =>\n text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const checkSlotInChildMutations = (\n addedNodes: NodeList,\n removedNodes: NodeList,\n slotName: string | string[]\n): boolean => {\n const hasSlot = (nodeList: NodeList) =>\n Array.from(nodeList).some((node) =>\n Array.isArray(slotName)\n ? slotName.some((name) => (node as Element).slot === name)\n : (node as Element).slot === slotName\n );\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\n\nexport const isElInAGGrid = (el: HTMLElement): boolean =>\n !!el.closest(\".ag-cell\") && !!el.closest(\".ag-root\");\n\n/**\n * Checks if the component is slotted in its relevant 'group' component\n * @param component - the component to check\n */\nexport const isSlottedInGroup = (component: HTMLElement): boolean =>\n component.parentElement?.tagName === `${component.tagName}-GROUP`;\n\nexport const hasDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[]\n): boolean =>\n mutationList.some(\n ({ type, addedNodes, removedNodes }) =>\n type === \"childList\" &&\n checkSlotInChildMutations(addedNodes, removedNodes, slotNames)\n );\n\nexport const renderDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[],\n ref: any\n): void => {\n if (hasDynamicChildSlots(mutationList, slotNames)) {\n forceUpdate(ref);\n }\n};\n\nexport const getElementInheritedTheme = (el: HTMLElement): IcThemeMode => {\n const blockParentTheme =\n el.parentElement?.closest<HTMLIcTopNavigationElement>(\n IC_BLOCK_COLOR_COMPONENTS\n )?.theme;\n\n if (blockParentTheme && blockParentTheme !== \"inherit\")\n return blockParentTheme;\n\n const wrapperTheme = el.parentElement?.closest(\"ic-theme\")?.theme;\n\n if (wrapperTheme && wrapperTheme !== \"system\") return wrapperTheme;\n\n return window.matchMedia?.(\"(prefers-color-scheme: dark)\").matches\n ? \"dark\"\n : \"light\";\n};\n\nexport const isSafari =\n /safari/i.test(window.navigator.userAgent) &&\n !/Edge/i.test(window.navigator.userAgent) &&\n !/chrome/i.test(window.navigator.userAgent);\n\n/**\n * Focuses the provided element, or the next focusable element if it should be skipped. Used for focus trapping.\n * @param focusAttemptCount - number of focus attempts that have been made\n * @param focusedElementIndex - current focused element index\n * @param interactiveElementList - list of interactive elements\n * @param shiftKey - whether the shift key is pressed\n */\nexport const focusElement = (\n focusAttemptCount: number,\n focusedElementIndex: number,\n interactiveElementList: HTMLElement[],\n shiftKey = false\n):\n | { newFocusAttemptCount: number; newFocusedElementIndex: number }\n | undefined => {\n const element = interactiveElementList[focusedElementIndex];\n\n if (!element) {\n return;\n }\n\n let newFocusAttemptCount = focusAttemptCount;\n\n if (newFocusAttemptCount++ > interactiveElementList.length) {\n return;\n }\n\n let newFocusedElementIndex = focusedElementIndex;\n\n if (shouldSkipElement(element)) {\n newFocusedElementIndex = getFocusIndexBasedOnShiftKey(\n newFocusedElementIndex,\n shiftKey\n );\n newFocusedElementIndex = getLoopedNextFocusIndexIfLastElement(\n newFocusedElementIndex,\n interactiveElementList\n );\n return focusElement(\n newFocusAttemptCount,\n newFocusedElementIndex,\n interactiveElementList,\n shiftKey\n );\n } else {\n switch (element.tagName) {\n case IC_ACCORDION:\n case IC_ACCORDION_GROUP:\n case IC_CHECKBOX:\n case IC_SEARCH_BAR:\n case IC_TAB_CONTEXT:\n case IC_TEXT_FIELD:\n (element as IcFocusableComponents).setFocus();\n break;\n default:\n element.focus();\n }\n return { newFocusAttemptCount, newFocusedElementIndex };\n }\n};\n\n/**\n * Gets the index of the currently focused element. Used for focus trapping.\n * @param el - host element of the component\n * @param interactiveElementList - list of interactive elements\n */\nexport const getFocusedElementIndex = (\n el: HTMLElement,\n interactiveElementList: HTMLElement[]\n) => {\n for (let i = 0; i < interactiveElementList.length; i++) {\n if (\n (interactiveElementList[i] as HTMLElement) ===\n (el.shadowRoot?.activeElement || document.activeElement)\n ) {\n return i;\n }\n }\n return null;\n};\n\n/**\n * Gets the next focusable element index based on whether the shift key is pressed. Used for focus trapping.\n * @param focusedElementIndex - current focused element index\n * @param shiftKey - whether the shift key is pressed\n */\nexport const getFocusIndexBasedOnShiftKey = (\n focusedElementIndex: number,\n shiftKey: boolean\n) => (shiftKey ? (focusedElementIndex -= 1) : (focusedElementIndex += 1));\n\n/**\n * Gets the next focusable element index, looping back to the start or end if necessary. Used for focus trapping.\n * @param focusedElementIndex - current focused element index\n * @param interactiveElementList - list of interactive elements\n */\nexport const getLoopedNextFocusIndexIfLastElement = (\n focusedElementIndex: number,\n interactiveElementList: HTMLElement[]\n): number => {\n if (focusedElementIndex > interactiveElementList.length - 1) {\n return 0;\n } else if (focusedElementIndex < 0) {\n return interactiveElementList.length - 1;\n }\n return focusedElementIndex;\n};\n\n/**\n * Handles tab key press for focus trapping.\n * @param el - host element of the component\n * @param focusAttemptCount - number of focus attempts that have been made\n * @param focusedElementIndex - current focused element index\n * @param interactiveElementList - list of interactive elements\n * @param shiftKey - whether the shift key is pressed\n */\nexport function handleFocusTrapTabKeyPress(\n el: HTMLElement,\n focusAttemptCount: number,\n focusedElementIndex: number,\n interactiveElementList: HTMLElement[],\n shiftKey: boolean\n): {\n newFocusAttemptCount: number;\n newFocusedElementIndex: number;\n preventDefault: boolean;\n} {\n let newFocusAttemptCount = focusAttemptCount;\n\n let newFocusedElementIndex =\n getFocusedElementIndex(el, interactiveElementList) || focusedElementIndex;\n\n if (interactiveElementList[focusedElementIndex]?.tagName === IC_SEARCH_BAR) {\n return {\n newFocusAttemptCount,\n newFocusedElementIndex,\n preventDefault: false,\n };\n }\n\n newFocusedElementIndex = getFocusIndexBasedOnShiftKey(\n newFocusedElementIndex,\n shiftKey\n );\n newFocusedElementIndex = getLoopedNextFocusIndexIfLastElement(\n newFocusedElementIndex,\n interactiveElementList\n );\n\n newFocusAttemptCount = 0;\n const focusElementResult = focusElement(\n newFocusAttemptCount,\n newFocusedElementIndex,\n interactiveElementList,\n shiftKey\n );\n if (focusElementResult) {\n newFocusedElementIndex = focusElementResult.newFocusedElementIndex;\n newFocusAttemptCount = focusElementResult.newFocusAttemptCount;\n }\n\n return { newFocusAttemptCount, newFocusedElementIndex, preventDefault: true };\n}\n\n/**\n * Sets up listener and mutation observer to refresh interactive elements on slot changes. Used for focus trapping.\n * @param contentWrapper - content wrapper element\n * @param getInteractiveElements - function to get interactive elements\n */\nexport const refreshInteractiveElementsOnSlotChange = (\n contentWrapper: HTMLElement | null,\n getInteractiveElements: () => void\n): {\n contentAreaSlot: HTMLSlotElement | null;\n contentAreaMutationObserver: MutationObserver | null;\n} => {\n let contentAreaSlot: HTMLSlotElement | null = null;\n let contentAreaMutationObserver: MutationObserver | null = null;\n\n if (contentWrapper) {\n contentAreaSlot = contentWrapper.querySelector(\"slot\");\n\n // Detect changes to slotted elements\n contentAreaSlot?.addEventListener(\"slotchange\", getInteractiveElements);\n\n contentAreaMutationObserver = new MutationObserver(() => {\n getInteractiveElements();\n });\n\n // Detect changes to children of slotted elements\n getSlotElements(contentWrapper)?.forEach((el) => {\n contentAreaMutationObserver?.observe(el, {\n childList: true,\n subtree: true,\n });\n });\n }\n\n return { contentAreaSlot, contentAreaMutationObserver };\n};\n\n/**\n * Removes listener and disconnects mutation observer for slot changes. Used for focus trapping.\n * @param contentAreaSlotMutationObserver - mutation observer for content area slot\n * @param contentAreaSlot - content area slot element\n * @param getInteractiveElements - function to get interactive elements\n */\nexport const removeInteractiveElementSlotChangeListener = (\n contentAreaSlot: HTMLSlotElement | null | undefined,\n contentAreaSlotMutationObserver: MutationObserver | null,\n getInteractiveElements: () => void\n) => {\n if (contentAreaSlot) {\n contentAreaSlot.removeEventListener(\"slotchange\", getInteractiveElements);\n contentAreaSlotMutationObserver?.disconnect();\n }\n};\n\n/**\n * Determines whether an element should be skipped when focusing interactive elements. Used for focus trapping.\n * @param element - element to check\n */\nexport const shouldSkipElement = (element: HTMLElement): boolean => {\n if (!element) {\n return true;\n }\n\n const isHidden =\n getComputedStyle(element).visibility === \"hidden\" ||\n element.offsetHeight === 0 ||\n element.hasAttribute(\"disabled\") ||\n (element.tagName === IC_ACCORDION_GROUP &&\n element.hasAttribute(\"single-expansion\"));\n\n const radioEl = element.closest(\"ic-radio-option\");\n\n return (\n isHidden ||\n (element.getAttribute(\"type\") === \"radio\" &&\n !!radioEl &&\n !(radioEl.hasAttribute(\"selected\") || element.tabIndex === 0))\n );\n};\n\n/**\n * Gets all interactive elements slotted within a component. Used for focus trapping.\n * @param el - host element of the component\n */\nexport const slottedInteractiveElements = (el: HTMLElement): HTMLElement[] =>\n Array.from(\n el.querySelectorAll(\n `a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex=\"-1\"]),\n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-context,\n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible=\"true\"], ic-footer-link, ic-link, ic-navigation-button,\n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion, ic-date-input, ic-date-picker, ic-action-chip, ic-time-input`\n )\n );\n"],"mappings":"oIA0BYA,GAAZ,SAAYA,GACVA,EAAA,qBACAA,EAAA,iBACAA,EAAA,oBACD,EAJD,CAAYA,MAAmB,K,IA0EnBC,GAAZ,SAAYA,GACVA,EAAA,qBACAA,EAAA,eACAA,EAAA,gBACD,EAJD,CAAYA,MAAqB,KCxEjC,MAAMC,EAAsB,SAC5B,MAAMC,EAAU,W,MAyBHC,EAAoB,CAC/BC,EACAC,EAAuB,MAEvB,MAAMC,EAA6C,G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ClBE,EAAkBF,EAAe1L,cAAc,QAG/C4L,IAAe,MAAfA,SAAe,SAAfA,EAAiB/D,iBAAiB,aAAc8D,GAEhDE,EAA8B,IAAIC,kBAAiB,KACjDH,GAAwB,KAI1BpO,EAAA2G,EAAgBwH,MAAe,MAAAnO,SAAA,SAAAA,EAAEjD,SAASsC,IACxCiP,IAA2B,MAA3BA,SAA2B,SAA3BA,EAA6BE,QAAQnP,EAAI,CACvCoP,UAAW,KACXC,QAAS,MACT,G,CAIN,MAAO,CAAEL,kBAAiBC,8BAA6B,EAwBlD,MAAMrB,GAAqBrQ,IAChC,IAAKA,EAAS,CACZ,OAAO,I,CAGT,MAAM+R,EACJ3I,iBAAiBpJ,GAASgS,aAAe,UACzChS,EAAQiS,eAAiB,GACzBjS,EAAQkS,aAAa,aACpBlS,EAAQ0E,UAAY+L,GACnBzQ,EAAQkS,aAAa,oBAEzB,MAAMC,EAAUnS,EAAQsE,QAAQ,mBAEhC,OACEyN,GACC/R,EAAQM,aAAa,UAAY,WAC9B6R,KACAA,EAAQD,aAAa,aAAelS,EAAQoS,WAAa,EAAG,E,MAQvDC,GAA8B5P,GACzCJ,MAAMC,KACJG,EAAGF,iBACD,yc","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as o,H as i,g as n}from"./p-8e4e97b4.js";import{r}from"./p-b77b1e1f.js";import"./p-6215e2ae.js";const s='/*! 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)}:host(.ic-toggle-button-group-hide-outline){--ic-toggle-button-unselected-border:transparent;--ic-toggle-button-unselected-border-disabled:transparent;--ic-toggle-button-unselected-border-monochrome:transparent;--ic-toggle-button-unselected-border-disabled-monochrome:transparent}@media (prefers-reduced-motion: reduce){:host(:focus){transition:none}}';const l=s;const a="IC-TOGGLE-BUTTON-GROUP";const d=class{constructor(o){t(this,o);this.icChange=e(this,"icChange",7);this.lastKeyPressed={key:null,shift:false};this.externallySetActiveToggle=null;this.accessibleLabel="Toggle button group";this.disabled=false;this.fullWidth=false;this.loading=false;this.monochrome=false;this.outline=true;this.selectMethod="manual";this.selectType="single";this.size="medium";this.theme="inherit";this.tooltipPlacement="bottom";this.variant="default";this.keyListener=t=>{this.lastKeyPressed={key:t.key,shift:t.shiftKey}};this.handleHostFocus=({target:t,relatedTarget:e})=>{var o;if(this.disabled){t===null||t===void 0?void 0:t.blur();return}if(this.loading)return;const i=t;const n=e;const r=Array.from((i===null||i===void 0?void 0:i.querySelectorAll("ic-toggle-button"))||[]);const s=r.every((t=>!t.checked));const{shift:l}=this.lastKeyPressed;if((s||this.selectType!=="single")&&!l||s&&l&&(n===null||n===void 0?void 0:n.tagName)==a){(o=r[0])===null||o===void 0?void 0:o.focus()}else if(!l||(n===null||n===void 0?void 0:n.tagName)==a){r.filter((t=>t.checked))[0].focus()}};this.handleKeyDown=({key:t})=>{if(t!=="ArrowDown"&&t!=="ArrowRight"&&t!=="ArrowLeft"&&t!=="ArrowUp")return;const e=this.getAllToggleButtons();let o;if(this.externallySetActiveToggle){o=e[this.getNextItemToSelect(e.indexOf(e.filter((t=>t===this.externallySetActiveToggle))[0]),t==="ArrowDown"||t==="ArrowRight")]}else{o=e[this.getNextItemToSelect(e.indexOf(e.filter((t=>t===document.activeElement))[0]),t==="ArrowDown"||t==="ArrowRight")]}if(this.selectMethod==="auto"){o.checked=true;this.selectHandler(new CustomEvent("icToggleChecked",{detail:{checked:o.checked}}),o)}else{o.focus()}};this.getNextItemToSelect=(t,e)=>{const o=this.getAllToggleButtons();const i=o.length-1;if(t<1){t=0}let n=e?t+1:t-1;if(n<0){n=i}else if(n>i){n=0}if(o[n].disabled){n=this.getNextItemToSelect(n,e)}return n};this.getAllToggleButtons=()=>Array.from(this.el.querySelectorAll("ic-toggle-button"))}watchDisabledHandler(){this.getAllToggleButtons().forEach((t=>{t.disabled=this.disabled}));r(this.disabled,this.el)}watchFullWidthHandler(){this.getAllToggleButtons().forEach((t=>{t.fullWidth=this.fullWidth}))}watchLoadingHandler(){this.getAllToggleButtons().forEach((t=>{t.loading=this.loading}))}watchMonochromeHandler(){this.getAllToggleButtons().forEach((t=>{t.monochrome=this.monochrome}))}watchOutlineHandler(){this.getAllToggleButtons().forEach((t=>{t.outline=this.outline}))}watchSizeHandler(){this.getAllToggleButtons().forEach((t=>{t.size=this.size}))}watchThemeHandler(){this.getAllToggleButtons().forEach((t=>{t.theme=this.theme}))}watchTooltipPlacementHandler(){this.getAllToggleButtons().forEach((t=>{t.tooltipPlacement=this.tooltipPlacement}))}watchVariantHandler(){this.getAllToggleButtons().forEach((t=>{t.variant=this.variant}))}selectHandler(t,e){const o=this.getAllToggleButtons();let i=t.target;if(e)e.focus();if(this.selectType==="single"){if(!i&&e){i=e}o.forEach((t=>{if(t.id!==i.id&&t.checked){t.checked=false}}));this.icChange.emit({checked:t.detail.checked,selectedOption:i})}else{const t=o.filter((t=>t.checked&&!t.disabled));this.icChange.emit({checked:t.map((t=>t.checked)),toggledOptions:t.map((t=>({toggleButton:t}))),selectedOption:i})}}async setActiveToggle(t){this.externallySetActiveToggle=t}componentWillLoad(){if(this.selectType==="multi")this.selectMethod="manual";document.addEventListener("keydown",this.keyListener);r(this.disabled,this.el)}componentDidLoad(){this.getAllToggleButtons().forEach(((t,e)=>{var o,i,n;const r=(n=(i=(o=t.shadowRoot)===null||o===void 0?void 0:o.querySelector("ic-button"))===null||i===void 0?void 0:i.shadowRoot)===null||n===void 0?void 0:n.querySelector("button");if(r){const t=r.getAttribute("aria-label");const e=t?`${t}, `:"";r.setAttribute("aria-label",`${e}${this.accessibleLabel}`)}t.id=e.toString();t.tabIndex=-1;t.addEventListener("keydown",(t=>{this.handleKeyDown(t)}));t.classList.add("expand-toggle-group-child")}))}disconnectedCallback(){document===null||document===void 0?void 0:document.removeEventListener("keydown",this.keyListener)}render(){const{accessibleLabel:t,disabled:e,fullWidth:n,loading:r,monochrome:s,outline:l,theme:a}=this;return o(i,{key:"1238ec0b93b309a3945791eff6f847fb10b0abf5",role:"group","aria-label":t,tabindex:e?-1:0,class:{"ic-toggle-button-group-disabled":e,"ic-toggle-button-group-full-width":n,"ic-toggle-button-group-loading":r,"ic-toggle-button-group-monochrome":s,"ic-toggle-button-group-hide-outline":!l,[`ic-theme-${a}`]:a!=="inherit"},onFocus:this.handleHostFocus},o("slot",{key:"6dfd004b9e0c386362d8172334dfca2f1e6274fc"}))}get el(){return n(this)}static get watchers(){return{disabled:["watchDisabledHandler"],fullWidth:["watchFullWidthHandler"],loading:["watchLoadingHandler"],monochrome:["watchMonochromeHandler"],outline:["watchOutlineHandler"],size:["watchSizeHandler"],theme:["watchThemeHandler"],tooltipPlacement:["watchTooltipPlacementHandler"],variant:["watchVariantHandler"]}}};d.style=l;export{d as ic_toggle_button_group};
2
+ //# sourceMappingURL=p-b997ad5e.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icToggleButtonGroupCss","IcToggleButtonGroupStyle0","TOGGLE_GROUP","ToggleButtonGroup","constructor","hostRef","this","lastKeyPressed","key","shift","externallySetActiveToggle","accessibleLabel","disabled","fullWidth","loading","monochrome","outline","selectMethod","selectType","size","theme","tooltipPlacement","variant","keyListener","ev","shiftKey","handleHostFocus","target","relatedTarget","blur","el","relEl","toggleButtons","Array","from","querySelectorAll","noToggleButtonsChecked","every","checked","tagName","_a","focus","filter","handleKeyDown","toggleButtonOptions","getAllToggleButtons","targetToggle","getNextItemToSelect","indexOf","document","activeElement","selectHandler","CustomEvent","detail","currentItem","movingDown","numToggles","length","nextItem","watchDisabledHandler","forEach","removeDisabledFalse","watchFullWidthHandler","watchLoadingHandler","watchMonochromeHandler","watchOutlineHandler","watchSizeHandler","watchThemeHandler","watchTooltipPlacementHandler","watchVariantHandler","tabTarget","allToggles","clickedToggle","id","icChange","emit","selectedOption","toggledOptions","map","opt","toggleButton","setActiveToggle","toggle","componentWillLoad","addEventListener","componentDidLoad","i","btn","_c","_b","shadowRoot","querySelector","btnAriaLabel","getAttribute","aria","setAttribute","toString","tabIndex","classList","add","disconnectedCallback","removeEventListener","render","h","Host","role","tabindex","class","onFocus"],"sources":["src/components/ic-toggle-button-group/ic-toggle-button-group.css?tag=ic-toggle-button-group&encapsulation=shadow","src/components/ic-toggle-button-group/ic-toggle-button-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/* PARENT HOST */\n\n:root {\n display: block;\n}\n\n:host {\n display: flex;\n flex-direction: row;\n width: fit-content;\n min-width: min-content;\n border: var(--ic-border-width) solid var(--ic-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: max-content;\n}\n\n:host(:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n outline: none;\n}\n\n/* CHILDREN SLOTTED */\n\n::slotted(ic-toggle-button) {\n flex-grow: 1;\n width: min-content;\n\n --toggle-button-border: none !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\n:host(.ic-toggle-button-group-hide-outline) {\n --ic-toggle-button-unselected-border: transparent;\n --ic-toggle-button-unselected-border-disabled: transparent;\n --ic-toggle-button-unselected-border-monochrome: transparent;\n --ic-toggle-button-unselected-border-disabled-monochrome: transparent;\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host(:focus) {\n transition: none;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Element,\n Event,\n EventEmitter,\n State,\n Watch,\n Method,\n} from \"@stencil/core\";\nimport {\n IcSizes,\n IcSelectTypes,\n IcSelectMethodTypes,\n IcThemeMode,\n IcButtonTooltipPlacement,\n IcIconPlacementOptions,\n} from \"../../utils/types\";\nimport { IcChangeEventDetail } from \"./ic-toggle-button-group.types\";\nimport { removeDisabledFalse } from \"../../utils/helpers\";\n\ninterface lastKey {\n key: string | null;\n shift: boolean;\n}\n\nconst TOGGLE_GROUP = \"IC-TOGGLE-BUTTON-GROUP\";\n\n@Component({\n tag: \"ic-toggle-button-group\",\n styleUrl: \"ic-toggle-button-group.css\",\n shadow: true,\n})\nexport class ToggleButtonGroup {\n @Element() el: HTMLIcToggleButtonGroupElement;\n\n @State() lastKeyPressed: lastKey = {\n key: null,\n shift: false,\n };\n @State() externallySetActiveToggle: HTMLIcToggleButtonElement | null = null;\n\n /**\n * The accessible label of the toggle button group component to provide context for screen reader users.\n */\n @Prop() accessibleLabel = \"Toggle button group\";\n\n /**\n * If `true`, the toggle button group will be set to the disabled state.\n */\n @Prop() disabled = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.disabled = this.disabled;\n });\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the toggle button group will fill the width of the container.\n */\n @Prop() fullWidth = false;\n @Watch(\"fullWidth\")\n watchFullWidthHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.fullWidth = this.fullWidth;\n });\n }\n\n /**\n * The placement of the icons in relation to the toggle button labels.\n */\n @Prop() iconPlacement?: IcIconPlacementOptions;\n\n /**\n * If `true`, the toggle button group will be in loading state.\n */\n @Prop() loading = false;\n @Watch(\"loading\")\n watchLoadingHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.loading = this.loading;\n });\n }\n\n /**\n * If `true`, the toggle button group will display as black in the light theme, and white in dark theme.\n */\n @Prop() monochrome = false;\n @Watch(\"monochrome\")\n watchMonochromeHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.monochrome = this.monochrome;\n });\n }\n\n /**\n * If `true`, the toggle button group will display with an outline.\n */\n @Prop() outline = true;\n @Watch(\"outline\")\n watchOutlineHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.outline = this.outline;\n });\n }\n\n /**\n * If `auto`, controls are toggled automatically when navigated to. If `manual`, the controls must be actioned to change their toggled state. The value of this prop is ignored if `selectType` is set to`multi`.\n */\n @Prop({ mutable: true }) selectMethod: IcSelectMethodTypes = \"manual\";\n\n /**\n * Sets whether single or multiple options can be toggled. If `multi`, then the `selectMethod` is always `manual`.\n */\n @Prop() selectType: IcSelectTypes = \"single\";\n\n /**\n * The size of the toggle buttons to be displayed. This does not affect the font size of the accessible label.\n */\n @Prop() size: IcSizes = \"medium\";\n @Watch(\"size\")\n watchSizeHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.size = this.size;\n });\n }\n\n /**\n * 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 @Prop() theme: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n watchThemeHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.theme = this.theme;\n });\n }\n\n /**\n * The position of the tooltip in relation to the toggle buttons.\n */\n @Prop() tooltipPlacement: IcButtonTooltipPlacement = \"bottom\";\n @Watch(\"tooltipPlacement\")\n watchTooltipPlacementHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.tooltipPlacement = this.tooltipPlacement;\n });\n }\n\n /**\n * The variant of the toggle button.\n */\n @Prop({ reflect: true }) variant: \"default\" | \"icon\" = \"default\";\n @Watch(\"variant\")\n watchVariantHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.variant = this.variant;\n });\n }\n\n /**\n * Emitted when a toggle button is selected.\n */\n @Event() icChange: EventEmitter<IcChangeEventDetail>;\n\n @Listen(\"icToggleChecked\")\n selectHandler(ev: CustomEvent, tabTarget?: HTMLIcToggleButtonElement): void {\n const allToggles = this.getAllToggleButtons();\n let clickedToggle = ev.target as HTMLIcToggleButtonElement;\n\n if (tabTarget) tabTarget.focus(); // tabTarget used in proxySelectHandler\n\n if (this.selectType === \"single\") {\n if (!clickedToggle && tabTarget) {\n clickedToggle = tabTarget;\n }\n allToggles.forEach((el) => {\n if (el.id !== clickedToggle.id && el.checked) {\n el.checked = false;\n }\n });\n\n this.icChange.emit({\n checked: ev.detail.checked,\n selectedOption: clickedToggle,\n });\n } else {\n const toggledOptions = allToggles.filter(\n (el) => el.checked && !el.disabled\n );\n\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\n /**\n * @internal Used to enable other components to set the active toggle button when toggle button group is in a shadow dom.\n */\n @Method()\n async setActiveToggle(toggle: HTMLIcToggleButtonElement): Promise<void> {\n this.externallySetActiveToggle = toggle;\n }\n\n componentWillLoad(): void {\n if (this.selectType === \"multi\") this.selectMethod = \"manual\";\n if (this.selectMethod === \"auto\") this.selectType === \"single\";\n document.addEventListener(\"keydown\", this.keyListener);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n this.getAllToggleButtons().forEach((el, i) => {\n const btn = el.shadowRoot\n ?.querySelector(\"ic-button\")\n ?.shadowRoot?.querySelector(\"button\");\n if (btn) {\n const btnAriaLabel = btn.getAttribute(\"aria-label\");\n const aria = btnAriaLabel ? `${btnAriaLabel}, ` : \"\";\n btn.setAttribute(\"aria-label\", `${aria}${this.accessibleLabel}`);\n }\n\n el.id = i.toString();\n el.tabIndex = -1;\n el.addEventListener(\"keydown\", (ev) => {\n this.handleKeyDown(ev);\n });\n el.classList.add(\"expand-toggle-group-child\");\n });\n }\n\n disconnectedCallback(): void {\n document?.removeEventListener(\"keydown\", this.keyListener);\n }\n\n private keyListener = (ev: KeyboardEvent) => {\n this.lastKeyPressed = {\n key: ev.key,\n shift: ev.shiftKey,\n };\n };\n\n private handleHostFocus = ({ target, relatedTarget }: FocusEvent) => {\n if (this.disabled) {\n (target as HTMLElement)?.blur();\n return;\n }\n if (this.loading) return;\n const el = target as HTMLIcToggleButtonGroupElement | null;\n const relEl = relatedTarget as HTMLIcToggleButtonElement | null;\n const toggleButtons = Array.from(\n el?.querySelectorAll(\"ic-toggle-button\") || []\n );\n const noToggleButtonsChecked = toggleButtons.every((el) => !el.checked);\n const { shift } = this.lastKeyPressed;\n if (\n ((noToggleButtonsChecked || this.selectType !== \"single\") && !shift) ||\n (noToggleButtonsChecked && shift && relEl?.tagName == TOGGLE_GROUP)\n ) {\n toggleButtons[0]?.focus();\n } else if (!shift || relEl?.tagName == TOGGLE_GROUP) {\n // if checked is true and selectMethod is \"single\", focus that toggle\n toggleButtons.filter((el) => el.checked)[0].focus();\n }\n };\n\n private handleKeyDown = ({ key }: KeyboardEvent) => {\n if (\n key !== \"ArrowDown\" &&\n key !== \"ArrowRight\" &&\n key !== \"ArrowLeft\" &&\n key !== \"ArrowUp\"\n )\n return;\n\n const toggleButtonOptions = this.getAllToggleButtons();\n let targetToggle: HTMLIcToggleButtonElement;\n if (this.externallySetActiveToggle) {\n targetToggle =\n toggleButtonOptions[\n this.getNextItemToSelect(\n toggleButtonOptions.indexOf(\n toggleButtonOptions.filter(\n (el) => el === this.externallySetActiveToggle\n )[0]\n ),\n key === \"ArrowDown\" || key === \"ArrowRight\"\n )\n ];\n } else {\n targetToggle =\n toggleButtonOptions[\n this.getNextItemToSelect(\n toggleButtonOptions.indexOf(\n toggleButtonOptions.filter(\n (el) => el === document.activeElement\n )[0]\n ),\n key === \"ArrowDown\" || key === \"ArrowRight\"\n )\n ];\n }\n\n if (this.selectMethod === \"auto\") {\n // trigger selectHandler when unable to add 'target'\n targetToggle.checked = true;\n this.selectHandler(\n new CustomEvent(\"icToggleChecked\", {\n detail: {\n checked: targetToggle.checked,\n },\n }),\n targetToggle\n );\n } else {\n targetToggle.focus();\n }\n };\n\n private getNextItemToSelect = (currentItem: number, movingDown: boolean) => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const numToggles = toggleButtonOptions.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n if (nextItem < 0) {\n nextItem = numToggles;\n } else if (nextItem > numToggles) {\n nextItem = 0;\n }\n\n if (toggleButtonOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n\n return nextItem;\n };\n\n private getAllToggleButtons = () =>\n Array.from(this.el.querySelectorAll(\"ic-toggle-button\"));\n\n render() {\n const {\n accessibleLabel,\n disabled,\n fullWidth,\n loading,\n monochrome,\n outline,\n theme,\n } = this;\n\n return (\n <Host\n role=\"group\"\n aria-label={accessibleLabel}\n tabindex={disabled ? -1 : 0}\n class={{\n \"ic-toggle-button-group-disabled\": disabled,\n \"ic-toggle-button-group-full-width\": fullWidth,\n \"ic-toggle-button-group-loading\": loading,\n \"ic-toggle-button-group-monochrome\": monochrome,\n \"ic-toggle-button-group-hide-outline\": !outline,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n onFocus={this.handleHostFocus}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"uHAAA,MAAMA,EAAyB,6nJAC/B,MAAAC,EAAeD,EC4Bf,MAAME,EAAe,yB,MAORC,EAAiB,MAL9B,WAAAC,CAAAC,G,6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,c as i,h as t,H as r,g as a}from"./p-8e4e97b4.js";import{c as s}from"./p-f074ef5b.js";import{a as o,i as n,p as c}from"./p-dbc8bf0c.js";import{V as l}from"./p-6215e2ae.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host ::slotted(ic-typography){--ic-typography-color:var(--ic-alert-description)}.container{min-height:var(--ic-alert-min-height);border-radius:var(--ic-space-xxs) var(--ic-space-xxxs) var(--ic-space-xxxs)\n var(--ic-space-xxs);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-alert-background-neutral);border:var(--ic-space-xxxs) solid var(--ic-alert-border-neutral)}.container-info{background-color:var(--ic-alert-background-info);border:var(--ic-space-xxxs) solid var(--ic-alert-border-info)}.container-warning{background-color:var(--ic-alert-background-warning);border:var(--ic-space-xxxs) solid var(--ic-alert-border-warning)}.container-error{background-color:var(--ic-alert-background-error);border:var(--ic-space-xxxs) solid var(--ic-alert-border-error)}.container-success{background-color:var(--ic-alert-background-success);border:var(--ic-space-xxxs) solid var(--ic-alert-border-success)}.container-ai{background-color:var(--ic-alert-background-ai);border:var(--ic-space-xxxs) solid var(--ic-alert-border-ai)}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-alert-status-type-neutral)}.divider-info{background-color:var(--ic-alert-status-type-info)}.divider-warning{background-color:var(--ic-alert-status-type-warning)}.divider-error{background-color:var(--ic-alert-status-type-error)}.divider-success{background-color:var(--ic-alert-status-type-success)}.divider-ai{background-color:var(--ic-alert-status-type-ai)}.alert-icon{align-self:flex-start;margin-top:var(--ic-space-xs);margin-right:var(--ic-space-xs)}.alert-icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}:host(.ic-alert-no-default-icon) .icon-neutral{visibility:hidden;width:0;margin-left:0.625rem}.icon-neutral>svg,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block;fill:var(--ic-alert-icon-neutral)}:host(.ic-alert-variant-info) .alert-icon svg{fill:var(--ic-alert-icon-info)}:host(.ic-alert-variant-warning) .alert-icon svg{fill:var(--ic-alert-icon-warning)}:host(.ic-alert-variant-error) .alert-icon svg{fill:var(--ic-alert-icon-error)}:host(.ic-alert-variant-success) .alert-icon svg{fill:var(--ic-alert-icon-success)}:host(.ic-alert-variant-ai) .alert-icon svg{fill:var(--ic-alert-icon-ai)}.alert-content{display:flex;align-items:center;margin-left:1.125rem;width:100%;flex-wrap:wrap}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1;--ic-typography-color:var(--ic-alert-description)}.alert-message-title-above{display:inline}.alert-title{margin-right:var(--ic-space-xs);margin-top:0;margin-bottom:auto;--ic-typography-color:var(--ic-alert-title)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-0.375rem;padding:0.375rem;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon>svg{color:var(--ic-alert-icon-dismissible)}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-message{display:inline}.alert-title{white-space:normal}.alert-action-container{margin-bottom:var(--ic-space-xs);flex-basis:100%}.alert-icon~.alert-action-container{margin-left:2rem}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}.dismiss-icon>svg{color:var(--ic-architectural-white)}}';const h=d;const u=class{constructor(t){e(this,t);this.icDismiss=i(this,"icDismiss",7);this.hostMutationObserver=null;this.systemThemeObserver=null;this.darkMode=false;this.alertTitleWrap=false;this.visible=true;this.announced=true;this.dismissible=false;this.dismissLabel="Dismiss";this.heading="";this.showDefaultIcon=true;this.theme="inherit";this.titleAbove=false;this.variant="neutral";this.dismissAction=()=>{this.icDismiss.emit()}}themeChangeHandler(){if(this.theme!=="inherit")this.darkMode=this.theme==="dark"}disconnectedCallback(){var e,i;(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect();(i=this.systemThemeObserver)===null||i===void 0?void 0:i.removeEventListener("change",this.darkModeChangeHandler)}componentWillLoad(){if(!this.el.closest("ic-theme")){this.systemThemeObserver=window.matchMedia("(prefers-color-scheme: dark)");this.systemThemeObserver.addEventListener("change",this.darkModeChangeHandler);this.darkMode=this.systemThemeObserver.matches}this.themeChangeHandler()}componentDidLoad(){var e;if(Number((e=this.titleEl)===null||e===void 0?void 0:e.clientHeight)>24)this.alertTitleWrap=true;this.hostMutationObserver=new MutationObserver((e=>o(e,"action",this)));this.hostMutationObserver.observe(this.el,{childList:true});this.calculateMinHeight()}componentDidUpdate(){this.calculateMinHeight()}handleClick(){this.visible=!this.visible}darkModeChangeHandler(e){this.darkMode="detail"in e?e.detail==="dark":e.matches;this.calculateMinHeight()}calculateMinHeight(){var e;const i=Number((e=this.messageEl)===null||e===void 0?void 0:e.clientHeight);const t=c(`${(i>40?i:52)+(this.darkMode?0:4)}`);if(this.el.style.getPropertyValue("--ic-alert-min-height")!==t)this.el.style.setProperty("--ic-alert-min-height",t)}render(){const{variant:e,heading:i,message:a,titleAbove:o,dismissible:c,announced:d,visible:h,showDefaultIcon:u,theme:p,alertTitleWrap:b,dismissAction:m,dismissLabel:g}=this;const v=()=>{const i={"alert-icon":true,"svg-container":true,[`icon-${e}`]:true};if(e==="neutral"){if(n(this.el,"neutral-icon")){return t("div",{class:i},t("slot",{name:"neutral-icon"}))}else if(!u){return t("div",null)}}return t("span",{class:i,innerHTML:l[e].icon})};return h&&t(r,{role:d?"alert":null,class:{[`ic-theme-${p}`]:p!=="inherit",[`ic-alert-variant-${e}`]:true,[`ic-alert-no-default-icon`]:!u}},t("div",{class:{container:true,[`container-${e}`]:true}},t("div",{class:{divider:true,[`divider-${e}`]:true}}),t("div",{class:"alert-content"},t(v,null),t("div",{class:{"alert-message":true,"alert-message-title-above":o||b},ref:e=>this.messageEl=e},i&&t("ic-typography",{class:{"alert-title":true,"alert-title-above":o||b},variant:"subtitle-large",ref:e=>this.titleEl=e},t("p",null,i)),t("slot",{name:"message"},t("ic-typography",{variant:"body"},a))),n(this.el,"action")&&t("div",{class:"alert-action-container"},t("slot",{name:"action"}))),t("div",{class:"dismiss-icon-container"},c&&t("ic-button",{class:{"svg-container":true,"dismiss-icon":true},innerHTML:s,onClick:m,variant:"icon-tertiary",theme:"dark",title:g}))))}get el(){return a(this)}static get watchers(){return{theme:["themeChangeHandler"]}}};u.style=h;export{u as ic_alert};
2
- //# sourceMappingURL=p-a0af1b0a.entry.js.map
1
+ import{r as e,c as i,h as t,H as r,g as a}from"./p-8e4e97b4.js";import{c as s}from"./p-f074ef5b.js";import{a as o,i as n,p as c}from"./p-b77b1e1f.js";import{V as l}from"./p-6215e2ae.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host ::slotted(ic-typography){--ic-typography-color:var(--ic-alert-description)}.container{min-height:var(--ic-alert-min-height);border-radius:var(--ic-space-xxs) var(--ic-space-xxxs) var(--ic-space-xxxs)\n var(--ic-space-xxs);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-alert-background-neutral);border:var(--ic-space-xxxs) solid var(--ic-alert-border-neutral)}.container-info{background-color:var(--ic-alert-background-info);border:var(--ic-space-xxxs) solid var(--ic-alert-border-info)}.container-warning{background-color:var(--ic-alert-background-warning);border:var(--ic-space-xxxs) solid var(--ic-alert-border-warning)}.container-error{background-color:var(--ic-alert-background-error);border:var(--ic-space-xxxs) solid var(--ic-alert-border-error)}.container-success{background-color:var(--ic-alert-background-success);border:var(--ic-space-xxxs) solid var(--ic-alert-border-success)}.container-ai{background-color:var(--ic-alert-background-ai);border:var(--ic-space-xxxs) solid var(--ic-alert-border-ai)}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-alert-status-type-neutral)}.divider-info{background-color:var(--ic-alert-status-type-info)}.divider-warning{background-color:var(--ic-alert-status-type-warning)}.divider-error{background-color:var(--ic-alert-status-type-error)}.divider-success{background-color:var(--ic-alert-status-type-success)}.divider-ai{background-color:var(--ic-alert-status-type-ai)}.alert-icon{align-self:flex-start;margin-top:var(--ic-space-xs);margin-right:var(--ic-space-xs)}.alert-icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}:host(.ic-alert-no-default-icon) .icon-neutral{visibility:hidden;width:0;margin-left:0.625rem}.icon-neutral>svg,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block;fill:var(--ic-alert-icon-neutral)}:host(.ic-alert-variant-info) .alert-icon svg{fill:var(--ic-alert-icon-info)}:host(.ic-alert-variant-warning) .alert-icon svg{fill:var(--ic-alert-icon-warning)}:host(.ic-alert-variant-error) .alert-icon svg{fill:var(--ic-alert-icon-error)}:host(.ic-alert-variant-success) .alert-icon svg{fill:var(--ic-alert-icon-success)}:host(.ic-alert-variant-ai) .alert-icon svg{fill:var(--ic-alert-icon-ai)}.alert-content{display:flex;align-items:center;margin-left:1.125rem;width:100%;flex-wrap:wrap}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1;--ic-typography-color:var(--ic-alert-description)}.alert-message-title-above{display:inline}.alert-title{margin-right:var(--ic-space-xs);margin-top:0;margin-bottom:auto;--ic-typography-color:var(--ic-alert-title)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-0.375rem;padding:0.375rem;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon>svg{color:var(--ic-alert-icon-dismissible)}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-message{display:inline}.alert-title{white-space:normal}.alert-action-container{margin-bottom:var(--ic-space-xs);flex-basis:100%}.alert-icon~.alert-action-container{margin-left:2rem}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}.dismiss-icon>svg{color:var(--ic-architectural-white)}}';const h=d;const u=class{constructor(t){e(this,t);this.icDismiss=i(this,"icDismiss",7);this.hostMutationObserver=null;this.systemThemeObserver=null;this.darkMode=false;this.alertTitleWrap=false;this.visible=true;this.announced=true;this.dismissible=false;this.dismissLabel="Dismiss";this.heading="";this.showDefaultIcon=true;this.theme="inherit";this.titleAbove=false;this.variant="neutral";this.dismissAction=()=>{this.icDismiss.emit()}}themeChangeHandler(){if(this.theme!=="inherit")this.darkMode=this.theme==="dark"}disconnectedCallback(){var e,i;(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect();(i=this.systemThemeObserver)===null||i===void 0?void 0:i.removeEventListener("change",this.darkModeChangeHandler)}componentWillLoad(){if(!this.el.closest("ic-theme")){this.systemThemeObserver=window.matchMedia("(prefers-color-scheme: dark)");this.systemThemeObserver.addEventListener("change",this.darkModeChangeHandler);this.darkMode=this.systemThemeObserver.matches}this.themeChangeHandler()}componentDidLoad(){var e;if(Number((e=this.titleEl)===null||e===void 0?void 0:e.clientHeight)>24)this.alertTitleWrap=true;this.hostMutationObserver=new MutationObserver((e=>o(e,"action",this)));this.hostMutationObserver.observe(this.el,{childList:true});this.calculateMinHeight()}componentDidUpdate(){this.calculateMinHeight()}handleClick(){this.visible=!this.visible}darkModeChangeHandler(e){this.darkMode="detail"in e?e.detail==="dark":e.matches;this.calculateMinHeight()}calculateMinHeight(){var e;const i=Number((e=this.messageEl)===null||e===void 0?void 0:e.clientHeight);const t=c(`${(i>40?i:52)+(this.darkMode?0:4)}`);if(this.el.style.getPropertyValue("--ic-alert-min-height")!==t)this.el.style.setProperty("--ic-alert-min-height",t)}render(){const{variant:e,heading:i,message:a,titleAbove:o,dismissible:c,announced:d,visible:h,showDefaultIcon:u,theme:p,alertTitleWrap:b,dismissAction:m,dismissLabel:g}=this;const v=()=>{const i={"alert-icon":true,"svg-container":true,[`icon-${e}`]:true};if(e==="neutral"){if(n(this.el,"neutral-icon")){return t("div",{class:i},t("slot",{name:"neutral-icon"}))}else if(!u){return t("div",null)}}return t("span",{class:i,innerHTML:l[e].icon})};return h&&t(r,{role:d?"alert":null,class:{[`ic-theme-${p}`]:p!=="inherit",[`ic-alert-variant-${e}`]:true,[`ic-alert-no-default-icon`]:!u}},t("div",{class:{container:true,[`container-${e}`]:true}},t("div",{class:{divider:true,[`divider-${e}`]:true}}),t("div",{class:"alert-content"},t(v,null),t("div",{class:{"alert-message":true,"alert-message-title-above":o||b},ref:e=>this.messageEl=e},i&&t("ic-typography",{class:{"alert-title":true,"alert-title-above":o||b},variant:"subtitle-large",ref:e=>this.titleEl=e},t("p",null,i)),t("slot",{name:"message"},t("ic-typography",{variant:"body"},a))),n(this.el,"action")&&t("div",{class:"alert-action-container"},t("slot",{name:"action"}))),t("div",{class:"dismiss-icon-container"},c&&t("ic-button",{class:{"svg-container":true,"dismiss-icon":true},innerHTML:s,onClick:m,variant:"icon-tertiary",theme:"dark",title:g}))))}get el(){return a(this)}static get watchers(){return{theme:["themeChangeHandler"]}}};u.style=h;export{u as ic_alert};
2
+ //# sourceMappingURL=p-bb7652cd.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,H as e,g as a}from"./p-8e4e97b4.js";const o='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:grid;width:-moz-fit-content;width:fit-content;grid-template-columns:repeat(\n var(--ic-layout-grid-columns),\n var(--ic-layout-grid-col-width, 1fr)\n );grid-template-rows:repeat(var(--ic-layout-grid-rows), 1fr);gap:var(--ic-layout-grid-spacing);padding-top:var(--ic-layout-grid-margin);padding-bottom:var(--ic-layout-grid-margin)}:host ::slotted(*){grid-column:span var(--ic-layout-grid-col-span, 1);grid-row:span var(--ic-layout-grid-row-span, 1)}:host(.ic-layout-grid-aligned-center){margin-left:auto;margin-right:auto;padding-left:var(--ic-layout-grid-margin);padding-right:var(--ic-layout-grid-margin)}:host(.ic-layout-grid-aligned-left){margin-left:var(--ic-layout-grid-margin);margin-right:auto;padding-right:var(--ic-layout-grid-margin)}:host(.ic-layout-grid-aligned-full-width){margin-left:var(--ic-layout-grid-margin);margin-right:var(--ic-layout-grid-margin);width:calc(100% - (var(--ic-layout-grid-margin) * 2))}:host(.ic-layout-grid-no-vertical-padding){padding-top:0;padding-bottom:0}@media only screen and (max-width: 576px){:host{--ic-layout-grid-margin:var(--ic-space-xs);--ic-layout-grid-columns:var(--ic-layout-grid-columns-xs)}:host ::slotted(*){--ic-layout-grid-col-span:var(--ic-layout-grid-col-span-xs)}}@media only screen and (min-width: 577px){:host{--ic-layout-grid-margin:var(--ic-space-md);--ic-layout-grid-columns:var(--ic-layout-grid-columns-sm)}:host ::slotted(*){--ic-layout-grid-col-span:var(--ic-layout-grid-col-span-sm)}}@media only screen and (min-width: 769px){:host{--ic-layout-grid-margin:var(--ic-space-md);--ic-layout-grid-columns:var(--ic-layout-grid-columns-md)}:host ::slotted(*){--ic-layout-grid-col-span:var(--ic-layout-grid-col-span-md)}}@media only screen and (min-width: 993px){:host{--ic-layout-grid-margin:var(--ic-space-md);--ic-layout-grid-columns:var(--ic-layout-grid-columns-lg)}:host ::slotted(*){--ic-layout-grid-col-span:var(--ic-layout-grid-col-span-lg)}}@media only screen and (min-width: 1201px){:host{--ic-layout-grid-margin:var(--ic-space-lg);--ic-layout-grid-columns:var(--ic-layout-grid-columns-xl)}:host ::slotted(*){--ic-layout-grid-col-span:var(--ic-layout-grid-col-span-xl)}}';const n=o;const s=class{constructor(i){t(this,i);this.COL_WIDTH_CSS_PROP="--ic-layout-grid-col-width";this.aligned="left";this.defaultColSpan=1;this.defaultColWidth="64px";this.defaultRowSpan=1;this.fullHeight=false;this.gridSpacing=2;this.rows=1;this.type="fixed";this.getColumns=()=>{if(typeof this.columns==="number"){this.el.style.setProperty("--ic-layout-grid-columns",this.columns.toString())}else if(typeof this.columns==="object"){Object.entries(this.columns).forEach((([t,i])=>{if(i!==undefined){this.el.style.setProperty(`--ic-layout-grid-columns-${t}`,i.toString())}}))}};this.getColSpan=()=>{if(this.defaultColSpan!==undefined){if(typeof this.defaultColSpan==="number"){Array.from(this.el.children).forEach((t=>{t.style.setProperty("--ic-layout-grid-col-span",`${this.defaultColSpan}`)}))}else if(typeof this.defaultColSpan==="object"){Object.entries(this.defaultColSpan).forEach((([t,i])=>{if(i!==undefined){this.el.style.setProperty(`--ic-layout-grid-col-span-${t}`,i.toString())}}))}}};this.getGridSpacing=()=>{this.el.style.setProperty("--ic-layout-grid-spacing",`calc(var(--ic-space-xs) * ${this.gridSpacing})`)}}watchColumns(){this.getColumns()}watchDefaultColSpan(){this.getColSpan()}watchDefaultColWidth(t){if(this.type==="fixed"){this.el.style.setProperty(this.COL_WIDTH_CSS_PROP,t)}}watchDefaultRowSpan(t){this.el.style.setProperty("--ic-layout-grid-row-span",`${t}`)}watchGridSpacing(){this.getGridSpacing()}watchRows(t){this.el.style.setProperty("--ic-layout-grid-rows",`${t}`)}watchType(t){this.getColumns();if(t==="fixed"&&this.defaultColWidth){this.el.style.setProperty(this.COL_WIDTH_CSS_PROP,this.defaultColWidth)}else{this.el.style.removeProperty(this.COL_WIDTH_CSS_PROP)}}componentWillLoad(){if(this.columns===undefined){if(this.type==="fixed"){this.columns=12}else if(this.type==="fluid"){this.columns={xs:2,sm:4,md:8,lg:12,xl:12}}}this.getColumns();this.getColSpan();this.getGridSpacing();if(this.type==="fixed"&&this.defaultColWidth){this.el.style.setProperty(this.COL_WIDTH_CSS_PROP,this.defaultColWidth)}if(this.rows){this.el.style.setProperty("--ic-layout-grid-rows",`${this.rows}`);this.el.style.setProperty("--ic-layout-grid-row-span",`${this.defaultRowSpan}`)}}render(){const{aligned:t,fullHeight:a}=this;return i(e,{key:"edd252e9b99b8ae5a131062ac6f102b2e76d22ce",class:{[`ic-layout-grid-aligned-${t}`]:true,["ic-layout-grid-no-vertical-padding"]:!!a}},i("slot",{key:"9d4b3b7d4f3379b01751707270f00f988e16b0a8"}))}get el(){return a(this)}static get watchers(){return{columns:["watchColumns"],defaultColSpan:["watchDefaultColSpan"],defaultColWidth:["watchDefaultColWidth"],defaultRowSpan:["watchDefaultRowSpan"],gridSpacing:["watchGridSpacing"],rows:["watchRows"],type:["watchType"]}}};s.style=n;export{s as ic_layout_grid};
2
- //# sourceMappingURL=p-1d8559f0.entry.js.map
1
+ import{r as t,h as i,H as e,g as a}from"./p-8e4e97b4.js";const o='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:grid;width:-moz-fit-content;width:fit-content;grid-template-columns:repeat(\n var(--ic-layout-grid-columns),\n var(--ic-layout-grid-col-width, 1fr)\n );grid-template-rows:repeat(var(--ic-layout-grid-rows), 1fr);gap:var(--ic-layout-grid-spacing);padding-top:var(--ic-layout-grid-margin);padding-bottom:var(--ic-layout-grid-margin)}:host ::slotted(*){grid-column:span var(--ic-layout-grid-col-span, 1);grid-row:span var(--ic-layout-grid-row-span, 1)}:host(.ic-layout-grid-aligned-center){margin-left:auto;margin-right:auto;padding-left:var(--ic-layout-grid-margin);padding-right:var(--ic-layout-grid-margin)}:host(.ic-layout-grid-aligned-left){margin-left:var(--ic-layout-grid-margin);margin-right:auto;padding-right:var(--ic-layout-grid-margin)}:host(.ic-layout-grid-aligned-full-width){margin-left:var(--ic-layout-grid-margin);margin-right:var(--ic-layout-grid-margin);width:calc(100% - (var(--ic-layout-grid-margin) * 2))}:host(.ic-layout-grid-no-vertical-padding){padding-top:0;padding-bottom:0}@media only screen and (max-width: 576px){:host{--ic-layout-grid-margin:var(--ic-space-xs);--ic-layout-grid-columns:var(--ic-layout-grid-columns-xs)}:host ::slotted(*){--ic-layout-grid-col-span:var(--ic-layout-grid-col-span-xs)}}@media only screen and (min-width: 577px){:host{--ic-layout-grid-margin:var(--ic-space-md);--ic-layout-grid-columns:var(--ic-layout-grid-columns-sm)}:host ::slotted(*){--ic-layout-grid-col-span:var(--ic-layout-grid-col-span-sm)}}@media only screen and (min-width: 769px){:host{--ic-layout-grid-margin:var(--ic-space-md);--ic-layout-grid-columns:var(--ic-layout-grid-columns-md)}:host ::slotted(*){--ic-layout-grid-col-span:var(--ic-layout-grid-col-span-md)}}@media only screen and (min-width: 993px){:host{--ic-layout-grid-margin:var(--ic-space-md);--ic-layout-grid-columns:var(--ic-layout-grid-columns-lg)}:host ::slotted(*){--ic-layout-grid-col-span:var(--ic-layout-grid-col-span-lg)}}@media only screen and (min-width: 1201px){:host{--ic-layout-grid-margin:var(--ic-space-lg);--ic-layout-grid-columns:var(--ic-layout-grid-columns-xl)}:host ::slotted(*){--ic-layout-grid-col-span:var(--ic-layout-grid-col-span-xl)}}';const n=o;const s=class{constructor(i){t(this,i);this.COL_WIDTH_CSS_PROP="--ic-layout-grid-col-width";this.aligned="left";this.defaultColSpan=1;this.defaultColWidth="64px";this.defaultRowSpan=1;this.fullHeight=false;this.gridSpacing=2;this.rows=1;this.type="fixed";this.getColumns=()=>{if(typeof this.columns==="number"){this.el.style.setProperty("--ic-layout-grid-columns",this.columns.toString())}else if(typeof this.columns==="object"){Object.entries(this.columns).forEach((([t,i])=>{if(i!==undefined){this.el.style.setProperty(`--ic-layout-grid-columns-${t}`,i.toString())}}))}};this.getColSpan=()=>{if(this.defaultColSpan!==undefined){if(typeof this.defaultColSpan==="number"){Array.from(this.el.children).forEach((t=>{t.style.setProperty("--ic-layout-grid-col-span",`${this.defaultColSpan}`)}))}else if(typeof this.defaultColSpan==="object"){Object.entries(this.defaultColSpan).forEach((([t,i])=>{if(i!==undefined){this.el.style.setProperty(`--ic-layout-grid-col-span-${t}`,i.toString())}}))}}};this.getGridSpacing=()=>{this.el.style.setProperty("--ic-layout-grid-spacing",`calc(var(--ic-space-xs) * ${this.gridSpacing})`)}}watchColumns(){this.getColumns()}watchDefaultColSpan(){this.getColSpan()}watchDefaultColWidth(t){if(this.type==="fixed"){this.el.style.setProperty(this.COL_WIDTH_CSS_PROP,t)}}watchDefaultRowSpan(t){this.el.style.setProperty("--ic-layout-grid-row-span",`${t}`)}watchGridSpacing(){this.getGridSpacing()}watchRows(t){this.el.style.setProperty("--ic-layout-grid-rows",`${t}`)}watchType(t){this.getColumns();if(t==="fixed"&&this.defaultColWidth){this.el.style.setProperty(this.COL_WIDTH_CSS_PROP,this.defaultColWidth)}else{this.el.style.removeProperty(this.COL_WIDTH_CSS_PROP)}}componentWillLoad(){if(this.columns===undefined){if(this.type==="fixed"){this.columns=12}else if(this.type==="fluid"){this.columns={xs:2,sm:4,md:8,lg:12,xl:12}}}this.getColumns();this.getColSpan();this.getGridSpacing();if(this.type==="fixed"&&this.defaultColWidth){this.el.style.setProperty(this.COL_WIDTH_CSS_PROP,this.defaultColWidth)}if(this.rows){this.el.style.setProperty("--ic-layout-grid-rows",`${this.rows}`);this.el.style.setProperty("--ic-layout-grid-row-span",`${this.defaultRowSpan}`)}}render(){const{aligned:t,fullHeight:a}=this;return i(e,{key:"fb70bb0fe2085ce0eba37572f3a12e6d56c6c195",class:{[`ic-layout-grid-aligned-${t}`]:true,["ic-layout-grid-no-vertical-padding"]:!!a}},i("slot",{key:"852c50adaf3b8c743353429659198845f363de62"}))}get el(){return a(this)}static get watchers(){return{columns:["watchColumns"],defaultColSpan:["watchDefaultColSpan"],defaultColWidth:["watchDefaultColWidth"],defaultRowSpan:["watchDefaultRowSpan"],gridSpacing:["watchGridSpacing"],rows:["watchRows"],type:["watchType"]}}};s.style=n;export{s as ic_layout_grid};
2
+ //# sourceMappingURL=p-c156e6e9.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,H as a,g as r}from"./p-8e4e97b4.js";const s=":host{grid-column:var(--ic-grid-item-col-start, 1) / span\n var(--ic-grid-item-col-span, var(--ic-layout-grid-col-span, 1)) !important;grid-row:var(--ic-grid-item-row-start, 1) / span\n var(--ic-grid-item-row-span, var(--ic-layout-grid-row-span, 1)) !important}@media only screen and (max-width: 576px){:host(.ic-layout-grid-hide-in-mobile){display:none}}";const o=s;const c=class{constructor(i){t(this,i);this.colSpan=1;this.colStart=1;this.hideInMobileMode=false;this.rowSpan=1;this.rowStart=1}watchColSpan(t){this.el.style.setProperty("--ic-grid-item-col-span",`${t}`)}watchColStart(t){this.el.style.setProperty("--ic-grid-item-col-start",`${t}`)}watchRowSpan(t){this.el.style.setProperty("--ic-grid-item-row-span",`${t}`)}watchRowStart(t){this.el.style.setProperty("--ic-grid-item-row-start",`${t}`)}componentWillLoad(){this.el.style.setProperty("--ic-grid-item-col-start",`${this.colStart}`);this.el.style.setProperty("--ic-grid-item-col-span",`${this.colSpan}`);this.el.style.setProperty("--ic-grid-item-row-start",`${this.rowStart}`);this.el.style.setProperty("--ic-grid-item-row-span",`${this.rowSpan}`)}render(){const{hideInMobileMode:t}=this;return i(a,{key:"142d6bb3ec03f4e0b362b1d10da70a3ee7f215d5",class:{"ic-layout-grid-hide-in-mobile":!!t}},i("slot",{key:"4711277515425bc6bff4d1089c14fafc3ab6032b"}))}get el(){return r(this)}static get watchers(){return{colSpan:["watchColSpan"],colStart:["watchColStart"],rowSpan:["watchRowSpan"],rowStart:["watchRowStart"]}}};c.style=o;export{c as ic_layout_grid_item};
2
- //# sourceMappingURL=p-e1814e7e.entry.js.map
1
+ import{r as t,h as i,H as a,g as r}from"./p-8e4e97b4.js";const s=":host{grid-column:var(--ic-grid-item-col-start, 1) / span\n var(--ic-grid-item-col-span, var(--ic-layout-grid-col-span, 1)) !important;grid-row:var(--ic-grid-item-row-start, 1) / span\n var(--ic-grid-item-row-span, var(--ic-layout-grid-row-span, 1)) !important}@media only screen and (max-width: 576px){:host(.ic-layout-grid-hide-in-mobile){display:none}}";const o=s;const c=class{constructor(i){t(this,i);this.colSpan=1;this.colStart=1;this.hideInMobileMode=false;this.rowSpan=1;this.rowStart=1}watchColSpan(t){this.el.style.setProperty("--ic-grid-item-col-span",`${t}`)}watchColStart(t){this.el.style.setProperty("--ic-grid-item-col-start",`${t}`)}watchRowSpan(t){this.el.style.setProperty("--ic-grid-item-row-span",`${t}`)}watchRowStart(t){this.el.style.setProperty("--ic-grid-item-row-start",`${t}`)}componentWillLoad(){this.el.style.setProperty("--ic-grid-item-col-start",`${this.colStart}`);this.el.style.setProperty("--ic-grid-item-col-span",`${this.colSpan}`);this.el.style.setProperty("--ic-grid-item-row-start",`${this.rowStart}`);this.el.style.setProperty("--ic-grid-item-row-span",`${this.rowSpan}`)}render(){const{hideInMobileMode:t}=this;return i(a,{key:"9f576040938030f0d7fc61f5885ca73ab37a508b",class:{"ic-layout-grid-hide-in-mobile":!!t}},i("slot",{key:"b8f66ba2ef9651e99a0ce3b3caec2f021a55e723"}))}get el(){return r(this)}static get watchers(){return{colSpan:["watchColSpan"],colStart:["watchColStart"],rowSpan:["watchRowSpan"],rowStart:["watchRowStart"]}}};c.style=o;export{c as ic_layout_grid_item};
2
+ //# sourceMappingURL=p-cad23b7d.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as t,H as c,g as s}from"./p-8e4e97b4.js";import{r as a,l as o,k as r,o as n,m as l,q as d}from"./p-dbc8bf0c.js";import"./p-6215e2ae.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block;--ic-input-label-text-color:var(--ic-switch-label);--ic-input-label-helper-text-color:var(--ic-switch-help-text);--ic-input-label-helpertext-padding:var(--ic-space-xs)}input{overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ic-switch-container{display:flex;flex-wrap:wrap;align-items:center;cursor:pointer}.ic-switch-label{margin-left:var(--ic-space-xxs);margin-bottom:var(--ic-space-xs)}.ic-switch-label-small{margin-bottom:var(--ic-space-xs)}.ic-switch-toggle{display:flex;align-items:center;justify-content:space-around;width:4rem;height:var(--ic-space-xl);position:relative;border-radius:100vw;background-color:var(--ic-switch-unchecked-bg);border:var(--ic-border-width) solid var(--ic-switch-unchecked);box-sizing:border-box;transition:var(--ic-transition-duration-fast);margin-left:var(--ic-space-xxs)}.ic-switch-line-break{flex:1 0 100%}.ic-switch-toggle::before{content:"";width:1.333rem;height:1.333rem;border-radius:50%;position:absolute;z-index:2;top:50%;left:0.333rem;transform:translate(0, -50%);background-color:var(--ic-switch-unchecked);transition:var(--ic-transition-duration-slow)}.ic-switch-icon{display:inline-block;vertical-align:middle;width:0.625rem;height:0.625rem}.ic-switch-icon-circle,.ic-switch-icon-line{stroke-width:1}.ic-switch-icon-circle{stroke:var(--ic-switch-indicator-off)}.ic-switch-icon-line{stroke:var(--ic-switch-indicator-on)}@media (prefers-reduced-motion: reduce){.ic-switch-toggle::before{transition-duration:0ms}}.ic-switch-input:checked+.ic-switch-toggle{background-color:var(--ic-switch-checked-bg);border:none}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-xl), -50%);background-color:var(--ic-switch-checked)}.ic-switch-input:not([disabled])+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-switch-unchecked-bg-hover)}.ic-switch-input:not([disabled])+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-switch-unchecked-bg-pressed)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-switch-checked-bg-hover)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-switch-checked-bg-pressed)}.ic-switch-input:focus:not([disabled])+.ic-switch-toggle,.ic-switch-input:focus-visible:not([disabled])+.ic-switch-toggle{box-shadow:var(--ic-border-focus)}.ic-switch-disabled{cursor:default}.ic-switch-disabled .ic-switch-icon-circle{stroke:var(--ic-switch-indicator-off-disabled)}.ic-switch-disabled .ic-switch-icon-line{stroke:var(--ic-switch-indicator-on-disabled)}.ic-switch-input:disabled+.ic-switch-toggle{background-color:var(--ic-switch-unchecked-bg-disabled);border:var(--ic-space-1px) dashed var(--ic-switch-unchecked-outline-disabled)}.ic-switch-input:disabled+.ic-switch-toggle::before{background-color:var(--ic-switch-unchecked-disabled)}.ic-switch-input:disabled:checked+.ic-switch-toggle{background-color:var(--ic-switch-checked-bg-disabled);border:var(--ic-border-width) dashed\n var(--ic-switch-checked-outline-disabled)}.ic-switch-input:disabled:checked+.ic-switch-toggle::before{background-color:var(--ic-switch-checked)}.ic-switch-small .ic-switch-toggle{width:var(--ic-space-xxl);height:var(--ic-space-lg)}.ic-switch-small .ic-switch-toggle::before{width:var(--ic-space-md);height:var(--ic-space-md);left:var(--ic-space-xxs)}.ic-switch-small .ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-lg), -50%)}::slotted([slot="right-adornment"]){margin-left:var(--ic-space-sm);fill:var(--ic-switch-icon)}@media (forced-colors: active){.ic-switch-toggle::before,.ic-switch-input:checked+.ic-switch-toggle{border:var(--ic-border-hc)}.ic-switch-input:focus+.ic-switch-toggle{border-color:highlight;outline:var(--ic-space-xxxs) solid highlight}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(calc(var(--ic-space-xl) - 0.125rem), -50%)}.ic-switch-input:disabled+.ic-switch-toggle,.ic-switch-input:disabled:checked+.ic-switch-toggle,.ic-switch-input:disabled+.ic-switch-toggle::before{border-color:GrayText}.ic-switch-disabled .ic-switch-icon-circle,.ic-switch-disabled .ic-switch-icon-line{stroke:GrayText}}';const b=h;let p=0;const w=class{constructor(t){e(this,t);this.icBlur=i(this,"icBlur",7);this.icChange=i(this,"icChange",7);this.icFocus=i(this,"icFocus",7);this.inputId=`ic-switch-input-${p++}`;this.checkedState=false;this.initiallyChecked=this.checked;this.checked=false;this.disabled=false;this.helperText="";this.hideLabel=false;this.name=this.inputId;this.size="medium";this.theme="inherit";this.value="on";this.handleChange=()=>{this.checkedState=!this.checkedState;this.icChange.emit({checked:this.checkedState,value:this.value})};this.onFocus=()=>{this.icFocus.emit()};this.onBlur=()=>{this.icBlur.emit()};this.handleFormReset=()=>{this.checkedState=this.initiallyChecked}}checkedChangeHandler(){this.checkedState=!!this.checked}watchDisabledHandler(){a(this.disabled,this.el)}disconnectedCallback(){o(this.el,this.handleFormReset)}componentWillLoad(){this.checkedState=this.checked;r(this.el,this.handleFormReset);a(this.disabled,this.el)}componentDidLoad(){n([{prop:this.label,propName:"label"}],"Switch")}async setFocus(){var e,i;(i=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("input"))===null||i===void 0?void 0:i.focus()}render(){const{label:e,checkedState:i,size:s,disabled:a,name:o,value:r,hideLabel:n,helperText:h,inputId:b,theme:p}=this;const w=s==="small";l(this.el,i?r:"",o,a);return t(c,{key:"1e956030826e52752e8c7653b8da25af46f52426",class:{[`ic-theme-${p}`]:p!=="inherit"}},t("label",{key:"91501b821fe6124254ee768b372e064cd081fb16",class:{"ic-switch-container":true,"ic-switch-disabled":!!a,"ic-switch-small":w},htmlFor:b},!n&&t("ic-input-label",{key:"f9f89f3e0a580fd136efb7b7f896c74020a22b08",for:b,label:e,helperText:h,readonly:false,disabled:a,class:{"ic-switch-label":true,"ic-switch-label-small":w}},t("slot",{key:"ba6d621b604fb414e32b3610730faece841d30e6",name:"helper-text",slot:"helper-text"})),!n&&t("span",{key:"d2a675ea63e51c6f3a2c9e22494a4d04ea7d6376",class:"ic-switch-line-break"}),t("input",{key:"d0ebcc9c3119699b54ed088a511e050229e57b05",checked:i,disabled:a,"aria-label":e,"aria-checked":i?"true":"false","aria-describedby":d(this.el,b,h!=="",false),role:"switch",class:"ic-switch-input",type:"checkbox",name:"toggle",id:b,onFocus:this.onFocus,onBlur:this.onBlur,onChange:this.handleChange}),t("span",{key:"7f5c08f419bda58267c3664dc6d63ed5218310b6",class:"ic-switch-toggle"},t("svg",{key:"72c0c627015a5d4928b5b1301498b3b35bc07a9e",class:"ic-switch-icon","aria-hidden":"true",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t("line",{key:"82aa70d102ff0444cf751b2d180a9407cfa6f3fb",class:"ic-switch-icon-line",x1:"9",y1:w?"2":"1",x2:"9",y2:w?"8":"9"})),t("svg",{key:"2234f9200dd364dcb995e6f12d380ae141e6320a",class:"ic-switch-icon","aria-hidden":"true",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t("circle",{key:"60c2fbd7fc71a7e310d42b8b20c5c4483aa743a7",class:"ic-switch-icon-circle",fill:"none",cx:"5",cy:"5",r:w?"3.335":"4.445"}))),t("slot",{key:"eb81e7b8b1c6037e23074d407174060811af077e",name:"right-adornment"})))}static get delegatesFocus(){return true}get el(){return s(this)}static get watchers(){return{checked:["checkedChangeHandler"],disabled:["watchDisabledHandler"]}}};w.style=b;export{w as ic_switch};
2
- //# sourceMappingURL=p-6aa8d3ce.entry.js.map
1
+ import{r as e,c as i,h as t,H as c,g as s}from"./p-8e4e97b4.js";import{r as a,l as o,k as r,o as n,m as l,q as d}from"./p-b77b1e1f.js";import"./p-6215e2ae.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block;--ic-input-label-text-color:var(--ic-switch-label);--ic-input-label-helper-text-color:var(--ic-switch-help-text);--ic-input-label-helpertext-padding:var(--ic-space-xs)}input{overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ic-switch-container{display:flex;flex-wrap:wrap;align-items:center;cursor:pointer}.ic-switch-label{margin-left:var(--ic-space-xxs);margin-bottom:var(--ic-space-xs)}.ic-switch-label-small{margin-bottom:var(--ic-space-xs)}.ic-switch-toggle{display:flex;align-items:center;justify-content:space-around;width:4rem;height:var(--ic-space-xl);position:relative;border-radius:100vw;background-color:var(--ic-switch-unchecked-bg);border:var(--ic-border-width) solid var(--ic-switch-unchecked);box-sizing:border-box;transition:var(--ic-transition-duration-fast);margin-left:var(--ic-space-xxs)}.ic-switch-line-break{flex:1 0 100%}.ic-switch-toggle::before{content:"";width:1.333rem;height:1.333rem;border-radius:50%;position:absolute;z-index:2;top:50%;left:0.333rem;transform:translate(0, -50%);background-color:var(--ic-switch-unchecked);transition:var(--ic-transition-duration-slow)}.ic-switch-icon{display:inline-block;vertical-align:middle;width:0.625rem;height:0.625rem}.ic-switch-icon-circle,.ic-switch-icon-line{stroke-width:1}.ic-switch-icon-circle{stroke:var(--ic-switch-indicator-off)}.ic-switch-icon-line{stroke:var(--ic-switch-indicator-on)}@media (prefers-reduced-motion: reduce){.ic-switch-toggle::before{transition-duration:0ms}}.ic-switch-input:checked+.ic-switch-toggle{background-color:var(--ic-switch-checked-bg);border:none}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-xl), -50%);background-color:var(--ic-switch-checked)}.ic-switch-input:not([disabled])+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-switch-unchecked-bg-hover)}.ic-switch-input:not([disabled])+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-switch-unchecked-bg-pressed)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-switch-checked-bg-hover)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-switch-checked-bg-pressed)}.ic-switch-input:focus:not([disabled])+.ic-switch-toggle,.ic-switch-input:focus-visible:not([disabled])+.ic-switch-toggle{box-shadow:var(--ic-border-focus)}.ic-switch-disabled{cursor:default}.ic-switch-disabled .ic-switch-icon-circle{stroke:var(--ic-switch-indicator-off-disabled)}.ic-switch-disabled .ic-switch-icon-line{stroke:var(--ic-switch-indicator-on-disabled)}.ic-switch-input:disabled+.ic-switch-toggle{background-color:var(--ic-switch-unchecked-bg-disabled);border:var(--ic-space-1px) dashed var(--ic-switch-unchecked-outline-disabled)}.ic-switch-input:disabled+.ic-switch-toggle::before{background-color:var(--ic-switch-unchecked-disabled)}.ic-switch-input:disabled:checked+.ic-switch-toggle{background-color:var(--ic-switch-checked-bg-disabled);border:var(--ic-border-width) dashed\n var(--ic-switch-checked-outline-disabled)}.ic-switch-input:disabled:checked+.ic-switch-toggle::before{background-color:var(--ic-switch-checked)}.ic-switch-small .ic-switch-toggle{width:var(--ic-space-xxl);height:var(--ic-space-lg)}.ic-switch-small .ic-switch-toggle::before{width:var(--ic-space-md);height:var(--ic-space-md);left:var(--ic-space-xxs)}.ic-switch-small .ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-lg), -50%)}::slotted([slot="right-adornment"]){margin-left:var(--ic-space-sm);fill:var(--ic-switch-icon)}@media (forced-colors: active){.ic-switch-toggle::before,.ic-switch-input:checked+.ic-switch-toggle{border:var(--ic-border-hc)}.ic-switch-input:focus+.ic-switch-toggle{border-color:highlight;outline:var(--ic-space-xxxs) solid highlight}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(calc(var(--ic-space-xl) - 0.125rem), -50%)}.ic-switch-input:disabled+.ic-switch-toggle,.ic-switch-input:disabled:checked+.ic-switch-toggle,.ic-switch-input:disabled+.ic-switch-toggle::before{border-color:GrayText}.ic-switch-disabled .ic-switch-icon-circle,.ic-switch-disabled .ic-switch-icon-line{stroke:GrayText}}@media (prefers-reduced-motion: reduce){.ic-switch-toggle,.ic-switch-toggle::before{transition:none}}';const b=h;let p=0;const w=class{constructor(t){e(this,t);this.icBlur=i(this,"icBlur",7);this.icChange=i(this,"icChange",7);this.icFocus=i(this,"icFocus",7);this.inputId=`ic-switch-input-${p++}`;this.checkedState=false;this.initiallyChecked=this.checked;this.checked=false;this.disabled=false;this.helperText="";this.hideLabel=false;this.name=this.inputId;this.size="medium";this.theme="inherit";this.value="on";this.handleChange=()=>{this.checkedState=!this.checkedState;this.icChange.emit({checked:this.checkedState,value:this.value})};this.onFocus=()=>{this.icFocus.emit()};this.onBlur=()=>{this.icBlur.emit()};this.handleFormReset=()=>{this.checkedState=this.initiallyChecked}}checkedChangeHandler(){this.checkedState=!!this.checked}watchDisabledHandler(){a(this.disabled,this.el)}disconnectedCallback(){o(this.el,this.handleFormReset)}componentWillLoad(){this.checkedState=this.checked;r(this.el,this.handleFormReset);a(this.disabled,this.el)}componentDidLoad(){n([{prop:this.label,propName:"label"}],"Switch")}async setFocus(){var e,i;(i=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("input"))===null||i===void 0?void 0:i.focus()}render(){const{label:e,checkedState:i,size:s,disabled:a,name:o,value:r,hideLabel:n,helperText:h,inputId:b,theme:p}=this;const w=s==="small";l(this.el,i?r:"",o,a);return t(c,{key:"88d2bde84ec11e0b5e23de8b291684eae49ba48f",class:{[`ic-theme-${p}`]:p!=="inherit"}},t("label",{key:"46de14be85f760c6267141eb1fe36bc710a9e251",class:{"ic-switch-container":true,"ic-switch-disabled":!!a,"ic-switch-small":w},htmlFor:b},!n&&t("ic-input-label",{key:"c361f411bf189a5aae8c90e331bc5a07535c3b64",for:b,label:e,helperText:h,readonly:false,disabled:a,class:{"ic-switch-label":true,"ic-switch-label-small":w}},t("slot",{key:"d0ec1f628328f0e3938964248ac38c576ee602ce",name:"helper-text",slot:"helper-text"})),!n&&t("span",{key:"60474539357c0bd43823042d06e0292f1769a879",class:"ic-switch-line-break"}),t("input",{key:"e9f17d56e514e1a545fae25631c835a714515461",checked:i,disabled:a,"aria-label":e,"aria-checked":i?"true":"false","aria-describedby":d(this.el,b,h!=="",false),role:"switch",class:"ic-switch-input",type:"checkbox",name:"toggle",id:b,onFocus:this.onFocus,onBlur:this.onBlur,onChange:this.handleChange}),t("span",{key:"ec6530e9f6d0a9248d6104068a8dc08c98142d44",class:"ic-switch-toggle"},t("svg",{key:"9dbe1ccb311d5d3cf836b1db84f783f3f4aa1b1c",class:"ic-switch-icon","aria-hidden":"true",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t("line",{key:"019b9a398510349b9fbb41784aa01f77af2c482f",class:"ic-switch-icon-line",x1:"9",y1:w?"2":"1",x2:"9",y2:w?"8":"9"})),t("svg",{key:"36806f4ca85eb87212f155f42293cffc9d7b2f2e",class:"ic-switch-icon","aria-hidden":"true",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t("circle",{key:"5d34317d431ea7b8e10d6a379b02148b4fc69b4e",class:"ic-switch-icon-circle",fill:"none",cx:"5",cy:"5",r:w?"3.335":"4.445"}))),t("slot",{key:"bfb4599c8cfad3efa9466eefe7dc84b580a2a3d2",name:"right-adornment"})))}static get delegatesFocus(){return true}get el(){return s(this)}static get watchers(){return{checked:["checkedChangeHandler"],disabled:["watchDisabledHandler"]}}};w.style=b;export{w as ic_switch};
2
+ //# sourceMappingURL=p-cbca04bb.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icSwitchCss","IcSwitchStyle0","inputIds","Switch","constructor","hostRef","this","inputId","checkedState","initiallyChecked","checked","disabled","helperText","hideLabel","name","size","theme","value","handleChange","icChange","emit","onFocus","icFocus","onBlur","icBlur","handleFormReset","checkedChangeHandler","watchDisabledHandler","removeDisabledFalse","el","disconnectedCallback","removeFormResetListener","componentWillLoad","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","setFocus","_b","_a","shadowRoot","querySelector","focus","render","isSmall","renderHiddenInput","h","Host","key","class","htmlFor","for","readonly","slot","getInputDescribedByText","role","type","id","onChange","focusable","viewBox","xmlns","x1","y1","x2","y2","fill","cx","cy","r"],"sources":["src/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","src/components/ic-switch/ic-switch.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n\n --ic-input-label-text-color: var(--ic-switch-label);\n --ic-input-label-helper-text-color: var(--ic-switch-help-text);\n --ic-input-label-helpertext-padding: var(--ic-space-xs);\n}\n\ninput {\n overflow: hidden;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-xs);\n}\n\n.ic-switch-label-small {\n margin-bottom: var(--ic-space-xs);\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 4rem;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-switch-unchecked-bg);\n border: var(--ic-border-width) solid var(--ic-switch-unchecked);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 1.333rem;\n height: 1.333rem;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 0.333rem;\n transform: translate(0, -50%);\n background-color: var(--ic-switch-unchecked);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 0.625rem;\n height: 0.625rem;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-switch-indicator-off);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-switch-indicator-on);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-switch-checked-bg);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-switch-checked);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-unchecked-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-unchecked-bg-pressed);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-checked-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-checked-bg-pressed);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: var(--ic-border-focus);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-switch-indicator-off-disabled);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-switch-indicator-on-disabled);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-switch-unchecked-bg-disabled);\n border: var(--ic-space-1px) dashed var(--ic-switch-unchecked-outline-disabled);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-switch-unchecked-disabled);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-switch-checked-bg-disabled);\n border: var(--ic-border-width) dashed\n var(--ic-switch-checked-outline-disabled);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-switch-checked);\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted([slot=\"right-adornment\"]) {\n margin-left: var(--ic-space-sm);\n fill: var(--ic-switch-icon);\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-border-hc);\n }\n\n .ic-switch-input:focus + .ic-switch-toggle {\n border-color: highlight;\n outline: var(--ic-space-xxxs) solid highlight;\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 0.125rem), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle,\n .ic-switch-toggle::before {\n transition: none;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcSwitchChangeEventDetail } from \"./ic-switch.types\";\nimport { IcSizesNoLarge, IcThemeMode } from \"../../utils/types\";\n\nlet inputIds = 0;\n\n/**\n * @slot helper-text - Content is set as the helper text for the switch.\n * @slot right-adornment - Content is placed to the right of switch.\n */\n@Component({\n tag: \"ic-switch\",\n styleUrl: \"ic-switch.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Switch {\n private inputId = `ic-switch-input-${inputIds++}`;\n\n @Element() el: HTMLIcSwitchElement;\n\n @State() checkedState: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the switch will display as checked.\n */\n @Prop() checked?: boolean = false;\n\n @Watch(\"checked\")\n checkedChangeHandler(): void {\n this.checkedState = !!this.checked;\n }\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * The aria-label applied to the switch when no visual 'name' is provided.\n */\n @Prop() label!: string;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * The size of the switch component.\n */\n @Prop() size?: IcSizesNoLarge = \"medium\";\n\n /**\n * 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 @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a `<input type=\"checkbox\">`,\n * it's only used when the toggle participates in a native `<form>`.\n */\n @Prop() value?: string | null = \"on\";\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() icChange!: EventEmitter<IcSwitchChangeEventDetail>;\n\n /**\n * Emitted when the toggle has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.checkedState = this.checked!;\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Switch\"\n );\n }\n\n /**\n * Sets focus on the switch.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.el.shadowRoot?.querySelector(\"input\")?.focus();\n }\n\n private handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value!,\n });\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private handleFormReset = (): void => {\n this.checkedState = this.initiallyChecked!;\n };\n\n render() {\n const {\n label,\n checkedState,\n size,\n disabled,\n name,\n value,\n hideLabel,\n helperText,\n inputId,\n theme,\n } = this;\n\n const isSmall = size === \"small\";\n\n renderHiddenInput(this.el, checkedState ? value : \"\", name, disabled);\n\n return (\n <Host\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <label\n class={{\n \"ic-switch-container\": true,\n \"ic-switch-disabled\": !!disabled,\n \"ic-switch-small\": isSmall,\n }}\n htmlFor={inputId}\n >\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n readonly={false}\n disabled={disabled}\n class={{\n \"ic-switch-label\": true,\n \"ic-switch-label-small\": isSmall,\n }}\n >\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-input-label>\n )}\n {!hideLabel && <span class=\"ic-switch-line-break\"></span>}\n <input\n checked={checkedState}\n disabled={disabled}\n aria-label={label}\n aria-checked={checkedState ? \"true\" : \"false\"}\n aria-describedby={getInputDescribedByText(\n this.el,\n inputId,\n helperText !== \"\",\n false\n )}\n role=\"switch\"\n class=\"ic-switch-input\"\n type=\"checkbox\"\n name=\"toggle\"\n id={inputId}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.handleChange}\n />\n <span class=\"ic-switch-toggle\">\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n class=\"ic-switch-icon-line\"\n x1=\"9\"\n y1={isSmall ? \"2\" : \"1\"}\n x2=\"9\"\n y2={isSmall ? \"8\" : \"9\"}\n />\n </svg>\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"ic-switch-icon-circle\"\n fill=\"none\"\n cx=\"5\"\n cy=\"5\"\n r={isSmall ? \"3.335\" : \"4.445\"}\n />\n </svg>\n </span>\n <slot name=\"right-adornment\"></slot>\n </label>\n </Host>\n );\n }\n}\n"],"mappings":"+JAAA,MAAMA,EAAc,qmNACpB,MAAAC,EAAeD,ECsBf,IAAIE,EAAW,E,MAaFC,EAAM,MAPnB,WAAAC,CAAAC,G,6GAQUC,KAAAC,QAAU,mBAAmBL,MAI5BI,KAAAE,aAAwB,MACxBF,KAAAG,iBAAmBH,KAAKI,QAKzBJ,KAAAI,QAAoB,MAUpBJ,KAAAK,SAAqB,MASrBL,KAAAM,WAAsB,GAKtBN,KAAAO,UAAsB,MAUtBP,KAAAQ,KAAgBR,KAAKC,QAKrBD,KAAAS,KAAwB,SAKxBT,KAAAU,MAAsB,UAStBV,KAAAW,MAAwB,KA0CxBX,KAAAY,aAAe,KACrBZ,KAAKE,cAAgBF,KAAKE,aAC1BF,KAAKa,SAASC,KAAK,CACjBV,QAASJ,KAAKE,aACdS,MAAOX,KAAKW,OACZ,EAGIX,KAAAe,QAAU,KAChBf,KAAKgB,QAAQF,MAAM,EAGbd,KAAAiB,OAAS,KACfjB,KAAKkB,OAAOJ,MAAM,EAGZd,KAAAmB,gBAAkB,KACxBnB,KAAKE,aAAeF,KAAKG,gBAAiB,C,CA7G5C,oBAAAiB,GACEpB,KAAKE,eAAiBF,KAAKI,O,CAQ7B,oBAAAiB,GACEC,EAAoBtB,KAAKK,SAAUL,KAAKuB,G,CAyD1C,oBAAAC,GACEC,EAAwBzB,KAAKuB,GAAIvB,KAAKmB,gB,CAGxC,iBAAAO,GACE1B,KAAKE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GAAIpD,EACJc,QAASf,KAAKe,QACdE,OAAQjB,KAAKiB,OACbqC,SAAUtD,KAAKY,eAEjB8B,EAAA,QAAAE,IAAA,2CAAMC,MAAM,oBACVH,EAAA,OAAAE,IAAA,2CACEC,MAAM,iBAAgB,cACV,OACZU,UAAU,QACVC,QAAQ,YACRC,MAAM,8BAENf,EAAA,QAAAE,IAAA,2CACEC,MAAM,sBACNa,GAAG,IACHC,GAAInB,EAAU,IAAM,IACpBoB,GAAG,IACHC,GAAIrB,EAAU,IAAM,OAGxBE,EAAA,OAAAE,IAAA,2CACEC,MAAM,iBAAgB,cACV,OACZU,UAAU,QACVC,QAAQ,YACRC,MAAM,8BAENf,EAAA,UAAAE,IAAA,2CACEC,MAAM,wBACNiB,KAAK,OACLC,GAAG,IACHC,GAAG,IACHC,EAAGzB,EAAU,QAAU,YAI7BE,EAAA,QAAAE,IAAA,2CAAMpC,KAAK,qB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as e,H as s,g as a}from"./p-8e4e97b4.js";import{t as o,r as n,h as r,o as l,s as h}from"./p-dbc8bf0c.js";import"./p-6215e2ae.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-text-color:var(--ic-radio-button-input-field-label);--ic-input-label-helper-text-color:var(\n --ic-radio-button-input-field-subtitle\n );--ic-input-validation-status-text-color:var(--ic-radio-button-state-text);--ic-input-validation-error:var(--ic-radio-button-state-icon-error)}:host ic-input-label.error{--ic-input-label-text-color:var(--ic-radio-button-input-field-label-error)}:host ic-input-label.disabled{--ic-input-label-text-color:var(\n --ic-radio-button-input-field-label-disabled\n );--ic-input-label-helper-text-color:var(\n --ic-radio-button-input-field-subtitle-disabled\n )}:host ic-input-validation.show-validation{margin-top:var(--ic-space-sm)}:host(.ic-radio-group-small) ic-input-validation.show-validation{margin-top:calc(var(--ic-space-sm) / 2)}:host ic-input-label:not(.with-helper) .ic-typography-label,:host ic-input-label .helpertext{margin-bottom:var(--ic-space-sm)}:host(.ic-radio-group-small) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-radio-group-small) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) / 2)}:host ic-input-label .helpertext{display:block}:host .radio-buttons-container{display:flex;flex-direction:column;gap:var(--ic-space-xxs)}:host(.ic-radio-group-small) .radio-buttons-container{gap:var(--ic-space-xxxs)}:host .radio-buttons-container.horizontal{display:flex;flex-direction:row;gap:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-radio-group-small) .radio-buttons-container.horizontal{gap:var(--ic-space-xl)}';const c=d;const p=class{constructor(e){t(this,e);this.icChange=i(this,"icChange",7);this.resizeObserver=null;this.ADDITIONAL_FIELD="additional-field";this.RADIO_HORIZONTAL="horizontal";this.RADIO_VERTICAL="vertical";this.checkedValue="";this.selectedChild=-1;this.disabled=false;this.hideLabel=false;this.orientation="vertical";this.required=false;this.size="medium";this.validationAriaLive="polite";this.validationStatus="";this.validationText="";this.theme="inherit";this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.checkOrientation()}));this.resizeObserver.observe(this.el)};this.handleKeyDown=t=>{const i=Array.from(this.el.querySelectorAll('ic-text-field[slot="additional-field"]'));const e=document.activeElement;if(i.length>0&&this.radioOptions.map((t=>o(t,this.ADDITIONAL_FIELD)))&&i.map((t=>t==e))){return}t.stopPropagation();switch(t.key){case"ArrowDown":case"ArrowRight":this.radioOptions[this.getNextItemToSelect(this.selectedChild,true)].click();t.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.radioOptions[this.getNextItemToSelect(this.selectedChild,false)].click();t.preventDefault()}};this.getNextItemToSelect=(t,i)=>{const e=this.radioOptions.length-1;if(t<1){t=0}let s=i?t+1:t-1;if(s<0){s=e}else if(s>e){s=0}if(this.radioOptions[s].disabled){s=this.getNextItemToSelect(s,i)}return s};this.addSlotChangeListener=()=>{var t;(t=this.radioContainer)===null||t===void 0?void 0:t.addEventListener("slotchange",this.setRadioOptions)};this.setFirstRadioOptionTabIndex=t=>{this.radioOptions[0].setTabIndex(t)};this.setRadioOptions=()=>{this.selectedChild=-1;this.checkedValue="";this.radioOptions=Array.from(this.el.children).filter((t=>t.tagName==="IC-RADIO-OPTION"));if(this.radioOptions.length>0){this.radioOptions.forEach(((t,i)=>{if(!t.selected){t.selected=this.checkedValue===t.value}t.name=this.name;t.groupLabel=this.label;if(t.selected){this.selectedChild=i;this.checkedValue=t.value}if(this.disabled){t.disabled=true}}));this.setFirstRadioOptionTabIndex(this.selectedChild>0?-1:0);if(this.initialOrientation===this.RADIO_HORIZONTAL&&this.radioOptions!==undefined&&(this.radioOptions.length>2||this.radioOptions.length===2&&(o(this.radioOptions[0],this.ADDITIONAL_FIELD)||o(this.radioOptions[1],this.ADDITIONAL_FIELD)))){this.currentOrientation=this.RADIO_VERTICAL}}}}watchDisabledHandler(t){this.radioOptions.forEach((i=>i.disabled=t));n(this.disabled,this.el)}orientationChangeHandler(){this.initialOrientation=this.orientation;this.checkOrientation()}watchThemeHandler(t){this.radioOptions.forEach((i=>i.theme=t))}disconnectedCallback(){var t,i;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect();(i=this.radioContainer)===null||i===void 0?void 0:i.removeEventListener("slotchange",this.setRadioOptions)}componentWillLoad(){n(this.disabled,this.el);this.orientationChangeHandler();this.currentOrientation=this.initialOrientation}componentDidLoad(){this.setRadioOptions();r(this.runResizeObserver);this.addSlotChangeListener();l([{prop:this.label,propName:"label"},{prop:this.name,propName:"name"}],"Radio Group");this.watchThemeHandler(this.theme)}selectHandler({detail:t,target:i}){var e;const s=i;if(s.parentElement===this.el){this.checkedValue=t.value;this.icChange.emit({value:this.checkedValue,selectedOption:{radio:s,textFieldValue:(e=s===null||s===void 0?void 0:s.querySelector("ic-text-field"))===null||e===void 0?void 0:e.value}});if(this.radioOptions!==undefined){this.radioOptions.forEach(((t,i)=>{t.selected=s===t;if(t.selected){this.selectedChild=i}}));this.setFirstRadioOptionTabIndex(this.selectedChild>0?-1:0)}}}changeHandler(){var t;const i=(t=this.radioOptions)===null||t===void 0?void 0:t.findIndex((t=>t.selected));if(i<0){this.setFirstRadioOptionTabIndex(0);this.selectedChild=i}}checkOrientation(){if(this.initialOrientation===this.RADIO_HORIZONTAL){let t=0;if(Array.isArray(this.radioOptions)&&this.radioOptions.length>0){this.radioOptions.forEach((({clientWidth:i},e,s)=>{t+=i;if(e<s.length-1)t+=40}))}else{t=0}if(this.initialOrientation==this.RADIO_HORIZONTAL){if(this.radioOptions!==undefined&&(this.radioOptions.length>2||this.radioOptions.length===2&&(o(this.radioOptions[0],this.ADDITIONAL_FIELD)||o(this.radioOptions[1],this.ADDITIONAL_FIELD)))){this.currentOrientation=this.RADIO_VERTICAL}else{if(this.radioContainer){if(t>=this.radioContainer.clientWidth){this.currentOrientation=this.RADIO_VERTICAL}else if(t<this.radioContainer.clientWidth){this.currentOrientation=this.RADIO_HORIZONTAL}}}}}}render(){const{currentOrientation:t,disabled:i,handleKeyDown:a,helperText:o,hideLabel:n,label:r,required:l,size:d,validationAriaLive:c,validationStatus:p,validationText:b,theme:u}=this;const f=h(p,i);return e(s,{key:"25d850a9a73e2265885ff67613cd37cc53977035",onKeyDown:a,class:{"ic-radio-group-small":d==="small",[`ic-theme-${u}`]:u!=="inherit"}},e("fieldset",{key:"960443c48d0cb2effadd20aa779be9bbef59fc48",role:"radiogroup",id:this.name,"aria-required":`${l}`},!n&&e("legend",{key:"592a145f2f9fbbcc167a441934a1f766f2c333be"},e("ic-input-label",{key:"1179db21f6db7f58b33bb96155ab275e26ecf5e9",class:{[`${p}`]:true,["disabled"]:!!i},label:r,helperText:o,required:l,disabled:i},e("slot",{key:"52e567ae7f3ab59c7411ce2c0a5dcbdfdc551c29",name:"helper-text",slot:"helper-text"}))),e("div",{key:"bf72aff8d51ae2a0f223f020ec9c69877a95b1fe",class:{"radio-buttons-container":true,horizontal:t===this.RADIO_HORIZONTAL},ref:t=>this.radioContainer=t},e("slot",{key:"d849d16ff6abc505a8d282ff860784751c04c7ff"}))),e("ic-input-validation",{key:"9708482107b5d8614c01177f9d5ed60a03791d9e",class:{"show-validation":f},ariaLiveMode:c,status:f?p:"",message:f?b:""}))}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],orientation:["orientationChangeHandler"],theme:["watchThemeHandler"]}}};p.style=c;export{p as ic_radio_group};
2
- //# sourceMappingURL=p-e176881a.entry.js.map
1
+ import{r as t,c as i,h as e,H as s,g as a}from"./p-8e4e97b4.js";import{t as o,r as n,h as r,o as l,s as h}from"./p-b77b1e1f.js";import"./p-6215e2ae.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-text-color:var(--ic-radio-button-input-field-label);--ic-input-label-helper-text-color:var(\n --ic-radio-button-input-field-subtitle\n );--ic-input-validation-status-text-color:var(--ic-radio-button-state-text);--ic-input-validation-error:var(--ic-radio-button-state-icon-error)}:host ic-input-label.error{--ic-input-label-text-color:var(--ic-radio-button-input-field-label-error)}:host ic-input-label.disabled{--ic-input-label-text-color:var(\n --ic-radio-button-input-field-label-disabled\n );--ic-input-label-helper-text-color:var(\n --ic-radio-button-input-field-subtitle-disabled\n )}:host ic-input-validation.show-validation{margin-top:var(--ic-space-sm)}:host(.ic-radio-group-small) ic-input-validation.show-validation{margin-top:calc(var(--ic-space-sm) / 2)}:host ic-input-label:not(.with-helper) .ic-typography-label,:host ic-input-label .helpertext{margin-bottom:var(--ic-space-sm)}:host(.ic-radio-group-small) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-radio-group-small) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) / 2)}:host ic-input-label .helpertext{display:block}:host .radio-buttons-container{display:flex;flex-direction:column;gap:var(--ic-space-xxs)}:host(.ic-radio-group-small) .radio-buttons-container{gap:var(--ic-space-xxxs)}:host .radio-buttons-container.horizontal{display:flex;flex-direction:row;gap:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-radio-group-small) .radio-buttons-container.horizontal{gap:var(--ic-space-xl)}';const c=d;const b=class{constructor(e){t(this,e);this.icChange=i(this,"icChange",7);this.resizeObserver=null;this.ADDITIONAL_FIELD="additional-field";this.RADIO_HORIZONTAL="horizontal";this.RADIO_VERTICAL="vertical";this.checkedValue="";this.selectedChild=-1;this.disabled=false;this.hideLabel=false;this.orientation="vertical";this.required=false;this.size="medium";this.validationAriaLive="polite";this.validationStatus="";this.validationText="";this.theme="inherit";this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.checkOrientation()}));this.resizeObserver.observe(this.el)};this.handleKeyDown=t=>{const i=Array.from(this.el.querySelectorAll('ic-text-field[slot="additional-field"]'));const e=document.activeElement;if(i.length>0&&this.radioOptions.map((t=>o(t,this.ADDITIONAL_FIELD)))&&i.map((t=>t==e))){return}t.stopPropagation();switch(t.key){case"ArrowDown":case"ArrowRight":this.radioOptions[this.getNextItemToSelect(this.selectedChild,true)].click();t.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.radioOptions[this.getNextItemToSelect(this.selectedChild,false)].click();t.preventDefault()}};this.getNextItemToSelect=(t,i)=>{const e=this.radioOptions.length-1;if(t<1){t=0}let s=i?t+1:t-1;if(s<0){s=e}else if(s>e){s=0}if(this.radioOptions[s].disabled){s=this.getNextItemToSelect(s,i)}return s};this.addSlotChangeListener=()=>{var t;(t=this.radioContainer)===null||t===void 0?void 0:t.addEventListener("slotchange",this.setRadioOptions)};this.setFirstRadioOptionTabIndex=t=>{this.radioOptions[0].setTabIndex(t)};this.setRadioOptions=()=>{this.selectedChild=-1;this.checkedValue="";this.radioOptions=Array.from(this.el.children).filter((t=>t.tagName==="IC-RADIO-OPTION"));if(this.radioOptions.length>0){this.radioOptions.forEach(((t,i)=>{if(!t.selected){t.selected=this.checkedValue===t.value}t.name=this.name;t.groupLabel=this.label;if(t.selected){this.selectedChild=i;this.checkedValue=t.value}if(this.disabled){t.disabled=true}}));this.setFirstRadioOptionTabIndex(this.selectedChild>0?-1:0);if(this.initialOrientation===this.RADIO_HORIZONTAL&&this.radioOptions!==undefined&&(this.radioOptions.length>2||this.radioOptions.length===2&&(o(this.radioOptions[0],this.ADDITIONAL_FIELD)||o(this.radioOptions[1],this.ADDITIONAL_FIELD)))){this.currentOrientation=this.RADIO_VERTICAL}}}}watchDisabledHandler(t){this.radioOptions.forEach((i=>i.disabled=t));n(this.disabled,this.el)}orientationChangeHandler(){this.initialOrientation=this.orientation;this.checkOrientation()}watchThemeHandler(t){this.radioOptions.forEach((i=>i.theme=t))}disconnectedCallback(){var t,i;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect();(i=this.radioContainer)===null||i===void 0?void 0:i.removeEventListener("slotchange",this.setRadioOptions)}componentWillLoad(){n(this.disabled,this.el);this.orientationChangeHandler();this.currentOrientation=this.initialOrientation}componentDidLoad(){this.setRadioOptions();r(this.runResizeObserver);this.addSlotChangeListener();l([{prop:this.label,propName:"label"},{prop:this.name,propName:"name"}],"Radio Group");this.watchThemeHandler(this.theme)}selectHandler({detail:t,target:i}){var e;const s=i;if(s.parentElement===this.el){this.checkedValue=t.value;this.icChange.emit({value:this.checkedValue,selectedOption:{radio:s,textFieldValue:(e=s===null||s===void 0?void 0:s.querySelector("ic-text-field"))===null||e===void 0?void 0:e.value}});if(this.radioOptions!==undefined){this.radioOptions.forEach(((t,i)=>{t.selected=s===t;if(t.selected){this.selectedChild=i}}));this.setFirstRadioOptionTabIndex(this.selectedChild>0?-1:0)}}}changeHandler(){var t;const i=(t=this.radioOptions)===null||t===void 0?void 0:t.findIndex((t=>t.selected));if(i<0){this.setFirstRadioOptionTabIndex(0);this.selectedChild=i}}checkOrientation(){if(this.initialOrientation===this.RADIO_HORIZONTAL){let t=0;if(Array.isArray(this.radioOptions)&&this.radioOptions.length>0){this.radioOptions.forEach((({clientWidth:i},e,s)=>{t+=i;if(e<s.length-1)t+=40}))}else{t=0}if(this.initialOrientation==this.RADIO_HORIZONTAL){if(this.radioOptions!==undefined&&(this.radioOptions.length>2||this.radioOptions.length===2&&(o(this.radioOptions[0],this.ADDITIONAL_FIELD)||o(this.radioOptions[1],this.ADDITIONAL_FIELD)))){this.currentOrientation=this.RADIO_VERTICAL}else{if(this.radioContainer){if(t>=this.radioContainer.clientWidth){this.currentOrientation=this.RADIO_VERTICAL}else if(t<this.radioContainer.clientWidth){this.currentOrientation=this.RADIO_HORIZONTAL}}}}}}render(){const{currentOrientation:t,disabled:i,handleKeyDown:a,helperText:o,hideLabel:n,label:r,required:l,size:d,validationAriaLive:c,validationStatus:b,validationText:p,theme:u}=this;const f=h(b,i);return e(s,{key:"0a0b04bb7266c3400e22dd26cdbde025b1bf8a72",onKeyDown:a,class:{"ic-radio-group-small":d==="small",[`ic-theme-${u}`]:u!=="inherit"}},e("fieldset",{key:"8d6fb8bcce4573ce461d09cf9a07783b95e47ab9",role:"radiogroup",id:this.name,"aria-required":`${l}`},!n&&e("legend",{key:"b9a0ff7e81c30100b137e35bdd6c24c71b00b385"},e("ic-input-label",{key:"078b3ecfe62746c6e91a9f61435c56825b746a5e",class:{[`${b}`]:true,["disabled"]:!!i},label:r,helperText:o,required:l,disabled:i},e("slot",{key:"2b071159427e09d3e69945a2460283c32bcf7e97",name:"helper-text",slot:"helper-text"}))),e("div",{key:"7dac840c03547d56606dbc82031cc2b237b0600d",class:{"radio-buttons-container":true,horizontal:t===this.RADIO_HORIZONTAL},ref:t=>this.radioContainer=t},e("slot",{key:"324a042d9a015f25d4e831617575830f02f5df08"}))),e("ic-input-validation",{key:"6cab446cc36cb7af4dc48e7ee4e13e72568bb571",class:{"show-validation":f},ariaLiveMode:c,status:f?b:"",message:f?p:""}))}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],orientation:["orientationChangeHandler"],theme:["watchThemeHandler"]}}};b.style=c;export{b as ic_radio_group};
2
+ //# sourceMappingURL=p-cc64e5ef.entry.js.map