@ukic/web-components 2.1.0-beta.10 → 2.1.0-beta.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (584) hide show
  1. package/dist/cjs/chevron-icon-2bb3a907.js +10 -0
  2. package/dist/cjs/chevron-icon-2bb3a907.js.map +1 -0
  3. package/dist/cjs/core.cjs.js +1 -1
  4. package/dist/cjs/{helpers-6eb26e7a.js → helpers-2021e212.js} +3 -2
  5. package/dist/cjs/helpers-2021e212.js.map +1 -0
  6. package/dist/cjs/ic-alert.cjs.entry.js +2 -2
  7. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -2
  9. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-breadcrumb.cjs.entry.js +4 -4
  12. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-button_3.cjs.entry.js +38 -10
  14. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-card.cjs.entry.js +5 -5
  16. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-checkbox-group.cjs.entry.js +3 -3
  18. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-checkbox.cjs.entry.js +4 -3
  20. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-chip.cjs.entry.js +2 -2
  22. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-data-entity.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
  26. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-divider.cjs.entry.js +2 -2
  28. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  31. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-hero.cjs.entry.js +4 -2
  34. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +10 -4
  36. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +14 -8
  38. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-link.cjs.entry.js +3 -3
  41. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-menu-group.cjs.entry.js +24 -0
  43. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -0
  44. package/dist/cjs/ic-menu-item.cjs.entry.js +120 -0
  45. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -0
  46. package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
  47. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-navigation-group.cjs.entry.js +4 -4
  49. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-navigation-item.cjs.entry.js +5 -4
  51. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-navigation-menu.cjs.entry.js +2 -2
  53. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-page-header.cjs.entry.js +2 -2
  55. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-popover-menu.cjs.entry.js +237 -0
  57. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -0
  58. package/dist/cjs/ic-radio-group.cjs.entry.js +3 -3
  59. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-radio-option.cjs.entry.js +3 -3
  61. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-search-bar.cjs.entry.js +5 -3
  63. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-select.cjs.entry.js +16 -23
  65. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-side-navigation.cjs.entry.js +5 -5
  67. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-status-tag.cjs.entry.js +2 -2
  69. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  71. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  73. package/dist/cjs/ic-switch.cjs.entry.js +2 -2
  74. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-tab-context.cjs.entry.js +41 -4
  76. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -2
  78. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-tab-panel.cjs.entry.js +10 -1
  80. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-tab.cjs.entry.js +13 -1
  82. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-text-field.cjs.entry.js +37 -9
  84. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  86. package/dist/cjs/ic-toast.cjs.entry.js +6 -2
  87. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-top-navigation.cjs.entry.js +6 -2
  89. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  91. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  92. package/dist/cjs/index-f79a4e53.js +12 -0
  93. package/dist/cjs/loader.cjs.js +1 -1
  94. package/dist/cjs/types-3eb02246.js.map +1 -1
  95. package/dist/collection/collection-manifest.json +3 -0
  96. package/dist/collection/components/ic-alert/ic-alert.css +1 -1
  97. package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +3 -3
  98. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +19 -4
  99. package/dist/collection/components/ic-button/ic-button.css +1 -1
  100. package/dist/collection/components/ic-button/ic-button.js +120 -2
  101. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  102. package/dist/collection/components/ic-card/ic-card.css +30 -9
  103. package/dist/collection/components/ic-card/ic-card.js +2 -2
  104. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  105. package/dist/collection/components/ic-checkbox/ic-checkbox.css +7 -7
  106. package/dist/collection/components/ic-checkbox/ic-checkbox.js +20 -1
  107. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  108. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +3 -3
  109. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +1 -1
  110. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  111. package/dist/collection/components/ic-chip/ic-chip.css +11 -10
  112. package/dist/collection/components/ic-data-entity/ic-data-entity.css +1 -1
  113. package/dist/collection/components/ic-data-row/ic-data-row.css +1 -1
  114. package/dist/collection/components/ic-divider/ic-divider.css +1 -1
  115. package/dist/collection/components/ic-footer-link/ic-footer-link.css +16 -3
  116. package/dist/collection/components/ic-hero/ic-hero.css +23 -22
  117. package/dist/collection/components/ic-hero/ic-hero.js +2 -0
  118. package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
  119. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.css +4 -8
  120. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +8 -2
  121. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
  122. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +6 -5
  123. package/dist/collection/components/ic-link/ic-link.css +16 -3
  124. package/dist/collection/components/ic-link/ic-link.js +6 -3
  125. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  126. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +4 -4
  127. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +11 -3
  128. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
  129. package/dist/collection/components/ic-menu/ic-menu.css +9 -9
  130. package/dist/collection/components/ic-menu/ic-menu.js +12 -6
  131. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  132. package/dist/collection/components/ic-menu-group/ic-menu-group.css +465 -0
  133. package/dist/collection/components/ic-menu-group/ic-menu-group.js +45 -0
  134. package/dist/collection/components/ic-menu-group/ic-menu-group.js.map +1 -0
  135. package/dist/collection/components/ic-menu-item/ic-menu-item.css +633 -0
  136. package/dist/collection/components/ic-menu-item/ic-menu-item.js +392 -0
  137. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -0
  138. package/dist/collection/components/ic-menu-item/ic-menu-item.types.js +2 -0
  139. package/dist/collection/components/ic-menu-item/ic-menu-item.types.js.map +1 -0
  140. package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +4 -0
  141. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +2 -2
  142. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +2 -2
  143. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +1 -0
  144. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  145. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css +18 -14
  146. package/dist/collection/components/ic-page-header/ic-page-header.css +1 -1
  147. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +535 -0
  148. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +433 -0
  149. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -0
  150. package/dist/collection/components/ic-popover-menu/ic-popover-menu.test.a11y.js +13 -0
  151. package/dist/collection/components/ic-popover-menu/ic-popover-menu.test.a11y.js.map +1 -0
  152. package/dist/collection/components/ic-radio-group/ic-radio-group.css +4 -4
  153. package/dist/collection/components/ic-radio-group/ic-radio-group.js +1 -1
  154. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  155. package/dist/collection/components/ic-radio-option/ic-radio-option.css +6 -6
  156. package/dist/collection/components/ic-radio-option/ic-radio-option.js +1 -1
  157. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  158. package/dist/collection/components/ic-search-bar/ic-search-bar.css +6 -6
  159. package/dist/collection/components/ic-search-bar/ic-search-bar.js +3 -1
  160. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  161. package/dist/collection/components/ic-select/ic-select.css +17 -17
  162. package/dist/collection/components/ic-select/ic-select.js +19 -23
  163. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  164. package/dist/collection/components/ic-side-navigation/ic-side-navigation-test-examples.js +90 -0
  165. package/dist/collection/components/ic-side-navigation/ic-side-navigation-test-examples.js.map +1 -1
  166. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +7 -4
  167. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +1 -1
  168. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  169. package/dist/collection/components/ic-status-tag/ic-status-tag.css +8 -7
  170. package/dist/collection/components/ic-step/ic-step.css +1 -1
  171. package/dist/collection/components/ic-switch/ic-switch.css +4 -4
  172. package/dist/collection/components/ic-tab/ic-tab.css +4 -4
  173. package/dist/collection/components/ic-tab/ic-tab.js +50 -0
  174. package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
  175. package/dist/collection/components/ic-tab-context/ic-tab-context.js +79 -4
  176. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  177. package/dist/collection/components/ic-tab-group/ic-tab-group.css +1 -1
  178. package/dist/collection/components/ic-tab-group/ic-tab-group.js +6 -2
  179. package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
  180. package/dist/collection/components/ic-tab-panel/ic-tab-panel.css +0 -4
  181. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +56 -3
  182. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js.map +1 -1
  183. package/dist/collection/components/ic-text-field/ic-text-field.css +2 -3
  184. package/dist/collection/components/ic-text-field/ic-text-field.js +73 -7
  185. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  186. package/dist/collection/components/ic-toast/ic-toast.css +5 -0
  187. package/dist/collection/components/ic-toast/ic-toast.js +7 -3
  188. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  189. package/dist/collection/components/ic-tooltip/ic-tooltip.js +6 -2
  190. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  191. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +12 -15
  192. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +4 -0
  193. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  194. package/dist/collection/components/ic-typography/ic-typography.css +19 -1
  195. package/dist/collection/components/ic-typography/ic-typography.js +1 -1
  196. package/dist/collection/utils/helpers.js +1 -1
  197. package/dist/collection/utils/helpers.js.map +1 -1
  198. package/dist/collection/utils/types.js.map +1 -1
  199. package/dist/components/helpers.js +2 -2
  200. package/dist/components/helpers.js.map +1 -1
  201. package/dist/components/ic-alert.js +1 -1
  202. package/dist/components/ic-alert.js.map +1 -1
  203. package/dist/components/ic-back-to-top.js +1 -1
  204. package/dist/components/ic-back-to-top.js.map +1 -1
  205. package/dist/components/ic-breadcrumb2.js +1 -1
  206. package/dist/components/ic-breadcrumb2.js.map +1 -1
  207. package/dist/components/ic-button2.js +25 -3
  208. package/dist/components/ic-button2.js.map +1 -1
  209. package/dist/components/ic-card.js +3 -3
  210. package/dist/components/ic-card.js.map +1 -1
  211. package/dist/components/ic-checkbox-group.js +2 -2
  212. package/dist/components/ic-checkbox-group.js.map +1 -1
  213. package/dist/components/ic-checkbox.js +4 -2
  214. package/dist/components/ic-checkbox.js.map +1 -1
  215. package/dist/components/ic-chip.js +1 -1
  216. package/dist/components/ic-chip.js.map +1 -1
  217. package/dist/components/ic-data-entity.js +1 -1
  218. package/dist/components/ic-data-entity.js.map +1 -1
  219. package/dist/components/ic-data-row.js +1 -1
  220. package/dist/components/ic-data-row.js.map +1 -1
  221. package/dist/components/ic-divider2.js +1 -1
  222. package/dist/components/ic-divider2.js.map +1 -1
  223. package/dist/components/ic-footer-link.js +1 -1
  224. package/dist/components/ic-footer-link.js.map +1 -1
  225. package/dist/components/ic-hero.js +3 -1
  226. package/dist/components/ic-hero.js.map +1 -1
  227. package/dist/components/ic-horizontal-scroll2.js +10 -4
  228. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  229. package/dist/components/ic-input-component-container2.js +1 -1
  230. package/dist/components/ic-input-component-container2.js.map +1 -1
  231. package/dist/components/ic-link2.js +2 -2
  232. package/dist/components/ic-link2.js.map +1 -1
  233. package/dist/components/ic-loading-indicator2.js +12 -4
  234. package/dist/components/ic-loading-indicator2.js.map +1 -1
  235. package/dist/components/ic-menu-group.d.ts +11 -0
  236. package/dist/components/ic-menu-group.js +46 -0
  237. package/dist/components/ic-menu-group.js.map +1 -0
  238. package/dist/components/ic-menu-item.d.ts +11 -0
  239. package/dist/components/ic-menu-item.js +8 -0
  240. package/dist/components/ic-menu-item.js.map +1 -0
  241. package/dist/components/ic-menu-item2.js +167 -0
  242. package/dist/components/ic-menu-item2.js.map +1 -0
  243. package/dist/components/ic-menu2.js +13 -8
  244. package/dist/components/ic-menu2.js.map +1 -1
  245. package/dist/components/ic-navigation-button.js +1 -1
  246. package/dist/components/ic-navigation-button.js.map +1 -1
  247. package/dist/components/ic-navigation-group.js +1 -1
  248. package/dist/components/ic-navigation-group.js.map +1 -1
  249. package/dist/components/ic-navigation-item.js +2 -1
  250. package/dist/components/ic-navigation-item.js.map +1 -1
  251. package/dist/components/ic-navigation-menu2.js +2 -2
  252. package/dist/components/ic-navigation-menu2.js.map +1 -1
  253. package/dist/components/ic-page-header.js +1 -1
  254. package/dist/components/ic-page-header.js.map +1 -1
  255. package/dist/components/ic-popover-menu.d.ts +11 -0
  256. package/dist/components/ic-popover-menu.js +291 -0
  257. package/dist/components/ic-popover-menu.js.map +1 -0
  258. package/dist/components/ic-radio-group.js +2 -2
  259. package/dist/components/ic-radio-group.js.map +1 -1
  260. package/dist/components/ic-radio-option.js +3 -3
  261. package/dist/components/ic-radio-option.js.map +1 -1
  262. package/dist/components/ic-search-bar.js +5 -3
  263. package/dist/components/ic-search-bar.js.map +1 -1
  264. package/dist/components/ic-select.js +16 -23
  265. package/dist/components/ic-select.js.map +1 -1
  266. package/dist/components/ic-side-navigation.js +3 -3
  267. package/dist/components/ic-side-navigation.js.map +1 -1
  268. package/dist/components/ic-status-tag.js +1 -1
  269. package/dist/components/ic-status-tag.js.map +1 -1
  270. package/dist/components/ic-step.js +1 -1
  271. package/dist/components/ic-step.js.map +1 -1
  272. package/dist/components/ic-stepper.js +1 -1
  273. package/dist/components/ic-switch.js +1 -1
  274. package/dist/components/ic-switch.js.map +1 -1
  275. package/dist/components/ic-tab-context.js +44 -6
  276. package/dist/components/ic-tab-context.js.map +1 -1
  277. package/dist/components/ic-tab-group.js +2 -1
  278. package/dist/components/ic-tab-group.js.map +1 -1
  279. package/dist/components/ic-tab-panel.js +11 -2
  280. package/dist/components/ic-tab-panel.js.map +1 -1
  281. package/dist/components/ic-tab.js +13 -1
  282. package/dist/components/ic-tab.js.map +1 -1
  283. package/dist/components/ic-text-field2.js +41 -9
  284. package/dist/components/ic-text-field2.js.map +1 -1
  285. package/dist/components/ic-theme.js +1 -1
  286. package/dist/components/ic-toast.js +9 -5
  287. package/dist/components/ic-toast.js.map +1 -1
  288. package/dist/components/ic-tooltip2.js +6 -2
  289. package/dist/components/ic-tooltip2.js.map +1 -1
  290. package/dist/components/ic-top-navigation.js +6 -2
  291. package/dist/components/ic-top-navigation.js.map +1 -1
  292. package/dist/components/ic-typography2.js +1 -1
  293. package/dist/components/ic-typography2.js.map +1 -1
  294. package/dist/components/index.d.ts +3 -0
  295. package/dist/components/index.js +3 -0
  296. package/dist/components/index.js.map +1 -1
  297. package/dist/components/types.js.map +1 -1
  298. package/dist/core/core.css +8 -3
  299. package/dist/core/core.esm.js +1 -1
  300. package/dist/core/core.esm.js.map +1 -1
  301. package/dist/core/{p-24240e11.js → p-06321d19.js} +2 -2
  302. package/dist/core/p-08535d97.entry.js +2 -0
  303. package/dist/core/p-08535d97.entry.js.map +1 -0
  304. package/dist/core/{p-284970bc.entry.js → p-0a463a65.entry.js} +2 -2
  305. package/dist/core/p-0d4ccf6a.entry.js +2 -0
  306. package/dist/core/p-0d4ccf6a.entry.js.map +1 -0
  307. package/dist/core/{p-3dda76db.entry.js → p-0f0dfa16.entry.js} +2 -2
  308. package/dist/core/p-0f0dfa16.entry.js.map +1 -0
  309. package/dist/core/p-186ecccd.entry.js +2 -0
  310. package/dist/core/p-186ecccd.entry.js.map +1 -0
  311. package/dist/core/{p-c9068822.entry.js → p-1bd4d07e.entry.js} +2 -2
  312. package/dist/core/p-1bd4d07e.entry.js.map +1 -0
  313. package/dist/core/{p-7fd50355.entry.js → p-1e0174dc.entry.js} +2 -2
  314. package/dist/core/p-1e0174dc.entry.js.map +1 -0
  315. package/dist/core/p-28b2158b.entry.js +2 -0
  316. package/dist/core/p-28b2158b.entry.js.map +1 -0
  317. package/dist/core/p-3453aa9c.entry.js +2 -0
  318. package/dist/core/p-3453aa9c.entry.js.map +1 -0
  319. package/dist/core/p-3d84a743.entry.js +2 -0
  320. package/dist/core/p-3d84a743.entry.js.map +1 -0
  321. package/dist/core/{p-1724000c.js → p-3dea2867.js} +2 -2
  322. package/dist/core/p-3dea2867.js.map +1 -0
  323. package/dist/core/{p-35a03442.entry.js → p-41459307.entry.js} +2 -2
  324. package/dist/core/p-41459307.entry.js.map +1 -0
  325. package/dist/core/p-4269584a.entry.js +2 -0
  326. package/dist/core/p-4269584a.entry.js.map +1 -0
  327. package/dist/core/p-4d8392fe.entry.js +2 -0
  328. package/dist/core/p-4d8392fe.entry.js.map +1 -0
  329. package/dist/core/p-58ff516f.entry.js +2 -0
  330. package/dist/core/p-58ff516f.entry.js.map +1 -0
  331. package/dist/core/p-65b94ddb.entry.js +2 -0
  332. package/dist/core/p-65b94ddb.entry.js.map +1 -0
  333. package/dist/core/p-68c84039.entry.js +2 -0
  334. package/dist/core/p-68c84039.entry.js.map +1 -0
  335. package/dist/core/p-6c9ce0ec.entry.js +2 -0
  336. package/dist/core/p-6c9ce0ec.entry.js.map +1 -0
  337. package/dist/core/p-6e1f5022.entry.js +2 -0
  338. package/dist/core/p-6e1f5022.entry.js.map +1 -0
  339. package/dist/core/p-6f57b13c.js.map +1 -1
  340. package/dist/core/{p-7a9bc7f2.entry.js → p-741b4ea3.entry.js} +2 -2
  341. package/dist/core/{p-ed6cf9b9.entry.js → p-74a768bc.entry.js} +2 -2
  342. package/dist/core/p-74a768bc.entry.js.map +1 -0
  343. package/dist/core/p-759c80a3.entry.js +2 -0
  344. package/dist/core/p-759c80a3.entry.js.map +1 -0
  345. package/dist/core/p-7c2b09c8.entry.js +2 -0
  346. package/dist/core/p-7c2b09c8.entry.js.map +1 -0
  347. package/dist/core/{p-41e239cb.entry.js → p-7e309c50.entry.js} +2 -2
  348. package/dist/core/p-7e309c50.entry.js.map +1 -0
  349. package/dist/core/p-8959dd7d.entry.js +2 -0
  350. package/dist/core/p-8959dd7d.entry.js.map +1 -0
  351. package/dist/core/{p-c4a7c734.entry.js → p-8c9cc4d5.entry.js} +2 -2
  352. package/dist/core/p-90d6dbd6.entry.js +2 -0
  353. package/dist/core/p-90d6dbd6.entry.js.map +1 -0
  354. package/dist/core/{p-ba8d6c23.entry.js → p-977af213.entry.js} +2 -2
  355. package/dist/core/p-977af213.entry.js.map +1 -0
  356. package/dist/core/p-9daae2ae.entry.js +2 -0
  357. package/dist/core/p-9daae2ae.entry.js.map +1 -0
  358. package/dist/core/p-9e578e82.entry.js +2 -0
  359. package/dist/core/p-9e578e82.entry.js.map +1 -0
  360. package/dist/core/p-a8e969ea.entry.js +2 -0
  361. package/dist/core/p-a8e969ea.entry.js.map +1 -0
  362. package/dist/core/p-b5b03f86.entry.js +2 -0
  363. package/dist/core/p-b5b03f86.entry.js.map +1 -0
  364. package/dist/core/{p-b35ae170.entry.js → p-b7fc1f35.entry.js} +2 -2
  365. package/dist/core/p-bb505d2a.entry.js +2 -0
  366. package/dist/core/p-bb505d2a.entry.js.map +1 -0
  367. package/dist/core/{p-6a397882.entry.js → p-cc62d065.entry.js} +2 -2
  368. package/dist/core/p-cc62d065.entry.js.map +1 -0
  369. package/dist/core/p-ce96a494.entry.js +2 -0
  370. package/dist/core/p-ce96a494.entry.js.map +1 -0
  371. package/dist/core/{p-eba373bf.entry.js → p-d27dbb63.entry.js} +2 -2
  372. package/dist/core/p-d27dbb63.entry.js.map +1 -0
  373. package/dist/core/p-dc4ba6a0.entry.js +2 -0
  374. package/dist/core/p-dc4ba6a0.entry.js.map +1 -0
  375. package/dist/core/{p-691ea0f2.entry.js → p-dd71a986.entry.js} +2 -2
  376. package/dist/core/p-deada16f.entry.js +2 -0
  377. package/dist/core/p-deada16f.entry.js.map +1 -0
  378. package/dist/core/p-e17eea34.entry.js +2 -0
  379. package/dist/core/p-e17eea34.entry.js.map +1 -0
  380. package/dist/core/p-e4390415.entry.js +2 -0
  381. package/dist/core/p-e4390415.entry.js.map +1 -0
  382. package/dist/core/p-eb7599cc.entry.js +2 -0
  383. package/dist/core/p-eb7599cc.entry.js.map +1 -0
  384. package/dist/core/p-eeefddb5.entry.js +2 -0
  385. package/dist/core/p-eeefddb5.entry.js.map +1 -0
  386. package/dist/core/p-f0244b5a.entry.js +2 -0
  387. package/dist/core/p-f0244b5a.entry.js.map +1 -0
  388. package/dist/core/{p-b4234318.entry.js → p-f777679c.entry.js} +2 -2
  389. package/dist/core/p-ff15c756.entry.js +2 -0
  390. package/dist/core/p-ff15c756.entry.js.map +1 -0
  391. package/dist/esm/chevron-icon-7927f709.js +8 -0
  392. package/dist/esm/chevron-icon-7927f709.js.map +1 -0
  393. package/dist/esm/core.js +1 -1
  394. package/dist/esm/{helpers-c332acf8.js → helpers-b2b47a7d.js} +3 -3
  395. package/dist/esm/helpers-b2b47a7d.js.map +1 -0
  396. package/dist/esm/ic-alert.entry.js +2 -2
  397. package/dist/esm/ic-alert.entry.js.map +1 -1
  398. package/dist/esm/ic-back-to-top.entry.js +2 -2
  399. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  400. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  401. package/dist/esm/ic-breadcrumb.entry.js +4 -4
  402. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  403. package/dist/esm/ic-button_3.entry.js +38 -10
  404. package/dist/esm/ic-button_3.entry.js.map +1 -1
  405. package/dist/esm/ic-card.entry.js +5 -5
  406. package/dist/esm/ic-card.entry.js.map +1 -1
  407. package/dist/esm/ic-checkbox-group.entry.js +3 -3
  408. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  409. package/dist/esm/ic-checkbox.entry.js +4 -3
  410. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  411. package/dist/esm/ic-chip.entry.js +2 -2
  412. package/dist/esm/ic-chip.entry.js.map +1 -1
  413. package/dist/esm/ic-data-entity.entry.js +1 -1
  414. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  415. package/dist/esm/ic-data-row.entry.js +2 -2
  416. package/dist/esm/ic-data-row.entry.js.map +1 -1
  417. package/dist/esm/ic-divider.entry.js +2 -2
  418. package/dist/esm/ic-divider.entry.js.map +1 -1
  419. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  420. package/dist/esm/ic-footer-link.entry.js +2 -2
  421. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  422. package/dist/esm/ic-footer.entry.js +1 -1
  423. package/dist/esm/ic-hero.entry.js +4 -2
  424. package/dist/esm/ic-hero.entry.js.map +1 -1
  425. package/dist/esm/ic-horizontal-scroll.entry.js +10 -4
  426. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  427. package/dist/esm/ic-input-component-container_3.entry.js +14 -8
  428. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  429. package/dist/esm/ic-input-label_2.entry.js +1 -1
  430. package/dist/esm/ic-link.entry.js +3 -3
  431. package/dist/esm/ic-link.entry.js.map +1 -1
  432. package/dist/esm/ic-menu-group.entry.js +20 -0
  433. package/dist/esm/ic-menu-group.entry.js.map +1 -0
  434. package/dist/esm/ic-menu-item.entry.js +116 -0
  435. package/dist/esm/ic-menu-item.entry.js.map +1 -0
  436. package/dist/esm/ic-navigation-button.entry.js +2 -2
  437. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  438. package/dist/esm/ic-navigation-group.entry.js +4 -4
  439. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  440. package/dist/esm/ic-navigation-item.entry.js +5 -4
  441. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  442. package/dist/esm/ic-navigation-menu.entry.js +2 -2
  443. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  444. package/dist/esm/ic-page-header.entry.js +2 -2
  445. package/dist/esm/ic-page-header.entry.js.map +1 -1
  446. package/dist/esm/ic-popover-menu.entry.js +233 -0
  447. package/dist/esm/ic-popover-menu.entry.js.map +1 -0
  448. package/dist/esm/ic-radio-group.entry.js +3 -3
  449. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  450. package/dist/esm/ic-radio-option.entry.js +3 -3
  451. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  452. package/dist/esm/ic-search-bar.entry.js +5 -3
  453. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  454. package/dist/esm/ic-select.entry.js +16 -23
  455. package/dist/esm/ic-select.entry.js.map +1 -1
  456. package/dist/esm/ic-side-navigation.entry.js +5 -5
  457. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  458. package/dist/esm/ic-status-tag.entry.js +2 -2
  459. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  460. package/dist/esm/ic-step.entry.js +1 -1
  461. package/dist/esm/ic-step.entry.js.map +1 -1
  462. package/dist/esm/ic-stepper.entry.js +1 -1
  463. package/dist/esm/ic-switch.entry.js +2 -2
  464. package/dist/esm/ic-switch.entry.js.map +1 -1
  465. package/dist/esm/ic-tab-context.entry.js +41 -4
  466. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  467. package/dist/esm/ic-tab-group.entry.js +3 -2
  468. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  469. package/dist/esm/ic-tab-panel.entry.js +11 -2
  470. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  471. package/dist/esm/ic-tab.entry.js +13 -1
  472. package/dist/esm/ic-tab.entry.js.map +1 -1
  473. package/dist/esm/ic-text-field.entry.js +37 -9
  474. package/dist/esm/ic-text-field.entry.js.map +1 -1
  475. package/dist/esm/ic-theme.entry.js +1 -1
  476. package/dist/esm/ic-toast.entry.js +6 -2
  477. package/dist/esm/ic-toast.entry.js.map +1 -1
  478. package/dist/esm/ic-top-navigation.entry.js +6 -2
  479. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  480. package/dist/esm/ic-typography.entry.js +1 -1
  481. package/dist/esm/ic-typography.entry.js.map +1 -1
  482. package/dist/esm/index-90721b3c.js +12 -0
  483. package/dist/esm/loader.js +1 -1
  484. package/dist/esm/types-dd515332.js.map +1 -1
  485. package/dist/types/components/ic-button/ic-button.d.ts +24 -0
  486. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +4 -0
  487. package/dist/types/components/ic-link/ic-link.d.ts +1 -1
  488. package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +2 -0
  489. package/dist/types/components/ic-menu-group/ic-menu-group.d.ts +8 -0
  490. package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +74 -0
  491. package/dist/types/components/ic-menu-item/ic-menu-item.types.d.ts +1 -0
  492. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +58 -0
  493. package/dist/types/components/ic-popover-menu/ic-popover-menu.test.a11y.d.ts +1 -0
  494. package/dist/types/components/ic-select/ic-select.d.ts +1 -3
  495. package/dist/types/components/ic-side-navigation/ic-side-navigation-test-examples.d.ts +1 -0
  496. package/dist/types/components/ic-tab/ic-tab.d.ts +11 -0
  497. package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +13 -6
  498. package/dist/types/components/ic-tab-group/ic-tab-group.d.ts +2 -1
  499. package/dist/types/components/ic-tab-panel/ic-tab-panel.d.ts +25 -5
  500. package/dist/types/components/ic-text-field/ic-text-field.d.ts +10 -0
  501. package/dist/types/components/ic-toast/ic-toast.d.ts +1 -0
  502. package/dist/types/components.d.ts +254 -8
  503. package/dist/types/utils/types.d.ts +1 -1
  504. package/hydrate/index.js +649 -100
  505. package/package.json +3 -3
  506. package/dist/cjs/chevron-icon-2645d6b0.js +0 -10
  507. package/dist/cjs/chevron-icon-2645d6b0.js.map +0 -1
  508. package/dist/cjs/helpers-6eb26e7a.js.map +0 -1
  509. package/dist/core/p-1724000c.js.map +0 -1
  510. package/dist/core/p-18ae4b6d.entry.js +0 -2
  511. package/dist/core/p-18ae4b6d.entry.js.map +0 -1
  512. package/dist/core/p-18bf3cb0.entry.js +0 -2
  513. package/dist/core/p-18bf3cb0.entry.js.map +0 -1
  514. package/dist/core/p-31a595c1.entry.js +0 -2
  515. package/dist/core/p-31a595c1.entry.js.map +0 -1
  516. package/dist/core/p-35a03442.entry.js.map +0 -1
  517. package/dist/core/p-360adc51.entry.js +0 -2
  518. package/dist/core/p-360adc51.entry.js.map +0 -1
  519. package/dist/core/p-3dda76db.entry.js.map +0 -1
  520. package/dist/core/p-41e239cb.entry.js.map +0 -1
  521. package/dist/core/p-44c9612c.entry.js +0 -2
  522. package/dist/core/p-44c9612c.entry.js.map +0 -1
  523. package/dist/core/p-4a73728b.entry.js +0 -2
  524. package/dist/core/p-4a73728b.entry.js.map +0 -1
  525. package/dist/core/p-521be4e2.entry.js +0 -2
  526. package/dist/core/p-521be4e2.entry.js.map +0 -1
  527. package/dist/core/p-5b083ce5.entry.js +0 -2
  528. package/dist/core/p-5b083ce5.entry.js.map +0 -1
  529. package/dist/core/p-6a397882.entry.js.map +0 -1
  530. package/dist/core/p-7818d958.entry.js +0 -2
  531. package/dist/core/p-7818d958.entry.js.map +0 -1
  532. package/dist/core/p-7a0bf893.entry.js +0 -2
  533. package/dist/core/p-7a0bf893.entry.js.map +0 -1
  534. package/dist/core/p-7fd50355.entry.js.map +0 -1
  535. package/dist/core/p-897e967a.entry.js +0 -2
  536. package/dist/core/p-897e967a.entry.js.map +0 -1
  537. package/dist/core/p-8f1176c6.entry.js +0 -2
  538. package/dist/core/p-8f1176c6.entry.js.map +0 -1
  539. package/dist/core/p-91a8db51.entry.js +0 -2
  540. package/dist/core/p-91a8db51.entry.js.map +0 -1
  541. package/dist/core/p-a09d853e.entry.js +0 -2
  542. package/dist/core/p-a09d853e.entry.js.map +0 -1
  543. package/dist/core/p-a10da430.entry.js +0 -2
  544. package/dist/core/p-a10da430.entry.js.map +0 -1
  545. package/dist/core/p-a667e329.entry.js +0 -2
  546. package/dist/core/p-a667e329.entry.js.map +0 -1
  547. package/dist/core/p-b40bd77c.entry.js +0 -2
  548. package/dist/core/p-b40bd77c.entry.js.map +0 -1
  549. package/dist/core/p-ba8d6c23.entry.js.map +0 -1
  550. package/dist/core/p-bd819f68.entry.js +0 -2
  551. package/dist/core/p-bd819f68.entry.js.map +0 -1
  552. package/dist/core/p-c72e4b75.entry.js +0 -2
  553. package/dist/core/p-c72e4b75.entry.js.map +0 -1
  554. package/dist/core/p-c7b86643.entry.js +0 -2
  555. package/dist/core/p-c7b86643.entry.js.map +0 -1
  556. package/dist/core/p-c7c5d2c5.entry.js +0 -2
  557. package/dist/core/p-c7c5d2c5.entry.js.map +0 -1
  558. package/dist/core/p-c8f07be6.entry.js +0 -2
  559. package/dist/core/p-c8f07be6.entry.js.map +0 -1
  560. package/dist/core/p-c9068822.entry.js.map +0 -1
  561. package/dist/core/p-cccbf2bf.entry.js +0 -2
  562. package/dist/core/p-cccbf2bf.entry.js.map +0 -1
  563. package/dist/core/p-d37b9695.entry.js +0 -2
  564. package/dist/core/p-d37b9695.entry.js.map +0 -1
  565. package/dist/core/p-d86b0d0e.entry.js +0 -2
  566. package/dist/core/p-d86b0d0e.entry.js.map +0 -1
  567. package/dist/core/p-dea3d5f0.entry.js +0 -2
  568. package/dist/core/p-dea3d5f0.entry.js.map +0 -1
  569. package/dist/core/p-e0d88c31.entry.js +0 -2
  570. package/dist/core/p-e0d88c31.entry.js.map +0 -1
  571. package/dist/core/p-e9202767.entry.js +0 -2
  572. package/dist/core/p-e9202767.entry.js.map +0 -1
  573. package/dist/core/p-eba373bf.entry.js.map +0 -1
  574. package/dist/core/p-ed6cf9b9.entry.js.map +0 -1
  575. package/dist/esm/chevron-icon-98c98242.js +0 -8
  576. package/dist/esm/chevron-icon-98c98242.js.map +0 -1
  577. package/dist/esm/helpers-c332acf8.js.map +0 -1
  578. /package/dist/core/{p-24240e11.js.map → p-06321d19.js.map} +0 -0
  579. /package/dist/core/{p-284970bc.entry.js.map → p-0a463a65.entry.js.map} +0 -0
  580. /package/dist/core/{p-7a9bc7f2.entry.js.map → p-741b4ea3.entry.js.map} +0 -0
  581. /package/dist/core/{p-c4a7c734.entry.js.map → p-8c9cc4d5.entry.js.map} +0 -0
  582. /package/dist/core/{p-b35ae170.entry.js.map → p-b7fc1f35.entry.js.map} +0 -0
  583. /package/dist/core/{p-691ea0f2.entry.js.map → p-dd71a986.entry.js.map} +0 -0
  584. /package/dist/core/{p-b4234318.entry.js.map → p-f777679c.entry.js.map} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-90721b3c.js';
