@ionic/core 7.5.7-dev.11701201960.104b3a1f → 7.5.7-dev.11701203423.1b6a8829

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 (323) hide show
  1. package/components/backdrop.js +12 -0
  2. package/components/data.js +1 -1
  3. package/components/gesture-controller.js +1 -1
  4. package/components/icon.js +14 -23
  5. package/components/index7.js +1 -1
  6. package/components/ion-content.js +1 -1
  7. package/components/ion-datetime.js +61 -28
  8. package/components/ion-picker-column-internal.d.ts +11 -0
  9. package/components/ion-picker-column-internal.js +9 -0
  10. package/components/ion-picker-column.js +2 -2
  11. package/components/{ion-picker-legacy.d.ts → ion-picker-internal.d.ts} +4 -4
  12. package/components/ion-picker-internal.js +9 -0
  13. package/components/ion-picker.js +299 -1
  14. package/components/overlays.js +4 -11
  15. package/components/picker-column-internal.js +390 -0
  16. package/components/picker-column.js +320 -331
  17. package/components/{picker.js → picker-internal.js} +16 -16
  18. package/dist/cjs/{button-active-cd07b55b.js → button-active-af897e0e.js} +1 -1
  19. package/dist/cjs/{data-4845b494.js → data-c8d21093.js} +1 -1
  20. package/dist/cjs/{gesture-controller-d6a3f907.js → gesture-controller-b46721be.js} +0 -1
  21. package/dist/cjs/{index-0f8b33f8.js → index-0ee995e4.js} +1 -1
  22. package/dist/cjs/{index-09471526.js → index-5ea49600.js} +1 -1
  23. package/dist/cjs/index.cjs.js +3 -3
  24. package/dist/cjs/ion-accordion_2.cjs.entry.js +1 -1
  25. package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
  26. package/dist/cjs/ion-alert.cjs.entry.js +4 -4
  27. package/dist/cjs/ion-app_8.cjs.entry.js +2 -2
  28. package/dist/cjs/ion-back-button.cjs.entry.js +1 -1
  29. package/dist/cjs/ion-backdrop.cjs.entry.js +12 -0
  30. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +1 -1
  31. package/dist/cjs/ion-button_2.cjs.entry.js +14 -23
  32. package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
  33. package/dist/cjs/ion-datetime_3.cjs.entry.js +40 -27
  34. package/dist/cjs/ion-fab_3.cjs.entry.js +1 -1
  35. package/dist/cjs/ion-input.cjs.entry.js +1 -1
  36. package/dist/cjs/ion-item-option_3.cjs.entry.js +1 -1
  37. package/dist/cjs/ion-item_8.cjs.entry.js +1 -1
  38. package/dist/cjs/ion-loading.cjs.entry.js +1 -2
  39. package/dist/cjs/ion-menu_3.cjs.entry.js +4 -4
  40. package/dist/cjs/ion-modal.cjs.entry.js +3 -3
  41. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  42. package/dist/cjs/{ion-picker-column.cjs.entry.js → ion-picker-column-internal.cjs.entry.js} +9 -9
  43. package/dist/cjs/{ion-picker.cjs.entry.js → ion-picker-internal.cjs.entry.js} +13 -13
  44. package/dist/cjs/ion-popover.cjs.entry.js +1 -2
  45. package/dist/cjs/ion-range.cjs.entry.js +1 -1
  46. package/dist/cjs/ion-refresher_2.cjs.entry.js +4 -4
  47. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  48. package/dist/cjs/ion-searchbar.cjs.entry.js +1 -1
  49. package/dist/cjs/ion-segment_2.cjs.entry.js +1 -1
  50. package/dist/cjs/ion-select_3.cjs.entry.js +2 -3
  51. package/dist/cjs/ion-toast.cjs.entry.js +1 -2
  52. package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
  53. package/dist/cjs/ionic.cjs.js +1 -1
  54. package/dist/cjs/loader.cjs.js +1 -1
  55. package/dist/cjs/{overlays-dbb71984.js → overlays-2ffc5f27.js} +4 -11
  56. package/dist/cjs/{swipe-back-a6dc6e5d.js → swipe-back-d0412fb6.js} +2 -2
  57. package/dist/collection/collection-manifest.json +6 -6
  58. package/dist/collection/components/backdrop/backdrop.js +12 -0
  59. package/dist/collection/components/content/content.css +4 -0
  60. package/dist/collection/components/datetime/datetime.ios.css +25 -84
  61. package/dist/collection/components/datetime/datetime.js +29 -14
  62. package/dist/collection/components/datetime/datetime.md.css +25 -89
  63. package/dist/collection/components/datetime/test/a11y/datetime.e2e.js +1 -1
  64. package/dist/collection/components/datetime/test/a11y/datetime.spec.js +9 -6
  65. package/dist/collection/components/datetime/test/basic/datetime.e2e.js +0 -10
  66. package/dist/collection/components/datetime/test/disabled/datetime.spec.js +4 -4
  67. package/dist/collection/components/datetime/test/minmax/datetime.e2e.js +5 -5
  68. package/dist/collection/components/datetime/test/month-year-picker/datetime.e2e.js +1 -1
  69. package/dist/collection/components/datetime/test/prefer-wheel/datetime.e2e.js +2 -2
  70. package/dist/collection/components/datetime/test/presentation/datetime.e2e.js +1 -1
  71. package/dist/collection/components/datetime/test/readonly/datetime.e2e.js +2 -2
  72. package/dist/collection/components/datetime/test/values/datetime.e2e.js +5 -5
  73. package/dist/collection/components/datetime/utils/data.js +1 -1
  74. package/dist/collection/components/picker/picker.ios.css +205 -100
  75. package/dist/collection/components/picker/picker.js +735 -463
  76. package/dist/collection/components/picker/picker.md.css +194 -98
  77. package/dist/collection/components/picker/test/basic/picker.e2e.js +13 -106
  78. package/dist/collection/components/{picker-legacy → picker}/test/is-open/picker.e2e.js +4 -4
  79. package/dist/collection/components/{picker-legacy → picker}/test/picker-id.spec.js +5 -5
  80. package/dist/collection/components/{picker-legacy → picker}/test/trigger/picker.e2e.js +1 -1
  81. package/dist/collection/components/picker-column/picker-column.ios.css +176 -59
  82. package/dist/collection/components/picker-column/picker-column.js +333 -478
  83. package/dist/collection/components/picker-column/picker-column.md.css +113 -63
  84. package/dist/collection/components/{picker-legacy-column → picker-column}/test/picker-column-aria.spec.js +3 -3
  85. package/dist/collection/components/{picker-legacy-column → picker-column}/test/picker-column-dynamic.spec.js +2 -2
  86. package/dist/collection/components/{picker-legacy-column → picker-column}/test/picker-column.spec.js +2 -2
  87. package/dist/collection/components/{picker-legacy-column → picker-column}/test/standalone/picker-column.e2e.js +3 -3
  88. package/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +138 -0
  89. package/dist/collection/components/picker-column-internal/picker-column-internal.js +565 -0
  90. package/dist/collection/components/{picker-legacy-column/picker-column.md.css → picker-column-internal/picker-column-internal.md.css} +63 -113
  91. package/dist/collection/components/{picker-column/test/basic/picker-column.e2e.js → picker-column-internal/test/basic/picker-column-internal.e2e.js} +7 -7
  92. package/dist/collection/components/{picker-column/test/disabled/picker-column.e2e.js → picker-column-internal/test/disabled/picker-column-internal.e2e.js} +39 -39
  93. package/dist/collection/components/{picker-legacy/picker.md.css → picker-internal/picker-internal.ios.css} +100 -192
  94. package/dist/collection/components/picker-internal/picker-internal.js +544 -0
  95. package/dist/collection/components/{picker-legacy-column/picker-column.ios.css → picker-internal/picker-internal.md.css} +101 -98
  96. package/dist/collection/components/{picker/test/a11y/picker.e2e.js → picker-internal/test/a11y/picker-internal.e2e.js} +2 -2
  97. package/dist/collection/components/picker-internal/test/basic/picker-internal.e2e.js +118 -0
  98. package/dist/collection/components/{picker/test/keyboard-entry/picker.e2e.js → picker-internal/test/keyboard-entry/picker-internal.e2e.js} +20 -20
  99. package/dist/collection/utils/gesture/gesture-controller.js +1 -1
  100. package/dist/collection/utils/overlays.js +4 -11
  101. package/dist/docs.json +40 -322
  102. package/dist/esm/{button-active-5b0516e7.js → button-active-ce5cba4c.js} +1 -1
  103. package/dist/esm/{data-12e24f00.js → data-44d9e816.js} +1 -1
  104. package/dist/esm/{gesture-controller-3723db7c.js → gesture-controller-0fa396c4.js} +1 -1
  105. package/dist/esm/{index-c132c5f1.js → index-d1a56aed.js} +1 -1
  106. package/dist/esm/{index-32cbee52.js → index-ff313b19.js} +2 -2
  107. package/dist/esm/index.js +3 -3
  108. package/dist/esm/ion-accordion_2.entry.js +1 -1
  109. package/dist/esm/ion-action-sheet.entry.js +4 -4
  110. package/dist/esm/ion-alert.entry.js +4 -4
  111. package/dist/esm/ion-app_8.entry.js +2 -2
  112. package/dist/esm/ion-back-button.entry.js +1 -1
  113. package/dist/esm/ion-backdrop.entry.js +12 -0
  114. package/dist/esm/ion-breadcrumb_2.entry.js +1 -1
  115. package/dist/esm/ion-button_2.entry.js +14 -23
  116. package/dist/esm/ion-datetime-button.entry.js +1 -1
  117. package/dist/esm/ion-datetime_3.entry.js +39 -26
  118. package/dist/esm/ion-fab_3.entry.js +1 -1
  119. package/dist/esm/ion-input.entry.js +1 -1
  120. package/dist/esm/ion-item-option_3.entry.js +1 -1
  121. package/dist/esm/ion-item_8.entry.js +1 -1
  122. package/dist/esm/ion-loading.entry.js +1 -2
  123. package/dist/esm/ion-menu_3.entry.js +4 -4
  124. package/dist/esm/ion-modal.entry.js +3 -3
  125. package/dist/esm/ion-nav_2.entry.js +1 -1
  126. package/dist/esm/{ion-picker-column.entry.js → ion-picker-column-internal.entry.js} +9 -9
  127. package/dist/esm/{ion-picker.entry.js → ion-picker-internal.entry.js} +13 -13
  128. package/dist/esm/ion-popover.entry.js +1 -2
  129. package/dist/esm/ion-range.entry.js +1 -1
  130. package/dist/esm/ion-refresher_2.entry.js +4 -4
  131. package/dist/esm/ion-reorder_2.entry.js +2 -2
  132. package/dist/esm/ion-searchbar.entry.js +1 -1
  133. package/dist/esm/ion-segment_2.entry.js +1 -1
  134. package/dist/esm/ion-select_3.entry.js +2 -3
  135. package/dist/esm/ion-toast.entry.js +1 -2
  136. package/dist/esm/ion-toggle.entry.js +2 -2
  137. package/dist/esm/ionic.js +1 -1
  138. package/dist/esm/loader.js +1 -1
  139. package/dist/esm/{overlays-789cd7a7.js → overlays-6c9feb7e.js} +4 -11
  140. package/dist/esm/{swipe-back-cc4c2bcb.js → swipe-back-0f3bfc8e.js} +2 -2
  141. package/dist/esm-es5/{button-active-5b0516e7.js → button-active-ce5cba4c.js} +1 -1
  142. package/dist/esm-es5/{gesture-controller-3723db7c.js → gesture-controller-0fa396c4.js} +1 -1
  143. package/dist/esm-es5/{index-32cbee52.js → index-ff313b19.js} +1 -1
  144. package/dist/esm-es5/index.js +1 -1
  145. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  146. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  147. package/dist/esm-es5/ion-alert.entry.js +1 -1
  148. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  149. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  150. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  151. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  152. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  153. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  154. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  155. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  156. package/dist/esm-es5/ion-input.entry.js +1 -1
  157. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  158. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  159. package/dist/esm-es5/ion-loading.entry.js +1 -1
  160. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  161. package/dist/esm-es5/ion-modal.entry.js +1 -1
  162. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  163. package/dist/esm-es5/ion-picker-column-internal.entry.js +4 -0
  164. package/dist/esm-es5/ion-picker-internal.entry.js +4 -0
  165. package/dist/esm-es5/ion-popover.entry.js +1 -1
  166. package/dist/esm-es5/ion-range.entry.js +1 -1
  167. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  168. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  169. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  170. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  171. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  172. package/dist/esm-es5/ion-toast.entry.js +1 -1
  173. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  174. package/dist/esm-es5/ionic.js +1 -1
  175. package/dist/esm-es5/loader.js +1 -1
  176. package/dist/esm-es5/overlays-6c9feb7e.js +4 -0
  177. package/dist/esm-es5/swipe-back-0f3bfc8e.js +4 -0
  178. package/dist/html.html-data.json +1 -96
  179. package/dist/ionic/index.esm.js +1 -1
  180. package/dist/ionic/ionic.esm.js +1 -1
  181. package/dist/ionic/{p-14aca3fb.entry.js → p-04dca48d.entry.js} +1 -1
  182. package/dist/ionic/{p-a8e68fd9.entry.js → p-0838e6bb.entry.js} +1 -1
  183. package/dist/ionic/{p-a57f223c.system.js → p-09d142b3.system.js} +1 -1
  184. package/dist/ionic/p-0d8e9393.entry.js +4 -0
  185. package/dist/ionic/{p-abacb44b.system.entry.js → p-14923cd7.system.entry.js} +1 -1
  186. package/dist/ionic/p-18e01b30.system.entry.js +4 -0
  187. package/dist/ionic/p-19a7c660.system.entry.js +4 -0
  188. package/dist/ionic/{p-9b5301cc.system.entry.js → p-1cb5f2f8.system.entry.js} +1 -1
  189. package/dist/ionic/p-1e5165db.system.entry.js +4 -0
  190. package/dist/ionic/p-29adc040.entry.js +4 -0
  191. package/dist/ionic/p-29fe18ef.entry.js +4 -0
  192. package/dist/ionic/{p-56224549.entry.js → p-3de79805.entry.js} +1 -1
  193. package/dist/ionic/p-40903d34.system.js +1 -1
  194. package/dist/ionic/{p-664d2b07.system.entry.js → p-42435018.system.entry.js} +1 -1
  195. package/dist/ionic/p-431151f2.entry.js +4 -0
  196. package/dist/ionic/{p-cb62e3fc.system.entry.js → p-4c80afe1.system.entry.js} +1 -1
  197. package/dist/ionic/{p-d3952bd5.system.entry.js → p-4d786d1f.system.entry.js} +1 -1
  198. package/dist/ionic/{p-b6a8588f.entry.js → p-4fa201a7.entry.js} +1 -1
  199. package/dist/ionic/{p-ee800093.entry.js → p-52360c7a.entry.js} +1 -1
  200. package/dist/ionic/p-5bd4e009.entry.js +4 -0
  201. package/dist/ionic/{p-b3e79338.system.entry.js → p-61c30156.system.entry.js} +1 -1
  202. package/dist/ionic/{p-f5a750e4.system.entry.js → p-640efee6.system.entry.js} +1 -1
  203. package/dist/ionic/p-64296b15.entry.js +4 -0
  204. package/dist/ionic/{p-5da0eb3e.system.entry.js → p-6594d76a.system.entry.js} +1 -1
  205. package/dist/ionic/{p-02d8fdba.system.entry.js → p-67e644bd.system.entry.js} +1 -1
  206. package/dist/ionic/{p-3f88eab8.system.entry.js → p-67ed452a.system.entry.js} +1 -1
  207. package/dist/ionic/{p-835e0346.entry.js → p-68166ba6.entry.js} +1 -1
  208. package/dist/ionic/{p-966cf574.system.entry.js → p-6d812360.system.entry.js} +1 -1
  209. package/dist/ionic/{p-a4cda7a8.system.entry.js → p-6e23777e.system.entry.js} +1 -1
  210. package/dist/ionic/{p-2ba9414e.entry.js → p-7176cea3.entry.js} +1 -1
  211. package/dist/ionic/{p-878c7aa5.system.entry.js → p-7b4cd5fc.system.entry.js} +1 -1
  212. package/dist/ionic/{p-4f3e2767.system.entry.js → p-7d7fdaf0.system.entry.js} +1 -1
  213. package/dist/ionic/p-800ef057.js +4 -0
  214. package/dist/ionic/{p-3fb57e1b.system.entry.js → p-8659f9a9.system.entry.js} +1 -1
  215. package/dist/ionic/p-86b2394a.entry.js +4 -0
  216. package/dist/ionic/{p-48d9faa7.entry.js → p-899fb2da.entry.js} +1 -1
  217. package/dist/ionic/{p-baa7cb1e.entry.js → p-8ad82eb3.entry.js} +1 -1
  218. package/dist/ionic/{p-a7e2ac5c.js → p-8b1be026.js} +1 -1
  219. package/dist/ionic/{p-a21b8d05.entry.js → p-8cbf0979.entry.js} +1 -1
  220. package/dist/ionic/{p-477a182e.entry.js → p-8d5a30dd.entry.js} +1 -1
  221. package/dist/ionic/p-8dbdb163.system.js +4 -0
  222. package/dist/ionic/{p-9e6bf9ed.entry.js → p-8e1bded3.entry.js} +1 -1
  223. package/dist/ionic/{p-5ce11143.entry.js → p-965677f1.entry.js} +1 -1
  224. package/dist/ionic/{p-f4cc91f6.entry.js → p-97a96f5f.entry.js} +1 -1
  225. package/dist/ionic/p-97e31c0a.system.js +4 -0
  226. package/dist/ionic/{p-6500b298.system.js → p-9e852ff1.system.js} +1 -1
  227. package/dist/ionic/{p-1e86a71b.entry.js → p-a43603ce.entry.js} +1 -1
  228. package/dist/ionic/{p-c7fd81ba.system.js → p-a936d224.system.js} +1 -1
  229. package/dist/ionic/p-a9c3699b.system.entry.js +4 -0
  230. package/dist/ionic/p-b91fe549.entry.js +4 -0
  231. package/dist/ionic/{p-c1229981.entry.js → p-bd76524d.entry.js} +1 -1
  232. package/dist/ionic/p-beb64be7.system.entry.js +4 -0
  233. package/dist/ionic/{p-07d9e9cd.system.entry.js → p-c429a314.system.entry.js} +1 -1
  234. package/dist/ionic/p-c56b6570.system.entry.js +4 -0
  235. package/dist/ionic/p-c6be7737.system.entry.js +4 -0
  236. package/dist/ionic/p-c919498d.entry.js +4 -0
  237. package/dist/ionic/{p-d21bfe66.system.entry.js → p-cd2808f5.system.entry.js} +1 -1
  238. package/dist/ionic/p-cf425ec5.system.entry.js +4 -0
  239. package/dist/ionic/{p-c31fc05f.system.entry.js → p-db5043df.system.entry.js} +1 -1
  240. package/dist/ionic/{p-22813b28.system.entry.js → p-dbf7d6e5.system.entry.js} +1 -1
  241. package/dist/ionic/p-ddfc4ef4.system.entry.js +4 -0
  242. package/dist/ionic/{p-dd837fa8.entry.js → p-deab76dc.entry.js} +1 -1
  243. package/dist/ionic/{p-100ef961.js → p-e0b06b65.js} +1 -1
  244. package/dist/ionic/{p-302091ab.js → p-e627ed84.js} +1 -1
  245. package/dist/ionic/p-e6b240a0.js +4 -0
  246. package/dist/ionic/{p-b6f8ee31.entry.js → p-ee2469c1.entry.js} +1 -1
  247. package/dist/ionic/{p-939d903b.entry.js → p-f37b4b79.entry.js} +1 -1
  248. package/dist/ionic/{p-06e6d235.system.entry.js → p-f3c82f74.system.entry.js} +2 -2
  249. package/dist/ionic/p-f54ddd19.entry.js +4 -0
  250. package/dist/ionic/{p-2e1794df.system.js → p-fa8d4788.system.js} +1 -1
  251. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +1 -0
  252. package/dist/types/components/backdrop/backdrop.d.ts +3 -0
  253. package/dist/types/components/datetime/datetime.d.ts +1 -0
  254. package/dist/types/components/datetime/utils/data.d.ts +2 -2
  255. package/dist/types/components/menu/menu.d.ts +1 -1
  256. package/dist/types/components/picker/picker.d.ts +131 -74
  257. package/dist/types/components/picker-column/picker-column.d.ts +39 -94
  258. package/dist/types/components/picker-column-internal/picker-column-internal.d.ts +102 -0
  259. package/dist/types/components/picker-internal/picker-internal-interfaces.d.ts +8 -0
  260. package/dist/types/components/picker-internal/picker-internal.d.ts +102 -0
  261. package/dist/types/components.d.ts +122 -122
  262. package/dist/types/interface.d.ts +1 -1
  263. package/dist/types/utils/config.d.ts +2 -2
  264. package/dist/types/utils/gesture/gesture-controller.d.ts +0 -1
  265. package/dist/types/utils/overlays.d.ts +2 -5
  266. package/hydrate/index.js +1083 -1067
  267. package/package.json +2 -2
  268. package/components/ion-picker-legacy-column.d.ts +0 -11
  269. package/components/ion-picker-legacy-column.js +0 -9
  270. package/components/ion-picker-legacy.js +0 -309
  271. package/components/picker-column2.js +0 -379
  272. package/dist/collection/components/picker-legacy/picker.ios.css +0 -367
  273. package/dist/collection/components/picker-legacy/picker.js +0 -817
  274. package/dist/collection/components/picker-legacy/test/basic/picker.e2e.js +0 -25
  275. package/dist/collection/components/picker-legacy-column/picker-column.js +0 -419
  276. package/dist/collection/utils/test/overlays/overlays-scroll-blocking.spec.js +0 -65
  277. package/dist/esm-es5/ion-picker-column.entry.js +0 -4
  278. package/dist/esm-es5/ion-picker.entry.js +0 -4
  279. package/dist/esm-es5/overlays-789cd7a7.js +0 -4
  280. package/dist/esm-es5/swipe-back-cc4c2bcb.js +0 -4
  281. package/dist/ionic/p-0c244faf.entry.js +0 -4
  282. package/dist/ionic/p-1dc91702.entry.js +0 -4
  283. package/dist/ionic/p-234b9617.system.entry.js +0 -4
  284. package/dist/ionic/p-25c34422.system.entry.js +0 -4
  285. package/dist/ionic/p-2804781b.entry.js +0 -4
  286. package/dist/ionic/p-2ad38423.system.entry.js +0 -4
  287. package/dist/ionic/p-39074595.entry.js +0 -4
  288. package/dist/ionic/p-439e20ef.entry.js +0 -4
  289. package/dist/ionic/p-6893f6e4.entry.js +0 -4
  290. package/dist/ionic/p-7c66a566.system.entry.js +0 -4
  291. package/dist/ionic/p-8b4ab236.entry.js +0 -4
  292. package/dist/ionic/p-9403b297.system.entry.js +0 -4
  293. package/dist/ionic/p-992d3bad.entry.js +0 -4
  294. package/dist/ionic/p-9c967a65.system.entry.js +0 -4
  295. package/dist/ionic/p-b4cbb736.js +0 -4
  296. package/dist/ionic/p-ba70d455.entry.js +0 -4
  297. package/dist/ionic/p-c32bf078.system.entry.js +0 -4
  298. package/dist/ionic/p-dc565ca3.js +0 -4
  299. package/dist/ionic/p-e88ed07f.system.js +0 -4
  300. package/dist/ionic/p-eb07ec1a.system.entry.js +0 -4
  301. package/dist/ionic/p-eb5697b5.system.js +0 -4
  302. package/dist/ionic/p-f0559c5d.system.entry.js +0 -4
  303. package/dist/ionic/p-fdd22426.entry.js +0 -4
  304. package/dist/types/components/picker/picker-interfaces.d.ts +0 -8
  305. package/dist/types/components/picker-legacy/picker.d.ts +0 -158
  306. package/dist/types/components/picker-legacy-column/picker-column.d.ts +0 -46
  307. /package/dist/collection/components/{picker-legacy → picker}/animations/ios.enter.js +0 -0
  308. /package/dist/collection/components/{picker-legacy → picker}/animations/ios.leave.js +0 -0
  309. /package/dist/collection/components/picker/{picker-interfaces.js → picker-interface.js} +0 -0
  310. /package/dist/collection/components/{picker-legacy-column → picker-column}/test/test.utils.js +0 -0
  311. /package/dist/collection/components/{picker-column/picker-column-interfaces.js → picker-column-internal/picker-column-internal-interfaces.js} +0 -0
  312. /package/dist/collection/components/{picker-legacy/picker-interface.js → picker-internal/picker-internal-interfaces.js} +0 -0
  313. /package/dist/esm-es5/{data-12e24f00.js → data-44d9e816.js} +0 -0
  314. /package/dist/esm-es5/{index-c132c5f1.js → index-d1a56aed.js} +0 -0
  315. /package/dist/ionic/{p-bb849ebb.js → p-17240d90.js} +0 -0
  316. /package/dist/ionic/{p-ea96fa73.js → p-6e383534.js} +0 -0
  317. /package/dist/ionic/{p-8050b9b9.system.js → p-84c6dece.system.js} +0 -0
  318. /package/dist/ionic/{p-e4219e27.system.js → p-b8c3f071.system.js} +0 -0
  319. /package/dist/types/components/{picker-legacy → picker}/animations/ios.enter.d.ts +0 -0
  320. /package/dist/types/components/{picker-legacy → picker}/animations/ios.leave.d.ts +0 -0
  321. /package/dist/types/components/{picker-legacy → picker}/picker-interface.d.ts +0 -0
  322. /package/dist/types/components/{picker-legacy-column → picker-column}/test/test.utils.d.ts +0 -0
  323. /package/dist/types/components/{picker-column/picker-column-interfaces.d.ts → picker-column-internal/picker-column-internal-interfaces.d.ts} +0 -0
