@ukic/web-components 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1143) hide show
  1. package/README.md +34 -5
  2. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  3. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  4. package/dist/cjs/core.cjs.js +13 -11
  5. package/dist/cjs/core.cjs.js.map +1 -1
  6. package/dist/cjs/{helpers-94b33ab0.js → helpers-789082d4.js} +159 -75
  7. package/dist/cjs/helpers-789082d4.js.map +1 -0
  8. package/dist/cjs/ic-accordion-group.cjs.entry.js +38 -22
  9. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-accordion.cjs.entry.js +75 -46
  11. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-alert.cjs.entry.js +93 -46
  13. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-back-to-top.cjs.entry.js +32 -16
  15. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-badge.cjs.entry.js +91 -42
  17. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +114 -63
  19. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-breadcrumb.cjs.entry.js +78 -18
  21. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-button_3.cjs.entry.js +366 -168
  23. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-card-vertical.cjs.entry.js +93 -72
  25. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-checkbox-group.cjs.entry.js +51 -14
  27. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-checkbox.cjs.entry.js +55 -31
  29. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-chip.cjs.entry.js +64 -32
  31. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-classification-banner.cjs.entry.js +22 -6
  33. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-data-list.cjs.entry.js +17 -7
  35. package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-data-row.cjs.entry.js +31 -20
  37. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ic-dialog.cjs.entry.js +170 -114
  39. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-divider.cjs.entry.js +95 -12
  41. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-empty-state.cjs.entry.js +21 -24
  43. package/dist/cjs/ic-empty-state.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-footer-link-group.cjs.entry.js +12 -14
  45. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-footer-link.cjs.entry.js +15 -16
  47. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-footer.cjs.entry.js +52 -30
  49. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-hero.cjs.entry.js +35 -32
  51. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +40 -21
  53. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +587 -244
  55. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-input-label_2.cjs.entry.js +65 -40
  57. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-link.cjs.entry.js +43 -28
  59. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-menu-group.cjs.entry.js +6 -7
  61. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-menu-item.cjs.entry.js +41 -33
  63. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-navigation-button.cjs.entry.js +32 -24
  65. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-navigation-group.cjs.entry.js +69 -44
  67. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-navigation-item.cjs.entry.js +122 -45
  69. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-navigation-menu.cjs.entry.js +55 -33
  71. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-page-header.cjs.entry.js +53 -31
  73. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-pagination-item.cjs.entry.js +37 -24
  75. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ic-pagination.cjs.entry.js +76 -36
  77. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-popover-menu.cjs.entry.js +97 -60
  79. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-radio-group.cjs.entry.js +103 -48
  81. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  82. package/dist/cjs/ic-radio-option.cjs.entry.js +70 -39
  83. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  84. package/dist/cjs/ic-search-bar.cjs.entry.js +195 -108
  85. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  86. package/dist/cjs/ic-section-container.cjs.entry.js +12 -5
  87. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-select.cjs.entry.js +418 -199
  89. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-side-navigation.cjs.entry.js +119 -79
  91. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  92. package/dist/cjs/ic-skeleton.cjs.entry.js +15 -8
  93. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  94. package/dist/cjs/ic-skip-link.cjs.entry.js +62 -0
  95. package/dist/cjs/ic-skip-link.cjs.entry.js.map +1 -0
  96. package/dist/cjs/ic-status-tag.cjs.entry.js +30 -10
  97. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  98. package/dist/cjs/ic-step.cjs.entry.js +37 -37
  99. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-stepper.cjs.entry.js +60 -36
  101. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-switch.cjs.entry.js +63 -31
  103. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  104. package/dist/cjs/ic-tab-context.cjs.entry.js +112 -152
  105. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  106. package/dist/cjs/ic-tab-group.cjs.entry.js +18 -14
  107. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  108. package/dist/cjs/ic-tab-panel.cjs.entry.js +19 -15
  109. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  110. package/dist/cjs/ic-tab.cjs.entry.js +31 -22
  111. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  112. package/dist/cjs/ic-text-field.cjs.entry.js +235 -87
  113. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  114. package/dist/cjs/ic-theme.cjs.entry.js +54 -23
  115. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  116. package/dist/cjs/ic-toast-region.cjs.entry.js +8 -3
  117. package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
  118. package/dist/cjs/ic-toast.cjs.entry.js +30 -23
  119. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  120. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +117 -35
  121. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  122. package/dist/cjs/ic-toggle-button.cjs.entry.js +110 -23
  123. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  124. package/dist/cjs/ic-top-navigation.cjs.entry.js +65 -35
  125. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  126. package/dist/cjs/ic-typography.cjs.entry.js +59 -30
  127. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  128. package/dist/cjs/index-d337cd8a.js +2611 -0
  129. package/dist/cjs/index-d337cd8a.js.map +1 -0
  130. package/dist/cjs/loader.cjs.js +5 -3
  131. package/dist/cjs/loader.cjs.js.map +1 -1
  132. package/dist/collection/ag-theme-icds.css +218 -0
  133. package/dist/collection/collection-manifest.json +8 -7
  134. package/dist/collection/components/ic-accordion/ic-accordion.css +30 -17
  135. package/dist/collection/components/ic-accordion/ic-accordion.js +116 -76
  136. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  137. package/dist/collection/components/ic-accordion/ic-accordion.stories.js +611 -0
  138. package/dist/collection/components/ic-accordion-group/ic-accordion-group.css +3 -8
  139. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +65 -37
  140. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
  141. package/dist/collection/components/ic-alert/ic-alert.css +52 -19
  142. package/dist/collection/components/ic-alert/ic-alert.js +164 -50
  143. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  144. package/dist/collection/components/ic-alert/ic-alert.stories.js +271 -0
  145. package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +54 -20
  146. package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +86 -14
  147. package/dist/collection/components/ic-back-to-top/ic-back-to-top.js.map +1 -1
  148. package/dist/collection/components/ic-back-to-top/ic-back-to-top.stories.js +216 -0
  149. package/dist/collection/components/ic-back-to-top/ic-back-to-top.types.js.map +1 -1
  150. package/dist/collection/components/ic-badge/ic-badge.css +44 -11
  151. package/dist/collection/components/ic-badge/ic-badge.js +160 -53
  152. package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
  153. package/dist/collection/components/ic-badge/ic-badge.stories.js +1092 -0
  154. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +32 -8
  155. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +142 -46
  156. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
  157. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +165 -84
  158. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
  159. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.stories.js +362 -0
  160. package/dist/collection/components/ic-button/ic-button.css +722 -429
  161. package/dist/collection/components/ic-button/ic-button.js +331 -139
  162. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  163. package/dist/collection/components/ic-button/ic-button.stories.js +2364 -0
  164. package/dist/collection/components/ic-button/ic-button.types.js.map +1 -1
  165. package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +115 -104
  166. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +160 -86
  167. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js.map +1 -1
  168. package/dist/collection/components/ic-card-vertical/ic-card-vertical.stories.js +1050 -0
  169. package/dist/collection/components/ic-checkbox/ic-checkbox.css +80 -35
  170. package/dist/collection/components/ic-checkbox/ic-checkbox.js +123 -45
  171. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  172. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +20 -1
  173. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +108 -23
  174. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  175. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +726 -0
  176. package/dist/collection/components/ic-chip/ic-chip.css +66 -48
  177. package/dist/collection/components/ic-chip/ic-chip.js +126 -38
  178. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  179. package/dist/collection/components/ic-chip/ic-chip.stories.js +980 -0
  180. package/dist/collection/components/ic-classification-banner/ic-classification-banner.css +20 -10
  181. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +33 -8
  182. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
  183. package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +131 -0
  184. package/dist/collection/components/ic-data-list/ic-data-list.css +5 -1
  185. package/dist/collection/components/ic-data-list/ic-data-list.js +47 -8
  186. package/dist/collection/components/ic-data-list/ic-data-list.js.map +1 -1
  187. package/dist/collection/components/ic-data-list/ic-data-list.stories.js +493 -0
  188. package/dist/collection/components/ic-data-row/ic-data-row.css +5 -2
  189. package/dist/collection/components/ic-data-row/ic-data-row.js +64 -21
  190. package/dist/collection/components/ic-data-row/ic-data-row.js.map +1 -1
  191. package/dist/collection/components/ic-dialog/ic-dialog.css +18 -10
  192. package/dist/collection/components/ic-dialog/ic-dialog.js +248 -144
  193. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  194. package/dist/collection/components/ic-dialog/ic-dialog.stories.js +1118 -0
  195. package/dist/collection/components/ic-divider/ic-divider.css +298 -4
  196. package/dist/collection/components/ic-divider/ic-divider.js +272 -12
  197. package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
  198. package/dist/collection/components/ic-divider/ic-divider.stories.js +394 -0
  199. package/dist/collection/components/ic-divider/ic-divider.types.js +2 -0
  200. package/dist/collection/components/ic-divider/ic-divider.types.js.map +1 -0
  201. package/dist/collection/components/ic-empty-state/ic-empty-state.css +17 -2
  202. package/dist/collection/components/ic-empty-state/ic-empty-state.js +63 -28
  203. package/dist/collection/components/ic-empty-state/ic-empty-state.js.map +1 -1
  204. package/dist/collection/components/ic-empty-state/ic-empty-state.stories.js +404 -0
  205. package/dist/collection/components/ic-footer/ic-footer.css +25 -17
  206. package/dist/collection/components/ic-footer/ic-footer.js +72 -38
  207. package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
  208. package/dist/collection/components/ic-footer/ic-footer.stories.js +384 -0
  209. package/dist/collection/components/ic-footer-link/ic-footer-link.css +28 -5
  210. package/dist/collection/components/ic-footer-link/ic-footer-link.js +32 -22
  211. package/dist/collection/components/ic-footer-link/ic-footer-link.js.map +1 -1
  212. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.css +13 -20
  213. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +12 -12
  214. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
  215. package/dist/collection/components/ic-hero/ic-hero.css +25 -10
  216. package/dist/collection/components/ic-hero/ic-hero.js +66 -45
  217. package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
  218. package/dist/collection/components/ic-hero/ic-hero.stories.js +448 -0
  219. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.css +2 -6
  220. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +97 -22
  221. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
  222. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +51 -18
  223. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +74 -64
  224. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  225. package/dist/collection/components/ic-input-container/ic-input-container.js +16 -6
  226. package/dist/collection/components/ic-input-container/ic-input-container.js.map +1 -1
  227. package/dist/collection/components/ic-input-label/ic-input-label.css +19 -20
  228. package/dist/collection/components/ic-input-label/ic-input-label.js +97 -41
  229. package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
  230. package/dist/collection/components/ic-input-validation/ic-input-validation.css +12 -3
  231. package/dist/collection/components/ic-input-validation/ic-input-validation.js +36 -19
  232. package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
  233. package/dist/collection/components/ic-link/ic-link.css +66 -25
  234. package/dist/collection/components/ic-link/ic-link.js +107 -59
  235. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  236. package/dist/collection/components/ic-link/ic-link.stories.js +85 -0
  237. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +20 -13
  238. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +183 -102
  239. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
  240. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.stories.js +464 -0
  241. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.types.js.map +1 -1
  242. package/dist/collection/components/ic-menu/ic-menu.css +116 -23
  243. package/dist/collection/components/ic-menu/ic-menu.js +640 -257
  244. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  245. package/dist/collection/components/ic-menu/ic-menu.types.js.map +1 -1
  246. package/dist/collection/components/ic-menu-group/ic-menu-group.css +3 -2
  247. package/dist/collection/components/ic-menu-group/ic-menu-group.js +4 -5
  248. package/dist/collection/components/ic-menu-group/ic-menu-group.js.map +1 -1
  249. package/dist/collection/components/ic-menu-item/ic-menu-item.css +45 -23
  250. package/dist/collection/components/ic-menu-item/ic-menu-item.js +115 -48
  251. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  252. package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +18 -0
  253. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +77 -29
  254. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  255. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +52 -51
  256. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +158 -47
  257. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  258. package/dist/collection/components/ic-navigation-group/ic-navigation-group.types.js +2 -0
  259. package/dist/collection/components/ic-navigation-group/ic-navigation-group.types.js.map +1 -0
  260. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +60 -65
  261. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +188 -62
  262. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  263. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css +13 -5
  264. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +84 -32
  265. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
  266. package/dist/collection/components/ic-page-header/ic-page-header.css +7 -3
  267. package/dist/collection/components/ic-page-header/ic-page-header.js +99 -35
  268. package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
  269. package/dist/collection/components/ic-page-header/ic-page-header.stories.js +823 -0
  270. package/dist/collection/components/ic-pagination/ic-pagination.css +24 -1
  271. package/dist/collection/components/ic-pagination/ic-pagination.js +157 -73
  272. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  273. package/dist/collection/components/ic-pagination/ic-pagination.stories.js +164 -0
  274. package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +54 -15
  275. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +99 -52
  276. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
  277. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +8 -4
  278. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +184 -69
  279. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  280. package/dist/collection/components/ic-popover-menu/ic-popover-menu.stories.js +573 -0
  281. package/dist/collection/components/ic-radio-group/ic-radio-group.css +17 -1
  282. package/dist/collection/components/ic-radio-group/ic-radio-group.js +162 -59
  283. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  284. package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +474 -0
  285. package/dist/collection/components/ic-radio-option/ic-radio-option.css +59 -27
  286. package/dist/collection/components/ic-radio-option/ic-radio-option.js +130 -47
  287. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  288. package/dist/collection/components/ic-search-bar/ic-search-bar.css +109 -16
  289. package/dist/collection/components/ic-search-bar/ic-search-bar.js +342 -147
  290. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  291. package/dist/collection/components/ic-search-bar/ic-search-bar.stories.js +593 -0
  292. package/dist/collection/components/ic-search-bar/ic-search-bar.types.js.map +1 -1
  293. package/dist/collection/components/ic-section-container/ic-section-container.js +15 -5
  294. package/dist/collection/components/ic-section-container/ic-section-container.js.map +1 -1
  295. package/dist/collection/components/ic-section-container/ic-section-container.stories.js +62 -0
  296. package/dist/collection/components/ic-select/ic-select.css +105 -55
  297. package/dist/collection/components/ic-select/ic-select.js +591 -248
  298. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  299. package/dist/collection/components/ic-select/ic-select_(multi).stories.js +892 -0
  300. package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +965 -0
  301. package/dist/collection/components/ic-select/ic-select_(single).stories.js +790 -0
  302. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +64 -38
  303. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +162 -100
  304. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  305. package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +2547 -0
  306. package/dist/collection/components/ic-side-navigation/ic-side-navigation.types.js.map +1 -1
  307. package/dist/collection/components/ic-skeleton/ic-skeleton.css +4 -27
  308. package/dist/collection/components/ic-skeleton/ic-skeleton.js +29 -13
  309. package/dist/collection/components/ic-skeleton/ic-skeleton.js.map +1 -1
  310. package/dist/collection/components/ic-skeleton/ic-skeleton.stories.js +143 -0
  311. package/dist/collection/components/ic-skip-link/ic-skip-link.css +46 -0
  312. package/dist/collection/components/ic-skip-link/ic-skip-link.js +231 -0
  313. package/dist/collection/components/ic-skip-link/ic-skip-link.js.map +1 -0
  314. package/dist/collection/components/ic-skip-link/ic-skip-link.stories.js +504 -0
  315. package/dist/collection/components/ic-status-tag/ic-status-tag.css +27 -17
  316. package/dist/collection/components/ic-status-tag/ic-status-tag.js +80 -10
  317. package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
  318. package/dist/collection/components/ic-status-tag/ic-status-tag.stories.js +196 -0
  319. package/dist/collection/components/ic-step/ic-step.css +69 -126
  320. package/dist/collection/components/ic-step/ic-step.js +95 -42
  321. package/dist/collection/components/ic-step/ic-step.js.map +1 -1
  322. package/dist/collection/components/ic-stepper/ic-stepper.js +96 -54
  323. package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
  324. package/dist/collection/components/ic-stepper/ic-stepper.stories.js +281 -0
  325. package/dist/collection/components/ic-switch/ic-switch.css +30 -48
  326. package/dist/collection/components/ic-switch/ic-switch.js +106 -48
  327. package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
  328. package/dist/collection/components/ic-switch/ic-switch.stories.js +149 -0
  329. package/dist/collection/components/ic-tab/ic-tab.css +53 -17
  330. package/dist/collection/components/ic-tab/ic-tab.js +97 -51
  331. package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
  332. package/dist/collection/components/ic-tab-context/ic-tab-context.js +170 -180
  333. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  334. package/dist/collection/components/ic-tab-context/ic-tabs.stories.js +316 -0
  335. package/dist/collection/components/ic-tab-group/ic-tab-group.css +14 -7
  336. package/dist/collection/components/ic-tab-group/ic-tab-group.js +70 -38
  337. package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
  338. package/dist/collection/components/ic-tab-panel/ic-tab-panel.css +7 -3
  339. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +86 -29
  340. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js.map +1 -1
  341. package/dist/collection/components/ic-text-field/ic-text-field.css +64 -8
  342. package/dist/collection/components/ic-text-field/ic-text-field.js +484 -154
  343. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  344. package/dist/collection/components/ic-text-field/ic-text-field.stories.js +1048 -0
  345. package/dist/collection/components/ic-theme/ic-theme.js +121 -35
  346. package/dist/collection/components/ic-theme/ic-theme.js.map +1 -1
  347. package/dist/collection/components/ic-theme/ic-theme.stories.js +434 -0
  348. package/dist/collection/components/ic-toast/ic-toast.css +41 -17
  349. package/dist/collection/components/ic-toast/ic-toast.js +49 -29
  350. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  351. package/dist/collection/components/ic-toast/ic-toast.stories.js +396 -0
  352. package/dist/collection/components/ic-toast-region/ic-toast-region.js +12 -5
  353. package/dist/collection/components/ic-toast-region/ic-toast-region.js.map +1 -1
  354. package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +188 -58
  355. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +226 -63
  356. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  357. package/dist/collection/components/ic-toggle-button/ic-toggle-button.stories.js +427 -0
  358. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css +23 -16
  359. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +228 -64
  360. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
  361. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.stories.js +585 -0
  362. package/dist/collection/components/ic-tooltip/ic-tooltip.css +14 -5
  363. package/dist/collection/components/ic-tooltip/ic-tooltip.js +123 -36
  364. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  365. package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +366 -0
  366. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +57 -21
  367. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +122 -50
  368. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  369. package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +1091 -0
  370. package/dist/collection/components/ic-typography/ic-typography.css +11 -7
  371. package/dist/collection/components/ic-typography/ic-typography.js +101 -32
  372. package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
  373. package/dist/collection/components/ic-typography/ic-typography.stories.js +447 -0
  374. package/dist/collection/patterns/top-nav-content-footer.stories.js +109 -0
  375. package/dist/collection/patterns/z-index.stories.js +474 -0
  376. package/dist/collection/utils/constants.js +40 -1
  377. package/dist/collection/utils/constants.js.map +1 -1
  378. package/dist/collection/utils/helpers.js +97 -68
  379. package/dist/collection/utils/helpers.js.map +1 -1
  380. package/dist/collection/utils/testa11y.helpers.js +2 -1
  381. package/dist/collection/utils/testa11y.helpers.js.map +1 -1
  382. package/dist/collection/utils/types.js +6 -6
  383. package/dist/collection/utils/types.js.map +1 -1
  384. package/dist/components/helpers.js +151 -70
  385. package/dist/components/helpers.js.map +1 -1
  386. package/dist/components/ic-accordion-group.js +38 -21
  387. package/dist/components/ic-accordion-group.js.map +1 -1
  388. package/dist/components/ic-accordion.js +76 -45
  389. package/dist/components/ic-accordion.js.map +1 -1
  390. package/dist/components/ic-alert.js +98 -47
  391. package/dist/components/ic-alert.js.map +1 -1
  392. package/dist/components/ic-back-to-top.js +33 -14
  393. package/dist/components/ic-back-to-top.js.map +1 -1
  394. package/dist/components/ic-badge.js +93 -42
  395. package/dist/components/ic-badge.js.map +1 -1
  396. package/dist/components/ic-breadcrumb-group.js +119 -64
  397. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  398. package/dist/components/ic-breadcrumb2.js +81 -17
  399. package/dist/components/ic-breadcrumb2.js.map +1 -1
  400. package/dist/components/ic-button2.js +190 -79
  401. package/dist/components/ic-button2.js.map +1 -1
  402. package/dist/components/ic-card-vertical.js +98 -74
  403. package/dist/components/ic-card-vertical.js.map +1 -1
  404. package/dist/components/ic-checkbox-group.js +53 -12
  405. package/dist/components/ic-checkbox-group.js.map +1 -1
  406. package/dist/components/ic-checkbox.js +56 -29
  407. package/dist/components/ic-checkbox.js.map +1 -1
  408. package/dist/components/ic-chip.js +68 -31
  409. package/dist/components/ic-chip.js.map +1 -1
  410. package/dist/components/ic-classification-banner.js +21 -5
  411. package/dist/components/ic-classification-banner.js.map +1 -1
  412. package/dist/components/ic-data-list.js +18 -7
  413. package/dist/components/ic-data-list.js.map +1 -1
  414. package/dist/components/ic-data-row.js +31 -18
  415. package/dist/components/ic-data-row.js.map +1 -1
  416. package/dist/components/ic-dialog.js +172 -114
  417. package/dist/components/ic-dialog.js.map +1 -1
  418. package/dist/components/ic-divider2.js +110 -14
  419. package/dist/components/ic-divider2.js.map +1 -1
  420. package/dist/components/ic-empty-state.js +23 -24
  421. package/dist/components/ic-empty-state.js.map +1 -1
  422. package/dist/components/ic-footer-link-group.js +12 -13
  423. package/dist/components/ic-footer-link-group.js.map +1 -1
  424. package/dist/components/ic-footer-link.js +15 -15
  425. package/dist/components/ic-footer-link.js.map +1 -1
  426. package/dist/components/ic-footer.js +52 -30
  427. package/dist/components/ic-footer.js.map +1 -1
  428. package/dist/components/ic-hero.js +36 -33
  429. package/dist/components/ic-hero.js.map +1 -1
  430. package/dist/components/ic-horizontal-scroll2.js +41 -20
  431. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  432. package/dist/components/ic-input-component-container2.js +48 -36
  433. package/dist/components/ic-input-component-container2.js.map +1 -1
  434. package/dist/components/ic-input-container2.js +12 -5
  435. package/dist/components/ic-input-container2.js.map +1 -1
  436. package/dist/components/ic-input-label2.js +42 -23
  437. package/dist/components/ic-input-label2.js.map +1 -1
  438. package/dist/components/ic-input-validation2.js +22 -15
  439. package/dist/components/ic-input-validation2.js.map +1 -1
  440. package/dist/components/ic-link2.js +45 -29
  441. package/dist/components/ic-link2.js.map +1 -1
  442. package/dist/components/ic-loading-indicator2.js +109 -68
  443. package/dist/components/ic-loading-indicator2.js.map +1 -1
  444. package/dist/components/ic-menu-group.js +5 -5
  445. package/dist/components/ic-menu-group.js.map +1 -1
  446. package/dist/components/ic-menu-item2.js +46 -35
  447. package/dist/components/ic-menu-item2.js.map +1 -1
  448. package/dist/components/ic-menu2.js +535 -209
  449. package/dist/components/ic-menu2.js.map +1 -1
  450. package/dist/components/ic-navigation-button.js +33 -24
  451. package/dist/components/ic-navigation-button.js.map +1 -1
  452. package/dist/components/ic-navigation-group.js +72 -44
  453. package/dist/components/ic-navigation-group.js.map +1 -1
  454. package/dist/components/ic-navigation-item.js +125 -45
  455. package/dist/components/ic-navigation-item.js.map +1 -1
  456. package/dist/components/ic-navigation-menu2.js +55 -31
  457. package/dist/components/ic-navigation-menu2.js.map +1 -1
  458. package/dist/components/ic-page-header.js +53 -29
  459. package/dist/components/ic-page-header.js.map +1 -1
  460. package/dist/components/ic-pagination-item2.js +39 -23
  461. package/dist/components/ic-pagination-item2.js.map +1 -1
  462. package/dist/components/ic-pagination.js +77 -34
  463. package/dist/components/ic-pagination.js.map +1 -1
  464. package/dist/components/ic-popover-menu.js +99 -59
  465. package/dist/components/ic-popover-menu.js.map +1 -1
  466. package/dist/components/ic-radio-group.js +105 -47
  467. package/dist/components/ic-radio-group.js.map +1 -1
  468. package/dist/components/ic-radio-option.js +72 -38
  469. package/dist/components/ic-radio-option.js.map +1 -1
  470. package/dist/components/ic-search-bar.js +210 -132
  471. package/dist/components/ic-search-bar.js.map +1 -1
  472. package/dist/components/ic-section-container2.js +11 -4
  473. package/dist/components/ic-section-container2.js.map +1 -1
  474. package/dist/components/ic-select.js +421 -199
  475. package/dist/components/ic-select.js.map +1 -1
  476. package/dist/components/ic-side-navigation.js +119 -79
  477. package/dist/components/ic-side-navigation.js.map +1 -1
  478. package/dist/components/ic-skeleton.js +15 -8
  479. package/dist/components/ic-skeleton.js.map +1 -1
  480. package/dist/components/ic-skip-link.d.ts +11 -0
  481. package/dist/components/ic-skip-link.js +91 -0
  482. package/dist/components/ic-skip-link.js.map +1 -0
  483. package/dist/components/ic-status-tag.js +30 -7
  484. package/dist/components/ic-status-tag.js.map +1 -1
  485. package/dist/components/ic-step.js +37 -35
  486. package/dist/components/ic-step.js.map +1 -1
  487. package/dist/components/ic-stepper.js +61 -35
  488. package/dist/components/ic-stepper.js.map +1 -1
  489. package/dist/components/ic-switch.js +65 -31
  490. package/dist/components/ic-switch.js.map +1 -1
  491. package/dist/components/ic-tab-context.js +116 -154
  492. package/dist/components/ic-tab-context.js.map +1 -1
  493. package/dist/components/ic-tab-group.js +19 -14
  494. package/dist/components/ic-tab-group.js.map +1 -1
  495. package/dist/components/ic-tab-panel.js +22 -16
  496. package/dist/components/ic-tab-panel.js.map +1 -1
  497. package/dist/components/ic-tab.js +32 -22
  498. package/dist/components/ic-tab.js.map +1 -1
  499. package/dist/components/ic-text-field.js +504 -1
  500. package/dist/components/ic-text-field.js.map +1 -1
  501. package/dist/components/ic-theme.js +59 -25
  502. package/dist/components/ic-theme.js.map +1 -1
  503. package/dist/components/ic-toast-region.js +7 -2
  504. package/dist/components/ic-toast-region.js.map +1 -1
  505. package/dist/components/ic-toast.js +29 -22
  506. package/dist/components/ic-toast.js.map +1 -1
  507. package/dist/components/ic-toggle-button-group.js +129 -36
  508. package/dist/components/ic-toggle-button-group.js.map +1 -1
  509. package/dist/components/ic-toggle-button.js +121 -29
  510. package/dist/components/ic-toggle-button.js.map +1 -1
  511. package/dist/components/ic-tooltip2.js +75 -25
  512. package/dist/components/ic-tooltip2.js.map +1 -1
  513. package/dist/components/ic-top-navigation.js +66 -35
  514. package/dist/components/ic-top-navigation.js.map +1 -1
  515. package/dist/components/ic-typography2.js +58 -27
  516. package/dist/components/ic-typography2.js.map +1 -1
  517. package/dist/core/ag-theme-icds.css +218 -0
  518. package/dist/core/core.css +1737 -64
  519. package/dist/core/core.esm.js +1 -1
  520. package/dist/core/core.esm.js.map +1 -1
  521. package/dist/core/index.esm.js.map +1 -1
  522. package/dist/core/p-005cd8a8.entry.js +2 -0
  523. package/dist/core/p-005cd8a8.entry.js.map +1 -0
  524. package/dist/core/p-0631c3ab.entry.js +2 -0
  525. package/dist/core/p-0631c3ab.entry.js.map +1 -0
  526. package/dist/core/p-0a8b3967.entry.js +2 -0
  527. package/dist/core/p-0a8b3967.entry.js.map +1 -0
  528. package/dist/core/p-0b4350df.entry.js +2 -0
  529. package/dist/core/p-0b4350df.entry.js.map +1 -0
  530. package/dist/core/p-0e618fc5.entry.js +2 -0
  531. package/dist/core/p-0e618fc5.entry.js.map +1 -0
  532. package/dist/core/p-18ecba80.entry.js +2 -0
  533. package/dist/core/p-18ecba80.entry.js.map +1 -0
  534. package/dist/core/p-1e4cdd2d.entry.js +2 -0
  535. package/dist/core/p-1e4cdd2d.entry.js.map +1 -0
  536. package/dist/core/p-23d059ff.entry.js +2 -0
  537. package/dist/core/p-23d059ff.entry.js.map +1 -0
  538. package/dist/core/{p-54238d16.entry.js → p-23ed8b99.entry.js} +2 -2
  539. package/dist/core/p-23ed8b99.entry.js.map +1 -0
  540. package/dist/core/p-281ce313.js +2 -0
  541. package/dist/core/p-281ce313.js.map +1 -0
  542. package/dist/core/p-30abe545.entry.js +2 -0
  543. package/dist/core/p-30abe545.entry.js.map +1 -0
  544. package/dist/core/p-3132270d.entry.js +2 -0
  545. package/dist/core/p-3132270d.entry.js.map +1 -0
  546. package/dist/core/p-33c86ba6.entry.js +2 -0
  547. package/dist/core/p-33c86ba6.entry.js.map +1 -0
  548. package/dist/core/p-3675c4b4.entry.js +2 -0
  549. package/dist/core/p-3675c4b4.entry.js.map +1 -0
  550. package/dist/core/p-3b185c32.js.map +1 -1
  551. package/dist/core/p-3b5d3e24.entry.js +2 -0
  552. package/dist/core/p-3b5d3e24.entry.js.map +1 -0
  553. package/dist/core/p-3eb7ef1d.entry.js +2 -0
  554. package/dist/core/p-3eb7ef1d.entry.js.map +1 -0
  555. package/dist/core/{p-a87d13b3.entry.js → p-40f2f58e.entry.js} +2 -2
  556. package/dist/core/p-40f2f58e.entry.js.map +1 -0
  557. package/dist/core/p-4245a976.entry.js +2 -0
  558. package/dist/core/p-4245a976.entry.js.map +1 -0
  559. package/dist/core/p-426ec638.js.map +1 -1
  560. package/dist/core/p-44e4e8c1.entry.js +2 -0
  561. package/dist/core/p-44e4e8c1.entry.js.map +1 -0
  562. package/dist/core/p-45432bf5.entry.js +2 -0
  563. package/dist/core/p-45432bf5.entry.js.map +1 -0
  564. package/dist/core/p-4b601e06.entry.js +2 -0
  565. package/dist/core/p-4b601e06.entry.js.map +1 -0
  566. package/dist/core/{p-bf89c86d.entry.js → p-4b6818d9.entry.js} +2 -2
  567. package/dist/core/p-4b6818d9.entry.js.map +1 -0
  568. package/dist/core/p-517d7afb.entry.js +2 -0
  569. package/dist/core/p-517d7afb.entry.js.map +1 -0
  570. package/dist/core/p-5206a978.entry.js +2 -0
  571. package/dist/core/p-5206a978.entry.js.map +1 -0
  572. package/dist/core/p-5d4b0480.entry.js +2 -0
  573. package/dist/core/p-5d4b0480.entry.js.map +1 -0
  574. package/dist/core/p-5e18b899.entry.js +2 -0
  575. package/dist/core/p-5e18b899.entry.js.map +1 -0
  576. package/dist/core/p-6337fe1f.entry.js +2 -0
  577. package/dist/core/p-6337fe1f.entry.js.map +1 -0
  578. package/dist/core/p-63fe83ad.entry.js +2 -0
  579. package/dist/core/p-63fe83ad.entry.js.map +1 -0
  580. package/dist/core/p-68a5aaff.js.map +1 -1
  581. package/dist/core/p-6de6b6b7.entry.js +2 -0
  582. package/dist/core/p-6de6b6b7.entry.js.map +1 -0
  583. package/dist/core/p-70700c7a.entry.js +2 -0
  584. package/dist/core/p-70700c7a.entry.js.map +1 -0
  585. package/dist/core/p-7a0d238b.entry.js +2 -0
  586. package/dist/core/p-7a0d238b.entry.js.map +1 -0
  587. package/dist/core/p-7afc71d0.entry.js +2 -0
  588. package/dist/core/p-7afc71d0.entry.js.map +1 -0
  589. package/dist/core/p-7c0914e7.entry.js +2 -0
  590. package/dist/core/p-7c0914e7.entry.js.map +1 -0
  591. package/dist/core/p-7dfe0284.entry.js +2 -0
  592. package/dist/core/p-7dfe0284.entry.js.map +1 -0
  593. package/dist/core/p-81a12e36.entry.js +2 -0
  594. package/dist/core/p-81a12e36.entry.js.map +1 -0
  595. package/dist/core/p-88924aef.entry.js +2 -0
  596. package/dist/core/p-88924aef.entry.js.map +1 -0
  597. package/dist/core/p-8ba129fc.entry.js +2 -0
  598. package/dist/core/p-8ba129fc.entry.js.map +1 -0
  599. package/dist/core/p-8e4e97b4.js +3 -0
  600. package/dist/core/p-8e4e97b4.js.map +1 -0
  601. package/dist/core/p-950db960.entry.js +2 -0
  602. package/dist/core/p-950db960.entry.js.map +1 -0
  603. package/dist/core/p-959a9cdf.entry.js +2 -0
  604. package/dist/core/p-959a9cdf.entry.js.map +1 -0
  605. package/dist/core/p-9ea9a4ce.entry.js +2 -0
  606. package/dist/core/p-9ea9a4ce.entry.js.map +1 -0
  607. package/dist/core/p-a9c96e3e.entry.js +2 -0
  608. package/dist/core/p-a9c96e3e.entry.js.map +1 -0
  609. package/dist/core/p-abaea607.entry.js +2 -0
  610. package/dist/core/p-abaea607.entry.js.map +1 -0
  611. package/dist/core/p-ac7db165.entry.js +2 -0
  612. package/dist/core/p-ac7db165.entry.js.map +1 -0
  613. package/dist/core/p-acebb05c.entry.js +2 -0
  614. package/dist/core/p-acebb05c.entry.js.map +1 -0
  615. package/dist/core/p-b3ac38c5.entry.js +2 -0
  616. package/dist/core/p-b3ac38c5.entry.js.map +1 -0
  617. package/dist/core/p-b3d6d5be.entry.js +2 -0
  618. package/dist/core/p-b3d6d5be.entry.js.map +1 -0
  619. package/dist/core/p-bbe5596b.entry.js +2 -0
  620. package/dist/core/p-bbe5596b.entry.js.map +1 -0
  621. package/dist/core/p-c04f36c5.entry.js +2 -0
  622. package/dist/core/p-c04f36c5.entry.js.map +1 -0
  623. package/dist/core/p-c2ca6274.entry.js +2 -0
  624. package/dist/core/p-c2ca6274.entry.js.map +1 -0
  625. package/dist/core/p-c2e091d7.js.map +1 -1
  626. package/dist/core/p-c62318a8.entry.js +2 -0
  627. package/dist/core/p-c62318a8.entry.js.map +1 -0
  628. package/dist/core/p-de43d375.entry.js +2 -0
  629. package/dist/core/p-de43d375.entry.js.map +1 -0
  630. package/dist/core/p-e1255160.js +2 -0
  631. package/dist/core/p-e1255160.js.map +1 -0
  632. package/dist/core/p-e2f893f0.entry.js +2 -0
  633. package/dist/core/p-e2f893f0.entry.js.map +1 -0
  634. package/dist/core/p-e56d0db2.entry.js +2 -0
  635. package/dist/core/p-e56d0db2.entry.js.map +1 -0
  636. package/dist/core/p-e586ae7b.entry.js +2 -0
  637. package/dist/core/p-e586ae7b.entry.js.map +1 -0
  638. package/dist/core/p-ef09b450.entry.js +2 -0
  639. package/dist/core/p-ef09b450.entry.js.map +1 -0
  640. package/dist/core/p-f074ef5b.js.map +1 -1
  641. package/dist/core/p-f34eee68.entry.js +2 -0
  642. package/dist/core/p-f34eee68.entry.js.map +1 -0
  643. package/dist/core/p-f3c72ffb.entry.js +2 -0
  644. package/dist/core/p-f3c72ffb.entry.js.map +1 -0
  645. package/dist/core/{p-a0e4d6bd.entry.js → p-f815f8c9.entry.js} +2 -2
  646. package/dist/core/p-f815f8c9.entry.js.map +1 -0
  647. package/dist/core/p-fbde763c.entry.js +2 -0
  648. package/dist/core/p-fbde763c.entry.js.map +1 -0
  649. package/dist/core/p-fc50d582.entry.js +2 -0
  650. package/dist/core/p-fc50d582.entry.js.map +1 -0
  651. package/dist/core/p-fe833509.entry.js +2 -0
  652. package/dist/core/p-fe833509.entry.js.map +1 -0
  653. package/dist/esm/app-globals-0f993ce5.js +5 -0
  654. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  655. package/dist/esm/core.js +14 -12
  656. package/dist/esm/core.js.map +1 -1
  657. package/dist/esm/{helpers-35ac5e03.js → helpers-46a2d1fd.js} +152 -71
  658. package/dist/esm/helpers-46a2d1fd.js.map +1 -0
  659. package/dist/esm/ic-accordion-group.entry.js +38 -22
  660. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  661. package/dist/esm/ic-accordion.entry.js +75 -46
  662. package/dist/esm/ic-accordion.entry.js.map +1 -1
  663. package/dist/esm/ic-alert.entry.js +93 -46
  664. package/dist/esm/ic-alert.entry.js.map +1 -1
  665. package/dist/esm/ic-back-to-top.entry.js +32 -16
  666. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  667. package/dist/esm/ic-badge.entry.js +91 -42
  668. package/dist/esm/ic-badge.entry.js.map +1 -1
  669. package/dist/esm/ic-breadcrumb-group.entry.js +114 -63
  670. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  671. package/dist/esm/ic-breadcrumb.entry.js +78 -18
  672. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  673. package/dist/esm/ic-button_3.entry.js +366 -168
  674. package/dist/esm/ic-button_3.entry.js.map +1 -1
  675. package/dist/esm/ic-card-vertical.entry.js +93 -72
  676. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  677. package/dist/esm/ic-checkbox-group.entry.js +51 -14
  678. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  679. package/dist/esm/ic-checkbox.entry.js +55 -31
  680. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  681. package/dist/esm/ic-chip.entry.js +64 -32
  682. package/dist/esm/ic-chip.entry.js.map +1 -1
  683. package/dist/esm/ic-classification-banner.entry.js +22 -6
  684. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  685. package/dist/esm/ic-data-list.entry.js +17 -7
  686. package/dist/esm/ic-data-list.entry.js.map +1 -1
  687. package/dist/esm/ic-data-row.entry.js +31 -20
  688. package/dist/esm/ic-data-row.entry.js.map +1 -1
  689. package/dist/esm/ic-dialog.entry.js +170 -114
  690. package/dist/esm/ic-dialog.entry.js.map +1 -1
  691. package/dist/esm/ic-divider.entry.js +95 -12
  692. package/dist/esm/ic-divider.entry.js.map +1 -1
  693. package/dist/esm/ic-empty-state.entry.js +21 -24
  694. package/dist/esm/ic-empty-state.entry.js.map +1 -1
  695. package/dist/esm/ic-footer-link-group.entry.js +12 -14
  696. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  697. package/dist/esm/ic-footer-link.entry.js +15 -16
  698. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  699. package/dist/esm/ic-footer.entry.js +52 -30
  700. package/dist/esm/ic-footer.entry.js.map +1 -1
  701. package/dist/esm/ic-hero.entry.js +35 -32
  702. package/dist/esm/ic-hero.entry.js.map +1 -1
  703. package/dist/esm/ic-horizontal-scroll.entry.js +40 -21
  704. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  705. package/dist/esm/ic-input-component-container_3.entry.js +587 -244
  706. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  707. package/dist/esm/ic-input-label_2.entry.js +62 -37
  708. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  709. package/dist/esm/ic-link.entry.js +43 -28
  710. package/dist/esm/ic-link.entry.js.map +1 -1
  711. package/dist/esm/ic-menu-group.entry.js +6 -7
  712. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  713. package/dist/esm/ic-menu-item.entry.js +41 -33
  714. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  715. package/dist/esm/ic-navigation-button.entry.js +32 -24
  716. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  717. package/dist/esm/ic-navigation-group.entry.js +69 -44
  718. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  719. package/dist/esm/ic-navigation-item.entry.js +122 -45
  720. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  721. package/dist/esm/ic-navigation-menu.entry.js +55 -33
  722. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  723. package/dist/esm/ic-page-header.entry.js +53 -31
  724. package/dist/esm/ic-page-header.entry.js.map +1 -1
  725. package/dist/esm/ic-pagination-item.entry.js +37 -24
  726. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  727. package/dist/esm/ic-pagination.entry.js +76 -36
  728. package/dist/esm/ic-pagination.entry.js.map +1 -1
  729. package/dist/esm/ic-popover-menu.entry.js +97 -60
  730. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  731. package/dist/esm/ic-radio-group.entry.js +103 -48
  732. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  733. package/dist/esm/ic-radio-option.entry.js +70 -39
  734. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  735. package/dist/esm/ic-search-bar.entry.js +195 -108
  736. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  737. package/dist/esm/ic-section-container.entry.js +12 -5
  738. package/dist/esm/ic-section-container.entry.js.map +1 -1
  739. package/dist/esm/ic-select.entry.js +418 -199
  740. package/dist/esm/ic-select.entry.js.map +1 -1
  741. package/dist/esm/ic-side-navigation.entry.js +119 -79
  742. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  743. package/dist/esm/ic-skeleton.entry.js +15 -8
  744. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  745. package/dist/esm/ic-skip-link.entry.js +58 -0
  746. package/dist/esm/ic-skip-link.entry.js.map +1 -0
  747. package/dist/esm/ic-status-tag.entry.js +30 -10
  748. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  749. package/dist/esm/ic-step.entry.js +37 -37
  750. package/dist/esm/ic-step.entry.js.map +1 -1
  751. package/dist/esm/ic-stepper.entry.js +60 -36
  752. package/dist/esm/ic-stepper.entry.js.map +1 -1
  753. package/dist/esm/ic-switch.entry.js +63 -31
  754. package/dist/esm/ic-switch.entry.js.map +1 -1
  755. package/dist/esm/ic-tab-context.entry.js +112 -152
  756. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  757. package/dist/esm/ic-tab-group.entry.js +18 -14
  758. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  759. package/dist/esm/ic-tab-panel.entry.js +19 -15
  760. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  761. package/dist/esm/ic-tab.entry.js +31 -22
  762. package/dist/esm/ic-tab.entry.js.map +1 -1
  763. package/dist/esm/ic-text-field.entry.js +229 -81
  764. package/dist/esm/ic-text-field.entry.js.map +1 -1
  765. package/dist/esm/ic-theme.entry.js +54 -23
  766. package/dist/esm/ic-theme.entry.js.map +1 -1
  767. package/dist/esm/ic-toast-region.entry.js +8 -3
  768. package/dist/esm/ic-toast-region.entry.js.map +1 -1
  769. package/dist/esm/ic-toast.entry.js +30 -23
  770. package/dist/esm/ic-toast.entry.js.map +1 -1
  771. package/dist/esm/ic-toggle-button-group.entry.js +117 -35
  772. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  773. package/dist/esm/ic-toggle-button.entry.js +110 -23
  774. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  775. package/dist/esm/ic-top-navigation.entry.js +65 -35
  776. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  777. package/dist/esm/ic-typography.entry.js +59 -30
  778. package/dist/esm/ic-typography.entry.js.map +1 -1
  779. package/dist/esm/index-a7a720e7.js +2580 -0
  780. package/dist/esm/index-a7a720e7.js.map +1 -0
  781. package/dist/esm/loader.js +6 -4
  782. package/dist/esm/loader.js.map +1 -1
  783. package/dist/types/components/ic-accordion/ic-accordion.d.ts +10 -8
  784. package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +9 -9
  785. package/dist/types/components/ic-alert/ic-alert.d.ts +24 -8
  786. package/dist/types/components/ic-back-to-top/ic-back-to-top.d.ts +11 -2
  787. package/dist/types/components/ic-back-to-top/ic-back-to-top.types.d.ts +1 -0
  788. package/dist/types/components/ic-badge/ic-badge.d.ts +15 -5
  789. package/dist/types/components/ic-breadcrumb/ic-breadcrumb.d.ts +19 -6
  790. package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +16 -9
  791. package/dist/types/components/ic-button/ic-button.d.ts +19 -13
  792. package/dist/types/components/ic-button/ic-button.types.d.ts +0 -1
  793. package/dist/types/components/ic-card-vertical/ic-card-vertical.d.ts +9 -5
  794. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +17 -12
  795. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +15 -8
  796. package/dist/types/components/ic-chip/ic-chip.d.ts +13 -2
  797. package/dist/types/components/ic-data-list/ic-data-list.d.ts +6 -2
  798. package/dist/types/components/ic-data-row/ic-data-row.d.ts +7 -3
  799. package/dist/types/components/ic-dialog/ic-dialog.d.ts +21 -12
  800. package/dist/types/components/ic-divider/ic-divider.d.ts +33 -3
  801. package/dist/types/components/ic-divider/ic-divider.types.d.ts +3 -0
  802. package/dist/types/components/ic-empty-state/ic-empty-state.d.ts +5 -2
  803. package/dist/types/components/ic-footer/ic-footer.d.ts +8 -7
  804. package/dist/types/components/ic-footer-link/ic-footer-link.d.ts +3 -3
  805. package/dist/types/components/ic-footer-link-group/ic-footer-link-group.d.ts +3 -2
  806. package/dist/types/components/ic-hero/ic-hero.d.ts +6 -7
  807. package/dist/types/components/ic-horizontal-scroll/ic-horizontal-scroll.d.ts +8 -2
  808. package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +8 -11
  809. package/dist/types/components/ic-input-label/ic-input-label.d.ts +10 -6
  810. package/dist/types/components/ic-input-validation/ic-input-validation.d.ts +4 -4
  811. package/dist/types/components/ic-link/ic-link.d.ts +10 -6
  812. package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +12 -8
  813. package/dist/types/components/ic-loading-indicator/ic-loading-indicator.types.d.ts +1 -1
  814. package/dist/types/components/ic-menu/ic-menu.d.ts +56 -23
  815. package/dist/types/components/ic-menu/ic-menu.types.d.ts +1 -1
  816. package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +13 -6
  817. package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +8 -4
  818. package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +25 -9
  819. package/dist/types/components/ic-navigation-group/ic-navigation-group.types.d.ts +6 -0
  820. package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +22 -11
  821. package/dist/types/components/ic-navigation-menu/ic-navigation-menu.d.ts +10 -3
  822. package/dist/types/components/ic-page-header/ic-page-header.d.ts +5 -1
  823. package/dist/types/components/ic-pagination/ic-pagination.d.ts +19 -14
  824. package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +14 -9
  825. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +13 -11
  826. package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +15 -10
  827. package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +16 -9
  828. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +26 -14
  829. package/dist/types/components/ic-search-bar/ic-search-bar.types.d.ts +1 -1
  830. package/dist/types/components/ic-select/ic-select.d.ts +53 -32
  831. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +15 -15
  832. package/dist/types/components/ic-side-navigation/ic-side-navigation.types.d.ts +2 -2
  833. package/dist/types/components/ic-skeleton/ic-skeleton.d.ts +3 -2
  834. package/dist/types/components/ic-skip-link/ic-skip-link.d.ts +38 -0
  835. package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +8 -0
  836. package/dist/types/components/ic-step/ic-step.d.ts +5 -0
  837. package/dist/types/components/ic-stepper/ic-stepper.d.ts +7 -5
  838. package/dist/types/components/ic-switch/ic-switch.d.ts +8 -7
  839. package/dist/types/components/ic-tab/ic-tab.d.ts +8 -5
  840. package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +19 -12
  841. package/dist/types/components/ic-tab-group/ic-tab-group.d.ts +5 -5
  842. package/dist/types/components/ic-tab-panel/ic-tab-panel.d.ts +9 -3
  843. package/dist/types/components/ic-text-field/ic-text-field.d.ts +59 -34
  844. package/dist/types/components/ic-theme/ic-theme.d.ts +19 -8
  845. package/dist/types/components/ic-toast/ic-toast.d.ts +3 -3
  846. package/dist/types/components/ic-toast-region/ic-toast-region.d.ts +2 -1
  847. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +17 -8
  848. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +21 -5
  849. package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +9 -1
  850. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +16 -12
  851. package/dist/types/components/ic-typography/ic-typography.d.ts +6 -2
  852. package/dist/types/components.d.ts +975 -389
  853. package/dist/types/stencil-public-runtime.d.ts +9 -10
  854. package/dist/types/utils/constants.d.ts +1 -0
  855. package/dist/types/utils/helpers.d.ts +35 -17
  856. package/dist/types/utils/types.d.ts +18 -10
  857. package/hydrate/index.d.ts +53 -12
  858. package/hydrate/index.js +32853 -19673
  859. package/hydrate/index.mjs +34474 -0
  860. package/hydrate/package.json +7 -1
  861. package/loader/cdn.js +1 -3
  862. package/loader/index.cjs.js +1 -3
  863. package/loader/index.d.ts +3 -0
  864. package/loader/index.es2017.js +1 -3
  865. package/loader/index.js +1 -3
  866. package/package.json +22 -21
  867. package/vscode-data.json +1017 -653
  868. package/dist/cjs/helpers-94b33ab0.js.map +0 -1
  869. package/dist/cjs/index-f982899d.js +0 -3047
  870. package/dist/cjs/index-f982899d.js.map +0 -1
  871. package/dist/cjs/types-dc22e301.js +0 -16
  872. package/dist/cjs/types-dc22e301.js.map +0 -1
  873. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js +0 -346
  874. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js.map +0 -1
  875. package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js +0 -129
  876. package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js.map +0 -1
  877. package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js +0 -197
  878. package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js.map +0 -1
  879. package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js +0 -131
  880. package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js.map +0 -1
  881. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +0 -264
  882. package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +0 -1
  883. package/dist/collection/components/ic-breadcrumb/test/basic/ic-breadcrumb.spec.js +0 -118
  884. package/dist/collection/components/ic-breadcrumb/test/basic/ic-breadcrumb.spec.js.map +0 -1
  885. package/dist/collection/components/ic-breadcrumb-group/test/basic/ic-breadcrumb-group.spec.js +0 -219
  886. package/dist/collection/components/ic-breadcrumb-group/test/basic/ic-breadcrumb-group.spec.js.map +0 -1
  887. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js +0 -332
  888. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js.map +0 -1
  889. package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js +0 -173
  890. package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js.map +0 -1
  891. package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js +0 -281
  892. package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js.map +0 -1
  893. package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js +0 -169
  894. package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js.map +0 -1
  895. package/dist/collection/components/ic-classification-banner/test/basic/ic-classification-banner.spec.js +0 -188
  896. package/dist/collection/components/ic-classification-banner/test/basic/ic-classification-banner.spec.js.map +0 -1
  897. package/dist/collection/components/ic-data-list/test/basic/ic-data-list.spec.js +0 -161
  898. package/dist/collection/components/ic-data-list/test/basic/ic-data-list.spec.js.map +0 -1
  899. package/dist/collection/components/ic-data-row/test/basic/ic-data-row.spec.js +0 -74
  900. package/dist/collection/components/ic-data-row/test/basic/ic-data-row.spec.js.map +0 -1
  901. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js +0 -428
  902. package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js.map +0 -1
  903. package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js +0 -24
  904. package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js.map +0 -1
  905. package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js +0 -140
  906. package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js.map +0 -1
  907. package/dist/collection/components/ic-footer-link/test/basic/ic-footer-link.spec.js +0 -46
  908. package/dist/collection/components/ic-footer-link/test/basic/ic-footer-link.spec.js.map +0 -1
  909. package/dist/collection/components/ic-footer-link-group/test/basic/ic-footer-link-group.spec.js +0 -66
  910. package/dist/collection/components/ic-footer-link-group/test/basic/ic-footer-link-group.spec.js.map +0 -1
  911. package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js +0 -91
  912. package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js.map +0 -1
  913. package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js +0 -180
  914. package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js.map +0 -1
  915. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +0 -145
  916. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +0 -1
  917. package/dist/collection/components/ic-input-container/test/basic/ic-input-container.spec.js +0 -38
  918. package/dist/collection/components/ic-input-container/test/basic/ic-input-container.spec.js.map +0 -1
  919. package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js +0 -98
  920. package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js.map +0 -1
  921. package/dist/collection/components/ic-input-validation/test/basic/ic-input-validation.spec.js +0 -89
  922. package/dist/collection/components/ic-input-validation/test/basic/ic-input-validation.spec.js.map +0 -1
  923. package/dist/collection/components/ic-link/test/basic/ic-link.spec.js +0 -217
  924. package/dist/collection/components/ic-link/test/basic/ic-link.spec.js.map +0 -1
  925. package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.spec.js +0 -148
  926. package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.spec.js.map +0 -1
  927. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +0 -760
  928. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +0 -1
  929. package/dist/collection/components/ic-menu-group/test/basic/ic-menu-group.spec.js +0 -94
  930. package/dist/collection/components/ic-menu-group/test/basic/ic-menu-group.spec.js.map +0 -1
  931. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js +0 -108
  932. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js.map +0 -1
  933. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js +0 -95
  934. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js.map +0 -1
  935. package/dist/collection/components/ic-navigation-group/test/basic/ic-navigation-group.spec.js +0 -309
  936. package/dist/collection/components/ic-navigation-group/test/basic/ic-navigation-group.spec.js.map +0 -1
  937. package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js +0 -118
  938. package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js.map +0 -1
  939. package/dist/collection/components/ic-navigation-menu/test/basic/ic-navigation-menu.spec.js +0 -176
  940. package/dist/collection/components/ic-navigation-menu/test/basic/ic-navigation-menu.spec.js.map +0 -1
  941. package/dist/collection/components/ic-page-header/test/basic/ic-page-header.spec.js +0 -291
  942. package/dist/collection/components/ic-page-header/test/basic/ic-page-header.spec.js.map +0 -1
  943. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +0 -380
  944. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +0 -1
  945. package/dist/collection/components/ic-pagination-item/test/basic/ic-pagination-item.spec.js +0 -76
  946. package/dist/collection/components/ic-pagination-item/test/basic/ic-pagination-item.spec.js.map +0 -1
  947. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.spec.js +0 -398
  948. package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.spec.js.map +0 -1
  949. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.e2e.js +0 -339
  950. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.e2e.js.map +0 -1
  951. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js +0 -380
  952. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js.map +0 -1
  953. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js +0 -1106
  954. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js.map +0 -1
  955. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js +0 -584
  956. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js.map +0 -1
  957. package/dist/collection/components/ic-section-container/test/basic/ic-section-container.spec.js +0 -69
  958. package/dist/collection/components/ic-section-container/test/basic/ic-section-container.spec.js.map +0 -1
  959. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +0 -1439
  960. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +0 -1
  961. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js +0 -503
  962. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js.map +0 -1
  963. package/dist/collection/components/ic-skeleton/test/basic/ic-skeleton.spec.js +0 -89
  964. package/dist/collection/components/ic-skeleton/test/basic/ic-skeleton.spec.js.map +0 -1
  965. package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js +0 -43
  966. package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js.map +0 -1
  967. package/dist/collection/components/ic-step/test/basic/ic-step.spec.js +0 -176
  968. package/dist/collection/components/ic-step/test/basic/ic-step.spec.js.map +0 -1
  969. package/dist/collection/components/ic-stepper/test/basic/ic-stepper.e2e.js +0 -49
  970. package/dist/collection/components/ic-stepper/test/basic/ic-stepper.e2e.js.map +0 -1
  971. package/dist/collection/components/ic-stepper/test/basic/ic-stepper.spec.js +0 -752
  972. package/dist/collection/components/ic-stepper/test/basic/ic-stepper.spec.js.map +0 -1
  973. package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js +0 -104
  974. package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js.map +0 -1
  975. package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js +0 -159
  976. package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js.map +0 -1
  977. package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.spec.js +0 -390
  978. package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.spec.js.map +0 -1
  979. package/dist/collection/components/ic-tab-panel/test/basic/ic-tab-panel.spec.js +0 -50
  980. package/dist/collection/components/ic-tab-panel/test/basic/ic-tab-panel.spec.js.map +0 -1
  981. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js +0 -284
  982. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js.map +0 -1
  983. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js +0 -341
  984. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js.map +0 -1
  985. package/dist/collection/components/ic-theme/test/basic/ic-theme.e2e.js +0 -72
  986. package/dist/collection/components/ic-theme/test/basic/ic-theme.e2e.js.map +0 -1
  987. package/dist/collection/components/ic-theme/test/basic/ic-theme.spec.js +0 -77
  988. package/dist/collection/components/ic-theme/test/basic/ic-theme.spec.js.map +0 -1
  989. package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js +0 -314
  990. package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js.map +0 -1
  991. package/dist/collection/components/ic-toast-region/test/basic/ic-toast-region.spec.js +0 -64
  992. package/dist/collection/components/ic-toast-region/test/basic/ic-toast-region.spec.js.map +0 -1
  993. package/dist/collection/components/ic-toggle-button/test/basic/ic-toggle-button.spec.js +0 -116
  994. package/dist/collection/components/ic-toggle-button/test/basic/ic-toggle-button.spec.js.map +0 -1
  995. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +0 -150
  996. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +0 -1
  997. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.e2e.js +0 -109
  998. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.e2e.js.map +0 -1
  999. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.spec.js +0 -307
  1000. package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.spec.js.map +0 -1
  1001. package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js +0 -314
  1002. package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js.map +0 -1
  1003. package/dist/collection/components/ic-typography/test/basic/ic-typography.e2e.js +0 -39
  1004. package/dist/collection/components/ic-typography/test/basic/ic-typography.e2e.js.map +0 -1
  1005. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js +0 -393
  1006. package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js.map +0 -1
  1007. package/dist/collection/testspec.setup.js +0 -63
  1008. package/dist/collection/testspec.setup.js.map +0 -1
  1009. package/dist/components/ic-text-field2.js +0 -354
  1010. package/dist/components/ic-text-field2.js.map +0 -1
  1011. package/dist/components/types.js +0 -16
  1012. package/dist/components/types.js.map +0 -1
  1013. package/dist/core/p-05d32a4f.entry.js +0 -2
  1014. package/dist/core/p-05d32a4f.entry.js.map +0 -1
  1015. package/dist/core/p-086a6d4f.entry.js +0 -2
  1016. package/dist/core/p-086a6d4f.entry.js.map +0 -1
  1017. package/dist/core/p-0a00a786.entry.js +0 -2
  1018. package/dist/core/p-0a00a786.entry.js.map +0 -1
  1019. package/dist/core/p-145fcef3.entry.js +0 -2
  1020. package/dist/core/p-145fcef3.entry.js.map +0 -1
  1021. package/dist/core/p-15367990.entry.js +0 -2
  1022. package/dist/core/p-15367990.entry.js.map +0 -1
  1023. package/dist/core/p-1737bf2c.entry.js +0 -2
  1024. package/dist/core/p-1737bf2c.entry.js.map +0 -1
  1025. package/dist/core/p-1ace2b02.entry.js +0 -2
  1026. package/dist/core/p-1ace2b02.entry.js.map +0 -1
  1027. package/dist/core/p-1e371012.entry.js +0 -2
  1028. package/dist/core/p-1e371012.entry.js.map +0 -1
  1029. package/dist/core/p-1f227289.entry.js +0 -2
  1030. package/dist/core/p-1f227289.entry.js.map +0 -1
  1031. package/dist/core/p-24275b92.entry.js +0 -2
  1032. package/dist/core/p-24275b92.entry.js.map +0 -1
  1033. package/dist/core/p-26b7b18f.js +0 -2
  1034. package/dist/core/p-26b7b18f.js.map +0 -1
  1035. package/dist/core/p-29e6c33f.entry.js +0 -2
  1036. package/dist/core/p-29e6c33f.entry.js.map +0 -1
  1037. package/dist/core/p-2a6f01ad.entry.js +0 -2
  1038. package/dist/core/p-2a6f01ad.entry.js.map +0 -1
  1039. package/dist/core/p-2f86c53b.entry.js +0 -2
  1040. package/dist/core/p-2f86c53b.entry.js.map +0 -1
  1041. package/dist/core/p-319e40c0.entry.js +0 -2
  1042. package/dist/core/p-319e40c0.entry.js.map +0 -1
  1043. package/dist/core/p-346c6920.entry.js +0 -2
  1044. package/dist/core/p-346c6920.entry.js.map +0 -1
  1045. package/dist/core/p-4b1445b3.entry.js +0 -2
  1046. package/dist/core/p-4b1445b3.entry.js.map +0 -1
  1047. package/dist/core/p-4b621c67.entry.js +0 -2
  1048. package/dist/core/p-4b621c67.entry.js.map +0 -1
  1049. package/dist/core/p-4ca2b177.entry.js +0 -2
  1050. package/dist/core/p-4ca2b177.entry.js.map +0 -1
  1051. package/dist/core/p-54238d16.entry.js.map +0 -1
  1052. package/dist/core/p-5515ad19.entry.js +0 -2
  1053. package/dist/core/p-5515ad19.entry.js.map +0 -1
  1054. package/dist/core/p-5c8081d6.entry.js +0 -2
  1055. package/dist/core/p-5c8081d6.entry.js.map +0 -1
  1056. package/dist/core/p-5f941f3a.entry.js +0 -2
  1057. package/dist/core/p-5f941f3a.entry.js.map +0 -1
  1058. package/dist/core/p-5fd293b3.entry.js +0 -2
  1059. package/dist/core/p-5fd293b3.entry.js.map +0 -1
  1060. package/dist/core/p-60721d95.entry.js +0 -2
  1061. package/dist/core/p-60721d95.entry.js.map +0 -1
  1062. package/dist/core/p-64a5a1d8.entry.js +0 -2
  1063. package/dist/core/p-64a5a1d8.entry.js.map +0 -1
  1064. package/dist/core/p-65e36461.entry.js +0 -2
  1065. package/dist/core/p-65e36461.entry.js.map +0 -1
  1066. package/dist/core/p-66363c7d.entry.js +0 -2
  1067. package/dist/core/p-66363c7d.entry.js.map +0 -1
  1068. package/dist/core/p-69728d76.entry.js +0 -2
  1069. package/dist/core/p-69728d76.entry.js.map +0 -1
  1070. package/dist/core/p-6b328c76.entry.js +0 -2
  1071. package/dist/core/p-6b328c76.entry.js.map +0 -1
  1072. package/dist/core/p-6b5ddacd.entry.js +0 -2
  1073. package/dist/core/p-6b5ddacd.entry.js.map +0 -1
  1074. package/dist/core/p-6b5e91e2.js +0 -3
  1075. package/dist/core/p-6b5e91e2.js.map +0 -1
  1076. package/dist/core/p-7b3d6577.entry.js +0 -2
  1077. package/dist/core/p-7b3d6577.entry.js.map +0 -1
  1078. package/dist/core/p-7d45828d.entry.js +0 -2
  1079. package/dist/core/p-7d45828d.entry.js.map +0 -1
  1080. package/dist/core/p-893eca54.entry.js +0 -2
  1081. package/dist/core/p-893eca54.entry.js.map +0 -1
  1082. package/dist/core/p-8ee262a4.entry.js +0 -2
  1083. package/dist/core/p-8ee262a4.entry.js.map +0 -1
  1084. package/dist/core/p-8f93d92b.entry.js +0 -2
  1085. package/dist/core/p-8f93d92b.entry.js.map +0 -1
  1086. package/dist/core/p-90bb13d2.entry.js +0 -2
  1087. package/dist/core/p-90bb13d2.entry.js.map +0 -1
  1088. package/dist/core/p-9189a82d.entry.js +0 -2
  1089. package/dist/core/p-9189a82d.entry.js.map +0 -1
  1090. package/dist/core/p-9190a84d.entry.js +0 -2
  1091. package/dist/core/p-9190a84d.entry.js.map +0 -1
  1092. package/dist/core/p-93f50a1a.entry.js +0 -2
  1093. package/dist/core/p-93f50a1a.entry.js.map +0 -1
  1094. package/dist/core/p-9474baf3.entry.js +0 -2
  1095. package/dist/core/p-9474baf3.entry.js.map +0 -1
  1096. package/dist/core/p-9857f6b0.entry.js +0 -2
  1097. package/dist/core/p-9857f6b0.entry.js.map +0 -1
  1098. package/dist/core/p-a0e4d6bd.entry.js.map +0 -1
  1099. package/dist/core/p-a1b9a808.entry.js +0 -2
  1100. package/dist/core/p-a1b9a808.entry.js.map +0 -1
  1101. package/dist/core/p-a79bec03.entry.js +0 -2
  1102. package/dist/core/p-a79bec03.entry.js.map +0 -1
  1103. package/dist/core/p-a84a4675.entry.js +0 -2
  1104. package/dist/core/p-a84a4675.entry.js.map +0 -1
  1105. package/dist/core/p-a87d13b3.entry.js.map +0 -1
  1106. package/dist/core/p-a928c7b3.entry.js +0 -2
  1107. package/dist/core/p-a928c7b3.entry.js.map +0 -1
  1108. package/dist/core/p-bf89c86d.entry.js.map +0 -1
  1109. package/dist/core/p-d0524c73.js +0 -2
  1110. package/dist/core/p-d0524c73.js.map +0 -1
  1111. package/dist/core/p-d24410ca.entry.js +0 -2
  1112. package/dist/core/p-d24410ca.entry.js.map +0 -1
  1113. package/dist/core/p-d52ca420.entry.js +0 -2
  1114. package/dist/core/p-d52ca420.entry.js.map +0 -1
  1115. package/dist/core/p-d67a30ca.entry.js +0 -2
  1116. package/dist/core/p-d67a30ca.entry.js.map +0 -1
  1117. package/dist/core/p-de27c59e.entry.js +0 -2
  1118. package/dist/core/p-de27c59e.entry.js.map +0 -1
  1119. package/dist/core/p-dec339ba.entry.js +0 -2
  1120. package/dist/core/p-dec339ba.entry.js.map +0 -1
  1121. package/dist/core/p-e4335135.entry.js +0 -2
  1122. package/dist/core/p-e4335135.entry.js.map +0 -1
  1123. package/dist/core/p-e56a2a06.entry.js +0 -2
  1124. package/dist/core/p-e56a2a06.entry.js.map +0 -1
  1125. package/dist/core/p-e696dc2a.entry.js +0 -2
  1126. package/dist/core/p-e696dc2a.entry.js.map +0 -1
  1127. package/dist/core/p-f0501be1.entry.js +0 -2
  1128. package/dist/core/p-f0501be1.entry.js.map +0 -1
  1129. package/dist/core/p-f50462df.entry.js +0 -2
  1130. package/dist/core/p-f50462df.entry.js.map +0 -1
  1131. package/dist/core/p-feb80f37.entry.js +0 -2
  1132. package/dist/core/p-feb80f37.entry.js.map +0 -1
  1133. package/dist/esm/helpers-35ac5e03.js.map +0 -1
  1134. package/dist/esm/index-d1d2c456.js +0 -3016
  1135. package/dist/esm/index-d1d2c456.js.map +0 -1
  1136. package/dist/esm/polyfills/core-js.js +0 -11
  1137. package/dist/esm/polyfills/dom.js +0 -79
  1138. package/dist/esm/polyfills/es5-html-element.js +0 -1
  1139. package/dist/esm/polyfills/index.js +0 -34
  1140. package/dist/esm/polyfills/system.js +0 -6
  1141. package/dist/esm/types-6f6b41a5.js +0 -16
  1142. package/dist/esm/types-6f6b41a5.js.map +0 -1
  1143. package/dist/types/testspec.setup.d.ts +0 -15