2
- import { i as isSlotUsed, g as getCurrentDeviceSize, D as DEVICE_SIZES, c as checkResizeObserver } from './helpers-c332acf8.js';
2
+ import { i as isSlotUsed, g as getCurrentDeviceSize, D as DEVICE_SIZES, c as checkResizeObserver } from './helpers-b2b47a7d.js';
3
3
  import './types-dd515332.js';
4
4
 
5
- const icPageHeaderCss = "/*! 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;z-index:var(--ic-z-index-page-header)}:host(.sticky){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}header{background-color:var(--ic-architectural-40)}header.border-bottom{border-bottom:0.063rem solid var(--ic-architectural-300)}header.tabs{padding-top:var(--ic-space-md)}.breadcrumb-area{margin-bottom:var(--ic-space-md)}.main-content{display:grid;grid-template-columns:auto 1fr;grid-template-areas:\"title-area action-area\"\n \"input-area action-area\";-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md);justify-content:space-between;width:100%}.title-area{display:flex;flex-direction:column;flex:1;min-width:19rem;grid-area:title-area}.header-content{display:flex;align-items:center;width:100%;flex-wrap:wrap;row-gap:var(--ic-space-xs);-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md)}.heading{display:inline-block;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}.subheading.small{margin-top:var(--ic-space-xs)}.action-area{display:flex;gap:var(--ic-space-md);flex-flow:row wrap;justify-self:end;justify-content:flex-end;height:-moz-fit-content;height:fit-content;grid-area:action-area}.input-area,.navigation-area{margin-top:var(--ic-space-md);width:100%}.tabs-slot{display:flex;overflow-x:auto;padding:0.5rem;margin:-0.5rem}.tabs-slot::-webkit-scrollbar{display:none}.input-area{grid-area:input-area}@media screen and (max-width: 576px){::slotted(ic-text-field){--input-width:100%;max-width:20rem}.main-content{grid-template-areas:\"title-area\"\n \"action-area\"\n \"input-area\";justify-content:flex-start}.title-area{min-width:0}.action-area{min-width:100%;margin-top:var(--ic-space-md);justify-content:start}}@media screen and (min-width: 992px){:host(.sticky-desktop){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}}";
5
+ const icPageHeaderCss = "/*! 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;z-index:var(--ic-z-index-page-header)}:host(.sticky){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}header{background-color:var(--ic-architectural-40)}header.border-bottom{border-bottom:var(--ic-space-1px) solid var(--ic-architectural-300)}header.tabs{padding-top:var(--ic-space-md)}.breadcrumb-area{margin-bottom:var(--ic-space-md)}.main-content{display:grid;grid-template-columns:auto 1fr;grid-template-areas:\"title-area action-area\"\n \"input-area action-area\";-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md);justify-content:space-between;width:100%}.title-area{display:flex;flex-direction:column;flex:1;min-width:19rem;grid-area:title-area}.header-content{display:flex;align-items:center;width:100%;flex-wrap:wrap;row-gap:var(--ic-space-xs);-moz-column-gap:var(--ic-space-md);column-gap:var(--ic-space-md)}.heading{display:inline-block;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}.subheading.small{margin-top:var(--ic-space-xs)}.action-area{display:flex;gap:var(--ic-space-md);flex-flow:row wrap;justify-self:end;justify-content:flex-end;height:-moz-fit-content;height:fit-content;grid-area:action-area}.input-area,.navigation-area{margin-top:var(--ic-space-md);width:100%}.tabs-slot{display:flex;overflow-x:auto;padding:0.5rem;margin:-0.5rem}.tabs-slot::-webkit-scrollbar{display:none}.input-area{grid-area:input-area}@media screen and (max-width: 576px){::slotted(ic-text-field){--input-width:100%;max-width:20rem}.main-content{grid-template-areas:\"title-area\"\n \"action-area\"\n \"input-area\";justify-content:flex-start}.title-area{min-width:0}.action-area{min-width:100%;margin-top:var(--ic-space-md);justify-content:start}}@media screen and (min-width: 992px){:host(.sticky-desktop){position:sticky;top:0;box-shadow:var(--ic-elevation-overlay)}}";
6
6
 
