@ionic/core 8.8.14-dev.11784216165.1ecbf364 → 8.8.14-dev.11784222473.142aed23

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 (360) hide show
  1. package/components/index.js +1 -1
  2. package/components/ion-action-sheet.js +1 -1
  3. package/components/ion-alert.js +1 -1
  4. package/components/ion-back-button.js +1 -1
  5. package/components/ion-button.js +1 -1
  6. package/components/ion-card.js +1 -1
  7. package/components/ion-chip.js +1 -1
  8. package/components/ion-datetime-button.js +1 -1
  9. package/components/ion-datetime.js +1 -1
  10. package/components/ion-fab-button.js +1 -1
  11. package/components/ion-img.js +1 -1
  12. package/components/ion-infinite-scroll-content.js +1 -1
  13. package/components/ion-input-password-toggle.js +1 -1
  14. package/components/ion-input.js +1 -1
  15. package/components/ion-item-option.js +1 -1
  16. package/components/ion-item.js +1 -1
  17. package/components/ion-loading.js +1 -1
  18. package/components/ion-menu-button.js +1 -1
  19. package/components/ion-menu.js +1 -1
  20. package/components/ion-modal.js +1 -1
  21. package/components/ion-nav.js +1 -1
  22. package/components/ion-picker-legacy-column.d.ts +11 -0
  23. package/components/ion-picker-legacy-column.js +4 -0
  24. package/components/ion-picker-legacy.d.ts +11 -0
  25. package/components/ion-picker-legacy.js +4 -0
  26. package/components/ion-popover.js +1 -1
  27. package/components/ion-progress-bar.js +1 -1
  28. package/components/ion-radio.js +1 -1
  29. package/components/ion-range.js +1 -1
  30. package/components/ion-refresher-content.js +1 -1
  31. package/components/ion-refresher.js +1 -1
  32. package/components/ion-reorder-group.js +1 -1
  33. package/components/ion-reorder.js +1 -1
  34. package/components/ion-ripple-effect.js +1 -1
  35. package/components/ion-router-link.js +1 -1
  36. package/components/ion-router-outlet.js +1 -1
  37. package/components/ion-router.js +1 -1
  38. package/components/ion-row.js +1 -1
  39. package/components/ion-searchbar.js +1 -1
  40. package/components/ion-segment-button.js +1 -1
  41. package/components/ion-segment-content.js +1 -1
  42. package/components/ion-segment-view.js +1 -1
  43. package/components/ion-segment.js +1 -1
  44. package/components/ion-select-modal.js +1 -1
  45. package/components/ion-select-option.js +1 -1
  46. package/components/ion-select-popover.js +1 -1
  47. package/components/ion-select.js +1 -1
  48. package/components/ion-skeleton-text.js +1 -1
  49. package/components/ion-spinner.js +1 -1
  50. package/components/ion-split-pane.js +1 -1
  51. package/components/ion-tab-bar.js +1 -1
  52. package/components/ion-tab-button.js +1 -1
  53. package/components/ion-tab.js +1 -1
  54. package/components/ion-tabs.js +1 -1
  55. package/components/ion-text.js +1 -1
  56. package/components/ion-textarea.js +1 -1
  57. package/components/ion-thumbnail.js +1 -1
  58. package/components/ion-title.js +1 -1
  59. package/components/ion-toast.js +1 -1
  60. package/components/ion-toggle.js +1 -1
  61. package/components/ion-toolbar.js +1 -1
  62. package/components/p-3hGiN2uq.js +4 -0
  63. package/components/{p-DpV-p5Xs.js → p-5bE_Wz4Y.js} +1 -1
  64. package/components/{p-r0aq7dpt.js → p-B60hm8Qv.js} +1 -1
  65. package/components/{p-Buf_7zcy.js → p-BHrrc-3d.js} +1 -1
  66. package/components/p-BIPPbW0M.js +4 -0
  67. package/components/{p-XJWMAP8m.js → p-BLmJ0zRm.js} +1 -1
  68. package/components/{p-DhkITZ-y.js → p-BSEgsdFI.js} +1 -1
  69. package/components/p-BUYFy35a.js +4 -0
  70. package/components/p-BWEZufiK.js +4 -0
  71. package/components/p-BqpciLfi.js +4 -0
  72. package/components/p-BsQPAqo9.js +4 -0
  73. package/components/p-CU5rbWAW.js +4 -0
  74. package/components/{p-Dz74mwlk.js → p-Cfx4M1Bn.js} +1 -1
  75. package/components/p-k_E4tX5Z.js +4 -0
  76. package/components/p-nyXeHk23.js +4 -0
  77. package/components/{p-wk2QqrAo.js → p-rCa2eL0j.js} +1 -1
  78. package/dist/cjs/config-xninhj0J.js +201 -0
  79. package/dist/cjs/index.cjs.js +6 -6
  80. package/dist/cjs/ion-action-sheet.cjs.entry.js +7 -27
  81. package/dist/cjs/ion-alert.cjs.entry.js +25 -64
  82. package/dist/cjs/ion-app_8.cjs.entry.js +9 -23
  83. package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
  84. package/dist/cjs/ion-col_3.cjs.entry.js +1 -1
  85. package/dist/cjs/{ion-datetime.cjs.entry.js → ion-datetime_3.cjs.entry.js} +639 -1
  86. package/dist/cjs/ion-img.cjs.entry.js +1 -3
  87. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -3
  88. package/dist/cjs/ion-input.cjs.entry.js +4 -4
  89. package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
  90. package/dist/cjs/ion-loading.cjs.entry.js +5 -10
  91. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  92. package/dist/cjs/ion-modal.cjs.entry.js +18 -23
  93. package/dist/cjs/ion-nav_2.cjs.entry.js +115 -2
  94. package/dist/cjs/ion-popover.cjs.entry.js +5 -9
  95. package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
  96. package/dist/cjs/ion-radio_2.cjs.entry.js +3 -3
  97. package/dist/cjs/ion-range.cjs.entry.js +3 -3
  98. package/dist/cjs/ion-refresher_2.cjs.entry.js +5 -6
  99. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  100. package/dist/cjs/ion-ripple-effect.cjs.entry.js +1 -1
  101. package/dist/cjs/ion-route_4.cjs.entry.js +4 -18
  102. package/dist/cjs/ion-searchbar.cjs.entry.js +5 -5
  103. package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
  104. package/dist/cjs/ion-segment-view.cjs.entry.js +2 -2
  105. package/dist/cjs/ion-segment_2.cjs.entry.js +4 -4
  106. package/dist/cjs/ion-select-modal.cjs.entry.js +30 -84
  107. package/dist/cjs/ion-select_3.cjs.entry.js +49 -407
  108. package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
  109. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  110. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
  111. package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
  112. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  113. package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
  114. package/dist/cjs/ion-toast.cjs.entry.js +5 -6
  115. package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
  116. package/dist/cjs/ionic.cjs.js +1 -1
  117. package/dist/cjs/loader.cjs.js +1 -1
  118. package/dist/cjs/{overlays-DSmSrd_4.js → overlays-DdtIYQUH.js} +31 -27
  119. package/dist/collection/collection-manifest.json +10 -6
  120. package/dist/collection/components/action-sheet/action-sheet.ios.css +2 -229
  121. package/dist/collection/components/action-sheet/action-sheet.js +5 -24
  122. package/dist/collection/components/action-sheet/action-sheet.md.css +2 -175
  123. package/dist/collection/components/alert/alert.ios.css +10 -280
  124. package/dist/collection/components/alert/alert.js +21 -59
  125. package/dist/collection/components/alert/alert.md.css +20 -269
  126. package/dist/collection/components/img/img.js +1 -6
  127. package/dist/collection/components/input/input.js +8 -8
  128. package/dist/collection/components/loading/loading.js +3 -7
  129. package/dist/collection/components/modal/modal.ios.css +8 -0
  130. package/dist/collection/components/modal/modal.js +18 -23
  131. package/dist/collection/components/modal/modal.md.css +8 -0
  132. package/dist/collection/components/nav/nav.js +219 -4
  133. package/dist/collection/components/picker-legacy/animations/ios.enter.js +27 -0
  134. package/dist/collection/components/picker-legacy/animations/ios.leave.js +23 -0
  135. package/dist/collection/components/picker-legacy/picker-interface.js +1 -0
  136. package/dist/collection/components/picker-legacy/picker.ios.css +300 -0
  137. package/dist/collection/components/picker-legacy/picker.js +890 -0
  138. package/dist/collection/components/picker-legacy/picker.md.css +287 -0
  139. package/dist/collection/components/picker-legacy-column/picker-column.ios.css +231 -0
  140. package/dist/collection/components/picker-legacy-column/picker-column.js +422 -0
  141. package/dist/collection/components/picker-legacy-column/picker-column.md.css +222 -0
  142. package/dist/collection/components/picker-legacy-column/test/test.utils.js +43 -0
  143. package/dist/collection/components/popover/popover.ios.css +0 -15
  144. package/dist/collection/components/popover/popover.js +3 -7
  145. package/dist/collection/components/popover/popover.md.css +0 -15
  146. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  147. package/dist/collection/components/radio/radio.js +4 -4
  148. package/dist/collection/components/range/range.js +3 -3
  149. package/dist/collection/components/refresher/refresher.js +1 -1
  150. package/dist/collection/components/refresher-content/refresher-content.js +1 -1
  151. package/dist/collection/components/reorder/reorder.js +1 -1
  152. package/dist/collection/components/reorder-group/reorder-group.js +1 -1
  153. package/dist/collection/components/ripple-effect/ripple-effect.js +1 -1
  154. package/dist/collection/components/route/route.js +1 -1
  155. package/dist/collection/components/router/utils/dom.js +3 -22
  156. package/dist/collection/components/router-link/router-link.js +2 -2
  157. package/dist/collection/components/router-outlet/router-outlet.js +5 -38
  158. package/dist/collection/components/row/row.js +1 -1
  159. package/dist/collection/components/searchbar/searchbar.js +9 -9
  160. package/dist/collection/components/segment/segment.js +2 -2
  161. package/dist/collection/components/segment-button/segment-button.js +2 -2
  162. package/dist/collection/components/segment-content/segment-content.js +1 -1
  163. package/dist/collection/components/segment-view/segment-view.js +2 -2
  164. package/dist/collection/components/select/select.ios.css +0 -33
  165. package/dist/collection/components/select/select.js +16 -323
  166. package/dist/collection/components/select/select.md.css +0 -33
  167. package/dist/collection/components/select-modal/select-modal.ios.css +0 -219
  168. package/dist/collection/components/select-modal/select-modal.js +26 -79
  169. package/dist/collection/components/select-modal/select-modal.md.css +0 -165
  170. package/dist/collection/components/select-option/select-option.js +3 -67
  171. package/dist/collection/components/select-popover/select-popover.ios.css +0 -219
  172. package/dist/collection/components/select-popover/select-popover.js +26 -78
  173. package/dist/collection/components/select-popover/select-popover.md.css +0 -165
  174. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
  175. package/dist/collection/components/spinner/spinner.js +1 -1
  176. package/dist/collection/components/split-pane/split-pane.js +2 -2
  177. package/dist/collection/components/tab/tab.js +2 -2
  178. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  179. package/dist/collection/components/tab-button/tab-button.js +2 -2
  180. package/dist/collection/components/tabs/tabs.js +1 -1
  181. package/dist/collection/components/text/text.js +2 -2
  182. package/dist/collection/components/textarea/textarea.js +2 -2
  183. package/dist/collection/components/thumbnail/thumbnail.js +1 -1
  184. package/dist/collection/components/title/title.js +2 -2
  185. package/dist/collection/components/toast/toast.js +2 -2
  186. package/dist/collection/components/toggle/toggle.js +3 -3
  187. package/dist/collection/components/toolbar/toolbar.js +2 -2
  188. package/dist/collection/index.js +1 -1
  189. package/dist/collection/utils/overlays.js +30 -26
  190. package/dist/collection/utils/sanitization/index.js +18 -274
  191. package/dist/docs.json +1189 -497
  192. package/dist/esm/config-DQCONYYp.js +195 -0
  193. package/dist/esm/{index-AlrZKoWR.js → index-DV3sJJW8.js} +1 -1
  194. package/dist/esm/index.js +2 -3
  195. package/dist/esm/ion-accordion_2.entry.js +1 -1
  196. package/dist/esm/ion-action-sheet.entry.js +7 -27
  197. package/dist/esm/ion-alert.entry.js +24 -63
  198. package/dist/esm/ion-app_8.entry.js +9 -23
  199. package/dist/esm/ion-avatar_3.entry.js +1 -1
  200. package/dist/esm/ion-back-button.entry.js +1 -1
  201. package/dist/esm/ion-breadcrumb_2.entry.js +1 -1
  202. package/dist/esm/ion-col_3.entry.js +1 -1
  203. package/dist/esm/{ion-datetime.entry.js → ion-datetime_3.entry.js} +641 -5
  204. package/dist/esm/ion-fab_3.entry.js +1 -1
  205. package/dist/esm/ion-img.entry.js +2 -4
  206. package/dist/esm/ion-infinite-scroll_2.entry.js +1 -2
  207. package/dist/esm/ion-input-password-toggle.entry.js +1 -1
  208. package/dist/esm/ion-input.entry.js +5 -5
  209. package/dist/esm/ion-item_8.entry.js +3 -3
  210. package/dist/esm/ion-loading.entry.js +4 -9
  211. package/dist/esm/ion-menu_3.entry.js +2 -2
  212. package/dist/esm/ion-modal.entry.js +18 -23
  213. package/dist/esm/ion-nav_2.entry.js +116 -3
  214. package/dist/esm/ion-popover.entry.js +5 -9
  215. package/dist/esm/ion-progress-bar.entry.js +1 -1
  216. package/dist/esm/ion-radio_2.entry.js +3 -3
  217. package/dist/esm/ion-range.entry.js +3 -3
  218. package/dist/esm/ion-refresher_2.entry.js +4 -5
  219. package/dist/esm/ion-reorder_2.entry.js +3 -3
  220. package/dist/esm/ion-ripple-effect.entry.js +1 -1
  221. package/dist/esm/ion-route_4.entry.js +4 -18
  222. package/dist/esm/ion-searchbar.entry.js +6 -6
  223. package/dist/esm/ion-segment-content.entry.js +1 -1
  224. package/dist/esm/ion-segment-view.entry.js +2 -2
  225. package/dist/esm/ion-segment_2.entry.js +4 -4
  226. package/dist/esm/ion-select-modal.entry.js +30 -84
  227. package/dist/esm/ion-select_3.entry.js +52 -410
  228. package/dist/esm/ion-spinner.entry.js +1 -1
  229. package/dist/esm/ion-split-pane.entry.js +2 -2
  230. package/dist/esm/ion-tab-bar_2.entry.js +4 -4
  231. package/dist/esm/ion-tab_2.entry.js +3 -3
  232. package/dist/esm/ion-text.entry.js +2 -2
  233. package/dist/esm/ion-textarea.entry.js +2 -2
  234. package/dist/esm/ion-toast.entry.js +4 -5
  235. package/dist/esm/ion-toggle.entry.js +4 -4
  236. package/dist/esm/ionic.js +1 -1
  237. package/dist/esm/loader.js +1 -1
  238. package/dist/esm/{overlays-DLNOHWNc.js → overlays-Dg0q2_tJ.js} +32 -28
  239. package/dist/html.html-data.json +80 -52
  240. package/dist/ionic/index.esm.js +1 -1
  241. package/dist/ionic/ionic.esm.js +1 -1
  242. package/dist/ionic/p-01f81ea5.entry.js +4 -0
  243. package/dist/ionic/p-0cc11f99.entry.js +4 -0
  244. package/dist/ionic/p-0dc33652.entry.js +4 -0
  245. package/dist/ionic/{p-fe4aa1db.entry.js → p-0fa9c382.entry.js} +1 -1
  246. package/dist/ionic/p-20b1a044.entry.js +4 -0
  247. package/dist/ionic/p-21eb76d5.entry.js +4 -0
  248. package/dist/ionic/p-27d30585.entry.js +4 -0
  249. package/dist/ionic/p-2a05aa64.entry.js +4 -0
  250. package/dist/ionic/p-2bb2cb18.entry.js +4 -0
  251. package/dist/ionic/{p-80b44b3c.entry.js → p-3353c229.entry.js} +1 -1
  252. package/dist/ionic/{p-c93553d2.entry.js → p-34586ead.entry.js} +1 -1
  253. package/dist/ionic/{p-a7628bc7.entry.js → p-37e720da.entry.js} +1 -1
  254. package/dist/ionic/{p-9177f4ac.entry.js → p-390ca786.entry.js} +1 -1
  255. package/dist/ionic/{p-259d0d98.entry.js → p-3a126bca.entry.js} +1 -1
  256. package/dist/ionic/{p-4502a274.entry.js → p-3a7d1e91.entry.js} +1 -1
  257. package/dist/ionic/{p-627fabd9.entry.js → p-3ae5f277.entry.js} +1 -1
  258. package/dist/ionic/{p-a5213260.entry.js → p-4858af1f.entry.js} +1 -1
  259. package/dist/ionic/p-485fda23.entry.js +4 -0
  260. package/dist/ionic/p-4baa5b82.entry.js +4 -0
  261. package/dist/ionic/p-5018dfc8.entry.js +4 -0
  262. package/dist/ionic/p-50e1194a.entry.js +4 -0
  263. package/dist/ionic/{p-76e92a84.entry.js → p-5d1da0a2.entry.js} +1 -1
  264. package/dist/ionic/p-5eb8e86d.entry.js +4 -0
  265. package/dist/ionic/p-65ebdf1b.entry.js +4 -0
  266. package/dist/ionic/p-6ebdbebe.entry.js +4 -0
  267. package/dist/ionic/{p-d2c7f046.entry.js → p-75dc25ba.entry.js} +1 -1
  268. package/dist/ionic/{p-b9ac1fe0.entry.js → p-84d5ce05.entry.js} +1 -1
  269. package/dist/ionic/{p-51cd1643.entry.js → p-874b4bd8.entry.js} +1 -1
  270. package/dist/ionic/{p-ef93ca92.entry.js → p-8eb8ee76.entry.js} +1 -1
  271. package/dist/ionic/p-8fce95d5.entry.js +4 -0
  272. package/dist/ionic/{p-db1b6738.entry.js → p-9a65ac7f.entry.js} +1 -1
  273. package/dist/ionic/{p-7a37b3ce.entry.js → p-9f1103ce.entry.js} +1 -1
  274. package/dist/ionic/p-9f9db3a2.entry.js +4 -0
  275. package/dist/ionic/p-D-3ycHmd.js +4 -0
  276. package/dist/ionic/{p-AlrZKoWR.js → p-DV3sJJW8.js} +1 -1
  277. package/dist/ionic/p-DzWaWHGc.js +4 -0
  278. package/dist/ionic/p-a21add2f.entry.js +4 -0
  279. package/dist/ionic/{p-d8387b99.entry.js → p-c4d8641b.entry.js} +1 -1
  280. package/dist/ionic/p-ca2ab74d.entry.js +4 -0
  281. package/dist/ionic/{p-629e4703.entry.js → p-e0be05c5.entry.js} +1 -1
  282. package/dist/ionic/p-ec090e0a.entry.js +4 -0
  283. package/dist/ionic/{p-b1599fca.entry.js → p-ef4c3bee.entry.js} +1 -1
  284. package/dist/ionic/p-f386f6ae.entry.js +4 -0
  285. package/dist/ionic/{p-341032b3.entry.js → p-fabcce6c.entry.js} +1 -1
  286. package/dist/types/components/img/img.d.ts +0 -2
  287. package/dist/types/components/input/input.d.ts +1 -1
  288. package/dist/types/components/modal/modal.d.ts +4 -11
  289. package/dist/types/components/nav/nav-interface.d.ts +1 -0
  290. package/dist/types/components/nav/nav.d.ts +22 -2
  291. package/dist/types/components/picker-legacy/animations/ios.enter.d.ts +5 -0
  292. package/dist/types/components/picker-legacy/animations/ios.leave.d.ts +5 -0
  293. package/dist/types/components/picker-legacy/picker-interface.d.ts +52 -0
  294. package/dist/types/components/picker-legacy/picker.d.ts +158 -0
  295. package/dist/types/components/picker-legacy-column/picker-column.d.ts +46 -0
  296. package/dist/types/components/picker-legacy-column/test/test.utils.d.ts +9 -0
  297. package/dist/types/components/route/route.d.ts +1 -1
  298. package/dist/types/components/router-outlet/router-outlet.d.ts +0 -7
  299. package/dist/types/components/searchbar/searchbar.d.ts +1 -1
  300. package/dist/types/components/select/select-interface.d.ts +0 -31
  301. package/dist/types/components/select/select.d.ts +0 -18
  302. package/dist/types/components/select-option/select-option.d.ts +1 -42
  303. package/dist/types/components.d.ts +303 -74
  304. package/dist/types/index.d.ts +1 -1
  305. package/dist/types/interface.d.ts +1 -0
  306. package/dist/types/utils/config.d.ts +8 -0
  307. package/dist/types/utils/overlays.d.ts +9 -11
  308. package/dist/types/utils/sanitization/index.d.ts +2 -58
  309. package/hydrate/index.js +1268 -1400
  310. package/hydrate/index.mjs +1268 -1400
  311. package/package.json +5 -37
  312. package/components/p-279dFMvg.js +0 -4
  313. package/components/p-BSQPZ79H.js +0 -4
  314. package/components/p-BwKpO3Is.js +0 -4
  315. package/components/p-C-Rx1zny.js +0 -4
  316. package/components/p-CHzfYZbv.js +0 -4
  317. package/components/p-D4h1H_hh.js +0 -4
  318. package/components/p-LMGfIvTf.js +0 -4
  319. package/components/p-_lHSumhG.js +0 -4
  320. package/components/p-j9Da6cYO.js +0 -4
  321. package/components/p-jOtMJMv8.js +0 -4
  322. package/components/p-uTR_dEqg.js +0 -4
  323. package/dist/cjs/config-DWdFbSNK.js +0 -35
  324. package/dist/cjs/index-Cueg3U4w.js +0 -429
  325. package/dist/cjs/overlay-control-label-D2sdL2O8.js +0 -50
  326. package/dist/cjs/select-option-render-DTF50t5r.js +0 -124
  327. package/dist/collection/utils/overlay-control-label.js +0 -45
  328. package/dist/collection/utils/select-option-render.js +0 -119
  329. package/dist/esm/config-BwKpO3Is.js +0 -31
  330. package/dist/esm/index-DQSkZyOJ.js +0 -424
  331. package/dist/esm/overlay-control-label-BSQPZ79H.js +0 -47
  332. package/dist/esm/select-option-render-B8nWZRnd.js +0 -122
  333. package/dist/ionic/p-038eb991.entry.js +0 -4
  334. package/dist/ionic/p-4621c387.entry.js +0 -4
  335. package/dist/ionic/p-4ace7762.entry.js +0 -4
  336. package/dist/ionic/p-4bb3eb60.entry.js +0 -4
  337. package/dist/ionic/p-4e9ec5c5.entry.js +0 -4
  338. package/dist/ionic/p-5c3ec490.entry.js +0 -4
  339. package/dist/ionic/p-5d1ac2c7.entry.js +0 -4
  340. package/dist/ionic/p-700795f6.entry.js +0 -4
  341. package/dist/ionic/p-79a36078.entry.js +0 -4
  342. package/dist/ionic/p-913b218a.entry.js +0 -4
  343. package/dist/ionic/p-BDtODLZ4.js +0 -4
  344. package/dist/ionic/p-BSQPZ79H.js +0 -4
  345. package/dist/ionic/p-BwKpO3Is.js +0 -4
  346. package/dist/ionic/p-Cg5-OQYy.js +0 -4
  347. package/dist/ionic/p-DCOvXkOm.js +0 -4
  348. package/dist/ionic/p-a18dcb3c.entry.js +0 -4
  349. package/dist/ionic/p-a9a33367.entry.js +0 -4
  350. package/dist/ionic/p-ad728198.entry.js +0 -4
  351. package/dist/ionic/p-bfc8c629.entry.js +0 -4
  352. package/dist/ionic/p-c08e666a.entry.js +0 -4
  353. package/dist/ionic/p-c474f471.entry.js +0 -4
  354. package/dist/ionic/p-ce7992c4.entry.js +0 -4
  355. package/dist/ionic/p-ed797c72.entry.js +0 -4
  356. package/dist/ionic/p-f09f9642.entry.js +0 -4
  357. package/dist/ionic/p-f1c06f82.entry.js +0 -4
  358. package/dist/ionic/p-f718fccb.entry.js +0 -4
  359. package/dist/types/utils/overlay-control-label.d.ts +0 -32
  360. package/dist/types/utils/select-option-render.d.ts +0 -53
