@ukic/web-components 2.7.0 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (320) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  3. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  4. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ic-button_3.cjs.entry.js +2 -2
  6. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-data-entity.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-dialog.cjs.entry.js +86 -65
  18. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +76 -67
  20. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -2
  26. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-popover-menu.cjs.entry.js +28 -59
  28. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-search-bar.cjs.entry.js +2 -2
  32. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-select.cjs.entry.js +3 -2
  34. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-text-field.cjs.entry.js +16 -24
  44. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-top-navigation.cjs.entry.js +8 -4
  46. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  47. package/dist/cjs/loader.cjs.js +1 -1
  48. package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.e2e.js +3 -0
  49. package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.e2e.js.map +1 -1
  50. package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js +3 -0
  51. package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js.map +1 -1
  52. package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +3 -3
  53. package/dist/collection/components/ic-badge/ic-badge.js +1 -1
  54. package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
  55. package/dist/collection/components/ic-button/ic-button.css +3 -1
  56. package/dist/collection/components/ic-card/ic-card.css +1 -1
  57. package/dist/collection/components/ic-checkbox/ic-checkbox.css +5 -5
  58. package/dist/collection/components/ic-chip/ic-chip.css +1 -1
  59. package/dist/collection/components/ic-data-entity/ic-data-entity.css +1 -1
  60. package/dist/collection/components/ic-data-row/ic-data-row.css +1 -1
  61. package/dist/collection/components/ic-data-row/test/a11y/ic-data-row.test.a11y.js +3 -1
  62. package/dist/collection/components/ic-data-row/test/a11y/ic-data-row.test.a11y.js.map +1 -1
  63. package/dist/collection/components/ic-dialog/ic-dialog.css +56 -22
  64. package/dist/collection/components/ic-dialog/ic-dialog.js +103 -64
  65. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  66. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.e2e.js +129 -48
  67. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.e2e.js.map +1 -1
  68. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js +38 -39
  69. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js.map +1 -1
  70. package/dist/collection/components/ic-footer/test/a11y/ic-footer.test.a11y.js +2 -0
  71. package/dist/collection/components/ic-footer/test/a11y/ic-footer.test.a11y.js.map +1 -1
  72. package/dist/collection/components/ic-horizontal-scroll/test/a11y/ic-horizontal-scroll.test.a11y.js +2 -0
  73. package/dist/collection/components/ic-horizontal-scroll/test/a11y/ic-horizontal-scroll.test.a11y.js.map +1 -1
  74. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +4 -4
  75. package/dist/collection/components/ic-menu/ic-menu.css +1 -5
  76. package/dist/collection/components/ic-menu/ic-menu.js +124 -65
  77. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  78. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +17 -0
  79. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -1
  80. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +1 -1
  81. package/dist/collection/components/ic-navigation-group/test/a11y/ic-navigation-group.test.a11y.js +2 -0
  82. package/dist/collection/components/ic-navigation-group/test/a11y/ic-navigation-group.test.a11y.js.map +1 -1
  83. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +11 -5
  84. package/dist/collection/components/ic-navigation-item/test/a11y/ic-navigation-item.test.a11y.js +2 -0
  85. package/dist/collection/components/ic-navigation-item/test/a11y/ic-navigation-item.test.a11y.js.map +1 -1
  86. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css +7 -3
  87. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -1
  88. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
  89. package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js +1 -1
  90. package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js.map +1 -1
  91. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +37 -36
  92. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -1
  93. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +28 -59
  94. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  95. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js +3 -0
  96. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js.map +1 -1
  97. package/dist/collection/components/ic-radio-option/ic-radio-option.css +3 -3
  98. package/dist/collection/components/ic-search-bar/ic-search-bar.css +1 -1
  99. package/dist/collection/components/ic-search-bar/ic-search-bar.js +1 -1
  100. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  101. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js +14 -30
  102. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js.map +1 -1
  103. package/dist/collection/components/ic-select/ic-select.css +1 -1
  104. package/dist/collection/components/ic-select/ic-select.js +20 -1
  105. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  106. package/dist/collection/components/ic-select/test/basic/ic-select.e2e.js +1 -0
  107. package/dist/collection/components/ic-select/test/basic/ic-select.e2e.js.map +1 -1
  108. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +2 -2
  109. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  110. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.e2e.js +1 -2
  111. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.e2e.js.map +1 -1
  112. package/dist/collection/components/ic-status-tag/ic-status-tag.css +4 -4
  113. package/dist/collection/components/ic-step/ic-step.css +1 -1
  114. package/dist/collection/components/ic-switch/ic-switch.css +3 -2
  115. package/dist/collection/components/ic-tab-group/ic-tab-group.css +1 -1
  116. package/dist/collection/components/ic-text-field/ic-text-field.js +16 -24
  117. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  118. package/dist/collection/components/ic-tooltip/ic-tooltip.css +2 -2
  119. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +3 -3
  120. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +8 -3
  121. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  122. package/dist/collection/components/ic-top-navigation/test/a11y/ic-top-navigation.test.a11y.js +2 -0
  123. package/dist/collection/components/ic-top-navigation/test/a11y/ic-top-navigation.test.a11y.js.map +1 -1
  124. package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js +15 -0
  125. package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js.map +1 -1
  126. package/dist/components/ic-back-to-top.js +1 -1
  127. package/dist/components/ic-back-to-top.js.map +1 -1
  128. package/dist/components/ic-badge.js +1 -1
  129. package/dist/components/ic-badge.js.map +1 -1
  130. package/dist/components/ic-button2.js +1 -1
  131. package/dist/components/ic-button2.js.map +1 -1
  132. package/dist/components/ic-card.js +1 -1
  133. package/dist/components/ic-card.js.map +1 -1
  134. package/dist/components/ic-checkbox.js +1 -1
  135. package/dist/components/ic-checkbox.js.map +1 -1
  136. package/dist/components/ic-chip.js +1 -1
  137. package/dist/components/ic-chip.js.map +1 -1
  138. package/dist/components/ic-data-entity.js +1 -1
  139. package/dist/components/ic-data-entity.js.map +1 -1
  140. package/dist/components/ic-data-row.js +1 -1
  141. package/dist/components/ic-data-row.js.map +1 -1
  142. package/dist/components/ic-dialog.js +88 -66
  143. package/dist/components/ic-dialog.js.map +1 -1
  144. package/dist/components/ic-input-component-container2.js +1 -1
  145. package/dist/components/ic-input-component-container2.js.map +1 -1
  146. package/dist/components/ic-menu2.js +79 -67
  147. package/dist/components/ic-menu2.js.map +1 -1
  148. package/dist/components/ic-navigation-group.js +1 -1
  149. package/dist/components/ic-navigation-group.js.map +1 -1
  150. package/dist/components/ic-navigation-item.js +1 -1
  151. package/dist/components/ic-navigation-item.js.map +1 -1
  152. package/dist/components/ic-navigation-menu2.js +5 -2
  153. package/dist/components/ic-navigation-menu2.js.map +1 -1
  154. package/dist/components/ic-popover-menu.js +28 -59
  155. package/dist/components/ic-popover-menu.js.map +1 -1
  156. package/dist/components/ic-radio-option.js +1 -1
  157. package/dist/components/ic-radio-option.js.map +1 -1
  158. package/dist/components/ic-search-bar.js +2 -2
  159. package/dist/components/ic-search-bar.js.map +1 -1
  160. package/dist/components/ic-select.js +4 -2
  161. package/dist/components/ic-select.js.map +1 -1
  162. package/dist/components/ic-status-tag.js +1 -1
  163. package/dist/components/ic-status-tag.js.map +1 -1
  164. package/dist/components/ic-step.js +1 -1
  165. package/dist/components/ic-step.js.map +1 -1
  166. package/dist/components/ic-switch.js +1 -1
  167. package/dist/components/ic-switch.js.map +1 -1
  168. package/dist/components/ic-tab-group.js +1 -1
  169. package/dist/components/ic-tab-group.js.map +1 -1
  170. package/dist/components/ic-text-field2.js +16 -24
  171. package/dist/components/ic-text-field2.js.map +1 -1
  172. package/dist/components/ic-tooltip2.js +1 -1
  173. package/dist/components/ic-tooltip2.js.map +1 -1
  174. package/dist/components/ic-top-navigation.js +8 -4
  175. package/dist/components/ic-top-navigation.js.map +1 -1
  176. package/dist/core/core.css +1 -1
  177. package/dist/core/core.esm.js +1 -1
  178. package/dist/core/core.esm.js.map +1 -1
  179. package/dist/core/p-24da56e7.entry.js +2 -0
  180. package/dist/core/p-24da56e7.entry.js.map +1 -0
  181. package/dist/core/p-43af3cf6.entry.js +2 -0
  182. package/dist/core/p-43af3cf6.entry.js.map +1 -0
  183. package/dist/core/p-4bc35224.entry.js +2 -0
  184. package/dist/core/p-4bc35224.entry.js.map +1 -0
  185. package/dist/core/p-5a3ca50a.entry.js +2 -0
  186. package/dist/core/p-5a3ca50a.entry.js.map +1 -0
  187. package/dist/core/{p-eb063498.entry.js → p-5ccbb042.entry.js} +2 -2
  188. package/dist/core/p-5ccbb042.entry.js.map +1 -0
  189. package/dist/core/p-657513b5.entry.js +2 -0
  190. package/dist/core/p-657513b5.entry.js.map +1 -0
  191. package/dist/core/p-69d15528.entry.js +2 -0
  192. package/dist/core/p-69d15528.entry.js.map +1 -0
  193. package/dist/core/p-6c376756.entry.js +2 -0
  194. package/dist/core/p-6c376756.entry.js.map +1 -0
  195. package/dist/core/p-717907de.entry.js +2 -0
  196. package/dist/core/p-717907de.entry.js.map +1 -0
  197. package/dist/core/p-748159fe.entry.js +2 -0
  198. package/dist/core/p-748159fe.entry.js.map +1 -0
  199. package/dist/core/p-7ce86152.entry.js +2 -0
  200. package/dist/core/p-7ce86152.entry.js.map +1 -0
  201. package/dist/core/p-8b18346a.entry.js.map +1 -1
  202. package/dist/core/p-99fad66b.entry.js +2 -0
  203. package/dist/core/p-99fad66b.entry.js.map +1 -0
  204. package/dist/core/p-9f6ffced.entry.js +2 -0
  205. package/dist/core/p-9f6ffced.entry.js.map +1 -0
  206. package/dist/core/{p-af9f1caa.entry.js → p-9ff57f09.entry.js} +2 -2
  207. package/dist/core/p-9ff57f09.entry.js.map +1 -0
  208. package/dist/core/p-a76912b0.entry.js +2 -0
  209. package/dist/core/p-a76912b0.entry.js.map +1 -0
  210. package/dist/core/p-b879fa3e.entry.js +2 -0
  211. package/dist/core/p-b879fa3e.entry.js.map +1 -0
  212. package/dist/core/p-c0719bf4.entry.js +2 -0
  213. package/dist/core/p-c0719bf4.entry.js.map +1 -0
  214. package/dist/core/{p-ec82fa24.entry.js → p-ca6073be.entry.js} +2 -2
  215. package/dist/core/p-ca6073be.entry.js.map +1 -0
  216. package/dist/core/p-cb5f19ea.entry.js +2 -0
  217. package/dist/core/p-cb5f19ea.entry.js.map +1 -0
  218. package/dist/core/p-d80f99e0.entry.js +2 -0
  219. package/dist/core/p-d80f99e0.entry.js.map +1 -0
  220. package/dist/core/p-e9ddb8cd.entry.js +2 -0
  221. package/dist/core/p-e9ddb8cd.entry.js.map +1 -0
  222. package/dist/core/p-eb4641a9.entry.js +2 -0
  223. package/dist/core/p-eb4641a9.entry.js.map +1 -0
  224. package/dist/esm/core.js +1 -1
  225. package/dist/esm/ic-back-to-top.entry.js +1 -1
  226. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  227. package/dist/esm/ic-badge.entry.js.map +1 -1
  228. package/dist/esm/ic-button_3.entry.js +2 -2
  229. package/dist/esm/ic-button_3.entry.js.map +1 -1
  230. package/dist/esm/ic-card.entry.js +1 -1
  231. package/dist/esm/ic-card.entry.js.map +1 -1
  232. package/dist/esm/ic-checkbox.entry.js +1 -1
  233. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  234. package/dist/esm/ic-chip.entry.js +1 -1
  235. package/dist/esm/ic-chip.entry.js.map +1 -1
  236. package/dist/esm/ic-data-entity.entry.js +1 -1
  237. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  238. package/dist/esm/ic-data-row.entry.js +1 -1
  239. package/dist/esm/ic-data-row.entry.js.map +1 -1
  240. package/dist/esm/ic-dialog.entry.js +87 -66
  241. package/dist/esm/ic-dialog.entry.js.map +1 -1
  242. package/dist/esm/ic-input-component-container_3.entry.js +76 -67
  243. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  244. package/dist/esm/ic-navigation-group.entry.js +1 -1
  245. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  246. package/dist/esm/ic-navigation-item.entry.js +1 -1
  247. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  248. package/dist/esm/ic-navigation-menu.entry.js +5 -2
  249. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  250. package/dist/esm/ic-popover-menu.entry.js +28 -59
  251. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  252. package/dist/esm/ic-radio-option.entry.js +1 -1
  253. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  254. package/dist/esm/ic-search-bar.entry.js +2 -2
  255. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  256. package/dist/esm/ic-select.entry.js +3 -2
  257. package/dist/esm/ic-select.entry.js.map +1 -1
  258. package/dist/esm/ic-status-tag.entry.js +1 -1
  259. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  260. package/dist/esm/ic-step.entry.js +1 -1
  261. package/dist/esm/ic-step.entry.js.map +1 -1
  262. package/dist/esm/ic-switch.entry.js +1 -1
  263. package/dist/esm/ic-switch.entry.js.map +1 -1
  264. package/dist/esm/ic-tab-group.entry.js +1 -1
  265. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  266. package/dist/esm/ic-text-field.entry.js +16 -24
  267. package/dist/esm/ic-text-field.entry.js.map +1 -1
  268. package/dist/esm/ic-top-navigation.entry.js +8 -4
  269. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  270. package/dist/esm/loader.js +1 -1
  271. package/dist/types/components/ic-dialog/ic-dialog.d.ts +13 -2
  272. package/dist/types/components/ic-menu/ic-menu.d.ts +12 -2
  273. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +1 -1
  274. package/dist/types/components/ic-select/ic-select.d.ts +4 -0
  275. package/dist/types/components/ic-text-field/ic-text-field.d.ts +1 -0
  276. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +1 -0
  277. package/dist/types/components.d.ts +18 -0
  278. package/hydrate/index.js +246 -242
  279. package/package.json +2 -2
  280. package/dist/core/p-0dc4f225.entry.js +0 -2
  281. package/dist/core/p-0dc4f225.entry.js.map +0 -1
  282. package/dist/core/p-12124e24.entry.js +0 -2
  283. package/dist/core/p-12124e24.entry.js.map +0 -1
  284. package/dist/core/p-1cf2a6aa.entry.js +0 -2
  285. package/dist/core/p-1cf2a6aa.entry.js.map +0 -1
  286. package/dist/core/p-3fd897c9.entry.js +0 -2
  287. package/dist/core/p-3fd897c9.entry.js.map +0 -1
  288. package/dist/core/p-432f8ff0.entry.js +0 -2
  289. package/dist/core/p-432f8ff0.entry.js.map +0 -1
  290. package/dist/core/p-4559600a.entry.js +0 -2
  291. package/dist/core/p-4559600a.entry.js.map +0 -1
  292. package/dist/core/p-5b487daa.entry.js +0 -2
  293. package/dist/core/p-5b487daa.entry.js.map +0 -1
  294. package/dist/core/p-5ca39ed5.entry.js +0 -2
  295. package/dist/core/p-5ca39ed5.entry.js.map +0 -1
  296. package/dist/core/p-763d0822.entry.js +0 -2
  297. package/dist/core/p-763d0822.entry.js.map +0 -1
  298. package/dist/core/p-7bb3c340.entry.js +0 -2
  299. package/dist/core/p-7bb3c340.entry.js.map +0 -1
  300. package/dist/core/p-9ccfb863.entry.js +0 -2
  301. package/dist/core/p-9ccfb863.entry.js.map +0 -1
  302. package/dist/core/p-a448d873.entry.js +0 -2
  303. package/dist/core/p-a448d873.entry.js.map +0 -1
  304. package/dist/core/p-af9f1caa.entry.js.map +0 -1
  305. package/dist/core/p-b77ab20a.entry.js +0 -2
  306. package/dist/core/p-b77ab20a.entry.js.map +0 -1
  307. package/dist/core/p-c36cbd8a.entry.js +0 -2
  308. package/dist/core/p-c36cbd8a.entry.js.map +0 -1
  309. package/dist/core/p-e2903ce9.entry.js +0 -2
  310. package/dist/core/p-e2903ce9.entry.js.map +0 -1
  311. package/dist/core/p-ea6ad791.entry.js +0 -2
  312. package/dist/core/p-ea6ad791.entry.js.map +0 -1
  313. package/dist/core/p-eb063498.entry.js.map +0 -1
  314. package/dist/core/p-ec82fa24.entry.js.map +0 -1
  315. package/dist/core/p-f00e510b.entry.js +0 -2
  316. package/dist/core/p-f00e510b.entry.js.map +0 -1
  317. package/dist/core/p-f69fb26b.entry.js +0 -2
  318. package/dist/core/p-f69fb26b.entry.js.map +0 -1
  319. package/dist/core/p-fe6e0c0e.entry.js +0 -2
  320. package/dist/core/p-fe6e0c0e.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"ic-checkbox.entry.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,2rNAA2rN;;MCkCpsN,QAAQ;;;;;IAEX,kBAAa,GAAW,eAAe,CAAC;IAuJxC,gBAAW,GAAG;MACpB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;MAC7B,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;MACpB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;KAC7B,CAAC;IAEM,oBAAe,GAAG;MACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC;KACtC,CAAC;kCAvJA,QAAQ;mBAKkD,KAAK;4BACrC,IAAI,CAAC,OAAO;oBAKX,KAAK;uBAMJ,4CAA4C;;;;;;;;yBAwCzC,KAAK;;;;iBAoBZ,KAAK;;;EAiB/B,iBAAiB;IACf,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAE5C,oBAAoB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;GACrD;EAED,gBAAgB;IACd,gCAAgC,CAC9B;MACE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE;MACvC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE;KACxC,EACD,UAAU,CACX,CAAC;GACH;EAED,kBAAkB;IAChB,IAAI,IAAI,CAAC,sBAAsB,KAAK,QAAQ,EAA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,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,UAAU,EAAE,IAAI,CAAC,UAAU,GACpB,EACT,qBAAe,KAAK,EAAC,gBAAgB,EAAC,OAAO,EAAC,MAAM,IAClD,aAAO,OAAO,EAAE,EAAE,IAAG,IAAI,CAAC,KAAK,CAAS,CAC1B,CACZ,EACL,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,KACtC,WACE,KAAK,EAAC,mBAAmB,EACzB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,wBAAwB,GAAG,EAAE,CAAC,IAEhD,IAAI,CAAC,sBAAsB,KAAK,SAAS,KACxC,WAAK,KAAK,EAAC,eAAe,GAAO,CAClC,EACD,eACG,IAAI,CAAC,sBAAsB,KAAK,SAAS,KACxC,qBAAe,OAAO,EAAC,SAAS,IAC9B,SAAG,KAAK,EAAC,cAAc,eAAW,QAAQ,IACvC,IAAI,CAAC,WAAW,CACf,CACU,CACjB,EACD,WACE,KAAK,EAAE;QACL,0BAA0B,EACxB,IAAI,CAAC,sBAAsB,KAAK,QAAQ;OAC3C,IAED,YAAM,IAAI,EAAC,kBAAkB,GAAQ,CACjC,CACF,CACF,CACP,CACI,EACP;GACH;;;;;;;;","names":[],"sources":["src/components/ic-checkbox/ic-checkbox.css?tag=ic-checkbox&encapsulation=shadow","src/components/ic-checkbox/ic-checkbox.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.disabled) {\n color: var(--ic-architectural-200);\n pointer-events: none;\n}\n\n.container {\n display: flex;\n width: fit-content;\n padding: var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);\n margin-bottom: var(--ic-space-xxs);\n align-items: center;\n}\n\n:host(.small) .container {\n margin-bottom: var(--ic-space-xxxs);\n}\n\n.checkbox {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n display: block;\n position: relative;\n top: 0;\n left: 0;\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n background-color: transparent;\n border: var(--ic-space-1px) solid var(--ic-architectural-300);\n border-radius: var(--ic-border-radius);\n outline: none;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n flex-shrink: 0;\n}\n\n:host(.small) .checkbox,\n:host(.small) .container svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n}\n\n:host(.large) .checkbox,\n:host(.large) .container svg {\n width: var(--ic-space-xl);\n height: var(--ic-space-xl);\n}\n\n.checkbox:checked {\n background-color: var(--ic-action-default);\n border: var(--ic-space-1px) solid var(--ic-action-default);\n transition: var(--ic-easing-transition-slow);\n}\n\n.checkbox:checked:disabled {\n background-color: var(--ic-architectural-200);\n}\n\n.checkbox:indeterminate,\n.checkbox.indeterminate:checked {\n background-color: transparent;\n border: 0.125rem solid var(--ic-action-default);\n}\n\n.checkbox:checked:hover {\n background-color: var(--ic-action-default-hover);\n}\n\n.checkbox:indeterminate:hover,\n.checkbox.indeterminate:checked:hover {\n background-color: var(--ic-action-default-bg-hover);\n border: 0.125rem solid var(--ic-action-default-hover);\n}\n\n.checkbox:checked:active {\n background-color: var(--ic-action-default-active);\n}\n\n.checkbox:indeterminate:active,\n.checkbox.indeterminate:checked:active {\n background-color: var(--ic-action-default-bg-active);\n border: 0.125rem solid var(--ic-action-default-active);\n}\n\n.checkbox:hover {\n background-color: var(--ic-action-default-bg-hover);\n box-shadow: 0 0 0 0.25rem var(--ic-action-default-bg-hover);\n border: var(--ic-space-1px) solid var(--ic-action-default-hover);\n}\n\n.checkbox:active {\n background-color: var(--ic-action-default-bg-active);\n box-shadow: 0 0 0 0.25rem var(--ic-action-default-bg-active);\n border: var(--ic-space-1px) solid var(--ic-action-default-active);\n}\n\n.checkbox:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.checkbox:disabled {\n border: var(--ic-space-1px) dashed var(--ic-architectural-200);\n}\n\n.checkbox-label {\n padding-left: var(--ic-space-sm);\n}\n\n.checkbox-label:hover {\n cursor: pointer;\n}\n\n.checkmark {\n position: relative;\n right: calc(-1 * var(--ic-space-lg));\n margin-left: calc(-1 * var(--ic-space-lg));\n fill: white;\n z-index: 1;\n background-color: transparent;\n pointer-events: none;\n flex-shrink: 0;\n}\n\n:host(.small) .checkmark {\n margin-left: calc(-1 * var(--ic-space-md));\n right: calc(-1 * var(--ic-space-md));\n}\n\n:host(.large) .checkmark {\n margin-left: calc(-1 * var(--ic-space-xl));\n right: calc(-1 * var(--ic-space-xl));\n}\n\n.indeterminate-symbol {\n position: relative;\n width: 0.875rem;\n height: var(--ic-space-xxxs);\n right: -1.188rem;\n margin-left: -0.875rem;\n z-index: 1;\n background-color: var(--ic-action-default);\n pointer-events: none;\n flex-shrink: 0;\n}\n\n:host(.small) .indeterminate-symbol {\n width: 0.6rem;\n right: -0.8rem;\n margin-left: -0.6rem;\n}\n\n:host(.large) .indeterminate-symbol {\n width: 1.25rem;\n right: -1.625rem;\n margin-left: -1.25rem;\n}\n\n.container:hover .indeterminate-symbol {\n background-color: var(--ic-action-default-hover);\n}\n\n.container:active .indeterminate-symbol {\n background-color: var(--ic-action-default-active);\n}\n\n.additional-field-wrapper {\n margin-left: calc(var(--ic-space-md) + var(--ic-space-lg));\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n.branch-corner {\n color: var(--ic-action-default);\n height: var(--ic-space-md);\n width: var(--ic-space-xl);\n border-radius: 0 0 0 0.188rem;\n border-bottom: 0.125rem solid var(--ic-action-default);\n border-left: 0.125rem solid var(--ic-action-default);\n}\n\n.dynamic-container {\n display: flex;\n position: relative;\n margin: var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);\n gap: var(--ic-space-xs);\n}\n\n.dynamic-text {\n color: var(--ic-action-default);\n margin-top: calc(var(--ic-space-sm) / 2);\n margin-bottom: var(--ic-space-xs);\n border-radius: 2%;\n}\n\n@media (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n }\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n .checkbox {\n appearance: revert;\n transition: none;\n }\n\n .checkbox:checked {\n transition: none;\n }\n\n .checkbox:focus-visible {\n outline: 0.125rem solid highlight;\n }\n\n .checkbox:disabled:not(:checked) {\n appearance: none;\n border-color: GrayText;\n }\n\n .checkmark {\n fill: none;\n }\n\n .indeterminate-symbol {\n display: none;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State,\n Method,\n} from \"@stencil/core\";\nimport { IcAdditionalFieldTypes, IcSizes } from \"../../utils/types\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n removeHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n isPropDefined,\n} from \"../../utils/helpers\";\n\n/**\n * @slot additional-field - Content to be displayed alongside a checkbox.\n */\n@Component({\n tag: \"ic-checkbox\",\n styleUrl: \"ic-checkbox.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class Checkbox {\n private additionalFieldContainer: HTMLDivElement;\n private IC_TEXT_FIELD: string = \"ic-text-field\";\n\n @Element() el: HTMLIcCheckboxElement;\n\n /**\n * The style of additionalField that will be displayed if used.\n */\n @Prop({ reflect: true }) additionalFieldDisplay: IcAdditionalFieldTypes =\n \"static\";\n\n /**\n * If `true`, the checkbox will be set to the checked state.\n */\n @Prop({ reflect: true, mutable: true }) checked?: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the checkbox will be set to the disabled state.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * The text to be displayed when dynamic.\n */\n\n @Prop() dynamicText: string = \"This selection requires additional answers\";\n\n /**\n * The <form> element to associate the checkbox with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the checkbox. It overrides the action attribute of the checkbox's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the checkbox's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * The group label for the checkbox.\n */\n @Prop() groupLabel: string;\n\n /**\n * If `true`, the indeterminate state will be displayed when checked.\n */\n @Prop() indeterminate: boolean = false;\n\n /**\n * The label for the checkbox.\n */\n @Prop() label!: string;\n\n /**\n * The name for the checkbox. If not set when used in a checkbox group, the name will be based on the group name.\n */\n @Prop() name: string;\n\n /**\n * The size of the checkbox to be displayed. This does not affect the font size of the label. If a checkbox is contained in a checkbox group, this will override the size set on checkbox group.\n */\n @Prop() size?: IcSizes;\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * The value for the checkbox.\n */\n @Prop() value!: string;\n\n /**\n * @deprecated This event should not be used anymore. Use icCheck instead.\n */\n @Event() checkboxChecked: EventEmitter<void>;\n\n /**\n * Emitted when a checkbox has been checked.\n */\n @Event() icCheck: EventEmitter<void>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.value, propName: \"value\" },\n ],\n \"Checkbox\"\n );\n }\n\n componentDidRender(): void {\n if (this.additionalFieldDisplay === \"static\") {\n const textfield = this.el.querySelector(this.IC_TEXT_FIELD);\n if (!this.checked) {\n textfield && textfield.setAttribute(\"disabled\", \"\");\n } else {\n textfield && textfield.removeAttribute(\"disabled\");\n }\n } else if (this.additionalFieldContainer) {\n if (!this.checked) {\n this.additionalFieldContainer.style.display = \"none\";\n } else {\n this.additionalFieldContainer.style.display = \"flex\";\n }\n }\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n /**\n * Sets focus on the checkbox.\n */\n @Method()\n async setFocus(): Promise<void> {\n const checkboxEl: HTMLElement =\n this.el.shadowRoot.querySelector(\".checkbox\");\n if (checkboxEl) {\n checkboxEl.focus();\n }\n }\n\n private handleClick = () => {\n this.checked = !this.checked;\n this.icCheck.emit();\n this.checkboxChecked.emit();\n };\n\n private handleFormReset = (): void => {\n this.checked = this.initiallyChecked;\n };\n\n render() {\n let id = `ic-checkbox-${\n isPropDefined(this.label) ? this.label : this.value\n }-${this.groupLabel}`;\n\n id = id.replace(/ /g, \"-\");\n\n const parentElementSize = (\n this.el.parentElement as HTMLIcCheckboxGroupElement\n ).size;\n\n this.checked\n ? renderHiddenInput(\n true,\n this.el,\n this.name,\n this.checked && this.value,\n this.disabled\n )\n : removeHiddenInput(this.el);\n\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled,\n [\"small\"]: this.small,\n [`${this.size || parentElementSize}`]: true,\n }}\n >\n <div class=\"container\">\n {this.checked && !this.indeterminate && (\n <svg\n class=\"checkmark\"\n width=\"1.5rem\"\n height=\"1.5rem\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n >\n <title>checkmark icon</title>\n <path d=\"M21 6.285l-11.16 12.733-6.84-6.018 1.319-1.49 5.341 4.686 9.865-11.196 1.475 1.285z\" />\n </svg>\n )}\n {this.checked && this.indeterminate && (\n <div class=\"indeterminate-symbol\" />\n )}\n <input\n role=\"checkbox\"\n class={{\n [\"checkbox\"]: true,\n [\"checked\"]: this.checked,\n [\"indeterminate\"]: this.indeterminate,\n }}\n type=\"checkbox\"\n name={this.name}\n id={id}\n value={this.value}\n disabled={this.disabled ? true : null}\n checked={this.checked}\n indeterminate={this.indeterminate}\n onClick={this.handleClick}\n form={this.form}\n formaction={this.formaction}\n formenctype={this.formenctype}\n formmethod={this.formmethod}\n formnovalidate={this.formnovalidate}\n formtarget={this.formtarget}\n ></input>\n <ic-typography class=\"checkbox-label\" variant=\"body\">\n <label htmlFor={id}>{this.label}</label>\n </ic-typography>\n </div>\n {isSlotUsed(this.el, \"additional-field\") && (\n <div\n class=\"dynamic-container\"\n ref={(el) => (this.additionalFieldContainer = el)}\n >\n {this.additionalFieldDisplay === \"dynamic\" && (\n <div class=\"branch-corner\"></div>\n )}\n <div>\n {this.additionalFieldDisplay === \"dynamic\" && (\n <ic-typography variant=\"caption\">\n <p class=\"dynamic-text\" aria-live=\"polite\">\n {this.dynamicText}\n </p>\n </ic-typography>\n )}\n <div\n class={{\n \"additional-field-wrapper\":\n this.additionalFieldDisplay === \"static\",\n }}\n >\n <slot name=\"additional-field\"></slot>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-checkbox.entry.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,0sNAA0sN;;MCkCntN,QAAQ;;;;;IAEX,kBAAa,GAAW,eAAe,CAAC;IAuJxC,gBAAW,GAAG;MACpB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;MAC7B,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;MACpB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;KAC7B,CAAC;IAEM,oBAAe,GAAG;MACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC;KACtC,CAAC;kCAvJA,QAAQ;mBAKkD,KAAK;4BACrC,IAAI,CAAC,OAAO;oBAKX,KAAK;uBAMJ,4CAA4C;;;;;;;;yBAwCzC,KAAK;;;;iBAoBZ,KAAK;;;EAiB/B,iBAAiB;IACf,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAE5C,oBAAoB,CAAC,IAAI,CAAC,EAA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-checkbox/ic-checkbox.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.disabled) {\n color: var(--ic-architectural-200);\n pointer-events: none;\n}\n\n.container {\n display: flex;\n width: fit-content;\n padding: var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);\n margin-bottom: var(--ic-space-xxs);\n align-items: center;\n}\n\n:host(.small) .container {\n margin-bottom: var(--ic-space-xxxs);\n}\n\n.checkbox {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n display: block;\n position: relative;\n top: 0;\n left: 0;\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n background-color: transparent;\n border: var(--ic-border-width) solid var(--ic-architectural-300);\n border-radius: var(--ic-border-radius);\n outline: none;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n flex-shrink: 0;\n}\n\n:host(.small) .checkbox,\n:host(.small) .container svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n}\n\n:host(.large) .checkbox,\n:host(.large) .container svg {\n width: var(--ic-space-xl);\n height: var(--ic-space-xl);\n}\n\n.checkbox:checked {\n background-color: var(--ic-action-default);\n border: var(--ic-border-width) solid var(--ic-action-default);\n transition: var(--ic-easing-transition-slow);\n}\n\n.checkbox:checked:disabled {\n background-color: var(--ic-architectural-200);\n}\n\n.checkbox:indeterminate,\n.checkbox.indeterminate:checked {\n background-color: transparent;\n border: 0.125rem solid var(--ic-action-default);\n}\n\n.checkbox:checked:hover {\n background-color: var(--ic-action-default-hover);\n}\n\n.checkbox:indeterminate:hover,\n.checkbox.indeterminate:checked:hover {\n background-color: var(--ic-action-default-bg-hover);\n border: 0.125rem solid var(--ic-action-default-hover);\n}\n\n.checkbox:checked:active {\n background-color: var(--ic-action-default-active);\n}\n\n.checkbox:indeterminate:active,\n.checkbox.indeterminate:checked:active {\n background-color: var(--ic-action-default-bg-active);\n border: 0.125rem solid var(--ic-action-default-active);\n}\n\n.checkbox:hover {\n background-color: var(--ic-action-default-bg-hover);\n box-shadow: 0 0 0 0.25rem var(--ic-action-default-bg-hover);\n border: var(--ic-border-width) solid var(--ic-action-default-hover);\n}\n\n.checkbox:active {\n background-color: var(--ic-action-default-bg-active);\n box-shadow: 0 0 0 0.25rem var(--ic-action-default-bg-active);\n border: var(--ic-border-width) solid var(--ic-action-default-active);\n}\n\n.checkbox:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.checkbox:disabled {\n border: var(--ic-border-width) dashed var(--ic-architectural-200);\n}\n\n.checkbox-label {\n padding-left: var(--ic-space-sm);\n}\n\n.checkbox-label:hover {\n cursor: pointer;\n}\n\n.checkmark {\n position: relative;\n right: calc(-1 * var(--ic-space-lg));\n margin-left: calc(-1 * var(--ic-space-lg));\n fill: white;\n z-index: 1;\n background-color: transparent;\n pointer-events: none;\n flex-shrink: 0;\n}\n\n:host(.small) .checkmark {\n margin-left: calc(-1 * var(--ic-space-md));\n right: calc(-1 * var(--ic-space-md));\n}\n\n:host(.large) .checkmark {\n margin-left: calc(-1 * var(--ic-space-xl));\n right: calc(-1 * var(--ic-space-xl));\n}\n\n.indeterminate-symbol {\n position: relative;\n width: 0.875rem;\n height: var(--ic-space-xxxs);\n right: -1.188rem;\n margin-left: -0.875rem;\n z-index: 1;\n background-color: var(--ic-action-default);\n pointer-events: none;\n flex-shrink: 0;\n}\n\n:host(.small) .indeterminate-symbol {\n width: 0.6rem;\n right: -0.8rem;\n margin-left: -0.6rem;\n}\n\n:host(.large) .indeterminate-symbol {\n width: 1.25rem;\n right: -1.625rem;\n margin-left: -1.25rem;\n}\n\n.container:hover .indeterminate-symbol {\n background-color: var(--ic-action-default-hover);\n}\n\n.container:active .indeterminate-symbol {\n background-color: var(--ic-action-default-active);\n}\n\n.additional-field-wrapper {\n margin-left: calc(var(--ic-space-md) + var(--ic-space-lg));\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n.branch-corner {\n color: var(--ic-action-default);\n height: var(--ic-space-md);\n width: var(--ic-space-xl);\n border-radius: 0 0 0 0.188rem;\n border-bottom: 0.125rem solid var(--ic-action-default);\n border-left: 0.125rem solid var(--ic-action-default);\n}\n\n.dynamic-container {\n display: flex;\n position: relative;\n margin: var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);\n gap: var(--ic-space-xs);\n}\n\n.dynamic-text {\n color: var(--ic-action-default);\n margin-top: calc(var(--ic-space-sm) / 2);\n margin-bottom: var(--ic-space-xs);\n border-radius: 2%;\n}\n\n@media (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n }\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n .checkbox {\n appearance: revert;\n transition: none;\n }\n\n .checkbox:checked {\n transition: none;\n }\n\n .checkbox:focus-visible {\n outline: 0.125rem solid highlight;\n }\n\n .checkbox:disabled:not(:checked) {\n appearance: none;\n border-color: GrayText;\n }\n\n .checkmark {\n fill: none;\n }\n\n .indeterminate-symbol {\n display: none;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State,\n Method,\n} from \"@stencil/core\";\nimport { IcAdditionalFieldTypes, IcSizes } from \"../../utils/types\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n removeHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n isPropDefined,\n} from \"../../utils/helpers\";\n\n/**\n * @slot additional-field - Content to be displayed alongside a checkbox.\n */\n@Component({\n tag: \"ic-checkbox\",\n styleUrl: \"ic-checkbox.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class Checkbox {\n private additionalFieldContainer: HTMLDivElement;\n private IC_TEXT_FIELD: string = \"ic-text-field\";\n\n @Element() el: HTMLIcCheckboxElement;\n\n /**\n * The style of additionalField that will be displayed if used.\n */\n @Prop({ reflect: true }) additionalFieldDisplay: IcAdditionalFieldTypes =\n \"static\";\n\n /**\n * If `true`, the checkbox will be set to the checked state.\n */\n @Prop({ reflect: true, mutable: true }) checked?: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the checkbox will be set to the disabled state.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * The text to be displayed when dynamic.\n */\n\n @Prop() dynamicText: string = \"This selection requires additional answers\";\n\n /**\n * The <form> element to associate the checkbox with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the checkbox. It overrides the action attribute of the checkbox's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the checkbox's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * The group label for the checkbox.\n */\n @Prop() groupLabel: string;\n\n /**\n * If `true`, the indeterminate state will be displayed when checked.\n */\n @Prop() indeterminate: boolean = false;\n\n /**\n * The label for the checkbox.\n */\n @Prop() label!: string;\n\n /**\n * The name for the checkbox. If not set when used in a checkbox group, the name will be based on the group name.\n */\n @Prop() name: string;\n\n /**\n * The size of the checkbox to be displayed. This does not affect the font size of the label. If a checkbox is contained in a checkbox group, this will override the size set on checkbox group.\n */\n @Prop() size?: IcSizes;\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * The value for the checkbox.\n */\n @Prop() value!: string;\n\n /**\n * @deprecated This event should not be used anymore. Use icCheck instead.\n */\n @Event() checkboxChecked: EventEmitter<void>;\n\n /**\n * Emitted when a checkbox has been checked.\n */\n @Event() icCheck: EventEmitter<void>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.value, propName: \"value\" },\n ],\n \"Checkbox\"\n );\n }\n\n componentDidRender(): void {\n if (this.additionalFieldDisplay === \"static\") {\n const textfield = this.el.querySelector(this.IC_TEXT_FIELD);\n if (!this.checked) {\n textfield && textfield.setAttribute(\"disabled\", \"\");\n } else {\n textfield && textfield.removeAttribute(\"disabled\");\n }\n } else if (this.additionalFieldContainer) {\n if (!this.checked) {\n this.additionalFieldContainer.style.display = \"none\";\n } else {\n this.additionalFieldContainer.style.display = \"flex\";\n }\n }\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n /**\n * Sets focus on the checkbox.\n */\n @Method()\n async setFocus(): Promise<void> {\n const checkboxEl: HTMLElement =\n this.el.shadowRoot.querySelector(\".checkbox\");\n if (checkboxEl) {\n checkboxEl.focus();\n }\n }\n\n private handleClick = () => {\n this.checked = !this.checked;\n this.icCheck.emit();\n this.checkboxChecked.emit();\n };\n\n private handleFormReset = (): void => {\n this.checked = this.initiallyChecked;\n };\n\n render() {\n let id = `ic-checkbox-${\n isPropDefined(this.label) ? this.label : this.value\n }-${this.groupLabel}`;\n\n id = id.replace(/ /g, \"-\");\n\n const parentElementSize = (\n this.el.parentElement as HTMLIcCheckboxGroupElement\n ).size;\n\n this.checked\n ? renderHiddenInput(\n true,\n this.el,\n this.name,\n this.checked && this.value,\n this.disabled\n )\n : removeHiddenInput(this.el);\n\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled,\n [\"small\"]: this.small,\n [`${this.size || parentElementSize}`]: true,\n }}\n >\n <div class=\"container\">\n {this.checked && !this.indeterminate && (\n <svg\n class=\"checkmark\"\n width=\"1.5rem\"\n height=\"1.5rem\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n >\n <title>checkmark icon</title>\n <path d=\"M21 6.285l-11.16 12.733-6.84-6.018 1.319-1.49 5.341 4.686 9.865-11.196 1.475 1.285z\" />\n </svg>\n )}\n {this.checked && this.indeterminate && (\n <div class=\"indeterminate-symbol\" />\n )}\n <input\n role=\"checkbox\"\n class={{\n [\"checkbox\"]: true,\n [\"checked\"]: this.checked,\n [\"indeterminate\"]: this.indeterminate,\n }}\n type=\"checkbox\"\n name={this.name}\n id={id}\n value={this.value}\n disabled={this.disabled ? true : null}\n checked={this.checked}\n indeterminate={this.indeterminate}\n onClick={this.handleClick}\n form={this.form}\n formaction={this.formaction}\n formenctype={this.formenctype}\n formmethod={this.formmethod}\n formnovalidate={this.formnovalidate}\n formtarget={this.formtarget}\n ></input>\n <ic-typography class=\"checkbox-label\" variant=\"body\">\n <label htmlFor={id}>{this.label}</label>\n </ic-typography>\n </div>\n {isSlotUsed(this.el, \"additional-field\") && (\n <div\n class=\"dynamic-container\"\n ref={(el) => (this.additionalFieldContainer = el)}\n >\n {this.additionalFieldDisplay === \"dynamic\" && (\n <div class=\"branch-corner\"></div>\n )}\n <div>\n {this.additionalFieldDisplay === \"dynamic\" && (\n <ic-typography variant=\"caption\">\n <p class=\"dynamic-text\" aria-live=\"polite\">\n {this.dynamicText}\n </p>\n </ic-typography>\n )}\n <div\n class={{\n \"additional-field-wrapper\":\n this.additionalFieldDisplay === \"static\",\n }}\n >\n <slot name=\"additional-field\"></slot>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -7,7 +7,7 @@ const dismissIcon = `<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.o
7
7
  </svg>
8
8
  `;
9
9
 
10
- const icChipCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block}.chip{display:flex;padding:var(--ic-space-xxs);font-size:0.875rem;border-radius:var(--ic-space-md);text-align:left;text-decoration:none;transition:var(--ic-easing-transition-fast);position:relative}.chip.small{padding:var(--ic-space-xxxs);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}.chip.large{padding:var(--ic-space-xs);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}.label{padding:0 var(--ic-space-xs)}.chip.hovered:not(:focus-within){background-color:var(--ic-architectural-300)}.chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}.chip.outline.hovered:not(:focus-within),.chip.outlined.hovered:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}ic-tooltip:focus-within{z-index:1}.filled{background-color:var(--ic-architectural-200);color:black;border:none}.filled.disabled{background-color:var(--ic-architectural-100)}.outline,.outlined{color:var(--ic-architectural-900);border:var(--ic-space-1px) solid var(--ic-architectural-900);padding:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.outline.small,.outlined.small{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}.outline.large,.outlined.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}.outline.disabled,.outlined.disabled{border:var(--ic-border-disabled);background:none}.chip.disabled ic-typography{color:var(--ic-architectural-200)}.dismiss-icon{border:none;border-radius:50%;padding:0;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs))}.dismiss-icon:focus{outline:var(--ic-hc-focus-outline)}.dismiss-icon[disabled]{pointer-events:none;color:var(--ic-architectural-200)}.icon{padding:var(--ic-space-xxxs);box-sizing:border-box}.icon,ic-tooltip{width:var(--ic-space-lg);height:var(--ic-space-lg)}.chip.disabled path,.chip.disabled ::slotted(svg){fill:var(--ic-architectural-200)}@media (forced-colors: active){.chip{border:var(--ic-hc-border)}.filled.small{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}.filled{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}.filled.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}.chip.disabled{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.chip.disabled ic-typography{color:GrayText}.chip.disabled path,.chip.disabled ::slotted(svg){fill:GrayText}.chip:focus-within{outline:none;border-color:Highlight}}";
10
+ const icChipCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block}.chip{display:flex;padding:var(--ic-space-xxs);font-size:0.875rem;border-radius:var(--ic-space-md);text-align:left;text-decoration:none;transition:var(--ic-easing-transition-fast);position:relative}.chip.small{padding:var(--ic-space-xxxs);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}.chip.large{padding:var(--ic-space-xs);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}.label{padding:0 var(--ic-space-xs)}.chip.hovered:not(:focus-within){background-color:var(--ic-architectural-300)}.chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}.chip.outline.hovered:not(:focus-within),.chip.outlined.hovered:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}ic-tooltip:focus-within{z-index:1}.filled{background-color:var(--ic-architectural-200);color:black;border:none}.filled.disabled{background-color:var(--ic-architectural-100)}.outline,.outlined{color:var(--ic-architectural-900);border:var(--ic-border-width) solid var(--ic-architectural-900);padding:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.outline.small,.outlined.small{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}.outline.large,.outlined.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}.outline.disabled,.outlined.disabled{border:var(--ic-border-disabled);background:none}.chip.disabled ic-typography{color:var(--ic-architectural-200)}.dismiss-icon{border:none;border-radius:50%;padding:0;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs))}.dismiss-icon:focus{outline:var(--ic-hc-focus-outline)}.dismiss-icon[disabled]{pointer-events:none;color:var(--ic-architectural-200)}.icon{padding:var(--ic-space-xxxs);box-sizing:border-box}.icon,ic-tooltip{width:var(--ic-space-lg);height:var(--ic-space-lg)}.chip.disabled path,.chip.disabled ::slotted(svg){fill:var(--ic-architectural-200)}@media (forced-colors: active){.chip{border:var(--ic-hc-border)}.filled.small{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}.filled{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}.filled.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}.chip.disabled{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.chip.disabled ic-typography{color:GrayText}.chip.disabled path,.chip.disabled ::slotted(svg){fill:GrayText}.chip:focus-within{outline:none;border-color:Highlight}}";
11
11
 
12
12
  const Chip = class {
13
13
  constructor(hostRef) {
@@ -1 +1 @@
1
- {"file":"ic-chip.entry.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,k2JAAk2J;;MC+Bv2J,IAAI;;;;;IAgFP,kBAAa,GAAG;MACtB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;MACpB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACvB,CAAC;IAEM,sBAAiB,GAAG;MAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;KACvB,CAAC;IAEM,sBAAiB,GAAG;MAC1B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;KACxB,CAAC;qBAxF4B,KAAK;mBACP,IAAI;;oBAUH,KAAK;uBAKF,KAAK;;gBAUZ,SAAS;mBAKC,QAAQ;;EAY3C,iBAAiB;IACf,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAE5C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AAG,CAChB,CACP,EACD,qBACE,OAAO,EAAC,OAAO,4BACS,KAAK,EAC7B,KAAK,EAAC,OAAO,IAEb,gBAAO,KAAK,CAAQ,CACN,EACf,WAAW,KACV,kBACE,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,cAAc,EACrB,KAAK,EAAE,EAAE,CAAC,kBAAkB,GAAG,QAAQ,EAAE,IAEzC,cACE,EAAE,EAAC,cAAc,EACjB,KAAK,EAAE;QACL,CAAC,cAAc,GAAG,IAAI;OACvB,gBACW,WAAW,KAAK,OAAO,EACnC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,EAC3B,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,YAAY,EAAE,IAAI,CAAC,iBAAiB,EACpC,YAAY,EAAE,IAAI,CAAC,iBAAiB,EACpC,SAAS,EAAE,WAAW,GACd,CACC,CACd,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,YAAM,IAAI,EAAC,OAAO,GAAQ,CACvD,CACP,EACD;GACH;;;;;;;;","names":[],"sources":["src/components/ic-chip/ic-chip.css?tag=ic-chip&encapsulation=shadow","src/components/ic-chip/ic-chip.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n}\n\n.chip {\n display: flex;\n padding: var(--ic-space-xxs);\n font-size: 0.875rem;\n border-radius: var(--ic-space-md);\n text-align: left;\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n}\n\n.chip.small {\n padding: var(--ic-space-xxxs);\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n}\n\n.chip.large {\n padding: var(--ic-space-xs);\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip.hovered:not(:focus-within) {\n background-color: var(--ic-architectural-300);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n.chip.outline.hovered:not(:focus-within),\n.chip.outlined.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n background-color: var(--ic-architectural-200);\n color: black;\n border: none;\n}\n\n.filled.disabled {\n background-color: var(--ic-architectural-100);\n}\n\n.outline,\n.outlined {\n color: var(--ic-architectural-900);\n border: var(--ic-space-1px) solid var(--ic-architectural-900);\n padding: calc(var(--ic-space-xxs) - var(--ic-space-1px));\n}\n\n.outline.small,\n.outlined.small {\n padding: calc(var(--ic-space-xxxs) - var(--ic-space-1px));\n}\n\n.outline.large,\n.outlined.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n.outline.disabled,\n.outlined.disabled {\n border: var(--ic-border-disabled);\n background: none;\n}\n\n.chip.disabled ic-typography {\n color: var(--ic-architectural-200);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n width: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-architectural-200);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-architectural-200);\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-hc-border);\n }\n\n .filled.small {\n padding: calc(var(--ic-space-xxxs) - var(--ic-space-1px));\n }\n\n .filled {\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n }\n\n .filled.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px));\n }\n\n .chip.disabled {\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Element,\n Method,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcChipAppearance } from \"./ic-chip.types\";\nimport { IcEmphasisType, IcSizes } from \"../../utils/types\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n * @slot badge - Badge component overlaying the top right of the chip.\n */\n@Component({\n tag: \"ic-chip\",\n styleUrl: \"ic-chip.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Chip {\n @Element() el: HTMLIcChipElement;\n\n @State() isHovered: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * @deprecated This prop should not be used anymore. Use variant prop instead.\n */\n @Prop() appearance?: IcChipAppearance;\n\n /**\n * If `true`, the chip will appear disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the chip will have a close button at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n\n /**\n * The text rendered within the chip.\n */\n @Prop() label!: string;\n\n /**\n * The size of the chip.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The emphasis of the chip.\n */\n @Prop() variant?: IcEmphasisType = \"filled\";\n\n /**\n * @deprecated This event should not be used anymore. Use icDismiss instead.\n */\n @Event() dismiss: EventEmitter<void>;\n\n /**\n * Is emitted when the user dismisses the chip.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n\n if (this.appearance === \"outline\") {\n this.variant = \"outlined\";\n }\n }\n\n componentDidLoad(): void {\n this.dismissible &&\n this.el.shadowRoot\n .querySelector(\"span.ic-tooltip-label\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Chip\"\n );\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n /**\n * Sets focus on the chip.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"button\")) {\n this.el.shadowRoot.querySelector(\"button\").focus();\n }\n }\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n\n private mouseEnterHandler = (): void => {\n this.isHovered = true;\n };\n\n private mouseLeaveHandler = (): void => {\n this.isHovered = false;\n };\n\n render() {\n const {\n label,\n appearance,\n variant,\n size,\n dismissible,\n visible,\n disabled,\n isHovered,\n } = this;\n\n return (\n visible && (\n <div\n class={{\n [\"chip\"]: true,\n [`${appearance}`]: appearance !== undefined,\n [`${variant}`]: true,\n [`${size}`]: true,\n [\"disabled\"]: disabled,\n [\"dismissible\"]: dismissible,\n [\"hovered\"]: isHovered,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"label\"\n apply-vertical-margins={false}\n class=\"label\"\n >\n <span>{label}</span>\n </ic-typography>\n {dismissible && (\n <ic-tooltip\n label=\"Dismiss\"\n target=\"dismiss-icon\"\n class={{ [\"tooltip-disabled\"]: disabled }}\n >\n <button\n id=\"dismiss-icon\"\n class={{\n [\"dismiss-icon\"]: true,\n }}\n aria-label={`Dismiss ${label} chip`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n onClick={this.dismissAction}\n onMouseEnter={this.mouseEnterHandler}\n onMouseLeave={this.mouseLeaveHandler}\n innerHTML={dismissIcon}\n ></button>\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"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,YAAM,IAAI,EAAC,OAAO,GAAQ,CACvD,CACP,EACD;GACH;;;;;;;;","names":[],"sources":["src/components/ic-chip/ic-chip.css?tag=ic-chip&encapsulation=shadow","src/components/ic-chip/ic-chip.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n}\n\n.chip {\n display: flex;\n padding: var(--ic-space-xxs);\n font-size: 0.875rem;\n border-radius: var(--ic-space-md);\n text-align: left;\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n}\n\n.chip.small {\n padding: var(--ic-space-xxxs);\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n}\n\n.chip.large {\n padding: var(--ic-space-xs);\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip.hovered:not(:focus-within) {\n background-color: var(--ic-architectural-300);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n.chip.outline.hovered:not(:focus-within),\n.chip.outlined.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n background-color: var(--ic-architectural-200);\n color: black;\n border: none;\n}\n\n.filled.disabled {\n background-color: var(--ic-architectural-100);\n}\n\n.outline,\n.outlined {\n color: var(--ic-architectural-900);\n border: var(--ic-border-width) solid var(--ic-architectural-900);\n padding: calc(var(--ic-space-xxs) - var(--ic-space-1px));\n}\n\n.outline.small,\n.outlined.small {\n padding: calc(var(--ic-space-xxxs) - var(--ic-space-1px));\n}\n\n.outline.large,\n.outlined.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n.outline.disabled,\n.outlined.disabled {\n border: var(--ic-border-disabled);\n background: none;\n}\n\n.chip.disabled ic-typography {\n color: var(--ic-architectural-200);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n width: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-architectural-200);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-architectural-200);\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-hc-border);\n }\n\n .filled.small {\n padding: calc(var(--ic-space-xxxs) - var(--ic-space-1px));\n }\n\n .filled {\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n }\n\n .filled.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px));\n }\n\n .chip.disabled {\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Element,\n Method,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcChipAppearance } from \"./ic-chip.types\";\nimport { IcEmphasisType, IcSizes } from \"../../utils/types\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n * @slot badge - Badge component overlaying the top right of the chip.\n */\n@Component({\n tag: \"ic-chip\",\n styleUrl: \"ic-chip.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Chip {\n @Element() el: HTMLIcChipElement;\n\n @State() isHovered: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * @deprecated This prop should not be used anymore. Use variant prop instead.\n */\n @Prop() appearance?: IcChipAppearance;\n\n /**\n * If `true`, the chip will appear disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the chip will have a close button at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n\n /**\n * The text rendered within the chip.\n */\n @Prop() label!: string;\n\n /**\n * The size of the chip.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The emphasis of the chip.\n */\n @Prop() variant?: IcEmphasisType = \"filled\";\n\n /**\n * @deprecated This event should not be used anymore. Use icDismiss instead.\n */\n @Event() dismiss: EventEmitter<void>;\n\n /**\n * Is emitted when the user dismisses the chip.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n\n if (this.appearance === \"outline\") {\n this.variant = \"outlined\";\n }\n }\n\n componentDidLoad(): void {\n this.dismissible &&\n this.el.shadowRoot\n .querySelector(\"span.ic-tooltip-label\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Chip\"\n );\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n /**\n * Sets focus on the chip.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"button\")) {\n this.el.shadowRoot.querySelector(\"button\").focus();\n }\n }\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n\n private mouseEnterHandler = (): void => {\n this.isHovered = true;\n };\n\n private mouseLeaveHandler = (): void => {\n this.isHovered = false;\n };\n\n render() {\n const {\n label,\n appearance,\n variant,\n size,\n dismissible,\n visible,\n disabled,\n isHovered,\n } = this;\n\n return (\n visible && (\n <div\n class={{\n [\"chip\"]: true,\n [`${appearance}`]: appearance !== undefined,\n [`${variant}`]: true,\n [`${size}`]: true,\n [\"disabled\"]: disabled,\n [\"dismissible\"]: dismissible,\n [\"hovered\"]: isHovered,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"label\"\n apply-vertical-margins={false}\n class=\"label\"\n >\n <span>{label}</span>\n </ic-typography>\n {dismissible && (\n <ic-tooltip\n label=\"Dismiss\"\n target=\"dismiss-icon\"\n class={{ [\"tooltip-disabled\"]: disabled }}\n >\n <button\n id=\"dismiss-icon\"\n class={{\n [\"dismiss-icon\"]: true,\n }}\n aria-label={`Dismiss ${label} chip`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n onClick={this.dismissAction}\n onMouseEnter={this.mouseEnterHandler}\n onMouseLeave={this.mouseLeaveHandler}\n innerHTML={dismissIcon}\n ></button>\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </div>\n )\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-813020f1.js';
2
2
 
3
- const icDataEntityCss = "/*! 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}.rows{display:flex;flex-direction:column;gap:var(--ic-space-md)}:host(.small) .rows{gap:var(--ic-space-xs)}.divider{margin-top:var(--ic-space-lg);margin-bottom:var(--ic-space-md);height:var(--ic-space-1px);background-color:var(--ic-architectural-300)}:host(.small) .divider{margin-top:var(--ic-space-sm);margin-bottom:var(--ic-space-xs)}@media (forced-colors: active){.divider{background-color:canvastext}}";
3
+ const icDataEntityCss = "/*! 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}.rows{display:flex;flex-direction:column;gap:var(--ic-space-md)}:host(.small) .rows{gap:var(--ic-space-xs)}.divider{margin-top:var(--ic-space-lg);margin-bottom:var(--ic-space-md);height:var(--ic-border-width);background-color:var(--ic-architectural-300)}:host(.small) .divider{margin-top:var(--ic-space-sm);margin-bottom:var(--ic-space-xs)}@media (forced-colors: active){.divider{background-color:canvastext}}";
4
4
 
5
5
  const DataEntity = class {
6
6
  constructor(hostRef) {
@@ -1 +1 @@
1
- {"file":"ic-data-entity.entry.js","mappings":";;AAAA,MAAM,eAAe,GAAG,2yFAA2yF;;MCWtzF,UAAU;;;;gBAWW,SAAS;iBAKf,KAAK;;EAE/B,MAAM;IACJ,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAEtC,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC;IAElC,IAAI,KAAK,IAAI,IAAI,KAAK,OAAO,EAAE;MAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACxC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;OAC3C;KACF;IAED,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,EAAE,CAAC,OAAO,GAAG,KAAK,IAAI,IAAI,KAAK,OAAO,EAAE,IACnD,WAAK,KAAK,EAAC,SAAS,EAAC,EAAE,EAAC,qBAAqB,IAC3C,YAAM,IAAI,EAAC,SAAS,IAClB,qBAAe,OAAO,EAAC,IAAI,IAAE,OAAO,CAAiB,CAChD,CACH,EACN,WAAK,KAAK,EAAC,SAAS,GAAG,EACvB,6BAAoB,qBAAqB,EAAC,KAAK,EAAC,MAAM,IACpD,eAAa,CACV,CACA,EACP;GACH;;;;;;;","names":[],"sources":["src/components/ic-data-entity/ic-data-entity.css?tag=ic-data-entity&encapsulation=shadow","src/components/ic-data-entity/ic-data-entity.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n.rows {\n display: flex;\n flex-direction: column;\n gap: var(--ic-space-md);\n}\n\n:host(.small) .rows {\n gap: var(--ic-space-xs);\n}\n\n.divider {\n margin-top: var(--ic-space-lg);\n margin-bottom: var(--ic-space-md);\n height: var(--ic-space-1px);\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-sm);\n margin-bottom: var(--ic-space-xs);\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Component, Element, Host, h, Prop } from \"@stencil/core\";\nimport { IcSizesNoLarge } from \"../../utils/types\";\n\n/**\n * @slot heading - Content will be placed at the top of the data entity.\n */\n@Component({\n tag: \"ic-data-entity\",\n styleUrl: \"ic-data-entity.css\",\n shadow: true,\n})\nexport class DataEntity {\n @Element() el: HTMLIcDataEntityElement;\n\n /**\n * The title for the data entity.\n */\n @Prop() heading: string;\n\n /**\n * The size of the data entity component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n render() {\n const { heading, small, size } = this;\n\n const children = this.el.children;\n\n if (small || size === \"small\") {\n for (let i = 0; i < children.length; i++) {\n children[i].setAttribute(\"size\", \"small\");\n }\n }\n\n return (\n <Host class={{ [\"small\"]: small || size === \"small\" }}>\n <div class=\"heading\" id=\"data-entity-heading\">\n <slot name=\"heading\">\n <ic-typography variant=\"h3\">{heading}</ic-typography>\n </slot>\n </div>\n <div class=\"divider\" />\n <ul aria-labelledby=\"data-entity-heading\" class=\"rows\">\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-data-entity.entry.js","mappings":";;AAAA,MAAM,eAAe,GAAG,8yFAA8yF;;MCWzzF,UAAU;;;;gBAWW,SAAS;iBAKf,KAAK;;EAE/B,MAAM;IACJ,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAEtC,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC;IAElC,IAAI,KAAK,IAAI,IAAI,KAAK,OAAO,EAAE;MAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACxC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;OAC3C;KACF;IAED,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,EAAE,CAAC,OAAO,GAAG,KAAK,IAAI,IAAI,KAAK,OAAO,EAAE,IACnD,WAAK,KAAK,EAAC,SAAS,EAAC,EAAE,EAAC,qBAAqB,IAC3C,YAAM,IAAI,EAAC,SAAS,IAClB,qBAAe,OAAO,EAAC,IAAI,IAAE,OAAO,CAAiB,CAChD,CACH,EACN,WAAK,KAAK,EAAC,SAAS,GAAG,EACvB,6BAAoB,qBAAqB,EAAC,KAAK,EAAC,MAAM,IACpD,eAAa,CACV,CACA,EACP;GACH;;;;;;;","names":[],"sources":["src/components/ic-data-entity/ic-data-entity.css?tag=ic-data-entity&encapsulation=shadow","src/components/ic-data-entity/ic-data-entity.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n.rows {\n display: flex;\n flex-direction: column;\n gap: var(--ic-space-md);\n}\n\n:host(.small) .rows {\n gap: var(--ic-space-xs);\n}\n\n.divider {\n margin-top: var(--ic-space-lg);\n margin-bottom: var(--ic-space-md);\n height: var(--ic-border-width);\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-sm);\n margin-bottom: var(--ic-space-xs);\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Component, Element, Host, h, Prop } from \"@stencil/core\";\nimport { IcSizesNoLarge } from \"../../utils/types\";\n\n/**\n * @slot heading - Content will be placed at the top of the data entity.\n */\n@Component({\n tag: \"ic-data-entity\",\n styleUrl: \"ic-data-entity.css\",\n shadow: true,\n})\nexport class DataEntity {\n @Element() el: HTMLIcDataEntityElement;\n\n /**\n * The title for the data entity.\n */\n @Prop() heading: string;\n\n /**\n * The size of the data entity component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n render() {\n const { heading, small, size } = this;\n\n const children = this.el.children;\n\n if (small || size === \"small\") {\n for (let i = 0; i < children.length; i++) {\n children[i].setAttribute(\"size\", \"small\");\n }\n }\n\n return (\n <Host class={{ [\"small\"]: small || size === \"small\" }}>\n <div class=\"heading\" id=\"data-entity-heading\">\n <slot name=\"heading\">\n <ic-typography variant=\"h3\">{heading}</ic-typography>\n </slot>\n </div>\n <div class=\"divider\" />\n <ul aria-labelledby=\"data-entity-heading\" class=\"rows\">\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -2,7 +2,7 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-81
2
2
  import { i as isSlotUsed, D as DEVICE_SIZES, e as getCurrentDeviceSize, t as slotHasContent, f as checkResizeObserver } from './helpers-24f6e762.js';
3
3
  import './types-b2398b37.js';
4
4
 
5
- const icDataRowCss = "/*! 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{position:relative;display:block}.data{display:flex;align-items:center}.text-cells{display:flex;flex-grow:1;min-width:0}.label{width:12.5rem;min-width:12.5rem;margin-right:var(--ic-space-md);color:var(--ic-color-tertiary-text)}.value{flex-grow:1}slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]){margin-top:calc(var(--ic-space-xs) * -1)}slot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]){margin-top:calc(var(--ic-space-xxs) * -1)}slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]){margin-top:calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs))}.end-component{width:-moz-fit-content;width:fit-content;margin-left:3.5rem}.divider{margin-top:var(--ic-space-md);height:var(--ic-space-1px);background-color:var(--ic-architectural-300)}:host(.small) .divider{margin-top:var(--ic-space-xs)}:host(.breakpoint-medium) .label{width:10rem;min-width:10rem}:host(.breakpoint-xs) .text-cells{flex-direction:column}:host(.breakpoint-xs) .label{width:8rem;margin-bottom:var(--ic-space-xs)}:host(.breakpoint-xs) .value{max-width:95%}:host(.breakpoint-xs) .end-component{margin-left:0}@media (forced-colors: active){.divider{background-color:canvastext}}";
5
+ const icDataRowCss = "/*! 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{position:relative;display:block}.data{display:flex;align-items:center}.text-cells{display:flex;flex-grow:1;min-width:0}.label{width:12.5rem;min-width:12.5rem;margin-right:var(--ic-space-md);color:var(--ic-color-tertiary-text)}.value{flex-grow:1}slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]){margin-top:calc(var(--ic-space-xs) * -1)}slot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]){margin-top:calc(var(--ic-space-xxs) * -1)}slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]){margin-top:calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs))}.end-component{width:-moz-fit-content;width:fit-content;margin-left:3.5rem}.divider{margin-top:var(--ic-space-md);height:var(--ic-border-width);background-color:var(--ic-architectural-300)}:host(.small) .divider{margin-top:var(--ic-space-xs)}:host(.breakpoint-medium) .label{width:10rem;min-width:10rem}:host(.breakpoint-xs) .text-cells{flex-direction:column}:host(.breakpoint-xs) .label{width:8rem;margin-bottom:var(--ic-space-xs)}:host(.breakpoint-xs) .value{max-width:95%}:host(.breakpoint-xs) .end-component{margin-left:0}@media (forced-colors: active){.divider{background-color:canvastext}}";
6
6
 
7
7
  const DataRow = class {
8
8
  constructor(hostRef) {
@@ -1 +1 @@
1
- {"file":"ic-data-row.entry.js","mappings":";;;;AAAA,MAAM,YAAY,GAAG,sjHAAsjH;;MCoB9jH,OAAO;;;IACV,oBAAe,GAAY,KAAK,CAAC;IACjC,mBAAc,GAAmB,IAAI,CAAC;IA8CtC,sBAAiB,GAAG;MAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC;QACvC,IAAI,CAAC,eAAe,EAAE,CAAC;OACxB,CAAC,CAAC;MAEH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACtC,CAAC;;;;;;IAoBM,gBAAW,GAAG,CAAC,KAAa;MAClC,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE;QAChC,QACE,WAAK,KAAK,EAAC,OAAO,IAChB,YAAM,IAAI,EAAC,OAAO,GAAQ,CACtB,EACN;OACH;WAAM,IAAI,KAAK,EAAE;QAChB,QACE,WAAK,KAAK,EAAC,OAAO,IAChB,qBACE,OAAO,EAAE,IAAI,CAAC,UAAU,KAAK,IAAI,GAAG,OAAO,GAAG,gBAAgB,IAE7D,KAAK,CACQ,CACZ,EACN;OACH;MAED,OAAO,IAAI,CAAC;KACb,CAAC;sBAxF4B,YAAY,CAAC,EAAE;;;gBAWb,SAAS;iBAKf,KAAK;;;EAO/B,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I,CAAC;IAE3C,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,CAAC,OAAO,GAAG,KAAK,IAAI,IAAI,KAAK,OAAO;QACpC,CAAC,mBAAmB,GAAG,IAAI,CAAC,UAAU,KAAK,GAAG;QAC9C,CAAC,eAAe,GAAG,IAAI,CAAC,UAAU,KAAK,IAAI;OAC5C,EACD,IAAI,EAAC,UAAU,IAEf,WAAK,KAAK,EAAC,MAAM,IACf,WAAK,KAAK,EAAC,YAAY,IACpB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EACxB,WAAK,KAAK,EAAC,OAAO,IAChB,YAAM,IAAI,EAAC,OAAO,IAChB,qBAAe,OAAO,EAAC,MAAM,IAAE,KAAK,CAAiB,CAChD,CACH,CACF,EACL,IAAI,CAAC,eAAe,KACnB,WAAK,KAAK,EAAC,eAAe,IACxB,WAAK,IAAI,EAAC,MAAM,IACd,YAAM,IAAI,EAAC,eAAe,GAAQ,CAC9B,CACF,CACP,CACG,EACN,WAAK,KAAK,EAAC,SAAS,GAAG,CAClB,EACP;GACH;;;;;;;","names":[],"sources":["src/components/ic-data-row/ic-data-row.css?tag=ic-data-row&encapsulation=shadow","src/components/ic-data-row/ic-data-row.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n position: relative;\n display: block;\n}\n\n.data {\n display: flex;\n align-items: center;\n}\n\n.text-cells {\n display: flex;\n flex-grow: 1;\n min-width: 0;\n}\n\n.label {\n width: 12.5rem;\n min-width: 12.5rem;\n margin-right: var(--ic-space-md);\n color: var(--ic-color-tertiary-text);\n}\n\n.value {\n flex-grow: 1;\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xxs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]) {\n margin-top: calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs));\n}\n\n.end-component {\n width: fit-content;\n margin-left: 3.5rem;\n}\n\n.divider {\n margin-top: var(--ic-space-md);\n height: var(--ic-space-1px);\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-xs);\n}\n\n:host(.breakpoint-medium) .label {\n width: 10rem;\n min-width: 10rem;\n}\n\n:host(.breakpoint-xs) .text-cells {\n flex-direction: column;\n}\n\n:host(.breakpoint-xs) .label {\n width: 8rem;\n margin-bottom: var(--ic-space-xs);\n}\n\n:host(.breakpoint-xs) .value {\n max-width: 95%;\n}\n\n:host(.breakpoint-xs) .end-component {\n margin-left: 0;\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n isSlotUsed,\n slotHasContent,\n} from \"../../utils/helpers\";\nimport { IcSizesNoLarge } from \"../../utils/types\";\n\n/**\n * @slot label - Content will be rendered in the leftmost cell.\n * @slot value - Content will be rendered to the right of the label.\n * @slot end-component - Content will be displayed in the rightmost cell.\n */\n@Component({\n tag: \"ic-data-row\",\n styleUrl: \"ic-data-row.css\",\n shadow: true,\n})\nexport class DataRow {\n private hasEndComponent: boolean = false;\n private resizeObserver: ResizeObserver = null;\n\n @Element() el: HTMLIcDataRowElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() entitySize: \"xl\" | \"m\" | \"xs\";\n\n /**\n * The label in the leftmost cell of the row.\n */\n @Prop() label: string;\n\n /**\n * The size of the data row component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * The value of the middle (right if no end-component supplied) cell of the row.\n */\n @Prop() value: string;\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n this.hasEndComponent = slotHasContent(this.el, \"end-component\");\n this.checkLabelAbove();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n if (this.hasEndComponent) {\n this.labelEndComponent();\n }\n }\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.checkLabelAbove();\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n private checkLabelAbove() {\n const rowSize = this.el.shadowRoot.querySelector(\".data\")?.clientWidth;\n if (rowSize) {\n if (rowSize + 46 < DEVICE_SIZES.S) {\n this.entitySize = \"xs\";\n } else if (rowSize + 46 < DEVICE_SIZES.M) {\n this.entitySize = \"m\";\n } else {\n this.entitySize = \"xl\";\n }\n }\n }\n\n /**\n * Renders the label either as a ic-typography or slot. Slotted content takes precedence.\n * @param label string - label of value\n * @returns HTMLDivElement - returns label as slot or ic-typography with label as textContent\n */\n private renderLabel = (label: string) => {\n if (isSlotUsed(this.el, \"label\")) {\n return (\n <div class=\"label\">\n <slot name=\"label\"></slot>\n </div>\n );\n } else if (label) {\n return (\n <div class=\"label\">\n <ic-typography\n variant={this.entitySize === \"xs\" ? \"label\" : \"subtitle-large\"}\n >\n {label}\n </ic-typography>\n </div>\n );\n }\n\n return null;\n };\n\n private labelEndComponent(): void {\n const component = this.el.shadowRoot.querySelectorAll(\n \"slot[name=end-component]\"\n );\n\n component.forEach((child: HTMLElement) =>\n child.setAttribute(\"aria-label\", \"for \" + this.label + \" row\")\n );\n }\n\n render() {\n const { label, value, small, size } = this;\n\n return (\n <Host\n class={{\n [\"small\"]: small || size === \"small\",\n [\"breakpoint-medium\"]: this.entitySize === \"m\",\n [\"breakpoint-xs\"]: this.entitySize === \"xs\",\n }}\n role=\"listitem\"\n >\n <div class=\"data\">\n <div class=\"text-cells\">\n {this.renderLabel(label)}\n <div class=\"value\">\n <slot name=\"value\">\n <ic-typography variant=\"body\">{value}</ic-typography>\n </slot>\n </div>\n </div>\n {this.hasEndComponent && (\n <div class=\"end-component\">\n <div role=\"cell\">\n <slot name=\"end-component\"></slot>\n </div>\n </div>\n )}\n </div>\n <div class=\"divider\" />\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-data-row.entry.js","mappings":";;;;AAAA,MAAM,YAAY,GAAG,yjHAAyjH;;MCoBjkH,OAAO;;;IACV,oBAAe,GAAY,KAAK,CAAC;IACjC,mBAAc,GAAmB,IAAI,CAAC;IA8CtC,sBAAiB,GAAG;MAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC;QACvC,IAAI,CAAC,eAAe,EAAE,CAAC;OACxB,CAAC,CAAC;MAEH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACtC,CAAC;;;;;;IAoBM,gBAAW,GAAG,CAAC,KAAa;MAClC,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE;QAChC,QACE,WAAK,KAAK,EAAC,OAAO,IAChB,YAAM,IAAI,EAAC,OAAO,GAAQ,CACtB,EACN;OACH;WAAM,IAAI,KAAK,EAAE;QAChB,QACE,WAAK,KAAK,EAAC,OAAO,IAChB,qBACE,OAAO,EAAE,IAAI,CAAC,UAAU,KAAK,IAAI,GAAG,OAAO,GAAG,gBAAgB,IAE7D,KAAK,CACQ,CACZ,EACN;OACH;MAED,OAAO,IAAI,CAAC;KACb,CAAC;sBAxF4B,YAAY,CAAC,EAAE;;;gBAWb,SAAS;iBAKf,KAAK;;;EAO/B,oBAAoB;IAClB,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,EAAE;MAChC,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;KAClC;GACF;EAED,iBAAiB;IACf,IAAI,CAAC,UAAU,GAAG,oBAAoB,EAAE,CAAC;IACzC,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,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UAAU,IAEf,WAAK,KAAK,EAAC,MAAM,IACf,WAAK,KAAK,EAAC,YAAY,IACpB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EACxB,WAAK,KAAK,EAAC,OAAO,IAChB,YAAM,IAAI,EAAC,OAAO,IAChB,qBAAe,OAAO,EAAC,MAAM,IAAE,KAAK,CAAiB,CAChD,CACH,CACF,EACL,IAAI,CAAC,eAAe,KACnB,WAAK,KAAK,EAAC,eAAe,IACxB,WAAK,IAAI,EAAC,MAAM,IACd,YAAM,IAAI,EAAC,eAAe,GAAQ,CAC9B,CACF,CACP,CACG,EACN,WAAK,KAAK,EAAC,SAAS,GAAG,CAClB,EACP;GACH;;;;;;;","names":[],"sources":["src/components/ic-data-row/ic-data-row.css?tag=ic-data-row&encapsulation=shadow","src/components/ic-data-row/ic-data-row.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n position: relative;\n display: block;\n}\n\n.data {\n display: flex;\n align-items: center;\n}\n\n.text-cells {\n display: flex;\n flex-grow: 1;\n min-width: 0;\n}\n\n.label {\n width: 12.5rem;\n min-width: 12.5rem;\n margin-right: var(--ic-space-md);\n color: var(--ic-color-tertiary-text);\n}\n\n.value {\n flex-grow: 1;\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xxs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]) {\n margin-top: calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs));\n}\n\n.end-component {\n width: fit-content;\n margin-left: 3.5rem;\n}\n\n.divider {\n margin-top: var(--ic-space-md);\n height: var(--ic-border-width);\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-xs);\n}\n\n:host(.breakpoint-medium) .label {\n width: 10rem;\n min-width: 10rem;\n}\n\n:host(.breakpoint-xs) .text-cells {\n flex-direction: column;\n}\n\n:host(.breakpoint-xs) .label {\n width: 8rem;\n margin-bottom: var(--ic-space-xs);\n}\n\n:host(.breakpoint-xs) .value {\n max-width: 95%;\n}\n\n:host(.breakpoint-xs) .end-component {\n margin-left: 0;\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n isSlotUsed,\n slotHasContent,\n} from \"../../utils/helpers\";\nimport { IcSizesNoLarge } from \"../../utils/types\";\n\n/**\n * @slot label - Content will be rendered in the leftmost cell.\n * @slot value - Content will be rendered to the right of the label.\n * @slot end-component - Content will be displayed in the rightmost cell.\n */\n@Component({\n tag: \"ic-data-row\",\n styleUrl: \"ic-data-row.css\",\n shadow: true,\n})\nexport class DataRow {\n private hasEndComponent: boolean = false;\n private resizeObserver: ResizeObserver = null;\n\n @Element() el: HTMLIcDataRowElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() entitySize: \"xl\" | \"m\" | \"xs\";\n\n /**\n * The label in the leftmost cell of the row.\n */\n @Prop() label: string;\n\n /**\n * The size of the data row component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * The value of the middle (right if no end-component supplied) cell of the row.\n */\n @Prop() value: string;\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n this.hasEndComponent = slotHasContent(this.el, \"end-component\");\n this.checkLabelAbove();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n if (this.hasEndComponent) {\n this.labelEndComponent();\n }\n }\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.checkLabelAbove();\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n private checkLabelAbove() {\n const rowSize = this.el.shadowRoot.querySelector(\".data\")?.clientWidth;\n if (rowSize) {\n if (rowSize + 46 < DEVICE_SIZES.S) {\n this.entitySize = \"xs\";\n } else if (rowSize + 46 < DEVICE_SIZES.M) {\n this.entitySize = \"m\";\n } else {\n this.entitySize = \"xl\";\n }\n }\n }\n\n /**\n * Renders the label either as a ic-typography or slot. Slotted content takes precedence.\n * @param label string - label of value\n * @returns HTMLDivElement - returns label as slot or ic-typography with label as textContent\n */\n private renderLabel = (label: string) => {\n if (isSlotUsed(this.el, \"label\")) {\n return (\n <div class=\"label\">\n <slot name=\"label\"></slot>\n </div>\n );\n } else if (label) {\n return (\n <div class=\"label\">\n <ic-typography\n variant={this.entitySize === \"xs\" ? \"label\" : \"subtitle-large\"}\n >\n {label}\n </ic-typography>\n </div>\n );\n }\n\n return null;\n };\n\n private labelEndComponent(): void {\n const component = this.el.shadowRoot.querySelectorAll(\n \"slot[name=end-component]\"\n );\n\n component.forEach((child: HTMLElement) =>\n child.setAttribute(\"aria-label\", \"for \" + this.label + \" row\")\n );\n }\n\n render() {\n const { label, value, small, size } = this;\n\n return (\n <Host\n class={{\n [\"small\"]: small || size === \"small\",\n [\"breakpoint-medium\"]: this.entitySize === \"m\",\n [\"breakpoint-xs\"]: this.entitySize === \"xs\",\n }}\n role=\"listitem\"\n >\n <div class=\"data\">\n <div class=\"text-cells\">\n {this.renderLabel(label)}\n <div class=\"value\">\n <slot name=\"value\">\n <ic-typography variant=\"body\">{value}</ic-typography>\n </slot>\n </div>\n </div>\n {this.hasEndComponent && (\n <div class=\"end-component\">\n <div role=\"cell\">\n <slot name=\"end-component\"></slot>\n </div>\n </div>\n )}\n </div>\n <div class=\"divider\" />\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-813020f1.js';
2
2
  import { c as closeIcon } from './close-icon-539ec8d1.js';
3
- import { d as isPropDefined, f as checkResizeObserver, i as isSlotUsed } from './helpers-24f6e762.js';
3
+ import { f as checkResizeObserver, d as isPropDefined, i as isSlotUsed } from './helpers-24f6e762.js';
4
4
  import './types-b2398b37.js';
5
5
 
6
- const icDialogCss = "/*! 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{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;min-height:100% !important;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);opacity:0;transition:opacity var(--ic-easing-transition-slow)}:host(.fade-in){opacity:1;transition:opacity var(--ic-easing-transition-slow)}:host(.hidden){display:none}.dialog{background-color:var(--ic-architectural-white);border:var(--ic-border-default);border-radius:var(--ic-border-radius);padding:var(--ic-space-xs) var(--ic-space-md) var(--ic-space-md)\n var(--ic-space-md);transform:translateY(-3rem);transition:transform 1000s;display:flex;flex-direction:column;box-sizing:border-box}:host(.fade-in) .dialog{transform:translateY(0);transition:transform var(--ic-easing-transition-slow)}.small{width:50%;max-width:25rem;min-height:11rem;max-height:70vh}.medium{width:70vw;max-width:44rem;min-height:12.5rem;max-height:70vh}.large{width:90vw;max-width:62.5rem;min-height:12.5rem;max-height:90vh}.heading-area{display:flex;margin-bottom:var(--ic-space-xs)}.close-icon{margin-left:auto}.close-icon-svg{display:flex;align-items:center}.content-area{-ms-overflow-style:none;scrollbar-width:none;padding:0 var(--ic-space-xs);margin:0 calc(-1 * var(--ic-space-xs))}:host([data-overflow=\"false\"]) .content-area{overflow-y:visible}:host([data-overflow=\"true\"]) .content-area{overflow-y:scroll}:host([data-overflow=\"false\"]) .dialog{overflow:visible}.content-area::-webkit-scrollbar{display:none}#dialog-content{margin-bottom:var(--ic-space-sm)}.status-alert{margin-bottom:var(--ic-space-xs)}.dialog-controls{margin-top:auto;padding-top:var(--ic-space-xs);display:flex;justify-content:flex-end;gap:var(--ic-space-md)}.dialog-control-button{width:-moz-fit-content;width:fit-content}@media (min-width: 800px){:host([size=\"large\"]) .content-area{width:75%}}@media (max-width: 576px){.dialog{width:100vw;height:100vh;transform:translateY(-5rem);max-width:none;max-height:none;box-sizing:border-box}}@media (max-width: 364px){.triple-button{flex-direction:column;gap:var(--ic-space-xs)}.dialog-control-button{width:unset}}";
6
+ const icDialogCss = "/*! 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{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;min-height:100% !important;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);opacity:0;transition:opacity var(--ic-easing-transition-slow)}:host(.disable-height-constraint){background:none;justify-content:unset;align-items:unset}.dialog.disable-height-constraint{max-height:none;position:relative}.dialog.disable-height-constraint .content-area{overflow-y:visible}:host(.fade-in){opacity:1;transition:opacity var(--ic-easing-transition-slow)}:host(.hidden){display:none}.dialog{background-color:var(--ic-architectural-white);border:var(--ic-border-default);border-radius:var(--ic-border-radius);padding:var(--ic-space-xs) 0 var(--ic-space-md);transform:translateY(-3rem);transition:transform 1000s;display:flex;flex-direction:column;box-sizing:border-box;overflow-x:visible}:host(.fade-in) .dialog{transform:translateY(0);transition:transform var(--ic-easing-transition-slow)}.small{width:50%;max-width:25rem;min-height:11rem;max-height:70vh}.medium{width:70vw;max-width:44rem;min-height:12.5rem;max-height:70vh}.large{width:90vw;max-width:62.5rem;min-height:12.5rem;max-height:90vh}.heading-area{display:flex;margin-bottom:var(--ic-space-xs);padding:0 var(--ic-space-md)}.heading{overflow-wrap:break-word}.close-icon{margin-left:auto}.content-area{-ms-overflow-style:none;scrollbar-width:none;padding:0 var(--ic-space-md);margin:0;overflow-y:auto}.content-area::-webkit-scrollbar{display:none}#dialog-content{margin-bottom:var(--ic-space-sm)}#dialog-content ::slotted(ic-typography){overflow-wrap:break-word}#dialog-content ::slotted(*){position:relative}.status-alert{margin-bottom:var(--ic-space-xs)}.dialog-controls{margin-top:auto;padding:var(--ic-space-xs) var(--ic-space-md) 0;display:flex;justify-content:flex-end;gap:var(--ic-space-md)}.dialog-control-button{width:-moz-fit-content;width:fit-content}.backdrop{overflow-y:auto;position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);padding-top:16px;padding-bottom:16px}@media (min-width: 800px){:host([size=\"large\"]) .content-area{width:75%}}@media (max-width: 576px){.dialog{width:100vw;height:100vh;transform:translateY(-5rem);max-width:none;max-height:none;box-sizing:border-box}.backdrop{padding:0}.dialog.disable-height-constraint{height:auto;min-height:100vh}}@media (max-width: 364px){.triple-button{flex-direction:column;gap:var(--ic-space-xs)}.dialog-control-button{width:unset}}";
7
7
 
8
8
  const Dialog = class {
9
9
  constructor(hostRef) {
@@ -12,7 +12,6 @@ const Dialog = class {
12
12
  this.icDialogClosed = createEvent(this, "icDialogClosed", 7);
13
13
  this.icDialogConfirmed = createEvent(this, "icDialogConfirmed", 7);
14
14
  this.icDialogOpened = createEvent(this, "icDialogOpened", 7);
15
- this.DATA_OVERFLOW = "data-overflow";
16
15
  this.DATA_GETS_FOCUS = "data-gets-focus";
17
16
  this.DATA_GETS_FOCUS_SELECTOR = "[data-gets-focus]";
18
17
  this.DIALOG_CONTROLS = "dialog-controls";
@@ -21,13 +20,35 @@ const Dialog = class {
21
20
  this.IC_TEXT_FIELD = "IC-TEXT-FIELD";
22
21
  this.IC_ACCORDION = "IC-ACCORDION";
23
22
  this.resizeObserver = null;
24
- this.setContentOverflow = () => {
25
- if (this.dialogEl.clientHeight < this.dialogEl.scrollHeight) {
26
- this.el.setAttribute(this.DATA_OVERFLOW, "true");
23
+ this.dialogOpened = () => {
24
+ this.dialogRendered = true;
25
+ if (this.disableHeightConstraint) {
26
+ this.dialogEl.show();
27
27
  }
28
28
  else {
29
- this.el.setAttribute(this.DATA_OVERFLOW, "false");
29
+ this.dialogEl.showModal();
30
30
  }
31
+ setTimeout(() => {
32
+ this.fadeIn = true;
33
+ /**
34
+ * This is required to set scroll back to top if:
35
+ * - dialog content goes below the fold
36
+ * - is closed using cancel or confirm and reopened.
37
+ *
38
+ * Without this, the scroll bar will start from the dialog's last scroll-x coordinate.
39
+ */
40
+ if (this.disableHeightConstraint && this.backdropEl.scrollTop !== 0) {
41
+ this.backdropEl.scrollTop = 0;
42
+ }
43
+ }, 10);
44
+ setTimeout(() => {
45
+ this.setInitialFocus();
46
+ checkResizeObserver(this.runResizeObserver);
47
+ }, 75);
48
+ setTimeout(() => {
49
+ this.getFocusedElementIndex();
50
+ this.icDialogOpened.emit();
51
+ }, 80);
31
52
  };
32
53
  this.runResizeObserver = () => {
33
54
  this.resizeObserver = new ResizeObserver(() => {
@@ -38,11 +59,18 @@ const Dialog = class {
38
59
  };
39
60
  this.resizeObserverCallback = () => {
40
61
  if (this.dialogEl.clientHeight !== this.dialogHeight) {
41
- this.el.setAttribute(this.DATA_OVERFLOW, "false");
42
- this.setContentOverflow();
43
62
  this.dialogHeight = this.dialogEl.clientHeight;
44
63
  }
45
64
  };
65
+ this.refreshInteractiveElementsOnSlotChange = () => {
66
+ this.contentArea = this.el.shadowRoot.querySelector("#dialog-content slot");
67
+ this.contentArea.addEventListener("slotchange", this.getInteractiveElements);
68
+ };
69
+ this.removeSlotChangeListener = () => {
70
+ if (this.contentArea) {
71
+ this.contentArea.removeEventListener("slotchange", this.getInteractiveElements);
72
+ }
73
+ };
46
74
  this.setInitialFocus = () => {
47
75
  this.sourceElement = document.activeElement;
48
76
  let focusedElement;
@@ -59,7 +87,9 @@ const Dialog = class {
59
87
  focusedElement.setFocus();
60
88
  }
61
89
  else {
62
- focusedElement.focus();
90
+ focusedElement.focus({
91
+ preventScroll: this.disableHeightConstraint ? true : false,
92
+ });
63
93
  }
64
94
  };
65
95
  this.getFocusedElementIndex = () => {
@@ -162,6 +192,25 @@ const Dialog = class {
162
192
  }
163
193
  }
164
194
  };
195
+ this.renderDialog = () => {
196
+ const { alertHeading, alertMessage, buttons, buttonProps, size, heading, label, status, destructive, dismissLabel, hideCloseButton, } = this;
197
+ return (h("dialog", { class: {
198
+ ["dialog"]: true,
199
+ [`${size}`]: true,
200
+ ["disable-height-constraint"]: this.disableHeightConstraint,
201
+ }, "aria-labelledby": "dialog-label dialog-heading", "aria-describedby": "dialog-alert dialog-content", ref: (el) => (this.dialogEl = el) }, h("div", { class: "heading-area" }, h("div", { class: "heading-content" }, h("div", { class: "label" }, h("slot", { name: "label" }, h("ic-typography", { variant: "label", id: "dialog-label" }, label))), h("div", { class: "heading" }, h("slot", { name: "heading" }, h("ic-typography", { variant: "h4", id: "dialog-heading" }, heading)))), !hideCloseButton && (h("ic-button", { class: "close-icon", variant: "icon", innerHTML: closeIcon, "aria-label": dismissLabel, onClick: this.closeIconClick, "data-gets-focus": destructive || !buttons ? "" : null }))), h("div", { class: "content-area" }, isSlotUsed(this.el, "alert") ? (h("slot", { name: "alert" })) : (status && (h("ic-alert", { variant: status, heading: alertHeading, message: alertMessage, "title-above": true, class: "status-alert", id: "dialog-alert" }))), h("div", { id: "dialog-content" }, h("slot", null))), (buttons || isSlotUsed(this.el, this.DIALOG_CONTROLS)) && (h("div", { class: {
202
+ [this.DIALOG_CONTROLS]: true,
203
+ ["triple-button"]: buttonProps.length === 3,
204
+ } }, h("slot", { name: this.DIALOG_CONTROLS }, !isSlotUsed(this.el, this.DIALOG_CONTROLS) &&
205
+ buttonProps.map((props, index) => {
206
+ if (index > 2) {
207
+ return;
208
+ }
209
+ else {
210
+ return (h("ic-button", { variant: this.getButtonVariant(index), onClick: () => this.getButtonOnclick(index), class: "dialog-control-button", "full-width": buttonProps.length === 3, "data-gets-focus": this.getButtonVariant(index) === "primary" ? "" : null }, props.label));
211
+ }
212
+ }))))));
213
+ };
165
214
  this.dialogRendered = false;
166
215
  this.fadeIn = false;
167
216
  this.alertHeading = undefined;
@@ -170,6 +219,7 @@ const Dialog = class {
170
219
  this.closeOnBackdropClick = true;
171
220
  this.destructive = false;
172
221
  this.dismissLabel = "Dismiss";
222
+ this.disableHeightConstraint = false;
173
223
  this.hideCloseButton = false;
174
224
  this.heading = undefined;
175
225
  this.label = undefined;
@@ -186,19 +236,7 @@ const Dialog = class {
186
236
  }
187
237
  watchOpenHandler() {
188
238
  if (this.open) {
189
- this.dialogRendered = true;
190
- this.dialogEl.showModal();
191
- setTimeout(() => {
192
- this.fadeIn = true;
193
- }, 10);
194
- setTimeout(() => {
195
- this.setInitialFocus();
196
- checkResizeObserver(this.runResizeObserver);
197
- }, 75);
198
- setTimeout(() => {
199
- this.getFocusedElementIndex();
200
- this.icDialogOpened.emit();
201
- }, 80);
239
+ this.dialogOpened();
202
240
  }
203
241
  else {
204
242
  this.fadeIn = false;
@@ -210,7 +248,6 @@ const Dialog = class {
210
248
  this.dialogRendered = false;
211
249
  this.dialogEl.close();
212
250
  (_a = this.sourceElement) === null || _a === void 0 ? void 0 : _a.focus();
213
- this.el.removeAttribute(this.DATA_OVERFLOW);
214
251
  this.dialogHeight = 0;
215
252
  this.icDialogClosed.emit();
216
253
  }, 80);
@@ -219,12 +256,30 @@ const Dialog = class {
219
256
  watchPropHandler() {
220
257
  this.setButtonOnClick();
221
258
  }
259
+ disconnectedCallback() {
260
+ this.removeSlotChangeListener();
261
+ }
222
262
  componentWillLoad() {
223
- this.setButtonOnClick();
263
+ if (this.buttonProps.length) {
264
+ this.setButtonOnClick();
265
+ }
224
266
  }
225
267
  componentDidLoad() {
226
268
  this.getInteractiveElements();
227
269
  this.setAlertVariant();
270
+ this.refreshInteractiveElementsOnSlotChange();
271
+ if (this.open) {
272
+ this.dialogOpened();
273
+ }
274
+ }
275
+ componentDidRender() {
276
+ if (getComputedStyle(this.el).display !== "none" &&
277
+ this.disableHeightConstraint) {
278
+ document.body.style.overflow = "hidden";
279
+ }
280
+ else {
281
+ document.body.style.overflow = "auto";
282
+ }
228
283
  }
229
284
  handleKeyboard(ev) {
230
285
  if (this.dialogRendered) {
@@ -260,37 +315,13 @@ const Dialog = class {
260
315
  * @deprecated This method should not be used anymore. Use open prop to set dialog visibility.
261
316
  */
262
317
  async showDialog() {
263
- this.dialogRendered = true;
264
- this.dialogEl.showModal();
265
- setTimeout(() => {
266
- this.fadeIn = true;
267
- }, 10);
268
- setTimeout(() => {
269
- this.setInitialFocus();
270
- checkResizeObserver(this.runResizeObserver);
271
- }, 75);
272
- setTimeout(() => {
273
- this.getFocusedElementIndex();
274
- this.icDialogOpened.emit();
275
- }, 80);
318
+ this.open = true;
276
319
  }
277
320
  /**
278
321
  * @deprecated This method should not be used anymore. Use open prop to set dialog visibility.
279
322
  */
280
323
  async hideDialog() {
281
- this.fadeIn = false;
282
- if (this.resizeObserver !== null) {
283
- this.resizeObserver.disconnect();
284
- }
285
- setTimeout(() => {
286
- var _a;
287
- this.dialogRendered = false;
288
- this.dialogEl.close();
289
- (_a = this.sourceElement) === null || _a === void 0 ? void 0 : _a.focus();
290
- this.el.removeAttribute(this.DATA_OVERFLOW);
291
- this.dialogHeight = 0;
292
- this.icDialogClosed.emit();
293
- }, 80);
324
+ this.open = false;
294
325
  }
295
326
  /**
296
327
  * Cancels the dialog. Used by the default 'Cancel' button or can be called manually to trigger cancelling of dialog.
@@ -321,21 +352,11 @@ const Dialog = class {
321
352
  }
322
353
  }
323
354
  render() {
324
- const { alertHeading, alertMessage, buttons, buttonProps, size, heading, label, status, destructive, dismissLabel, hideCloseButton, } = this;
325
- return (h(Host, { class: { ["hidden"]: !this.dialogRendered, ["fade-in"]: this.fadeIn } }, h("dialog", { class: { ["dialog"]: true, [`${size}`]: true }, "aria-labelledby": "dialog-label dialog-heading", "aria-describedby": "dialog-alert dialog-content", ref: (el) => (this.dialogEl = el) }, h("div", { class: "heading-area" }, h("div", { class: "heading-content" }, h("div", { class: "label" }, h("slot", { name: "label" }, h("ic-typography", { variant: "label", id: "dialog-label" }, label))), h("div", { class: "heading" }, h("slot", { name: "heading" }, h("ic-typography", { variant: "h4", id: "dialog-heading" }, heading)))), !hideCloseButton && (h("ic-button", { class: "close-icon", variant: "icon", "aria-label": dismissLabel, onClick: this.closeIconClick, "data-gets-focus": destructive || !buttons ? "" : null }, h("span", { class: "close-icon-svg", innerHTML: closeIcon })))), h("div", { class: "content-area" }, isSlotUsed(this.el, "alert") ? (h("slot", { name: "alert" })) : (status && (h("ic-alert", { variant: status, heading: alertHeading, message: alertMessage, "title-above": true, class: "status-alert", id: "dialog-alert" }))), h("div", { id: "dialog-content" }, h("slot", null))), (buttons || isSlotUsed(this.el, this.DIALOG_CONTROLS)) && (h("div", { class: {
326
- [this.DIALOG_CONTROLS]: true,
327
- ["triple-button"]: buttonProps.length === 3,
328
- } }, h("slot", { name: this.DIALOG_CONTROLS }, !isSlotUsed(this.el, this.DIALOG_CONTROLS) &&
329
- buttonProps.map((props, index) => {
330
- if (index > 2) {
331
- return;
332
- }
333
- else {
334
- return (h("ic-button", { variant: this.getButtonVariant(index), onClick: () => this.getButtonOnclick(index), class: "dialog-control-button", "full-width": buttonProps.length === 3, "data-gets-focus": this.getButtonVariant(index) === "primary"
335
- ? ""
336
- : null }, props.label));
337
- }
338
- })))))));
355
+ return (h(Host, { class: {
356
+ ["hidden"]: !this.dialogRendered,
357
+ ["fade-in"]: this.fadeIn,
358
+ ["disable-height-constraint"]: this.disableHeightConstraint,
359
+ } }, this.disableHeightConstraint ? (h("div", { class: "backdrop", ref: (el) => (this.backdropEl = el) }, this.renderDialog())) : (this.renderDialog())));
339
360
  }
340
361
  get el() { return getElement(this); }
341
362
  static get watchers() { return {