7
7
  const PageHeader = class {
8
8
  constructor(hostRef) {
@@ -1 +1 @@
1
- {"file":"ic-page-header.entry.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,sqIAAsqI;;MC2BjrI,UAAU;;;IAyCb,mBAAc,GAAmB,IAAI,CAAC;IAEtC,2BAAsB,GAAG;MAC/B,IAAI,IAAI,CAAC,YAAY,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE;QACvD,IAAI,CAAC,iBAAiB,EAAE,CAAC;OAC1B;KACF,CAAC;IAEM,sBAAiB,GAAG;MAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC;QACvC,IAAI,CAAC,sBAAsB,EAAE,CAAC;OAC/B,CAAC,CAAC;MACH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACtC,CAAC;IAEM,sBAAiB,GAAG;MAC1B,MAAM,QAAQ,GAAG,oBAAoB,EAAE,CAAC;MACxC,IAAI,QAAQ,KAAK,IAAI,CAAC,UAAU,EAAE;QAChC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;OAC5B;MAED,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CACjD,iBAAiB,CACH,CAAC;MACjB,MAAM,aAAa,GAAa,EAAE,CAAC;;MAGnC,KAAK,IAAI,CAAC,GAAG,CAA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;GACH;;;;;;;","names":[],"sources":["./src/components/ic-page-header/ic-page-header.css?tag=ic-page-header&encapsulation=shadow","./src/components/ic-page-header/ic-page-header.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-page-header: z-index of page-header\n */\n\n:host {\n display: block;\n z-index: var(--ic-z-index-page-header);\n}\n\n:host(.sticky) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n}\n\nheader {\n background-color: var(--ic-architectural-40);\n}\n\nheader.border-bottom {\n border-bottom: 0.063rem solid var(--ic-architectural-300);\n}\n\nheader.tabs {\n padding-top: var(--ic-space-md);\n}\n\n.breadcrumb-area {\n margin-bottom: var(--ic-space-md);\n}\n\n.main-content {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas:\n \"title-area action-area\"\n \"input-area action-area\";\n column-gap: var(--ic-space-md);\n justify-content: space-between;\n width: 100%;\n}\n\n.title-area {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 19rem;\n grid-area: title-area;\n}\n\n.header-content {\n display: flex;\n align-items: center;\n width: 100%;\n flex-wrap: wrap;\n row-gap: var(--ic-space-xs);\n column-gap: var(--ic-space-md);\n}\n\n.heading {\n display: inline-block;\n overflow-wrap: break-word;\n hyphens: auto;\n}\n\n.subheading.small {\n margin-top: var(--ic-space-xs);\n}\n\n.action-area {\n display: flex;\n gap: var(--ic-space-md);\n flex-flow: row wrap;\n justify-self: end;\n justify-content: flex-end;\n height: fit-content;\n grid-area: action-area;\n}\n\n.input-area,\n.navigation-area {\n margin-top: var(--ic-space-md);\n width: 100%;\n}\n\n.tabs-slot {\n display: flex;\n overflow-x: auto;\n padding: 0.5rem;\n margin: -0.5rem;\n}\n\n.tabs-slot::-webkit-scrollbar {\n display: none;\n}\n\n.input-area {\n grid-area: input-area;\n}\n\n@media screen and (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n\n max-width: 20rem;\n }\n\n .main-content {\n grid-template-areas:\n \"title-area\"\n \"action-area\"\n \"input-area\";\n justify-content: flex-start;\n }\n\n .title-area {\n min-width: 0;\n }\n\n .action-area {\n min-width: 100%;\n margin-top: var(--ic-space-md);\n justify-content: start;\n }\n}\n\n@media screen and (min-width: 992px) {\n :host(.sticky-desktop) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n }\n}\n","import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { IcAlignment } from \"../../utils/types\";\n\nimport {\n isSlotUsed,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n checkResizeObserver,\n} from \"../../utils/helpers\";\n\n/**\n * @slot breadcrumbs - Content will be rendered in the breadcrumb area, above the title and action areas.\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot heading-adornment - Content will be rendered in the title area, adjacent to the heading.\n * @slot actions - Content will be rendered in the action area, adjacent to the title area.\n * @slot input - Content will be rendered in the input area, below the title area and adjacent to the action area.\n * @slot stepper - Content will be rendered in the navigation area, below the title and action areas. Note: stepper slot cannot be used when the tabs slot is being used.\n * @slot tabs - Content will be rendered in the navigation area, below the title and action areas. Note: the stepper slot cannot be used when the tabs slot is being used.\n */\n\n@Component({\n tag: \"ic-page-header\",\n styleUrl: \"ic-page-header.css\",\n shadow: true,\n})\nexport class PageHeader {\n @Element() el: HTMLIcPageHeaderElement;\n /**\n * The title to render on the page header.\n */\n @Prop() heading?: string;\n /**\n * The subtitle to render on the page header.\n */\n @Prop() subheading?: string;\n /**\n * The alignment of the page header.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n /**\n * If `true`, the small styling will be applied to the page header.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, a border will be displayed along the bottom of the page header.\n */\n @Prop() border?: boolean = true;\n /**\n * If `true`, the page header will be sticky at all breakpoints.\n */\n @Prop() sticky?: boolean = false;\n /**\n * If `true`, the page header will only be sticky for viewport widths of 992px and above.\n */\n @Prop() stickyDesktopOnly?: boolean = false;\n /**\n * If `true`, the reading pattern and tab order will change in the action area for viewport widths of above 576px and when actions have not wrapped.\n */\n @Prop() reverseOrder?: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() areButtonsReversed: boolean = false;\n\n @State() actionContent: Node[];\n\n private resizeObserver: ResizeObserver = null;\n\n private resizeObserverCallback = () => {\n if (this.reverseOrder && isSlotUsed(this.el, \"actions\")) {\n this.applyReverseOrder();\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private applyReverseOrder = (): void => {\n const currSize = getCurrentDeviceSize();\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n\n const actionArea = this.el.shadowRoot.querySelector(\n \"div.action-area\"\n ) as HTMLElement;\n const actionHeights: number[] = [];\n\n /* For each button in the actions slot, check the height of the button and push this number into the actionHeights array and then find the greatest number in this array (i.e. find the height of the tallest button) */\n for (let i = 0; i < this.actionContent.length; i++) {\n const action = this.actionContent[i] as HTMLElement;\n let actionHeight = action.offsetHeight;\n if (actionHeight === undefined) {\n actionHeight = 0;\n }\n actionHeights.push(actionHeight);\n }\n\n const max = Math.max(...actionHeights);\n\n /* The smallest breakpoint displays buttons in the same order the user has slotted them in. When the device size is larger than the small breakpoiint then the order of the button reverses due to best practice for reading patterns. If the device size is larger than the small breakpoint and the buttons have started to wrap then they follow the order the user has slotted them in. This logic is programmed based on the height of the action-area div that wraps the actions slot. If the height of the action-area div is taller than the height of the tallest button, then it is assumed that the taller height is caused by the buttons wrapping */\n let actionAreaHeight = actionArea.offsetHeight;\n\n if (actionAreaHeight === undefined) {\n actionAreaHeight = 0;\n }\n\n if (\n this.deviceSize > DEVICE_SIZES.S &&\n actionAreaHeight <= max &&\n !this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n } else if (\n ((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||\n this.deviceSize <= DEVICE_SIZES.S) &&\n this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n }\n };\n\n componentWillLoad(): void {\n this.actionContent = Array.from(\n this.el.querySelectorAll(`[slot=\"actions\"]`)\n );\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const {\n small,\n border,\n heading,\n subheading,\n aligned,\n sticky,\n stickyDesktopOnly,\n } = this;\n\n return (\n <Host\n class={{\n [\"sticky\"]: sticky,\n [\"sticky-desktop\"]: !sticky && stickyDesktopOnly,\n }}\n >\n <header\n class={{\n [\"border-bottom\"]: border,\n [\"tabs\"]: isSlotUsed(this.el, \"tabs\"),\n }}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight={isSlotUsed(this.el, \"tabs\")}\n >\n {isSlotUsed(this.el, \"breadcrumbs\") && (\n <div class=\"breadcrumb-area\">\n <slot name=\"breadcrumbs\" />\n </div>\n )}\n <div class=\"main-content\">\n <div class=\"title-area\">\n <div class=\"header-content\">\n <slot name=\"heading\">\n <ic-typography\n variant={small ? \"h4\" : \"h2\"}\n class=\"heading\"\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n <slot name=\"heading-adornment\" />\n </div>\n <div>\n <slot name=\"subheading\">\n {subheading && (\n <ic-typography\n variant=\"body\"\n class={{ [\"subheading\"]: true, [\"small\"]: small }}\n >\n {subheading}\n </ic-typography>\n )}\n </slot>\n </div>\n </div>\n {isSlotUsed(this.el, \"actions\") && (\n <div class=\"action-area\">\n <slot name=\"actions\" />\n </div>\n )}\n {isSlotUsed(this.el, \"input\") && (\n <div class=\"input-area\">\n <slot name=\"input\" />\n </div>\n )}\n </div>\n\n {(isSlotUsed(this.el, \"stepper\") ||\n isSlotUsed(this.el, \"tabs\")) && (\n <div class=\"navigation-area\">\n {isSlotUsed(this.el, \"stepper\") &&\n !isSlotUsed(this.el, \"tabs\") && <slot name=\"stepper\" />}\n {isSlotUsed(this.el, \"tabs\") && (\n <nav aria-label=\"navigation-landmark-page-header\">\n <ic-horizontal-scroll>\n <ul class=\"tabs-slot\">\n <slot name=\"tabs\" />\n </ul>\n </ic-horizontal-scroll>\n </nav>\n )}\n </div>\n )}\n </ic-section-container>\n </header>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-page-header.entry.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,irIAAirI;;MC2B5rI,UAAU;;;IAyCb,mBAAc,GAAmB,IAAI,CAAC;IAEtC,2BAAsB,GAAG;MAC/B,IAAI,IAAI,CAAC,YAAY,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE;QACvD,IAAI,CAAC,iBAAiB,EAAE,CAAC;OAC1B;KACF,CAAC;IAEM,sBAAiB,GAAG;MAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC;QACvC,IAAI,CAAC,sBAAsB,EAAE,CAAC;OAC/B,CAAC,CAAC;MACH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACtC,CAAC;IAEM,sBAAiB,GAAG;MAC1B,MAAM,QAAQ,GAAG,oBAAoB,EAAE,CAAC;MACxC,IAAI,QAAQ,KAAK,IAAI,CAAC,UAAU,EAAE;QAChC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;OAC5B;MAED,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CACjD,iBAAiB,CACH,CAAC;MACjB,MAAM,aAAa,GAAa,EAAE,CAAC;;MAGnC,KAAK,IAAI,CAAC,GAAG,CAAC,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ACH;;;;;;;","names":[],"sources":["./src/components/ic-page-header/ic-page-header.css?tag=ic-page-header&encapsulation=shadow","./src/components/ic-page-header/ic-page-header.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-page-header: z-index of page-header\n */\n\n:host {\n display: block;\n z-index: var(--ic-z-index-page-header);\n}\n\n:host(.sticky) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n}\n\nheader {\n background-color: var(--ic-architectural-40);\n}\n\nheader.border-bottom {\n border-bottom: var(--ic-space-1px) solid var(--ic-architectural-300);\n}\n\nheader.tabs {\n padding-top: var(--ic-space-md);\n}\n\n.breadcrumb-area {\n margin-bottom: var(--ic-space-md);\n}\n\n.main-content {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas:\n \"title-area action-area\"\n \"input-area action-area\";\n column-gap: var(--ic-space-md);\n justify-content: space-between;\n width: 100%;\n}\n\n.title-area {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 19rem;\n grid-area: title-area;\n}\n\n.header-content {\n display: flex;\n align-items: center;\n width: 100%;\n flex-wrap: wrap;\n row-gap: var(--ic-space-xs);\n column-gap: var(--ic-space-md);\n}\n\n.heading {\n display: inline-block;\n overflow-wrap: break-word;\n hyphens: auto;\n}\n\n.subheading.small {\n margin-top: var(--ic-space-xs);\n}\n\n.action-area {\n display: flex;\n gap: var(--ic-space-md);\n flex-flow: row wrap;\n justify-self: end;\n justify-content: flex-end;\n height: fit-content;\n grid-area: action-area;\n}\n\n.input-area,\n.navigation-area {\n margin-top: var(--ic-space-md);\n width: 100%;\n}\n\n.tabs-slot {\n display: flex;\n overflow-x: auto;\n padding: 0.5rem;\n margin: -0.5rem;\n}\n\n.tabs-slot::-webkit-scrollbar {\n display: none;\n}\n\n.input-area {\n grid-area: input-area;\n}\n\n@media screen and (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n\n max-width: 20rem;\n }\n\n .main-content {\n grid-template-areas:\n \"title-area\"\n \"action-area\"\n \"input-area\";\n justify-content: flex-start;\n }\n\n .title-area {\n min-width: 0;\n }\n\n .action-area {\n min-width: 100%;\n margin-top: var(--ic-space-md);\n justify-content: start;\n }\n}\n\n@media screen and (min-width: 992px) {\n :host(.sticky-desktop) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n }\n}\n","import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { IcAlignment } from \"../../utils/types\";\n\nimport {\n isSlotUsed,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n checkResizeObserver,\n} from \"../../utils/helpers\";\n\n/**\n * @slot breadcrumbs - Content will be rendered in the breadcrumb area, above the title and action areas.\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot heading-adornment - Content will be rendered in the title area, adjacent to the heading.\n * @slot actions - Content will be rendered in the action area, adjacent to the title area.\n * @slot input - Content will be rendered in the input area, below the title area and adjacent to the action area.\n * @slot stepper - Content will be rendered in the navigation area, below the title and action areas. Note: stepper slot cannot be used when the tabs slot is being used.\n * @slot tabs - Content will be rendered in the navigation area, below the title and action areas. Note: the stepper slot cannot be used when the tabs slot is being used.\n */\n\n@Component({\n tag: \"ic-page-header\",\n styleUrl: \"ic-page-header.css\",\n shadow: true,\n})\nexport class PageHeader {\n @Element() el: HTMLIcPageHeaderElement;\n /**\n * The title to render on the page header.\n */\n @Prop() heading?: string;\n /**\n * The subtitle to render on the page header.\n */\n @Prop() subheading?: string;\n /**\n * The alignment of the page header.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n /**\n * If `true`, the small styling will be applied to the page header.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, a border will be displayed along the bottom of the page header.\n */\n @Prop() border?: boolean = true;\n /**\n * If `true`, the page header will be sticky at all breakpoints.\n */\n @Prop() sticky?: boolean = false;\n /**\n * If `true`, the page header will only be sticky for viewport widths of 992px and above.\n */\n @Prop() stickyDesktopOnly?: boolean = false;\n /**\n * If `true`, the reading pattern and tab order will change in the action area for viewport widths of above 576px and when actions have not wrapped.\n */\n @Prop() reverseOrder?: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() areButtonsReversed: boolean = false;\n\n @State() actionContent: Node[];\n\n private resizeObserver: ResizeObserver = null;\n\n private resizeObserverCallback = () => {\n if (this.reverseOrder && isSlotUsed(this.el, \"actions\")) {\n this.applyReverseOrder();\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private applyReverseOrder = (): void => {\n const currSize = getCurrentDeviceSize();\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n\n const actionArea = this.el.shadowRoot.querySelector(\n \"div.action-area\"\n ) as HTMLElement;\n const actionHeights: number[] = [];\n\n /* For each button in the actions slot, check the height of the button and push this number into the actionHeights array and then find the greatest number in this array (i.e. find the height of the tallest button) */\n for (let i = 0; i < this.actionContent.length; i++) {\n const action = this.actionContent[i] as HTMLElement;\n let actionHeight = action.offsetHeight;\n if (actionHeight === undefined) {\n actionHeight = 0;\n }\n actionHeights.push(actionHeight);\n }\n\n const max = Math.max(...actionHeights);\n\n /* The smallest breakpoint displays buttons in the same order the user has slotted them in. When the device size is larger than the small breakpoiint then the order of the button reverses due to best practice for reading patterns. If the device size is larger than the small breakpoint and the buttons have started to wrap then they follow the order the user has slotted them in. This logic is programmed based on the height of the action-area div that wraps the actions slot. If the height of the action-area div is taller than the height of the tallest button, then it is assumed that the taller height is caused by the buttons wrapping */\n let actionAreaHeight = actionArea.offsetHeight;\n\n if (actionAreaHeight === undefined) {\n actionAreaHeight = 0;\n }\n\n if (\n this.deviceSize > DEVICE_SIZES.S &&\n actionAreaHeight <= max &&\n !this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n } else if (\n ((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||\n this.deviceSize <= DEVICE_SIZES.S) &&\n this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n }\n };\n\n componentWillLoad(): void {\n this.actionContent = Array.from(\n this.el.querySelectorAll(`[slot=\"actions\"]`)\n );\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const {\n small,\n border,\n heading,\n subheading,\n aligned,\n sticky,\n stickyDesktopOnly,\n } = this;\n\n return (\n <Host\n class={{\n [\"sticky\"]: sticky,\n [\"sticky-desktop\"]: !sticky && stickyDesktopOnly,\n }}\n >\n <header\n class={{\n [\"border-bottom\"]: border,\n [\"tabs\"]: isSlotUsed(this.el, \"tabs\"),\n }}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight={isSlotUsed(this.el, \"tabs\")}\n >\n {isSlotUsed(this.el, \"breadcrumbs\") && (\n <div class=\"breadcrumb-area\">\n <slot name=\"breadcrumbs\" />\n </div>\n )}\n <div class=\"main-content\">\n <div class=\"title-area\">\n <div class=\"header-content\">\n <slot name=\"heading\">\n <ic-typography\n variant={small ? \"h4\" : \"h2\"}\n class=\"heading\"\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n <slot name=\"heading-adornment\" />\n </div>\n <div>\n <slot name=\"subheading\">\n {subheading && (\n <ic-typography\n variant=\"body\"\n class={{ [\"subheading\"]: true, [\"small\"]: small }}\n >\n {subheading}\n </ic-typography>\n )}\n </slot>\n </div>\n </div>\n {isSlotUsed(this.el, \"actions\") && (\n <div class=\"action-area\">\n <slot name=\"actions\" />\n </div>\n )}\n {isSlotUsed(this.el, \"input\") && (\n <div class=\"input-area\">\n <slot name=\"input\" />\n </div>\n )}\n </div>\n\n {(isSlotUsed(this.el, \"stepper\") ||\n isSlotUsed(this.el, \"tabs\")) && (\n <div class=\"navigation-area\">\n {isSlotUsed(this.el, \"stepper\") &&\n !isSlotUsed(this.el, \"tabs\") && <slot name=\"stepper\" />}\n {isSlotUsed(this.el, \"tabs\") && (\n <nav aria-label=\"navigation-landmark-page-header\">\n <ic-horizontal-scroll>\n <ul class=\"tabs-slot\">\n <slot name=\"tabs\" />\n </ul>\n </ic-horizontal-scroll>\n </nav>\n )}\n </div>\n )}\n </ic-section-container>\n </header>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,233 @@
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-90721b3c.js';
2
+ import { t as getSlotElements } from './helpers-b2b47a7d.js';
3
+ import { c as createPopper } from './popper-f860750c.js';
4
+ import './types-dd515332.js';
5
+
6
+ const icPopoverMenuCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host .opening-from-parent{animation:slide-in var(--ic-transition-duration-slow) ease-in-out}:host .opening-from-child{animation:slide-out var(--ic-transition-duration-slow) ease-in-out}}:host{border-radius:var(--ic-border-radius);color:var(--ic-color-primary-text);background-color:var(--ic-architectural-white);position:relative;z-index:var(--ic-z-index-popover);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);display:none}.menu{border:0.063rem solid var(--ic-architectural-400);border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);visibility:hidden;height:0}.button{text-decoration:none;list-style-type:none}:host(:focus-within){box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host(.open){display:block;min-width:calc(20rem - var(--ic-space-xl));width:var(--popover-width, 20rem);max-width:calc(100vw - var(--ic-space-xl))}:host(.open) .menu{visibility:visible;height:-moz-fit-content;height:fit-content;max-height:var(--max-height, -moz-fit-content);max-height:var(--max-height, fit-content);overflow-y:auto;overflow-x:hidden}.parent-label{color:var(--ic-color-tertiary-text);margin:var(--ic-space-xs) var(--ic-space-xs) 0}@keyframes slide-in{from{opacity:0;transform:translateX(10rem)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out{from{opacity:0;transform:translateX(-10rem)}to{opacity:1;transform:translateX(0)}}";
7
+
8
+ const PopoverMenu = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.setButtonFocus = () => {
12
+ var _a;
13
+ (_a = this.popoverMenuEls[this.currentFocus]) === null || _a === void 0 ? void 0 : _a.focus();
14
+ };
15
+ this.popoverMenuEls = [];
16
+ // Checks that the popover menu has an anchor
17
+ this.findAnchorEl = (anchor) => {
18
+ let anchorElement = null;
19
+ if (anchor === null || anchor === undefined) {
20
+ this.submenuId === undefined &&
21
+ console.error("No anchor specified for popover component");
22
+ }
23
+ else {
24
+ anchorElement = document.querySelector(anchor.indexOf("#") === 0 ? anchor : "#" + anchor);
25
+ if (anchorElement === null) {
26
+ console.error(`Popover anchor element '${anchor}' not found`);
27
+ }
28
+ }
29
+ return anchorElement;
30
+ };
31
+ this.isNotPopoverMenuEl = (ev) => {
32
+ const target = ev.target;
33
+ return (target.id !== this.anchor &&
34
+ target.tagName !== "IC-MENU-ITEM" &&
35
+ target.tagName !== "IC-MENU-GROUP" &&
36
+ target.tagName !== "IC-POPOVER-MENU");
37
+ };
38
+ this.closeMenu = () => {
39
+ var _a;
40
+ this.open = false;
41
+ (_a = this.anchorEl) === null || _a === void 0 ? void 0 : _a.focus();
42
+ };
43
+ this.getNextItemToSelect = (currentItem, movingDown) => {
44
+ const numButtons = this.popoverMenuEls.length - 1;
45
+ if (currentItem < 1) {
46
+ currentItem = 0;
47
+ }
48
+ let nextItem = movingDown ? currentItem + 1 : currentItem - 1;
49
+ // Check if wrap around necessary
50
+ if (nextItem < 0) {
51
+ nextItem = numButtons;
52
+ }
53
+ else if (nextItem > numButtons) {
54
+ nextItem = 0;
55
+ }
56
+ return nextItem;
57
+ };
58
+ this.addMenuItems = (elements) => {
59
+ for (let i = 0; i < elements.length; i++) {
60
+ const el = elements[i];
61
+ if (el.tagName === "IC-MENU-ITEM") {
62
+ this.popoverMenuEls.push(el);
63
+ }
64
+ else if (el.tagName === "IC-MENU-GROUP") {
65
+ const groupSlotWrapper = el.shadowRoot.querySelector("ul");
66
+ const menuGroupElements = getSlotElements(groupSlotWrapper);
67
+ this.addMenuItems(menuGroupElements);
68
+ }
69
+ }
70
+ };
71
+ this.getMenuAriaLabel = () => {
72
+ const ariaLabel = this.host.getAttribute("aria-label");
73
+ if (this.submenuId !== undefined) {
74
+ return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;
75
+ }
76
+ else {
77
+ return ariaLabel;
78
+ }
79
+ };
80
+ this.handleBackButtonClick = () => {
81
+ this.parentPopover.openFromChild();
82
+ this.open = false;
83
+ };
84
+ this.anchor = undefined;
85
+ this.submenuId = undefined;
86
+ this.open = undefined;
87
+ this.parentPopover = undefined;
88
+ this.submenuLevel = 1;
89
+ this.parentLabel = undefined;
90
+ this.openingFromChild = false;
91
+ this.openingFromParent = false;
92
+ }
93
+ handleMenuItemClick(ev) {
94
+ if (!ev.detail.hasSubMenu && ev.detail.label !== "Back") {
95
+ this.closeMenu();
96
+ }
97
+ }
98
+ // This is listening for the event emitted when a menu item is acting as a trigger button
99
+ handleSubmenuChange(ev) {
100
+ // Finds the trigger menu item that has emitted the event
101
+ const target = ev.target;
102
+ this.open = false;
103
+ // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).
104
+ const childEl = document.querySelector(`ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`);
105
+ // Set the parent popover menu of the submenu and open the submenu
106
+ childEl.parentPopover = this.host;
107
+ childEl.anchor = this.anchor;
108
+ childEl.ariaLabel = this.host.getAttribute("aria-label");
109
+ childEl.openFromParent();
110
+ childEl.submenuLevel = this.submenuLevel + 1;
111
+ // Set the label in the submenu using the label of the menu item that has emitted the event
112
+ childEl.parentLabel = target.label;
113
+ }
114
+ watchOpenHandler() {
115
+ if (this.open) {
116
+ if (this.parentPopover !== undefined &&
117
+ !this.popoverMenuEls.some((menuItem) => menuItem.id)) {
118
+ this.popoverMenuEls.unshift(this.backButton);
119
+ }
120
+ this.currentFocus = this.submenuId !== undefined ? 1 : 0;
121
+ // Needed so that anchorEl isn't always focused
122
+ setTimeout(this.setButtonFocus, 50);
123
+ }
124
+ }
125
+ handleClick(ev) {
126
+ ev.preventDefault();
127
+ if (this.open && this.isNotPopoverMenuEl(ev)) {
128
+ // If menu is open and the next click on the document is not a popover El, close the popover
129
+ this.closeMenu();
130
+ }
131
+ }
132
+ /**
133
+ * @internal Opens the menu from the child menu.
134
+ */
135
+ async openFromChild() {
136
+ this.open = true;
137
+ this.openingFromChild = true;
138
+ setTimeout(() => (this.openingFromChild = false), 1000);
139
+ }
140
+ /**
141
+ * @internal Opens the menu from the parent menu.
142
+ */
143
+ async openFromParent() {
144
+ this.open = true;
145
+ this.openingFromParent = true;
146
+ setTimeout(() => (this.openingFromParent = false), 1000);
147
+ }
148
+ // Manages the keyboard navigation in the popover menu
149
+ handleKeyDown(ev) {
150
+ switch (ev.key) {
151
+ case "ArrowDown":
152
+ ev.preventDefault();
153
+ this.currentFocus = this.getNextItemToSelect(this.currentFocus, true);
154
+ this.setButtonFocus();
155
+ break;
156
+ case "ArrowUp":
157
+ ev.preventDefault();
158
+ this.currentFocus = this.getNextItemToSelect(this.currentFocus, false);
159
+ this.setButtonFocus();
160
+ break;
161
+ case "Home":
162
+ //Sets home focus as first element, or back button
163
+ this.currentFocus = 0;
164
+ this.setButtonFocus();
165
+ break;
166
+ case "End":
167
+ //Sets end focus as last element
168
+ this.currentFocus = this.popoverMenuEls.length - 1;
169
+ this.setButtonFocus();
170
+ break;
171
+ case "Escape":
172
+ case "Tab":
173
+ if (this.open) {
174
+ this.closeMenu();
175
+ this.host.blur();
176
+ }
177
+ break;
178
+ }
179
+ }
180
+ componentDidRender() {
181
+ if (this.open) {
182
+ createPopper(this.anchorEl, this.host, {
183
+ placement: "bottom-start",
184
+ modifiers: [
185
+ {
186
+ name: "offset",
187
+ options: {
188
+ offset: [0, 4],
189
+ },
190
+ },
191
+ ],
192
+ });
193
+ }
194
+ }
195
+ componentWillRender() {
196
+ this.anchorEl = this.findAnchorEl(this.anchor);
197
+ }
198
+ componentDidLoad() {
199
+ const slotWrapper = this.host.shadowRoot.querySelector("ul.button");
200
+ const popoverMenuElements = getSlotElements(slotWrapper);
201
+ if (popoverMenuElements !== null) {
202
+ this.addMenuItems(popoverMenuElements);
203
+ }
204
+ if (this.submenuId === undefined &&
205
+ this.host.getAttribute("aria-label") === null) {
206
+ console.error(`No aria-label specified for popover menu component - aria-label required`);
207
+ }
208
+ }
209
+ render() {
210
+ return (h(Host, { class: { open: this.open } }, h("div", { id: this.parentPopover === undefined
211
+ ? `ic-popover-submenu-${this.submenuId}`
212
+ : "", class: {
213
+ menu: true,
214
+ }, tabindex: open ? "0" : "-1" }, h("div", { class: {
215
+ "opening-from-parent": this.openingFromParent,
216
+ "opening-from-child": this.openingFromChild,
217
+ } }, this.submenuId !== undefined && (h("div", null, h("ic-menu-item", { class: "ic-popover-submenu-back-button", ref: (el) => (this.backButton = el), label: "Back", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, h("svg", { slot: "icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "submenu-back-icon" }, h("path", { d: "M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z", fill: "currentColor" }))), h("ic-typography", { variant: "subtitle-small", class: "parent-label" }, this.parentLabel))), h("ul", { class: "button", "aria-label": this.getMenuAriaLabel(), role: "menu", "aria-owns": this.submenuId !== undefined
218
+ ? `ic-popover-submenu-back-button-${this.submenuLevel}`
219
+ : false, "aria-controls": this.submenuId !== undefined
220
+ ? `ic-popover-submenu-back-button-${this.submenuLevel}`
221
+ : false }, h("slot", null))))));
222
+ }
223
+ static get delegatesFocus() { return true; }
224
+ get host() { return getElement(this); }
225
+ static get watchers() { return {
226
+ "open": ["watchOpenHandler"]
227
+ }; }
228
+ };
229
+ PopoverMenu.style = icPopoverMenuCss;
230
+
231
+ export { PopoverMenu as ic_popover_menu };
232
+
233
+ //# sourceMappingURL=ic-popover-menu.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"ic-popover-menu.entry.js","mappings":";;;;;AAAA,MAAM,gBAAgB,GAAG,qyHAAqyH;;MCqBjzH,WAAW;;;IAiFd,mBAAc,GAAG;;MACvB,MAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,0CAAE,KAAK,EAAE,CAAC;KACjD,CAAC;IAEM,mBAAc,GAA4B,EAAE,CAAC;;IAM7C,iBAAY,GAAG,CAAC,MAAc;MACpC,IAAI,aAAa,GAAgB,IAAI,CAAC;MACtC,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,EAAE;QAC3C,IAAI,CAAC,SAAS,KAAK,SAAS;UAC1B,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;OAC9D;WAAM;QACL,aAAa,GAAG,QAAQ,CAAC,aAAa,CACpC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM,CAClD,CAAC;QACF,IAAI,aAAa,KAAK,IAAI,EAAE;UAC1B,OAAO,CAAC,KAAK,CAAC,2BAA2B,MAAM,aAAa,CAAC,CAAC;SAC/D;OACF;MACD,OAAO,aAAa,CAAC;KACtB,CAAC;IAiCM,uBAAkB,GAAG,CAAC,EAAS;MACrC,MAAM,MAAM,GAAG,EAAE,CAAC,MAAqB,CAAC;MACxC,QACE,MAAM,CAA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,CACO,EACf,qBAAe,OAAO,EAAC,gBAAgB,EAAC,KAAK,EAAC,cAAc,IACzD,IAAI,CAAC,WAAW,CACH,CACZ,CACP,EACD,UACE,KAAK,EAAC,QAAQ,gBACF,IAAI,CAAC,gBAAgB,EAAE,EACnC,IAAI,EAAC,MAAM,eAET,IAAI,CAAC,SAAS,KAAK,SAAS;UACxB,kCAAkC,IAAI,CAAC,YAAY,EAAE;UACrD,KAAK,mBAGT,IAAI,CAAC,SAAS,KAAK,SAAS;UACxB,kCAAkC,IAAI,CAAC,YAAY,EAAE;UACrD,KAAK,IAGX,eAAa,CACV,CACD,CACF,CACD,EACP;GACH;;;;;;;;;;;","names":[],"sources":["./src/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","./src/components/ic-popover-menu/ic-popover-menu.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n/** \n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-color-primary-text);\n background-color: var(--ic-architectural-white);\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n.menu {\n border: 0.063rem solid var(--ic-architectural-400);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n visibility: hidden;\n height: 0;\n}\n\n.button {\n text-decoration: none;\n list-style-type: none;\n}\n\n:host(:focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.open) .menu {\n visibility: visible;\n height: fit-content;\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n color: var(--ic-color-tertiary-text);\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n State,\n Method,\n} from \"@stencil/core\";\nimport { getSlotElements } from \"../../utils/helpers\";\nimport { createPopper } from \"@popperjs/core\";\n\n@Component({\n tag: \"ic-popover-menu\",\n styleUrl: \"ic-popover-menu.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class PopoverMenu {\n @Element() host: HTMLIcPopoverMenuElement;\n\n /**\n * The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\n */\n @Prop() anchor: string;\n\n /**\n * The unique identifier for a popover submenu.\n */\n @Prop() submenuId?: string;\n\n /**\n * If `true`, the popover menu will be displayed.\n */\n @Prop({ reflect: true, mutable: true }) open: boolean = undefined;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentPopover?: HTMLIcPopoverMenuElement;\n\n /**\n * @internal The level of menu being displayed.\n */\n @Prop() submenuLevel: number = 1;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentLabel?: string;\n\n @State() openingFromChild: boolean = false;\n\n @State() openingFromParent: boolean = false;\n\n @Listen(\"handleMenuItemClick\")\n handleMenuItemClick(ev: CustomEvent): void {\n if (!ev.detail.hasSubMenu && ev.detail.label !== \"Back\") {\n this.closeMenu();\n }\n }\n\n // This is listening for the event emitted when a menu item is acting as a trigger button\n @Listen(\"triggerPopoverMenuInstance\", { capture: true })\n handleSubmenuChange(ev: Event): void {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target as HTMLIcMenuItemElement;\n this.open = false;\n\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(\n `ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`\n ) as HTMLIcPopoverMenuElement;\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.host;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.host.getAttribute(\"aria-label\");\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n if (this.open) {\n if (\n this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)\n ) {\n this.popoverMenuEls.unshift(this.backButton);\n }\n\n this.currentFocus = this.submenuId !== undefined ? 1 : 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n }\n }\n\n private setButtonFocus = () => {\n this.popoverMenuEls[this.currentFocus]?.focus();\n };\n\n private popoverMenuEls: HTMLIcMenuItemElement[] = [];\n private anchorEl: HTMLElement;\n private currentFocus: number;\n private backButton: HTMLIcMenuItemElement;\n\n // Checks that the popover menu has an anchor\n private findAnchorEl = (anchor: string): HTMLElement => {\n let anchorElement: HTMLElement = null;\n if (anchor === null || anchor === undefined) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n } else {\n anchorElement = document.querySelector(\n anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor\n );\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n\n @Listen(\"click\", { target: \"document\" })\n handleClick(ev: Event): void {\n ev.preventDefault();\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n\n /**\n * @internal Opens the menu from the child menu.\n */\n @Method()\n async openFromChild(): Promise<void> {\n this.open = true;\n this.openingFromChild = true;\n\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n\n /**\n * @internal Opens the menu from the parent menu.\n */\n @Method()\n async openFromParent(): Promise<void> {\n this.open = true;\n this.openingFromParent = true;\n\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n\n private isNotPopoverMenuEl = (ev: Event) => {\n const target = ev.target as HTMLElement;\n return (\n target.id !== this.anchor &&\n target.tagName !== \"IC-MENU-ITEM\" &&\n target.tagName !== \"IC-MENU-GROUP\" &&\n target.tagName !== \"IC-POPOVER-MENU\"\n );\n };\n\n private closeMenu = () => {\n this.open = false;\n this.anchorEl?.focus();\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numButtons = this.popoverMenuEls.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n } else if (nextItem > numButtons) {\n nextItem = 0;\n }\n\n return nextItem;\n };\n\n // Manages the keyboard navigation in the popover menu\n @Listen(\"keydown\", { target: \"document\" })\n handleKeyDown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case \"ArrowDown\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(this.currentFocus, true);\n this.setButtonFocus();\n break;\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(this.currentFocus, false);\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n if (this.open) {\n this.closeMenu();\n this.host.blur();\n }\n break;\n }\n }\n\n private addMenuItems = (elements: Element[] | NodeListOf<ChildNode>) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i] as HTMLIcMenuItemElement;\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n } else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot.querySelector(\"ul\");\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n\n this.addMenuItems(menuGroupElements);\n }\n }\n };\n\n private getMenuAriaLabel = (): string => {\n const ariaLabel = this.host.getAttribute(\"aria-label\");\n\n if (this.submenuId !== undefined) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n } else {\n return ariaLabel;\n }\n };\n\n private handleBackButtonClick = (): void => {\n this.parentPopover.openFromChild();\n this.open = false;\n };\n\n componentDidRender(): void {\n if (this.open) {\n createPopper(this.anchorEl, this.host, {\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n ],\n });\n }\n }\n\n componentWillRender(): void {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n\n componentDidLoad(): void {\n const slotWrapper = this.host.shadowRoot.querySelector(\"ul.button\");\n const popoverMenuElements = getSlotElements(slotWrapper);\n\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n\n if (\n this.submenuId === undefined &&\n this.host.getAttribute(\"aria-label\") === null\n ) {\n console.error(\n `No aria-label specified for popover menu component - aria-label required`\n );\n }\n }\n\n render() {\n return (\n <Host class={{ open: this.open }}>\n <div\n id={\n this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\"\n }\n class={{\n menu: true,\n }}\n tabindex={open ? \"0\" : \"-1\"}\n >\n <div\n class={{\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n }}\n >\n {this.submenuId !== undefined && (\n <div>\n <ic-menu-item\n class=\"ic-popover-submenu-back-button\"\n ref={(el) => (this.backButton = el)}\n label=\"Back\"\n onClick={this.handleBackButtonClick}\n id={`ic-popover-submenu-back-button-${this.submenuLevel}`}\n >\n <svg\n slot=\"icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"submenu-back-icon\"\n >\n <path\n d=\"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-menu-item>\n <ic-typography variant=\"subtitle-small\" class=\"parent-label\">\n {this.parentLabel}\n </ic-typography>\n </div>\n )}\n <ul\n class=\"button\"\n aria-label={this.getMenuAriaLabel()}\n role=\"menu\"\n aria-owns={\n this.submenuId !== undefined\n ? `ic-popover-submenu-back-button-${this.submenuLevel}`\n : false\n }\n aria-controls={\n this.submenuId !== undefined\n ? `ic-popover-submenu-back-button-${this.submenuLevel}`\n : false\n }\n >\n <slot></slot>\n </ul>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-90721b3c.js';
2
- import { i as isSlotUsed, a as onComponentRequiredPropUndefined, e as renderHiddenInput, j as hasValidationStatus } from './helpers-c332acf8.js';
2
+ import { i as isSlotUsed, a as onComponentRequiredPropUndefined, e as renderHiddenInput, j as hasValidationStatus } from './helpers-b2b47a7d.js';
3
3
  import './types-dd515332.js';
4
4
 
5
- const icRadioGroupCss = "/*! 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.error{color:var(--ic-status-error)}ic-input-validation{margin-top:var(--ic-space-sm)}:host([small]) ic-input-validation{margin-top:calc(var(--ic-space-sm) / 2)}ic-input-label ic-typography{margin-bottom:var(--ic-space-sm)}:host([small]) ic-input-label ic-typography{margin-bottom:calc(var(--ic-space-sm) / 2)}.radio-buttons-container{display:flex;flex-direction:column;gap:var(--ic-space-xxs)}:host([small]) .radio-buttons-container{gap:var(--ic-space-xxxs)}:host([orientation=\"horizontal\"]) .radio-buttons-container{display:flex;flex-direction:row;gap:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host([small][orientation=\"horizontal\"]) .radio-buttons-container{gap:var(--ic-space-xl)}";
5
+ const icRadioGroupCss = "/*! 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.error{color:var(--ic-status-error)}ic-input-validation{margin-top:var(--ic-space-sm)}:host(.small) ic-input-validation{margin-top:calc(var(--ic-space-sm) / 2)}ic-input-label ic-typography{margin-bottom:var(--ic-space-sm)}:host(.small) ic-input-label ic-typography{margin-bottom:calc(var(--ic-space-sm) / 2)}.radio-buttons-container{display:flex;flex-direction:column;gap:var(--ic-space-xxs)}:host(.small) .radio-buttons-container{gap:var(--ic-space-xxxs)}:host([orientation=\"horizontal\"]) .radio-buttons-container{display:flex;flex-direction:row;gap:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.small[orientation=\"horizontal\"]) .radio-buttons-container{gap:var(--ic-space-xl)}";
6
6
 
7
7
  const RadioGroup = class {
8
8
  constructor(hostRef) {
@@ -97,7 +97,7 @@ const RadioGroup = class {
97
97
  }
98
98
  render() {
99
99
  renderHiddenInput(true, this.host, this.name, this.checkedValue, this.disabled);
100
- return (h(Host, { onKeyDown: this.handleKeyDown }, h("div", { role: "radiogroup", "aria-label": `${this.label}${this.required ? ", required" : ""}` }, !this.hideLabel && (h("ic-input-label", { class: { [`${this.validationStatus}`]: true }, label: this.label, helperText: this.helperText, required: this.required, disabled: this.disabled })), h("div", { class: "radio-buttons-container" }, h("slot", null))), hasValidationStatus(this.validationStatus, this.disabled) && (h("ic-input-validation", { ariaLiveMode: "polite", status: this.validationStatus, message: this.validationText }))));
100
+ return (h(Host, { onKeyDown: this.handleKeyDown, class: { small: this.small } }, h("div", { role: "radiogroup", "aria-label": `${this.label}${this.required ? ", required" : ""}` }, !this.hideLabel && (h("ic-input-label", { class: { [`${this.validationStatus}`]: true }, label: this.label, helperText: this.helperText, required: this.required, disabled: this.disabled })), h("div", { class: "radio-buttons-container" }, h("slot", null))), hasValidationStatus(this.validationStatus, this.disabled) && (h("ic-input-validation", { ariaLiveMode: "polite", status: this.validationStatus, message: this.validationText }))));
101
101
  }
102
102
  get host() { return getElement(this); }
103
103
  };
@@ -1 +1 @@
1
- {"file":"ic-radio-group.entry.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,wlGAAwlG;;MCyBnmG,UAAU;;;;IAiFb,kBAAa,GAAG,CAAC,KAAoB;MAC3C,QAAQ,KAAK,CAAC,GAAG;QACf,KAAK,WAAW,CAAC;QACjB,KAAK,YAAY;UACf,IAAI,CAAC,YAAY,CACf,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CACnD,CAAC,QAAQ,GAAG,IAAI,CAAC;UAClB,KAAK,CAAC,cAAc,EAAE,CAAC;UACvB,MAAM;QACR,KAAK,SAAS,CAAC;QACf,KAAK,WAAW;UACd,IAAI,CAAC,YAAY,CACf,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CACpD,CAAC,QAAQ,GAAG,IAAI,CAAC;UAClB,KAAK,CAAC,cAAc,EAAE,CAAC;OAC1B;KACF,CAAC;IAEM,wBAAmB,GAAG,CAC5B,WAAmB,EACnB,UAAmB;MAEnB,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;MAE/C,IAAI,WAAW,GAAG,CAAC,EAAE;QACnB,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AI,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE;MACvC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE;KACtC,EACD,aAAa,CACd,CAAC;GACH;EAED,MAAM;IACJ,iBAAiB,CACf,IAAI,EACJ,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,QAAQ,CACd,CAAC;IAEF,QACE,EAAC,IAAI,IAAC,SAAS,EAAE,IAAI,CAAC,aAAa,IACjC,WACE,IAAI,EAAC,YAAY,gBACL,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,GAAG,YAAY,GAAG,EAAE,EAAE,IAE9D,CAAC,IAAI,CAAC,SAAS,KACd,sBACE,KAAK,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,gBAAgB,EAAE,GAAG,IAAI,EAAE,EAC7C,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACP,CACnB,EACD,WAAK,KAAK,EAAC,yBAAyB,IAClC,eAAa,CACT,CACF,EACL,mBAAmB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,KACxD,2BACE,YAAY,EAAC,QAAQ,EACrB,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAC7B,OAAO,EAAE,IAAI,CAAC,cAAc,GACP,CACxB,CACI,EACP;GACH;;;;;;;","names":[],"sources":["./src/components/ic-radio-group/ic-radio-group.css?tag=ic-radio-group&encapsulation=shadow","./src/components/ic-radio-group/ic-radio-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\nic-input-label.error {\n color: var(--ic-status-error);\n}\n\nic-input-validation {\n margin-top: var(--ic-space-sm);\n}\n\n:host([small]) ic-input-validation {\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\nic-input-label ic-typography {\n margin-bottom: var(--ic-space-sm);\n}\n\n:host([small]) ic-input-label ic-typography {\n margin-bottom: calc(var(--ic-space-sm) / 2);\n}\n\n.radio-buttons-container {\n display: flex;\n flex-direction: column;\n gap: var(--ic-space-xxs);\n}\n\n:host([small]) .radio-buttons-container {\n gap: var(--ic-space-xxxs);\n}\n\n:host([orientation=\"horizontal\"]) .radio-buttons-container {\n display: flex;\n flex-direction: row;\n gap: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n:host([small][orientation=\"horizontal\"]) .radio-buttons-container {\n gap: var(--ic-space-xl);\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Listen,\n Element,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n hasValidationStatus,\n isSlotUsed,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n} from \"../../utils/helpers\";\nimport { IcInformationStatusOrEmpty, IcOrientation } from \"../../utils/types\";\nimport { IcValueEventDetail } from \"../../interface\";\n\n@Component({\n tag: \"ic-radio-group\",\n styleUrl: \"ic-radio-group.css\",\n shadow: true,\n})\nexport class RadioGroup {\n private radioOptions: HTMLIcRadioOptionElement[];\n\n @Element() host: HTMLIcRadioGroupElement;\n\n /**\n * The label for the radio group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the radio group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n /**\n * If `true`, the radio group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * The orientation of the radio buttons in the radio group. If there are more than two radio buttons in a radio group or either of the radio buttons use the `additional-field` slot, then the orientation will always be vertical.\n */\n @Prop({ reflect: true, mutable: true }) orientation: IcOrientation =\n \"vertical\";\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 * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string;\n\n /**\n * If `true`, the small styling will be applied to the radio group.\n */\n @Prop() small: boolean = false;\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n /**\n * The validation text - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n /**\n * The checked state.\n */\n @State() checkedValue: string = \"\";\n @State() selectedChild: number = -1;\n\n /**\n * Emitted when a user selects a radio.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n @Listen(\"icCheck\")\n selectHandler(event: CustomEvent<IcValueEventDetail>): void {\n this.checkedValue = event.detail.value;\n this.icChange.emit({ value: this.checkedValue });\n\n if (this.radioOptions !== undefined) {\n this.radioOptions.forEach((radioOption, index) => {\n radioOption.selected = this.checkedValue === radioOption.value;\n if (radioOption.selected) {\n this.selectedChild = index;\n }\n });\n this.radioOptions[0].shadowRoot.querySelector(\"input\").tabIndex =\n this.selectedChild > 0 ? -1 : 0;\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.radioOptions[\n this.getNextItemToSelect(this.selectedChild, true)\n ].selected = true;\n event.preventDefault();\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.radioOptions[\n this.getNextItemToSelect(this.selectedChild, false)\n ].selected = true;\n event.preventDefault();\n }\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numRadios = this.radioOptions.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n //check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numRadios;\n } else if (nextItem > numRadios) {\n nextItem = 0;\n }\n\n //if next item is disabled then find next\n if (this.radioOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n\n return nextItem;\n };\n\n componentDidLoad(): void {\n this.radioOptions = Array.from(\n this.host.querySelectorAll(\"ic-radio-option\")\n );\n\n this.radioOptions.forEach((radioOption, index) => {\n if (!radioOption.selected) {\n radioOption.selected = this.checkedValue === radioOption.value;\n }\n radioOption.name = this.name;\n radioOption.groupLabel = this.label;\n if (radioOption.selected) {\n this.selectedChild = index;\n this.checkedValue = radioOption.value;\n }\n });\n this.radioOptions[0].shadowRoot.querySelector(\"input\").tabIndex =\n this.selectedChild > 0 ? -1 : 0;\n\n if (\n this.orientation === \"horizontal\" &&\n this.radioOptions !== undefined &&\n (this.radioOptions.length > 2 ||\n (this.radioOptions.length === 2 &&\n (isSlotUsed(this.radioOptions[0], \"additional-field\") ||\n isSlotUsed(this.radioOptions[1], \"additional-field\"))))\n ) {\n this.orientation = \"vertical\";\n }\n\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Radio Group\"\n );\n }\n\n render() {\n renderHiddenInput(\n true,\n this.host,\n this.name,\n this.checkedValue,\n this.disabled\n );\n\n return (\n <Host onKeyDown={this.handleKeyDown}>\n <div\n role=\"radiogroup\"\n aria-label={`${this.label}${this.required ? \", required\" : \"\"}`}\n >\n {!this.hideLabel && (\n <ic-input-label\n class={{ [`${this.validationStatus}`]: true }}\n label={this.label}\n helperText={this.helperText}\n required={this.required}\n disabled={this.disabled}\n ></ic-input-label>\n )}\n <div class=\"radio-buttons-container\">\n <slot></slot>\n </div>\n </div>\n {hasValidationStatus(this.validationStatus, this.disabled) && (\n <ic-input-validation\n ariaLiveMode=\"polite\"\n status={this.validationStatus}\n message={this.validationText}\n ></ic-input-validation>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-radio-group.entry.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,olGAAolG;;MCyB/lG,UAAU;;;;IAiFb,kBAAa,GAAG,CAAC,KAAoB;MAC3C,QAAQ,KA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IAAI,CAAC,gBAAgB,EAAE,GAAG,IAAI,EAAE,EAC7C,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACP,CACnB,EACD,WAAK,KAAK,EAAC,yBAAyB,IAClC,eAAa,CACT,CACF,EACL,mBAAmB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,KACxD,2BACE,YAAY,EAAC,QAAQ,EACrB,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAC7B,OAAO,EAAE,IAAI,CAAC,cAAc,GACP,CACxB,CACI,EACP;GACH;;;;;;;","names":[],"sources":["./src/components/ic-radio-group/ic-radio-group.css?tag=ic-radio-group&encapsulation=shadow","./src/components/ic-radio-group/ic-radio-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\nic-input-label.error {\n color: var(--ic-status-error);\n}\n\nic-input-validation {\n margin-top: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-validation {\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\nic-input-label ic-typography {\n margin-bottom: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-label ic-typography {\n margin-bottom: calc(var(--ic-space-sm) / 2);\n}\n\n.radio-buttons-container {\n display: flex;\n flex-direction: column;\n gap: var(--ic-space-xxs);\n}\n\n:host(.small) .radio-buttons-container {\n gap: var(--ic-space-xxxs);\n}\n\n:host([orientation=\"horizontal\"]) .radio-buttons-container {\n display: flex;\n flex-direction: row;\n gap: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n:host(.small[orientation=\"horizontal\"]) .radio-buttons-container {\n gap: var(--ic-space-xl);\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Listen,\n Element,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n hasValidationStatus,\n isSlotUsed,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n} from \"../../utils/helpers\";\nimport { IcInformationStatusOrEmpty, IcOrientation } from \"../../utils/types\";\nimport { IcValueEventDetail } from \"../../interface\";\n\n@Component({\n tag: \"ic-radio-group\",\n styleUrl: \"ic-radio-group.css\",\n shadow: true,\n})\nexport class RadioGroup {\n private radioOptions: HTMLIcRadioOptionElement[];\n\n @Element() host: HTMLIcRadioGroupElement;\n\n /**\n * The label for the radio group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the radio group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n /**\n * If `true`, the radio group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * The orientation of the radio buttons in the radio group. If there are more than two radio buttons in a radio group or either of the radio buttons use the `additional-field` slot, then the orientation will always be vertical.\n */\n @Prop({ reflect: true, mutable: true }) orientation: IcOrientation =\n \"vertical\";\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 * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string;\n\n /**\n * If `true`, the small styling will be applied to the radio group.\n */\n @Prop() small: boolean = false;\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n /**\n * The validation text - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n /**\n * The checked state.\n */\n @State() checkedValue: string = \"\";\n @State() selectedChild: number = -1;\n\n /**\n * Emitted when a user selects a radio.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n @Listen(\"icCheck\")\n selectHandler(event: CustomEvent<IcValueEventDetail>): void {\n this.checkedValue = event.detail.value;\n this.icChange.emit({ value: this.checkedValue });\n\n if (this.radioOptions !== undefined) {\n this.radioOptions.forEach((radioOption, index) => {\n radioOption.selected = this.checkedValue === radioOption.value;\n if (radioOption.selected) {\n this.selectedChild = index;\n }\n });\n this.radioOptions[0].shadowRoot.querySelector(\"input\").tabIndex =\n this.selectedChild > 0 ? -1 : 0;\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.radioOptions[\n this.getNextItemToSelect(this.selectedChild, true)\n ].selected = true;\n event.preventDefault();\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.radioOptions[\n this.getNextItemToSelect(this.selectedChild, false)\n ].selected = true;\n event.preventDefault();\n }\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numRadios = this.radioOptions.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n //check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numRadios;\n } else if (nextItem > numRadios) {\n nextItem = 0;\n }\n\n //if next item is disabled then find next\n if (this.radioOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n\n return nextItem;\n };\n\n componentDidLoad(): void {\n this.radioOptions = Array.from(\n this.host.querySelectorAll(\"ic-radio-option\")\n );\n\n this.radioOptions.forEach((radioOption, index) => {\n if (!radioOption.selected) {\n radioOption.selected = this.checkedValue === radioOption.value;\n }\n radioOption.name = this.name;\n radioOption.groupLabel = this.label;\n if (radioOption.selected) {\n this.selectedChild = index;\n this.checkedValue = radioOption.value;\n }\n });\n this.radioOptions[0].shadowRoot.querySelector(\"input\").tabIndex =\n this.selectedChild > 0 ? -1 : 0;\n\n if (\n this.orientation === \"horizontal\" &&\n this.radioOptions !== undefined &&\n (this.radioOptions.length > 2 ||\n (this.radioOptions.length === 2 &&\n (isSlotUsed(this.radioOptions[0], \"additional-field\") ||\n isSlotUsed(this.radioOptions[1], \"additional-field\"))))\n ) {\n this.orientation = \"vertical\";\n }\n\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Radio Group\"\n );\n }\n\n render() {\n renderHiddenInput(\n true,\n this.host,\n this.name,\n this.checkedValue,\n this.disabled\n );\n\n return (\n <Host onKeyDown={this.handleKeyDown} class={{ small: this.small }}>\n <div\n role=\"radiogroup\"\n aria-label={`${this.label}${this.required ? \", required\" : \"\"}`}\n >\n {!this.hideLabel && (\n <ic-input-label\n class={{ [`${this.validationStatus}`]: true }}\n label={this.label}\n helperText={this.helperText}\n required={this.required}\n disabled={this.disabled}\n ></ic-input-label>\n )}\n <div class=\"radio-buttons-container\">\n <slot></slot>\n </div>\n </div>\n {hasValidationStatus(this.validationStatus, this.disabled) && (\n <ic-input-validation\n ariaLiveMode=\"polite\"\n status={this.validationStatus}\n message={this.validationText}\n ></ic-input-validation>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-90721b3c.js';
2
- import { t as getSlotContent, d as addFormResetListener, a as onComponentRequiredPropUndefined, r as removeFormResetListener } from './helpers-c332acf8.js';
2
+ import { u as getSlotContent, d as addFormResetListener, a as onComponentRequiredPropUndefined, r as removeFormResetListener } from './helpers-b2b47a7d.js';
3
3
  import './types-dd515332.js';
4
4
 
5
- const icRadioOptionCss = "/*! 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:flex;flex-direction:column;width:-moz-fit-content;width:fit-content}:host([additional-field-display=\"static\"]) ::slotted(ic-text-field){margin-top:calc(var(--ic-space-sm) / 2);margin-left:var(--ic-space-xl)}:host([disabled]){color:var(--ic-architectural-200)}.container input:focus+span.checkmark,:host(:focus) .container input:checked+span.checkmark{box-shadow:var(--ic-border-focus)}.container{display:grid;grid-template-columns:min-content auto;position:relative;cursor:pointer;align-items:center;margin:var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs)}.container.disabled,.container.disabled input:disabled{cursor:default}.container input{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-block;position:absolute;cursor:pointer;height:var(--ic-space-lg);width:var(--ic-space-lg);border-radius:50%;border:none}.checkmark{display:block;position:relative;top:0;left:0;height:var(--ic-space-lg);width:var(--ic-space-lg);background-color:transparent;border:0.063rem solid #a7acb3;border-radius:50%;transition:var(--ic-easing-transition-fast);box-sizing:border-box}.container input:checked~.checkmark::after{display:inline-block}.container:hover input~.checkmark{background-color:var(--ic-action-default-bg-hover);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-hover);border:0.063rem solid var(--ic-action-default)}.container:active input~.checkmark{background-color:var(--ic-action-default-bg-active);border:0.063rem solid var(--ic-action-default-active);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-active)}.container:active input:checked~.checkmark{background-color:var(--ic-action-default-bg-active);border:0.125rem solid var(--ic-action-default-active);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-active)}.container:active input:checked~.checkmark::after{background-color:var(--ic-action-default-active)}.container input:checked~.checkmark{border:0.125rem solid var(--ic-action-default)}.container input:checked:disabled~.checkmark{background-color:transparent;border:0.125rem solid var(--ic-architectural-200)}.container input:disabled~.checkmark{border:0.063rem dashed var(--ic-architectural-200)}.container input:disabled~.checkmark::after{background:var(--ic-architectural-200)}.container:hover input:disabled~.checkmark{background-color:transparent;box-shadow:none;border:0.125rem solid none}.container:active input:disabled~.checkmark::after{background-color:var(--ic-architectural-200)}.container .checkmark::after{content:\"\";position:absolute;display:none;top:calc(50% - var(--ic-space-xs));left:calc(50% - var(--ic-space-xs));width:var(--ic-space-md);height:var(--ic-space-md);border-radius:50%;background:var(--ic-action-default)}.radio-label{margin-left:var(--ic-space-md)}.additional-field-wrapper{margin-left:var(--ic-space-xs)}.branch-corner{color:var(--ic-action-default);height:var(--ic-space-md);width:var(--ic-space-xl);border-radius:0 0 0 0.188rem;border-bottom:0.125rem solid var(--ic-action-default);border-left:0.125rem solid var(--ic-action-default);margin-left:-0.063rem}.dynamic-container{display:flex;position:relative;margin:var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);gap:var(--ic-space-xs)}.dynamic-container.hidden{display:none}.dynamic-text{color:var(--ic-action-default);margin-top:calc(var(--ic-space-sm) / 2);margin-bottom:var(--ic-space-xs);border-radius:2%}@media (max-width: 576px){::slotted(ic-text-field){--input-width:100%}}@media (forced-colors: active){.container input:checked~.checkmark,.container:active input:checked~.checkmark{border-color:Highlight}.container input:checked~.checkmark::after,.container:active input:checked~.checkmark::after{background-color:Highlight}.container input:disabled~.checkmark,.container input:checked:disabled~.checkmark{border-color:GrayText}.container input:disabled~.checkmark::after,.container:active input:disabled~.checkmark::after{background-color:GrayText}}";
5
+ const icRadioOptionCss = "/*! 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:flex;flex-direction:column;width:-moz-fit-content;width:fit-content}:host([additional-field-display=\"static\"]) ::slotted(ic-text-field){margin-top:calc(var(--ic-space-sm) / 2);margin-left:var(--ic-space-xl)}:host(.disabled){color:var(--ic-architectural-200)}.container input:focus+span.checkmark,:host(:focus) .container input:checked+span.checkmark{box-shadow:var(--ic-border-focus)}.container{display:grid;grid-template-columns:min-content auto;position:relative;cursor:pointer;align-items:center;margin:var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs)}.container.disabled,.container.disabled input:disabled{cursor:default}.container input{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-block;position:absolute;cursor:pointer;height:var(--ic-space-lg);width:var(--ic-space-lg);border-radius:50%;border:none}.checkmark{display:block;position:relative;top:0;left:0;height:var(--ic-space-lg);width:var(--ic-space-lg);background-color:transparent;border:var(--ic-space-1px) solid #a7acb3;border-radius:50%;transition:var(--ic-easing-transition-fast);box-sizing:border-box}.container input:checked~.checkmark::after{display:inline-block}.container:hover input~.checkmark{background-color:var(--ic-action-default-bg-hover);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-hover);border:var(--ic-space-1px) solid var(--ic-action-default)}.container:active input~.checkmark{background-color:var(--ic-action-default-bg-active);border:var(--ic-space-1px) solid var(--ic-action-default-active);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-active)}.container:active input:checked~.checkmark{background-color:var(--ic-action-default-bg-active);border:0.125rem solid var(--ic-action-default-active);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-active)}.container:active input:checked~.checkmark::after{background-color:var(--ic-action-default-active)}.container input:checked~.checkmark{border:0.125rem solid var(--ic-action-default)}.container input:checked:disabled~.checkmark{background-color:transparent;border:0.125rem solid var(--ic-architectural-200)}.container input:disabled~.checkmark{border:var(--ic-space-1px) dashed var(--ic-architectural-200)}.container input:disabled~.checkmark::after{background:var(--ic-architectural-200)}.container:hover input:disabled~.checkmark{background-color:transparent;box-shadow:none;border:0.125rem solid none}.container:active input:disabled~.checkmark::after{background-color:var(--ic-architectural-200)}.container .checkmark::after{content:\"\";position:absolute;display:none;top:calc(50% - var(--ic-space-xs));left:calc(50% - var(--ic-space-xs));width:var(--ic-space-md);height:var(--ic-space-md);border-radius:50%;background:var(--ic-action-default)}.radio-label{margin-left:var(--ic-space-md)}.additional-field-wrapper{margin-left:var(--ic-space-xs)}.branch-corner{color:var(--ic-action-default);height:var(--ic-space-md);width:var(--ic-space-xl);border-radius:0 0 0 0.188rem;border-bottom:0.125rem solid var(--ic-action-default);border-left:0.125rem solid var(--ic-action-default);margin-left:calc(-1 * var(--ic-space-1px))}.dynamic-container{display:flex;position:relative;margin:var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);gap:var(--ic-space-xs)}.dynamic-container.hidden{display:none}.dynamic-text{color:var(--ic-action-default);margin-top:calc(var(--ic-space-sm) / 2);margin-bottom:var(--ic-space-xs);border-radius:2%}@media (max-width: 576px){::slotted(ic-text-field){--input-width:100%}}@media (forced-colors: active){.container input:checked~.checkmark,.container:active input:checked~.checkmark{border-color:Highlight}.container input:checked~.checkmark::after,.container:active input:checked~.checkmark::after{background-color:Highlight}.container input:disabled~.checkmark,.container input:checked:disabled~.checkmark{border-color:GrayText}.container input:disabled~.checkmark::after,.container:active input:disabled~.checkmark::after{background-color:GrayText}}";
6
6
 
7
7
  const RadioOption = class {
8
8
  constructor(hostRef) {
@@ -116,7 +116,7 @@ const RadioOption = class {
116
116
  }
117
117
  render() {
118
118
  const id = `ic-radio-option-${this.label !== undefined ? this.label : this.value}-${this.groupLabel}`;
119
- return (h(Host, { onClick: this.handleClick }, h("div", { class: { ["container"]: true, ["disabled"]: this.disabled } }, h("div", null, h("input", { role: "radio", tabindex: this.selected ? "0" : "-1", type: "radio", name: this.name, id: id, value: this.value, disabled: this.disabled ? true : null, checked: this.selected, ref: (el) => (this.radioElement = el) }), h("span", { class: "checkmark" })), h("ic-typography", { class: "radio-label", variant: "body" }, h("label", { htmlFor: id }, this.label))), this.hasAdditionalField && (h("div", { onClick: this.swallowClick, class: {
119
+ return (h(Host, { onClick: this.handleClick, class: { disabled: this.disabled } }, h("div", { class: { ["container"]: true, ["disabled"]: this.disabled } }, h("div", null, h("input", { role: "radio", tabindex: this.selected ? "0" : "-1", type: "radio", name: this.name, id: id, value: this.value, disabled: this.disabled ? true : null, checked: this.selected, ref: (el) => (this.radioElement = el) }), h("span", { class: "checkmark" })), h("ic-typography", { class: "radio-label", variant: "body" }, h("label", { htmlFor: id }, this.label))), this.hasAdditionalField && (h("div", { onClick: this.swallowClick, class: {
120
120
  "dynamic-container": true,
121
121
  hidden: this.additionalFieldDisplay === "dynamic" && !this.selected,
122
122
  } }, this.additionalFieldDisplay === "dynamic" && (h("div", { class: "branch-corner" })), h("div", null, this.additionalFieldDisplay === "dynamic" && (h("ic-typography", { variant: "caption" }, h("p", { class: "dynamic-text" }, this.dynamicText))), h("div", { class: {