@@ -1,3047 +0,0 @@
1
- 'use strict';
2
-
3
- function _interopNamespace(e) {
4
- if (e && e.__esModule) return e;
5
- var n = Object.create(null);
6
- if (e) {
7
- Object.keys(e).forEach(function (k) {
8
- if (k !== 'default') {
9
- var d = Object.getOwnPropertyDescriptor(e, k);
10
- Object.defineProperty(n, k, d.get ? d : {
11
- enumerable: true,
12
- get: function () {
13
- return e[k];
14
- }
15
- });
16
- }
17
- });
18
- }
19
- n['default'] = e;
20
- return Object.freeze(n);
21
- }
22
-
23
- const NAMESPACE = 'core';
24
- const BUILD = /* core */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: true, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
25
-
26
- /**
27
- * Virtual DOM patching algorithm based on Snabbdom by
28
- * Simon Friis Vindum (@paldepind)
29
- * Licensed under the MIT License
30
- * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
31
- *
32
- * Modified for Stencil's renderer and slot projection
33
- */
34
- let scopeId;
35
- let contentRef;
36
- let hostTagName;
37
- let useNativeShadowDom = false;
38
- let checkSlotFallbackVisibility = false;
39
- let checkSlotRelocate = false;
40
- let isSvgMode = false;
41
- let queuePending = false;
42
- const createTime = (fnName, tagName = '') => {
43
- {
44
- return () => {
45
- return;
46
- };
47
- }
48
- };
49
- const uniqueTime = (key, measureText) => {
50
- {
51
- return () => {
52
- return;
53
- };
54
- }
55
- };
56
- const CONTENT_REF_ID = 'r';
57
- const ORG_LOCATION_ID = 'o';
58
- const SLOT_NODE_ID = 's';
59
- const TEXT_NODE_ID = 't';
60
- const HYDRATE_ID = 's-id';
61
- const HYDRATED_STYLE_ID = 'sty-id';
62
- const HYDRATE_CHILD_ID = 'c-id';
63
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
64
- /**
65
- * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
66
- *
67
- * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
68
- * support as of Stencil v4.
69
- */
70
- const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
71
- const XLINK_NS = 'http://www.w3.org/1999/xlink';
72
- /**
73
- * Default style mode id
74
- */
75
- /**
76
- * Reusable empty obj/array
77
- * Don't add values to these!!
78
- */
79
- const EMPTY_OBJ = {};
80
- /**
81
- * Namespaces
82
- */
83
- const SVG_NS = 'http://www.w3.org/2000/svg';
84
- const HTML_NS = 'http://www.w3.org/1999/xhtml';
85
- const isDef = (v) => v != null;
86
- /**
87
- * Check whether a value is a 'complex type', defined here as an object or a
88
- * function.
89
- *
90
- * @param o the value to check
91
- * @returns whether it's a complex type or not
92
- */
93
- const isComplexType = (o) => {
94
- // https://jsperf.com/typeof-fn-object/5
95
- o = typeof o;
96
- return o === 'object' || o === 'function';
97
- };
98
- /**
99
- * Helper method for querying a `meta` tag that contains a nonce value
100
- * out of a DOM's head.
101
- *
102
- * @param doc The DOM containing the `head` to query against
103
- * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
104
- * exists or the tag has no content.
105
- */
106
- function queryNonceMetaTagContent(doc) {
107
- var _a, _b, _c;
108
- return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
109
- }
110
- /**
111
- * Production h() function based on Preact by
112
- * Jason Miller (@developit)
113
- * Licensed under the MIT License
114
- * https://github.com/developit/preact/blob/master/LICENSE
115
- *
116
- * Modified for Stencil's compiler and vdom
117
- */
118
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
119
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
120
- const h = (nodeName, vnodeData, ...children) => {
121
- let child = null;
122
- let key = null;
123
- let slotName = null;
124
- let simple = false;
125
- let lastSimple = false;
126
- const vNodeChildren = [];
127
- const walk = (c) => {
128
- for (let i = 0; i < c.length; i++) {
129
- child = c[i];
130
- if (Array.isArray(child)) {
131
- walk(child);
132
- }
133
- else if (child != null && typeof child !== 'boolean') {
134
- if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
135
- child = String(child);
136
- }
137
- if (simple && lastSimple) {
138
- // If the previous child was simple (string), we merge both
139
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
140
- }
141
- else {
142
- // Append a new vNode, if it's text, we create a text vNode
143
- vNodeChildren.push(simple ? newVNode(null, child) : child);
144
- }
145
- lastSimple = simple;
146
- }
147
- }
148
- };
149
- walk(children);
150
- if (vnodeData) {
151
- if (vnodeData.key) {
152
- key = vnodeData.key;
153
- }
154
- if (vnodeData.name) {
155
- slotName = vnodeData.name;
156
- }
157
- // normalize class / className attributes
158
- {
159
- const classData = vnodeData.className || vnodeData.class;
160
- if (classData) {
161
- vnodeData.class =
162
- typeof classData !== 'object'
163
- ? classData
164
- : Object.keys(classData)
165
- .filter((k) => classData[k])
166
- .join(' ');
167
- }
168
- }
169
- }
170
- if (typeof nodeName === 'function') {
171
- // nodeName is a functional component
172
- return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
173
- }
174
- const vnode = newVNode(nodeName, null);
175
- vnode.$attrs$ = vnodeData;
176
- if (vNodeChildren.length > 0) {
177
- vnode.$children$ = vNodeChildren;
178
- }
179
- {
180
- vnode.$key$ = key;
181
- }
182
- {
183
- vnode.$name$ = slotName;
184
- }
185
- return vnode;
186
- };
187
- /**
188
- * A utility function for creating a virtual DOM node from a tag and some
189
- * possible text content.
190
- *
191
- * @param tag the tag for this element
192
- * @param text possible text content for the node
193
- * @returns a newly-minted virtual DOM node
194
- */
195
- const newVNode = (tag, text) => {
196
- const vnode = {
197
- $flags$: 0,
198
- $tag$: tag,
199
- $text$: text,
200
- $elm$: null,
201
- $children$: null,
202
- };
203
- {
204
- vnode.$attrs$ = null;
205
- }
206
- {
207
- vnode.$key$ = null;
208
- }
209
- {
210
- vnode.$name$ = null;
211
- }
212
- return vnode;
213
- };
214
- const Host = {};
215
- /**
216
- * Check whether a given node is a Host node or not
217
- *
218
- * @param node the virtual DOM node to check
219
- * @returns whether it's a Host node or not
220
- */
221
- const isHost = (node) => node && node.$tag$ === Host;
222
- /**
223
- * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
224
- *
225
- * Note that these functions convert from {@link d.VNode} to
226
- * {@link d.ChildNode} to give functional component developers a friendly
227
- * interface.
228
- */
229
- const vdomFnUtils = {
230
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
231
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
232
- };
233
- /**
234
- * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
235
- * friendlier public interface (hence, 'convertToPublic').
236
- *
237
- * @param node the virtual DOM node to convert
238
- * @returns a converted child node
239
- */
240
- const convertToPublic = (node) => ({
241
- vattrs: node.$attrs$,
242
- vchildren: node.$children$,
243
- vkey: node.$key$,
244
- vname: node.$name$,
245
- vtag: node.$tag$,
246
- vtext: node.$text$,
247
- });
248
- /**
249
- * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
250
- * order to use the resulting object in the virtual DOM. The initial object was
251
- * likely created as part of presenting a public API, so converting it back
252
- * involved making it 'private' again (hence, `convertToPrivate`).
253
- *
254
- * @param node the child node to convert
255
- * @returns a converted virtual DOM node
256
- */
257
- const convertToPrivate = (node) => {
258
- if (typeof node.vtag === 'function') {
259
- const vnodeData = Object.assign({}, node.vattrs);
260
- if (node.vkey) {
261
- vnodeData.key = node.vkey;
262
- }
263
- if (node.vname) {
264
- vnodeData.name = node.vname;
265
- }
266
- return h(node.vtag, vnodeData, ...(node.vchildren || []));
267
- }
268
- const vnode = newVNode(node.vtag, node.vtext);
269
- vnode.$attrs$ = node.vattrs;
270
- vnode.$children$ = node.vchildren;
271
- vnode.$key$ = node.vkey;
272
- vnode.$name$ = node.vname;
273
- return vnode;
274
- };
275
- /**
276
- * Entrypoint of the client-side hydration process. Facilitates calls to hydrate the
277
- * document and all its nodes.
278
- *
279
- * This process will also reconstruct the shadow root and slot DOM nodes for components using shadow DOM.
280
- *
281
- * @param hostElm The element to hydrate.
282
- * @param tagName The element's tag name.
283
- * @param hostId The host ID assigned to the element by the server.
284
- * @param hostRef The host reference for the element.
285
- */
286
- const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
287
- const endHydrate = createTime('hydrateClient', tagName);
288
- const shadowRoot = hostElm.shadowRoot;
289
- const childRenderNodes = [];
290
- const slotNodes = [];
291
- const shadowRootNodes = shadowRoot ? [] : null;
292
- const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
293
- if (!plt.$orgLocNodes$) {
294
- initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
295
- }
296
- hostElm[HYDRATE_ID] = hostId;
297
- hostElm.removeAttribute(HYDRATE_ID);
298
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
299
- childRenderNodes.map((c) => {
300
- const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
301
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
302
- const node = c.$elm$;
303
- // Put the node back in its original location since the native Shadow DOM
304
- // can handle rendering it its correct location now
305
- if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
306
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
307
- }
308
- if (!shadowRoot) {
309
- node['s-hn'] = tagName;
310
- if (orgLocationNode) {
311
- node['s-ol'] = orgLocationNode;
312
- node['s-ol']['s-nr'] = node;
313
- }
314
- }
315
- plt.$orgLocNodes$.delete(orgLocationId);
316
- });
317
- if (shadowRoot) {
318
- shadowRootNodes.map((shadowRootNode) => {
319
- if (shadowRootNode) {
320
- shadowRoot.appendChild(shadowRootNode);
321
- }
322
- });
323
- }
324
- endHydrate();
325
- };
326
- /**
327
- * Recursively constructs the virtual node tree for a host element and its children.
328
- * The tree is constructed by parsing the annotations set on the nodes by the server.
329
- *
330
- * In addition to constructing the vNode tree, we also track information about the node's
331
- * descendants like which are slots, which should exist in the shadow root, and which
332
- * are nodes that should be rendered as children of the parent node.
333
- *
334
- * @param parentVNode The vNode representing the parent node.
335
- * @param childRenderNodes An array of all child nodes in the parent's node tree.
336
- * @param slotNodes An array of all slot nodes in the parent's node tree.
337
- * @param shadowRootNodes An array all nodes that should be rendered in the shadow root in the parent's node tree.
338
- * @param hostElm The parent element.
339
- * @param node The node to construct the vNode tree for.
340
- * @param hostId The host ID assigned to the element by the server.
341
- */
342
- const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
343
- let childNodeType;
344
- let childIdSplt;
345
- let childVNode;
346
- let i;
347
- if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
348
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
349
- if (childNodeType) {
350
- // got the node data from the element's attribute
351
- // `${hostId}.${nodeId}.${depth}.${index}`
352
- childIdSplt = childNodeType.split('.');
353
- if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {
354
- childVNode = {
355
- $flags$: 0,
356
- $hostId$: childIdSplt[0],
357
- $nodeId$: childIdSplt[1],
358
- $depth$: childIdSplt[2],
359
- $index$: childIdSplt[3],
360
- $tag$: node.tagName.toLowerCase(),
361
- $elm$: node,
362
- $attrs$: null,
363
- $children$: null,
364
- $key$: null,
365
- $name$: null,
366
- $text$: null,
367
- };
368
- childRenderNodes.push(childVNode);
369
- node.removeAttribute(HYDRATE_CHILD_ID);
370
- // this is a new child vnode
371
- // so ensure its parent vnode has the vchildren array
372
- if (!parentVNode.$children$) {
373
- parentVNode.$children$ = [];
374
- }
375
- // add our child vnode to a specific index of the vnode's children
376
- parentVNode.$children$[childVNode.$index$] = childVNode;
377
- // this is now the new parent vnode for all the next child checks
378
- parentVNode = childVNode;
379
- if (shadowRootNodes && childVNode.$depth$ === '0') {
380
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
381
- }
382
- }
383
- }
384
- // recursively drill down, end to start so we can remove nodes
385
- for (i = node.childNodes.length - 1; i >= 0; i--) {
386
- clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);
387
- }
388
- if (node.shadowRoot) {
389
- // keep drilling down through the shadow root nodes
390
- for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {
391
- clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);
392
- }
393
- }
394
- }
395
- else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
396
- // `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`
397
- childIdSplt = node.nodeValue.split('.');
398
- if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {
399
- // comment node for either the host id or a 0 host id
400
- childNodeType = childIdSplt[0];
401
- childVNode = {
402
- $flags$: 0,
403
- $hostId$: childIdSplt[1],
404
- $nodeId$: childIdSplt[2],
405
- $depth$: childIdSplt[3],
406
- $index$: childIdSplt[4],
407
- $elm$: node,
408
- $attrs$: null,
409
- $children$: null,
410
- $key$: null,
411
- $name$: null,
412
- $tag$: null,
413
- $text$: null,
414
- };
415
- if (childNodeType === TEXT_NODE_ID) {
416
- childVNode.$elm$ = node.nextSibling;
417
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {
418
- childVNode.$text$ = childVNode.$elm$.textContent;
419
- childRenderNodes.push(childVNode);
420
- // remove the text comment since it's no longer needed
421
- node.remove();
422
- if (!parentVNode.$children$) {
423
- parentVNode.$children$ = [];
424
- }
425
- parentVNode.$children$[childVNode.$index$] = childVNode;
426
- if (shadowRootNodes && childVNode.$depth$ === '0') {
427
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
428
- }
429
- }
430
- }
431
- else if (childVNode.$hostId$ === hostId) {
432
- // this comment node is specifically for this host id
433
- if (childNodeType === SLOT_NODE_ID) {
434
- // `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;
435
- childVNode.$tag$ = 'slot';
436
- if (childIdSplt[5]) {
437
- node['s-sn'] = childVNode.$name$ = childIdSplt[5];
438
- }
439
- else {
440
- node['s-sn'] = '';
441
- }
442
- node['s-sr'] = true;
443
- if (shadowRootNodes) {
444
- // browser support shadowRoot and this is a shadow dom component
445
- // create an actual slot element
446
- childVNode.$elm$ = doc.createElement(childVNode.$tag$);
447
- if (childVNode.$name$) {
448
- // add the slot name attribute
449
- childVNode.$elm$.setAttribute('name', childVNode.$name$);
450
- }
451
- // insert the new slot element before the slot comment
452
- node.parentNode.insertBefore(childVNode.$elm$, node);
453
- // remove the slot comment since it's not needed for shadow
454
- node.remove();
455
- if (childVNode.$depth$ === '0') {
456
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
457
- }
458
- }
459
- slotNodes.push(childVNode);
460
- if (!parentVNode.$children$) {
461
- parentVNode.$children$ = [];
462
- }
463
- parentVNode.$children$[childVNode.$index$] = childVNode;
464
- }
465
- else if (childNodeType === CONTENT_REF_ID) {
466
- // `${CONTENT_REF_ID}.${hostId}`;
467
- if (shadowRootNodes) {
468
- // remove the content ref comment since it's not needed for shadow
469
- node.remove();
470
- }
471
- else {
472
- hostElm['s-cr'] = node;
473
- node['s-cn'] = true;
474
- }
475
- }
476
- }
477
- }
478
- }
479
- else if (parentVNode && parentVNode.$tag$ === 'style') {
480
- const vnode = newVNode(null, node.textContent);
481
- vnode.$elm$ = node;
482
- vnode.$index$ = '0';
483
- parentVNode.$children$ = [vnode];
484
- }
485
- };
486
- /**
487
- * Recursively locate any comments representing an original location for a node in a node's
488
- * children or shadowRoot children.
489
- *
490
- * @param node The node to search.
491
- * @param orgLocNodes A map of the original location annotation and the current node being searched.
492
- */
493
- const initializeDocumentHydrate = (node, orgLocNodes) => {
494
- if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
495
- let i = 0;
496
- for (; i < node.childNodes.length; i++) {
497
- initializeDocumentHydrate(node.childNodes[i], orgLocNodes);
498
- }
499
- if (node.shadowRoot) {
500
- for (i = 0; i < node.shadowRoot.childNodes.length; i++) {
501
- initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);
502
- }
503
- }
504
- }
505
- else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
506
- const childIdSplt = node.nodeValue.split('.');
507
- if (childIdSplt[0] === ORG_LOCATION_ID) {
508
- orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);
509
- node.nodeValue = '';
510
- // useful to know if the original location is
511
- // the root light-dom of a shadow dom component
512
- node['s-en'] = childIdSplt[3];
513
- }
514
- }
515
- };
516
- /**
517
- * Parse a new property value for a given property type.
518
- *
519
- * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
520
- * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
521
- * 1. `any`, the type given to `propValue` in the function signature
522
- * 2. the type stored from `propType`.
523
- *
524
- * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
525
- *
526
- * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
527
- * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
528
- * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
529
- * ```tsx
530
- * <my-cmp prop-val={0}></my-cmp>
531
- * ```
532
- *
533
- * HTML prop values on the other hand, will always a string
534
- *
535
- * @param propValue the new value to coerce to some type
536
- * @param propType the type of the prop, expressed as a binary number
537
- * @returns the parsed/coerced value
538
- */
539
- const parsePropertyValue = (propValue, propType) => {
540
- // ensure this value is of the correct prop type
541
- if (propValue != null && !isComplexType(propValue)) {
542
- if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
543
- // per the HTML spec, any string value means it is a boolean true value
544
- // but we'll cheat here and say that the string "false" is the boolean false
545
- return propValue === 'false' ? false : propValue === '' || !!propValue;
546
- }
547
- if (propType & 2 /* MEMBER_FLAGS.Number */) {
548
- // force it to be a number
549
- return parseFloat(propValue);
550
- }
551
- if (propType & 1 /* MEMBER_FLAGS.String */) {
552
- // could have been passed as a number or boolean
553
- // but we still want it as a string
554
- return String(propValue);
555
- }
556
- // redundant return here for better minification
557
- return propValue;
558
- }
559
- // not sure exactly what type we want
560
- // so no need to change to a different type
561
- return propValue;
562
- };
563
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
564
- const createEvent = (ref, name, flags) => {
565
- const elm = getElement(ref);
566
- return {
567
- emit: (detail) => {
568
- return emitEvent(elm, name, {
569
- bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
570
- composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
571
- cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
572
- detail,
573
- });
574
- },
575
- };
576
- };
577
- /**
578
- * Helper function to create & dispatch a custom Event on a provided target
579
- * @param elm the target of the Event
580
- * @param name the name to give the custom Event
581
- * @param opts options for configuring a custom Event
582
- * @returns the custom Event
583
- */
584
- const emitEvent = (elm, name, opts) => {
585
- const ev = plt.ce(name, opts);
586
- elm.dispatchEvent(ev);
587
- return ev;
588
- };
589
- const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
590
- const registerStyle = (scopeId, cssText, allowCS) => {
591
- let style = styles.get(scopeId);
592
- if (supportsConstructableStylesheets && allowCS) {
593
- style = (style || new CSSStyleSheet());
594
- if (typeof style === 'string') {
595
- style = cssText;
596
- }
597
- else {
598
- style.replaceSync(cssText);
599
- }
600
- }
601
- else {
602
- style = cssText;
603
- }
604
- styles.set(scopeId, style);
605
- };
606
- const addStyle = (styleContainerNode, cmpMeta, mode) => {
607
- var _a;
608
- const scopeId = getScopeId(cmpMeta);
609
- const style = styles.get(scopeId);
610
- // if an element is NOT connected then getRootNode() will return the wrong root node
611
- // so the fallback is to always use the document for the root node in those cases
612
- styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
613
- if (style) {
614
- if (typeof style === 'string') {
615
- styleContainerNode = styleContainerNode.head || styleContainerNode;
616
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
617
- let styleElm;
618
- if (!appliedStyles) {
619
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
620
- }
621
- if (!appliedStyles.has(scopeId)) {
622
- if (styleContainerNode.host &&
623
- (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
624
- // This is only happening on native shadow-dom, do not needs CSS var shim
625
- styleElm.innerHTML = style;
626
- }
627
- else {
628
- styleElm = doc.createElement('style');
629
- styleElm.innerHTML = style;
630
- // Apply CSP nonce to the style tag if it exists
631
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
632
- if (nonce != null) {
633
- styleElm.setAttribute('nonce', nonce);
634
- }
635
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
636
- }
637
- // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
638
- if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
639
- styleElm.innerHTML += SLOT_FB_CSS;
640
- }
641
- if (appliedStyles) {
642
- appliedStyles.add(scopeId);
643
- }
644
- }
645
- }
646
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
647
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
648
- }
649
- }
650
- return scopeId;
651
- };
652
- const attachStyles = (hostRef) => {
653
- const cmpMeta = hostRef.$cmpMeta$;
654
- const elm = hostRef.$hostElement$;
655
- const flags = cmpMeta.$flags$;
656
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
657
- const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
658
- if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
659
- // only required when we're NOT using native shadow dom (slot)
660
- // or this browser doesn't support native shadow dom
661
- // and this host element was NOT created with SSR
662
- // let's pick out the inner content for slot projection
663
- // create a node to represent where the original
664
- // content was first placed, which is useful later on
665
- // DOM WRITE!!
666
- elm['s-sc'] = scopeId;
667
- elm.classList.add(scopeId + '-h');
668
- if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
669
- elm.classList.add(scopeId + '-s');
670
- }
671
- }
672
- endAttachStyles();
673
- };
674
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
675
- const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
676
- /**
677
- * Production setAccessor() function based on Preact by
678
- * Jason Miller (@developit)
679
- * Licensed under the MIT License
680
- * https://github.com/developit/preact/blob/master/LICENSE
681
- *
682
- * Modified for Stencil's compiler and vdom
683
- */
684
- /**
685
- * When running a VDom render set properties present on a VDom node onto the
686
- * corresponding HTML element.
687
- *
688
- * Note that this function has special functionality for the `class`,
689
- * `style`, `key`, and `ref` attributes, as well as event handlers (like
690
- * `onClick`, etc). All others are just passed through as-is.
691
- *
692
- * @param elm the HTMLElement onto which attributes should be set
693
- * @param memberName the name of the attribute to set
694
- * @param oldValue the old value for the attribute
695
- * @param newValue the new value for the attribute
696
- * @param isSvg whether we're in an svg context or not
697
- * @param flags bitflags for Vdom variables
698
- */
699
- const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
700
- if (oldValue !== newValue) {
701
- let isProp = isMemberInElement(elm, memberName);
702
- let ln = memberName.toLowerCase();
703
- if (memberName === 'class') {
704
- const classList = elm.classList;
705
- const oldClasses = parseClassList(oldValue);
706
- const newClasses = parseClassList(newValue);
707
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
708
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
709
- }
710
- else if (memberName === 'style') {
711
- // update style attribute, css properties and values
712
- {
713
- for (const prop in oldValue) {
714
- if (!newValue || newValue[prop] == null) {
715
- if (prop.includes('-')) {
716
- elm.style.removeProperty(prop);
717
- }
718
- else {
719
- elm.style[prop] = '';
720
- }
721
- }
722
- }
723
- }
724
- for (const prop in newValue) {
725
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
726
- if (prop.includes('-')) {
727
- elm.style.setProperty(prop, newValue[prop]);
728
- }
729
- else {
730
- elm.style[prop] = newValue[prop];
731
- }
732
- }
733
- }
734
- }
735
- else if (memberName === 'key')
736
- ;
737
- else if (memberName === 'ref') {
738
- // minifier will clean this up
739
- if (newValue) {
740
- newValue(elm);
741
- }
742
- }
743
- else if ((!isProp ) &&
744
- memberName[0] === 'o' &&
745
- memberName[1] === 'n') {
746
- // Event Handlers
747
- // so if the member name starts with "on" and the 3rd characters is
748
- // a capital letter, and it's not already a member on the element,
749
- // then we're assuming it's an event listener
750
- if (memberName[2] === '-') {
751
- // on- prefixed events
752
- // allows to be explicit about the dom event to listen without any magic
753
- // under the hood:
754
- // <my-cmp on-click> // listens for "click"
755
- // <my-cmp on-Click> // listens for "Click"
756
- // <my-cmp on-ionChange> // listens for "ionChange"
757
- // <my-cmp on-EVENTS> // listens for "EVENTS"
758
- memberName = memberName.slice(3);
759
- }
760
- else if (isMemberInElement(win, ln)) {
761
- // standard event
762
- // the JSX attribute could have been "onMouseOver" and the
763
- // member name "onmouseover" is on the window's prototype
764
- // so let's add the listener "mouseover", which is all lowercased
765
- memberName = ln.slice(2);
766
- }
767
- else {
768
- // custom event
769
- // the JSX attribute could have been "onMyCustomEvent"
770
- // so let's trim off the "on" prefix and lowercase the first character
771
- // and add the listener "myCustomEvent"
772
- // except for the first character, we keep the event name case
773
- memberName = ln[2] + memberName.slice(3);
774
- }
775
- if (oldValue || newValue) {
776
- // Need to account for "capture" events.
777
- // If the event name ends with "Capture", we'll update the name to remove
778
- // the "Capture" suffix and make sure the event listener is setup to handle the capture event.
779
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
780
- // Make sure we only replace the last instance of "Capture"
781
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');
782
- if (oldValue) {
783
- plt.rel(elm, memberName, oldValue, capture);
784
- }
785
- if (newValue) {
786
- plt.ael(elm, memberName, newValue, capture);
787
- }
788
- }
789
- }
790
- else {
791
- // Set property if it exists and it's not a SVG
792
- const isComplex = isComplexType(newValue);
793
- if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
794
- try {
795
- if (!elm.tagName.includes('-')) {
796
- const n = newValue == null ? '' : newValue;
797
- // Workaround for Safari, moving the <input> caret when re-assigning the same valued
798
- if (memberName === 'list') {
799
- isProp = false;
800
- }
801
- else if (oldValue == null || elm[memberName] != n) {
802
- elm[memberName] = n;
803
- }
804
- }
805
- else {
806
- elm[memberName] = newValue;
807
- }
808
- }
809
- catch (e) {
810
- /**
811
- * in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
812
- */
813
- }
814
- }
815
- /**
816
- * Need to manually update attribute if:
817
- * - memberName is not an attribute
818
- * - if we are rendering the host element in order to reflect attribute
819
- * - if it's a SVG, since properties might not work in <svg>
820
- * - if the newValue is null/undefined or 'false'.
821
- */
822
- let xlink = false;
823
- {
824
- if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
825
- memberName = ln;
826
- xlink = true;
827
- }
828
- }
829
- if (newValue == null || newValue === false) {
830
- if (newValue !== false || elm.getAttribute(memberName) === '') {
831
- if (xlink) {
832
- elm.removeAttributeNS(XLINK_NS, memberName);
833
- }
834
- else {
835
- elm.removeAttribute(memberName);
836
- }
837
- }
838
- }
839
- else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
840
- newValue = newValue === true ? '' : newValue;
841
- if (xlink) {
842
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
843
- }
844
- else {
845
- elm.setAttribute(memberName, newValue);
846
- }
847
- }
848
- }
849
- }
850
- };
851
- const parseClassListRegex = /\s/;
852
- /**
853
- * Parsed a string of classnames into an array
854
- * @param value className string, e.g. "foo bar baz"
855
- * @returns list of classes, e.g. ["foo", "bar", "baz"]
856
- */
857
- const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
858
- const CAPTURE_EVENT_SUFFIX = 'Capture';
859
- const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
860
- const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
861
- // if the element passed in is a shadow root, which is a document fragment
862
- // then we want to be adding attrs/props to the shadow root's "host" element
863
- // if it's not a shadow root, then we add attrs/props to the same element
864
- const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
865
- ? newVnode.$elm$.host
866
- : newVnode.$elm$;
867
- const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
868
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
869
- {
870
- // remove attributes no longer present on the vnode by setting them to undefined
871
- for (memberName in oldVnodeAttrs) {
872
- if (!(memberName in newVnodeAttrs)) {
873
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
874
- }
875
- }
876
- }
877
- // add new & update changed attributes
878
- for (memberName in newVnodeAttrs) {
879
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
880
- }
881
- };
882
- /**
883
- * Create a DOM Node corresponding to one of the children of a given VNode.
884
- *
885
- * @param oldParentVNode the parent VNode from the previous render
886
- * @param newParentVNode the parent VNode from the current render
887
- * @param childIndex the index of the VNode, in the _new_ parent node's
888
- * children, for which we will create a new DOM node
889
- * @param parentElm the parent DOM node which our new node will be a child of
890
- * @returns the newly created node
891
- */
892
- const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
893
- // tslint:disable-next-line: prefer-const
894
- const newVNode = newParentVNode.$children$[childIndex];
895
- let i = 0;
896
- let elm;
897
- let childNode;
898
- let oldVNode;
899
- if (!useNativeShadowDom) {
900
- // remember for later we need to check to relocate nodes
901
- checkSlotRelocate = true;
902
- if (newVNode.$tag$ === 'slot') {
903
- if (scopeId) {
904
- // scoped css needs to add its scoped id to the parent element
905
- parentElm.classList.add(scopeId + '-s');
906
- }
907
- newVNode.$flags$ |= newVNode.$children$
908
- ? // slot element has fallback content
909
- 2 /* VNODE_FLAGS.isSlotFallback */
910
- : // slot element does not have fallback content
911
- 1 /* VNODE_FLAGS.isSlotReference */;
912
- }
913
- }
914
- if (newVNode.$text$ !== null) {
915
- // create text node
916
- elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
917
- }
918
- else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
919
- // create a slot reference node
920
- elm = newVNode.$elm$ =
921
- doc.createTextNode('');
922
- }
923
- else {
924
- if (!isSvgMode) {
925
- isSvgMode = newVNode.$tag$ === 'svg';
926
- }
927
- // create element
928
- elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
929
- ? 'slot-fb'
930
- : newVNode.$tag$)
931
- );
932
- if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
933
- isSvgMode = false;
934
- }
935
- // add css classes, attrs, props, listeners, etc.
936
- {
937
- updateElement(null, newVNode, isSvgMode);
938
- }
939
- if (isDef(scopeId) && elm['s-si'] !== scopeId) {
940
- // if there is a scopeId and this is the initial render
941
- // then let's add the scopeId as a css class
942
- elm.classList.add((elm['s-si'] = scopeId));
943
- }
944
- if (newVNode.$children$) {
945
- for (i = 0; i < newVNode.$children$.length; ++i) {
946
- // create the node
947
- childNode = createElm(oldParentVNode, newVNode, i, elm);
948
- // return node could have been null
949
- if (childNode) {
950
- // append our new node
951
- elm.appendChild(childNode);
952
- }
953
- }
954
- }
955
- {
956
- if (newVNode.$tag$ === 'svg') {
957
- // Only reset the SVG context when we're exiting <svg> element
958
- isSvgMode = false;
959
- }
960
- else if (elm.tagName === 'foreignObject') {
961
- // Reenter SVG context when we're exiting <foreignObject> element
962
- isSvgMode = true;
963
- }
964
- }
965
- }
966
- // This needs to always happen so we can hide nodes that are projected
967
- // to another component but don't end up in a slot
968
- elm['s-hn'] = hostTagName;
969
- {
970
- if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
971
- // remember the content reference comment
972
- elm['s-sr'] = true;
973
- // remember the content reference comment
974
- elm['s-cr'] = contentRef;
975
- // remember the slot name, or empty string for default slot
976
- elm['s-sn'] = newVNode.$name$ || '';
977
- // check if we've got an old vnode for this slot
978
- oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
979
- if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
980
- {
981
- // we've got an old slot vnode and the wrapper is being replaced
982
- // so let's move the old slot content back to its original location
983
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
984
- }
985
- }
986
- }
987
- }
988
- return elm;
989
- };
990
- const putBackInOriginalLocation = (parentElm, recursive) => {
991
- plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
992
- const oldSlotChildNodes = parentElm.childNodes;
993
- for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
994
- const childNode = oldSlotChildNodes[i];
995
- if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
996
- // and relocate it back to it's original location
997
- parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
998
- // remove the old original location comment entirely
999
- // later on the patch function will know what to do
1000
- // and move this to the correct spot if need be
1001
- childNode['s-ol'].remove();
1002
- childNode['s-ol'] = undefined;
1003
- // Reset so we can correctly move the node around again.
1004
- childNode['s-sh'] = undefined;
1005
- checkSlotRelocate = true;
1006
- }
1007
- if (recursive) {
1008
- putBackInOriginalLocation(childNode, recursive);
1009
- }
1010
- }
1011
- plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1012
- };
1013
- /**
1014
- * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
1015
- * add them to the DOM in the appropriate place.
1016
- *
1017
- * @param parentElm the DOM node which should be used as a parent for the new
1018
- * DOM nodes
1019
- * @param before a child of the `parentElm` which the new children should be
1020
- * inserted before (optional)
1021
- * @param parentVNode the parent virtual DOM node
1022
- * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
1023
- * @param startIdx the index in the child virtual DOM nodes at which to start
1024
- * creating DOM nodes (inclusive)
1025
- * @param endIdx the index in the child virtual DOM nodes at which to stop
1026
- * creating DOM nodes (inclusive)
1027
- */
1028
- const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
1029
- let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
1030
- let childNode;
1031
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
1032
- containerElm = containerElm.shadowRoot;
1033
- }
1034
- for (; startIdx <= endIdx; ++startIdx) {
1035
- if (vnodes[startIdx]) {
1036
- childNode = createElm(null, parentVNode, startIdx, parentElm);
1037
- if (childNode) {
1038
- vnodes[startIdx].$elm$ = childNode;
1039
- containerElm.insertBefore(childNode, referenceNode(before) );
1040
- }
1041
- }
1042
- }
1043
- };
1044
- /**
1045
- * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
1046
- * This can be used to, for instance, clean up after a list of children which
1047
- * should no longer be shown.
1048
- *
1049
- * This function also handles some of Stencil's slot relocation logic.
1050
- *
1051
- * @param vnodes a list of virtual DOM nodes to remove
1052
- * @param startIdx the index at which to start removing nodes (inclusive)
1053
- * @param endIdx the index at which to stop removing nodes (inclusive)
1054
- */
1055
- const removeVnodes = (vnodes, startIdx, endIdx) => {
1056
- for (let index = startIdx; index <= endIdx; ++index) {
1057
- const vnode = vnodes[index];
1058
- if (vnode) {
1059
- const elm = vnode.$elm$;
1060
- nullifyVNodeRefs(vnode);
1061
- if (elm) {
1062
- {
1063
- // we're removing this element
1064
- // so it's possible we need to show slot fallback content now
1065
- checkSlotFallbackVisibility = true;
1066
- if (elm['s-ol']) {
1067
- // remove the original location comment
1068
- elm['s-ol'].remove();
1069
- }
1070
- else {
1071
- // it's possible that child nodes of the node
1072
- // that's being removed are slot nodes
1073
- putBackInOriginalLocation(elm, true);
1074
- }
1075
- }
1076
- // remove the vnode's element from the dom
1077
- elm.remove();
1078
- }
1079
- }
1080
- }
1081
- };
1082
- /**
1083
- * Reconcile the children of a new VNode with the children of an old VNode by
1084
- * traversing the two collections of children, identifying nodes that are
1085
- * conserved or changed, calling out to `patch` to make any necessary
1086
- * updates to the DOM, and rearranging DOM nodes as needed.
1087
- *
1088
- * The algorithm for reconciling children works by analyzing two 'windows' onto
1089
- * the two arrays of children (`oldCh` and `newCh`). We keep track of the
1090
- * 'windows' by storing start and end indices and references to the
1091
- * corresponding array entries. Initially the two 'windows' are basically equal
1092
- * to the entire array, but we progressively narrow the windows until there are
1093
- * no children left to update by doing the following:
1094
- *
1095
- * 1. Skip any `null` entries at the beginning or end of the two arrays, so
1096
- * that if we have an initial array like the following we'll end up dealing
1097
- * only with a window bounded by the highlighted elements:
1098
- *
1099
- * [null, null, VNode1 , ... , VNode2, null, null]
1100
- * ^^^^^^ ^^^^^^
1101
- *
1102
- * 2. Check to see if the elements at the head and tail positions are equal
1103
- * across the windows. This will basically detect elements which haven't
1104
- * been added, removed, or changed position, i.e. if you had the following
1105
- * VNode elements (represented as HTML):
1106
- *
1107
- * oldVNode: `<div><p><span>HEY</span></p></div>`
1108
- * newVNode: `<div><p><span>THERE</span></p></div>`
1109
- *
1110
- * Then when comparing the children of the `<div>` tag we check the equality
1111
- * of the VNodes corresponding to the `<p>` tags and, since they are the
1112
- * same tag in the same position, we'd be able to avoid completely
1113
- * re-rendering the subtree under them with a new DOM element and would just
1114
- * call out to `patch` to handle reconciling their children and so on.
1115
- *
1116
- * 3. Check, for both windows, to see if the element at the beginning of the
1117
- * window corresponds to the element at the end of the other window. This is
1118
- * a heuristic which will let us identify _some_ situations in which
1119
- * elements have changed position, for instance it _should_ detect that the
1120
- * children nodes themselves have not changed but merely moved in the
1121
- * following example:
1122
- *
1123
- * oldVNode: `<div><element-one /><element-two /></div>`
1124
- * newVNode: `<div><element-two /><element-one /></div>`
1125
- *
1126
- * If we find cases like this then we also need to move the concrete DOM
1127
- * elements corresponding to the moved children to write the re-order to the
1128
- * DOM.
1129
- *
1130
- * 4. Finally, if VNodes have the `key` attribute set on them we check for any
1131
- * nodes in the old children which have the same key as the first element in
1132
- * our window on the new children. If we find such a node we handle calling
1133
- * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
1134
- * what we find.
1135
- *
1136
- * Finally, once we've narrowed our 'windows' to the point that either of them
1137
- * collapse (i.e. they have length 0) we then handle any remaining VNode
1138
- * insertion or deletion that needs to happen to get a DOM state that correctly
1139
- * reflects the new child VNodes. If, for instance, after our window on the old
1140
- * children has collapsed we still have more nodes on the new children that
1141
- * we haven't dealt with yet then we need to add them, or if the new children
1142
- * collapse but we still have unhandled _old_ children then we need to make
1143
- * sure the corresponding DOM nodes are removed.
1144
- *
1145
- * @param parentElm the node into which the parent VNode is rendered
1146
- * @param oldCh the old children of the parent node
1147
- * @param newVNode the new VNode which will replace the parent
1148
- * @param newCh the new children of the parent node
1149
- * @param isInitialRender whether or not this is the first render of the vdom
1150
- */
1151
- const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
1152
- let oldStartIdx = 0;
1153
- let newStartIdx = 0;
1154
- let idxInOld = 0;
1155
- let i = 0;
1156
- let oldEndIdx = oldCh.length - 1;
1157
- let oldStartVnode = oldCh[0];
1158
- let oldEndVnode = oldCh[oldEndIdx];
1159
- let newEndIdx = newCh.length - 1;
1160
- let newStartVnode = newCh[0];
1161
- let newEndVnode = newCh[newEndIdx];
1162
- let node;
1163
- let elmToMove;
1164
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
1165
- if (oldStartVnode == null) {
1166
- // VNode might have been moved left
1167
- oldStartVnode = oldCh[++oldStartIdx];
1168
- }
1169
- else if (oldEndVnode == null) {
1170
- oldEndVnode = oldCh[--oldEndIdx];
1171
- }
1172
- else if (newStartVnode == null) {
1173
- newStartVnode = newCh[++newStartIdx];
1174
- }
1175
- else if (newEndVnode == null) {
1176
- newEndVnode = newCh[--newEndIdx];
1177
- }
1178
- else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
1179
- // if the start nodes are the same then we should patch the new VNode
1180
- // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
1181
- // indices to reflect that. We don't need to move any DOM Nodes around
1182
- // since things are matched up in order.
1183
- patch(oldStartVnode, newStartVnode, isInitialRender);
1184
- oldStartVnode = oldCh[++oldStartIdx];
1185
- newStartVnode = newCh[++newStartIdx];
1186
- }
1187
- else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
1188
- // likewise, if the end nodes are the same we patch new onto old and
1189
- // decrement our end indices, and also likewise in this case we don't
1190
- // need to move any DOM Nodes.
1191
- patch(oldEndVnode, newEndVnode, isInitialRender);
1192
- oldEndVnode = oldCh[--oldEndIdx];
1193
- newEndVnode = newCh[--newEndIdx];
1194
- }
1195
- else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
1196
- // case: "Vnode moved right"
1197
- //
1198
- // We've found that the last node in our window on the new children is
1199
- // the same VNode as the _first_ node in our window on the old children
1200
- // we're dealing with now. Visually, this is the layout of these two
1201
- // nodes:
1202
- //
1203
- // newCh: [..., newStartVnode , ... , newEndVnode , ...]
1204
- // ^^^^^^^^^^^
1205
- // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
1206
- // ^^^^^^^^^^^^^
1207
- //
1208
- // In this situation we need to patch `newEndVnode` onto `oldStartVnode`
1209
- // and move the DOM element for `oldStartVnode`.
1210
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
1211
- putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
1212
- }
1213
- patch(oldStartVnode, newEndVnode, isInitialRender);
1214
- // We need to move the element for `oldStartVnode` into a position which
1215
- // will be appropriate for `newEndVnode`. For this we can use
1216
- // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
1217
- // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
1218
- // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
1219
- //
1220
- // <old-start-node />
1221
- // <some-intervening-node />
1222
- // <old-end-node />
1223
- // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
1224
- // <next-sibling />
1225
- //
1226
- // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
1227
- // the node for `oldStartVnode` at the end of the children of
1228
- // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
1229
- // aren't any siblings, and passing `null` to `Node.insertBefore` will
1230
- // append it to the children of the parent element.
1231
- parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
1232
- oldStartVnode = oldCh[++oldStartIdx];
1233
- newEndVnode = newCh[--newEndIdx];
1234
- }
1235
- else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
1236
- // case: "Vnode moved left"
1237
- //
1238
- // We've found that the first node in our window on the new children is
1239
- // the same VNode as the _last_ node in our window on the old children.
1240
- // Visually, this is the layout of these two nodes:
1241
- //
1242
- // newCh: [..., newStartVnode , ... , newEndVnode , ...]
1243
- // ^^^^^^^^^^^^^
1244
- // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
1245
- // ^^^^^^^^^^^
1246
- //
1247
- // In this situation we need to patch `newStartVnode` onto `oldEndVnode`
1248
- // (which will handle updating any changed attributes, reconciling their
1249
- // children etc) but we also need to move the DOM node to which
1250
- // `oldEndVnode` corresponds.
1251
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
1252
- putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
1253
- }
1254
- patch(oldEndVnode, newStartVnode, isInitialRender);
1255
- // We've already checked above if `oldStartVnode` and `newStartVnode` are
1256
- // the same node, so since we're here we know that they are not. Thus we
1257
- // can move the element for `oldEndVnode` _before_ the element for
1258
- // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
1259
- // future.
1260
- parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
1261
- oldEndVnode = oldCh[--oldEndIdx];
1262
- newStartVnode = newCh[++newStartIdx];
1263
- }
1264
- else {
1265
- // Here we do some checks to match up old and new nodes based on the
1266
- // `$key$` attribute, which is set by putting a `key="my-key"` attribute
1267
- // in the JSX for a DOM element in the implementation of a Stencil
1268
- // component.
1269
- //
1270
- // First we check to see if there are any nodes in the array of old
1271
- // children which have the same key as the first node in the new
1272
- // children.
1273
- idxInOld = -1;
1274
- {
1275
- for (i = oldStartIdx; i <= oldEndIdx; ++i) {
1276
- if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
1277
- idxInOld = i;
1278
- break;
1279
- }
1280
- }
1281
- }
1282
- if (idxInOld >= 0) {
1283
- // We found a node in the old children which matches up with the first
1284
- // node in the new children! So let's deal with that
1285
- elmToMove = oldCh[idxInOld];
1286
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1287
- // the tag doesn't match so we'll need a new DOM element
1288
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
1289
- }
1290
- else {
1291
- patch(elmToMove, newStartVnode, isInitialRender);
1292
- // invalidate the matching old node so that we won't try to update it
1293
- // again later on
1294
- oldCh[idxInOld] = undefined;
1295
- node = elmToMove.$elm$;
1296
- }
1297
- newStartVnode = newCh[++newStartIdx];
1298
- }
1299
- else {
1300
- // We either didn't find an element in the old children that matches
1301
- // the key of the first new child OR the build is not using `key`
1302
- // attributes at all. In either case we need to create a new element
1303
- // for the new node.
1304
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
1305
- newStartVnode = newCh[++newStartIdx];
1306
- }
1307
- if (node) {
1308
- // if we created a new node then handle inserting it to the DOM
1309
- {
1310
- parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
1311
- }
1312
- }
1313
- }
1314
- }
1315
- if (oldStartIdx > oldEndIdx) {
1316
- // we have some more new nodes to add which don't match up with old nodes
1317
- addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
1318
- }
1319
- else if (newStartIdx > newEndIdx) {
1320
- // there are nodes in the `oldCh` array which no longer correspond to nodes
1321
- // in the new array, so lets remove them (which entails cleaning up the
1322
- // relevant DOM nodes)
1323
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
1324
- }
1325
- };
1326
- /**
1327
- * Compare two VNodes to determine if they are the same
1328
- *
1329
- * **NB**: This function is an equality _heuristic_ based on the available
1330
- * information set on the two VNodes and can be misleading under certain
1331
- * circumstances. In particular, if the two nodes do not have `key` attrs
1332
- * (available under `$key$` on VNodes) then the function falls back on merely
1333
- * checking that they have the same tag.
1334
- *
1335
- * So, in other words, if `key` attrs are not set on VNodes which may be
1336
- * changing order within a `children` array or something along those lines then
1337
- * we could obtain a false negative and then have to do needless re-rendering
1338
- * (i.e. we'd say two VNodes aren't equal when in fact they should be).
1339
- *
1340
- * @param leftVNode the first VNode to check
1341
- * @param rightVNode the second VNode to check
1342
- * @param isInitialRender whether or not this is the first render of the vdom
1343
- * @returns whether they're equal or not
1344
- */
1345
- const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1346
- // compare if two vnode to see if they're "technically" the same
1347
- // need to have the same element tag, and same key to be the same
1348
- if (leftVNode.$tag$ === rightVNode.$tag$) {
1349
- if (leftVNode.$tag$ === 'slot') {
1350
- return leftVNode.$name$ === rightVNode.$name$;
1351
- }
1352
- // this will be set if JSX tags in the build have `key` attrs set on them
1353
- // we only want to check this if we're not on the first render since on
1354
- // first render `leftVNode.$key$` will always be `null`, so we can be led
1355
- // astray and, for instance, accidentally delete a DOM node that we want to
1356
- // keep around.
1357
- if (!isInitialRender) {
1358
- return leftVNode.$key$ === rightVNode.$key$;
1359
- }
1360
- return true;
1361
- }
1362
- return false;
1363
- };
1364
- const referenceNode = (node) => {
1365
- // this node was relocated to a new location in the dom
1366
- // because of some other component's slot
1367
- // but we still have an html comment in place of where
1368
- // it's original location was according to it's original vdom
1369
- return (node && node['s-ol']) || node;
1370
- };
1371
- const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
1372
- /**
1373
- * Handle reconciling an outdated VNode with a new one which corresponds to
1374
- * it. This function handles flushing updates to the DOM and reconciling the
1375
- * children of the two nodes (if any).
1376
- *
1377
- * @param oldVNode an old VNode whose DOM element and children we want to update
1378
- * @param newVNode a new VNode representing an updated version of the old one
1379
- * @param isInitialRender whether or not this is the first render of the vdom
1380
- */
1381
- const patch = (oldVNode, newVNode, isInitialRender = false) => {
1382
- const elm = (newVNode.$elm$ = oldVNode.$elm$);
1383
- const oldChildren = oldVNode.$children$;
1384
- const newChildren = newVNode.$children$;
1385
- const tag = newVNode.$tag$;
1386
- const text = newVNode.$text$;
1387
- let defaultHolder;
1388
- if (text === null) {
1389
- {
1390
- // test if we're rendering an svg element, or still rendering nodes inside of one
1391
- // only add this to the when the compiler sees we're using an svg somewhere
1392
- isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
1393
- }
1394
- {
1395
- if (tag === 'slot')
1396
- ;
1397
- else {
1398
- // either this is the first render of an element OR it's an update
1399
- // AND we already know it's possible it could have changed
1400
- // this updates the element's css classes, attrs, props, listeners, etc.
1401
- updateElement(oldVNode, newVNode, isSvgMode);
1402
- }
1403
- }
1404
- if (oldChildren !== null && newChildren !== null) {
1405
- // looks like there's child vnodes for both the old and new vnodes
1406
- // so we need to call `updateChildren` to reconcile them
1407
- updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
1408
- }
1409
- else if (newChildren !== null) {
1410
- // no old child vnodes, but there are new child vnodes to add
1411
- if (oldVNode.$text$ !== null) {
1412
- // the old vnode was text, so be sure to clear it out
1413
- elm.textContent = '';
1414
- }
1415
- // add the new vnode children
1416
- addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
1417
- }
1418
- else if (oldChildren !== null) {
1419
- // no new child vnodes, but there are old child vnodes to remove
1420
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
1421
- }
1422
- if (isSvgMode && tag === 'svg') {
1423
- isSvgMode = false;
1424
- }
1425
- }
1426
- else if ((defaultHolder = elm['s-cr'])) {
1427
- // this element has slotted content
1428
- defaultHolder.parentNode.textContent = text;
1429
- }
1430
- else if (oldVNode.$text$ !== text) {
1431
- // update the text content for the text only vnode
1432
- // and also only if the text is different than before
1433
- elm.data = text;
1434
- }
1435
- };
1436
- /**
1437
- * Adjust the `.hidden` property as-needed on any nodes in a DOM subtree which
1438
- * are slot fallbacks nodes.
1439
- *
1440
- * A slot fallback node should be visible by default. Then, it should be
1441
- * conditionally hidden if:
1442
- *
1443
- * - it has a sibling with a `slot` property set to its slot name or if
1444
- * - it is a default fallback slot node, in which case we hide if it has any
1445
- * content
1446
- *
1447
- * @param elm the element of interest
1448
- */
1449
- const updateFallbackSlotVisibility = (elm) => {
1450
- const childNodes = elm.childNodes;
1451
- for (const childNode of childNodes) {
1452
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1453
- if (childNode['s-sr']) {
1454
- // this is a slot fallback node
1455
- // get the slot name for this slot reference node
1456
- const slotName = childNode['s-sn'];
1457
- // by default always show a fallback slot node
1458
- // then hide it if there are other slots in the light dom
1459
- childNode.hidden = false;
1460
- // we need to check all of its sibling nodes in order to see if
1461
- // `childNode` should be hidden
1462
- for (const siblingNode of childNodes) {
1463
- // Don't check the node against itself
1464
- if (siblingNode !== childNode) {
1465
- if (siblingNode['s-hn'] !== childNode['s-hn'] || slotName !== '') {
1466
- // this sibling node is from a different component OR is a named
1467
- // fallback slot node
1468
- if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
1469
- (slotName === siblingNode.getAttribute('slot') || slotName === siblingNode['s-sn'])) {
1470
- childNode.hidden = true;
1471
- break;
1472
- }
1473
- }
1474
- else {
1475
- // this is a default fallback slot node
1476
- // any element or text node (with content)
1477
- // should hide the default fallback slot node
1478
- if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1479
- (siblingNode.nodeType === 3 /* NODE_TYPE.TextNode */ && siblingNode.textContent.trim() !== '')) {
1480
- childNode.hidden = true;
1481
- break;
1482
- }
1483
- }
1484
- }
1485
- }
1486
- }
1487
- // keep drilling down
1488
- updateFallbackSlotVisibility(childNode);
1489
- }
1490
- }
1491
- };
1492
- /**
1493
- * Component-global information about nodes which are either currently being
1494
- * relocated or will be shortly.
1495
- */
1496
- const relocateNodes = [];
1497
- /**
1498
- * Mark the contents of a slot for relocation via adding references to them to
1499
- * the {@link relocateNodes} data structure. The actual work of relocating them
1500
- * will then be handled in {@link renderVdom}.
1501
- *
1502
- * @param elm a render node whose child nodes need to be relocated
1503
- */
1504
- const markSlotContentForRelocation = (elm) => {
1505
- // tslint:disable-next-line: prefer-const
1506
- let node;
1507
- let hostContentNodes;
1508
- let j;
1509
- for (const childNode of elm.childNodes) {
1510
- // we need to find child nodes which are slot references so we can then try
1511
- // to match them up with nodes that need to be relocated
1512
- if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
1513
- // first get the content reference comment node ('s-cr'), then we get
1514
- // its parent, which is where all the host content is now
1515
- hostContentNodes = node.parentNode.childNodes;
1516
- const slotName = childNode['s-sn'];
1517
- // iterate through all the nodes under the location where the host was
1518
- // originally rendered
1519
- for (j = hostContentNodes.length - 1; j >= 0; j--) {
1520
- node = hostContentNodes[j];
1521
- // check that the node is not a content reference node or a node
1522
- // reference and then check that the host name does not match that of
1523
- // childNode.
1524
- // In addition, check that the slot either has not already been relocated, or
1525
- // that its current location's host is not childNode's host. This is essentially
1526
- // a check so that we don't try to relocate (and then hide) a node that is already
1527
- // where it should be.
1528
- if (!node['s-cn'] &&
1529
- !node['s-nr'] &&
1530
- node['s-hn'] !== childNode['s-hn'] &&
1531
- (!BUILD.experimentalSlotFixes )) {
1532
- // if `node` is located in the slot that `childNode` refers to (via the
1533
- // `'s-sn'` property) then we need to relocate it from it's current spot
1534
- // (under the host element parent) to the right slot location
1535
- if (isNodeLocatedInSlot(node, slotName)) {
1536
- // it's possible we've already decided to relocate this node
1537
- let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1538
- // made some changes to slots
1539
- // let's make sure we also double check
1540
- // fallbacks are correctly hidden or shown
1541
- checkSlotFallbackVisibility = true;
1542
- // ensure that the slot-name attr is correct
1543
- node['s-sn'] = node['s-sn'] || slotName;
1544
- if (relocateNodeData) {
1545
- relocateNodeData.$nodeToRelocate$['s-sh'] = childNode['s-hn'];
1546
- // we marked this node for relocation previously but didn't find
1547
- // out the slot reference node to which it needs to be relocated
1548
- // so write it down now!
1549
- relocateNodeData.$slotRefNode$ = childNode;
1550
- }
1551
- else {
1552
- node['s-sh'] = childNode['s-hn'];
1553
- // add to our list of nodes to relocate
1554
- relocateNodes.push({
1555
- $slotRefNode$: childNode,
1556
- $nodeToRelocate$: node,
1557
- });
1558
- }
1559
- if (node['s-sr']) {
1560
- relocateNodes.map((relocateNode) => {
1561
- if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
1562
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1563
- if (relocateNodeData && !relocateNode.$slotRefNode$) {
1564
- relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
1565
- }
1566
- }
1567
- });
1568
- }
1569
- }
1570
- else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1571
- // the node is not found within the slot (`childNode`) that we're
1572
- // currently looking at, so we stick it into `relocateNodes` to
1573
- // handle later. If we never find a home for this element then
1574
- // we'll need to hide it
1575
- relocateNodes.push({
1576
- $nodeToRelocate$: node,
1577
- });
1578
- }
1579
- }
1580
- }
1581
- }
1582
- // if we're dealing with any type of element (capable of itself being a
1583
- // slot reference or containing one) then we recur
1584
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1585
- markSlotContentForRelocation(childNode);
1586
- }
1587
- }
1588
- };
1589
- /**
1590
- * Check whether a node is located in a given named slot.
1591
- *
1592
- * @param nodeToRelocate the node of interest
1593
- * @param slotName the slot name to check
1594
- * @returns whether the node is located in the slot or not
1595
- */
1596
- const isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1597
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1598
- if (nodeToRelocate.getAttribute('slot') === null && slotName === '') {
1599
- // if the node doesn't have a slot attribute, and the slot we're checking
1600
- // is not a named slot, then we assume the node should be within the slot
1601
- return true;
1602
- }
1603
- if (nodeToRelocate.getAttribute('slot') === slotName) {
1604
- return true;
1605
- }
1606
- return false;
1607
- }
1608
- if (nodeToRelocate['s-sn'] === slotName) {
1609
- return true;
1610
- }
1611
- return slotName === '';
1612
- };
1613
- /**
1614
- * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
1615
- * them with `null`. This signals that the DOM element corresponding to the VDom
1616
- * node has been removed from the DOM.
1617
- *
1618
- * @param vNode a virtual DOM node
1619
- */
1620
- const nullifyVNodeRefs = (vNode) => {
1621
- {
1622
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1623
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1624
- }
1625
- };
1626
- /**
1627
- * The main entry point for Stencil's virtual DOM-based rendering engine
1628
- *
1629
- * Given a {@link d.HostRef} container and some virtual DOM nodes, this
1630
- * function will handle creating a virtual DOM tree with a single root, patching
1631
- * the current virtual DOM tree onto an old one (if any), dealing with slot
1632
- * relocation, and reflecting attributes.
1633
- *
1634
- * @param hostRef data needed to root and render the virtual DOM tree, such as
1635
- * the DOM node into which it should be rendered.
1636
- * @param renderFnResults the virtual DOM nodes to be rendered
1637
- * @param isInitialLoad whether or not this is the first call after page load
1638
- */
1639
- const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1640
- var _a, _b, _c, _d;
1641
- const hostElm = hostRef.$hostElement$;
1642
- const cmpMeta = hostRef.$cmpMeta$;
1643
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1644
- // if `renderFnResults` is a Host node then we can use it directly. If not,
1645
- // we need to call `h` again to wrap the children of our component in a
1646
- // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
1647
- // implicitly that the top-level vdom node is 1) an only child and 2)
1648
- // contains attrs that need to be set on the host element.
1649
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1650
- hostTagName = hostElm.tagName;
1651
- if (cmpMeta.$attrsToReflect$) {
1652
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1653
- cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1654
- }
1655
- // On the first render and *only* on the first render we want to check for
1656
- // any attributes set on the host element which are also set on the vdom
1657
- // node. If we find them, we override the value on the VDom node attrs with
1658
- // the value from the host element, which allows developers building apps
1659
- // with Stencil components to override e.g. the `role` attribute on a
1660
- // component even if it's already set on the `Host`.
1661
- if (isInitialLoad && rootVnode.$attrs$) {
1662
- for (const key of Object.keys(rootVnode.$attrs$)) {
1663
- // We have a special implementation in `setAccessor` for `style` and
1664
- // `class` which reconciles values coming from the VDom with values
1665
- // already present on the DOM element, so we don't want to override those
1666
- // attributes on the VDom tree with values from the host element if they
1667
- // are present.
1668
- //
1669
- // Likewise, `ref` and `key` are special internal values for the Stencil
1670
- // runtime and we don't want to override those either.
1671
- if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
1672
- rootVnode.$attrs$[key] = hostElm[key];
1673
- }
1674
- }
1675
- }
1676
- rootVnode.$tag$ = null;
1677
- rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1678
- hostRef.$vnode$ = rootVnode;
1679
- rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
1680
- {
1681
- scopeId = hostElm['s-sc'];
1682
- }
1683
- {
1684
- contentRef = hostElm['s-cr'];
1685
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1686
- // always reset
1687
- checkSlotFallbackVisibility = false;
1688
- }
1689
- // synchronous patch
1690
- patch(oldVNode, rootVnode, isInitialLoad);
1691
- {
1692
- // while we're moving nodes around existing nodes, temporarily disable
1693
- // the disconnectCallback from working
1694
- plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1695
- if (checkSlotRelocate) {
1696
- markSlotContentForRelocation(rootVnode.$elm$);
1697
- for (const relocateData of relocateNodes) {
1698
- const nodeToRelocate = relocateData.$nodeToRelocate$;
1699
- if (!nodeToRelocate['s-ol']) {
1700
- // add a reference node marking this node's original location
1701
- // keep a reference to this node for later lookups
1702
- const orgLocationNode = doc.createTextNode('');
1703
- orgLocationNode['s-nr'] = nodeToRelocate;
1704
- nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1705
- }
1706
- }
1707
- for (const relocateData of relocateNodes) {
1708
- const nodeToRelocate = relocateData.$nodeToRelocate$;
1709
- const slotRefNode = relocateData.$slotRefNode$;
1710
- if (slotRefNode) {
1711
- const parentNodeRef = slotRefNode.parentNode;
1712
- // When determining where to insert content, the most simple case would be
1713
- // to relocate the node immediately following the slot reference node. We do this
1714
- // by getting a reference to the node immediately following the slot reference node
1715
- // since we will use `insertBefore` to manipulate the DOM.
1716
- //
1717
- // If there is no node immediately following the slot reference node, then we will just
1718
- // end up appending the node as the last child of the parent.
1719
- let insertBeforeNode = slotRefNode.nextSibling;
1720
- // If the node we're currently planning on inserting the new node before is an element,
1721
- // we need to do some additional checks to make sure we're inserting the node in the correct order.
1722
- // The use case here would be that we have multiple nodes being relocated to the same slot. So, we want
1723
- // to make sure they get inserted into their new how in the same order they were declared in their original location.
1724
- //
1725
- // TODO(STENCIL-914): Remove `experimentalSlotFixes` check
1726
- {
1727
- let orgLocationNode = (_a = nodeToRelocate['s-ol']) === null || _a === void 0 ? void 0 : _a.previousSibling;
1728
- while (orgLocationNode) {
1729
- let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
1730
- if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1731
- refNode = refNode.nextSibling;
1732
- if (!refNode || !refNode['s-nr']) {
1733
- insertBeforeNode = refNode;
1734
- break;
1735
- }
1736
- }
1737
- orgLocationNode = orgLocationNode.previousSibling;
1738
- }
1739
- }
1740
- if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
1741
- nodeToRelocate.nextSibling !== insertBeforeNode) {
1742
- // we've checked that it's worth while to relocate
1743
- // since that the node to relocate
1744
- // has a different next sibling or parent relocated
1745
- if (nodeToRelocate !== insertBeforeNode) {
1746
- if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1747
- // probably a component in the index.html that doesn't have its hostname set
1748
- nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1749
- }
1750
- // Add it back to the dom but in its new home
1751
- // If we get to this point and `insertBeforeNode` is `null`, that means
1752
- // we're just going to append the node as the last child of the parent. Passing
1753
- // `null` as the second arg here will trigger that behavior.
1754
- parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1755
- // Reset the `hidden` value back to what it was defined as originally
1756
- // This solves a problem where a `slot` is dynamically rendered and `hidden` may have
1757
- // been set on content originally, but now it has a slot to go to so it should have
1758
- // the value it was defined as having in the DOM, not what we overrode it to.
1759
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1760
- nodeToRelocate.hidden = (_c = nodeToRelocate['s-ih']) !== null && _c !== void 0 ? _c : false;
1761
- }
1762
- }
1763
- }
1764
- }
1765
- else {
1766
- // this node doesn't have a slot home to go to, so let's hide it
1767
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1768
- // Store the initial value of `hidden` so we can reset it later when
1769
- // moving nodes around.
1770
- if (isInitialLoad) {
1771
- nodeToRelocate['s-ih'] = (_d = nodeToRelocate.hidden) !== null && _d !== void 0 ? _d : false;
1772
- }
1773
- nodeToRelocate.hidden = true;
1774
- }
1775
- }
1776
- }
1777
- }
1778
- if (checkSlotFallbackVisibility) {
1779
- updateFallbackSlotVisibility(rootVnode.$elm$);
1780
- }
1781
- // done moving nodes around
1782
- // allow the disconnect callback to work again
1783
- plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1784
- // always reset
1785
- relocateNodes.length = 0;
1786
- }
1787
- };
1788
- const attachToAncestor = (hostRef, ancestorComponent) => {
1789
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1790
- ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1791
- }
1792
- };
1793
- const scheduleUpdate = (hostRef, isInitialLoad) => {
1794
- {
1795
- hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
1796
- }
1797
- if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1798
- hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
1799
- return;
1800
- }
1801
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1802
- // there is no ancestor component or the ancestor component
1803
- // has already fired off its lifecycle update then
1804
- // fire off the initial update
1805
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1806
- return writeTask(dispatch) ;
1807
- };
1808
- /**
1809
- * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
1810
- * component lifecycle methods like `componentWillLoad` as well as
1811
- * {@link updateComponent}, which will kick off the virtual DOM re-render.
1812
- *
1813
- * @param hostRef a reference to a host DOM node
1814
- * @param isInitialLoad whether we're on the initial load or not
1815
- * @returns an empty Promise which is used to enqueue a series of operations for
1816
- * the component
1817
- */
1818
- const dispatchHooks = (hostRef, isInitialLoad) => {
1819
- const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1820
- const instance = hostRef.$lazyInstance$ ;
1821
- // We're going to use this variable together with `enqueue` to implement a
1822
- // little promise-based queue. We start out with it `undefined`. When we add
1823
- // the first function to the queue we'll set this variable to be that
1824
- // function's return value. When we attempt to add subsequent values to the
1825
- // queue we'll check that value and, if it was a `Promise`, we'll then chain
1826
- // the new function off of that `Promise` using `.then()`. This will give our
1827
- // queue two nice properties:
1828
- //
1829
- // 1. If all functions added to the queue are synchronous they'll be called
1830
- // synchronously right away.
1831
- // 2. If all functions added to the queue are asynchronous they'll all be
1832
- // called in order after `dispatchHooks` exits.
1833
- let maybePromise;
1834
- if (isInitialLoad) {
1835
- {
1836
- hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
1837
- if (hostRef.$queuedListeners$) {
1838
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1839
- hostRef.$queuedListeners$ = undefined;
1840
- }
1841
- }
1842
- {
1843
- // If `componentWillLoad` returns a `Promise` then we want to wait on
1844
- // whatever's going on in that `Promise` before we launch into
1845
- // rendering the component, doing other lifecycle stuff, etc. So
1846
- // in that case we assign the returned promise to the variable we
1847
- // declared above to hold a possible 'queueing' Promise
1848
- maybePromise = safeCall(instance, 'componentWillLoad');
1849
- }
1850
- }
1851
- else {
1852
- {
1853
- // Like `componentWillLoad` above, we allow Stencil component
1854
- // authors to return a `Promise` from this lifecycle callback, and
1855
- // we specify that our runtime will wait for that `Promise` to
1856
- // resolve before the component re-renders. So if the method
1857
- // returns a `Promise` we need to keep it around!
1858
- maybePromise = safeCall(instance, 'componentWillUpdate');
1859
- }
1860
- }
1861
- {
1862
- maybePromise = enqueue(maybePromise, () => safeCall(instance, 'componentWillRender'));
1863
- }
1864
- endSchedule();
1865
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1866
- };
1867
- /**
1868
- * This function uses a Promise to implement a simple first-in, first-out queue
1869
- * of functions to be called.
1870
- *
1871
- * The queue is ordered on the basis of the first argument. If it's
1872
- * `undefined`, then nothing is on the queue yet, so the provided function can
1873
- * be called synchronously (although note that this function may return a
1874
- * `Promise`). The idea is that then the return value of that enqueueing
1875
- * operation is kept around, so that if it was a `Promise` then subsequent
1876
- * functions can be enqueued by calling this function again with that `Promise`
1877
- * as the first argument.
1878
- *
1879
- * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
1880
- * @param fn a function to enqueue
1881
- * @returns either a `Promise` or the return value of the provided function
1882
- */
1883
- const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
1884
- /**
1885
- * Check that a value is a `Promise`. To check, we first see if the value is an
1886
- * instance of the `Promise` global. In a few circumstances, in particular if
1887
- * the global has been overwritten, this is could be misleading, so we also do
1888
- * a little 'duck typing' check to see if the `.then` property of the value is
1889
- * defined and a function.
1890
- *
1891
- * @param maybePromise it might be a promise!
1892
- * @returns whether it is or not
1893
- */
1894
- const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
1895
- (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
1896
- /**
1897
- * Update a component given reference to its host elements and so on.
1898
- *
1899
- * @param hostRef an object containing references to the element's host node,
1900
- * VDom nodes, and other metadata
1901
- * @param instance a reference to the underlying host element where it will be
1902
- * rendered
1903
- * @param isInitialLoad whether or not this function is being called as part of
1904
- * the first render cycle
1905
- */
1906
- const updateComponent = async (hostRef, instance, isInitialLoad) => {
1907
- var _a;
1908
- const elm = hostRef.$hostElement$;
1909
- const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1910
- const rc = elm['s-rc'];
1911
- if (isInitialLoad) {
1912
- // DOM WRITE!
1913
- attachStyles(hostRef);
1914
- }
1915
- const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1916
- {
1917
- callRender(hostRef, instance, elm, isInitialLoad);
1918
- }
1919
- if (rc) {
1920
- // ok, so turns out there are some child host elements
1921
- // waiting on this parent element to load
1922
- // let's fire off all update callbacks waiting
1923
- rc.map((cb) => cb());
1924
- elm['s-rc'] = undefined;
1925
- }
1926
- endRender();
1927
- endUpdate();
1928
- {
1929
- const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
1930
- const postUpdate = () => postUpdateComponent(hostRef);
1931
- if (childrenPromises.length === 0) {
1932
- postUpdate();
1933
- }
1934
- else {
1935
- Promise.all(childrenPromises).then(postUpdate);
1936
- hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1937
- childrenPromises.length = 0;
1938
- }
1939
- }
1940
- };
1941
- /**
1942
- * Handle making the call to the VDom renderer with the proper context given
1943
- * various build variables
1944
- *
1945
- * @param hostRef an object containing references to the element's host node,
1946
- * VDom nodes, and other metadata
1947
- * @param instance a reference to the underlying host element where it will be
1948
- * rendered
1949
- * @param elm the Host element for the component
1950
- * @param isInitialLoad whether or not this function is being called as part of
1951
- * @returns an empty promise
1952
- */
1953
- const callRender = (hostRef, instance, elm, isInitialLoad) => {
1954
- try {
1955
- /**
1956
- * minification optimization: `allRenderFn` is `true` if all components have a `render`
1957
- * method, so we can call the method immediately. If not, check before calling it.
1958
- */
1959
- instance = instance.render() ;
1960
- {
1961
- hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1962
- }
1963
- {
1964
- hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1965
- }
1966
- {
1967
- {
1968
- // looks like we've got child nodes to render into this host element
1969
- // or we need to update the css class/attrs on the host element
1970
- // DOM WRITE!
1971
- {
1972
- renderVdom(hostRef, instance, isInitialLoad);
1973
- }
1974
- }
1975
- }
1976
- }
1977
- catch (e) {
1978
- consoleError(e, hostRef.$hostElement$);
1979
- }
1980
- return null;
1981
- };
1982
- const postUpdateComponent = (hostRef) => {
1983
- const tagName = hostRef.$cmpMeta$.$tagName$;
1984
- const elm = hostRef.$hostElement$;
1985
- const endPostUpdate = createTime('postUpdate', tagName);
1986
- const instance = hostRef.$lazyInstance$ ;
1987
- const ancestorComponent = hostRef.$ancestorComponent$;
1988
- {
1989
- safeCall(instance, 'componentDidRender');
1990
- }
1991
- if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1992
- hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1993
- {
1994
- // DOM WRITE!
1995
- addHydratedFlag(elm);
1996
- }
1997
- {
1998
- safeCall(instance, 'componentDidLoad');
1999
- }
2000
- endPostUpdate();
2001
- {
2002
- hostRef.$onReadyResolve$(elm);
2003
- if (!ancestorComponent) {
2004
- appDidLoad();
2005
- }
2006
- }
2007
- }
2008
- else {
2009
- {
2010
- safeCall(instance, 'componentDidUpdate');
2011
- }
2012
- endPostUpdate();
2013
- }
2014
- {
2015
- hostRef.$onInstanceResolve$(elm);
2016
- }
2017
- // load events fire from bottom to top
2018
- // the deepest elements load first then bubbles up
2019
- {
2020
- if (hostRef.$onRenderResolve$) {
2021
- hostRef.$onRenderResolve$();
2022
- hostRef.$onRenderResolve$ = undefined;
2023
- }
2024
- if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
2025
- nextTick(() => scheduleUpdate(hostRef, false));
2026
- }
2027
- hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
2028
- }
2029
- // ( •_•)
2030
- // ( •_•)>⌐■-■
2031
- // (⌐■_■)
2032
- };
2033
- const forceUpdate = (ref) => {
2034
- {
2035
- const hostRef = getHostRef(ref);
2036
- const isConnected = hostRef.$hostElement$.isConnected;
2037
- if (isConnected &&
2038
- (hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
2039
- scheduleUpdate(hostRef, false);
2040
- }
2041
- // Returns "true" when the forced update was successfully scheduled
2042
- return isConnected;
2043
- }
2044
- };
2045
- const appDidLoad = (who) => {
2046
- // on appload
2047
- // we have finish the first big initial render
2048
- {
2049
- addHydratedFlag(doc.documentElement);
2050
- }
2051
- nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
2052
- };
2053
- /**
2054
- * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
2055
- * e.g. custom element node. If a build figures out that e.g. no component
2056
- * has a `componentDidLoad` method, the instance method gets removed from the
2057
- * output bundle and this function returns `undefined`.
2058
- * @param instance any object that may or may not contain methods
2059
- * @param method method name
2060
- * @param arg single arbitrary argument
2061
- * @returns result of method call if it exists, otherwise `undefined`
2062
- */
2063
- const safeCall = (instance, method, arg) => {
2064
- if (instance && instance[method]) {
2065
- try {
2066
- return instance[method](arg);
2067
- }
2068
- catch (e) {
2069
- consoleError(e);
2070
- }
2071
- }
2072
- return undefined;
2073
- };
2074
- const addHydratedFlag = (elm) => elm.classList.add('hydrated')
2075
- ;
2076
- const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
2077
- const setValue = (ref, propName, newVal, cmpMeta) => {
2078
- // check our new property value against our internal value
2079
- const hostRef = getHostRef(ref);
2080
- const elm = hostRef.$hostElement$ ;
2081
- const oldVal = hostRef.$instanceValues$.get(propName);
2082
- const flags = hostRef.$flags$;
2083
- const instance = hostRef.$lazyInstance$ ;
2084
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
2085
- // explicitly check for NaN on both sides, as `NaN === NaN` is always false
2086
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
2087
- const didValueChange = newVal !== oldVal && !areBothNaN;
2088
- if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
2089
- // gadzooks! the property's value has changed!!
2090
- // set our new value!
2091
- hostRef.$instanceValues$.set(propName, newVal);
2092
- if (instance) {
2093
- // get an array of method names of watch functions to call
2094
- if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
2095
- const watchMethods = cmpMeta.$watchers$[propName];
2096
- if (watchMethods) {
2097
- // this instance is watching for when this property changed
2098
- watchMethods.map((watchMethodName) => {
2099
- try {
2100
- // fire off each of the watch methods that are watching this property
2101
- instance[watchMethodName](newVal, oldVal, propName);
2102
- }
2103
- catch (e) {
2104
- consoleError(e, elm);
2105
- }
2106
- });
2107
- }
2108
- }
2109
- if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
2110
- // looks like this value actually changed, so we've got work to do!
2111
- // but only if we've already rendered, otherwise just chill out
2112
- // queue that we need to do an update, but don't worry about queuing
2113
- // up millions cuz this function ensures it only runs once
2114
- scheduleUpdate(hostRef, false);
2115
- }
2116
- }
2117
- }
2118
- };
2119
- /**
2120
- * Attach a series of runtime constructs to a compiled Stencil component
2121
- * constructor, including getters and setters for the `@Prop` and `@State`
2122
- * decorators, callbacks for when attributes change, and so on.
2123
- *
2124
- * @param Cstr the constructor for a component that we need to process
2125
- * @param cmpMeta metadata collected previously about the component
2126
- * @param flags a number used to store a series of bit flags
2127
- * @returns a reference to the same constructor passed in (but now mutated)
2128
- */
2129
- const proxyComponent = (Cstr, cmpMeta, flags) => {
2130
- var _a;
2131
- const prototype = Cstr.prototype;
2132
- if (cmpMeta.$members$) {
2133
- if (Cstr.watchers) {
2134
- cmpMeta.$watchers$ = Cstr.watchers;
2135
- }
2136
- // It's better to have a const than two Object.entries()
2137
- const members = Object.entries(cmpMeta.$members$);
2138
- members.map(([memberName, [memberFlags]]) => {
2139
- if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
2140
- ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
2141
- // proxyComponent - prop
2142
- Object.defineProperty(prototype, memberName, {
2143
- get() {
2144
- // proxyComponent, get value
2145
- return getValue(this, memberName);
2146
- },
2147
- set(newValue) {
2148
- // proxyComponent, set value
2149
- setValue(this, memberName, newValue, cmpMeta);
2150
- },
2151
- configurable: true,
2152
- enumerable: true,
2153
- });
2154
- }
2155
- else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
2156
- memberFlags & 64 /* MEMBER_FLAGS.Method */) {
2157
- // proxyComponent - method
2158
- Object.defineProperty(prototype, memberName, {
2159
- value(...args) {
2160
- var _a;
2161
- const ref = getHostRef(this);
2162
- return (_a = ref === null || ref === void 0 ? void 0 : ref.$onInstancePromise$) === null || _a === void 0 ? void 0 : _a.then(() => { var _a; return (_a = ref.$lazyInstance$) === null || _a === void 0 ? void 0 : _a[memberName](...args); });
2163
- },
2164
- });
2165
- }
2166
- });
2167
- if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
2168
- const attrNameToPropName = new Map();
2169
- prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
2170
- plt.jmp(() => {
2171
- var _a;
2172
- const propName = attrNameToPropName.get(attrName);
2173
- // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
2174
- // in the case where an attribute was set inline.
2175
- // ```html
2176
- // <my-component some-attribute="some-value"></my-component>
2177
- // ```
2178
- //
2179
- // There is an edge case where a developer sets the attribute inline on a custom element and then
2180
- // programmatically changes it before it has been upgraded as shown below:
2181
- //
2182
- // ```html
2183
- // <!-- this component has _not_ been upgraded yet -->
2184
- // <my-component id="test" some-attribute="some-value"></my-component>
2185
- // <script>
2186
- // // grab non-upgraded component
2187
- // el = document.querySelector("#test");
2188
- // el.someAttribute = "another-value";
2189
- // // upgrade component
2190
- // customElements.define('my-component', MyComponent);
2191
- // </script>
2192
- // ```
2193
- // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
2194
- // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
2195
- // to the value that was set inline i.e. "some-value" from above example. When
2196
- // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
2197
- //
2198
- // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
2199
- // by connectedCallback as this attributeChangedCallback will not fire.
2200
- //
2201
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
2202
- //
2203
- // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
2204
- // properties here given that this goes against best practices outlined here
2205
- // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
2206
- if (this.hasOwnProperty(propName)) {
2207
- newValue = this[propName];
2208
- delete this[propName];
2209
- }
2210
- else if (prototype.hasOwnProperty(propName) &&
2211
- typeof this[propName] === 'number' &&
2212
- this[propName] == newValue) {
2213
- // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
2214
- // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
2215
- // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
2216
- return;
2217
- }
2218
- else if (propName == null) {
2219
- // At this point we should know this is not a "member", so we can treat it like watching an attribute
2220
- // on a vanilla web component
2221
- const hostRef = getHostRef(this);
2222
- const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
2223
- // We only want to trigger the callback(s) if:
2224
- // 1. The instance is ready
2225
- // 2. The watchers are ready
2226
- // 3. The value has changed
2227
- if (flags &&
2228
- !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
2229
- flags & 128 /* HOST_FLAGS.isWatchReady */ &&
2230
- newValue !== oldValue) {
2231
- const instance = hostRef.$lazyInstance$ ;
2232
- const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
2233
- entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
2234
- if (instance[callbackName] != null) {
2235
- instance[callbackName].call(instance, newValue, oldValue, attrName);
2236
- }
2237
- });
2238
- }
2239
- return;
2240
- }
2241
- this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
2242
- });
2243
- };
2244
- // Create an array of attributes to observe
2245
- // This list in comprised of all strings used within a `@Watch()` decorator
2246
- // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
2247
- // As such, there is no way to guarantee type-safety here that a user hasn't entered
2248
- // an invalid attribute.
2249
- Cstr.observedAttributes = Array.from(new Set([
2250
- ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
2251
- ...members
2252
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
2253
- .map(([propName, m]) => {
2254
- var _a;
2255
- const attrName = m[1] || propName;
2256
- attrNameToPropName.set(attrName, propName);
2257
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
2258
- (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
2259
- }
2260
- return attrName;
2261
- }),
2262
- ]));
2263
- }
2264
- }
2265
- return Cstr;
2266
- };
2267
- /**
2268
- * Initialize a Stencil component given a reference to its host element, its
2269
- * runtime bookkeeping data structure, runtime metadata about the component,
2270
- * and (optionally) an HMR version ID.
2271
- *
2272
- * @param elm a host element
2273
- * @param hostRef the element's runtime bookkeeping object
2274
- * @param cmpMeta runtime metadata for the Stencil component
2275
- * @param hmrVersionId an (optional) HMR version ID
2276
- */
2277
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2278
- let Cstr;
2279
- // initializeComponent
2280
- if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
2281
- // Let the runtime know that the component has been initialized
2282
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
2283
- {
2284
- // lazy loaded components
2285
- // request the component's implementation to be
2286
- // wired up with the host element
2287
- Cstr = loadModule(cmpMeta);
2288
- if (Cstr.then) {
2289
- // Await creates a micro-task avoid if possible
2290
- const endLoad = uniqueTime();
2291
- Cstr = await Cstr;
2292
- endLoad();
2293
- }
2294
- if (!Cstr.isProxied) {
2295
- // we've never proxied this Constructor before
2296
- // let's add the getters/setters to its prototype before
2297
- // the first time we create an instance of the implementation
2298
- {
2299
- cmpMeta.$watchers$ = Cstr.watchers;
2300
- }
2301
- proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
2302
- Cstr.isProxied = true;
2303
- }
2304
- const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
2305
- // ok, time to construct the instance
2306
- // but let's keep track of when we start and stop
2307
- // so that the getters/setters don't incorrectly step on data
2308
- {
2309
- hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
2310
- }
2311
- // construct the lazy-loaded component implementation
2312
- // passing the hostRef is very important during
2313
- // construction in order to directly wire together the
2314
- // host element and the lazy-loaded instance
2315
- try {
2316
- new Cstr(hostRef);
2317
- }
2318
- catch (e) {
2319
- consoleError(e);
2320
- }
2321
- {
2322
- hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
2323
- }
2324
- {
2325
- hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
2326
- }
2327
- endNewInstance();
2328
- fireConnectedCallback(hostRef.$lazyInstance$);
2329
- }
2330
- if (Cstr.style) {
2331
- // this component has styles but we haven't registered them yet
2332
- let style = Cstr.style;
2333
- const scopeId = getScopeId(cmpMeta);
2334
- if (!styles.has(scopeId)) {
2335
- const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
2336
- registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
2337
- endRegisterStyles();
2338
- }
2339
- }
2340
- }
2341
- // we've successfully created a lazy instance
2342
- const ancestorComponent = hostRef.$ancestorComponent$;
2343
- const schedule = () => scheduleUpdate(hostRef, true);
2344
- if (ancestorComponent && ancestorComponent['s-rc']) {
2345
- // this is the initial load and this component it has an ancestor component
2346
- // but the ancestor component has NOT fired its will update lifecycle yet
2347
- // so let's just cool our jets and wait for the ancestor to continue first
2348
- // this will get fired off when the ancestor component
2349
- // finally gets around to rendering its lazy self
2350
- // fire off the initial update
2351
- ancestorComponent['s-rc'].push(schedule);
2352
- }
2353
- else {
2354
- schedule();
2355
- }
2356
- };
2357
- const fireConnectedCallback = (instance) => {
2358
- {
2359
- safeCall(instance, 'connectedCallback');
2360
- }
2361
- };
2362
- const connectedCallback = (elm) => {
2363
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
2364
- const hostRef = getHostRef(elm);
2365
- const cmpMeta = hostRef.$cmpMeta$;
2366
- const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
2367
- if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
2368
- // first time this component has connected
2369
- hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
2370
- let hostId;
2371
- {
2372
- hostId = elm.getAttribute(HYDRATE_ID);
2373
- if (hostId) {
2374
- if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
2375
- const scopeId = addStyle(elm.shadowRoot, cmpMeta);
2376
- elm.classList.remove(scopeId + '-h', scopeId + '-s');
2377
- }
2378
- initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2379
- }
2380
- }
2381
- if (!hostId) {
2382
- // initUpdate
2383
- // if the slot polyfill is required we'll need to put some nodes
2384
- // in here to act as original content anchors as we move nodes around
2385
- // host element has been connected to the DOM
2386
- if ((// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2387
- cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
2388
- setContentReference(elm);
2389
- }
2390
- }
2391
- {
2392
- // find the first ancestor component (if there is one) and register
2393
- // this component as one of the actively loading child components for its ancestor
2394
- let ancestorComponent = elm;
2395
- while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
2396
- // climb up the ancestors looking for the first
2397
- // component that hasn't finished its lifecycle update yet
2398
- if ((ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
2399
- ancestorComponent.hasAttribute('s-id') &&
2400
- ancestorComponent['s-p']) ||
2401
- ancestorComponent['s-p']) {
2402
- // we found this components first ancestor component
2403
- // keep a reference to this component's ancestor component
2404
- attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
2405
- break;
2406
- }
2407
- }
2408
- }
2409
- // Lazy properties
2410
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
2411
- if (cmpMeta.$members$) {
2412
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
2413
- if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
2414
- const value = elm[memberName];
2415
- delete elm[memberName];
2416
- elm[memberName] = value;
2417
- }
2418
- });
2419
- }
2420
- {
2421
- initializeComponent(elm, hostRef, cmpMeta);
2422
- }
2423
- }
2424
- else {
2425
- // not the first time this has connected
2426
- // reattach any event listeners to the host
2427
- // since they would have been removed when disconnected
2428
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
2429
- // fire off connectedCallback() on component instance
2430
- if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
2431
- fireConnectedCallback(hostRef.$lazyInstance$);
2432
- }
2433
- else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
2434
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
2435
- }
2436
- }
2437
- endConnected();
2438
- }
2439
- };
2440
- const setContentReference = (elm) => {
2441
- // only required when we're NOT using native shadow dom (slot)
2442
- // or this browser doesn't support native shadow dom
2443
- // and this host element was NOT created with SSR
2444
- // let's pick out the inner content for slot projection
2445
- // create a node to represent where the original
2446
- // content was first placed, which is useful later on
2447
- const contentRefElm = (elm['s-cr'] = doc.createComment(''));
2448
- contentRefElm['s-cn'] = true;
2449
- elm.insertBefore(contentRefElm, elm.firstChild);
2450
- };
2451
- const disconnectInstance = (instance) => {
2452
- {
2453
- safeCall(instance, 'disconnectedCallback');
2454
- }
2455
- };
2456
- const disconnectedCallback = async (elm) => {
2457
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
2458
- const hostRef = getHostRef(elm);
2459
- {
2460
- if (hostRef.$rmListeners$) {
2461
- hostRef.$rmListeners$.map((rmListener) => rmListener());
2462
- hostRef.$rmListeners$ = undefined;
2463
- }
2464
- }
2465
- if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
2466
- disconnectInstance(hostRef.$lazyInstance$);
2467
- }
2468
- else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
2469
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
2470
- }
2471
- }
2472
- };
2473
- const bootstrapLazy = (lazyBundles, options = {}) => {
2474
- var _a;
2475
- const endBootstrap = createTime();
2476
- const cmpTags = [];
2477
- const exclude = options.exclude || [];
2478
- const customElements = win.customElements;
2479
- const head = doc.head;
2480
- const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
2481
- const dataStyles = /*@__PURE__*/ doc.createElement('style');
2482
- const deferredConnectedCallbacks = [];
2483
- const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2484
- let appLoadFallback;
2485
- let isBootstrapping = true;
2486
- let i = 0;
2487
- Object.assign(plt, options);
2488
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
2489
- {
2490
- // If the app is already hydrated there is not point to disable the
2491
- // async queue. This will improve the first input delay
2492
- plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
2493
- }
2494
- {
2495
- for (; i < styles.length; i++) {
2496
- registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
2497
- }
2498
- }
2499
- let hasSlotRelocation = false;
2500
- lazyBundles.map((lazyBundle) => {
2501
- lazyBundle[1].map((compactMeta) => {
2502
- var _a;
2503
- const cmpMeta = {
2504
- $flags$: compactMeta[0],
2505
- $tagName$: compactMeta[1],
2506
- $members$: compactMeta[2],
2507
- $listeners$: compactMeta[3],
2508
- };
2509
- // Check if we are using slots outside the shadow DOM in this component.
2510
- // We'll use this information later to add styles for `slot-fb` elements
2511
- if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
2512
- hasSlotRelocation = true;
2513
- }
2514
- {
2515
- cmpMeta.$members$ = compactMeta[2];
2516
- }
2517
- {
2518
- cmpMeta.$listeners$ = compactMeta[3];
2519
- }
2520
- {
2521
- cmpMeta.$attrsToReflect$ = [];
2522
- }
2523
- {
2524
- cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
2525
- }
2526
- const tagName = cmpMeta.$tagName$;
2527
- const HostElement = class extends HTMLElement {
2528
- // StencilLazyHost
2529
- constructor(self) {
2530
- // @ts-ignore
2531
- super(self);
2532
- self = this;
2533
- registerHost(self, cmpMeta);
2534
- if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
2535
- // this component is using shadow dom
2536
- // and this browser supports shadow dom
2537
- // add the read-only property "shadowRoot" to the host element
2538
- // adding the shadow root build conditionals to minimize runtime
2539
- {
2540
- {
2541
- self.attachShadow({
2542
- mode: 'open',
2543
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),
2544
- });
2545
- }
2546
- }
2547
- }
2548
- }
2549
- connectedCallback() {
2550
- if (appLoadFallback) {
2551
- clearTimeout(appLoadFallback);
2552
- appLoadFallback = null;
2553
- }
2554
- if (isBootstrapping) {
2555
- // connectedCallback will be processed once all components have been registered
2556
- deferredConnectedCallbacks.push(this);
2557
- }
2558
- else {
2559
- plt.jmp(() => connectedCallback(this));
2560
- }
2561
- }
2562
- disconnectedCallback() {
2563
- plt.jmp(() => disconnectedCallback(this));
2564
- }
2565
- componentOnReady() {
2566
- return getHostRef(this).$onReadyPromise$;
2567
- }
2568
- };
2569
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
2570
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2571
- cmpTags.push(tagName);
2572
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
2573
- }
2574
- });
2575
- });
2576
- // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
2577
- if (hasSlotRelocation) {
2578
- dataStyles.innerHTML += SLOT_FB_CSS;
2579
- }
2580
- // Add hydration styles
2581
- {
2582
- dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
2583
- }
2584
- // If we have styles, add them to the DOM
2585
- if (dataStyles.innerHTML.length) {
2586
- dataStyles.setAttribute('data-styles', '');
2587
- // Apply CSP nonce to the style tag if it exists
2588
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
2589
- if (nonce != null) {
2590
- dataStyles.setAttribute('nonce', nonce);
2591
- }
2592
- // Insert the styles into the document head
2593
- // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
2594
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
2595
- }
2596
- // Process deferred connectedCallbacks now all components have been registered
2597
- isBootstrapping = false;
2598
- if (deferredConnectedCallbacks.length) {
2599
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
2600
- }
2601
- else {
2602
- {
2603
- plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
2604
- }
2605
- }
2606
- // Fallback appLoad event
2607
- endBootstrap();
2608
- };
2609
- const Fragment = (_, children) => children;
2610
- const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2611
- if (listeners) {
2612
- listeners.map(([flags, name, method]) => {
2613
- const target = getHostListenerTarget(elm, flags) ;
2614
- const handler = hostListenerProxy(hostRef, method);
2615
- const opts = hostListenerOpts(flags);
2616
- plt.ael(target, name, handler, opts);
2617
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
2618
- });
2619
- }
2620
- };
2621
- const hostListenerProxy = (hostRef, methodName) => (ev) => {
2622
- try {
2623
- {
2624
- if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
2625
- // instance is ready, let's call it's member method for this event
2626
- hostRef.$lazyInstance$[methodName](ev);
2627
- }
2628
- else {
2629
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
2630
- }
2631
- }
2632
- }
2633
- catch (e) {
2634
- consoleError(e);
2635
- }
2636
- };
2637
- const getHostListenerTarget = (elm, flags) => {
2638
- if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
2639
- return doc;
2640
- return elm;
2641
- };
2642
- // prettier-ignore
2643
- const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
2644
- /**
2645
- * Assigns the given value to the nonce property on the runtime platform object.
2646
- * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
2647
- * @param nonce The value to be assigned to the platform nonce property.
2648
- * @returns void
2649
- */
2650
- const setNonce = (nonce) => (plt.$nonce$ = nonce);
2651
- /**
2652
- * A WeakMap mapping runtime component references to their corresponding host reference
2653
- * instances.
2654
- */
2655
- const hostRefs = /*@__PURE__*/ new WeakMap();
2656
- /**
2657
- * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
2658
- *
2659
- * @param ref the runtime ref of interest
2660
- * @returns the Host reference (if found) or undefined
2661
- */
2662
- const getHostRef = (ref) => hostRefs.get(ref);
2663
- /**
2664
- * Register a lazy instance with the {@link hostRefs} object so it's
2665
- * corresponding {@link d.HostRef} can be retrieved later.
2666
- *
2667
- * @param lazyInstance the lazy instance of interest
2668
- * @param hostRef that instances `HostRef` object
2669
- * @returns a reference to the host ref WeakMap
2670
- */
2671
- const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
2672
- /**
2673
- * Register a host element for a Stencil component, setting up various metadata
2674
- * and callbacks based on {@link BUILD} flags as well as the component's runtime
2675
- * metadata.
2676
- *
2677
- * @param hostElement the host element to register
2678
- * @param cmpMeta runtime metadata for that component
2679
- * @returns a reference to the host ref WeakMap
2680
- */
2681
- const registerHost = (hostElement, cmpMeta) => {
2682
- const hostRef = {
2683
- $flags$: 0,
2684
- $hostElement$: hostElement,
2685
- $cmpMeta$: cmpMeta,
2686
- $instanceValues$: new Map(),
2687
- };
2688
- {
2689
- hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
2690
- }
2691
- {
2692
- hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
2693
- hostElement['s-p'] = [];
2694
- hostElement['s-rc'] = [];
2695
- }
2696
- addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
2697
- return hostRefs.set(hostElement, hostRef);
2698
- };
2699
- const isMemberInElement = (elm, memberName) => memberName in elm;
2700
- const consoleError = (e, el) => (0, console.error)(e, el);
2701
- const cmpModules = /*@__PURE__*/ new Map();
2702
- const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2703
- // loadModuleImport
2704
- const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
2705
- const bundleId = cmpMeta.$lazyBundleId$;
2706
- const module = cmpModules.get(bundleId) ;
2707
- if (module) {
2708
- return module[exportName];
2709
- }
2710
-
2711
- if (!hmrVersionId || !BUILD.hotModuleReplacement) {
2712
- const processMod = importedModule => {
2713
- cmpModules.set(bundleId, importedModule);
2714
- return importedModule[exportName];
2715
- }
2716
- switch(bundleId) {
2717
-
2718
- case 'ic-accordion.cjs':
2719
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2720
- /* webpackMode: "lazy" */
2721
- './ic-accordion.cjs.entry.js')); }).then(processMod, consoleError);
2722
- case 'ic-accordion-group.cjs':
2723
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2724
- /* webpackMode: "lazy" */
2725
- './ic-accordion-group.cjs.entry.js')); }).then(processMod, consoleError);
2726
- case 'ic-alert.cjs':
2727
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2728
- /* webpackMode: "lazy" */
2729
- './ic-alert.cjs.entry.js')); }).then(processMod, consoleError);
2730
- case 'ic-back-to-top.cjs':
2731
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2732
- /* webpackMode: "lazy" */
2733
- './ic-back-to-top.cjs.entry.js')); }).then(processMod, consoleError);
2734
- case 'ic-badge.cjs':
2735
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2736
- /* webpackMode: "lazy" */
2737
- './ic-badge.cjs.entry.js')); }).then(processMod, consoleError);
2738
- case 'ic-breadcrumb-group.cjs':
2739
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2740
- /* webpackMode: "lazy" */
2741
- './ic-breadcrumb-group.cjs.entry.js')); }).then(processMod, consoleError);
2742
- case 'ic-card-vertical.cjs':
2743
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2744
- /* webpackMode: "lazy" */
2745
- './ic-card-vertical.cjs.entry.js')); }).then(processMod, consoleError);
2746
- case 'ic-checkbox.cjs':
2747
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2748
- /* webpackMode: "lazy" */
2749
- './ic-checkbox.cjs.entry.js')); }).then(processMod, consoleError);
2750
- case 'ic-checkbox-group.cjs':
2751
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2752
- /* webpackMode: "lazy" */
2753
- './ic-checkbox-group.cjs.entry.js')); }).then(processMod, consoleError);
2754
- case 'ic-chip.cjs':
2755
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2756
- /* webpackMode: "lazy" */
2757
- './ic-chip.cjs.entry.js')); }).then(processMod, consoleError);
2758
- case 'ic-classification-banner.cjs':
2759
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2760
- /* webpackMode: "lazy" */
2761
- './ic-classification-banner.cjs.entry.js')); }).then(processMod, consoleError);
2762
- case 'ic-data-list.cjs':
2763
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2764
- /* webpackMode: "lazy" */
2765
- './ic-data-list.cjs.entry.js')); }).then(processMod, consoleError);
2766
- case 'ic-data-row.cjs':
2767
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2768
- /* webpackMode: "lazy" */
2769
- './ic-data-row.cjs.entry.js')); }).then(processMod, consoleError);
2770
- case 'ic-dialog.cjs':
2771
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2772
- /* webpackMode: "lazy" */
2773
- './ic-dialog.cjs.entry.js')); }).then(processMod, consoleError);
2774
- case 'ic-empty-state.cjs':
2775
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2776
- /* webpackMode: "lazy" */
2777
- './ic-empty-state.cjs.entry.js')); }).then(processMod, consoleError);
2778
- case 'ic-footer.cjs':
2779
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2780
- /* webpackMode: "lazy" */
2781
- './ic-footer.cjs.entry.js')); }).then(processMod, consoleError);
2782
- case 'ic-footer-link.cjs':
2783
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2784
- /* webpackMode: "lazy" */
2785
- './ic-footer-link.cjs.entry.js')); }).then(processMod, consoleError);
2786
- case 'ic-footer-link-group.cjs':
2787
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2788
- /* webpackMode: "lazy" */
2789
- './ic-footer-link-group.cjs.entry.js')); }).then(processMod, consoleError);
2790
- case 'ic-hero.cjs':
2791
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2792
- /* webpackMode: "lazy" */
2793
- './ic-hero.cjs.entry.js')); }).then(processMod, consoleError);
2794
- case 'ic-menu-group.cjs':
2795
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2796
- /* webpackMode: "lazy" */
2797
- './ic-menu-group.cjs.entry.js')); }).then(processMod, consoleError);
2798
- case 'ic-navigation-button.cjs':
2799
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2800
- /* webpackMode: "lazy" */
2801
- './ic-navigation-button.cjs.entry.js')); }).then(processMod, consoleError);
2802
- case 'ic-navigation-group.cjs':
2803
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2804
- /* webpackMode: "lazy" */
2805
- './ic-navigation-group.cjs.entry.js')); }).then(processMod, consoleError);
2806
- case 'ic-navigation-item.cjs':
2807
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2808
- /* webpackMode: "lazy" */
2809
- './ic-navigation-item.cjs.entry.js')); }).then(processMod, consoleError);
2810
- case 'ic-page-header.cjs':
2811
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2812
- /* webpackMode: "lazy" */
2813
- './ic-page-header.cjs.entry.js')); }).then(processMod, consoleError);
2814
- case 'ic-pagination.cjs':
2815
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2816
- /* webpackMode: "lazy" */
2817
- './ic-pagination.cjs.entry.js')); }).then(processMod, consoleError);
2818
- case 'ic-popover-menu.cjs':
2819
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2820
- /* webpackMode: "lazy" */
2821
- './ic-popover-menu.cjs.entry.js')); }).then(processMod, consoleError);
2822
- case 'ic-radio-group.cjs':
2823
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2824
- /* webpackMode: "lazy" */
2825
- './ic-radio-group.cjs.entry.js')); }).then(processMod, consoleError);
2826
- case 'ic-radio-option.cjs':
2827
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2828
- /* webpackMode: "lazy" */
2829
- './ic-radio-option.cjs.entry.js')); }).then(processMod, consoleError);
2830
- case 'ic-search-bar.cjs':
2831
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2832
- /* webpackMode: "lazy" */
2833
- './ic-search-bar.cjs.entry.js')); }).then(processMod, consoleError);
2834
- case 'ic-select.cjs':
2835
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2836
- /* webpackMode: "lazy" */
2837
- './ic-select.cjs.entry.js')); }).then(processMod, consoleError);
2838
- case 'ic-side-navigation.cjs':
2839
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2840
- /* webpackMode: "lazy" */
2841
- './ic-side-navigation.cjs.entry.js')); }).then(processMod, consoleError);
2842
- case 'ic-skeleton.cjs':
2843
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2844
- /* webpackMode: "lazy" */
2845
- './ic-skeleton.cjs.entry.js')); }).then(processMod, consoleError);
2846
- case 'ic-status-tag.cjs':
2847
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2848
- /* webpackMode: "lazy" */
2849
- './ic-status-tag.cjs.entry.js')); }).then(processMod, consoleError);
2850
- case 'ic-step.cjs':
2851
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2852
- /* webpackMode: "lazy" */
2853
- './ic-step.cjs.entry.js')); }).then(processMod, consoleError);
2854
- case 'ic-stepper.cjs':
2855
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2856
- /* webpackMode: "lazy" */
2857
- './ic-stepper.cjs.entry.js')); }).then(processMod, consoleError);
2858
- case 'ic-switch.cjs':
2859
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2860
- /* webpackMode: "lazy" */
2861
- './ic-switch.cjs.entry.js')); }).then(processMod, consoleError);
2862
- case 'ic-tab.cjs':
2863
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2864
- /* webpackMode: "lazy" */
2865
- './ic-tab.cjs.entry.js')); }).then(processMod, consoleError);
2866
- case 'ic-tab-context.cjs':
2867
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2868
- /* webpackMode: "lazy" */
2869
- './ic-tab-context.cjs.entry.js')); }).then(processMod, consoleError);
2870
- case 'ic-tab-group.cjs':
2871
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2872
- /* webpackMode: "lazy" */
2873
- './ic-tab-group.cjs.entry.js')); }).then(processMod, consoleError);
2874
- case 'ic-tab-panel.cjs':
2875
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2876
- /* webpackMode: "lazy" */
2877
- './ic-tab-panel.cjs.entry.js')); }).then(processMod, consoleError);
2878
- case 'ic-theme.cjs':
2879
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2880
- /* webpackMode: "lazy" */
2881
- './ic-theme.cjs.entry.js')); }).then(processMod, consoleError);
2882
- case 'ic-toast.cjs':
2883
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2884
- /* webpackMode: "lazy" */
2885
- './ic-toast.cjs.entry.js')); }).then(processMod, consoleError);
2886
- case 'ic-toast-region.cjs':
2887
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2888
- /* webpackMode: "lazy" */
2889
- './ic-toast-region.cjs.entry.js')); }).then(processMod, consoleError);
2890
- case 'ic-toggle-button.cjs':
2891
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2892
- /* webpackMode: "lazy" */
2893
- './ic-toggle-button.cjs.entry.js')); }).then(processMod, consoleError);
2894
- case 'ic-toggle-button-group.cjs':
2895
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2896
- /* webpackMode: "lazy" */
2897
- './ic-toggle-button-group.cjs.entry.js')); }).then(processMod, consoleError);
2898
- case 'ic-top-navigation.cjs':
2899
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2900
- /* webpackMode: "lazy" */
2901
- './ic-top-navigation.cjs.entry.js')); }).then(processMod, consoleError);
2902
- case 'ic-breadcrumb.cjs':
2903
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2904
- /* webpackMode: "lazy" */
2905
- './ic-breadcrumb.cjs.entry.js')); }).then(processMod, consoleError);
2906
- case 'ic-divider.cjs':
2907
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2908
- /* webpackMode: "lazy" */
2909
- './ic-divider.cjs.entry.js')); }).then(processMod, consoleError);
2910
- case 'ic-menu-item.cjs':
2911
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2912
- /* webpackMode: "lazy" */
2913
- './ic-menu-item.cjs.entry.js')); }).then(processMod, consoleError);
2914
- case 'ic-navigation-menu.cjs':
2915
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2916
- /* webpackMode: "lazy" */
2917
- './ic-navigation-menu.cjs.entry.js')); }).then(processMod, consoleError);
2918
- case 'ic-pagination-item.cjs':
2919
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2920
- /* webpackMode: "lazy" */
2921
- './ic-pagination-item.cjs.entry.js')); }).then(processMod, consoleError);
2922
- case 'ic-text-field.cjs':
2923
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2924
- /* webpackMode: "lazy" */
2925
- './ic-text-field.cjs.entry.js')); }).then(processMod, consoleError);
2926
- case 'ic-input-component-container_3.cjs':
2927
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2928
- /* webpackMode: "lazy" */
2929
- './ic-input-component-container_3.cjs.entry.js')); }).then(processMod, consoleError);
2930
- case 'ic-horizontal-scroll.cjs':
2931
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2932
- /* webpackMode: "lazy" */
2933
- './ic-horizontal-scroll.cjs.entry.js')); }).then(processMod, consoleError);
2934
- case 'ic-link.cjs':
2935
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2936
- /* webpackMode: "lazy" */
2937
- './ic-link.cjs.entry.js')); }).then(processMod, consoleError);
2938
- case 'ic-input-label_2.cjs':
2939
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2940
- /* webpackMode: "lazy" */
2941
- './ic-input-label_2.cjs.entry.js')); }).then(processMod, consoleError);
2942
- case 'ic-section-container.cjs':
2943
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2944
- /* webpackMode: "lazy" */
2945
- './ic-section-container.cjs.entry.js')); }).then(processMod, consoleError);
2946
- case 'ic-button_3.cjs':
2947
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2948
- /* webpackMode: "lazy" */
2949
- './ic-button_3.cjs.entry.js')); }).then(processMod, consoleError);
2950
- case 'ic-typography.cjs':
2951
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2952
- /* webpackMode: "lazy" */
2953
- './ic-typography.cjs.entry.js')); }).then(processMod, consoleError);
2954
- }
2955
- }
2956
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2957
- /* @vite-ignore */
2958
- /* webpackInclude: /\.entry\.js$/ */
2959
- /* webpackExclude: /\.system\.entry\.js$/ */
2960
- /* webpackMode: "lazy" */
2961
- `./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
2962
- {
2963
- cmpModules.set(bundleId, importedModule);
2964
- }
2965
- return importedModule[exportName];
2966
- }, consoleError);
2967
- };
2968
- const styles = /*@__PURE__*/ new Map();
2969
- const win = typeof window !== 'undefined' ? window : {};
2970
- const doc = win.document || { head: {} };
2971
- const plt = {
2972
- $flags$: 0,
2973
- $resourcesUrl$: '',
2974
- jmp: (h) => h(),
2975
- raf: (h) => requestAnimationFrame(h),
2976
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
2977
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2978
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
2979
- };
2980
- const supportsShadow =
2981
- // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2982
- true;
2983
- const promiseResolve = (v) => Promise.resolve(v);
2984
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
2985
- try {
2986
- new CSSStyleSheet();
2987
- return typeof new CSSStyleSheet().replaceSync === 'function';
2988
- }
2989
- catch (e) { }
2990
- return false;
2991
- })()
2992
- ;
2993
- const queueDomReads = [];
2994
- const queueDomWrites = [];
2995
- const queueTask = (queue, write) => (cb) => {
2996
- queue.push(cb);
2997
- if (!queuePending) {
2998
- queuePending = true;
2999
- if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
3000
- nextTick(flush);
3001
- }
3002
- else {
3003
- plt.raf(flush);
3004
- }
3005
- }
3006
- };
3007
- const consume = (queue) => {
3008
- for (let i = 0; i < queue.length; i++) {
3009
- try {
3010
- queue[i](performance.now());
3011
- }
3012
- catch (e) {
3013
- consoleError(e);
3014
- }
3015
- }
3016
- queue.length = 0;
3017
- };
3018
- const flush = () => {
3019
- // always force a bunch of medium callbacks to run, but still have
3020
- // a throttle on how many can run in a certain time
3021
- // DOM READS!!!
3022
- consume(queueDomReads);
3023
- // DOM WRITES!!!
3024
- {
3025
- consume(queueDomWrites);
3026
- if ((queuePending = queueDomReads.length > 0)) {
3027
- // still more to do yet, but we've run out of time
3028
- // let's let this thing cool off and try again in the next tick
3029
- plt.raf(flush);
3030
- }
3031
- }
3032
- };
3033
- const nextTick = (cb) => promiseResolve().then(cb);
3034
- const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
3035
-
3036
- exports.Fragment = Fragment;
3037
- exports.Host = Host;
3038
- exports.bootstrapLazy = bootstrapLazy;
3039
- exports.createEvent = createEvent;
3040
- exports.forceUpdate = forceUpdate;
3041
- exports.getElement = getElement;
3042
- exports.h = h;
3043
- exports.promiseResolve = promiseResolve;
3044
- exports.registerInstance = registerInstance;
3045
- exports.setNonce = setNonce;
3046
-
3047
- //# sourceMappingURL=index-f982899d.js.map