@ionic/core 8.7.17-dev.11772118942.181221d4 → 8.7.17-dev.11772568074.1d7a4aea

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 (520) hide show
  1. package/components/action-sheet.js +1 -561
  2. package/components/alert.js +1 -610
  3. package/components/animation.js +1 -817
  4. package/components/backdrop.js +1 -72
  5. package/components/button-active.js +1 -64
  6. package/components/button.js +1 -303
  7. package/components/buttons.js +1 -56
  8. package/components/capacitor.js +1 -10
  9. package/components/checkbox.js +1 -261
  10. package/components/config.js +1 -192
  11. package/components/content.js +1 -475
  12. package/components/cubic-bezier.js +1 -87
  13. package/components/data.js +1 -1635
  14. package/components/dir.js +1 -15
  15. package/components/focus-visible.js +1 -72
  16. package/components/framework-delegate.js +1 -137
  17. package/components/gesture-controller.js +1 -192
  18. package/components/haptic.js +1 -155
  19. package/components/hardware-back-button.js +1 -112
  20. package/components/header.js +1 -417
  21. package/components/helpers.js +1 -336
  22. package/components/icon.js +1 -456
  23. package/components/index.d.ts +2 -0
  24. package/components/index.js +1 -115
  25. package/components/index2.js +1 -416
  26. package/components/index3.js +1 -452
  27. package/components/index4.js +1 -118
  28. package/components/index5.js +1 -303
  29. package/components/index6.js +1 -29
  30. package/components/index7.js +1 -164
  31. package/components/index8.js +1 -125
  32. package/components/index9.js +1 -4
  33. package/components/input-shims.js +1 -624
  34. package/components/input.utils.js +1 -144
  35. package/components/ion-accordion-group.js +1 -269
  36. package/components/ion-accordion.js +1 -457
  37. package/components/ion-action-sheet.js +1 -6
  38. package/components/ion-alert.js +1 -6
  39. package/components/ion-app.js +1 -128
  40. package/components/ion-avatar.js +1 -41
  41. package/components/ion-back-button.js +1 -131
  42. package/components/ion-backdrop.js +1 -6
  43. package/components/ion-badge.js +1 -47
  44. package/components/ion-breadcrumb.js +1 -137
  45. package/components/ion-breadcrumbs.js +1 -164
  46. package/components/ion-button.js +1 -6
  47. package/components/ion-buttons.js +1 -6
  48. package/components/ion-card-content.js +1 -45
  49. package/components/ion-card-header.js +1 -56
  50. package/components/ion-card-subtitle.js +1 -48
  51. package/components/ion-card-title.js +1 -48
  52. package/components/ion-card.js +1 -107
  53. package/components/ion-checkbox.js +1 -6
  54. package/components/ion-chip.js +1 -66
  55. package/components/ion-col.js +1 -163
  56. package/components/ion-content.js +1 -6
  57. package/components/ion-datetime-button.js +1 -384
  58. package/components/ion-datetime.js +1 -2046
  59. package/components/ion-fab-button.js +1 -151
  60. package/components/ion-fab-list.js +1 -66
  61. package/components/ion-fab.js +1 -101
  62. package/components/ion-footer.js +1 -159
  63. package/components/ion-grid.js +1 -46
  64. package/components/ion-header.js +1 -6
  65. package/components/ion-icon.js +1 -6
  66. package/components/ion-img.js +1 -124
  67. package/components/ion-infinite-scroll-content.js +1 -70
  68. package/components/ion-infinite-scroll.js +1 -236
  69. package/components/ion-input-otp.js +1 -683
  70. package/components/ion-input-password-toggle.js +1 -129
  71. package/components/ion-input.js +1 -617
  72. package/components/ion-item-divider.js +1 -59
  73. package/components/ion-item-group.js +1 -46
  74. package/components/ion-item-option.js +1 -91
  75. package/components/ion-item-options.js +1 -73
  76. package/components/ion-item-sliding.js +1 -458
  77. package/components/ion-item.js +1 -6
  78. package/components/ion-label.js +1 -6
  79. package/components/ion-list-header.js +1 -6
  80. package/components/ion-list.js +1 -6
  81. package/components/ion-loading.js +1 -344
  82. package/components/ion-menu-button.js +1 -110
  83. package/components/ion-menu-toggle.js +1 -64
  84. package/components/ion-menu.js +1 -745
  85. package/components/ion-modal.js +1 -6
  86. package/components/ion-nav-link.js +1 -64
  87. package/components/ion-nav.js +1 -956
  88. package/components/ion-note.js +1 -47
  89. package/components/ion-picker-column-option.js +1 -6
  90. package/components/ion-picker-column.js +1 -6
  91. package/components/ion-picker-legacy-column.js +1 -6
  92. package/components/ion-picker-legacy.js +1 -343
  93. package/components/ion-picker.js +1 -6
  94. package/components/ion-popover.js +1 -6
  95. package/components/ion-progress-bar.js +1 -101
  96. package/components/ion-radio-group.js +1 -6
  97. package/components/ion-radio.js +1 -6
  98. package/components/ion-range.js +1 -853
  99. package/components/ion-refresher-content.js +1 -89
  100. package/components/ion-refresher.js +1 -751
  101. package/components/ion-reorder-group.js +1 -322
  102. package/components/ion-reorder.js +1 -60
  103. package/components/ion-ripple-effect.js +1 -6
  104. package/components/ion-route-redirect.js +1 -45
  105. package/components/ion-route.js +1 -74
  106. package/components/ion-router-link.js +1 -61
  107. package/components/ion-router-outlet.js +1 -227
  108. package/components/ion-router.js +1 -841
  109. package/components/ion-row.js +1 -36
  110. package/components/ion-searchbar.js +1 -530
  111. package/components/ion-segment-button.js +1 -174
  112. package/components/ion-segment-content.js +1 -35
  113. package/components/ion-segment-view.js +1 -148
  114. package/components/ion-segment.js +1 -602
  115. package/components/ion-select-modal.js +1 -6
  116. package/components/ion-select-option.js +1 -46
  117. package/components/ion-select-popover.js +1 -6
  118. package/components/ion-select.js +1 -1037
  119. package/components/ion-skeleton-text.js +1 -65
  120. package/components/ion-spinner.js +1 -6
  121. package/components/ion-split-pane.js +1 -197
  122. package/components/ion-tab-bar.js +1 -115
  123. package/components/ion-tab-button.js +1 -128
  124. package/components/ion-tab.js +1 -91
  125. package/components/ion-tabs.js +1 -205
  126. package/components/ion-text.js +1 -42
  127. package/components/ion-textarea.js +1 -554
  128. package/components/ion-thumbnail.js +1 -36
  129. package/components/ion-title.js +1 -6
  130. package/components/ion-toast.js +1 -941
  131. package/components/ion-toggle.js +1 -361
  132. package/components/ion-toolbar.js +1 -6
  133. package/components/ionic-global.js +1 -144
  134. package/components/ios.transition.js +1 -672
  135. package/components/item.js +1 -302
  136. package/components/keyboard-controller.js +1 -162
  137. package/components/keyboard.js +1 -141
  138. package/components/keyboard2.js +1 -76
  139. package/components/label.js +1 -100
  140. package/components/list-header.js +1 -47
  141. package/components/list.js +1 -68
  142. package/components/lock-controller.js +1 -35
  143. package/components/md.transition.js +1 -51
  144. package/components/menu-toggle-util.js +1 -9
  145. package/components/modal.js +1 -2674
  146. package/components/notch-controller.js +1 -150
  147. package/components/overlays.js +1 -912
  148. package/components/picker-column-option.js +1 -136
  149. package/components/picker-column.js +1 -595
  150. package/components/picker-column2.js +1 -377
  151. package/components/picker.js +1 -498
  152. package/components/popover.js +1 -1502
  153. package/components/radio-group.js +1 -287
  154. package/components/radio.js +1 -229
  155. package/components/refresher.utils.js +1 -193
  156. package/components/ripple-effect.js +1 -109
  157. package/components/select-modal.js +1 -196
  158. package/components/select-popover.js +1 -189
  159. package/components/spinner.js +1 -224
  160. package/components/status-tap.js +1 -36
  161. package/components/swipe-back.js +1 -75
  162. package/components/theme.js +1 -40
  163. package/components/title.js +1 -70
  164. package/components/toolbar.js +1 -89
  165. package/components/validity.js +1 -14
  166. package/components/watch-options.js +1 -44
  167. package/dist/cjs/{animation-Bt3H9L1C.js → animation-Dg4yiuR2.js} +1 -1
  168. package/dist/cjs/app-globals-CLI8xCmk.js +11 -0
  169. package/dist/cjs/{button-active-CMc8cD90.js → button-active-FscMI17-.js} +1 -1
  170. package/dist/cjs/{config-C5fsO43a.js → config-BukYi_pW.js} +1 -1
  171. package/dist/cjs/{data-JwZKaIQB.js → data-BYlBjkMU.js} +1 -1
  172. package/dist/cjs/{framework-delegate-DMJRBuDi.js → framework-delegate-CRgp8o_p.js} +1 -1
  173. package/dist/cjs/{hardware-back-button-VCK4V3mG.js → hardware-back-button-C4rMJ5uI.js} +1 -1
  174. package/dist/cjs/{helpers-DrTqNghc.js → helpers-CxTYJdbT.js} +1 -1
  175. package/dist/cjs/{index-094mMFB-.js → index-C845Ti6K.js} +4 -4
  176. package/dist/cjs/{index-DrMUZJj6.js → index-CFUwM5x_.js} +5 -5
  177. package/dist/cjs/{index-D6Wc6v08.js → index-CqT-2gKy.js} +503 -382
  178. package/dist/cjs/{index-CO6eryBo.js → index-MbaBbWXk.js} +2 -2
  179. package/dist/cjs/{index-C534ULug.js → index-YcSftOMz.js} +2 -2
  180. package/dist/cjs/index.cjs.js +12 -12
  181. package/dist/cjs/{input-shims-CW0KUFTQ.js → input-shims-DlFhYYTs.js} +3 -3
  182. package/dist/cjs/{input.utils-B_QROI2g.js → input.utils-DmeJ8dmo.js} +2 -2
  183. package/dist/cjs/ion-accordion_2.cjs.entry.js +23 -15
  184. package/dist/cjs/ion-action-sheet.cjs.entry.js +21 -15
  185. package/dist/cjs/ion-alert.cjs.entry.js +25 -17
  186. package/dist/cjs/ion-app_8.cjs.entry.js +44 -40
  187. package/dist/cjs/ion-avatar_3.cjs.entry.js +12 -12
  188. package/dist/cjs/ion-back-button.cjs.entry.js +7 -7
  189. package/dist/cjs/ion-backdrop.cjs.entry.js +6 -6
  190. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +20 -14
  191. package/dist/cjs/ion-button_2.cjs.entry.js +36 -18
  192. package/dist/cjs/ion-card_5.cjs.entry.js +23 -23
  193. package/dist/cjs/ion-checkbox.cjs.entry.js +7 -7
  194. package/dist/cjs/ion-chip.cjs.entry.js +6 -6
  195. package/dist/cjs/ion-col_3.cjs.entry.js +8 -8
  196. package/dist/cjs/ion-datetime-button.cjs.entry.js +8 -8
  197. package/dist/cjs/ion-datetime_3.cjs.entry.js +67 -39
  198. package/dist/cjs/ion-fab_3.cjs.entry.js +17 -13
  199. package/dist/cjs/ion-img.cjs.entry.js +8 -6
  200. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +17 -13
  201. package/dist/cjs/ion-input-otp.cjs.entry.js +16 -10
  202. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +9 -7
  203. package/dist/cjs/ion-input.cjs.entry.js +21 -13
  204. package/dist/cjs/ion-item-option_3.cjs.entry.js +17 -15
  205. package/dist/cjs/ion-item_8.cjs.entry.js +42 -36
  206. package/dist/cjs/ion-loading.cjs.entry.js +18 -14
  207. package/dist/cjs/ion-menu_3.cjs.entry.js +30 -22
  208. package/dist/cjs/ion-modal.cjs.entry.js +55 -40
  209. package/dist/cjs/ion-nav_2.cjs.entry.js +14 -10
  210. package/dist/cjs/ion-picker-column-option.cjs.entry.js +10 -8
  211. package/dist/cjs/ion-picker-column.cjs.entry.js +11 -7
  212. package/dist/cjs/ion-picker.cjs.entry.js +6 -6
  213. package/dist/cjs/ion-popover.cjs.entry.js +21 -15
  214. package/dist/cjs/ion-progress-bar.cjs.entry.js +7 -7
  215. package/dist/cjs/ion-radio_2.cjs.entry.js +17 -13
  216. package/dist/cjs/ion-range.cjs.entry.js +29 -15
  217. package/dist/cjs/ion-refresher_2.cjs.entry.js +45 -14
  218. package/dist/cjs/ion-reorder_2.cjs.entry.js +13 -11
  219. package/dist/cjs/ion-ripple-effect.cjs.entry.js +4 -4
  220. package/dist/cjs/ion-route_4.cjs.entry.js +20 -10
  221. package/dist/cjs/ion-searchbar.cjs.entry.js +22 -12
  222. package/dist/cjs/ion-segment-content.cjs.entry.js +3 -3
  223. package/dist/cjs/ion-segment-view.cjs.entry.js +5 -5
  224. package/dist/cjs/ion-segment_2.cjs.entry.js +26 -16
  225. package/dist/cjs/ion-select-modal.cjs.entry.js +12 -12
  226. package/dist/cjs/ion-select_3.cjs.entry.js +29 -21
  227. package/dist/cjs/ion-spinner.cjs.entry.js +4 -4
  228. package/dist/cjs/ion-split-pane.cjs.entry.js +15 -9
  229. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +14 -12
  230. package/dist/cjs/ion-tab_2.cjs.entry.js +10 -8
  231. package/dist/cjs/ion-text.cjs.entry.js +4 -4
  232. package/dist/cjs/ion-textarea.cjs.entry.js +18 -12
  233. package/dist/cjs/ion-toast.cjs.entry.js +21 -15
  234. package/dist/cjs/ion-toggle.cjs.entry.js +10 -8
  235. package/dist/cjs/{ionic-global-HMVqOFGO.js → ionic-global-Bc3kJi1Z.js} +1 -1
  236. package/dist/cjs/ionic.cjs.js +5 -5
  237. package/dist/cjs/{ios.transition-BOt_uW73.js → ios.transition-trBiC95R.js} +4 -4
  238. package/dist/cjs/loader.cjs.js +4 -4
  239. package/dist/cjs/{md.transition-Dt968VXB.js → md.transition-CUQECuvD.js} +4 -4
  240. package/dist/cjs/{notch-controller-Bzqhjm4f.js → notch-controller-sD-lTpdc.js} +1 -1
  241. package/dist/cjs/{overlays-B2b-TTbl.js → overlays-C2jiBSNQ.js} +5 -5
  242. package/dist/cjs/{status-tap-g0sWWkXk.js → status-tap-CCJk5VgT.js} +3 -3
  243. package/dist/cjs/{swipe-back-BIayeNOD.js → swipe-back-BGhTQ1CU.js} +2 -2
  244. package/dist/collection/collection-manifest.json +2 -2
  245. package/dist/collection/components/accordion-group/accordion-group.js +4 -2
  246. package/dist/collection/components/action-sheet/action-sheet.js +20 -10
  247. package/dist/collection/components/alert/alert.js +24 -12
  248. package/dist/collection/components/back-button/back-button.js +4 -2
  249. package/dist/collection/components/badge/badge.js +2 -1
  250. package/dist/collection/components/breadcrumb/breadcrumb.js +8 -4
  251. package/dist/collection/components/breadcrumbs/breadcrumbs.js +4 -2
  252. package/dist/collection/components/button/button.js +6 -3
  253. package/dist/collection/components/card/card.js +6 -3
  254. package/dist/collection/components/card-header/card-header.js +2 -1
  255. package/dist/collection/components/card-subtitle/card-subtitle.js +2 -1
  256. package/dist/collection/components/card-title/card-title.js +2 -1
  257. package/dist/collection/components/checkbox/checkbox.js +4 -2
  258. package/dist/collection/components/chip/chip.js +2 -1
  259. package/dist/collection/components/content/content.js +8 -4
  260. package/dist/collection/components/datetime/datetime.js +34 -15
  261. package/dist/collection/components/datetime-button/datetime-button.js +2 -1
  262. package/dist/collection/components/fab-button/fab-button.js +6 -3
  263. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +4 -2
  264. package/dist/collection/components/input/input.js +11 -6
  265. package/dist/collection/components/input-otp/input-otp.js +8 -4
  266. package/dist/collection/components/input-password-toggle/input-password-toggle.js +4 -2
  267. package/dist/collection/components/item/item.js +6 -3
  268. package/dist/collection/components/item-divider/item-divider.js +2 -1
  269. package/dist/collection/components/item-option/item-option.js +2 -1
  270. package/dist/collection/components/item-options/item-options.js +2 -1
  271. package/dist/collection/components/item-sliding/item-sliding.js +2 -1
  272. package/dist/collection/components/label/label.js +6 -3
  273. package/dist/collection/components/list-header/list-header.js +2 -1
  274. package/dist/collection/components/loading/loading.js +22 -11
  275. package/dist/collection/components/menu/menu.js +10 -5
  276. package/dist/collection/components/menu-button/menu-button.js +2 -1
  277. package/dist/collection/components/modal/gestures/sheet.js +32 -21
  278. package/dist/collection/components/modal/modal.js +35 -20
  279. package/dist/collection/components/nav/nav.js +89 -45
  280. package/dist/collection/components/nav-link/nav-link.js +9 -5
  281. package/dist/collection/components/note/note.js +2 -1
  282. package/dist/collection/components/picker/picker.js +2 -1
  283. package/dist/collection/components/picker-column/picker-column.js +6 -3
  284. package/dist/collection/components/picker-column-option/picker-column-option.js +2 -1
  285. package/dist/collection/components/picker-legacy/picker.js +24 -12
  286. package/dist/collection/components/picker-legacy-column/picker-column.js +4 -2
  287. package/dist/collection/components/popover/popover.js +33 -17
  288. package/dist/collection/components/progress-bar/progress-bar.js +2 -1
  289. package/dist/collection/components/radio/radio.js +2 -1
  290. package/dist/collection/components/radio-group/radio-group.js +6 -3
  291. package/dist/collection/components/range/range.js +14 -7
  292. package/dist/collection/components/refresher/refresher.js +73 -5
  293. package/dist/collection/components/refresher-content/refresher-content.js +8 -4
  294. package/dist/collection/components/reorder-group/reorder-group.js +6 -3
  295. package/dist/collection/components/route/route.js +4 -2
  296. package/dist/collection/components/router/router.js +10 -5
  297. package/dist/collection/components/router-link/router-link.js +6 -3
  298. package/dist/collection/components/router-outlet/router-outlet.js +18 -9
  299. package/dist/collection/components/searchbar/searchbar.js +11 -6
  300. package/dist/collection/components/segment/segment.js +10 -5
  301. package/dist/collection/components/segment-button/segment-button.js +4 -2
  302. package/dist/collection/components/segment-view/segment-view.js +2 -1
  303. package/dist/collection/components/select/select.js +10 -5
  304. package/dist/collection/components/select-modal/select-modal.js +2 -1
  305. package/dist/collection/components/select-popover/select-popover.js +2 -1
  306. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -1
  307. package/dist/collection/components/spinner/spinner.js +4 -2
  308. package/dist/collection/components/tab/tab.js +4 -2
  309. package/dist/collection/components/tab-bar/tab-bar.js +4 -2
  310. package/dist/collection/components/tab-button/tab-button.js +4 -2
  311. package/dist/collection/components/tabs/tabs.js +4 -2
  312. package/dist/collection/components/text/text.js +2 -1
  313. package/dist/collection/components/textarea/textarea.js +6 -3
  314. package/dist/collection/components/title/title.js +4 -2
  315. package/dist/collection/components/toast/toast.js +34 -17
  316. package/dist/collection/components/toggle/toggle.js +4 -2
  317. package/dist/collection/components/toolbar/toolbar.js +2 -1
  318. package/dist/docs.d.ts +37 -0
  319. package/dist/docs.json +835 -381
  320. package/dist/esm/{animation-Dt8bGnA-.js → animation-CnGMT4ji.js} +1 -1
  321. package/dist/esm/app-globals-DhZjtldk.js +9 -0
  322. package/dist/esm/{button-active-L570Swow.js → button-active-BBx21brx.js} +1 -1
  323. package/dist/esm/{config-mCdtaoPe.js → config-TO1rZH52.js} +1 -1
  324. package/dist/esm/{data-DCORV9FH.js → data-B9iGR5YO.js} +1 -1
  325. package/dist/esm/{framework-delegate-BYawdMXj.js → framework-delegate-CyxE1S_P.js} +1 -1
  326. package/dist/esm/{hardware-back-button-CPLxO-Ev.js → hardware-back-button-CTe4XmL7.js} +1 -1
  327. package/dist/esm/{helpers-DEn3pfjm.js → helpers-Tl8jw6S2.js} +1 -1
  328. package/dist/esm/{index-r2D9DEro.js → index-B-hkiOUh.js} +4 -4
  329. package/dist/esm/{index-CvDIirVx.js → index-B2KwgBLx.js} +5 -5
  330. package/dist/esm/{index-ceb5RaMT.js → index-BtUdxPjv.js} +2 -2
  331. package/dist/esm/{index-C8IsBmNU.js → index-IGIE5vDm.js} +503 -382
  332. package/dist/esm/{index-Bs3kT4bc.js → index-hW6eNZ3o.js} +2 -2
  333. package/dist/esm/index.js +12 -12
  334. package/dist/esm/{input-shims-DyOpfTg6.js → input-shims-C1hAaHcP.js} +3 -3
  335. package/dist/esm/{input.utils-DrvTa8gz.js → input.utils-Bxa_DQ7-.js} +2 -2
  336. package/dist/esm/ion-accordion_2.entry.js +23 -15
  337. package/dist/esm/ion-action-sheet.entry.js +21 -15
  338. package/dist/esm/ion-alert.entry.js +25 -17
  339. package/dist/esm/ion-app_8.entry.js +44 -40
  340. package/dist/esm/ion-avatar_3.entry.js +12 -12
  341. package/dist/esm/ion-back-button.entry.js +7 -7
  342. package/dist/esm/ion-backdrop.entry.js +6 -6
  343. package/dist/esm/ion-breadcrumb_2.entry.js +20 -14
  344. package/dist/esm/ion-button_2.entry.js +36 -18
  345. package/dist/esm/ion-card_5.entry.js +23 -23
  346. package/dist/esm/ion-checkbox.entry.js +7 -7
  347. package/dist/esm/ion-chip.entry.js +6 -6
  348. package/dist/esm/ion-col_3.entry.js +8 -8
  349. package/dist/esm/ion-datetime-button.entry.js +8 -8
  350. package/dist/esm/ion-datetime_3.entry.js +67 -39
  351. package/dist/esm/ion-fab_3.entry.js +17 -13
  352. package/dist/esm/ion-img.entry.js +8 -6
  353. package/dist/esm/ion-infinite-scroll_2.entry.js +17 -13
  354. package/dist/esm/ion-input-otp.entry.js +16 -10
  355. package/dist/esm/ion-input-password-toggle.entry.js +9 -7
  356. package/dist/esm/ion-input.entry.js +21 -13
  357. package/dist/esm/ion-item-option_3.entry.js +17 -15
  358. package/dist/esm/ion-item_8.entry.js +42 -36
  359. package/dist/esm/ion-loading.entry.js +18 -14
  360. package/dist/esm/ion-menu_3.entry.js +30 -22
  361. package/dist/esm/ion-modal.entry.js +55 -40
  362. package/dist/esm/ion-nav_2.entry.js +14 -10
  363. package/dist/esm/ion-picker-column-option.entry.js +10 -8
  364. package/dist/esm/ion-picker-column.entry.js +11 -7
  365. package/dist/esm/ion-picker.entry.js +6 -6
  366. package/dist/esm/ion-popover.entry.js +21 -15
  367. package/dist/esm/ion-progress-bar.entry.js +7 -7
  368. package/dist/esm/ion-radio_2.entry.js +17 -13
  369. package/dist/esm/ion-range.entry.js +29 -15
  370. package/dist/esm/ion-refresher_2.entry.js +45 -14
  371. package/dist/esm/ion-reorder_2.entry.js +13 -11
  372. package/dist/esm/ion-ripple-effect.entry.js +4 -4
  373. package/dist/esm/ion-route_4.entry.js +20 -10
  374. package/dist/esm/ion-searchbar.entry.js +22 -12
  375. package/dist/esm/ion-segment-content.entry.js +3 -3
  376. package/dist/esm/ion-segment-view.entry.js +5 -5
  377. package/dist/esm/ion-segment_2.entry.js +26 -16
  378. package/dist/esm/ion-select-modal.entry.js +12 -12
  379. package/dist/esm/ion-select_3.entry.js +29 -21
  380. package/dist/esm/ion-spinner.entry.js +4 -4
  381. package/dist/esm/ion-split-pane.entry.js +15 -9
  382. package/dist/esm/ion-tab-bar_2.entry.js +14 -12
  383. package/dist/esm/ion-tab_2.entry.js +10 -8
  384. package/dist/esm/ion-text.entry.js +4 -4
  385. package/dist/esm/ion-textarea.entry.js +18 -12
  386. package/dist/esm/ion-toast.entry.js +21 -15
  387. package/dist/esm/ion-toggle.entry.js +10 -8
  388. package/dist/esm/{ionic-global-CDrldh-5.js → ionic-global-DfbeLwcV.js} +1 -1
  389. package/dist/esm/ionic.js +6 -6
  390. package/dist/esm/{ios.transition-BDzw0_Hm.js → ios.transition--aMF-pDH.js} +4 -4
  391. package/dist/esm/loader.js +5 -5
  392. package/dist/esm/{md.transition-BzDYi3qq.js → md.transition-BEVbfm8j.js} +4 -4
  393. package/dist/esm/{notch-controller-BwelN_JM.js → notch-controller-DAcvKU57.js} +1 -1
  394. package/dist/esm/{overlays-D5YkFThA.js → overlays-F8GHPo-e.js} +5 -5
  395. package/dist/esm/{status-tap-5DQ7Fc4V.js → status-tap-BfJqFSLF.js} +3 -3
  396. package/dist/esm/{swipe-back-BKw2CAHc.js → swipe-back-BZBFwTQV.js} +2 -2
  397. package/dist/html.html-data.json +109 -109
  398. package/dist/ionic/index.esm.js +1 -1
  399. package/dist/ionic/ionic.esm.js +1 -1
  400. package/dist/ionic/{p-316c0420.entry.js → p-025d2d32.entry.js} +1 -1
  401. package/dist/ionic/p-02acdef4.entry.js +4 -0
  402. package/dist/ionic/p-04e2c388.entry.js +4 -0
  403. package/dist/ionic/{p-370e4237.entry.js → p-074344b8.entry.js} +1 -1
  404. package/dist/ionic/p-0761b4d3.entry.js +4 -0
  405. package/dist/ionic/p-13ade5c8.entry.js +4 -0
  406. package/dist/ionic/p-1b02923f.entry.js +4 -0
  407. package/dist/ionic/p-1bd477a9.entry.js +4 -0
  408. package/dist/ionic/{p-d2489bf2.entry.js → p-1fa1406c.entry.js} +1 -1
  409. package/dist/ionic/{p-46d74291.entry.js → p-1fd588a7.entry.js} +1 -1
  410. package/dist/ionic/p-239a27a4.entry.js +4 -0
  411. package/dist/ionic/{p-94de5cfa.entry.js → p-277abec1.entry.js} +1 -1
  412. package/dist/ionic/{p-dd1aef77.entry.js → p-28d7852f.entry.js} +1 -1
  413. package/dist/ionic/{p-49d06882.entry.js → p-301c43f8.entry.js} +1 -1
  414. package/dist/ionic/{p-79bd78f9.entry.js → p-370a60ee.entry.js} +1 -1
  415. package/dist/ionic/p-3e143d1d.entry.js +4 -0
  416. package/dist/ionic/p-4431ef7e.entry.js +4 -0
  417. package/dist/ionic/p-463767ce.entry.js +4 -0
  418. package/dist/ionic/p-4f888343.entry.js +4 -0
  419. package/dist/ionic/p-51c11c47.entry.js +4 -0
  420. package/dist/ionic/p-56050077.entry.js +4 -0
  421. package/dist/ionic/p-6a3a5aae.entry.js +4 -0
  422. package/dist/ionic/p-6b97f2a3.entry.js +4 -0
  423. package/dist/ionic/{p-51a60e0f.entry.js → p-7c72d482.entry.js} +1 -1
  424. package/dist/ionic/p-7d20f4f8.entry.js +4 -0
  425. package/dist/ionic/{p-11aa58d6.entry.js → p-80cac7a2.entry.js} +1 -1
  426. package/dist/ionic/p-91fc7352.entry.js +4 -0
  427. package/dist/ionic/p-93845421.entry.js +4 -0
  428. package/dist/ionic/{p-3a6caca9.entry.js → p-964090ef.entry.js} +1 -1
  429. package/dist/ionic/p-96a2e768.entry.js +4 -0
  430. package/dist/ionic/{p-d126e8d3.entry.js → p-9745651b.entry.js} +1 -1
  431. package/dist/ionic/{p-f9061316.entry.js → p-9802c88e.entry.js} +1 -1
  432. package/dist/ionic/{p-582824c5.entry.js → p-9833cf63.entry.js} +1 -1
  433. package/dist/ionic/{p-675b1a31.entry.js → p-9fae83d8.entry.js} +1 -1
  434. package/dist/ionic/{p-CwgG81ZD.js → p-B8xlpH8p.js} +1 -1
  435. package/dist/ionic/{p-C7hRNDhM.js → p-BAt5H1ac.js} +1 -1
  436. package/dist/ionic/p-BW_TRJm8.js +4 -0
  437. package/dist/ionic/{p-DDb5r57F.js → p-Bum7H1fw.js} +1 -1
  438. package/dist/ionic/{p-D0dMcSkw.js → p-BvFYtOdE.js} +1 -1
  439. package/dist/ionic/{p-Dc45iWE4.js → p-BxIcPWoV.js} +1 -1
  440. package/dist/ionic/{p-BYEqWnSg.js → p-C0JvVFMv.js} +1 -1
  441. package/dist/ionic/{p-CTfR9YZG.js → p-CGmVTdWh.js} +1 -1
  442. package/dist/ionic/{p-BOVrCkpJ.js → p-CYbRmDdy.js} +1 -1
  443. package/dist/ionic/{p-D-eFFUkA.js → p-CmFz1Mjc.js} +1 -1
  444. package/dist/ionic/p-CtA-yJYy.js +4 -0
  445. package/dist/ionic/p-D8HJQ1qq.js +4 -0
  446. package/dist/ionic/{p-B0q1YL7N.js → p-DB_iPQC-.js} +1 -1
  447. package/dist/ionic/{p-DNcfiJwE.js → p-DLbbmF9h.js} +1 -1
  448. package/dist/ionic/{p-DdR6rpbR.js → p-DTPR1Wpn.js} +1 -1
  449. package/dist/ionic/{p-DCv9sLH2.js → p-DjriolRs.js} +1 -1
  450. package/dist/ionic/p-DtVZDHlS.js +4 -0
  451. package/dist/ionic/{p-QHYY4sjU.js → p-GWUGgWx6.js} +1 -1
  452. package/dist/ionic/p-IGIE5vDm.js +5 -0
  453. package/dist/ionic/{p-BFvmZNyx.js → p-NFFyoJ4Q.js} +1 -1
  454. package/dist/ionic/{p-86f53961.entry.js → p-a287e18e.entry.js} +1 -1
  455. package/dist/ionic/p-a805674e.entry.js +4 -0
  456. package/dist/ionic/p-a81ae2cd.entry.js +4 -0
  457. package/dist/ionic/{p-da7d04cc.entry.js → p-a84f2d21.entry.js} +1 -1
  458. package/dist/ionic/{p-dbbe606a.entry.js → p-b2d5238b.entry.js} +1 -1
  459. package/dist/ionic/{p-d1f54e28.entry.js → p-b440381f.entry.js} +1 -1
  460. package/dist/ionic/{p-72c38b88.entry.js → p-b4d52b58.entry.js} +1 -1
  461. package/dist/ionic/{p-2a939845.entry.js → p-b67a2114.entry.js} +1 -1
  462. package/dist/ionic/{p-c73627c8.entry.js → p-bced1f3e.entry.js} +1 -1
  463. package/dist/ionic/{p-9a2d390d.entry.js → p-c1c9b2bb.entry.js} +1 -1
  464. package/dist/ionic/{p-f8f22cc0.entry.js → p-c3e65e45.entry.js} +1 -1
  465. package/dist/ionic/p-c76cc21d.entry.js +4 -0
  466. package/dist/ionic/{p-b0a7585c.entry.js → p-ca31010f.entry.js} +1 -1
  467. package/dist/ionic/p-cbf245b5.entry.js +4 -0
  468. package/dist/ionic/p-d68b665a.entry.js +4 -0
  469. package/dist/ionic/{p-9575b654.entry.js → p-e663bc5a.entry.js} +1 -1
  470. package/dist/ionic/p-efe86ed9.entry.js +4 -0
  471. package/dist/ionic/{p-ac4eb91d.entry.js → p-f5dfb9a3.entry.js} +1 -1
  472. package/dist/ionic/{p-DbQ5QkTP.js → p-gbVXD275.js} +1 -1
  473. package/dist/ionic/p-hNN3VvaC.js +4 -0
  474. package/dist/types/components/datetime/datetime.d.ts +9 -0
  475. package/dist/types/components/header/header.utils.d.ts +2 -1
  476. package/dist/types/components/modal/modal-interface.d.ts +5 -1
  477. package/dist/types/components/modal/modal.d.ts +5 -0
  478. package/dist/types/components/refresher/refresher-interface.d.ts +7 -0
  479. package/dist/types/components/refresher/refresher.d.ts +16 -3
  480. package/dist/types/components.d.ts +927 -189
  481. package/dist/types/interface.d.ts +1 -1
  482. package/dist/types/stencil-public-runtime.d.ts +126 -14
  483. package/dist/types/utils/gesture/listener.d.ts +2 -1
  484. package/hydrate/index.d.ts +12 -0
  485. package/hydrate/index.js +5202 -1327
  486. package/hydrate/index.mjs +5201 -1328
  487. package/package.json +2 -2
  488. package/dist/cjs/app-globals-Ciccnk9_.js +0 -10
  489. package/dist/esm/app-globals-BDSf8fOA.js +0 -8
  490. package/dist/ionic/p-012212e4.entry.js +0 -4
  491. package/dist/ionic/p-074839fc.entry.js +0 -4
  492. package/dist/ionic/p-0dfa5a37.entry.js +0 -4
  493. package/dist/ionic/p-0f418a37.entry.js +0 -4
  494. package/dist/ionic/p-11518b31.entry.js +0 -4
  495. package/dist/ionic/p-1838bed5.entry.js +0 -4
  496. package/dist/ionic/p-29721c43.entry.js +0 -4
  497. package/dist/ionic/p-31f7095f.entry.js +0 -4
  498. package/dist/ionic/p-34642fa1.entry.js +0 -4
  499. package/dist/ionic/p-35696017.entry.js +0 -4
  500. package/dist/ionic/p-40c261a3.entry.js +0 -4
  501. package/dist/ionic/p-4e41ea20.entry.js +0 -4
  502. package/dist/ionic/p-6241ce47.entry.js +0 -4
  503. package/dist/ionic/p-639dd543.entry.js +0 -4
  504. package/dist/ionic/p-6444c606.entry.js +0 -4
  505. package/dist/ionic/p-6d070558.entry.js +0 -4
  506. package/dist/ionic/p-7268efa5.entry.js +0 -4
  507. package/dist/ionic/p-7babec72.entry.js +0 -4
  508. package/dist/ionic/p-BKc55Xev.js +0 -4
  509. package/dist/ionic/p-Bmgaetn_.js +0 -4
  510. package/dist/ionic/p-C8IsBmNU.js +0 -5
  511. package/dist/ionic/p-CJxh_yLS.js +0 -4
  512. package/dist/ionic/p-DUt5fQmA.js +0 -4
  513. package/dist/ionic/p-DZRJwG4S.js +0 -4
  514. package/dist/ionic/p-a127bee2.entry.js +0 -4
  515. package/dist/ionic/p-b3d44509.entry.js +0 -4
  516. package/dist/ionic/p-cc45bcbc.entry.js +0 -4
  517. package/dist/ionic/p-d0a2a1ab.entry.js +0 -4
  518. package/dist/ionic/p-d3014190.entry.js +0 -4
  519. package/dist/ionic/p-db82892c.entry.js +0 -4
  520. package/dist/ionic/p-e1d1f3cc.entry.js +0 -4