@@ -5,7 +5,7 @@ import { Host, h } from "@stencil/core";
5
5
  import { getIonMode } from "../../global/ionic-global";
6
6
  export class Thumbnail {
7
7
  render() {
8
- return (h(Host, { key: '833e947c683b482a78f8f0df8c9a68e99478bbaa', class: getIonMode(this) }, h("slot", { key: '6d1e9e686db88d91379f14121058dbf035d8ded2' })));
8
+ return (h(Host, { key: 'b250e01664238f1dca8f9757b15bc3d5d9387ffa', class: getIonMode(this) }, h("slot", { key: '72cb568bccabc983c5186a7596ef6c6d4ebf5ad9' })));
9
9
  }
10
10
  static get is() { return "ion-thumbnail"; }
11
11
  static get encapsulation() { return "shadow"; }
@@ -23,11 +23,11 @@ export class ToolbarTitle {
23
23
  render() {
24
24
  const mode = getIonMode(this);
25
25
  const size = this.getSize();
26
- return (h(Host, { key: 'd9317e8e66cb6112717f5a9c252658777efbd873', class: createColorClasses(this.color, {
26
+ return (h(Host, { key: '44e63f8439df64c470692904427b417e19406476', class: createColorClasses(this.color, {
27
27
  [mode]: true,
28
28
  [`title-${size}`]: true,
29
29
  'title-rtl': document.dir === 'rtl',
30
- }) }, h("div", { key: 'a4d011d6d409bf006d8efe33667002edb109820a', class: "toolbar-title" }, h("slot", { key: '4ca3303b957a0e5387f1e9058e5adb4c6275afcc' }))));
30
+ }) }, h("div", { key: '784cf60a0db16045391891cc8fad0c7dbeba4039', class: "toolbar-title" }, h("slot", { key: '0c720a50479ba257e8756337aeb9b0ab7516a227' }))));
31
31
  }
32
32
  static get is() { return "ion-title"; }
33
33
  static get encapsulation() { return "shadow"; }
@@ -417,9 +417,9 @@ export class Toast {
417
417
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
418
418
  printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
419
419
  }
420
- return (h(Host, Object.assign({ key: '2acb2cd2e12ea0082986495929e4a596d4da2f38', tabindex: "-1" }, this.htmlAttributes, { style: {
420
+ return (h(Host, Object.assign({ key: 'b5256edcf33d0ef51e6c5080c84e1ca58abe2ae0', tabindex: "-1" }, this.htmlAttributes, { style: {
421
421
  zIndex: `${60000 + this.overlayIndex}`,
422
- }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '8b24ba5d3d51d1ab94b9bf6bb5d6e4b8bb3248a7', class: wrapperClass, part: "wrapper" }, h("div", { key: 'e1ebdf4f0425cc7b1e2688667ee9a2b3c545804a', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '552b1ab8f4e72882cc8e878579c7a594119677e1', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '8ac8d64f632fbedadb180132c83043474466bee0', class: "toast-content", part: "content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
422
+ }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '0860f7e895d8bc66e44c4d924ca569f4cbb1a749', class: wrapperClass, part: "wrapper" }, h("div", { key: '28784199c880a3f664677c8f5560b7caa8903251', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '0a63ba1336ad43d2aec14e49055eb46c112359c2', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: 'ecec8107af582dc55d4b3828dd7f3054a29f26b1', class: "toast-content", part: "content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
423
423
  }
424
424
  static get is() { return "ion-toast"; }
425
425
  static get encapsulation() { return "shadow"; }
@@ -287,7 +287,7 @@ export class Toggle {
287
287
  const value = this.getValue();
288
288
  const rtl = isRTL(el) ? 'rtl' : 'ltr';
289
289
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
290
- return (h(Host, { key: 'ab093ddb505af61685cbb8571af1e765fc0292f8', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, class: createColorClasses(color, {
290
+ return (h(Host, { key: '736e1dcfca34fd41f6f0632652e7f86d6996a232', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, class: createColorClasses(color, {
291
291
  [mode]: true,
292
292
  'in-item': hostContext('ion-item', el),
293
293
  'toggle-activated': activated,
@@ -297,10 +297,10 @@ export class Toggle {
297
297
  [`toggle-alignment-${alignment}`]: alignment !== undefined,
298
298
  [`toggle-label-placement-${labelPlacement}`]: true,
299
299
  [`toggle-${rtl}`]: true,
300
- }) }, h("label", { key: 'b4b05e458fcbc767e4392ae43e647b075780cad0', class: "toggle-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: 'c09100447011c51d5b49b4400ec7d72012e3bc6f', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), h("div", { key: '71cf059a999ae572a20127b76907e010ace486ad', class: {
300
+ }) }, h("label", { key: 'e697739fd3964c1c6c23331cf7e38a9841c46a6a', class: "toggle-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: '3d500b8c1bc879591249d183c1abb3f5f26aff6b', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), h("div", { key: 'e38f3fe0e66b4ca434fd81514f5ef771c2960841', class: {
301
301
  'label-text-wrapper': true,
302
302
  'label-text-wrapper-hidden': !hasLabel,
303
- }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: 'c480b96a0ddd926568f73291d71253d6f74438c7' }), this.renderHintText()), h("div", { key: '96a2cbd1673e051a78f8b2b16535ecd3f0ed4339', class: "native-wrapper" }, this.renderToggleControl()))));
303
+ }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '006dd3558264d69ab020c07005b348adc4ecdd5b' }), this.renderHintText()), h("div", { key: 'dd4e52de31caabee41ec1bc58efecd1e213368c9', class: "native-wrapper" }, this.renderToggleControl()))));
304
304
  }
305
305
  static get is() { return "ion-toggle"; }
306
306
  static get encapsulation() { return "shadow"; }
@@ -65,10 +65,10 @@ export class Toolbar {
65
65
  this.childrenStyles.forEach((value) => {
66
66
  Object.assign(childStyles, value);
67
67
  });
68
- return (h(Host, { key: '40bad6fa7e94262438da4bbe037dcf8a5fa2df22', class: Object.assign(Object.assign({}, childStyles), createColorClasses(this.color, {
68
+ return (h(Host, { key: 'b849db2863778dee6c5a251bffa1b3a657aeb036', class: Object.assign(Object.assign({}, childStyles), createColorClasses(this.color, {
69
69
  [mode]: true,
70
70
  'in-toolbar': hostContext('ion-toolbar', this.el),
71
- })) }, h("div", { key: 'df44c9f0fe3958116ab860b0dad79c53b89f6c59', class: "toolbar-background", part: "background" }), h("div", { key: '2169ffa576875b8d5624211cc0b4bf86191562bc', class: "toolbar-container", part: "container" }, h("slot", { key: 'c8910dcf1ce98ab427fd89c3396a67c2a75bdd07', name: "start" }), h("slot", { key: '05da24d5ef96b9eebd83b534ce02c1f7bcd06680', name: "secondary" }), h("div", { key: '090fea1541e7e2b6ad74a6ded4eadffdb471ccce', class: "toolbar-content", part: "content" }, h("slot", { key: '507e143f92f6fa59ff23d94026411fa2c74f2f8e' })), h("slot", { key: 'f79fdee472e657e26a910cb89d7551943e40e440', name: "primary" }), h("slot", { key: 'dd40fe9ed490cf4346c642e195fdb524dc6cc4f5', name: "end" }))));
71
+ })) }, h("div", { key: '67f5bba9c4f527c3f35bfe1313a2b85741f9b246', class: "toolbar-background", part: "background" }), h("div", { key: '085e8c68f056e5b0deb9d1606431fbeb45dae8e5', class: "toolbar-container", part: "container" }, h("slot", { key: '15227c79c3baf883fd8c43fdb7e1313453933c79', name: "start" }), h("slot", { key: '0b8a7f7e685aa31c80d9bc03446ccc3a9d07e0e8', name: "secondary" }), h("div", { key: '57e4628c1fa89df79dd80456259db961bb691404', class: "toolbar-content", part: "content" }, h("slot", { key: '82c2f6e1acf8d96db259bd8baf295881801edbd5' })), h("slot", { key: 'b2d4afb15214199f206c0a5e08b581e4c9c2f58a', name: "primary" }), h("slot", { key: 'bfb909a0c472f8834046c2ea23bef2f562167ad3', name: "end" }))));
72
72
  }
73
73
  static get is() { return "ion-toolbar"; }
74
74
  static get encapsulation() { return "shadow"; }
@@ -17,5 +17,5 @@ export { getMode, setupConfig } from './utils/config';
17
17
  export { openURL } from './utils/theme';
18
18
  export { LIFECYCLE_WILL_ENTER, LIFECYCLE_DID_ENTER, LIFECYCLE_WILL_LEAVE, LIFECYCLE_DID_LEAVE, LIFECYCLE_WILL_UNLOAD, } from './components/nav/constants';
19
19
  export { menuController } from './utils/menu-controller';
20
- export { alertController, actionSheetController, modalController, loadingController, popoverController, toastController, } from './utils/overlays';
20
+ export { alertController, actionSheetController, modalController, loadingController, pickerController, popoverController, toastController, } from './utils/overlays';
21
21
  export { IonicSlides } from './components/slides/IonicSlides';
@@ -39,6 +39,10 @@ export const alertController = /*@__PURE__*/ createController('ion-alert');
39
39
  export const actionSheetController = /*@__PURE__*/ createController('ion-action-sheet');
40
40
  export const loadingController = /*@__PURE__*/ createController('ion-loading');
41
41
  export const modalController = /*@__PURE__*/ createController('ion-modal');
42
+ /**
43
+ * @deprecated Use the inline ion-picker component instead.
44
+ */
45
+ export const pickerController = /*@__PURE__*/ createController('ion-picker-legacy');
42
46
  export const popoverController = /*@__PURE__*/ createController('ion-popover');
43
47
  export const toastController = /*@__PURE__*/ createController('ion-toast');
44
48
  /**
@@ -132,7 +136,7 @@ const focusElementInOverlay = (hostToFocus, overlay) => {
132
136
  * Should NOT include: Toast
133
137
  */
134
138
  const trapKeyboardFocus = (ev, doc) => {
135
- const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover');
139
+ const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover');
136
140
  const target = ev.target;
137
141
  /**
138
142
  * If no active overlay, ignore this event.
@@ -366,7 +370,7 @@ export const dismissOverlay = (doc, data, role, overlayTag, id) => {
366
370
  */
367
371
  export const getOverlays = (doc, selector) => {
368
372
  if (selector === undefined) {
369
- selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover,ion-toast';
373
+ selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast';
370
374
  }
371
375
  return Array.from(doc.querySelectorAll(selector)).filter((c) => c.overlayIndex > 0);
372
376
  };
@@ -428,29 +432,6 @@ export const setRootAriaHidden = (hidden = false) => {
428
432
  viewContainer.removeAttribute('aria-hidden');
429
433
  }
430
434
  };
431
- /**
432
- * Cleans up root `aria-hidden` and `backdrop-no-scroll` when
433
- * an overlay is removed from the DOM without going through
434
- * the `dismiss()` flow (e.g., when a framework unmounts the
435
- * overlay during a route change).
436
- *
437
- * Should be called from an overlay's `disconnectedCallback`
438
- * when the overlay was still presented at the time of removal.
439
- */
440
- export const cleanupRootFocusTrapAccessibility = () => {
441
- if (typeof document === 'undefined') {
442
- return;
443
- }
444
- const remainingOverlays = getPresentedOverlays(document);
445
- const hasRemainingLocking = remainingOverlays.some((o) => {
446
- const el = o;
447
- return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && isBackdropAlwaysBlocking(el);
448
- });
449
- if (!hasRemainingLocking) {
450
- setRootAriaHidden(false);
451
- document.body.classList.remove(BACKDROP_NO_SCROLL);
452
- }
453
- };
454
435
  export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
455
436
  var _a, _b;
456
437
  if (overlay.presented) {
@@ -516,7 +497,30 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
516
497
  * to the overlay container.
517
498
  */
518
499
  if (overlay.keyboardClose && (document.activeElement === null || !overlay.el.contains(document.activeElement))) {
519
- overlay.el.focus();
500
+ /**
501
+ * Some overlays (e.g. modal) put the dialog role and accessible label
502
+ * on the `.ion-overlay-wrapper` instead of the host. Screen readers
503
+ * need focus on the element with `role="dialog"` to properly announce
504
+ * and navigate the dialog.
505
+ *
506
+ * We only target wrappers with `tabindex`, since `role="dialog"` alone
507
+ * does not make an element focusable. If no focusable dialog wrapper
508
+ * exists (e.g. picker-legacy), we fall back to the host.
509
+ */
510
+ const overlayWrapper = getElementRoot(overlay.el).querySelector('[role="dialog"][tabindex]');
511
+ const focusTarget = overlayWrapper !== null && overlayWrapper !== void 0 ? overlayWrapper : overlay.el;
512
+ /**
513
+ * `preventScroll` keeps this a pure focus move so the viewport does not
514
+ * jump when the wrapper is partially off-screen (e.g. a sheet modal).
515
+ * Guard the options call so an older engine that mishandles it can never
516
+ * reject present(); we fall back to a plain focus() in that case.
517
+ */
518
+ try {
519
+ focusTarget.focus({ preventScroll: true });
520
+ }
521
+ catch (_c) {
522
+ focusTarget.focus();
523
+ }
520
524
  }
521
525
  /**
522
526
  * If this overlay was previously dismissed without being
@@ -3,26 +3,8 @@
3
3
  */
4
4
  import { printIonError } from "../logging/index";
5
5
  /**
6
- * Sanitize an untrusted HTML string.
7
- *
8
- * Parses the string into a detached DOM, removes blocked tags, strips
9
- * attributes outside the narrow `domStringAllowedAttributes` list (refer
10
- * `sanitizeElement`), and scrubs script-scheme URLs. Returns the sanitized
11
- * HTML string.
12
- *
13
- * Use this when you have an HTML string from an unknown source and need to
14
- * render it via `innerHTML`. Use `sanitizeDOMTree` instead when you already
15
- * have a DOM tree and want to sanitize it in place without a string round
16
- * trip. The two apply the same dangerous-vector scrubbing but different
17
- * attribute allowlists: this path stays narrow so existing consumers
18
- * (toast, loading, alert message, etc.) are unaffected, while
19
- * `sanitizeDOMTree` uses the wider rich-content allowlist.
20
- *
21
- * @param untrustedString - The HTML string to sanitize. Pass an
22
- * `IonicSafeString` to bypass sanitization, or `undefined` to short-circuit.
23
- * @returns The sanitized HTML string, or `undefined` if the input was
24
- * `undefined`. Returns `''` if sanitization fails or the input contains
25
- * an inline `onload=` handler.
6
+ * Does a simple sanitization of all elements
7
+ * in an untrusted string
26
8
  */
27
9
  export const sanitizeDOMString = (untrustedString) => {
28
10
  try {
@@ -72,7 +54,7 @@ export const sanitizeDOMString = (untrustedString) => {
72
54
  const childElements = getElementChildren(element);
73
55
  /* eslint-disable-next-line */
74
56
  for (let childIndex = 0; childIndex < childElements.length; childIndex++) {
75
- sanitizeElement(childElements[childIndex], domStringAllowedAttributes);
57
+ sanitizeElement(childElements[childIndex]);
76
58
  }
77
59
  }
78
60
  });
@@ -84,7 +66,7 @@ export const sanitizeDOMString = (untrustedString) => {
84
66
  const dfChildren = getElementChildren(documentFragment);
85
67
  /* eslint-disable-next-line */
86
68
  for (let childIndex = 0; childIndex < dfChildren.length; childIndex++) {
87
- sanitizeElement(dfChildren[childIndex], domStringAllowedAttributes);
69
+ sanitizeElement(dfChildren[childIndex]);
88
70
  }
89
71
  // Append document fragment to div
90
72
  const fragmentDiv = document.createElement('div');
@@ -98,43 +80,13 @@ export const sanitizeDOMString = (untrustedString) => {
98
80
  return '';
99
81
  }
100
82
  };
101
- /**
102
- * Sanitize an entire trusted DOM tree in place.
103
- *
104
- * Removes blocked tags (`script`, `iframe`, etc.) from the subtree and
105
- * then sanitizes attributes on every remaining element using the wider
106
- * `richContentAllowedAttributes` allowlist (refer `sanitizeElement`).
107
- * Component presentational attributes (`size`, `color`, `shape`, inline
108
- * SVG, `aria-*`, `data-*`) are preserved; `style`, event handlers (`on*`),
109
- * form/navigation-hijack attributes, script-scheme URLs, and non-image
110
- * `data:` URLs are stripped.
111
- *
112
- * Use this when you have a DOM tree the developer controls (e.g.
113
- * cloned slot content from a component) and you need to render it
114
- * elsewhere safely.
115
- *
116
- * @param root - The root element whose subtree will be sanitized in
117
- * place. No-op when the sanitizer is disabled via `Ionic.config`.
118
- */
119
- export const sanitizeDOMTree = (root) => {
120
- if (!isSanitizerEnabled()) {
121
- return;
122
- }
123
- blockedTags.forEach((tag) => {
124
- const matches = root.querySelectorAll(tag);
125
- for (let i = matches.length - 1; i >= 0; i--) {
126
- matches[i].remove();
127
- }
128
- });
129
- sanitizeElement(root, richContentAllowedAttributes, richContentAllowedAttributePrefixes);
130
- };
131
83
  /**
132
84
  * Clean up current element based on allowed attributes
133
85
  * and then recursively dig down into any child elements to
134
86
  * clean those up as well
135
87
  */
136
88
  // TODO(FW-2832): type (using Element triggers other type errors as well)
137
- const sanitizeElement = (element, allowedAttributes, allowedAttributePrefixes = []) => {
89
+ const sanitizeElement = (element) => {
138
90
  // IE uses childNodes, so ignore nodes that are not elements
139
91
  if (element.nodeType && element.nodeType !== 1) {
140
92
  return;
@@ -149,60 +101,29 @@ const sanitizeElement = (element, allowedAttributes, allowedAttributePrefixes =
149
101
  element.remove();
150
102
  return;
151
103
  }
152
- /**
153
- * Always strip `style` (CSS injection, `background:url()` beaconing, UI
154
- * spoofing). It is never on the allowlist, but it is removed explicitly
155
- * here because some engines (e.g. jsdom) don't enumerate the CSSOM-backed
156
- * `style` attribute in `element.attributes`, which would let the loop
157
- * below skip over it.
158
- */
159
- element.removeAttribute('style');
160
104
  for (let i = element.attributes.length - 1; i >= 0; i--) {
161
105
  const attribute = element.attributes.item(i);
162
106
  const attributeName = attribute.name;
163
- const lowerName = attributeName.toLowerCase();
164
- /**
165
- * Remove any attribute that is not on the allowlist. This drops event
166
- * handlers (`on*`), `style`, the form/navigation-hijack attributes
167
- * (`formaction`, `action`, `target`), namespaced attributes like
168
- * `xlink:href`, and anything else not explicitly known to be safe.
169
- */
170
- if (!isAttributeAllowed(lowerName, allowedAttributes, allowedAttributePrefixes)) {
107
+ // remove non-allowed attribs
108
+ if (!allowedAttributes.includes(attributeName.toLowerCase())) {
171
109
  element.removeAttribute(attributeName);
172
110
  continue;
173
111
  }
174
112
  // clean up any allowed attribs
175
113
  // that attempt to do any JS funny-business
176
114
  const attributeValue = attribute.value;
177
- if (attributeValue == null) {
178
- continue;
179
- }
180
115
  /**
181
- * Scrub dangerous schemes from the value. The value is normalized first
182
- * (whitespace and ASCII control characters removed) so entity-obfuscated
183
- * payloads such as `java&#9;script:`, which the parser decodes to
184
- * `java\tscript:`, are still caught. Normalizing the value also covers
185
- * namespaced attributes, where the previous `element[attributeName]`
186
- * property reflection returned `undefined` and let them slip through.
116
+ * We also need to check the property value
117
+ * as javascript: can allow special characters
118
+ * such as &Tab; and still be valid (i.e. java&Tab;script)
187
119
  */
188
- const normalizedValue = attributeValue.replace(controlCharactersAndWhitespace, '').toLowerCase();
189
- // Script schemes are never allowed, on any attribute.
190
- if (normalizedValue.includes('javascript:') || normalizedValue.includes('vbscript:')) {
191
- element.removeAttribute(attributeName);
192
- continue;
193
- }
194
- /**
195
- * For URL-bearing attributes, allow `data:` URIs only for raster
196
- * images. Document-bearing types (`text/html`, `image/svg+xml`,
197
- * `application/*`, etc.) can carry markup or script when navigated to
198
- * or rendered, so they are stripped, while safe image types are kept so
199
- * inline images keep working.
200
- */
201
- if (urlAttributes.includes(lowerName) &&
202
- normalizedValue.startsWith('data:') &&
203
- !safeDataImageUri.test(normalizedValue)) {
120
+ const propertyValue = element[attributeName];
121
+ /* eslint-disable */
122
+ if ((attributeValue != null && attributeValue.toLowerCase().includes('javascript:')) ||
123
+ (propertyValue != null && propertyValue.toLowerCase().includes('javascript:'))) {
204
124
  element.removeAttribute(attributeName);
205
125
  }
126
+ /* eslint-enable */
206
127
  }
207
128
  /**
208
129
  * Sanitize any nested children
@@ -210,7 +131,7 @@ const sanitizeElement = (element, allowedAttributes, allowedAttributePrefixes =
210
131
  const childElements = getElementChildren(element);
211
132
  /* eslint-disable-next-line */
212
133
  for (let i = 0; i < childElements.length; i++) {
213
- sanitizeElement(childElements[i], allowedAttributes, allowedAttributePrefixes);
134
+ sanitizeElement(childElements[i]);
214
135
  }
215
136
  };
216
137
  /**
@@ -235,185 +156,8 @@ const isSanitizerEnabled = () => {
235
156
  }
236
157
  return true;
237
158
  };
238
- /**
239
- * Mirror known custom-element DOM properties onto attributes so they
240
- * survive `cloneNode`. Call this on a DOM subtree before cloning it for
241
- * rendering elsewhere (e.g. cloning slotted option content into an
242
- * overlay).
243
- *
244
- * Only sets the attribute when the property holds a non-empty string
245
- * and the attribute isn't already present, so existing attributes
246
- * take precedence.
247
- *
248
- * @param root - The root element whose subtree (and itself) will be
249
- * inspected.
250
- */
251
- export const reflectPropertiesToAttributes = (root) => {
252
- const candidates = [];
253
- if (root.tagName in elementPropsToReflect) {
254
- candidates.push(root);
255
- }
256
- for (const tagName of Object.keys(elementPropsToReflect)) {
257
- candidates.push(...Array.from(root.querySelectorAll(tagName.toLowerCase())));
258
- }
259
- for (const el of candidates) {
260
- if (!(el.tagName in elementPropsToReflect)) {
261
- continue;
262
- }
263
- const props = elementPropsToReflect[el.tagName];
264
- for (const prop of props) {
265
- const value = el[prop];
266
- if (typeof value === 'string' && value.length > 0 && !el.hasAttribute(prop)) {
267
- el.setAttribute(prop, value);
268
- }
269
- }
270
- }
271
- };
272
- /**
273
- * Attribute allowlist for `sanitizeDOMString`. Intentionally narrow: this
274
- * path sanitizes developer HTML strings rendered via `innerHTML` by
275
- * `ion-toast`, `ion-loading`, the `ion-alert` message,
276
- * `ion-refresher-content`, and `ion-infinite-scroll-content`, so the list
277
- * is kept to the minimum those have always needed. Broadening it here would
278
- * change sanitization output for all of those consumers, so the wider
279
- * rich-content allowlist below is deliberately scoped to `sanitizeDOMTree`
280
- * instead.
281
- */
282
- const domStringAllowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
283
- /**
284
- * Attribute allowlist for `sanitizeDOMTree` (the select rich-content path).
285
- * Covers global HTML attributes, the Ionic component presentational props
286
- * that cloned rich content (e.g. `ion-select-option` markup) relies on, and
287
- * the inert SVG presentation attributes used by inline icons.
288
- *
289
- * `aria-*` and `data-*` are allowed separately by prefix (refer
290
- * `richContentAllowedAttributePrefixes`) since they are inert and not worth
291
- * enumerating. URL-bearing names (`href`, `src`) are allowed here, but
292
- * their values are still scrubbed for script schemes in `sanitizeElement`.
293
- *
294
- * Notably absent: `style`, event handlers (`on*`), and the
295
- * form/navigation-hijack attributes (`formaction`, `action`, `target`),
296
- * which are therefore stripped.
297
- */
298
- const richContentAllowedAttributes = [
299
- // Global / structural
300
- 'class',
301
- 'id',
302
- 'slot',
303
- 'name',
304
- 'title',
305
- 'alt',
306
- 'lang',
307
- 'dir',
308
- 'role',
309
- 'type',
310
- 'value',
311
- 'disabled',
312
- 'width',
313
- 'height',
314
- 'href',
315
- 'src',
316
- // Ionic component presentational props
317
- 'color',
318
- 'size',
319
- 'shape',
320
- 'fill',
321
- 'expand',
322
- 'mode',
323
- 'theme',
324
- 'icon',
325
- 'label',
326
- 'label-placement',
327
- 'justify',
328
- 'inset',
329
- 'lines',
330
- 'ios',
331
- 'md',
332
- // SVG presentation attributes (compared lowercased, e.g. `viewBox`)
333
- 'xmlns',
334
- 'viewbox',
335
- 'preserveaspectratio',
336
- 'stroke',
337
- 'stroke-width',
338
- 'stroke-linecap',
339
- 'stroke-linejoin',
340
- 'stroke-opacity',
341
- 'stroke-dasharray',
342
- 'fill-rule',
343
- 'fill-opacity',
344
- 'clip-rule',
345
- 'd',
346
- 'points',
347
- 'cx',
348
- 'cy',
349
- 'r',
350
- 'rx',
351
- 'ry',
352
- 'x',
353
- 'y',
354
- 'x1',
355
- 'y1',
356
- 'x2',
357
- 'y2',
358
- 'transform',
359
- 'opacity',
360
- ];
361
- /**
362
- * Attribute-name prefixes that are always safe to keep in the rich-content
363
- * path. `aria-*` and `data-*` attributes cannot execute script or load
364
- * resources, so they are allowed wholesale rather than enumerated by name.
365
- */
366
- const richContentAllowedAttributePrefixes = ['aria-', 'data-'];
367
- /**
368
- * Whether an attribute name (already lowercased) is safe to keep, by exact
369
- * match or by an allowed prefix.
370
- */
371
- const isAttributeAllowed = (lowerName, allowedAttributes, allowedAttributePrefixes) => {
372
- if (allowedAttributes.includes(lowerName)) {
373
- return true;
374
- }
375
- return allowedAttributePrefixes.some((prefix) => lowerName.startsWith(prefix));
376
- };
377
- /**
378
- * Matches ASCII control characters and whitespace (including the
379
- * non-breaking space). Used to normalize attribute values before matching
380
- * a URL scheme so entity-obfuscated payloads such as `java&#9;script:`
381
- * (decoded by the parser to `java\tscript:`) can't smuggle a scheme past
382
- * the check.
383
- */
384
- // eslint-disable-next-line no-control-regex -- matching control characters is the point
385
- const controlCharactersAndWhitespace = /[\u0000-\u0020\u007f-\u00a0]/g;
386
- /**
387
- * Attributes whose values are URLs. Their values are scheme-checked in
388
- * `sanitizeElement` (e.g. `data:` filtering) beyond the script-scheme scrub
389
- * applied to every attribute.
390
- */
391
- const urlAttributes = ['href', 'src'];
392
- /**
393
- * Matches a `data:` URI for a raster image type that cannot carry script.
394
- * `image/svg+xml` is deliberately excluded (SVG can execute script), as are
395
- * document types like `text/html` and `application/*`. The value is already
396
- * lowercased and whitespace-stripped before this is tested.
397
- */
398
- const safeDataImageUri = /^data:image\/(?:png|jpe?g|gif|webp|bmp|avif|x-icon|vnd\.microsoft\.icon)[;,]/;
399
- /**
400
- * Tags removed entirely (with their subtree) before attribute sanitization.
401
- * Exported so tests can assert the set without hardcoding it.
402
- */
403
- export const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed', 'base'];
404
- /**
405
- * Properties on custom elements that frameworks (Vue, Angular) often
406
- * set as DOM properties rather than attributes. `cloneNode` only copies
407
- * attributes, so these values are lost when slotted content is cloned
408
- * into an overlay. For each known custom element, we mirror the listed
409
- * properties onto attributes so the cloned copy still has the data it
410
- * needs to render.
411
- *
412
- * Keyed by uppercased tagName so the lookup matches `Element.tagName`.
413
- */
414
- const elementPropsToReflect = {
415
- 'ION-ICON': ['icon', 'name', 'src', 'ios', 'md'],
416
- };
159
+ const allowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
160
+ const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed'];
417
161
  export class IonicSafeString {
418
162
  constructor(value) {
419
163
  this.value = value;