@ionic/core 7.6.1-dev.11702054666.15309f03 → 7.6.1-dev.11702425604.192f1b86

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 (350) hide show
  1. package/components/data.js +64 -14
  2. package/components/ion-datetime.js +22 -3
  3. package/components/ion-footer.js +3 -4
  4. package/components/ion-input.js +21 -2
  5. package/components/ion-menu.js +2 -2
  6. package/components/ion-split-pane.js +2 -2
  7. package/components/ion-textarea.js +25 -2
  8. package/css/core.css +0 -8
  9. package/css/core.css.map +1 -1
  10. package/css/ionic.bundle.css +1 -1
  11. package/css/ionic.bundle.css.map +1 -1
  12. package/dist/cjs/{app-globals-0af482c7.js → app-globals-7def22c8.js} +1 -1
  13. package/dist/cjs/{button-active-a5185907.js → button-active-962fe442.js} +1 -1
  14. package/dist/cjs/{data-36b9094e.js → data-a5109f09.js} +64 -14
  15. package/dist/cjs/{index-f8f13389.js → index-17ab7794.js} +3 -3
  16. package/dist/cjs/{index-ce101dc9.js → index-3b012034.js} +1 -1
  17. package/dist/cjs/{index-bbb4336c.js → index-50dcfe2f.js} +21 -8
  18. package/dist/cjs/index.cjs.js +7 -7
  19. package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
  20. package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
  21. package/dist/cjs/ion-alert.cjs.entry.js +4 -4
  22. package/dist/cjs/ion-app_8.cjs.entry.js +6 -6
  23. package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
  24. package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
  25. package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
  26. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
  27. package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
  28. package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
  29. package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
  30. package/dist/cjs/ion-chip.cjs.entry.js +2 -2
  31. package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
  32. package/dist/cjs/ion-datetime-button.cjs.entry.js +3 -3
  33. package/dist/cjs/ion-datetime_3.cjs.entry.js +26 -7
  34. package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
  35. package/dist/cjs/ion-img.cjs.entry.js +2 -2
  36. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
  37. package/dist/cjs/ion-input.cjs.entry.js +23 -4
  38. package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
  39. package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
  40. package/dist/cjs/ion-loading.cjs.entry.js +3 -3
  41. package/dist/cjs/ion-menu_3.cjs.entry.js +6 -6
  42. package/dist/cjs/ion-modal.cjs.entry.js +4 -4
  43. package/dist/cjs/ion-nav_2.cjs.entry.js +3 -3
  44. package/dist/cjs/ion-picker-column-internal.cjs.entry.js +2 -2
  45. package/dist/cjs/ion-picker-internal.cjs.entry.js +1 -1
  46. package/dist/cjs/ion-popover.cjs.entry.js +4 -4
  47. package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
  48. package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
  49. package/dist/cjs/ion-range.cjs.entry.js +2 -2
  50. package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
  51. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  52. package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
  53. package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
  54. package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
  55. package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
  56. package/dist/cjs/ion-select_3.cjs.entry.js +3 -3
  57. package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
  58. package/dist/cjs/ion-split-pane.cjs.entry.js +4 -4
  59. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
  60. package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
  61. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  62. package/dist/cjs/ion-textarea.cjs.entry.js +27 -4
  63. package/dist/cjs/ion-toast.cjs.entry.js +3 -3
  64. package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
  65. package/dist/cjs/{ionic-global-f4a2093b.js → ionic-global-a4edbf03.js} +1 -1
  66. package/dist/cjs/ionic.cjs.js +5 -5
  67. package/dist/cjs/{ios.transition-6787b799.js → ios.transition-b5353f3e.js} +2 -2
  68. package/dist/cjs/loader.cjs.js +4 -4
  69. package/dist/cjs/{md.transition-e033d20a.js → md.transition-67157dd9.js} +2 -2
  70. package/dist/cjs/{overlays-27a6fb16.js → overlays-e77cc023.js} +1 -1
  71. package/dist/cjs/{status-tap-415acac6.js → status-tap-b5d77c08.js} +1 -1
  72. package/dist/collection/collection-manifest.json +1 -1
  73. package/dist/collection/components/datetime/datetime.js +22 -3
  74. package/dist/collection/components/datetime/test/manipulation.spec.js +133 -1
  75. package/dist/collection/components/datetime/test/prefer-wheel/datetime.spec.js +27 -0
  76. package/dist/collection/components/datetime/utils/manipulation.js +65 -15
  77. package/dist/collection/components/footer/footer.ios.css +6 -6
  78. package/dist/collection/components/footer/footer.js +0 -1
  79. package/dist/collection/components/footer/footer.md.css +4 -4
  80. package/dist/collection/components/input/input.js +21 -2
  81. package/dist/collection/components/input/test/clear-on-edit/input.e2e.js +28 -8
  82. package/dist/collection/components/menu/menu.ios.css +3 -4
  83. package/dist/collection/components/menu/menu.md.css +3 -4
  84. package/dist/collection/components/menu/test/custom/menu.e2e.js +61 -0
  85. package/dist/collection/components/split-pane/split-pane.ios.css +1 -2
  86. package/dist/collection/components/split-pane/split-pane.md.css +1 -2
  87. package/dist/collection/components/textarea/test/clear-on-edit/textarea.e2e.js +36 -0
  88. package/dist/collection/components/textarea/textarea.js +25 -2
  89. package/dist/docs.json +3 -3
  90. package/dist/esm/{app-globals-722340c4.js → app-globals-8c62bec2.js} +1 -1
  91. package/dist/esm/{button-active-c6ee4f50.js → button-active-308d3edd.js} +1 -1
  92. package/dist/esm/{data-f5c75b4e.js → data-775093f5.js} +64 -14
  93. package/dist/esm/{index-0c12c22b.js → index-1193f005.js} +1 -1
  94. package/dist/esm/{index-1932b201.js → index-4743453d.js} +3 -3
  95. package/dist/esm/{index-08d686eb.js → index-b7d870cf.js} +21 -8
  96. package/dist/esm/index.js +7 -7
  97. package/dist/esm/ion-accordion_2.entry.js +2 -2
  98. package/dist/esm/ion-action-sheet.entry.js +4 -4
  99. package/dist/esm/ion-alert.entry.js +4 -4
  100. package/dist/esm/ion-app_8.entry.js +6 -6
  101. package/dist/esm/ion-avatar_3.entry.js +2 -2
  102. package/dist/esm/ion-back-button.entry.js +2 -2
  103. package/dist/esm/ion-backdrop.entry.js +2 -2
  104. package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
  105. package/dist/esm/ion-button_2.entry.js +2 -2
  106. package/dist/esm/ion-card_5.entry.js +2 -2
  107. package/dist/esm/ion-checkbox.entry.js +2 -2
  108. package/dist/esm/ion-chip.entry.js +2 -2
  109. package/dist/esm/ion-col_3.entry.js +2 -2
  110. package/dist/esm/ion-datetime-button.entry.js +3 -3
  111. package/dist/esm/ion-datetime_3.entry.js +26 -7
  112. package/dist/esm/ion-fab_3.entry.js +2 -2
  113. package/dist/esm/ion-img.entry.js +2 -2
  114. package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
  115. package/dist/esm/ion-input.entry.js +23 -4
  116. package/dist/esm/ion-item-option_3.entry.js +2 -2
  117. package/dist/esm/ion-item_8.entry.js +2 -2
  118. package/dist/esm/ion-loading.entry.js +3 -3
  119. package/dist/esm/ion-menu_3.entry.js +6 -6
  120. package/dist/esm/ion-modal.entry.js +4 -4
  121. package/dist/esm/ion-nav_2.entry.js +3 -3
  122. package/dist/esm/ion-picker-column-internal.entry.js +2 -2
  123. package/dist/esm/ion-picker-internal.entry.js +1 -1
  124. package/dist/esm/ion-popover.entry.js +4 -4
  125. package/dist/esm/ion-progress-bar.entry.js +2 -2
  126. package/dist/esm/ion-radio_2.entry.js +2 -2
  127. package/dist/esm/ion-range.entry.js +2 -2
  128. package/dist/esm/ion-refresher_2.entry.js +2 -2
  129. package/dist/esm/ion-reorder_2.entry.js +2 -2
  130. package/dist/esm/ion-ripple-effect.entry.js +2 -2
  131. package/dist/esm/ion-route_4.entry.js +2 -2
  132. package/dist/esm/ion-searchbar.entry.js +2 -2
  133. package/dist/esm/ion-segment_2.entry.js +2 -2
  134. package/dist/esm/ion-select_3.entry.js +3 -3
  135. package/dist/esm/ion-spinner.entry.js +2 -2
  136. package/dist/esm/ion-split-pane.entry.js +4 -4
  137. package/dist/esm/ion-tab-bar_2.entry.js +2 -2
  138. package/dist/esm/ion-tab_2.entry.js +1 -1
  139. package/dist/esm/ion-text.entry.js +2 -2
  140. package/dist/esm/ion-textarea.entry.js +27 -4
  141. package/dist/esm/ion-toast.entry.js +3 -3
  142. package/dist/esm/ion-toggle.entry.js +2 -2
  143. package/dist/esm/{ionic-global-c0cda98e.js → ionic-global-1f99b929.js} +1 -1
  144. package/dist/esm/ionic.js +6 -6
  145. package/dist/esm/{ios.transition-802a84a6.js → ios.transition-3376ccb2.js} +2 -2
  146. package/dist/esm/loader.js +5 -5
  147. package/dist/esm/{md.transition-43c2874d.js → md.transition-f992779f.js} +2 -2
  148. package/dist/esm/{overlays-32ef481d.js → overlays-b33f6bca.js} +1 -1
  149. package/dist/esm/{status-tap-2b93b1b5.js → status-tap-16fd8f3d.js} +1 -1
  150. package/dist/esm-es5/app-globals-8c62bec2.js +4 -0
  151. package/dist/esm-es5/{button-active-c6ee4f50.js → button-active-308d3edd.js} +1 -1
  152. package/dist/esm-es5/data-775093f5.js +4 -0
  153. package/dist/esm-es5/{index-0c12c22b.js → index-1193f005.js} +1 -1
  154. package/dist/esm-es5/{index-1932b201.js → index-4743453d.js} +1 -1
  155. package/dist/esm-es5/index-b7d870cf.js +5 -0
  156. package/dist/esm-es5/index.js +1 -1
  157. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  158. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  159. package/dist/esm-es5/ion-alert.entry.js +1 -1
  160. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  161. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  162. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  163. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  164. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  165. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  166. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  167. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  168. package/dist/esm-es5/ion-chip.entry.js +1 -1
  169. package/dist/esm-es5/ion-col_3.entry.js +1 -1
  170. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  171. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  172. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  173. package/dist/esm-es5/ion-img.entry.js +1 -1
  174. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
  175. package/dist/esm-es5/ion-input.entry.js +1 -1
  176. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  177. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  178. package/dist/esm-es5/ion-loading.entry.js +1 -1
  179. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  180. package/dist/esm-es5/ion-modal.entry.js +1 -1
  181. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  182. package/dist/esm-es5/ion-picker-column-internal.entry.js +1 -1
  183. package/dist/esm-es5/ion-picker-internal.entry.js +1 -1
  184. package/dist/esm-es5/ion-popover.entry.js +1 -1
  185. package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
  186. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  187. package/dist/esm-es5/ion-range.entry.js +1 -1
  188. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  189. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  190. package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
  191. package/dist/esm-es5/ion-route_4.entry.js +1 -1
  192. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  193. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  194. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  195. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  196. package/dist/esm-es5/ion-split-pane.entry.js +1 -1
  197. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  198. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  199. package/dist/esm-es5/ion-text.entry.js +1 -1
  200. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  201. package/dist/esm-es5/ion-toast.entry.js +1 -1
  202. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  203. package/dist/esm-es5/{ionic-global-c0cda98e.js → ionic-global-1f99b929.js} +1 -1
  204. package/dist/esm-es5/ionic.js +1 -1
  205. package/dist/esm-es5/{ios.transition-802a84a6.js → ios.transition-3376ccb2.js} +1 -1
  206. package/dist/esm-es5/loader.js +1 -1
  207. package/dist/esm-es5/md.transition-f992779f.js +4 -0
  208. package/dist/esm-es5/{overlays-32ef481d.js → overlays-b33f6bca.js} +1 -1
  209. package/dist/esm-es5/{status-tap-2b93b1b5.js → status-tap-16fd8f3d.js} +1 -1
  210. package/dist/ionic/index.esm.js +1 -1
  211. package/dist/ionic/ionic.esm.js +1 -1
  212. package/dist/ionic/ionic.js +1 -1
  213. package/dist/ionic/{p-f70970cf.js → p-0235067a.js} +1 -1
  214. package/dist/ionic/{p-cdbeaadc.js → p-04377cfa.js} +1 -1
  215. package/dist/ionic/{p-f656e032.system.entry.js → p-043aa6cc.system.entry.js} +1 -1
  216. package/dist/ionic/{p-c3c3333a.js → p-0509fd34.js} +1 -1
  217. package/dist/ionic/{p-765f4dde.entry.js → p-0550f802.entry.js} +1 -1
  218. package/dist/ionic/{p-8acae6b0.system.entry.js → p-06abe918.system.entry.js} +1 -1
  219. package/dist/ionic/{p-5e745192.system.js → p-0aa78a8d.system.js} +1 -1
  220. package/dist/ionic/{p-9f6ee2c0.system.entry.js → p-0dfa4ab4.system.entry.js} +2 -2
  221. package/dist/ionic/{p-b56d0866.system.entry.js → p-0ebc87b7.system.entry.js} +1 -1
  222. package/dist/ionic/{p-a0bb7b92.system.entry.js → p-10ec9af7.system.entry.js} +1 -1
  223. package/dist/ionic/{p-0add7211.entry.js → p-11786dc7.entry.js} +1 -1
  224. package/dist/ionic/{p-3dd98a73.entry.js → p-11a3973f.entry.js} +1 -1
  225. package/dist/ionic/{p-b4a51c42.system.js → p-1501b945.system.js} +1 -1
  226. package/dist/ionic/p-18cae04f.js +4 -0
  227. package/dist/ionic/{p-e7ea9815.system.entry.js → p-19c379da.system.entry.js} +1 -1
  228. package/dist/ionic/{p-e3584231.system.js → p-19d9ceb8.system.js} +1 -1
  229. package/dist/ionic/{p-2d539df1.entry.js → p-1b27ac67.entry.js} +1 -1
  230. package/dist/ionic/{p-a3277a67.entry.js → p-1c249831.entry.js} +1 -1
  231. package/dist/ionic/{p-0e53f8ea.system.entry.js → p-20e0e75d.system.entry.js} +1 -1
  232. package/dist/ionic/{p-6de62649.system.entry.js → p-22827063.system.entry.js} +1 -1
  233. package/dist/ionic/{p-78aadecb.entry.js → p-26c4bf85.entry.js} +1 -1
  234. package/dist/ionic/{p-8de17614.system.entry.js → p-28740823.system.entry.js} +1 -1
  235. package/dist/ionic/{p-a1987850.entry.js → p-2894d5f6.entry.js} +1 -1
  236. package/dist/ionic/{p-9738fd82.js → p-290d3fe9.js} +1 -1
  237. package/dist/ionic/{p-3f5179b5.entry.js → p-2a583966.entry.js} +1 -1
  238. package/dist/ionic/{p-28249b10.system.entry.js → p-2cf21a15.system.entry.js} +1 -1
  239. package/dist/ionic/p-2df97906.system.entry.js +4 -0
  240. package/dist/ionic/{p-1161a793.entry.js → p-3313c481.entry.js} +1 -1
  241. package/dist/ionic/{p-2938823a.system.entry.js → p-332ea4d3.system.entry.js} +1 -1
  242. package/dist/ionic/{p-7ee0f3f2.entry.js → p-3603c472.entry.js} +1 -1
  243. package/dist/ionic/{p-a0d7bb5e.system.js → p-3671f1b9.system.js} +1 -1
  244. package/dist/ionic/p-38531958.system.entry.js +4 -0
  245. package/dist/ionic/{p-98f3d827.entry.js → p-3dfc522b.entry.js} +1 -1
  246. package/dist/ionic/{p-88fde0e0.entry.js → p-3e8d5e53.entry.js} +1 -1
  247. package/dist/ionic/{p-ef126ae8.system.entry.js → p-41208f54.system.entry.js} +1 -1
  248. package/dist/ionic/{p-caf21b46.system.entry.js → p-4489dd20.system.entry.js} +1 -1
  249. package/dist/ionic/{p-72f6ff89.js → p-44a56556.js} +1 -1
  250. package/dist/ionic/{p-353b349d.entry.js → p-44dc52e5.entry.js} +1 -1
  251. package/dist/ionic/{p-c9a21dfd.system.entry.js → p-4685218a.system.entry.js} +1 -1
  252. package/dist/ionic/{p-01d14eba.system.entry.js → p-469dd571.system.entry.js} +1 -1
  253. package/dist/ionic/{p-80fa068e.entry.js → p-47bb15a1.entry.js} +1 -1
  254. package/dist/ionic/{p-b7010c69.system.entry.js → p-4981ea0a.system.entry.js} +1 -1
  255. package/dist/ionic/p-4d145435.entry.js +4 -0
  256. package/dist/ionic/{p-16756e94.system.entry.js → p-507ddbfe.system.entry.js} +1 -1
  257. package/dist/ionic/{p-8f5d30f5.entry.js → p-529b24fb.entry.js} +1 -1
  258. package/dist/ionic/p-52cfafe9.system.js +5 -0
  259. package/dist/ionic/{p-4155f352.system.js → p-5ad1fe3b.system.js} +1 -1
  260. package/dist/ionic/{p-d37b441e.entry.js → p-60959b71.entry.js} +1 -1
  261. package/dist/ionic/{p-28a2c2a2.entry.js → p-61e4d3ec.entry.js} +1 -1
  262. package/dist/ionic/{p-ada96dd0.system.entry.js → p-648ad047.system.entry.js} +1 -1
  263. package/dist/ionic/{p-51a087d6.entry.js → p-6855f26a.entry.js} +1 -1
  264. package/dist/ionic/{p-4fb51e61.system.entry.js → p-69641343.system.entry.js} +1 -1
  265. package/dist/ionic/{p-47b6ba5b.js → p-6ab03751.js} +1 -1
  266. package/dist/ionic/{p-3137c025.system.entry.js → p-6b0ce9b4.system.entry.js} +1 -1
  267. package/dist/ionic/{p-517a9885.system.entry.js → p-6c277fa2.system.entry.js} +1 -1
  268. package/dist/ionic/{p-46d400b4.system.entry.js → p-6e0539ea.system.entry.js} +1 -1
  269. package/dist/ionic/{p-dee7c1d0.system.entry.js → p-6fba0ce1.system.entry.js} +1 -1
  270. package/dist/ionic/{p-9eec42cc.system.entry.js → p-745e3339.system.entry.js} +1 -1
  271. package/dist/ionic/{p-1b19c04b.entry.js → p-767f1a92.entry.js} +1 -1
  272. package/dist/ionic/p-7dc892f8.entry.js +4 -0
  273. package/dist/ionic/{p-05d83227.system.entry.js → p-7e614714.system.entry.js} +1 -1
  274. package/dist/ionic/{p-5ecae037.js → p-7fae5c36.js} +1 -1
  275. package/dist/ionic/{p-b5f9f14c.entry.js → p-803efb5d.entry.js} +1 -1
  276. package/dist/ionic/{p-18ba8221.entry.js → p-806a9810.entry.js} +1 -1
  277. package/dist/ionic/{p-ea69616e.entry.js → p-84b567a6.entry.js} +1 -1
  278. package/dist/ionic/{p-b6f9d32a.entry.js → p-85f48531.entry.js} +1 -1
  279. package/dist/ionic/p-87bb3735.system.js +4 -0
  280. package/dist/ionic/{p-908475e7.system.entry.js → p-8f301ac5.system.entry.js} +1 -1
  281. package/dist/ionic/{p-cfe57b1b.entry.js → p-928ee57a.entry.js} +1 -1
  282. package/dist/ionic/p-932f2259.system.entry.js +4 -0
  283. package/dist/ionic/p-950c05ad.entry.js +4 -0
  284. package/dist/ionic/{p-6ad34705.system.entry.js → p-96d4814f.system.entry.js} +1 -1
  285. package/dist/ionic/p-97174c1e.js +4 -0
  286. package/dist/ionic/{p-6de472cb.js → p-98f35d98.js} +1 -1
  287. package/dist/ionic/p-9a68d8ef.system.js +4 -0
  288. package/dist/ionic/{p-5b365ca7.system.js → p-9f94c72e.system.js} +1 -1
  289. package/dist/ionic/{p-1208f939.entry.js → p-9fb45814.entry.js} +1 -1
  290. package/dist/ionic/{p-3e6b47e8.system.entry.js → p-9fda6824.system.entry.js} +1 -1
  291. package/dist/ionic/{p-588fdf40.entry.js → p-a06501e3.entry.js} +1 -1
  292. package/dist/ionic/{p-31fcb233.system.js → p-a074be82.system.js} +1 -1
  293. package/dist/ionic/{p-17da5ed1.entry.js → p-a3013394.entry.js} +1 -1
  294. package/dist/ionic/{p-dfd9432a.entry.js → p-a3ca2e64.entry.js} +1 -1
  295. package/dist/ionic/{p-d032f825.system.entry.js → p-a42ef163.system.entry.js} +1 -1
  296. package/dist/ionic/{p-8314281e.system.js → p-a49931aa.system.js} +1 -1
  297. package/dist/ionic/{p-e6d68e02.system.entry.js → p-a821750c.system.entry.js} +1 -1
  298. package/dist/ionic/{p-5bebc7b3.system.entry.js → p-abd5d0d5.system.entry.js} +1 -1
  299. package/dist/ionic/{p-6fbecbda.entry.js → p-ae4b7df8.entry.js} +1 -1
  300. package/dist/ionic/{p-a9978d08.entry.js → p-aee39e06.entry.js} +1 -1
  301. package/dist/ionic/{p-e24ce1e5.system.js → p-afa9f205.system.js} +1 -1
  302. package/dist/ionic/{p-c91ccbfa.system.entry.js → p-b7058a0e.system.entry.js} +1 -1
  303. package/dist/ionic/{p-feae5133.entry.js → p-b78e6a44.entry.js} +1 -1
  304. package/dist/ionic/{p-cce9f61a.system.entry.js → p-b7a2ffc9.system.entry.js} +1 -1
  305. package/dist/ionic/{p-b3b3efba.system.entry.js → p-b8a9e195.system.entry.js} +1 -1
  306. package/dist/ionic/{p-ddb30596.entry.js → p-b964aba3.entry.js} +1 -1
  307. package/dist/ionic/{p-6e70dd1a.system.entry.js → p-beeed22c.system.entry.js} +1 -1
  308. package/dist/ionic/{p-f8a5bb89.entry.js → p-c08fe2c0.entry.js} +1 -1
  309. package/dist/ionic/{p-4d67d27a.entry.js → p-c1701827.entry.js} +1 -1
  310. package/dist/ionic/{p-5eda1d7d.entry.js → p-c5acfeb1.entry.js} +1 -1
  311. package/dist/ionic/{p-9709ebd8.system.entry.js → p-cb8dff22.system.entry.js} +1 -1
  312. package/dist/ionic/{p-042e6f4b.entry.js → p-cd1b920b.entry.js} +1 -1
  313. package/dist/ionic/p-cd574dfa.js +4 -0
  314. package/dist/ionic/{p-9b7f0b0f.entry.js → p-cf53213c.entry.js} +1 -1
  315. package/dist/ionic/{p-b6f5e4f2.system.entry.js → p-d93eed83.system.entry.js} +1 -1
  316. package/dist/ionic/{p-e94c392d.entry.js → p-da5e2652.entry.js} +1 -1
  317. package/dist/ionic/p-dc6d8647.entry.js +4 -0
  318. package/dist/ionic/{p-7d92bf15.system.entry.js → p-dc71e4ef.system.entry.js} +1 -1
  319. package/dist/ionic/{p-6577aea9.system.entry.js → p-ddd48faf.system.entry.js} +1 -1
  320. package/dist/ionic/p-e2903cdc.system.entry.js +4 -0
  321. package/dist/ionic/{p-2092f39f.entry.js → p-e33d1ebc.entry.js} +1 -1
  322. package/dist/ionic/{p-8d69a624.entry.js → p-ebe8bd8a.entry.js} +1 -1
  323. package/dist/ionic/p-ec652bc0.system.entry.js +4 -0
  324. package/dist/ionic/{p-c847fb35.system.entry.js → p-f0504446.system.entry.js} +1 -1
  325. package/dist/ionic/{p-4f3ae45a.entry.js → p-f2bfd3d7.entry.js} +1 -1
  326. package/dist/ionic/{p-2d3b9fa3.system.entry.js → p-f434bcf3.system.entry.js} +1 -1
  327. package/dist/ionic/{p-33a37fad.system.js → p-f6e9c227.system.js} +1 -1
  328. package/dist/ionic/{p-251666e2.entry.js → p-f894e0ad.entry.js} +1 -1
  329. package/dist/types/components/datetime/utils/manipulation.d.ts +34 -7
  330. package/hydrate/index.js +175 -63
  331. package/package.json +2 -2
  332. package/dist/esm-es5/app-globals-722340c4.js +0 -4
  333. package/dist/esm-es5/data-f5c75b4e.js +0 -4
  334. package/dist/esm-es5/index-08d686eb.js +0 -5
  335. package/dist/esm-es5/md.transition-43c2874d.js +0 -4
  336. package/dist/ionic/p-1786bc72.js +0 -4
  337. package/dist/ionic/p-2aea8b1e.js +0 -4
  338. package/dist/ionic/p-350f7292.system.entry.js +0 -4
  339. package/dist/ionic/p-4e561099.system.entry.js +0 -4
  340. package/dist/ionic/p-564af202.system.entry.js +0 -4
  341. package/dist/ionic/p-5e4eec2e.entry.js +0 -4
  342. package/dist/ionic/p-7471ed89.entry.js +0 -4
  343. package/dist/ionic/p-82e3d633.system.js +0 -4
  344. package/dist/ionic/p-91d33c4a.js +0 -4
  345. package/dist/ionic/p-9e447eb1.system.js +0 -4
  346. package/dist/ionic/p-a4afcc88.entry.js +0 -4
  347. package/dist/ionic/p-afd6ca9d.entry.js +0 -4
  348. package/dist/ionic/p-d3b030b8.system.js +0 -5
  349. package/dist/ionic/p-f0445d82.system.entry.js +0 -4
  350. package/dist/ionic/p-fba0a6e7.system.entry.js +0 -4
