@ionic/core 8.7.10-dev.11762798751.11b77c85 → 8.7.10-dev.11763413450.1212cecf

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 (287) hide show
  1. package/components/checkbox.js +63 -9
  2. package/components/ion-datetime.js +39 -4
  3. package/components/ion-input.js +7 -6
  4. package/components/ion-searchbar.js +6 -6
  5. package/components/ion-select.js +7 -6
  6. package/components/ion-textarea.js +2 -1
  7. package/components/ion-toggle.js +62 -12
  8. package/components/notch-controller.js +153 -0
  9. package/components/radio-group.js +60 -7
  10. package/components/validity.js +1 -150
  11. package/dist/cjs/{animation-D_c13yq_.js → animation-Bt3H9L1C.js} +1 -1
  12. package/dist/cjs/{app-globals--1qFsqEw.js → app-globals-Ciccnk9_.js} +1 -1
  13. package/dist/cjs/{button-active-CQiBOKCI.js → button-active-CMc8cD90.js} +1 -1
  14. package/dist/cjs/{config-DL8XJF0D.js → config-C5fsO43a.js} +1 -1
  15. package/dist/cjs/{data-DtEHxOpt.js → data-JwZKaIQB.js} +1 -1
  16. package/dist/cjs/{framework-delegate-DmSgIb_h.js → framework-delegate-DMJRBuDi.js} +1 -1
  17. package/dist/cjs/{hardware-back-button-C72O8m7E.js → hardware-back-button-VCK4V3mG.js} +1 -1
  18. package/dist/cjs/{helpers-xCoR213K.js → helpers-DrTqNghc.js} +1 -1
  19. package/dist/cjs/{index-WEBAL2Zz.js → index-094mMFB-.js} +4 -4
  20. package/dist/cjs/{index-DOeyHw27.js → index-C534ULug.js} +2 -2
  21. package/dist/cjs/{index-FugOCm8C.js → index-CO6eryBo.js} +2 -2
  22. package/dist/cjs/{index-qWlbeMTM.js → index-D6Wc6v08.js} +3 -41
  23. package/dist/cjs/{index-FdJ4-6Rg.js → index-DrMUZJj6.js} +5 -5
  24. package/dist/cjs/index.cjs.js +12 -12
  25. package/dist/cjs/{input-shims-CYpwizql.js → input-shims-CW0KUFTQ.js} +3 -3
  26. package/dist/cjs/{input.utils-DhlH-Ng5.js → input.utils-B_QROI2g.js} +2 -2
  27. package/dist/cjs/ion-accordion_2.cjs.entry.js +3 -3
  28. package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -8
  29. package/dist/cjs/ion-alert.cjs.entry.js +9 -9
  30. package/dist/cjs/ion-app_8.cjs.entry.js +12 -12
  31. package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
  32. package/dist/cjs/ion-back-button.cjs.entry.js +3 -3
  33. package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
  34. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +3 -3
  35. package/dist/cjs/ion-button_2.cjs.entry.js +3 -3
  36. package/dist/cjs/ion-card_5.cjs.entry.js +3 -3
  37. package/dist/cjs/ion-checkbox.cjs.entry.js +63 -11
  38. package/dist/cjs/ion-chip.cjs.entry.js +2 -2
  39. package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
  40. package/dist/cjs/ion-datetime-button.cjs.entry.js +4 -4
  41. package/dist/cjs/ion-datetime_3.cjs.entry.js +47 -12
  42. package/dist/cjs/ion-fab_3.cjs.entry.js +3 -3
  43. package/dist/cjs/ion-img.cjs.entry.js +3 -3
  44. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +5 -5
  45. package/dist/cjs/ion-input-otp.cjs.entry.js +3 -3
  46. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +2 -2
  47. package/dist/cjs/ion-input.cjs.entry.js +11 -10
  48. package/dist/cjs/ion-item-option_3.cjs.entry.js +4 -4
  49. package/dist/cjs/ion-item_8.cjs.entry.js +3 -3
  50. package/dist/cjs/ion-loading.cjs.entry.js +8 -8
  51. package/dist/cjs/ion-menu_3.cjs.entry.js +8 -8
  52. package/dist/cjs/ion-modal.cjs.entry.js +9 -9
  53. package/dist/cjs/ion-nav_2.cjs.entry.js +6 -6
  54. package/dist/cjs/ion-picker-column-option.cjs.entry.js +3 -3
  55. package/dist/cjs/ion-picker-column.cjs.entry.js +3 -3
  56. package/dist/cjs/ion-picker.cjs.entry.js +2 -2
  57. package/dist/cjs/ion-popover.cjs.entry.js +8 -8
  58. package/dist/cjs/ion-progress-bar.cjs.entry.js +3 -3
  59. package/dist/cjs/ion-radio_2.cjs.entry.js +60 -9
  60. package/dist/cjs/ion-range.cjs.entry.js +4 -4
  61. package/dist/cjs/ion-refresher_2.cjs.entry.js +6 -6
  62. package/dist/cjs/ion-reorder_2.cjs.entry.js +4 -4
  63. package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
  64. package/dist/cjs/ion-route_4.cjs.entry.js +3 -3
  65. package/dist/cjs/ion-searchbar.cjs.entry.js +8 -8
  66. package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
  67. package/dist/cjs/ion-segment-view.cjs.entry.js +1 -1
  68. package/dist/cjs/ion-segment_2.cjs.entry.js +3 -3
  69. package/dist/cjs/ion-select-modal.cjs.entry.js +6 -6
  70. package/dist/cjs/ion-select_3.cjs.entry.js +13 -12
  71. package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
  72. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  73. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +3 -3
  74. package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
  75. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  76. package/dist/cjs/ion-textarea.cjs.entry.js +7 -6
  77. package/dist/cjs/ion-toast.cjs.entry.js +8 -8
  78. package/dist/cjs/ion-toggle.cjs.entry.js +61 -13
  79. package/dist/cjs/{ionic-global-CR8JSFWa.js → ionic-global-HMVqOFGO.js} +1 -1
  80. package/dist/cjs/ionic.cjs.js +5 -5
  81. package/dist/cjs/{ios.transition-MQamiuLS.js → ios.transition-BOt_uW73.js} +4 -4
  82. package/dist/cjs/loader.cjs.js +4 -4
  83. package/dist/cjs/{md.transition-VK5nuqXu.js → md.transition-Dt968VXB.js} +4 -4
  84. package/dist/cjs/{validity-ilhIJL9Q.js → notch-controller-Bzqhjm4f.js} +1 -15
  85. package/dist/cjs/{overlays-DcMnmLe2.js → overlays-DxIZwUXI.js} +5 -5
  86. package/dist/cjs/{status-tap-C0NZlIwJ.js → status-tap-g0sWWkXk.js} +3 -3
  87. package/dist/cjs/{swipe-back-CdOHy9bk.js → swipe-back-BIayeNOD.js} +2 -2
  88. package/dist/cjs/validity-BpS37YFM.js +19 -0
  89. package/dist/collection/collection-manifest.json +2 -2
  90. package/dist/collection/components/checkbox/checkbox.js +67 -9
  91. package/dist/collection/components/datetime/datetime.ios.css +15 -0
  92. package/dist/collection/components/datetime/datetime.js +37 -2
  93. package/dist/collection/components/datetime/datetime.md.css +15 -0
  94. package/dist/collection/components/input/input.js +8 -8
  95. package/dist/collection/components/radio-group/radio-group.js +64 -7
  96. package/dist/collection/components/searchbar/searchbar.js +9 -9
  97. package/dist/collection/components/select/select.js +5 -5
  98. package/dist/collection/components/toggle/toggle.js +62 -12
  99. package/dist/docs.json +25 -15
  100. package/dist/esm/{animation-BMjqGaKJ.js → animation-Dt8bGnA-.js} +1 -1
  101. package/dist/esm/{app-globals-CXKe5CYv.js → app-globals-BDSf8fOA.js} +1 -1
  102. package/dist/esm/{button-active-DsHCf5yJ.js → button-active-L570Swow.js} +1 -1
  103. package/dist/esm/{config-FyGnL1d5.js → config-mCdtaoPe.js} +1 -1
  104. package/dist/esm/{data-VwBJONjN.js → data-DCORV9FH.js} +1 -1
  105. package/dist/esm/{framework-delegate-DA71As64.js → framework-delegate-BYawdMXj.js} +1 -1
  106. package/dist/esm/{hardware-back-button-gEuwgxq4.js → hardware-back-button-CPLxO-Ev.js} +1 -1
  107. package/dist/esm/{helpers-Br4puuoA.js → helpers-DEn3pfjm.js} +1 -1
  108. package/dist/esm/{index-nzxJGPo-.js → index-Bs3kT4bc.js} +2 -2
  109. package/dist/esm/{index-COOKa-0k.js → index-C8IsBmNU.js} +3 -41
  110. package/dist/esm/{index-DNUVD4sY.js → index-CvDIirVx.js} +5 -5
  111. package/dist/esm/{index-CZzUL5H7.js → index-ceb5RaMT.js} +2 -2
  112. package/dist/esm/{index-DKnepNGf.js → index-r2D9DEro.js} +4 -4
  113. package/dist/esm/index.js +12 -12
  114. package/dist/esm/{input-shims-G0QQ_JXi.js → input-shims-DyOpfTg6.js} +3 -3
  115. package/dist/esm/{input.utils-BRuJbV55.js → input.utils-DrvTa8gz.js} +2 -2
  116. package/dist/esm/ion-accordion_2.entry.js +3 -3
  117. package/dist/esm/ion-action-sheet.entry.js +8 -8
  118. package/dist/esm/ion-alert.entry.js +9 -9
  119. package/dist/esm/ion-app_8.entry.js +12 -12
  120. package/dist/esm/ion-avatar_3.entry.js +2 -2
  121. package/dist/esm/ion-back-button.entry.js +3 -3
  122. package/dist/esm/ion-backdrop.entry.js +2 -2
  123. package/dist/esm/ion-breadcrumb_2.entry.js +3 -3
  124. package/dist/esm/ion-button_2.entry.js +3 -3
  125. package/dist/esm/ion-card_5.entry.js +3 -3
  126. package/dist/esm/ion-checkbox.entry.js +63 -11
  127. package/dist/esm/ion-chip.entry.js +2 -2
  128. package/dist/esm/ion-col_3.entry.js +2 -2
  129. package/dist/esm/ion-datetime-button.entry.js +4 -4
  130. package/dist/esm/ion-datetime_3.entry.js +47 -12
  131. package/dist/esm/ion-fab_3.entry.js +3 -3
  132. package/dist/esm/ion-img.entry.js +3 -3
  133. package/dist/esm/ion-infinite-scroll_2.entry.js +5 -5
  134. package/dist/esm/ion-input-otp.entry.js +3 -3
  135. package/dist/esm/ion-input-password-toggle.entry.js +2 -2
  136. package/dist/esm/ion-input.entry.js +10 -9
  137. package/dist/esm/ion-item-option_3.entry.js +4 -4
  138. package/dist/esm/ion-item_8.entry.js +3 -3
  139. package/dist/esm/ion-loading.entry.js +8 -8
  140. package/dist/esm/ion-menu_3.entry.js +8 -8
  141. package/dist/esm/ion-modal.entry.js +9 -9
  142. package/dist/esm/ion-nav_2.entry.js +6 -6
  143. package/dist/esm/ion-picker-column-option.entry.js +3 -3
  144. package/dist/esm/ion-picker-column.entry.js +3 -3
  145. package/dist/esm/ion-picker.entry.js +2 -2
  146. package/dist/esm/ion-popover.entry.js +8 -8
  147. package/dist/esm/ion-progress-bar.entry.js +3 -3
  148. package/dist/esm/ion-radio_2.entry.js +60 -9
  149. package/dist/esm/ion-range.entry.js +4 -4
  150. package/dist/esm/ion-refresher_2.entry.js +6 -6
  151. package/dist/esm/ion-reorder_2.entry.js +4 -4
  152. package/dist/esm/ion-ripple-effect.entry.js +2 -2
  153. package/dist/esm/ion-route_4.entry.js +3 -3
  154. package/dist/esm/ion-searchbar.entry.js +8 -8
  155. package/dist/esm/ion-segment-content.entry.js +1 -1
  156. package/dist/esm/ion-segment-view.entry.js +1 -1
  157. package/dist/esm/ion-segment_2.entry.js +3 -3
  158. package/dist/esm/ion-select-modal.entry.js +6 -6
  159. package/dist/esm/ion-select_3.entry.js +12 -11
  160. package/dist/esm/ion-spinner.entry.js +2 -2
  161. package/dist/esm/ion-split-pane.entry.js +2 -2
  162. package/dist/esm/ion-tab-bar_2.entry.js +3 -3
  163. package/dist/esm/ion-tab_2.entry.js +3 -3
  164. package/dist/esm/ion-text.entry.js +2 -2
  165. package/dist/esm/ion-textarea.entry.js +6 -5
  166. package/dist/esm/ion-toast.entry.js +8 -8
  167. package/dist/esm/ion-toggle.entry.js +61 -13
  168. package/dist/esm/{ionic-global-ssiordoc.js → ionic-global-CDrldh-5.js} +1 -1
  169. package/dist/esm/ionic.js +6 -6
  170. package/dist/esm/{ios.transition-CdWk5te_.js → ios.transition-BDzw0_Hm.js} +4 -4
  171. package/dist/esm/loader.js +5 -5
  172. package/dist/esm/{md.transition-CTwmjwnm.js → md.transition-BzDYi3qq.js} +4 -4
  173. package/dist/esm/{validity-CwxNVaqN.js → notch-controller-BwelN_JM.js} +2 -15
  174. package/dist/esm/{overlays-DNIbGUWk.js → overlays-BymNv-BL.js} +5 -5
  175. package/dist/esm/{status-tap-B6uPB7F5.js → status-tap-5DQ7Fc4V.js} +3 -3
  176. package/dist/esm/{swipe-back-INesdA_O.js → swipe-back-BKw2CAHc.js} +2 -2
  177. package/dist/esm/validity-DJztqcrH.js +17 -0
  178. package/dist/html.html-data.json +18 -2
  179. package/dist/ionic/index.esm.js +1 -1
  180. package/dist/ionic/ionic.esm.js +1 -1
  181. package/dist/ionic/{p-2b9e100d.entry.js → p-020af078.entry.js} +1 -1
  182. package/dist/ionic/p-074839fc.entry.js +4 -0
  183. package/dist/ionic/{p-964e89ac.entry.js → p-0b80d700.entry.js} +1 -1
  184. package/dist/ionic/{p-894e8953.entry.js → p-0dfa5a37.entry.js} +1 -1
  185. package/dist/ionic/{p-3807749f.entry.js → p-11518b31.entry.js} +1 -1
  186. package/dist/ionic/{p-fcd74818.entry.js → p-15193d01.entry.js} +1 -1
  187. package/dist/ionic/{p-c49f0f68.entry.js → p-1647c46c.entry.js} +1 -1
  188. package/dist/ionic/{p-116a97cb.entry.js → p-2a939845.entry.js} +1 -1
  189. package/dist/ionic/{p-3c522786.entry.js → p-316c0420.entry.js} +1 -1
  190. package/dist/ionic/{p-860f309a.entry.js → p-31f7095f.entry.js} +1 -1
  191. package/dist/ionic/{p-adde497f.entry.js → p-370e4237.entry.js} +1 -1
  192. package/dist/ionic/{p-ef8c7682.entry.js → p-3a6caca9.entry.js} +1 -1
  193. package/dist/ionic/p-40c261a3.entry.js +4 -0
  194. package/dist/ionic/{p-06881392.entry.js → p-43ed1ef5.entry.js} +1 -1
  195. package/dist/ionic/{p-a66bbfa0.entry.js → p-46d74291.entry.js} +1 -1
  196. package/dist/ionic/{p-7047a7b7.entry.js → p-49d06882.entry.js} +1 -1
  197. package/dist/ionic/{p-d0f6b9a7.entry.js → p-4c85d268.entry.js} +1 -1
  198. package/dist/ionic/p-4e41ea20.entry.js +4 -0
  199. package/dist/ionic/{p-dfd6acb5.entry.js → p-510d86e1.entry.js} +1 -1
  200. package/dist/ionic/p-51a60e0f.entry.js +4 -0
  201. package/dist/ionic/{p-dfc6f4b1.entry.js → p-582824c5.entry.js} +1 -1
  202. package/dist/ionic/{p-259e4068.entry.js → p-6241ce47.entry.js} +1 -1
  203. package/dist/ionic/{p-4ede0a73.entry.js → p-639dd543.entry.js} +1 -1
  204. package/dist/ionic/{p-7a19f3d1.entry.js → p-6444c606.entry.js} +1 -1
  205. package/dist/ionic/{p-c7f3e813.entry.js → p-675b1a31.entry.js} +1 -1
  206. package/dist/ionic/{p-db44afdd.entry.js → p-6d070558.entry.js} +1 -1
  207. package/dist/ionic/{p-5dcbb52f.entry.js → p-7268efa5.entry.js} +1 -1
  208. package/dist/ionic/{p-c6b68ac0.entry.js → p-72c38b88.entry.js} +1 -1
  209. package/dist/ionic/p-7380261c.entry.js +4 -0
  210. package/dist/ionic/{p-a41048a1.entry.js → p-79bd78f9.entry.js} +1 -1
  211. package/dist/ionic/{p-295a2119.entry.js → p-7da39a4d.entry.js} +1 -1
  212. package/dist/ionic/{p-d24d55cb.entry.js → p-83be404e.entry.js} +1 -1
  213. package/dist/ionic/{p-70c66710.entry.js → p-86f53961.entry.js} +1 -1
  214. package/dist/ionic/{p-db648b6a.entry.js → p-94de5cfa.entry.js} +1 -1
  215. package/dist/ionic/{p-6fe93af5.entry.js → p-9575b654.entry.js} +1 -1
  216. package/dist/ionic/p-9810f7e6.entry.js +4 -0
  217. package/dist/ionic/{p-bef7bd83.entry.js → p-98fc09eb.entry.js} +1 -1
  218. package/dist/ionic/{p-BA44xiai.js → p-B0q1YL7N.js} +1 -1
  219. package/dist/ionic/p-BFvmZNyx.js +4 -0
  220. package/dist/ionic/p-BKc55Xev.js +4 -0
  221. package/dist/ionic/{p-baqdazzM.js → p-BOVrCkpJ.js} +1 -1
  222. package/dist/ionic/{p-CT3hZD31.js → p-BYEqWnSg.js} +1 -1
  223. package/dist/ionic/p-Bmgaetn_.js +4 -0
  224. package/dist/ionic/{p-CUek2VVk.js → p-C7hRNDhM.js} +1 -1
  225. package/dist/ionic/p-C8IsBmNU.js +5 -0
  226. package/dist/ionic/{p-CYTVJxfQ.js → p-CJxh_yLS.js} +1 -1
  227. package/dist/ionic/{p-C8VsQFea.js → p-CTfR9YZG.js} +1 -1
  228. package/dist/ionic/p-CwgG81ZD.js +4 -0
  229. package/dist/ionic/{p-UCpjvnQe.js → p-D-eFFUkA.js} +1 -1
  230. package/dist/ionic/{p-DddcVlzx.js → p-D0dMcSkw.js} +1 -1
  231. package/dist/ionic/{p-ynapDa0U.js → p-D87hU-Ly.js} +1 -1
  232. package/dist/ionic/{p-C9IcKRgw.js → p-DCv9sLH2.js} +1 -1
  233. package/dist/ionic/p-DDb5r57F.js +4 -0
  234. package/dist/ionic/p-DJztqcrH.js +4 -0
  235. package/dist/ionic/{p-yu2f42Nv.js → p-DNcfiJwE.js} +1 -1
  236. package/dist/ionic/{p-CETqdl8n.js → p-DUt5fQmA.js} +1 -1
  237. package/dist/ionic/p-DZRJwG4S.js +4 -0
  238. package/dist/ionic/{p-D8G3beZX.js → p-DbQ5QkTP.js} +1 -1
  239. package/dist/ionic/{p-BUluHF_z.js → p-Dc45iWE4.js} +1 -1
  240. package/dist/ionic/{p-Bzed_Vkc.js → p-QHYY4sjU.js} +1 -1
  241. package/dist/ionic/{p-3ca55cd6.entry.js → p-a127bee2.entry.js} +1 -1
  242. package/dist/ionic/{p-b3da5db0.entry.js → p-a80f1b04.entry.js} +1 -1
  243. package/dist/ionic/{p-948228a2.entry.js → p-ac4eb91d.entry.js} +1 -1
  244. package/dist/ionic/{p-7078b759.entry.js → p-b0a7585c.entry.js} +1 -1
  245. package/dist/ionic/{p-3549e539.entry.js → p-b57c6d3e.entry.js} +1 -1
  246. package/dist/ionic/p-c19f63d0.entry.js +4 -0
  247. package/dist/ionic/{p-e1547a17.entry.js → p-cc45bcbc.entry.js} +1 -1
  248. package/dist/ionic/{p-e1c3b35d.entry.js → p-d0a2a1ab.entry.js} +1 -1
  249. package/dist/ionic/{p-89c2d5ea.entry.js → p-d126e8d3.entry.js} +1 -1
  250. package/dist/ionic/p-d1f54e28.entry.js +4 -0
  251. package/dist/ionic/p-d3014190.entry.js +4 -0
  252. package/dist/ionic/{p-93d7685c.entry.js → p-da7d04cc.entry.js} +1 -1
  253. package/dist/ionic/p-dbbe606a.entry.js +4 -0
  254. package/dist/ionic/{p-0144ab54.entry.js → p-e16b69e1.entry.js} +1 -1
  255. package/dist/ionic/{p-d27a5c0b.entry.js → p-f8f22cc0.entry.js} +1 -1
  256. package/dist/types/components/checkbox/checkbox.d.ts +9 -1
  257. package/dist/types/components/datetime/datetime.d.ts +9 -0
  258. package/dist/types/components/header/header.utils.d.ts +1 -2
  259. package/dist/types/components/input/input.d.ts +1 -1
  260. package/dist/types/components/radio-group/radio-group.d.ts +9 -1
  261. package/dist/types/components/searchbar/searchbar.d.ts +1 -1
  262. package/dist/types/components/select/select.d.ts +2 -2
  263. package/dist/types/components/toggle/toggle.d.ts +7 -1
  264. package/dist/types/components.d.ts +8 -8
  265. package/dist/types/stencil-public-runtime.d.ts +9 -19
  266. package/dist/types/utils/forms/validity.d.ts +1 -1
  267. package/dist/types/utils/gesture/listener.d.ts +1 -2
  268. package/hydrate/index.js +408 -360
  269. package/hydrate/index.mjs +408 -360
  270. package/package.json +3 -3
  271. package/dist/ionic/p-0188f4a6.entry.js +0 -4
  272. package/dist/ionic/p-14e08559.entry.js +0 -4
  273. package/dist/ionic/p-22bcfae9.entry.js +0 -4
  274. package/dist/ionic/p-45c80fd7.entry.js +0 -4
  275. package/dist/ionic/p-49a21ffb.entry.js +0 -4
  276. package/dist/ionic/p-5cf136b5.entry.js +0 -4
  277. package/dist/ionic/p-5d600703.entry.js +0 -4
  278. package/dist/ionic/p-9fc9dfae.entry.js +0 -4
  279. package/dist/ionic/p-BS-HlVX0.js +0 -4
  280. package/dist/ionic/p-BWS2Niqo.js +0 -4
  281. package/dist/ionic/p-CCKqmAua.js +0 -4
  282. package/dist/ionic/p-COOKa-0k.js +0 -5
  283. package/dist/ionic/p-CSQuMCUi.js +0 -4
  284. package/dist/ionic/p-PfJ1h_Zm.js +0 -4
  285. package/dist/ionic/p-edcc6f4f.entry.js +0 -4
  286. package/dist/ionic/p-f53597ee.entry.js +0 -4
  287. package/dist/ionic/p-w2EzNm9e.js +0 -4
