@cscfi/csc-ui 2.2.5 → 2.2.7

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