@@ -1,25 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { expect } from "@playwright/test";
5
- import { configs, test } from "../../../../utils/test/playwright/index";
6
- configs().forEach(({ title, screenshot, config }) => {
7
- test.describe(title('picker: basic'), () => {
8
- test('should not have visual regressions', async ({ page }) => {
9
- await page.goto('/src/components/picker-legacy/test/basic', config);
10
- const didPresent = await page.spyOnEvent('ionPickerDidPresent');
11
- const didDismiss = await page.spyOnEvent('ionPickerDidDismiss');
12
- await page.click('#basic');
13
- await didPresent.next();
14
- await page.waitForChanges();
15
- await expect(page).toHaveScreenshot(screenshot(`picker-basic`));
16
- await page.click('.picker-opt:nth-child(2)');
17
- await page.click('ion-picker-legacy .save-btn');
18
- await didDismiss.next();
19
- await page.click('#basic');
20
- await didPresent.next();
21
- await page.waitForChanges();
22
- await expect(page).toHaveScreenshot(screenshot(`picker-value-selected`));
23
- });
24
- });
25
- });
@@ -1,419 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { Host, h } from "@stencil/core";
5
- import { clamp } from "../../utils/helpers";
6
- import { hapticSelectionChanged, hapticSelectionEnd, hapticSelectionStart } from "../../utils/native/haptic";
7
- import { getClassMap } from "../../utils/theme";
8
- import { getIonMode } from "../../global/ionic-global";
9
- /**
10
- * @internal
11
- */
12
- export class PickerColumnCmp {
13
- constructor() {
14
- this.optHeight = 0;
15
- this.rotateFactor = 0;
16
- this.scaleFactor = 1;
17
- this.velocity = 0;
18
- this.y = 0;
19
- this.noAnimate = true;
20
- // `colDidChange` is a flag that gets set when the column is changed
21
- // dynamically. When this flag is set, the column will refresh
22
- // after the component re-renders to incorporate the new column data.
23
- // This is necessary because `this.refresh` queries for the option elements,
24
- // so it needs to wait for the latest elements to be available in the DOM.
25
- // Ex: column is created with 3 options. User updates the column data
26
- // to have 5 options. The column will still think it only has 3 options.
27
- this.colDidChange = false;
28
- this.col = undefined;
29
- }
30
- colChanged() {
31
- this.colDidChange = true;
32
- }
33
- async connectedCallback() {
34
- let pickerRotateFactor = 0;
35
- let pickerScaleFactor = 0.81;
36
- const mode = getIonMode(this);
37
- if (mode === 'ios') {
38
- pickerRotateFactor = -0.46;
39
- pickerScaleFactor = 1;
40
- }
41
- this.rotateFactor = pickerRotateFactor;
42
- this.scaleFactor = pickerScaleFactor;
43
- this.gesture = (await import('../../utils/gesture')).createGesture({
44
- el: this.el,
45
- gestureName: 'picker-swipe',
46
- gesturePriority: 100,
47
- threshold: 0,
48
- passive: false,
49
- onStart: (ev) => this.onStart(ev),
50
- onMove: (ev) => this.onMove(ev),
51
- onEnd: (ev) => this.onEnd(ev),
52
- });
53
- this.gesture.enable();
54
- // Options have not been initialized yet
55
- // Animation must be disabled through the `noAnimate` flag
56
- // Otherwise, the options will render
57
- // at the top of the column and transition down
58
- this.tmrId = setTimeout(() => {
59
- this.noAnimate = false;
60
- // After initialization, `refresh()` will be called
61
- // At this point, animation will be enabled. The options will
62
- // animate as they are being selected.
63
- this.refresh(true);
64
- }, 250);
65
- }
66
- componentDidLoad() {
67
- this.onDomChange();
68
- }
69
- componentDidUpdate() {
70
- // Options may have changed since last update.
71
- if (this.colDidChange) {
72
- // Animation must be disabled through the `onDomChange` parameter.
73
- // Otherwise, the recently added options will render
74
- // at the top of the column and transition down
75
- this.onDomChange(true, false);
76
- this.colDidChange = false;
77
- }
78
- }
79
- disconnectedCallback() {
80
- if (this.rafId !== undefined)
81
- cancelAnimationFrame(this.rafId);
82
- if (this.tmrId)
83
- clearTimeout(this.tmrId);
84
- if (this.gesture) {
85
- this.gesture.destroy();
86
- this.gesture = undefined;
87
- }
88
- }
89
- emitColChange() {
90
- this.ionPickerColChange.emit(this.col);
91
- }
92
- setSelected(selectedIndex, duration) {
93
- // if there is a selected index, then figure out it's y position
94
- // if there isn't a selected index, then just use the top y position
95
- const y = selectedIndex > -1 ? -(selectedIndex * this.optHeight) : 0;
96
- this.velocity = 0;
97
- // set what y position we're at
98
- if (this.rafId !== undefined)
99
- cancelAnimationFrame(this.rafId);
100
- this.update(y, duration, true);
101
- this.emitColChange();
102
- }
103
- update(y, duration, saveY) {
104
- if (!this.optsEl) {
105
- return;
106
- }
107
- // ensure we've got a good round number :)
108
- let translateY = 0;
109
- let translateZ = 0;
110
- const { col, rotateFactor } = this;
111
- const prevSelected = col.selectedIndex;
112
- const selectedIndex = (col.selectedIndex = this.indexForY(-y));
113
- const durationStr = duration === 0 ? '' : duration + 'ms';
114
- const scaleStr = `scale(${this.scaleFactor})`;
115
- const children = this.optsEl.children;
116
- for (let i = 0; i < children.length; i++) {
117
- const button = children[i];
118
- const opt = col.options[i];
119
- const optOffset = i * this.optHeight + y;
120
- let transform = '';
121
- if (rotateFactor !== 0) {
122
- const rotateX = optOffset * rotateFactor;
123
- if (Math.abs(rotateX) <= 90) {
124
- translateY = 0;
125
- translateZ = 90;
126
- transform = `rotateX(${rotateX}deg) `;
127
- }
128
- else {
129
- translateY = -9999;
130
- }
131
- }
132
- else {
133
- translateZ = 0;
134
- translateY = optOffset;
135
- }
136
- const selected = selectedIndex === i;
137
- transform += `translate3d(0px,${translateY}px,${translateZ}px) `;
138
- if (this.scaleFactor !== 1 && !selected) {
139
- transform += scaleStr;
140
- }
141
- // Update transition duration
142
- if (this.noAnimate) {
143
- opt.duration = 0;
144
- button.style.transitionDuration = '';
145
- }
146
- else if (duration !== opt.duration) {
147
- opt.duration = duration;
148
- button.style.transitionDuration = durationStr;
149
- }
150
- // Update transform
151
- if (transform !== opt.transform) {
152
- opt.transform = transform;
153
- }
154
- button.style.transform = transform;
155
- /**
156
- * Ensure that the select column
157
- * item has the selected class
158
- */
159
- opt.selected = selected;
160
- if (selected) {
161
- button.classList.add(PICKER_OPT_SELECTED);
162
- }
163
- else {
164
- button.classList.remove(PICKER_OPT_SELECTED);
165
- }
166
- }
167
- this.col.prevSelected = prevSelected;
168
- if (saveY) {
169
- this.y = y;
170
- }
171
- if (this.lastIndex !== selectedIndex) {
172
- // have not set a last index yet
173
- hapticSelectionChanged();
174
- this.lastIndex = selectedIndex;
175
- }
176
- }
177
- decelerate() {
178
- if (this.velocity !== 0) {
179
- // still decelerating
180
- this.velocity *= DECELERATION_FRICTION;
181
- // do not let it go slower than a velocity of 1
182
- this.velocity = this.velocity > 0 ? Math.max(this.velocity, 1) : Math.min(this.velocity, -1);
183
- let y = this.y + this.velocity;
184
- if (y > this.minY) {
185
- // whoops, it's trying to scroll up farther than the options we have!
186
- y = this.minY;
187
- this.velocity = 0;
188
- }
189
- else if (y < this.maxY) {
190
- // gahh, it's trying to scroll down farther than we can!
191
- y = this.maxY;
192
- this.velocity = 0;
193
- }
194
- this.update(y, 0, true);
195
- const notLockedIn = Math.round(y) % this.optHeight !== 0 || Math.abs(this.velocity) > 1;
196
- if (notLockedIn) {
197
- // isn't locked in yet, keep decelerating until it is
198
- this.rafId = requestAnimationFrame(() => this.decelerate());
199
- }
200
- else {
201
- this.velocity = 0;
202
- this.emitColChange();
203
- hapticSelectionEnd();
204
- }
205
- }
206
- else if (this.y % this.optHeight !== 0) {
207
- // needs to still get locked into a position so options line up
208
- const currentPos = Math.abs(this.y % this.optHeight);
209
- // create a velocity in the direction it needs to scroll
210
- this.velocity = currentPos > this.optHeight / 2 ? 1 : -1;
211
- this.decelerate();
212
- }
213
- }
214
- indexForY(y) {
215
- return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);
216
- }
217
- onStart(detail) {
218
- // We have to prevent default in order to block scrolling under the picker
219
- // but we DO NOT have to stop propagation, since we still want
220
- // some "click" events to capture
221
- if (detail.event.cancelable) {
222
- detail.event.preventDefault();
223
- }
224
- detail.event.stopPropagation();
225
- hapticSelectionStart();
226
- // reset everything
227
- if (this.rafId !== undefined)
228
- cancelAnimationFrame(this.rafId);
229
- const options = this.col.options;
230
- let minY = options.length - 1;
231
- let maxY = 0;
232
- for (let i = 0; i < options.length; i++) {
233
- if (!options[i].disabled) {
234
- minY = Math.min(minY, i);
235
- maxY = Math.max(maxY, i);
236
- }
237
- }
238
- this.minY = -(minY * this.optHeight);
239
- this.maxY = -(maxY * this.optHeight);
240
- }
241
- onMove(detail) {
242
- if (detail.event.cancelable) {
243
- detail.event.preventDefault();
244
- }
245
- detail.event.stopPropagation();
246
- // update the scroll position relative to pointer start position
247
- let y = this.y + detail.deltaY;
248
- if (y > this.minY) {
249
- // scrolling up higher than scroll area
250
- y = Math.pow(y, 0.8);
251
- this.bounceFrom = y;
252
- }
253
- else if (y < this.maxY) {
254
- // scrolling down below scroll area
255
- y += Math.pow(this.maxY - y, 0.9);
256
- this.bounceFrom = y;
257
- }
258
- else {
259
- this.bounceFrom = 0;
260
- }
261
- this.update(y, 0, false);
262
- }
263
- onEnd(detail) {
264
- if (this.bounceFrom > 0) {
265
- // bounce back up
266
- this.update(this.minY, 100, true);
267
- this.emitColChange();
268
- return;
269
- }
270
- else if (this.bounceFrom < 0) {
271
- // bounce back down
272
- this.update(this.maxY, 100, true);
273
- this.emitColChange();
274
- return;
275
- }
276
- this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);
277
- if (this.velocity === 0 && detail.deltaY === 0) {
278
- const opt = detail.event.target.closest('.picker-opt');
279
- if (opt === null || opt === void 0 ? void 0 : opt.hasAttribute('opt-index')) {
280
- this.setSelected(parseInt(opt.getAttribute('opt-index'), 10), TRANSITION_DURATION);
281
- }
282
- }
283
- else {
284
- this.y += detail.deltaY;
285
- if (Math.abs(detail.velocityY) < 0.05) {
286
- const isScrollingUp = detail.deltaY > 0;
287
- const optHeightFraction = (Math.abs(this.y) % this.optHeight) / this.optHeight;
288
- if (isScrollingUp && optHeightFraction > 0.5) {
289
- this.velocity = Math.abs(this.velocity) * -1;
290
- }
291
- else if (!isScrollingUp && optHeightFraction <= 0.5) {
292
- this.velocity = Math.abs(this.velocity);
293
- }
294
- }
295
- this.decelerate();
296
- }
297
- }
298
- refresh(forceRefresh, animated) {
299
- var _a;
300
- let min = this.col.options.length - 1;
301
- let max = 0;
302
- const options = this.col.options;
303
- for (let i = 0; i < options.length; i++) {
304
- if (!options[i].disabled) {
305
- min = Math.min(min, i);
306
- max = Math.max(max, i);
307
- }
308
- }
309
- /**
310
- * Only update selected value if column has a
311
- * velocity of 0. If it does not, then the
312
- * column is animating might land on
313
- * a value different than the value at
314
- * selectedIndex
315
- */
316
- if (this.velocity !== 0) {
317
- return;
318
- }
319
- const selectedIndex = clamp(min, (_a = this.col.selectedIndex) !== null && _a !== void 0 ? _a : 0, max);
320
- if (this.col.prevSelected !== selectedIndex || forceRefresh) {
321
- const y = selectedIndex * this.optHeight * -1;
322
- const duration = animated ? TRANSITION_DURATION : 0;
323
- this.velocity = 0;
324
- this.update(y, duration, true);
325
- }
326
- }
327
- onDomChange(forceRefresh, animated) {
328
- const colEl = this.optsEl;
329
- if (colEl) {
330
- // DOM READ
331
- // We perfom a DOM read over a rendered item, this needs to happen after the first render or after the the column has changed
332
- this.optHeight = colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0;
333
- }
334
- this.refresh(forceRefresh, animated);
335
- }
336
- render() {
337
- const col = this.col;
338
- const mode = getIonMode(this);
339
- return (h(Host, { class: Object.assign({ [mode]: true, 'picker-col': true, 'picker-opts-left': this.col.align === 'left', 'picker-opts-right': this.col.align === 'right' }, getClassMap(col.cssClass)), style: {
340
- 'max-width': this.col.columnWidth,
341
- } }, col.prefix && (h("div", { class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), h("div", { class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (h("button", { "aria-label": o.ariaLabel, class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, "opt-index": index }, o.text)))), col.suffix && (h("div", { class: "picker-suffix", style: { width: col.suffixWidth } }, col.suffix))));
342
- }
343
- static get is() { return "ion-picker-legacy-column"; }
344
- static get originalStyleUrls() {
345
- return {
346
- "ios": ["picker-column.ios.scss"],
347
- "md": ["picker-column.md.scss"]
348
- };
349
- }
350
- static get styleUrls() {
351
- return {
352
- "ios": ["picker-column.ios.css"],
353
- "md": ["picker-column.md.css"]
354
- };
355
- }
356
- static get properties() {
357
- return {
358
- "col": {
359
- "type": "unknown",
360
- "mutable": false,
361
- "complexType": {
362
- "original": "PickerColumn",
363
- "resolved": "PickerColumn",
364
- "references": {
365
- "PickerColumn": {
366
- "location": "import",
367
- "path": "../picker-legacy/picker-interface",
368
- "id": "src/components/picker-legacy/picker-interface.ts::PickerColumn"
369
- }
370
- }
371
- },
372
- "required": true,
373
- "optional": false,
374
- "docs": {
375
- "tags": [],
376
- "text": "Picker column data"
377
- }
378
- }
379
- };
380
- }
381
- static get events() {
382
- return [{
383
- "method": "ionPickerColChange",
384
- "name": "ionPickerColChange",
385
- "bubbles": true,
386
- "cancelable": true,
387
- "composed": true,
388
- "docs": {
389
- "tags": [{
390
- "name": "internal",
391
- "text": undefined
392
- }],
393
- "text": "Emitted when the selected value has changed"
394
- },
395
- "complexType": {
396
- "original": "PickerColumn",
397
- "resolved": "PickerColumn",
398
- "references": {
399
- "PickerColumn": {
400
- "location": "import",
401
- "path": "../picker-legacy/picker-interface",
402
- "id": "src/components/picker-legacy/picker-interface.ts::PickerColumn"
403
- }
404
- }
405
- }
406
- }];
407
- }
408
- static get elementRef() { return "el"; }
409
- static get watchers() {
410
- return [{
411
- "propName": "col",
412
- "methodName": "colChanged"
413
- }];
414
- }
415
- }
416
- const PICKER_OPT_SELECTED = 'picker-opt-selected';
417
- const DECELERATION_FRICTION = 0.97;
418
- const MAX_PICKER_SPEED = 90;
419
- const TRANSITION_DURATION = 150;
@@ -1,65 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { newSpecPage } from "@stencil/core/testing";
5
- import { Modal } from "../../../components/modal/modal";
6
- describe('overlays: scroll blocking', () => {
7
- it('should not block scroll when the overlay is created', async () => {
8
- const page = await newSpecPage({
9
- components: [Modal],
10
- html: `
11
- <ion-modal></ion-modal>
12
- `,
13
- });
14
- const body = page.doc.querySelector('body');
15
- expect(body).not.toHaveClass('backdrop-no-scroll');
16
- });
17
- it('should block scroll when the overlay is presented', async () => {
18
- const page = await newSpecPage({
19
- components: [Modal],
20
- html: `
21
- <ion-modal></ion-modal>
22
- `,
23
- });
24
- const modal = page.body.querySelector('ion-modal');
25
- const body = page.doc.querySelector('body');
26
- await modal.present();
27
- expect(body).toHaveClass('backdrop-no-scroll');
28
- await modal.dismiss();
29
- expect(body).not.toHaveClass('backdrop-no-scroll');
30
- });
31
- it('should not block scroll when the overlay is dismissed', async () => {
32
- const page = await newSpecPage({
33
- components: [Modal],
34
- html: `
35
- <ion-modal></ion-modal>
36
- `,
37
- });
38
- const modal = page.body.querySelector('ion-modal');
39
- const body = page.doc.querySelector('body');
40
- await modal.present();
41
- expect(body).toHaveClass('backdrop-no-scroll');
42
- await modal.dismiss();
43
- expect(body).not.toHaveClass('backdrop-no-scroll');
44
- });
45
- it('should not enable scroll until last overlay is dismissed', async () => {
46
- const page = await newSpecPage({
47
- components: [Modal],
48
- html: `
49
- <ion-modal id="one"></ion-modal>
50
- <ion-modal id="two"></ion-modal>
51
- `,
52
- });
53
- const modalOne = page.body.querySelector('#one');
54
- const modalTwo = page.body.querySelector('#two');
55
- const body = page.doc.querySelector('body');
56
- await modalOne.present();
57
- expect(body).toHaveClass('backdrop-no-scroll');
58
- await modalTwo.present();
59
- expect(body).toHaveClass('backdrop-no-scroll');
60
- await modalOne.dismiss();
61
- expect(body).toHaveClass('backdrop-no-scroll');
62
- await modalTwo.dismiss();
63
- expect(body).not.toHaveClass('backdrop-no-scroll');
64
- });
65
- });
@@ -1,4 +0,0 @@
1
- import{__awaiter,__generator}from"tslib";
2
- /*!
3
- * (C) Ionic http://ionicframework.com - MIT License
4
- */import{r as registerInstance,d as createEvent,h,H as Host,f as getElement}from"./index-7c9b1bca.js";import{r as raf,g as getElementRoot}from"./helpers-3379ba19.js";import{a as hapticSelectionStart,b as hapticSelectionChanged,h as hapticSelectionEnd}from"./haptic-1243b917.js";import{a as isPlatform,b as getIonMode}from"./ionic-global-40e42e7f.js";import{c as createColorClasses}from"./theme-17531cdf.js";import"./capacitor-b4979570.js";import"./index-7a14ecec.js";var pickerColumnIosCss=":host{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;height:200px;outline:none;font-size:22px;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none;text-align:center}:host::-webkit-scrollbar{display:none}:host .picker-item{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden;scroll-snap-align:center}:host .picker-item-empty,:host .picker-item[disabled]{cursor:default}:host .picker-item-empty,:host(:not([disabled])) .picker-item[disabled]{scroll-snap-align:none}:host([disabled]){overflow-y:hidden}:host .picker-item[disabled]{opacity:0.4}:host(.picker-column-active) .picker-item.picker-item-active{color:var(--ion-color-base)}@media (any-hover: hover){:host(:focus){outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}";var pickerColumnMdCss=":host{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;height:200px;outline:none;font-size:22px;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none;text-align:center}:host::-webkit-scrollbar{display:none}:host .picker-item{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden;scroll-snap-align:center}:host .picker-item-empty,:host .picker-item[disabled]{cursor:default}:host .picker-item-empty,:host(:not([disabled])) .picker-item[disabled]{scroll-snap-align:none}:host([disabled]){overflow-y:hidden}:host .picker-item[disabled]{opacity:0.4}:host(.picker-column-active) .picker-item.picker-item-active{color:var(--ion-color-base)}@media (any-hover: hover){:host(:focus){outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}:host .picker-item-active{color:var(--ion-color-base)}";var PickerColumn=function(){function e(e){var i=this;registerInstance(this,e);this.ionChange=createEvent(this,"ionChange",7);this.isScrolling=false;this.isColumnVisible=false;this.canExitInputMode=true;this.centerPickerItemInView=function(e,t,r){if(t===void 0){t=true}if(r===void 0){r=true}var n=i,a=n.el,o=n.isColumnVisible;if(o){var s=e.offsetTop-3*e.clientHeight+e.clientHeight/2;if(a.scrollTop!==s){i.canExitInputMode=r;a.scroll({top:s,left:0,behavior:t?"smooth":undefined})}}};this.setPickerItemActiveState=function(e,i){if(i){e.classList.add(PICKER_ITEM_ACTIVE_CLASS);e.part.add(PICKER_ITEM_ACTIVE_PART)}else{e.classList.remove(PICKER_ITEM_ACTIVE_CLASS);e.part.remove(PICKER_ITEM_ACTIVE_PART)}};this.inputModeChange=function(e){if(!i.numericInput){return}var t=e.detail,r=t.useInputMode,n=t.inputModeColumn;var a=n===undefined||n===i.el;if(!r||!a){i.setInputModeActive(false);return}i.setInputModeActive(true)};this.setInputModeActive=function(e){if(i.isScrolling){i.scrollEndCallback=function(){i.isActive=e};return}i.isActive=e};this.initializeScrollListener=function(){var e=isPlatform("ios");var t=i.el;var r;var n=i.activeItem;var a=function(){raf((function(){if(r){clearTimeout(r);r=undefined}if(!i.isScrolling){e&&hapticSelectionStart();i.isScrolling=true}var a=t.getBoundingClientRect();var o=a.x+a.width/2;var s=a.y+a.height/2;var l=t.shadowRoot.elementFromPoint(o,s);if(n!==null){i.setPickerItemActiveState(n,false)}if(l===null||l.disabled){return}if(l!==n){e&&hapticSelectionChanged();if(i.canExitInputMode){i.exitInputMode()}}n=l;i.setPickerItemActiveState(l,true);r=setTimeout((function(){i.isScrolling=false;e&&hapticSelectionEnd();var t=i.scrollEndCallback;if(t){t();i.scrollEndCallback=undefined}i.canExitInputMode=true;var r=l.getAttribute("data-index");if(r===null){return}var n=parseInt(r,10);var a=i.items[n];if(a.value!==i.value){i.setValue(a.value)}}),250)}))};raf((function(){t.addEventListener("scroll",a);i.destroyScrollListener=function(){t.removeEventListener("scroll",a)}}))};this.exitInputMode=function(){var e=i.parentEl;if(e==null)return;e.exitInputMode();i.el.classList.remove("picker-column-active")};this.isActive=false;this.disabled=false;this.items=[];this.value=undefined;this.color="primary";this.numericInput=false}e.prototype.valueChange=function(){if(this.isColumnVisible){this.scrollActiveItemIntoView()}};e.prototype.componentWillLoad=function(){var e=this;var i=function(i){var t=i[0];if(t.isIntersecting){var r=e,n=r.activeItem,a=r.el;e.isColumnVisible=true;var o=getElementRoot(a).querySelector(".".concat(PICKER_ITEM_ACTIVE_CLASS));if(o){e.setPickerItemActiveState(o,false)}e.scrollActiveItemIntoView();if(n){e.setPickerItemActiveState(n,true)}e.initializeScrollListener()}else{e.isColumnVisible=false;if(e.destroyScrollListener){e.destroyScrollListener();e.destroyScrollListener=undefined}}};new IntersectionObserver(i,{threshold:.001}).observe(this.el);var t=this.parentEl=this.el.closest("ion-picker");if(t!==null){t.addEventListener("ionInputModeChange",(function(i){return e.inputModeChange(i)}))}};e.prototype.componentDidRender=function(){var e;var i=this,t=i.activeItem,r=i.items,n=i.isColumnVisible,a=i.value;if(n){if(t){this.scrollActiveItemIntoView()}else if(((e=r[0])===null||e===void 0?void 0:e.value)!==a){this.setValue(r[0].value)}}};e.prototype.scrollActiveItemIntoView=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=this.activeItem;if(e){this.centerPickerItemInView(e,false,false)}return[2]}))}))};e.prototype.setValue=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t;return __generator(this,(function(r){i=this.items;this.value=e;t=i.find((function(i){return i.value===e&&i.disabled!==true}));if(t){this.ionChange.emit(t)}return[2]}))}))};Object.defineProperty(e.prototype,"activeItem",{get:function(){var e='.picker-item[data-value="'.concat(this.value,'"]').concat(this.disabled?"":":not([disabled])");return getElementRoot(this.el).querySelector(e)},enumerable:false,configurable:true});e.prototype.render=function(){var e;var i=this;var t=this,r=t.items,n=t.color,a=t.disabled,o=t.isActive,s=t.numericInput;var l=getIonMode(this);return h(Host,{exportparts:"".concat(PICKER_ITEM_PART,", ").concat(PICKER_ITEM_ACTIVE_PART),disabled:a,tabindex:a?null:0,class:createColorClasses(n,(e={},e[l]=true,e["picker-column-active"]=o,e["picker-column-numeric-input"]=s,e))},h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "),h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "),h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "),r.map((function(e,t){var r=a||e.disabled||false;return h("button",{tabindex:"-1",class:{"picker-item":true},"data-value":e.value,"data-index":t,onClick:function(e){i.centerPickerItemInView(e.target,true)},disabled:r,part:PICKER_ITEM_PART},e.text)})),h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "),h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "),h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChange"]}},enumerable:false,configurable:true});return e}();var PICKER_ITEM_ACTIVE_CLASS="picker-item-active";var PICKER_ITEM_PART="wheel-item";var PICKER_ITEM_ACTIVE_PART="active";PickerColumn.style={ios:pickerColumnIosCss,md:pickerColumnMdCss};export{PickerColumn as ion_picker_column};
@@ -1,4 +0,0 @@
1
- import{__awaiter,__generator}from"tslib";
2
- /*!
3
- * (C) Ionic http://ionicframework.com - MIT License
4
- */import{r as registerInstance,d as createEvent,h,H as Host,f as getElement}from"./index-7c9b1bca.js";import{g as getElementRoot}from"./helpers-3379ba19.js";var pickerIosCss=":host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--wheel-highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column:first-of-type){text-align:start}:host ::slotted(ion-picker-column:last-of-type){text-align:end}:host ::slotted(ion-picker-column:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to bottom, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to top, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-highlight{background:var(--wheel-highlight-background, var(--ion-color-step-150, #eeeeef))}";var pickerMdCss=":host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--wheel-highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column:first-of-type){text-align:start}:host ::slotted(ion-picker-column:last-of-type){text-align:end}:host ::slotted(ion-picker-column:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to bottom, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to top, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 30%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}";var Picker=function(){function r(r){var t=this;registerInstance(this,r);this.ionInputModeChange=createEvent(this,"ionInputModeChange",7);this.useInputMode=false;this.isInHighlightBounds=function(r){var e=t.highlightEl;if(!e){return false}var n=e.getBoundingClientRect();var i=r.clientX<n.left||r.clientX>n.right;var o=r.clientY<n.top||r.clientY>n.bottom;if(i||o){return false}return true};this.onFocusOut=function(r){var e=r.relatedTarget;if(!e||e.tagName!=="ION-PICKER-COLUMN"&&e!==t.inputEl){t.exitInputMode()}};this.onFocusIn=function(r){var e=r.target;if(e.tagName!=="ION-PICKER-COLUMN"){return}if(!t.actionOnClick){var n=e;var i=n.numericInput;if(i){t.enterInputMode(n,false)}else{t.exitInputMode()}}};this.onClick=function(){var r=t.actionOnClick;if(r){r();t.actionOnClick=undefined}};this.onPointerDown=function(r){var e=t,n=e.useInputMode,i=e.inputModeColumn,o=e.el;if(t.isInHighlightBounds(r)){if(n){if(r.target.tagName==="ION-PICKER-COLUMN"){if(i&&i===r.target){t.actionOnClick=function(){t.enterInputMode()}}else{t.actionOnClick=function(){t.enterInputMode(r.target)}}}else{t.actionOnClick=function(){t.exitInputMode()}}}else{var a=o.querySelectorAll("ion-picker-column.picker-column-numeric-input");var s=a.length===1?r.target:undefined;t.actionOnClick=function(){t.enterInputMode(s)}}return}t.actionOnClick=function(){t.exitInputMode()}};this.enterInputMode=function(r,e){if(e===void 0){e=true}var n=t,i=n.inputEl,o=n.el;if(!i){return}var a=o.querySelector("ion-picker-column.picker-column-numeric-input");if(!a){return}t.useInputMode=true;t.inputModeColumn=r;if(e){if(t.destroyKeypressListener){t.destroyKeypressListener();t.destroyKeypressListener=undefined}i.focus()}else{o.addEventListener("keypress",t.onKeyPress);t.destroyKeypressListener=function(){o.removeEventListener("keypress",t.onKeyPress)}}t.emitInputModeChange()};this.onKeyPress=function(r){var e=t.inputEl;if(!e){return}var n=parseInt(r.key,10);if(!Number.isNaN(n)){e.value+=r.key;t.onInputChange()}};this.selectSingleColumn=function(){var r=t,e=r.inputEl,n=r.inputModeColumn,i=r.singleColumnSearchTimeout;if(!e||!n){return}var o=n.items.filter((function(r){return r.disabled!==true}));if(i){clearTimeout(i)}t.singleColumnSearchTimeout=setTimeout((function(){e.value="";t.singleColumnSearchTimeout=undefined}),1e3);if(e.value.length>=3){var a=e.value.length-2;var s=e.value.substring(a);e.value=s;t.selectSingleColumn();return}var c=o.find((function(r){var t=r.text;var n=t.replace(/^0+(?=[1-9])|0+(?=0$)/,"");return n===e.value}));if(c){n.setValue(c.value);return}if(e.value.length===2){var u=e.value.substring(e.value.length-1);e.value=u;t.selectSingleColumn()}};this.searchColumn=function(r,t,e){if(e===void 0){e="start"}var n=e==="start"?/^0+/:/0$/;var i=r.items.find((function(r){var e=r.text,i=r.disabled;return i!==true&&e.replace(n,"")===t}));if(i){r.setValue(i.value)}};this.selectMultiColumn=function(){var r=t,e=r.inputEl,n=r.el;if(!e){return}var i=Array.from(n.querySelectorAll("ion-picker-column")).filter((function(r){return r.numericInput}));var o=i[0];var a=i[1];var s=e.value;var c;switch(s.length){case 1:t.searchColumn(o,s);break;case 2:var u=e.value.substring(0,1);s=u==="0"||u==="1"?e.value:u;t.searchColumn(o,s);if(s.length===1){c=e.value.substring(e.value.length-1);t.searchColumn(a,c,"end")}break;case 3:var g=e.value.substring(0,1);s=g==="0"||g==="1"?e.value.substring(0,2):g;t.searchColumn(o,s);c=s.length===1?e.value.substring(1):e.value.substring(2);t.searchColumn(a,c,"end");break;case 4:var l=e.value.substring(0,1);s=l==="0"||l==="1"?e.value.substring(0,2):l;t.searchColumn(o,s);var b=s.length===1?e.value.substring(1,e.value.length):e.value.substring(2,e.value.length);t.searchColumn(a,b,"end");break;default:var f=e.value.length-4;var d=e.value.substring(f);e.value=d;t.selectMultiColumn();break}};this.onInputChange=function(){var r=t,e=r.useInputMode,n=r.inputEl,i=r.inputModeColumn;if(!e||!n){return}if(i){t.selectSingleColumn()}else{t.selectMultiColumn()}};this.emitInputModeChange=function(){var r=t,e=r.useInputMode,n=r.inputModeColumn;t.ionInputModeChange.emit({useInputMode:e,inputModeColumn:n})}}r.prototype.preventTouchStartPropagation=function(r){r.stopPropagation()};r.prototype.componentWillLoad=function(){getElementRoot(this.el).addEventListener("focusin",this.onFocusIn);getElementRoot(this.el).addEventListener("focusout",this.onFocusOut)};r.prototype.exitInputMode=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e;return __generator(this,(function(n){r=this,t=r.inputEl,e=r.useInputMode;if(!e||!t){return[2]}this.useInputMode=false;this.inputModeColumn=undefined;t.blur();t.value="";if(this.destroyKeypressListener){this.destroyKeypressListener();this.destroyKeypressListener=undefined}this.emitInputModeChange();return[2]}))}))};r.prototype.render=function(){var r=this;return h(Host,{onPointerDown:function(t){return r.onPointerDown(t)},onClick:function(){return r.onClick()}},h("input",{"aria-hidden":"true",tabindex:-1,inputmode:"numeric",type:"number",ref:function(t){return r.inputEl=t},onInput:function(){return r.onInputChange()},onBlur:function(){return r.exitInputMode()}}),h("div",{class:"picker-before"}),h("div",{class:"picker-after"}),h("div",{class:"picker-highlight",ref:function(t){return r.highlightEl=t}}),h("slot",null))};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return r}();Picker.style={ios:pickerIosCss,md:pickerMdCss};export{Picker as ion_picker};
@@ -1,4 +0,0 @@
1
- import{__awaiter,__generator,__spreadArray}from"tslib";
2
- /*!
3
- * (C) Ionic http://ionicframework.com - MIT License
4
- */import{d as doc}from"./index-7a14ecec.js";import{b as getIonMode,c as config}from"./ionic-global-40e42e7f.js";import{C as CoreDelegate}from"./framework-delegate-aa433dea.js";import{B as BACKDROP_NO_SCROLL}from"./gesture-controller-3723db7c.js";import{OVERLAY_BACK_BUTTON_PRIORITY}from"./hardware-back-button-39299f84.js";import{c as componentOnReady,f as focusElement,a as addEventListener,b as removeEventListener,g as getElementRoot}from"./helpers-3379ba19.js";import{p as printIonWarning}from"./index-595d62c9.js";var lastOverlayIndex=0;var lastId=0;var activeAnimations=new WeakMap;var createController=function(e){return{create:function(n){return createOverlay(e,n)},dismiss:function(n,r,t){return dismissOverlay(document,n,r,e,t)},getTop:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,getPresentedOverlay(document,e)]}))}))}}};var alertController=createController("ion-alert");var actionSheetController=createController("ion-action-sheet");var loadingController=createController("ion-loading");var modalController=createController("ion-modal");var pickerController=createController("ion-picker-legacy");var popoverController=createController("ion-popover");var toastController=createController("ion-toast");var prepareOverlay=function(e){if(typeof document!=="undefined"){connectListeners(document)}var n=lastOverlayIndex++;e.overlayIndex=n};var setOverlayId=function(e){if(!e.hasAttribute("id")){e.id="ion-overlay-".concat(++lastId)}return e.id};var createOverlay=function(e,n){if(typeof window!=="undefined"&&typeof window.customElements!=="undefined"){return window.customElements.whenDefined(e).then((function(){var r=document.createElement(e);r.classList.add("overlay-hidden");Object.assign(r,Object.assign(Object.assign({},n),{hasController:true}));getAppRoot(document).appendChild(r);return new Promise((function(e){return componentOnReady(r,e)}))}))}return Promise.resolve()};var focusableQueryString='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])';var focusFirstDescendant=function(e,n){var r=e.querySelector(focusableQueryString);var t=r===null||r===void 0?void 0:r.shadowRoot;if(t){r=t.querySelector(focusableQueryString)||r}if(r){focusElement(r)}else{n.focus()}};var isOverlayHidden=function(e){return e.classList.contains("overlay-hidden")};var focusLastDescendant=function(e,n){var r=Array.from(e.querySelectorAll(focusableQueryString));var t=r.length>0?r[r.length-1]:null;var o=t===null||t===void 0?void 0:t.shadowRoot;if(o){t=o.querySelector(focusableQueryString)||t}if(t){t.focus()}else{n.focus()}};var trapKeyboardFocus=function(e,n){var r=getPresentedOverlay(n,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover");var t=e.target;if(!r||!t){return}if(r.classList.contains("ion-disable-focus-trap")){return}var o=function(){if(r===t){r.lastFocus=undefined}else{var e=getElementRoot(r);if(!e.contains(t)){return}var o=e.querySelector(".ion-overlay-wrapper");if(!o){return}if(o.contains(t)||t===e.querySelector("ion-backdrop")){r.lastFocus=t}else{var i=r.lastFocus;focusFirstDescendant(o,r);if(i===n.activeElement){focusLastDescendant(o,r)}r.lastFocus=n.activeElement}}};var i=function(){if(r.contains(t)){r.lastFocus=t}else{var e=r.lastFocus;focusFirstDescendant(r,r);if(e===n.activeElement){focusLastDescendant(r,r)}r.lastFocus=n.activeElement}};if(r.shadowRoot){i()}else{o()}};var connectListeners=function(e){if(lastOverlayIndex===0){lastOverlayIndex=1;e.addEventListener("focus",(function(n){trapKeyboardFocus(n,e)}),true);e.addEventListener("ionBackButton",(function(n){var r=getPresentedOverlay(e);if(r===null||r===void 0?void 0:r.backdropDismiss){n.detail.register(OVERLAY_BACK_BUTTON_PRIORITY,(function(){return r.dismiss(undefined,BACKDROP)}))}}));e.addEventListener("keydown",(function(n){if(n.key==="Escape"){var r=getPresentedOverlay(e);if(r===null||r===void 0?void 0:r.backdropDismiss){r.dismiss(undefined,BACKDROP)}}}))}};var dismissOverlay=function(e,n,r,t,o){var i=getPresentedOverlay(e,t,o);if(!i){return Promise.reject("overlay does not exist")}return i.dismiss(n,r)};var getOverlays=function(e,n){if(n===undefined){n="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"}return Array.from(e.querySelectorAll(n)).filter((function(e){return e.overlayIndex>0}))};var getPresentedOverlays=function(e,n){return getOverlays(e,n).filter((function(e){return!isOverlayHidden(e)}))};var getPresentedOverlay=function(e,n,r){var t=getPresentedOverlays(e,n);return r===undefined?t[t.length-1]:t.find((function(e){return e.id===r}))};var setRootAriaHidden=function(e){if(e===void 0){e=false}var n=getAppRoot(document);var r=n.querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");if(!r){return}if(e){r.setAttribute("aria-hidden","true")}else{r.removeAttribute("aria-hidden")}};var present=function(e,n,r,t,o){return __awaiter(void 0,void 0,void 0,(function(){var i,a,d,s,u;return __generator(this,(function(l){switch(l.label){case 0:if(e.presented){return[2]}setRootAriaHidden(true);document.body.classList.add(BACKDROP_NO_SCROLL);e.presented=true;e.willPresent.emit();(i=e.willPresentShorthand)===null||i===void 0?void 0:i.emit();d=getIonMode(e);s=e.enterAnimation?e.enterAnimation:config.get(n,d==="ios"?r:t);return[4,overlayAnimation(e,s,e.el,o)];case 1:u=l.sent();if(u){e.didPresent.emit();(a=e.didPresentShorthand)===null||a===void 0?void 0:a.emit()}if(e.el.tagName!=="ION-TOAST"){focusPreviousElementOnDismiss(e.el)}if(e.keyboardClose&&(document.activeElement===null||!e.el.contains(document.activeElement))){e.el.focus()}return[2]}}))}))};var focusPreviousElementOnDismiss=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,r;return __generator(this,(function(t){switch(t.label){case 0:n=document.activeElement;if(!n){return[2]}r=n===null||n===void 0?void 0:n.shadowRoot;if(r){n=r.querySelector(focusableQueryString)||n}return[4,e.onDidDismiss()];case 1:t.sent();n.focus();return[2]}}))}))};var dismiss=function(e,n,r,t,o,i,a){return __awaiter(void 0,void 0,void 0,(function(){var d,s,u,l,c,v;return __generator(this,(function(f){switch(f.label){case 0:if(!e.presented){return[2,false]}u=doc!==undefined&&getPresentedOverlays(doc).length===1;if(u){setRootAriaHidden(false);document.body.classList.remove(BACKDROP_NO_SCROLL)}e.presented=false;f.label=1;case 1:f.trys.push([1,4,,5]);e.el.style.setProperty("pointer-events","none");e.willDismiss.emit({data:n,role:r});(d=e.willDismissShorthand)===null||d===void 0?void 0:d.emit({data:n,role:r});l=getIonMode(e);c=e.leaveAnimation?e.leaveAnimation:config.get(t,l==="ios"?o:i);if(!(r!==GESTURE))return[3,3];return[4,overlayAnimation(e,c,e.el,a)];case 2:f.sent();f.label=3;case 3:e.didDismiss.emit({data:n,role:r});(s=e.didDismissShorthand)===null||s===void 0?void 0:s.emit({data:n,role:r});activeAnimations.delete(e);e.el.classList.add("overlay-hidden");e.el.style.removeProperty("pointer-events");if(e.el.lastFocus!==undefined){e.el.lastFocus=undefined}return[3,5];case 4:v=f.sent();console.error(v);return[3,5];case 5:e.el.remove();return[2,true]}}))}))};var getAppRoot=function(e){return e.querySelector("ion-app")||e.body};var overlayAnimation=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var o,i,a;return __generator(this,(function(d){switch(d.label){case 0:r.classList.remove("overlay-hidden");o=e.el;i=n(o,t);if(!e.animated||!config.getBoolean("animated",true)){i.duration(0)}if(e.keyboardClose){i.beforeAddWrite((function(){var e=r.ownerDocument.activeElement;if(e===null||e===void 0?void 0:e.matches("input,ion-input, ion-textarea")){e.blur()}}))}a=activeAnimations.get(e)||[];activeAnimations.set(e,__spreadArray(__spreadArray([],a,true),[i],false));return[4,i.play()];case 1:d.sent();return[2,true]}}))}))};var eventMethod=function(e,n){var r;var t=new Promise((function(e){return r=e}));onceEvent(e,n,(function(e){r(e.detail)}));return t};var onceEvent=function(e,n,r){var t=function(o){removeEventListener(e,n,t);r(o)};addEventListener(e,n,t)};var isCancel=function(e){return e==="cancel"||e===BACKDROP};var defaultGate=function(e){return e()};var safeCall=function(e,n){if(typeof e==="function"){var r=config.get("_zoneGate",defaultGate);return r((function(){try{return e(n)}catch(e){throw e}}))}return undefined};var BACKDROP="backdrop";var GESTURE="gesture";var createDelegateController=function(e){var n=false;var r;var t=CoreDelegate();var o=function(o){if(o===void 0){o=false}if(r&&!o){return{delegate:r,inline:n}}var i=e.el,a=e.hasController,d=e.delegate;var s=i.parentNode;n=s!==null&&!a;r=n?d||t:d;return{inline:n,delegate:r}};var i=function(n){return __awaiter(void 0,void 0,void 0,(function(){var r,t;return __generator(this,(function(i){switch(i.label){case 0:r=o(true).delegate;if(!r)return[3,2];return[4,r.attachViewToDom(e.el,n)];case 1:return[2,i.sent()];case 2:t=e.hasController;if(t&&n!==undefined){throw new Error("framework delegate is missing")}return[2,null]}}))}))};var a=function(){var n=o().delegate;if(n&&e.el!==undefined){n.removeViewFromDom(e.el.parentElement,e.el)}};return{attachViewToDom:i,removeViewFromDom:a}};var createTriggerController=function(){var e;var n=function(){if(e){e();e=undefined}};var r=function(r,t){n();var o=t!==undefined?document.getElementById(t):null;if(!o){printIonWarning('A trigger element with the ID "'.concat(t,'" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.'),r);return}var i=function(e,n){var r=function(){n.present()};e.addEventListener("click",r);return function(){e.removeEventListener("click",r)}};e=i(o,r)};return{addClickListener:r,removeClickListener:n}};export{BACKDROP as B,GESTURE as G,alertController as a,actionSheetController as b,popoverController as c,createDelegateController as d,createTriggerController as e,present as f,dismiss as g,eventMethod as h,isCancel as i,prepareOverlay as j,setOverlayId as k,loadingController as l,modalController as m,activeAnimations as n,focusFirstDescendant as o,pickerController as p,getPresentedOverlay as q,safeCall as s,toastController as t};
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{l as clamp}from"./helpers-3379ba19.js";import{i as isRTL}from"./dir-912e3e13.js";import{createGesture}from"./index-32cbee52.js";import"./gesture-controller-3723db7c.js";var createSwipeBackGesture=function(r,e,a,t,n){var i=r.ownerDocument.defaultView;var o=isRTL(r);var v=function(r){var e=50;var a=r.startX;if(o){return a>=i.innerWidth-e}return a<=e};var c=function(r){return o?-r.deltaX:r.deltaX};var u=function(r){return o?-r.velocityX:r.velocityX};var s=function(a){o=isRTL(r);return v(a)&&e()};var f=function(r){var e=c(r);var a=e/i.innerWidth;t(a)};var p=function(r){var e=c(r);var a=i.innerWidth;var t=e/a;var o=u(r);var v=a/2;var s=o>=0&&(o>.2||e>v);var f=s?1-t:t;var p=f*a;var m=0;if(p>5){var l=p/Math.abs(o);m=Math.min(l,540)}n(s,t<=0?.01:clamp(0,t,.9999),m)};return createGesture({el:r,gestureName:"goback-swipe",gesturePriority:101,threshold:10,canStart:s,onStart:a,onMove:f,onEnd:p})};export{createSwipeBackGesture};