@@ -1,8 +1,9 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
4
+ import { proxyCustomElement, HTMLElement, createEvent, Build, h, Host } from '@stencil/core/internal/client';
5
5
  import { i as inheritAriaAttributes, e as renderHiddenInput } from './helpers.js';
6
+ import { c as checkInvalidState } from './validity.js';
6
7
  import { d as hapticSelection } from './haptic.js';
7
8
  import { a as isPlatform, b as getIonMode } from './ionic-global.js';
8
9
  import { i as isRTL } from './dir.js';
@@ -33,6 +34,10 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
33
34
  this.inheritedAttributes = {};
34
35
  this.didLoad = false;
35
36
  this.activated = false;
37
+ /**
38
+ * Track validation state for proper aria-live announcements.
39
+ */
40
+ this.isInvalid = false;
36
41
  /**
37
42
  * The name of the control, which is submitted with the form data.
38
43
  */
@@ -146,15 +151,52 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
146
151
  });
147
152
  }
148
153
  async connectedCallback() {
154
+ const { didLoad, el } = this;
149
155
  /**
150
156
  * If we have not yet rendered
151
157
  * ion-toggle, then toggleTrack is not defined.
152
158
  * But if we are moving ion-toggle via appendChild,
153
159
  * then toggleTrack will be defined.
154
160
  */
155
- if (this.didLoad) {
161
+ if (didLoad) {
156
162
  this.setupGesture();
157
163
  }
164
+ // Watch for class changes to update validation state.
165
+ if (Build.isBrowser && typeof MutationObserver !== 'undefined') {
166
+ this.validationObserver = new MutationObserver(() => {
167
+ const newIsInvalid = checkInvalidState(el);
168
+ if (this.isInvalid !== newIsInvalid) {
169
+ this.isInvalid = newIsInvalid;
170
+ /**
171
+ * Screen readers tend to announce changes
172
+ * to `aria-describedby` when the attribute
173
+ * is changed during a blur event for a
174
+ * native form control.
175
+ * However, the announcement can be spotty
176
+ * when using a non-native form control
177
+ * and `forceUpdate()`.
178
+ * This is due to `forceUpdate()` internally
179
+ * rescheduling the DOM update to a lower
180
+ * priority queue regardless if it's called
181
+ * inside a Promise or not, thus causing
182
+ * the screen reader to potentially miss the
183
+ * change.
184
+ * By using a State variable inside a Promise,
185
+ * it guarantees a re-render immediately at
186
+ * a higher priority.
187
+ */
188
+ Promise.resolve().then(() => {
189
+ this.hintTextId = this.getHintTextId();
190
+ });
191
+ }
192
+ });
193
+ this.validationObserver.observe(el, {
194
+ attributes: true,
195
+ attributeFilter: ['class'],
196
+ });
197
+ }
198
+ // Always set initial state
199
+ this.isInvalid = checkInvalidState(el);
158
200
  }
159
201
  componentDidLoad() {
160
202
  this.setupGesture();
@@ -165,9 +207,15 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
165
207
  this.gesture.destroy();
166
208
  this.gesture = undefined;
167
209
  }
210
+ // Clean up validation observer to prevent memory leaks.
211
+ if (this.validationObserver) {
212
+ this.validationObserver.disconnect();
213
+ this.validationObserver = undefined;
214
+ }
168
215
  }
