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