@@ -1,627 +1,4 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { w as win, d as doc } from './index9.js';
5
- import { g as getScrollElement, c as scrollByPoint, a as findClosestIonContent } from './index8.js';
6
- import { a as addEventListener, b as removeEventListener, r as raf, c as componentOnReady } from './helpers.js';
7
- import { a as KeyboardResize, K as Keyboard } from './keyboard2.js';
8
-
9
- const cloneMap = new WeakMap();
10
- const relocateInput = (componentEl, inputEl, shouldRelocate, inputRelativeY = 0, disabledClonedInput = false) => {
11
- if (cloneMap.has(componentEl) === shouldRelocate) {
12
- return;
13
- }
14
- if (shouldRelocate) {
15
- addClone(componentEl, inputEl, inputRelativeY, disabledClonedInput);
16
- }
17
- else {
18
- removeClone(componentEl, inputEl);
19
- }
20
- };
21
- const isFocused = (input) => {
22
- /**
23
- * https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode
24
- * Calling getRootNode on an element in standard web page will return HTMLDocument.
25
- * Calling getRootNode on an element inside of the Shadow DOM will return the associated ShadowRoot.
26
- * Calling getRootNode on an element that is not attached to a document/shadow tree will return
27
- * the root of the DOM tree it belongs to.
28
- * isFocused is used for the hide-caret utility which only considers input/textarea elements
29
- * that are present in the DOM, so we don't set types for that final case since it does not apply.
30
- */
31
- return input === input.getRootNode().activeElement;
32
- };
33
- const addClone = (componentEl, inputEl, inputRelativeY, disabledClonedInput = false) => {
34
- // this allows for the actual input to receive the focus from
35
- // the user's touch event, but before it receives focus, it
36
- // moves the actual input to a location that will not screw
37
- // up the app's layout, and does not allow the native browser
38
- // to attempt to scroll the input into place (messing up headers/footers)
39
- // the cloned input fills the area of where native input should be
40
- // while the native input fakes out the browser by relocating itself
41
- // before it receives the actual focus event
42
- // We hide the focused input (with the visible caret) invisible by making it scale(0),
43
- const parentEl = inputEl.parentNode;
44
- // DOM WRITES
45
- const clonedEl = inputEl.cloneNode(false);
46
- clonedEl.classList.add('cloned-input');
47
- clonedEl.tabIndex = -1;
48
- /**
49
- * Making the cloned input disabled prevents
50
- * Chrome for Android from still scrolling
51
- * the entire page since this cloned input
52
- * will briefly be hidden by the keyboard
53
- * even though it is not focused.
54
- *
55
- * This is not needed on iOS. While this
56
- * does not cause functional issues on iOS,
57
- * the input still appears slightly dimmed even
58
- * if we set opacity: 1.
59
- */
60
- if (disabledClonedInput) {
61
- clonedEl.disabled = true;
62
- }
63
- parentEl.appendChild(clonedEl);
64
- cloneMap.set(componentEl, clonedEl);
65
- const doc = componentEl.ownerDocument;
66
- const tx = doc.dir === 'rtl' ? 9999 : -9999;
67
- componentEl.style.pointerEvents = 'none';
68
- inputEl.style.transform = `translate3d(${tx}px,${inputRelativeY}px,0) scale(0)`;
69
- };
70
- const removeClone = (componentEl, inputEl) => {
71
- const clone = cloneMap.get(componentEl);
72
- if (clone) {
73
- cloneMap.delete(componentEl);
74
- clone.remove();
75
- }
76
- componentEl.style.pointerEvents = '';
77
- inputEl.style.transform = '';
78
- };
79
- /**
80
- * Factoring in 50px gives us some room
81
- * in case the keyboard shows password/autofill bars
82
- * asynchronously.
83
- */
84
- const SCROLL_AMOUNT_PADDING = 50;
85
-
86
- const enableHideCaretOnScroll = (componentEl, inputEl, scrollEl) => {
87
- if (!scrollEl || !inputEl) {
88
- return () => {
89
- return;
90
- };
91
- }
92
- const scrollHideCaret = (shouldHideCaret) => {
93
- if (isFocused(inputEl)) {
94
- relocateInput(componentEl, inputEl, shouldHideCaret);
95
- }
96
- };
97
- const onBlur = () => relocateInput(componentEl, inputEl, false);
98
- const hideCaret = () => scrollHideCaret(true);
99
- const showCaret = () => scrollHideCaret(false);
100
- addEventListener(scrollEl, 'ionScrollStart', hideCaret);
101
- addEventListener(scrollEl, 'ionScrollEnd', showCaret);
102
- inputEl.addEventListener('blur', onBlur);
103
- return () => {
104
- removeEventListener(scrollEl, 'ionScrollStart', hideCaret);
105
- removeEventListener(scrollEl, 'ionScrollEnd', showCaret);
106
- inputEl.removeEventListener('blur', onBlur);
107
- };
108
- };
109
-
110
- const SKIP_SELECTOR = 'input, textarea, [no-blur], [contenteditable]';
111
- const enableInputBlurring = () => {
112
- let focused = true;
113
- let didScroll = false;
114
- const doc = document;
115
- const onScroll = () => {
116
- didScroll = true;
117
- };
118
- const onFocusin = () => {
119
- focused = true;
120
- };
121
- const onTouchend = (ev) => {
122
- // if app did scroll return early
123
- if (didScroll) {
124
- didScroll = false;
125
- return;
126
- }
127
- const active = doc.activeElement;
128
- if (!active) {
129
- return;
130
- }
131
- // only blur if the active element is a text-input or a textarea
132
- if (active.matches(SKIP_SELECTOR)) {
133
- return;
134
- }
135
- // if the selected target is the active element, do not blur
136
- const tapped = ev.target;
137
- if (tapped === active) {
138
- return;
139
- }
140
- if (tapped.matches(SKIP_SELECTOR) || tapped.closest(SKIP_SELECTOR)) {
141
- return;
142
- }
143
- focused = false;
144
- // TODO FW-2796: find a better way, why 50ms?
145
- setTimeout(() => {
146
- if (!focused) {
147
- active.blur();
148
- }
149
- }, 50);
150
- };
151
- addEventListener(doc, 'ionScrollStart', onScroll);
152
- doc.addEventListener('focusin', onFocusin, true);
153
- doc.addEventListener('touchend', onTouchend, false);
154
- return () => {
155
- removeEventListener(doc, 'ionScrollStart', onScroll, true);
156
- doc.removeEventListener('focusin', onFocusin, true);
157
- doc.removeEventListener('touchend', onTouchend, false);
158
- };
159
- };
160
-
161
- const SCROLL_ASSIST_SPEED = 0.3;
162
- const getScrollData = (componentEl, contentEl, keyboardHeight, platformHeight) => {
163
- var _a;
164
- const itemEl = (_a = componentEl.closest('ion-item,[ion-item]')) !== null && _a !== void 0 ? _a : componentEl;
165
- return calcScrollData(itemEl.getBoundingClientRect(), contentEl.getBoundingClientRect(), keyboardHeight, platformHeight);
166
- };
167
- const calcScrollData = (inputRect, contentRect, keyboardHeight, platformHeight) => {
168
- // compute input's Y values relative to the body
169
- const inputTop = inputRect.top;
170
- const inputBottom = inputRect.bottom;
171
- // compute visible area
172
- const visibleAreaTop = contentRect.top;
173
- const visibleAreaBottom = Math.min(contentRect.bottom, platformHeight - keyboardHeight);
174
- // compute safe area
175
- const safeAreaTop = visibleAreaTop + 15;
176
- const safeAreaBottom = visibleAreaBottom - SCROLL_AMOUNT_PADDING;
177
- // figure out if each edge of the input is within the safe area
178
- const distanceToBottom = safeAreaBottom - inputBottom;
179
- const distanceToTop = safeAreaTop - inputTop;
180
- // desiredScrollAmount is the negated distance to the safe area according to our calculations.
181
- const desiredScrollAmount = Math.round(distanceToBottom < 0 ? -distanceToBottom : distanceToTop > 0 ? -distanceToTop : 0);
182
- // our calculations make some assumptions that aren't always true, like the keyboard being closed when an input
183
- // gets focus, so make sure we don't scroll the input above the visible area
184
- const scrollAmount = Math.min(desiredScrollAmount, inputTop - visibleAreaTop);
185
- const distance = Math.abs(scrollAmount);
186
- const duration = distance / SCROLL_ASSIST_SPEED;
187
- const scrollDuration = Math.min(400, Math.max(150, duration));
188
- return {
189
- scrollAmount,
190
- scrollDuration,
191
- scrollPadding: keyboardHeight,
192
- inputSafeY: -(inputTop - safeAreaTop) + 4,
193
- };
194
- };
195
-
196
- const PADDING_TIMER_KEY = '$ionPaddingTimer';
197
- /**
198
- * Scroll padding adds additional padding to the bottom
199
- * of ion-content so that there is enough scroll space
200
- * for an input to be scrolled above the keyboard. This
201
- * is needed in environments where the webview does not
202
- * resize when the keyboard opens.
203
- *
204
- * Example: If an input at the bottom of ion-content is
205
- * focused, there is no additional scrolling space below
206
- * it, so the input cannot be scrolled above the keyboard.
207
- * Scroll padding fixes this by adding padding equal to the
208
- * height of the keyboard to the bottom of the content.
209
- *
210
- * Common environments where this is needed:
211
- * - Mobile Safari: The keyboard overlays the content
212
- * - Capacitor/Cordova on iOS: The keyboard overlays the content
213
- * when the KeyboardResize mode is set to 'none'.
214
- */
215
- const setScrollPadding = (contentEl, paddingAmount, clearCallback) => {
216
- const timer = contentEl[PADDING_TIMER_KEY];
217
- if (timer) {
218
- clearTimeout(timer);
219
- }
220
- if (paddingAmount > 0) {
221
- contentEl.style.setProperty('--keyboard-offset', `${paddingAmount}px`);
222
- }
223
- else {
224
- contentEl[PADDING_TIMER_KEY] = setTimeout(() => {
225
- contentEl.style.setProperty('--keyboard-offset', '0px');
226
- if (clearCallback) {
227
- clearCallback();
228
- }
229
- }, 120);
230
- }
231
- };
232
- /**
233
- * When an input is about to be focused,
234
- * set a timeout to clear any scroll padding
235
- * on the content. Note: The clearing
236
- * is done on a timeout so that if users
237
- * are moving focus from one input to the next
238
- * then re-adding scroll padding to the new
239
- * input with cancel the timeout to clear the
240
- * scroll padding.
241
- */
242
- const setClearScrollPaddingListener = (inputEl, contentEl, doneCallback) => {
243
- const clearScrollPadding = () => {
244
- if (contentEl) {
245
- setScrollPadding(contentEl, 0, doneCallback);
246
- }
247
- };
248
- inputEl.addEventListener('focusout', clearScrollPadding, { once: true });
249
- };
250
-
251
- let currentPadding = 0;
252
- const SKIP_SCROLL_ASSIST = 'data-ionic-skip-scroll-assist';
253
- const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardHeight, enableScrollPadding, keyboardResize, disableClonedInput = false) => {
254
- /**
255
- * Scroll padding should only be added if:
256
- * 1. The global scrollPadding config option
257
- * is set to true.
258
- * 2. The native keyboard resize mode is either "none"
259
- * (keyboard overlays webview) or undefined (resize
260
- * information unavailable)
261
- * Resize info is available on Capacitor 4+
262
- */
263
- const addScrollPadding = enableScrollPadding && (keyboardResize === undefined || keyboardResize.mode === KeyboardResize.None);
264
- /**
265
- * This tracks whether or not the keyboard has been
266
- * presented for a single focused text field. Note
267
- * that it does not track if the keyboard is open
268
- * in general such as if the keyboard is open for
269
- * a different focused text field.
270
- */
271
- let hasKeyboardBeenPresentedForTextField = false;
272
- /**
273
- * When adding scroll padding we need to know
274
- * how much of the viewport the keyboard obscures.
275
- * We do this by subtracting the keyboard height
276
- * from the platform height.
277
- *
278
- * If we compute this value when switching between
279
- * inputs then the webview may already be resized.
280
- * At this point, `win.innerHeight` has already accounted
281
- * for the keyboard meaning we would then subtract
282
- * the keyboard height again. This will result in the input
283
- * being scrolled more than it needs to.
284
- */
285
- const platformHeight = win !== undefined ? win.innerHeight : 0;
286
- /**
287
- * Scroll assist is run when a text field
288
- * is focused. However, it may need to
289
- * re-run when the keyboard size changes
290
- * such that the text field is now hidden
291
- * underneath the keyboard.
292
- * This function re-runs scroll assist
293
- * when that happens.
294
- *
295
- * One limitation of this is on a web browser
296
- * where native keyboard APIs do not have cross-browser
297
- * support. `ionKeyboardDidShow` relies on the Visual Viewport API.
298
- * This means that if the keyboard changes but does not change
299
- * geometry, then scroll assist will not re-run even if
300
- * the user has scrolled the text field under the keyboard.
301
- * This is not a problem when running in Cordova/Capacitor
302
- * because `ionKeyboardDidShow` uses the native events
303
- * which fire every time the keyboard changes.
304
- */
305
- const keyboardShow = (ev) => {
306
- /**
307
- * If the keyboard has not yet been presented
308
- * for this text field then the text field has just
309
- * received focus. In that case, the focusin listener
310
- * will run scroll assist.
311
- */
312
- if (hasKeyboardBeenPresentedForTextField === false) {
313
- hasKeyboardBeenPresentedForTextField = true;
314
- return;
315
- }
316
- /**
317
- * Otherwise, the keyboard has already been presented
318
- * for the focused text field.
319
- * This means that the keyboard likely changed
320
- * geometry, and we need to re-run scroll assist.
321
- * This can happen when the user rotates their device
322
- * or when they switch keyboards.
323
- *
324
- * Make sure we pass in the computed keyboard height
325
- * rather than the estimated keyboard height.
326
- *
327
- * Since the keyboard is already open then we do not
328
- * need to wait for the webview to resize, so we pass
329
- * "waitForResize: false".
330
- */
331
- jsSetFocus(componentEl, inputEl, contentEl, footerEl, ev.detail.keyboardHeight, addScrollPadding, disableClonedInput, platformHeight, false);
332
- };
333
- /**
334
- * Reset the internal state when the text field loses focus.
335
- */
336
- const focusOut = () => {
337
- hasKeyboardBeenPresentedForTextField = false;
338
- win === null || win === void 0 ? void 0 : win.removeEventListener('ionKeyboardDidShow', keyboardShow);
339
- componentEl.removeEventListener('focusout', focusOut);
340
- };
341
- /**
342
- * When the input is about to receive
343
- * focus, we need to move it to prevent
344
- * mobile Safari from adjusting the viewport.
345
- */
346
- const focusIn = async () => {
347
- /**
348
- * Scroll assist should not run again
349
- * on inputs that have been manually
350
- * focused inside of the scroll assist
351
- * implementation.
352
- */
353
- if (inputEl.hasAttribute(SKIP_SCROLL_ASSIST)) {
354
- inputEl.removeAttribute(SKIP_SCROLL_ASSIST);
355
- return;
356
- }
357
- jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight, addScrollPadding, disableClonedInput, platformHeight);
358
- win === null || win === void 0 ? void 0 : win.addEventListener('ionKeyboardDidShow', keyboardShow);
359
- componentEl.addEventListener('focusout', focusOut);
360
- };
361
- componentEl.addEventListener('focusin', focusIn);
362
- return () => {
363
- componentEl.removeEventListener('focusin', focusIn);
364
- win === null || win === void 0 ? void 0 : win.removeEventListener('ionKeyboardDidShow', keyboardShow);
365
- componentEl.removeEventListener('focusout', focusOut);
366
- };
367
- };
368
- /**
369
- * Use this function when you want to manually
370
- * focus an input but not have scroll assist run again.
371
- */
372
- const setManualFocus = (el) => {
373
- var _a;
374
- /**
375
- * If element is already focused then
376
- * a new focusin event will not be dispatched
377
- * to remove the SKIL_SCROLL_ASSIST attribute.
378
- */
379
- if (document.activeElement === el) {
380
- return;
381
- }
382
- /**
383
- * Optimization for scenarios where the currently focused element is a sibling
384
- * of the target element. In such cases, we avoid setting `SKIP_SCROLL_ASSIST`.
385
- *
386
- * This is crucial for accessibility: input elements can now contain focusable
387
- * siblings (e.g., clear buttons, slotted elements). If we didn't skip setting
388
- * the attribute here, screen readers would be unable to navigate to and interact
389
- * with these sibling elements.
390
- *
391
- * Without this check, we would need to call `ev.stopPropagation()` on the
392
- * 'focusin' event of each focusable sibling to prevent the scroll assist
393
- * listener from incorrectly moving focus back to the input. That approach
394
- * would be less maintainable and more error-prone.
395
- */
396
- const inputId = el.getAttribute('id');
397
- const label = el.closest(`label[for="${inputId}"]`);
398
- const activeElLabel = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest(`label[for="${inputId}"]`);
399
- if (label !== null && label === activeElLabel) {
400
- // If the label is the same as the active element label, then
401
- // we don't need to set the `SKIP_SCROLL_ASSIST` and reset focus.
402
- return;
403
- }
404
- el.setAttribute(SKIP_SCROLL_ASSIST, 'true');
405
- el.focus();
406
- };
407
- const jsSetFocus = async (componentEl, inputEl, contentEl, footerEl, keyboardHeight, enableScrollPadding, disableClonedInput = false, platformHeight = 0, waitForResize = true) => {
408
- if (!contentEl && !footerEl) {
409
- return;
410
- }
411
- const scrollData = getScrollData(componentEl, (contentEl || footerEl), keyboardHeight, platformHeight);
412
- if (contentEl && Math.abs(scrollData.scrollAmount) < 4) {
413
- // the text input is in a safe position that doesn't
414
- // require it to be scrolled into view, just set focus now
415
- setManualFocus(inputEl);
416
- /**
417
- * Even though the input does not need
418
- * scroll assist, we should preserve the
419
- * the scroll padding as users could be moving
420
- * focus from an input that needs scroll padding
421
- * to an input that does not need scroll padding.
422
- * If we remove the scroll padding now, users will
423
- * see the page jump.
424
- */
425
- if (enableScrollPadding && contentEl !== null) {
426
- setScrollPadding(contentEl, currentPadding);
427
- setClearScrollPaddingListener(inputEl, contentEl, () => (currentPadding = 0));
428
- }
429
- return;
430
- }
431
- // temporarily move the focus to the focus holder so the browser
432
- // doesn't freak out while it's trying to get the input in place
433
- // at this point the native text input still does not have focus
434
- relocateInput(componentEl, inputEl, true, scrollData.inputSafeY, disableClonedInput);
435
- setManualFocus(inputEl);
436
- /**
437
- * Relocating/Focusing input causes the
438
- * click event to be cancelled, so
439
- * manually fire one here.
440
- */
441
- raf(() => componentEl.click());
442
- /**
443
- * If enabled, we can add scroll padding to
444
- * the bottom of the content so that scroll assist
445
- * has enough room to scroll the input above
446
- * the keyboard.
447
- */
448
- if (enableScrollPadding && contentEl) {
449
- currentPadding = scrollData.scrollPadding;
450
- setScrollPadding(contentEl, currentPadding);
451
- }
452
- if (typeof window !== 'undefined') {
453
- let scrollContentTimeout;
454
- const scrollContent = async () => {
455
- // clean up listeners and timeouts
456
- if (scrollContentTimeout !== undefined) {
457
- clearTimeout(scrollContentTimeout);
458
- }
459
- window.removeEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);
460
- window.removeEventListener('ionKeyboardDidShow', scrollContent);
461
- // scroll the input into place
462
- if (contentEl) {
463
- await scrollByPoint(contentEl, 0, scrollData.scrollAmount, scrollData.scrollDuration);
464
- }
465
- // the scroll view is in the correct position now
466
- // give the native text input focus
467
- relocateInput(componentEl, inputEl, false, scrollData.inputSafeY);
468
- // ensure this is the focused input
469
- setManualFocus(inputEl);
470
- /**
471
- * When the input is about to be blurred
472
- * we should set a timeout to remove
473
- * any scroll padding.
474
- */
475
- if (enableScrollPadding) {
476
- setClearScrollPaddingListener(inputEl, contentEl, () => (currentPadding = 0));
477
- }
478
- };
479
- const doubleKeyboardEventListener = () => {
480
- window.removeEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);
481
- window.addEventListener('ionKeyboardDidShow', scrollContent);
482
- };
483
- if (contentEl) {
484
- const scrollEl = await getScrollElement(contentEl);
485
- /**
486
- * scrollData will only consider the amount we need
487
- * to scroll in order to properly bring the input
488
- * into view. It will not consider the amount
489
- * we can scroll in the content element.
490
- * As a result, scrollData may request a greater
491
- * scroll position than is currently available
492
- * in the DOM. If this is the case, we need to
493
- * wait for the webview to resize/the keyboard
494
- * to show in order for additional scroll
495
- * bandwidth to become available.
496
- */
497
- const totalScrollAmount = scrollEl.scrollHeight - scrollEl.clientHeight;
498
- if (waitForResize && scrollData.scrollAmount > totalScrollAmount - scrollEl.scrollTop) {
499
- /**
500
- * On iOS devices, the system will show a "Passwords" bar above the keyboard
501
- * after the initial keyboard is shown. This prevents the webview from resizing
502
- * until the "Passwords" bar is shown, so we need to wait for that to happen first.
503
- */
504
- if (inputEl.type === 'password') {
505
- // Add 50px to account for the "Passwords" bar
506
- scrollData.scrollAmount += SCROLL_AMOUNT_PADDING;
507
- window.addEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);
508
- }
509
- else {
510
- window.addEventListener('ionKeyboardDidShow', scrollContent);
511
- }
512
- /**
513
- * This should only fire in 2 instances:
514
- * 1. The app is very slow.
515
- * 2. The app is running in a browser on an old OS
516
- * that does not support Ionic Keyboard Events
517
- */
518
- scrollContentTimeout = setTimeout(scrollContent, 1000);
519
- return;
520
- }
521
- }
522
- scrollContent();
523
- }
524
- };
525
-
526
- const INPUT_BLURRING = true;
527
- const startInputShims = async (config, platform) => {
528
- /**
529
- * If doc is undefined then we are in an SSR environment
530
- * where input shims do not apply.
531
- */
532
- if (doc === undefined) {
533
- return;
534
- }
535
- const isIOS = platform === 'ios';
536
- const isAndroid = platform === 'android';
537
- /**
538
- * Hide Caret and Input Blurring are needed on iOS.
539
- * Scroll Assist and Scroll Padding are needed on iOS and Android
540
- * with Chrome web browser (not Chrome webview).
541
- */
542
- const keyboardHeight = config.getNumber('keyboardHeight', 290);
543
- const scrollAssist = config.getBoolean('scrollAssist', true);
544
- const hideCaret = config.getBoolean('hideCaretOnScroll', isIOS);
545
- /**
546
- * The team is evaluating if inputBlurring is still needed. As a result
547
- * this feature is disabled by default as of Ionic 8.0. Developers are
548
- * able to re-enable it temporarily. The team may remove this utility
549
- * if it is determined that doing so would not bring any adverse side effects.
550
- * TODO FW-6014 remove input blurring utility (including implementation)
551
- */
552
- const inputBlurring = config.getBoolean('inputBlurring', false);
553
- const scrollPadding = config.getBoolean('scrollPadding', true);
554
- const inputs = Array.from(doc.querySelectorAll('ion-input, ion-textarea'));
555
- const hideCaretMap = new WeakMap();
556
- const scrollAssistMap = new WeakMap();
557
- /**
558
- * Grab the native keyboard resize configuration
559
- * and pass it to scroll assist. Scroll assist requires
560
- * that we adjust the input right before the input
561
- * is about to be focused. If we called `Keyboard.getResizeMode`
562
- * on focusin in scroll assist, we could potentially adjust the
563
- * input too late since this call is async.
564
- */
565
- const keyboardResizeMode = await Keyboard.getResizeMode();
566
- const registerInput = async (componentEl) => {
567
- await new Promise((resolve) => componentOnReady(componentEl, resolve));
568
- const inputRoot = componentEl.shadowRoot || componentEl;
569
- const inputEl = inputRoot.querySelector('input') || inputRoot.querySelector('textarea');
570
- const scrollEl = findClosestIonContent(componentEl);
571
- const footerEl = !scrollEl ? componentEl.closest('ion-footer') : null;
572
- if (!inputEl) {
573
- return;
574
- }
575
- if (!!scrollEl && hideCaret && !hideCaretMap.has(componentEl)) {
576
- const rmFn = enableHideCaretOnScroll(componentEl, inputEl, scrollEl);
577
- hideCaretMap.set(componentEl, rmFn);
578
- }
579
- /**
580
- * date/datetime-locale inputs on mobile devices show date picker
581
- * overlays instead of keyboards. As a result, scroll assist is
582
- * not needed. This also works around a bug in iOS <16 where
583
- * scroll assist causes the browser to lock up. See FW-1997.
584
- */
585
- const isDateInput = inputEl.type === 'date' || inputEl.type === 'datetime-local';
586
- if (!isDateInput &&
587
- (!!scrollEl || !!footerEl) &&
588
- scrollAssist &&
589
- !scrollAssistMap.has(componentEl)) {
590
- const rmFn = enableScrollAssist(componentEl, inputEl, scrollEl, footerEl, keyboardHeight, scrollPadding, keyboardResizeMode, isAndroid);
591
- scrollAssistMap.set(componentEl, rmFn);
592
- }
593
- };
594
- const unregisterInput = (componentEl) => {
595
- if (hideCaret) {
596
- const fn = hideCaretMap.get(componentEl);
597
- if (fn) {
598
- fn();
599
- }
600
- hideCaretMap.delete(componentEl);
601
- }
602
- if (scrollAssist) {
603
- const fn = scrollAssistMap.get(componentEl);
604
- if (fn) {
605
- fn();
606
- }
607
- scrollAssistMap.delete(componentEl);
608
- }
609
- };
610
- if (inputBlurring && INPUT_BLURRING) {
611
- enableInputBlurring();
612
- }
613
- // Input might be already loaded in the DOM before ion-device-hacks did.
614
- // At this point we need to look for all of the inputs not registered yet
615
- // and register them.
616
- for (const input of inputs) {
617
- registerInput(input);
618
- }
619
- doc.addEventListener('ionInputDidLoad', (ev) => {
620
- registerInput(ev.detail);
621
- });
622
- doc.addEventListener('ionInputDidUnload', (ev) => {
623
- unregisterInput(ev.detail);
624
- });
625
- };
626
-
627
- export { startInputShims };
4
+ import{w as o,d as n}from"./index9.js";import{g as t,c as i,a as r}from"./index8.js";import{a as e,b as a,r as s,c as d}from"./helpers.js";import{a as l,K as c}from"./keyboard2.js";const u=new WeakMap,f=(o,n,t,i=0,r=!1)=>{u.has(o)!==t&&(t?w(o,n,i,r):p(o,n))},w=(o,n,t,i=!1)=>{const r=n.parentNode,e=n.cloneNode(!1);e.classList.add("cloned-input"),e.tabIndex=-1,i&&(e.disabled=!0),r.appendChild(e),u.set(o,e);const a="rtl"===o.ownerDocument.dir?9999:-9999;o.style.pointerEvents="none",n.style.transform=`translate3d(${a}px,${t}px,0) scale(0)`},p=(o,n)=>{const t=u.get(o);t&&(u.delete(o),t.remove()),o.style.pointerEvents="",n.style.transform=""},m="input, textarea, [no-blur], [contenteditable]",b="$ionPaddingTimer",h=(o,n,t)=>{const i=o[b];i&&clearTimeout(i),n>0?o.style.setProperty("--keyboard-offset",`${n}px`):o[b]=setTimeout((()=>{o.style.setProperty("--keyboard-offset","0px"),t&&t()}),120)},y=(o,n,t)=>{o.addEventListener("focusout",(()=>{n&&h(n,0,t)}),{once:!0})};let S=0;const v="data-ionic-skip-scroll-assist",D=o=>{var n;if(document.activeElement===o)return;const t=o.getAttribute("id"),i=o.closest(`label[for="${t}"]`),r=null===(n=document.activeElement)||void 0===n?void 0:n.closest(`label[for="${t}"]`);null!==i&&i===r||(o.setAttribute(v,"true"),o.focus())},x=async(o,n,r,e,a,d,l=!1,c=0,u=!0)=>{if(!r&&!e)return;const w=((o,n,t,i)=>{var r;return((o,n,t,i)=>{const r=o.top,e=o.bottom,a=n.top,s=a+15,d=Math.min(n.bottom,i-t)-50-e,l=s-r,c=Math.round(d<0?-d:l>0?-l:0),u=Math.min(c,r-a),f=Math.abs(u);return{scrollAmount:u,scrollDuration:Math.min(400,Math.max(150,f/.3)),scrollPadding:t,inputSafeY:4-(r-s)}})((null!==(r=o.closest("ion-item,[ion-item]"))&&void 0!==r?r:o).getBoundingClientRect(),n.getBoundingClientRect(),t,i)})(o,r||e,a,c);if(r&&Math.abs(w.scrollAmount)<4)return D(n),void(d&&null!==r&&(h(r,S),y(n,r,(()=>S=0))));if(f(o,n,!0,w.inputSafeY,l),D(n),s((()=>o.click())),d&&r&&(S=w.scrollPadding,h(r,S)),"undefined"!=typeof window){let e;const a=async()=>{void 0!==e&&clearTimeout(e),window.removeEventListener("ionKeyboardDidShow",s),window.removeEventListener("ionKeyboardDidShow",a),r&&await i(r,0,w.scrollAmount,w.scrollDuration),f(o,n,!1,w.inputSafeY),D(n),d&&y(n,r,(()=>S=0))},s=()=>{window.removeEventListener("ionKeyboardDidShow",s),window.addEventListener("ionKeyboardDidShow",a)};if(r){const o=await t(r);if(u&&w.scrollAmount>o.scrollHeight-o.clientHeight-o.scrollTop)return"password"===n.type?(w.scrollAmount+=50,window.addEventListener("ionKeyboardDidShow",s)):window.addEventListener("ionKeyboardDidShow",a),void(e=setTimeout(a,1e3))}a()}},K=async(t,i)=>{if(void 0===n)return;const s="ios"===i,u="android"===i,w=t.getNumber("keyboardHeight",290),p=t.getBoolean("scrollAssist",!0),b=t.getBoolean("hideCaretOnScroll",s),h=t.getBoolean("inputBlurring",!1),y=t.getBoolean("scrollPadding",!0),S=Array.from(n.querySelectorAll("ion-input, ion-textarea")),D=new WeakMap,K=new WeakMap,M=await c.getResizeMode(),k=async n=>{await new Promise((o=>d(n,o)));const t=n.shadowRoot||n,i=t.querySelector("input")||t.querySelector("textarea"),s=r(n),c=s?null:n.closest("ion-footer");if(i){if(s&&b&&!D.has(n)){const o=((o,n,t)=>{if(!t||!n)return()=>{};const i=t=>{var i;(i=n)===i.getRootNode().activeElement&&f(o,n,t)},r=()=>f(o,n,!1),s=()=>i(!0),d=()=>i(!1);return e(t,"ionScrollStart",s),e(t,"ionScrollEnd",d),n.addEventListener("blur",r),()=>{a(t,"ionScrollStart",s),a(t,"ionScrollEnd",d),n.removeEventListener("blur",r)}})(n,i,s);D.set(n,o)}if("date"!==i.type&&"datetime-local"!==i.type&&(s||c)&&p&&!K.has(n)){const t=((n,t,i,r,e,a,s,d=!1)=>{const c=a&&(void 0===s||s.mode===l.None);let u=!1;const f=void 0!==o?o.innerHeight:0,w=o=>{!1!==u?x(n,t,i,r,o.detail.keyboardHeight,c,d,f,!1):u=!0},p=()=>{u=!1,null==o||o.removeEventListener("ionKeyboardDidShow",w),n.removeEventListener("focusout",p)},m=async()=>{t.hasAttribute(v)?t.removeAttribute(v):(x(n,t,i,r,e,c,d,f),null==o||o.addEventListener("ionKeyboardDidShow",w),n.addEventListener("focusout",p))};return n.addEventListener("focusin",m),()=>{n.removeEventListener("focusin",m),null==o||o.removeEventListener("ionKeyboardDidShow",w),n.removeEventListener("focusout",p)}})(n,i,s,c,w,y,M,u);K.set(n,t)}}};h&&(()=>{let o=!0,n=!1;const t=document;e(t,"ionScrollStart",(()=>{n=!0})),t.addEventListener("focusin",(()=>{o=!0}),!0),t.addEventListener("touchend",(i=>{if(n)return void(n=!1);const r=t.activeElement;if(!r)return;if(r.matches(m))return;const e=i.target;e!==r&&(e.matches(m)||e.closest(m)||(o=!1,setTimeout((()=>{o||r.blur()}),50)))}),!1)})();for(const o of S)k(o);n.addEventListener("ionInputDidLoad",(o=>{k(o.detail)})),n.addEventListener("ionInputDidUnload",(o=>{(o=>{if(b){const n=D.get(o);n&&n(),D.delete(o)}if(p){const n=K.get(o);n&&n(),K.delete(o)}})(o.detail)}))};export{K as startInputShims}