169
216
  componentWillLoad() {
170
217
  this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
218
+ this.hintTextId = this.getHintTextId();
171
219
  }
172
220
  onStart() {
173
221
  this.activated = true;
@@ -208,9 +256,9 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
208
256
  get hasLabel() {
209
257
  return this.el.textContent !== '';
210
258
  }
211
- getHintTextID() {
212
- const { el, helperText, errorText, helperTextId, errorTextId } = this;
213
- if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
259
+ getHintTextId() {
260
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
261
+ if (isInvalid && errorText) {
214
262
  return errorTextId;
215
263
  }
216
264
  if (helperText) {
@@ -223,7 +271,7 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
223
271
  * This element should only be rendered if hint text is set.
224
272
  */
225
273
  renderHintText() {
226
- const { helperText, errorText, helperTextId, errorTextId } = this;
274
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
227
275
  /**
228
276
  * undefined and empty string values should
229
277
  * be treated as not having helper/error text.
@@ -232,15 +280,15 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
232
280
  if (!hasHintText) {
233
281
  return;
234
282
  }
235
- return (h("div", { class: "toggle-bottom" }, h("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText), h("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText)));
283
+ return (h("div", { class: "toggle-bottom" }, h("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null), h("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text", role: "alert" }, isInvalid ? errorText : null)));
236
284
  }
237
285
  render() {
238
- const { activated, alignment, checked, color, disabled, el, errorTextId, hasLabel, inheritedAttributes, inputId, inputLabelId, justify, labelPlacement, name, required, } = this;
286
+ const { activated, alignment, checked, color, disabled, el, hasLabel, inheritedAttributes, inputId, inputLabelId, justify, labelPlacement, name, required, } = this;
239
287
  const mode = getIonMode(this);
240
288
  const value = this.getValue();
241
289
  const rtl = isRTL(el) ? 'rtl' : 'ltr';
242
290
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
243
- return (h(Host, { key: '17bbbc8d229868e5c872b2bc5a3faf579780c5e0', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === errorTextId, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, class: createColorClasses(color, {
291
+ return (h(Host, { key: 'f569148edd89ee041a4719ffc4733c16b05229bd', 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, {
244
292
  [mode]: true,
245
293
  'in-item': hostContext('ion-item', el),
246
294
  'toggle-activated': activated,
@@ -250,10 +298,10 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
250
298
  [`toggle-alignment-${alignment}`]: alignment !== undefined,
251
299
  [`toggle-label-placement-${labelPlacement}`]: true,
252
300
  [`toggle-${rtl}`]: true,
253
- }) }, h("label", { key: '673625b62a2c909e95dccb642c91312967a6cd1c', class: "toggle-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: '7dc3f357b4708116663970047765da9f8f845bf0', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), h("div", { key: '8f1c6a182031e8cbc6727e5f4ac0e00ad4247447', class: {
301
+ }) }, h("label", { key: '3027f2ac4be6de422a14486d847fbee77f615db1', class: "toggle-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: '4b0304c9e879e432b80184b4e5de37d55c11b436', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), h("div", { key: '8ef265ec942e7f01ff31cbb202ed146c6bf94e02', class: {
254
302
  'label-text-wrapper': true,
255
303
  'label-text-wrapper-hidden': !hasLabel,
256
- }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '8322b9d54dc7edeb4e16fefcde9f7ebca8d5c3e1' }), this.renderHintText()), h("div", { key: 'fe6984143db817a7b3020a3f57cf5418fc3dcc0e', class: "native-wrapper" }, this.renderToggleControl()))));
304
+ }, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '7b162b7dd27199cca2a4c995276a18b9f8e44aaf' }), this.renderHintText()), h("div", { key: 'd13c34bd42fca01cc73ddb4ea7e471b33a282a3e', class: "native-wrapper" }, this.renderToggleControl()))));
257
305
  }
258
306
  get el() { return this; }
259
307
  static get watchers() { return {
@@ -276,7 +324,9 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
276
324
  "justify": [1],
277
325
  "alignment": [1],
278
326
  "required": [4],
279
- "activated": [32]
327
+ "activated": [32],
328
+ "isInvalid": [32],
329
+ "hintTextId": [32]
280
330
  }, undefined, {
281
331
  "disabled": ["disabledChanged"]
282
332
  }]);
@@ -0,0 +1,153 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { w as win } from './index9.js';
5
+ import { r as raf } from './helpers.js';
6
+
7
+ /**
8
+ * A utility to calculate the size of an outline notch
9
+ * width relative to the content passed. This is used in
10
+ * components such as `ion-select` with `fill="outline"`
11
+ * where we need to pass slotted HTML content. This is not
12
+ * needed when rendering plaintext content because we can
13
+ * render the plaintext again hidden with `opacity: 0` inside
14
+ * of the notch. As a result we can rely on the intrinsic size
15
+ * of the element to correctly compute the notch width. We
16
+ * cannot do this with slotted content because we cannot project
17
+ * it into 2 places at once.
18
+ *
19
+ * @internal
20
+ * @param el: The host element
21
+ * @param getNotchSpacerEl: A function that returns a reference to the notch spacer element inside of the component template.
22
+ * @param getLabelSlot: A function that returns a reference to the slotted content.
23
+ */
24
+ const createNotchController = (el, getNotchSpacerEl, getLabelSlot) => {
25
+ let notchVisibilityIO;
26
+ const needsExplicitNotchWidth = () => {
27
+ const notchSpacerEl = getNotchSpacerEl();
28
+ if (
29
+ /**
30
+ * If the notch is not being used
31
+ * then we do not need to set the notch width.
32
+ */
33
+ notchSpacerEl === undefined ||
34
+ /**
35
+ * If either the label property is being
36
+ * used or the label slot is not defined,
37
+ * then we do not need to estimate the notch width.
38
+ */
39
+ el.label !== undefined ||
40
+ getLabelSlot() === null) {
41
+ return false;
42
+ }
43
+ return true;
44
+ };
45
+ const calculateNotchWidth = () => {
46
+ if (needsExplicitNotchWidth()) {
47
+ /**
48
+ * Run this the frame after
49
+ * the browser has re-painted the host element.
50
+ * Otherwise, the label element may have a width
51
+ * of 0 and the IntersectionObserver will be used.
52
+ */
53
+ raf(() => {
54
+ setNotchWidth();
55
+ });
56
+ }
57
+ };
58
+ /**
59
+ * When using a label prop we can render
60
+ * the label value inside of the notch and
61
+ * let the browser calculate the size of the notch.
62
+ * However, we cannot render the label slot in multiple
63
+ * places so we need to manually calculate the notch dimension
64
+ * based on the size of the slotted content.
65
+ *
66
+ * This function should only be used to set the notch width
67
+ * on slotted label content. The notch width for label prop
68
+ * content is automatically calculated based on the
69
+ * intrinsic size of the label text.
70
+ */
71
+ const setNotchWidth = () => {
72
+ const notchSpacerEl = getNotchSpacerEl();
73
+ if (notchSpacerEl === undefined) {
74
+ return;
75
+ }
76
+ if (!needsExplicitNotchWidth()) {
77
+ notchSpacerEl.style.removeProperty('width');
78
+ return;
79
+ }
80
+ const width = getLabelSlot().scrollWidth;
81
+ if (
82
+ /**
83
+ * If the computed width of the label is 0
84
+ * and notchSpacerEl's offsetParent is null
85
+ * then that means the element is hidden.
86
+ * As a result, we need to wait for the element
87
+ * to become visible before setting the notch width.
88
+ *
89
+ * We do not check el.offsetParent because
90
+ * that can be null if the host element has
91
+ * position: fixed applied to it.
92
+ * notchSpacerEl does not have position: fixed.
93
+ */
94
+ width === 0 &&
95
+ notchSpacerEl.offsetParent === null &&
96
+ win !== undefined &&
97
+ 'IntersectionObserver' in win) {
98
+ /**
99
+ * If there is an IO already attached
100
+ * then that will update the notch
101
+ * once the element becomes visible.
102
+ * As a result, there is no need to create
103
+ * another one.
104
+ */
105
+ if (notchVisibilityIO !== undefined) {
106
+ return;
107
+ }
108
+ const io = (notchVisibilityIO = new IntersectionObserver((ev) => {
109
+ /**
110
+ * If the element is visible then we
111
+ * can try setting the notch width again.
112
+ */
113
+ if (ev[0].intersectionRatio === 1) {
114
+ setNotchWidth();
115
+ io.disconnect();
116
+ notchVisibilityIO = undefined;
117
+ }
118
+ },
119
+ /**
120
+ * Set the root to be the host element
121
+ * This causes the IO callback
122
+ * to be fired in WebKit as soon as the element
123
+ * is visible. If we used the default root value
124
+ * then WebKit would only fire the IO callback
125
+ * after any animations (such as a modal transition)
126
+ * finished, and there would potentially be a flicker.
127
+ */
128
+ { threshold: 0.01, root: el }));
129
+ io.observe(notchSpacerEl);
130
+ return;
131
+ }
132
+ /**
133
+ * If the element is visible then we can set the notch width.
134
+ * The notch is only visible when the label is scaled,
135
+ * which is why we multiply the width by 0.75 as this is
136
+ * the same amount the label element is scaled by in the host CSS.
137
+ * (See $form-control-label-stacked-scale in ionic.globals.scss).
138
+ */
139
+ notchSpacerEl.style.setProperty('width', `${width * 0.75}px`);
140
+ };
141
+ const destroy = () => {
142
+ if (notchVisibilityIO) {
143
+ notchVisibilityIO.disconnect();
144
+ notchVisibilityIO = undefined;
145
+ }
146
+ };
147
+ return {
148
+ calculateNotchWidth,
149
+ destroy,
150
+ };
151
+ };
152
+
153
+ export { createNotchController as c };
@@ -1,8 +1,9 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
4
+ import { proxyCustomElement, HTMLElement, createEvent, Build, h, Host } from '@stencil/core/internal/client';
5
5
  import { e as renderHiddenInput } from './helpers.js';
6
+ import { c as checkInvalidState } from './validity.js';
6
7
  import { b as getIonMode } from './ionic-global.js';
7
8
 
8
9
  const radioGroupIosCss = "ion-radio-group{vertical-align:top}.radio-group-wrapper{display:inline}.radio-group-top{line-height:1.5}.radio-group-top .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.radio-group-top .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}.ion-touched.ion-invalid .radio-group-top .error-text{display:block}.ion-touched.ion-invalid .radio-group-top .helper-text{display:none}ion-list .radio-group-top{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}";
@@ -21,6 +22,10 @@ const RadioGroup = /*@__PURE__*/ proxyCustomElement(class RadioGroup extends HTM
21
22
  this.helperTextId = `${this.inputId}-helper-text`;
22
23
  this.errorTextId = `${this.inputId}-error-text`;
23
24
  this.labelId = `${this.inputId}-lbl`;
25
+ /**
26
+ * Track validation state for proper aria-live announcements.
27
+ */
28
+ this.isInvalid = false;
24
29
  /**
25
30
  * If `true`, the radios can be deselected.
26
31
  */
@@ -102,6 +107,52 @@ const RadioGroup = /*@__PURE__*/ proxyCustomElement(class RadioGroup extends HTM
102
107
  this.labelId = label.id = this.name + '-lbl';
103
108
  }
104
109
  }
110
+ // Watch for class changes to update validation state.
111
+ if (Build.isBrowser && typeof MutationObserver !== 'undefined') {
112
+ this.validationObserver = new MutationObserver(() => {
113
+ const newIsInvalid = checkInvalidState(this.el);
114
+ if (this.isInvalid !== newIsInvalid) {
115
+ this.isInvalid = newIsInvalid;
116
+ /**
117
+ * Screen readers tend to announce changes
118
+ * to `aria-describedby` when the attribute
119
+ * is changed during a blur event for a
120
+ * native form control.
121
+ * However, the announcement can be spotty
122
+ * when using a non-native form control
123
+ * and `forceUpdate()`.
124
+ * This is due to `forceUpdate()` internally
125
+ * rescheduling the DOM update to a lower
126
+ * priority queue regardless if it's called
127
+ * inside a Promise or not, thus causing
128
+ * the screen reader to potentially miss the
129
+ * change.
130
+ * By using a State variable inside a Promise,
131
+ * it guarantees a re-render immediately at
132
+ * a higher priority.
133
+ */
134
+ Promise.resolve().then(() => {
135
+ this.hintTextId = this.getHintTextId();
136
+ });
137
+ }
138
+ });
139
+ this.validationObserver.observe(this.el, {
140
+ attributes: true,
141
+ attributeFilter: ['class'],
142
+ });
143
+ }
144
+ // Always set initial state
145
+ this.isInvalid = checkInvalidState(this.el);
146
+ }
147
+ componentWillLoad() {
148
+ this.hintTextId = this.getHintTextId();
149
+ }
150
+ disconnectedCallback() {
151
+ // Clean up validation observer to prevent memory leaks.
152
+ if (this.validationObserver) {
153
+ this.validationObserver.disconnect();
154
+ this.validationObserver = undefined;
155
+ }
105
156
  }
106
157
  getRadios() {
107
158
  return Array.from(this.el.querySelectorAll('ion-radio'));
@@ -177,16 +228,16 @@ const RadioGroup = /*@__PURE__*/ proxyCustomElement(class RadioGroup extends HTM
177
228
  * Renders the helper text or error text values
178
229
  */
179
230
  renderHintText() {
180
- const { helperText, errorText, helperTextId, errorTextId } = this;
231
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
181
232
  const hasHintText = !!helperText || !!errorText;
182
233
  if (!hasHintText) {
183
234
  return;
184
235
  }
185
- return (h("div", { class: "radio-group-top" }, h("div", { id: helperTextId, class: "helper-text" }, helperText), h("div", { id: errorTextId, class: "error-text" }, errorText)));
236
+ return (h("div", { class: "radio-group-top" }, h("div", { id: helperTextId, class: "helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null), h("div", { id: errorTextId, class: "error-text", role: "alert" }, isInvalid ? errorText : null)));
186
237
  }
187
- getHintTextID() {
188
- const { el, helperText, errorText, helperTextId, errorTextId } = this;
189
- if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
238
+ getHintTextId() {
239
+ const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
240
+ if (isInvalid && errorText) {
190
241
  return errorTextId;
191
242
  }
192
243
  if (helperText) {
@@ -198,7 +249,7 @@ const RadioGroup = /*@__PURE__*/ proxyCustomElement(class RadioGroup extends HTM
198
249
  const { label, labelId, el, name, value } = this;
199
250
  const mode = getIonMode(this);
200
251
  renderHiddenInput(true, el, name, value, false);
201
- return (h(Host, { key: '81b8ebc96b2f383c36717f290d2959cc921ad6e8', role: "radiogroup", "aria-labelledby": label ? labelId : null, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, onClick: this.onClick, class: mode }, this.renderHintText(), h("div", { key: '45b09efc10776b889a8f372cba80d25a3fc849da', class: "radio-group-wrapper" }, h("slot", { key: '58714934542c2fdd7396de160364f3f06b32e8f8' }))));
252
+ return (h(Host, { key: 'db593b3ed511e9395e3c7bfd91b787328692cd6d', role: "radiogroup", "aria-labelledby": label ? labelId : null, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, onClick: this.onClick, class: mode }, this.renderHintText(), h("div", { key: '85045b45a0100a45f3b9a35d1c5a25ec63d525c4', class: "radio-group-wrapper" }, h("slot", { key: '53dacb87ce62398e78771fb2efaf839ab922d946' }))));
202
253
  }
203
254
  get el() { return this; }
204
255
  static get watchers() { return {
@@ -215,6 +266,8 @@ const RadioGroup = /*@__PURE__*/ proxyCustomElement(class RadioGroup extends HTM
215
266
  "value": [1032],
216
267
  "helperText": [1, "helper-text"],
217
268
  "errorText": [1, "error-text"],
269
+ "isInvalid": [32],
270
+ "hintTextId": [32],
218
271
  "setFocus": [64]
219
272
  }, [[4, "keydown", "onKeydown"]], {
220
273
  "value": ["valueChanged"]
@@ -1,155 +1,6 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { w as win } from './index9.js';
5
- import { r as raf } from './helpers.js';
6
-
7
- /**
8
- * A utility to calculate the size of an outline notch
9
- * width relative to the content passed. This is used in
10
- * components such as `ion-select` with `fill="outline"`
11
- * where we need to pass slotted HTML content. This is not
12
- * needed when rendering plaintext content because we can
13
- * render the plaintext again hidden with `opacity: 0` inside
14
- * of the notch. As a result we can rely on the intrinsic size
15
- * of the element to correctly compute the notch width. We
16
- * cannot do this with slotted content because we cannot project
17
- * it into 2 places at once.
18
- *
19
- * @internal
20
- * @param el: The host element
21
- * @param getNotchSpacerEl: A function that returns a reference to the notch spacer element inside of the component template.
22
- * @param getLabelSlot: A function that returns a reference to the slotted content.
23
- */
24
- const createNotchController = (el, getNotchSpacerEl, getLabelSlot) => {
25
- let notchVisibilityIO;
26
- const needsExplicitNotchWidth = () => {
27
- const notchSpacerEl = getNotchSpacerEl();
28
- if (
29
- /**
30
- * If the notch is not being used
31
- * then we do not need to set the notch width.
32
- */
33
- notchSpacerEl === undefined ||
34
- /**
35
- * If either the label property is being
36
- * used or the label slot is not defined,
37
- * then we do not need to estimate the notch width.
38
- */
39
- el.label !== undefined ||
40
- getLabelSlot() === null) {
41
- return false;
42
- }
43
- return true;
44
- };
45
- const calculateNotchWidth = () => {
46
- if (needsExplicitNotchWidth()) {
47
- /**
48
- * Run this the frame after
49
- * the browser has re-painted the host element.
50
- * Otherwise, the label element may have a width
51
- * of 0 and the IntersectionObserver will be used.
52
- */
53
- raf(() => {
54
- setNotchWidth();
55
- });
56
- }
57
- };
58
- /**
59
- * When using a label prop we can render
60
- * the label value inside of the notch and
61
- * let the browser calculate the size of the notch.
62
- * However, we cannot render the label slot in multiple
63
- * places so we need to manually calculate the notch dimension
64
- * based on the size of the slotted content.
65
- *
66
- * This function should only be used to set the notch width
67
- * on slotted label content. The notch width for label prop
68
- * content is automatically calculated based on the
69
- * intrinsic size of the label text.
70
- */
71
- const setNotchWidth = () => {
72
- const notchSpacerEl = getNotchSpacerEl();
73
- if (notchSpacerEl === undefined) {
74
- return;
75
- }
76
- if (!needsExplicitNotchWidth()) {
77
- notchSpacerEl.style.removeProperty('width');
78
- return;
79
- }
80
- const width = getLabelSlot().scrollWidth;
81
- if (
82
- /**
83
- * If the computed width of the label is 0
84
- * and notchSpacerEl's offsetParent is null
85
- * then that means the element is hidden.
86
- * As a result, we need to wait for the element
87
- * to become visible before setting the notch width.
88
- *
89
- * We do not check el.offsetParent because
90
- * that can be null if the host element has
91
- * position: fixed applied to it.
92
- * notchSpacerEl does not have position: fixed.
93
- */
94
- width === 0 &&
95
- notchSpacerEl.offsetParent === null &&
96
- win !== undefined &&
97
- 'IntersectionObserver' in win) {
98
- /**
99
- * If there is an IO already attached
100
- * then that will update the notch
101
- * once the element becomes visible.
102
- * As a result, there is no need to create
103
- * another one.
104
- */
105
- if (notchVisibilityIO !== undefined) {
106
- return;
107
- }
108
- const io = (notchVisibilityIO = new IntersectionObserver((ev) => {
109
- /**
110
- * If the element is visible then we
111
- * can try setting the notch width again.
112
- */
113
- if (ev[0].intersectionRatio === 1) {
114
- setNotchWidth();
115
- io.disconnect();
116
- notchVisibilityIO = undefined;
117
- }
118
- },
119
- /**
120
- * Set the root to be the host element
121
- * This causes the IO callback
122
- * to be fired in WebKit as soon as the element
123
- * is visible. If we used the default root value
124
- * then WebKit would only fire the IO callback
125
- * after any animations (such as a modal transition)
126
- * finished, and there would potentially be a flicker.
127
- */
128
- { threshold: 0.01, root: el }));
129
- io.observe(notchSpacerEl);
130
- return;
131
- }
132
- /**
133
- * If the element is visible then we can set the notch width.
134
- * The notch is only visible when the label is scaled,
135
- * which is why we multiply the width by 0.75 as this is
136
- * the same amount the label element is scaled by in the host CSS.
137
- * (See $form-control-label-stacked-scale in ionic.globals.scss).
138
- */
139
- notchSpacerEl.style.setProperty('width', `${width * 0.75}px`);
140
- };
141
- const destroy = () => {
142
- if (notchVisibilityIO) {
143
- notchVisibilityIO.disconnect();
144
- notchVisibilityIO = undefined;
145
- }
146
- };
147
- return {
148
- calculateNotchWidth,
149
- destroy,
150
- };
151
- };
152
-
153
4
  /**
154
5
  * Checks if the form element is in an invalid state based on
155
6
  * Ionic validation classes.
@@ -163,4 +14,4 @@ const checkInvalidState = (el) => {
163
14
  return hasIonTouched && hasIonInvalid;
164
15
  };
165
16
 
166
- export { checkInvalidState as a, createNotchController as c };
17
+ export { checkInvalidState as c };
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-qWlbeMTM.js');
6
+ var index = require('./index-D6Wc6v08.js');
7
7
  var index$1 = require('./index-DkNv4J_i.js');
8
8
 
9
9
  let animationPrefix;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var ionicGlobal = require('./ionic-global-CR8JSFWa.js');
6
+ var ionicGlobal = require('./ionic-global-HMVqOFGO.js');
7
7
 
8
8
  const globalScripts = ionicGlobal.initialize;
9
9
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index$1 = require('./index-qWlbeMTM.js');
6
+ var index$1 = require('./index-D6Wc6v08.js');
7
7
  var haptic = require('./haptic-ClPPQ_PS.js');
8
8
  var index = require('./index-CAvQ7Tka.js');
9
9
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-qWlbeMTM.js');
6
+ var index = require('./index-D6Wc6v08.js');
7
7
 
8
8
  /**
9
9
  * Does a simple sanitization of all elements
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-qWlbeMTM.js');
6
+ var index = require('./index-D6Wc6v08.js');
7
7
 
8
8
  /**
9
9
  * Returns true if the selected day is equal to the reference day
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var helpers = require('./helpers-xCoR213K.js');
6
+ var helpers = require('./helpers-DrTqNghc.js');
7
7
 
8
8
  // TODO(FW-2832): types
9
9
  const attachComponent = async (delegate, container, component, cssClasses, componentProps, inline) => {
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  var index$1 = require('./index-DkNv4J_i.js');
7
- var index = require('./index-qWlbeMTM.js');
7
+ var index = require('./index-D6Wc6v08.js');
8
8
 
9
9
  /**
10
10
  * CloseWatcher is a newer API that lets
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-qWlbeMTM.js');
6
+ var index = require('./index-D6Wc6v08.js');
7
7
 
8
8
  const transitionEndAsync = (el, expectedDuration = 0) => {
9
9
  return new Promise((resolve) => {