@@ -704,14 +704,24 @@ export class Datetime {
704
704
  * or modal that the datetime was presented in.
705
705
  */
706
706
  async confirm(closeOverlay = false) {
707
- const { isCalendarPicker, activeParts } = this;
707
+ const { isCalendarPicker, activeParts, preferWheel, workingParts } = this;
708
708
  /**
709
709
  * We only update the value if the presentation is not a calendar picker.
710
710
  */
711
711
  if (activeParts !== undefined || !isCalendarPicker) {
712
712
  const activePartsIsArray = Array.isArray(activeParts);
713
713
  if (activePartsIsArray && activeParts.length === 0) {
714
- this.setValue(undefined);
714
+ if (preferWheel) {
715
+ /**
716
+ * If the datetime is using a wheel picker, but the
717
+ * active parts are empty, then the user has confirmed the
718
+ * initial value (working parts) presented to them.
719
+ */
720
+ this.setValue(convertDataToISO(workingParts));
721
+ }
722
+ else {
723
+ this.setValue(undefined);
724
+ }
715
725
  }
716
726
  else {
717
727
  this.setValue(convertDataToISO(activeParts));
@@ -915,9 +925,18 @@ export class Datetime {
915
925
  const yearValues = (this.parsedYearValues = convertToArrayOfNumbers(this.yearValues));
916
926
  const dayValues = (this.parsedDayValues = convertToArrayOfNumbers(this.dayValues));
917
927
  const todayParts = (this.todayParts = parseDate(getToday()));
918
- this.defaultParts = getClosestValidDate(todayParts, monthValues, dayValues, yearValues, hourValues, minuteValues);
919
928
  this.processMinParts();
920
929
  this.processMaxParts();
930
+ this.defaultParts = getClosestValidDate({
931
+ refParts: todayParts,
932
+ monthValues,
933
+ dayValues,
934
+ yearValues,
935
+ hourValues,
936
+ minuteValues,
937
+ minParts: this.minParts,
938
+ maxParts: this.maxParts,
939
+ });
921
940
  this.processValue(this.value);
922
941
  this.emitStyle();
923
942
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { getPreviousYear, getNextYear, getPreviousMonth, getNextMonth, getPreviousDay, getNextDay, getPreviousWeek, getNextWeek, getEndOfWeek, getStartOfWeek, convert12HourTo24Hour, getInternalHourValue, calculateHourFromAMPM, subtractDays, addDays, validateParts, } from "../utils/manipulation";
4
+ import { getPreviousYear, getNextYear, getPreviousMonth, getNextMonth, getPreviousDay, getNextDay, getPreviousWeek, getNextWeek, getEndOfWeek, getStartOfWeek, convert12HourTo24Hour, getInternalHourValue, calculateHourFromAMPM, subtractDays, addDays, validateParts, getClosestValidDate, } from "../utils/manipulation";
5
5
  describe('addDays()', () => {
6
6
  it('should correctly add days', () => {
7
7
  expect(addDays({
@@ -431,3 +431,135 @@ describe('validateParts()', () => {
431
431
  })).toEqual({ month: 1, day: 1, year: 2022, hour: 9, minute: 30 });
432
432
  });
433
433
  });
434
+ describe('getClosestValidDate()', () => {
435
+ it('should match a date with only month/day/year', () => {
436
+ // October 10, 2023
437
+ const refParts = { month: 10, day: 10, year: 2023 };
438
+ // April 10, 2021
439
+ const minParts = { month: 4, day: 10, year: 2021 };
440
+ // September 14, 2021
441
+ const maxParts = { month: 9, day: 14, year: 2021 };
442
+ // September 4, 2021
443
+ const expected = { month: 9, day: 4, year: 2021, dayOfWeek: undefined };
444
+ expect(getClosestValidDate({
445
+ refParts,
446
+ monthValues: [2, 3, 7, 9, 10],
447
+ dayValues: [4, 15, 25],
448
+ yearValues: [2020, 2021, 2023],
449
+ maxParts,
450
+ minParts,
451
+ })).toEqual(expected);
452
+ });
453
+ it('should match a date when the reference date is before the min', () => {
454
+ // April 2, 2020 3:20 PM
455
+ const refParts = { month: 4, day: 2, year: 2020, hour: 15, minute: 20 };
456
+ // September 10, 2021 10:10 AM
457
+ const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
458
+ // September 14, 2021 10:11 AM
459
+ const maxParts = { month: 9, day: 14, year: 2021, hour: 10, minute: 11 };
460
+ // September 11, 2021 11:15 AM
461
+ const expected = {
462
+ year: 2021,
463
+ day: 11,
464
+ month: 9,
465
+ hour: 11,
466
+ minute: 15,
467
+ ampm: 'am',
468
+ dayOfWeek: undefined,
469
+ };
470
+ expect(getClosestValidDate({
471
+ refParts,
472
+ monthValues: [4, 9, 11],
473
+ dayValues: [11, 12, 13, 14],
474
+ yearValues: [2020, 2021, 2023],
475
+ hourValues: [9, 10, 11],
476
+ minuteValues: [11, 12, 13, 14, 15],
477
+ maxParts,
478
+ minParts,
479
+ })).toEqual(expected);
480
+ });
481
+ it('should match a date when the reference date is before the min', () => {
482
+ // April 2, 2020 3:20 PM
483
+ const refParts = { month: 4, day: 2, year: 2020, hour: 15, minute: 20 };
484
+ // September 10, 2021 10:10 AM
485
+ const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
486
+ // September 10, 2021 10:15 AM
487
+ const maxParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 15 };
488
+ // September 10, 2021 10:15 AM
489
+ const expected = {
490
+ month: 9,
491
+ day: 10,
492
+ year: 2021,
493
+ hour: 10,
494
+ minute: 15,
495
+ ampm: 'am',
496
+ dayOfWeek: undefined,
497
+ };
498
+ expect(getClosestValidDate({
499
+ refParts,
500
+ monthValues: [4, 9, 11],
501
+ dayValues: [10, 12, 13, 14],
502
+ yearValues: [2020, 2021, 2023],
503
+ hourValues: [9, 10, 11],
504
+ minuteValues: [11, 12, 13, 14, 15],
505
+ minParts,
506
+ maxParts,
507
+ })).toEqual(expected);
508
+ });
509
+ it('should only clamp minutes if within the same day and hour as min/max', () => {
510
+ // April 2, 2020 9:16 AM
511
+ const refParts = { month: 4, day: 2, year: 2020, hour: 9, minute: 16 };
512
+ // September 10, 2021 10:10 AM
513
+ const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
514
+ // September 10, 2021 11:15 AM
515
+ const maxParts = { month: 9, day: 10, year: 2021, hour: 11, minute: 15 };
516
+ // September 10, 2021 10:16 AM
517
+ const expected = {
518
+ month: 9,
519
+ day: 10,
520
+ year: 2021,
521
+ hour: 10,
522
+ minute: 16,
523
+ ampm: 'am',
524
+ dayOfWeek: undefined,
525
+ };
526
+ expect(getClosestValidDate({
527
+ refParts,
528
+ monthValues: [4, 9, 11],
529
+ dayValues: [10, 12, 13, 14],
530
+ yearValues: [2020, 2021, 2023],
531
+ hourValues: [9, 10, 11],
532
+ minuteValues: [10, 15, 16],
533
+ minParts,
534
+ maxParts,
535
+ })).toEqual(expected);
536
+ });
537
+ it('should return the closest valid date after adjusting the allowed year', () => {
538
+ // April 2, 2022 9:16 AM
539
+ const refParts = { month: 4, day: 2, year: 2022, hour: 9, minute: 16 };
540
+ // September 10, 2021 10:10 AM
541
+ const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
542
+ // September 10, 2023 11:15 AM
543
+ const maxParts = { month: 9, day: 10, year: 2023, hour: 11, minute: 15 };
544
+ // April 2, 2022 9:16 AM
545
+ const expected = {
546
+ month: 4,
547
+ day: 2,
548
+ year: 2022,
549
+ hour: 9,
550
+ minute: 16,
551
+ ampm: 'am',
552
+ dayOfWeek: undefined,
553
+ };
554
+ expect(getClosestValidDate({
555
+ refParts,
556
+ monthValues: [4, 9, 11],
557
+ dayValues: [2, 10, 12, 13, 14],
558
+ yearValues: [2020, 2021, 2022, 2023],
559
+ hourValues: [9, 10, 11],
560
+ minuteValues: [10, 15, 16],
561
+ minParts,
562
+ maxParts,
563
+ })).toEqual(expected);
564
+ });
565
+ });
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { newSpecPage } from "@stencil/core/testing";
5
+ import { Datetime } from "../../datetime";
6
+ describe('datetime: preferWheel', () => {
7
+ beforeEach(() => {
8
+ const mockIntersectionObserver = jest.fn();
9
+ mockIntersectionObserver.mockReturnValue({
10
+ observe: () => null,
11
+ unobserve: () => null,
12
+ disconnect: () => null,
13
+ });
14
+ global.IntersectionObserver = mockIntersectionObserver;
15
+ });
16
+ it('should select the working day when clicking the confirm button', async () => {
17
+ const page = await newSpecPage({
18
+ components: [Datetime],
19
+ html: '<ion-datetime prefer-wheel="true" max="2021" show-default-buttons="true"></ion-datetime>',
20
+ });
21
+ const datetime = page.body.querySelector('ion-datetime');
22
+ const confirmButton = datetime.shadowRoot.querySelector('#confirm-button');
23
+ confirmButton.click();
24
+ await page.waitForChanges();
25
+ expect(datetime.value).toBe('2021-12-31T23:59:00');
26
+ });
27
+ });
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { isSameDay } from "./comparison";
4
+ import { isAfter, isBefore, isSameDay } from "./comparison";
5
5
  import { getNumDaysInMonth } from "./helpers";
6
6
  import { clampDate, parseAmPm } from "./parse";
7
7
  const twoDigit = (val) => {
@@ -355,32 +355,82 @@ export const validateParts = (parts, minParts, maxParts) => {
355
355
  * Returns the closest date to refParts
356
356
  * that also meets the constraints of
357
357
  * the *Values params.
358
- * @param refParts The reference date
359
- * @param monthValues The allowed month values
360
- * @param dayValues The allowed day (of the month) values
361
- * @param yearValues The allowed year values
362
- * @param hourValues The allowed hour values
363
- * @param minuteValues The allowed minute values
364
358
  */
365
- export const getClosestValidDate = (refParts, monthValues, dayValues, yearValues, hourValues, minuteValues) => {
359
+ export const getClosestValidDate = ({ refParts, monthValues, dayValues, yearValues, hourValues, minuteValues, minParts, maxParts, }) => {
366
360
  const { hour, minute, day, month, year } = refParts;
367
361
  const copyParts = Object.assign(Object.assign({}, refParts), { dayOfWeek: undefined });
362
+ if (yearValues !== undefined) {
363
+ // Filters out years that are out of the min/max bounds
364
+ const filteredYears = yearValues.filter((year) => {
365
+ if (minParts !== undefined && year < minParts.year) {
366
+ return false;
367
+ }
368
+ if (maxParts !== undefined && year > maxParts.year) {
369
+ return false;
370
+ }
371
+ return true;
372
+ });
373
+ copyParts.year = findClosestValue(year, filteredYears);
374
+ }
368
375
  if (monthValues !== undefined) {
369
- copyParts.month = findClosestValue(month, monthValues);
376
+ // Filters out months that are out of the min/max bounds
377
+ const filteredMonths = monthValues.filter((month) => {
378
+ if (minParts !== undefined && copyParts.year === minParts.year && month < minParts.month) {
379
+ return false;
380
+ }
381
+ if (maxParts !== undefined && copyParts.year === maxParts.year && month > maxParts.month) {
382
+ return false;
383
+ }
384
+ return true;
385
+ });
386
+ copyParts.month = findClosestValue(month, filteredMonths);
370
387
  }
371
388
  // Day is nullable but cannot be undefined
372
389
  if (day !== null && dayValues !== undefined) {
373
- copyParts.day = findClosestValue(day, dayValues);
374
- }
375
- if (yearValues !== undefined) {
376
- copyParts.year = findClosestValue(year, yearValues);
390
+ // Filters out days that are out of the min/max bounds
391
+ const filteredDays = dayValues.filter((day) => {
392
+ if (minParts !== undefined && isBefore(Object.assign(Object.assign({}, copyParts), { day }), minParts)) {
393
+ return false;
394
+ }
395
+ if (maxParts !== undefined && isAfter(Object.assign(Object.assign({}, copyParts), { day }), maxParts)) {
396
+ return false;
397
+ }
398
+ return true;
399
+ });
400
+ copyParts.day = findClosestValue(day, filteredDays);
377
401
  }
378
402
  if (hour !== undefined && hourValues !== undefined) {
379
- copyParts.hour = findClosestValue(hour, hourValues);
403
+ // Filters out hours that are out of the min/max bounds
404
+ const filteredHours = hourValues.filter((hour) => {
405
+ if ((minParts === null || minParts === void 0 ? void 0 : minParts.hour) !== undefined && isSameDay(copyParts, minParts) && hour < minParts.hour) {
406
+ return false;
407
+ }
408
+ if ((maxParts === null || maxParts === void 0 ? void 0 : maxParts.hour) !== undefined && isSameDay(copyParts, maxParts) && hour > maxParts.hour) {
409
+ return false;
410
+ }
411
+ return true;
412
+ });
413
+ copyParts.hour = findClosestValue(hour, filteredHours);
380
414
  copyParts.ampm = parseAmPm(copyParts.hour);
381
415
  }
382
416
  if (minute !== undefined && minuteValues !== undefined) {
383
- copyParts.minute = findClosestValue(minute, minuteValues);
417
+ // Filters out minutes that are out of the min/max bounds
418
+ const filteredMinutes = minuteValues.filter((minute) => {
419
+ if ((minParts === null || minParts === void 0 ? void 0 : minParts.minute) !== undefined &&
420
+ isSameDay(copyParts, minParts) &&
421
+ copyParts.hour === minParts.hour &&
422
+ minute < minParts.minute) {
423
+ return false;
424
+ }
425
+ if ((maxParts === null || maxParts === void 0 ? void 0 : maxParts.minute) !== undefined &&
426
+ isSameDay(copyParts, maxParts) &&
427
+ copyParts.hour === maxParts.hour &&
428
+ minute > maxParts.minute) {
429
+ return false;
430
+ }
431
+ return true;
432
+ });
433
+ copyParts.minute = findClosestValue(minute, filteredMinutes);
384
434
  }
385
435
  return copyParts;
386
436
  };
@@ -53,7 +53,7 @@
53
53
  * }
54
54
  * }
55
55
  */
56
- :host {
56
+ ion-footer {
57
57
  display: block;
58
58
  position: relative;
59
59
  order: 1;
@@ -61,7 +61,7 @@
61
61
  z-index: 10;
62
62
  }
63
63
 
64
- :host(.footer-toolbar-padding) ::slotted(ion-toolbar:last-of-type) {
64
+ ion-footer.footer-toolbar-padding ion-toolbar:last-of-type {
65
65
  padding-bottom: var(--ion-safe-area-bottom, 0);
66
66
  }
67
67
 
@@ -120,7 +120,7 @@
120
120
  * }
121
121
  * }
122
122
  */
123
- ::slotted(ion-toolbar:first-of-type) {
123
+ .footer-ios ion-toolbar:first-of-type {
124
124
  --border-width: 0.55px 0 0;
125
125
  }
126
126
 
@@ -133,14 +133,14 @@
133
133
  position: absolute;
134
134
  backdrop-filter: saturate(180%) blur(20px);
135
135
  }
136
- :host(.footer-translucent-ios) :slotted(ion-toolbar) {
136
+ .footer-translucent-ios ion-toolbar {
137
137
  --opacity: .8;
138
138
  }
139
139
  }
140
- :host(.ion-no-border) ::slotted(ion-toolbar:first-of-type) {
140
+ .footer-ios.ion-no-border ion-toolbar:first-of-type {
141
141
  --border-width: 0;
142
142
  }
143
143
 
144
- :host(.footer-collapse-fade) ::slotted(ion-toolbar) {
144
+ .footer-collapse-fade ion-toolbar {
145
145
  --opacity-scale: inherit;
146
146
  }
@@ -91,7 +91,6 @@ export class Footer {
91
91
  } }, mode === 'ios' && translucent && h("div", { class: "footer-background" }), h("slot", null)));
92
92
  }
93
93
  static get is() { return "ion-footer"; }
94
- static get encapsulation() { return "shadow"; }
95
94
  static get originalStyleUrls() {
96
95
  return {
97
96
  "ios": ["footer.ios.scss"],
@@ -53,7 +53,7 @@
53
53
  * }
54
54
  * }
55
55
  */
56
- :host {
56
+ ion-footer {
57
57
  display: block;
58
58
  position: relative;
59
59
  order: 1;
@@ -61,7 +61,7 @@
61
61
  z-index: 10;
62
62
  }
63
63
 
64
- :host(.footer-toolbar-padding) ::slotted(ion-toolbar:last-of-type) {
64
+ ion-footer.footer-toolbar-padding ion-toolbar:last-of-type {
65
65
  padding-bottom: var(--ion-safe-area-bottom, 0);
66
66
  }
67
67
 
@@ -120,10 +120,10 @@
120
120
  * }
121
121
  * }
122
122
  */
123
- :host {
123
+ .footer-md {
124
124
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);
125
125
  }
126
126
 
127
- :host(.ion-no-border) {
127
+ .footer-md.ion-no-border {
128
128
  box-shadow: none;
129
129
  }
@@ -269,15 +269,34 @@ export class Input {
269
269
  if (!this.shouldClearOnEdit()) {
270
270
  return;
271
271
  }
272
+ /**
273
+ * The following keys do not modify the
274
+ * contents of the input. As a result, pressing
275
+ * them should not edit the input.
276
+ *
277
+ * We can't check to see if the value of the input
278
+ * was changed because we call checkClearOnEdit
279
+ * in a keydown listener, and the key has not yet
280
+ * been added to the input.
281
+ */
282
+ const IGNORED_KEYS = ['Enter', 'Tab', 'Shift', 'Meta', 'Alt', 'Control'];
283
+ const pressedIgnoredKey = IGNORED_KEYS.includes(ev.key);
272
284
  /**
273
285
  * Clear the input if the control has not been previously cleared during focus.
274
286
  * Do not clear if the user hitting enter to submit a form.
275
287
  */
276
- if (!this.didInputClearOnEdit && this.hasValue() && ev.key !== 'Enter' && ev.key !== 'Tab') {
288
+ if (!this.didInputClearOnEdit && this.hasValue() && !pressedIgnoredKey) {
277
289
  this.value = '';
278
290
  this.emitInputChange(ev);
279
291
  }
280
- this.didInputClearOnEdit = true;
292
+ /**
293
+ * Pressing an IGNORED_KEYS first and
294
+ * then an allowed key will cause the input to not
295
+ * be cleared.
296
+ */
297
+ if (!pressedIgnoredKey) {
298
+ this.didInputClearOnEdit = true;
299
+ }
281
300
  }
282
301
  hasValue() {
283
302
  return this.getValue().length > 0;
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { expect } from "@playwright/test";
5
5
  import { test, configs } from "../../../../utils/test/playwright/index";
6
+ const IGNORED_KEYS = ['Enter', 'Tab', 'Shift', 'Meta', 'Alt', 'Control'];
6
7
  configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
7
8
  test.describe(title('input: clearOnEdit'), () => {
8
9
  test('should clear when typed into', async ({ page }) => {
@@ -13,21 +14,40 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
13
14
  await ionInput.next();
14
15
  await expect(input).toHaveJSProperty('value', 'h');
15
16
  });
16
- test('should not clear when enter is pressed', async ({ page }) => {
17
- await page.setContent(`<ion-input value="abc" clear-on-edit="true" aria-label="input"></ion-input>`, config);
17
+ test('should not clear the input if it does not have an initial value when typing', async ({ page }) => {
18
+ await page.setContent(`<ion-input label="input" value="" clear-on-edit="true"></ion-input>`, config);
18
19
  const input = page.locator('ion-input');
19
- await input.locator('input').focus();
20
- await page.keyboard.press('Enter');
21
- await page.waitForChanges();
22
- await expect(input).toHaveJSProperty('value', 'abc');
20
+ await input.click();
21
+ await input.type('hello world');
22
+ await expect(input).toHaveJSProperty('value', 'hello world');
23
+ });
24
+ IGNORED_KEYS.forEach((ignoredKey) => {
25
+ test(`should not clear when ${ignoredKey} is pressed`, async ({ page, skip }) => {
26
+ skip.browser((browserName) => browserName === 'firefox' && ignoredKey === 'Meta', 'Firefox incorrectly adds "OS" to the input when pressing the Meta key on Linux');
27
+ await page.setContent(`<ion-input value="abc" clear-on-edit="true" aria-label="input"></ion-input>`, config);
28
+ const input = page.locator('ion-input');
29
+ await input.locator('input').focus();
30
+ await page.keyboard.press(ignoredKey);
31
+ await page.waitForChanges();
32
+ await expect(input).toHaveJSProperty('value', 'abc');
33
+ });
23
34
  });
24
- test('should not clear when tab is pressed', async ({ page }) => {
35
+ test('should clear after when pressing valid key after pressing ignored key', async ({ page }) => {
36
+ test.info().annotations.push({
37
+ type: 'issue',
38
+ description: 'https://github.com/ionic-team/ionic-framework/issues/28633',
39
+ });
25
40
  await page.setContent(`<ion-input value="abc" clear-on-edit="true" aria-label="input"></ion-input>`, config);
26
41
  const input = page.locator('ion-input');
27
42
  await input.locator('input').focus();
28
- await page.keyboard.press('Tab');
43
+ // ignored
44
+ await page.keyboard.press('Shift');
29
45
  await page.waitForChanges();
30
46
  await expect(input).toHaveJSProperty('value', 'abc');
47
+ // allowed
48
+ await page.keyboard.press('a');
49
+ await page.waitForChanges();
50
+ await expect(input).toHaveJSProperty('value', 'a');
31
51
  });
32
52
  });
33
53
  });
@@ -305,14 +305,13 @@ ion-backdrop {
305
305
  left: 0;
306
306
  right: 0;
307
307
  width: auto;
308
- /* stylelint-disable declaration-no-important */
309
- transform: none !important;
310
- box-shadow: none !important;
308
+ transform: none;
309
+ box-shadow: none;
311
310
  }
312
311
 
313
312
  :host(.menu-pane-visible) ion-backdrop {
313
+ /* stylelint-disable-next-line declaration-no-important */
314
314
  display: hidden !important;
315
- /* stylelint-enable declaration-no-important */
316
315
  }
317
316
 
318
317
  /**
@@ -305,14 +305,13 @@ ion-backdrop {
305
305
  left: 0;
306
306
  right: 0;
307
307
  width: auto;
308
- /* stylelint-disable declaration-no-important */
309
- transform: none !important;
310
- box-shadow: none !important;
308
+ transform: none;
309
+ box-shadow: none;
311
310
  }
312
311
 
313
312
  :host(.menu-pane-visible) ion-backdrop {
313
+ /* stylelint-disable-next-line declaration-no-important */
314
314
  display: hidden !important;
315
- /* stylelint-enable declaration-no-important */
316
315
  }
317
316
 
318
317
  /**
@@ -0,0 +1,61 @@
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
+ /**
7
+ * This behavior does not vary across directions.
8
+ */
9
+ configs({ directions: ['ltr'] }).forEach(({ title, config, screenshot }) => {
10
+ test.describe(title('menu: custom'), () => {
11
+ test('should allow styling the menu box shadow when inside a split pane', async ({ page }) => {
12
+ test.info().annotations.push({
13
+ type: 'issue',
14
+ description: 'https://github.com/ionic-team/ionic-framework/issues/21530',
15
+ });
16
+ await page.setContent(`
17
+ <style>
18
+ ion-split-pane {
19
+ --side-width: 200px;
20
+ --side-min-width: 200px;
21
+ }
22
+
23
+ ion-menu {
24
+ box-shadow: 10px 5px 5px red;
25
+ z-index: 1;
26
+ }
27
+ </style>
28
+
29
+ <ion-app>
30
+ <ion-split-pane when="xs" id="splitPane" content-id="split-content">
31
+ <ion-menu side="start" content-id="split-content">
32
+ <ion-header>
33
+ <ion-toolbar color="secondary">
34
+ <ion-title>Menu</ion-title>
35
+ </ion-toolbar>
36
+ </ion-header>
37
+
38
+ <ion-content class="ion-padding">Menu Content</ion-content>
39
+ </ion-menu>
40
+
41
+ <div class="ion-page" id="split-content">
42
+ <ion-header>
43
+ <ion-toolbar>
44
+ <ion-buttons slot="start">
45
+ <ion-menu-button></ion-menu-button>
46
+ </ion-buttons>
47
+
48
+ <ion-title>Content</ion-title>
49
+ </ion-toolbar>
50
+ </ion-header>
51
+
52
+ <ion-content class="ion-padding">Main Content</ion-content>
53
+ </div>
54
+ </ion-split-pane>
55
+ </ion-app>
56
+ `, config);
57
+ const app = page.locator('ion-app');
58
+ await expect(app).toHaveScreenshot(screenshot(`menu-custom-split-pane`));
59
+ });
60
+ });
61
+ });
@@ -146,8 +146,7 @@
146
146
  top: 0;
147
147
  bottom: 0;
148
148
  position: relative;
149
- /* stylelint-disable-next-line declaration-no-important */
150
- box-shadow: none !important;
149
+ box-shadow: none;
151
150
  z-index: 0;
152
151
  }
153
152
 
@@ -146,8 +146,7 @@
146
146
  top: 0;
147
147
  bottom: 0;
148
148
  position: relative;
149
- /* stylelint-disable-next-line declaration-no-important */
150
- box-shadow: none !important;
149
+ box-shadow: none;
151
150
  z-index: 0;
152
151
  }
153
152