@ionic/core 7.5.7-dev.11701203423.1b6a8829 → 7.5.7-dev.11701270755.14f050ad

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 (333) hide show
  1. package/components/backdrop.js +0 -12
  2. package/components/data.js +1 -1
  3. package/components/gesture-controller.js +1 -1
  4. package/components/icon.js +23 -14
  5. package/components/index7.js +1 -1
  6. package/components/ion-content.js +1 -1
  7. package/components/ion-datetime.js +28 -61
  8. package/components/ion-picker-column-option.d.ts +11 -0
  9. package/components/ion-picker-column-option.js +52 -0
  10. package/components/ion-picker-column.js +2 -2
  11. package/components/ion-picker-legacy-column.d.ts +11 -0
  12. package/components/ion-picker-legacy-column.js +9 -0
  13. package/components/{ion-picker-internal.d.ts → ion-picker-legacy.d.ts} +4 -4
  14. package/components/ion-picker-legacy.js +309 -0
  15. package/components/ion-picker.js +1 -299
  16. package/components/overlays.js +11 -4
  17. package/components/picker-column.js +331 -320
  18. package/components/picker-column2.js +379 -0
  19. package/components/{picker-internal.js → picker.js} +16 -16
  20. package/dist/cjs/{button-active-af897e0e.js → button-active-cd07b55b.js} +1 -1
  21. package/dist/cjs/{data-c8d21093.js → data-4845b494.js} +1 -1
  22. package/dist/cjs/{gesture-controller-b46721be.js → gesture-controller-d6a3f907.js} +1 -0
  23. package/dist/cjs/{index-5ea49600.js → index-09471526.js} +1 -1
  24. package/dist/cjs/{index-0ee995e4.js → index-0f8b33f8.js} +1 -1
  25. package/dist/cjs/index.cjs.js +3 -3
  26. package/dist/cjs/ion-accordion_2.cjs.entry.js +1 -1
  27. package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
  28. package/dist/cjs/ion-alert.cjs.entry.js +4 -4
  29. package/dist/cjs/ion-app_8.cjs.entry.js +2 -2
  30. package/dist/cjs/ion-back-button.cjs.entry.js +1 -1
  31. package/dist/cjs/ion-backdrop.cjs.entry.js +0 -12
  32. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +1 -1
  33. package/dist/cjs/ion-button_2.cjs.entry.js +23 -14
  34. package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
  35. package/dist/cjs/ion-datetime_3.cjs.entry.js +27 -40
  36. package/dist/cjs/ion-fab_3.cjs.entry.js +1 -1
  37. package/dist/cjs/ion-input.cjs.entry.js +1 -1
  38. package/dist/cjs/ion-item-option_3.cjs.entry.js +1 -1
  39. package/dist/cjs/ion-item_8.cjs.entry.js +1 -1
  40. package/dist/cjs/ion-loading.cjs.entry.js +2 -1
  41. package/dist/cjs/ion-menu_3.cjs.entry.js +4 -4
  42. package/dist/cjs/ion-modal.cjs.entry.js +3 -3
  43. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  44. package/dist/cjs/ion-picker-column-option.cjs.entry.js +35 -0
  45. package/dist/cjs/{ion-picker-column-internal.cjs.entry.js → ion-picker-column.cjs.entry.js} +9 -9
  46. package/dist/cjs/{ion-picker-internal.cjs.entry.js → ion-picker.cjs.entry.js} +13 -13
  47. package/dist/cjs/ion-popover.cjs.entry.js +2 -1
  48. package/dist/cjs/ion-range.cjs.entry.js +1 -1
  49. package/dist/cjs/ion-refresher_2.cjs.entry.js +4 -4
  50. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  51. package/dist/cjs/ion-searchbar.cjs.entry.js +1 -1
  52. package/dist/cjs/ion-segment_2.cjs.entry.js +1 -1
  53. package/dist/cjs/ion-select_3.cjs.entry.js +3 -2
  54. package/dist/cjs/ion-toast.cjs.entry.js +2 -1
  55. package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
  56. package/dist/cjs/ionic.cjs.js +1 -1
  57. package/dist/cjs/loader.cjs.js +1 -1
  58. package/dist/cjs/{overlays-2ffc5f27.js → overlays-dbb71984.js} +11 -4
  59. package/dist/cjs/{swipe-back-d0412fb6.js → swipe-back-a6dc6e5d.js} +2 -2
  60. package/dist/collection/collection-manifest.json +7 -6
  61. package/dist/collection/components/backdrop/backdrop.js +0 -12
  62. package/dist/collection/components/content/content.css +0 -4
  63. package/dist/collection/components/datetime/datetime.ios.css +84 -25
  64. package/dist/collection/components/datetime/datetime.js +14 -29
  65. package/dist/collection/components/datetime/datetime.md.css +89 -25
  66. package/dist/collection/components/datetime/test/a11y/datetime.e2e.js +1 -1
  67. package/dist/collection/components/datetime/test/a11y/datetime.spec.js +6 -9
  68. package/dist/collection/components/datetime/test/basic/datetime.e2e.js +10 -0
  69. package/dist/collection/components/datetime/test/disabled/datetime.spec.js +4 -4
  70. package/dist/collection/components/datetime/test/minmax/datetime.e2e.js +5 -5
  71. package/dist/collection/components/datetime/test/month-year-picker/datetime.e2e.js +1 -1
  72. package/dist/collection/components/datetime/test/prefer-wheel/datetime.e2e.js +2 -2
  73. package/dist/collection/components/datetime/test/presentation/datetime.e2e.js +1 -1
  74. package/dist/collection/components/datetime/test/readonly/datetime.e2e.js +2 -2
  75. package/dist/collection/components/datetime/test/values/datetime.e2e.js +5 -5
  76. package/dist/collection/components/datetime/utils/data.js +1 -1
  77. package/dist/collection/components/picker/picker.ios.css +100 -205
  78. package/dist/collection/components/picker/picker.js +463 -735
  79. package/dist/collection/components/picker/picker.md.css +98 -194
  80. package/dist/collection/components/{picker-internal/test/a11y/picker-internal.e2e.js → picker/test/a11y/picker.e2e.js} +2 -2
  81. package/dist/collection/components/picker/test/basic/picker.e2e.js +106 -13
  82. package/dist/collection/components/{picker-internal/test/keyboard-entry/picker-internal.e2e.js → picker/test/keyboard-entry/picker.e2e.js} +20 -20
  83. package/dist/collection/components/picker-column/picker-column.ios.css +59 -176
  84. package/dist/collection/components/picker-column/picker-column.js +478 -333
  85. package/dist/collection/components/picker-column/picker-column.md.css +63 -113
  86. package/dist/collection/components/{picker-column-internal/test/basic/picker-column-internal.e2e.js → picker-column/test/basic/picker-column.e2e.js} +7 -7
  87. package/dist/collection/components/{picker-column-internal/test/disabled/picker-column-internal.e2e.js → picker-column/test/disabled/picker-column.e2e.js} +39 -39
  88. package/dist/collection/components/picker-column-option/picker-column-option.js +68 -0
  89. package/dist/collection/components/picker-column-option/test/a11y/picker-column-option.e2e.js +18 -0
  90. package/dist/collection/components/picker-legacy/picker.ios.css +367 -0
  91. package/dist/collection/components/picker-legacy/picker.js +817 -0
  92. package/dist/collection/components/{picker-internal/picker-internal.ios.css → picker-legacy/picker.md.css} +192 -100
  93. package/dist/collection/components/picker-legacy/test/basic/picker.e2e.js +25 -0
  94. package/dist/collection/components/{picker → picker-legacy}/test/is-open/picker.e2e.js +4 -4
  95. package/dist/collection/components/{picker → picker-legacy}/test/picker-id.spec.js +5 -5
  96. package/dist/collection/components/{picker → picker-legacy}/test/trigger/picker.e2e.js +1 -1
  97. package/dist/collection/components/{picker-internal/picker-internal.md.css → picker-legacy-column/picker-column.ios.css} +98 -101
  98. package/dist/collection/components/picker-legacy-column/picker-column.js +419 -0
  99. package/dist/collection/components/{picker-column-internal/picker-column-internal.md.css → picker-legacy-column/picker-column.md.css} +113 -63
  100. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column-aria.spec.js +3 -3
  101. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column-dynamic.spec.js +2 -2
  102. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column.spec.js +2 -2
  103. package/dist/collection/components/{picker-column → picker-legacy-column}/test/standalone/picker-column.e2e.js +3 -3
  104. package/dist/collection/utils/gesture/gesture-controller.js +1 -1
  105. package/dist/collection/utils/overlays.js +11 -4
  106. package/dist/collection/utils/test/overlays/overlays-scroll-blocking.spec.js +65 -0
  107. package/dist/docs.json +384 -40
  108. package/dist/esm/{button-active-ce5cba4c.js → button-active-5b0516e7.js} +1 -1
  109. package/dist/esm/{data-44d9e816.js → data-12e24f00.js} +1 -1
  110. package/dist/esm/{gesture-controller-0fa396c4.js → gesture-controller-3723db7c.js} +1 -1
  111. package/dist/esm/{index-ff313b19.js → index-32cbee52.js} +2 -2
  112. package/dist/esm/{index-d1a56aed.js → index-c132c5f1.js} +1 -1
  113. package/dist/esm/index.js +3 -3
  114. package/dist/esm/ion-accordion_2.entry.js +1 -1
  115. package/dist/esm/ion-action-sheet.entry.js +4 -4
  116. package/dist/esm/ion-alert.entry.js +4 -4
  117. package/dist/esm/ion-app_8.entry.js +2 -2
  118. package/dist/esm/ion-back-button.entry.js +1 -1
  119. package/dist/esm/ion-backdrop.entry.js +0 -12
  120. package/dist/esm/ion-breadcrumb_2.entry.js +1 -1
  121. package/dist/esm/ion-button_2.entry.js +23 -14
  122. package/dist/esm/ion-datetime-button.entry.js +1 -1
  123. package/dist/esm/ion-datetime_3.entry.js +26 -39
  124. package/dist/esm/ion-fab_3.entry.js +1 -1
  125. package/dist/esm/ion-input.entry.js +1 -1
  126. package/dist/esm/ion-item-option_3.entry.js +1 -1
  127. package/dist/esm/ion-item_8.entry.js +1 -1
  128. package/dist/esm/ion-loading.entry.js +2 -1
  129. package/dist/esm/ion-menu_3.entry.js +4 -4
  130. package/dist/esm/ion-modal.entry.js +3 -3
  131. package/dist/esm/ion-nav_2.entry.js +1 -1
  132. package/dist/esm/ion-picker-column-option.entry.js +31 -0
  133. package/dist/esm/{ion-picker-column-internal.entry.js → ion-picker-column.entry.js} +9 -9
  134. package/dist/esm/{ion-picker-internal.entry.js → ion-picker.entry.js} +13 -13
  135. package/dist/esm/ion-popover.entry.js +2 -1
  136. package/dist/esm/ion-range.entry.js +1 -1
  137. package/dist/esm/ion-refresher_2.entry.js +4 -4
  138. package/dist/esm/ion-reorder_2.entry.js +2 -2
  139. package/dist/esm/ion-searchbar.entry.js +1 -1
  140. package/dist/esm/ion-segment_2.entry.js +1 -1
  141. package/dist/esm/ion-select_3.entry.js +3 -2
  142. package/dist/esm/ion-toast.entry.js +2 -1
  143. package/dist/esm/ion-toggle.entry.js +2 -2
  144. package/dist/esm/ionic.js +1 -1
  145. package/dist/esm/loader.js +1 -1
  146. package/dist/esm/{overlays-6c9feb7e.js → overlays-789cd7a7.js} +11 -4
  147. package/dist/esm/{swipe-back-0f3bfc8e.js → swipe-back-cc4c2bcb.js} +2 -2
  148. package/dist/esm-es5/{button-active-ce5cba4c.js → button-active-5b0516e7.js} +1 -1
  149. package/dist/esm-es5/{gesture-controller-0fa396c4.js → gesture-controller-3723db7c.js} +1 -1
  150. package/dist/esm-es5/{index-ff313b19.js → index-32cbee52.js} +1 -1
  151. package/dist/esm-es5/index.js +1 -1
  152. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  153. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  154. package/dist/esm-es5/ion-alert.entry.js +1 -1
  155. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  156. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  157. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  158. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  159. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  160. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  161. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  162. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  163. package/dist/esm-es5/ion-input.entry.js +1 -1
  164. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  165. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  166. package/dist/esm-es5/ion-loading.entry.js +1 -1
  167. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  168. package/dist/esm-es5/ion-modal.entry.js +1 -1
  169. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  170. package/dist/esm-es5/ion-picker-column-option.entry.js +4 -0
  171. package/dist/esm-es5/ion-picker-column.entry.js +4 -0
  172. package/dist/esm-es5/ion-picker.entry.js +4 -0
  173. package/dist/esm-es5/ion-popover.entry.js +1 -1
  174. package/dist/esm-es5/ion-range.entry.js +1 -1
  175. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  176. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  177. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  178. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  179. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  180. package/dist/esm-es5/ion-toast.entry.js +1 -1
  181. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  182. package/dist/esm-es5/ionic.js +1 -1
  183. package/dist/esm-es5/loader.js +1 -1
  184. package/dist/esm-es5/overlays-789cd7a7.js +4 -0
  185. package/dist/esm-es5/swipe-back-cc4c2bcb.js +4 -0
  186. package/dist/html.html-data.json +119 -1
  187. package/dist/ionic/index.esm.js +1 -1
  188. package/dist/ionic/ionic.esm.js +1 -1
  189. package/dist/ionic/{p-67e644bd.system.entry.js → p-02d8fdba.system.entry.js} +1 -1
  190. package/dist/ionic/{p-f3c82f74.system.entry.js → p-06e6d235.system.entry.js} +2 -2
  191. package/dist/ionic/{p-c429a314.system.entry.js → p-07d9e9cd.system.entry.js} +1 -1
  192. package/dist/ionic/p-0c244faf.entry.js +4 -0
  193. package/dist/ionic/{p-e0b06b65.js → p-100ef961.js} +1 -1
  194. package/dist/ionic/{p-04dca48d.entry.js → p-14aca3fb.entry.js} +1 -1
  195. package/dist/ionic/p-1dc91702.entry.js +4 -0
  196. package/dist/ionic/{p-a43603ce.entry.js → p-1e86a71b.entry.js} +1 -1
  197. package/dist/ionic/{p-dbf7d6e5.system.entry.js → p-22813b28.system.entry.js} +1 -1
  198. package/dist/ionic/p-234b9617.system.entry.js +4 -0
  199. package/dist/ionic/p-25c34422.system.entry.js +4 -0
  200. package/dist/ionic/p-2804781b.entry.js +4 -0
  201. package/dist/ionic/p-2ad38423.system.entry.js +4 -0
  202. package/dist/ionic/{p-7176cea3.entry.js → p-2ba9414e.entry.js} +1 -1
  203. package/dist/ionic/{p-fa8d4788.system.js → p-2e1794df.system.js} +1 -1
  204. package/dist/ionic/{p-e627ed84.js → p-302091ab.js} +1 -1
  205. package/dist/ionic/p-332f64af.system.entry.js +4 -0
  206. package/dist/ionic/p-39074595.entry.js +4 -0
  207. package/dist/ionic/{p-67ed452a.system.entry.js → p-3f88eab8.system.entry.js} +1 -1
  208. package/dist/ionic/{p-8659f9a9.system.entry.js → p-3fb57e1b.system.entry.js} +1 -1
  209. package/dist/ionic/p-40903d34.system.js +1 -1
  210. package/dist/ionic/p-439e20ef.entry.js +4 -0
  211. package/dist/ionic/{p-8d5a30dd.entry.js → p-477a182e.entry.js} +1 -1
  212. package/dist/ionic/{p-899fb2da.entry.js → p-48d9faa7.entry.js} +1 -1
  213. package/dist/ionic/{p-7d7fdaf0.system.entry.js → p-4f3e2767.system.entry.js} +1 -1
  214. package/dist/ionic/{p-3de79805.entry.js → p-56224549.entry.js} +1 -1
  215. package/dist/ionic/{p-965677f1.entry.js → p-5ce11143.entry.js} +1 -1
  216. package/dist/ionic/{p-6594d76a.system.entry.js → p-5da0eb3e.system.entry.js} +1 -1
  217. package/dist/ionic/{p-9e852ff1.system.js → p-6500b298.system.js} +1 -1
  218. package/dist/ionic/{p-42435018.system.entry.js → p-664d2b07.system.entry.js} +1 -1
  219. package/dist/ionic/p-6893f6e4.entry.js +4 -0
  220. package/dist/ionic/p-7c66a566.system.entry.js +4 -0
  221. package/dist/ionic/{p-68166ba6.entry.js → p-835e0346.entry.js} +1 -1
  222. package/dist/ionic/{p-7b4cd5fc.system.entry.js → p-878c7aa5.system.entry.js} +1 -1
  223. package/dist/ionic/p-8b4ab236.entry.js +4 -0
  224. package/dist/ionic/{p-f37b4b79.entry.js → p-939d903b.entry.js} +1 -1
  225. package/dist/ionic/p-9403b297.system.entry.js +4 -0
  226. package/dist/ionic/{p-6d812360.system.entry.js → p-966cf574.system.entry.js} +1 -1
  227. package/dist/ionic/p-992d3bad.entry.js +4 -0
  228. package/dist/ionic/{p-1cb5f2f8.system.entry.js → p-9b5301cc.system.entry.js} +1 -1
  229. package/dist/ionic/p-9c967a65.system.entry.js +4 -0
  230. package/dist/ionic/{p-8e1bded3.entry.js → p-9e6bf9ed.entry.js} +1 -1
  231. package/dist/ionic/{p-8cbf0979.entry.js → p-a21b8d05.entry.js} +1 -1
  232. package/dist/ionic/{p-6e23777e.system.entry.js → p-a4cda7a8.system.entry.js} +1 -1
  233. package/dist/ionic/{p-09d142b3.system.js → p-a57f223c.system.js} +1 -1
  234. package/dist/ionic/{p-8b1be026.js → p-a7e2ac5c.js} +1 -1
  235. package/dist/ionic/{p-0838e6bb.entry.js → p-a8e68fd9.entry.js} +1 -1
  236. package/dist/ionic/{p-14923cd7.system.entry.js → p-abacb44b.system.entry.js} +1 -1
  237. package/dist/ionic/{p-61c30156.system.entry.js → p-b3e79338.system.entry.js} +1 -1
  238. package/dist/ionic/p-b4cbb736.js +4 -0
  239. package/dist/ionic/{p-4fa201a7.entry.js → p-b6a8588f.entry.js} +1 -1
  240. package/dist/ionic/{p-ee2469c1.entry.js → p-b6f8ee31.entry.js} +1 -1
  241. package/dist/ionic/p-ba70d455.entry.js +4 -0
  242. package/dist/ionic/{p-8ad82eb3.entry.js → p-baa7cb1e.entry.js} +1 -1
  243. package/dist/ionic/p-bd7a3269.entry.js +4 -0
  244. package/dist/ionic/{p-bd76524d.entry.js → p-c1229981.entry.js} +1 -1
  245. package/dist/ionic/{p-db5043df.system.entry.js → p-c31fc05f.system.entry.js} +1 -1
  246. package/dist/ionic/p-c32bf078.system.entry.js +4 -0
  247. package/dist/ionic/{p-a936d224.system.js → p-c7fd81ba.system.js} +1 -1
  248. package/dist/ionic/{p-4c80afe1.system.entry.js → p-cb62e3fc.system.entry.js} +1 -1
  249. package/dist/ionic/{p-cd2808f5.system.entry.js → p-d21bfe66.system.entry.js} +1 -1
  250. package/dist/ionic/{p-4d786d1f.system.entry.js → p-d3952bd5.system.entry.js} +1 -1
  251. package/dist/ionic/p-dc565ca3.js +4 -0
  252. package/dist/ionic/{p-deab76dc.entry.js → p-dd837fa8.entry.js} +1 -1
  253. package/dist/ionic/p-e88ed07f.system.js +4 -0
  254. package/dist/ionic/p-eb07ec1a.system.entry.js +4 -0
  255. package/dist/ionic/p-eb5697b5.system.js +4 -0
  256. package/dist/ionic/{p-52360c7a.entry.js → p-ee800093.entry.js} +1 -1
  257. package/dist/ionic/p-f0559c5d.system.entry.js +4 -0
  258. package/dist/ionic/{p-97a96f5f.entry.js → p-f4cc91f6.entry.js} +1 -1
  259. package/dist/ionic/{p-640efee6.system.entry.js → p-f5a750e4.system.entry.js} +1 -1
  260. package/dist/ionic/p-fdd22426.entry.js +4 -0
  261. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +0 -1
  262. package/dist/types/components/backdrop/backdrop.d.ts +0 -3
  263. package/dist/types/components/datetime/datetime.d.ts +0 -1
  264. package/dist/types/components/datetime/utils/data.d.ts +2 -2
  265. package/dist/types/components/menu/menu.d.ts +1 -1
  266. package/dist/types/components/picker/picker-interfaces.d.ts +8 -0
  267. package/dist/types/components/picker/picker.d.ts +74 -131
  268. package/dist/types/components/picker-column/picker-column.d.ts +94 -39
  269. package/dist/types/components/picker-column-option/picker-column-option.d.ts +16 -0
  270. package/dist/types/components/picker-legacy/picker.d.ts +158 -0
  271. package/dist/types/components/picker-legacy-column/picker-column.d.ts +46 -0
  272. package/dist/types/components.d.ts +151 -122
  273. package/dist/types/interface.d.ts +1 -1
  274. package/dist/types/utils/config.d.ts +2 -2
  275. package/dist/types/utils/gesture/gesture-controller.d.ts +1 -0
  276. package/dist/types/utils/overlays.d.ts +5 -2
  277. package/hydrate/index.js +1451 -1432
  278. package/package.json +2 -2
  279. package/components/ion-picker-column-internal.d.ts +0 -11
  280. package/components/ion-picker-column-internal.js +0 -9
  281. package/components/ion-picker-internal.js +0 -9
  282. package/components/picker-column-internal.js +0 -390
  283. package/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +0 -138
  284. package/dist/collection/components/picker-column-internal/picker-column-internal.js +0 -565
  285. package/dist/collection/components/picker-internal/picker-internal.js +0 -544
  286. package/dist/collection/components/picker-internal/test/basic/picker-internal.e2e.js +0 -118
  287. package/dist/esm-es5/ion-picker-column-internal.entry.js +0 -4
  288. package/dist/esm-es5/ion-picker-internal.entry.js +0 -4
  289. package/dist/esm-es5/overlays-6c9feb7e.js +0 -4
  290. package/dist/esm-es5/swipe-back-0f3bfc8e.js +0 -4
  291. package/dist/ionic/p-0d8e9393.entry.js +0 -4
  292. package/dist/ionic/p-18e01b30.system.entry.js +0 -4
  293. package/dist/ionic/p-19a7c660.system.entry.js +0 -4
  294. package/dist/ionic/p-1e5165db.system.entry.js +0 -4
  295. package/dist/ionic/p-29adc040.entry.js +0 -4
  296. package/dist/ionic/p-29fe18ef.entry.js +0 -4
  297. package/dist/ionic/p-431151f2.entry.js +0 -4
  298. package/dist/ionic/p-5bd4e009.entry.js +0 -4
  299. package/dist/ionic/p-64296b15.entry.js +0 -4
  300. package/dist/ionic/p-800ef057.js +0 -4
  301. package/dist/ionic/p-86b2394a.entry.js +0 -4
  302. package/dist/ionic/p-8dbdb163.system.js +0 -4
  303. package/dist/ionic/p-97e31c0a.system.js +0 -4
  304. package/dist/ionic/p-a9c3699b.system.entry.js +0 -4
  305. package/dist/ionic/p-b91fe549.entry.js +0 -4
  306. package/dist/ionic/p-beb64be7.system.entry.js +0 -4
  307. package/dist/ionic/p-c56b6570.system.entry.js +0 -4
  308. package/dist/ionic/p-c6be7737.system.entry.js +0 -4
  309. package/dist/ionic/p-c919498d.entry.js +0 -4
  310. package/dist/ionic/p-cf425ec5.system.entry.js +0 -4
  311. package/dist/ionic/p-ddfc4ef4.system.entry.js +0 -4
  312. package/dist/ionic/p-e6b240a0.js +0 -4
  313. package/dist/ionic/p-f54ddd19.entry.js +0 -4
  314. package/dist/types/components/picker-column-internal/picker-column-internal.d.ts +0 -102
  315. package/dist/types/components/picker-internal/picker-internal-interfaces.d.ts +0 -8
  316. package/dist/types/components/picker-internal/picker-internal.d.ts +0 -102
  317. /package/dist/collection/components/{picker-internal/picker-internal-interfaces.js → picker/picker-interfaces.js} +0 -0
  318. /package/dist/collection/components/{picker-column-internal/picker-column-internal-interfaces.js → picker-column/picker-column-interfaces.js} +0 -0
  319. /package/dist/collection/components/{picker → picker-legacy}/animations/ios.enter.js +0 -0
  320. /package/dist/collection/components/{picker → picker-legacy}/animations/ios.leave.js +0 -0
  321. /package/dist/collection/components/{picker → picker-legacy}/picker-interface.js +0 -0
  322. /package/dist/collection/components/{picker-column → picker-legacy-column}/test/test.utils.js +0 -0
  323. /package/dist/esm-es5/{data-44d9e816.js → data-12e24f00.js} +0 -0
  324. /package/dist/esm-es5/{index-d1a56aed.js → index-c132c5f1.js} +0 -0
  325. /package/dist/ionic/{p-84c6dece.system.js → p-8050b9b9.system.js} +0 -0
  326. /package/dist/ionic/{p-17240d90.js → p-bb849ebb.js} +0 -0
  327. /package/dist/ionic/{p-b8c3f071.system.js → p-e4219e27.system.js} +0 -0
  328. /package/dist/ionic/{p-6e383534.js → p-ea96fa73.js} +0 -0
  329. /package/dist/types/components/{picker-column-internal/picker-column-internal-interfaces.d.ts → picker-column/picker-column-interfaces.d.ts} +0 -0
  330. /package/dist/types/components/{picker → picker-legacy}/animations/ios.enter.d.ts +0 -0
  331. /package/dist/types/components/{picker → picker-legacy}/animations/ios.leave.d.ts +0 -0
  332. /package/dist/types/components/{picker → picker-legacy}/picker-interface.d.ts +0 -0
  333. /package/dist/types/components/{picker-column → picker-legacy-column}/test/test.utils.d.ts +0 -0
package/hydrate/index.js CHANGED
@@ -6458,7 +6458,7 @@ const shallowEqualStringMap = (map1, map2) => {
6458
6458
  return true;
6459
6459
  };
6460
6460
 
6461
- /* Ionicons v7.1.3-dev.11699459714.11b7e8aa, ES Modules */
6461
+ /* Ionicons v7.2.1, ES Modules */
6462
6462
  const arrowBackSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='square' stroke-miterlimit='10' stroke-width='48' d='M244 400L100 256l144-144M120 256h292' class='ionicon-fill-none'/></svg>";
6463
6463
  const arrowDown = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 268l144 144 144-144M256 392V100' class='ionicon-fill-none'/></svg>";
6464
6464
  const caretBackSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M368 64L144 256l224 192V64z'/></svg>";
@@ -8336,7 +8336,7 @@ const focusLastDescendant = (ref, overlay) => {
8336
8336
  * Should NOT include: Toast
8337
8337
  */
8338
8338
  const trapKeyboardFocus = (ev, doc) => {
8339
- const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover');
8339
+ const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover');
8340
8340
  const target = ev.target;
8341
8341
  /**
8342
8342
  * If no active overlay, ignore this event.
@@ -8521,7 +8521,7 @@ const dismissOverlay = (doc, data, role, overlayTag, id) => {
8521
8521
  */
8522
8522
  const getOverlays = (doc, selector) => {
8523
8523
  if (selector === undefined) {
8524
- selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast';
8524
+ selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast';
8525
8525
  }
8526
8526
  return Array.from(doc.querySelectorAll(selector)).filter((c) => c.overlayIndex > 0);
8527
8527
  };
@@ -8587,6 +8587,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
8587
8587
  return;
8588
8588
  }
8589
8589
  setRootAriaHidden(true);
8590
+ document.body.classList.add(BACKDROP_NO_SCROLL);
8590
8591
  overlay.presented = true;
8591
8592
  overlay.willPresent.emit();
8592
8593
  (_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
@@ -8649,12 +8650,14 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
8649
8650
  if (!overlay.presented) {
8650
8651
  return false;
8651
8652
  }
8653
+ const lastOverlay = doc !== undefined && getPresentedOverlays(doc).length === 1;
8652
8654
  /**
8653
8655
  * If this is the last visible overlay then
8654
8656
  * we want to re-add the root to the accessibility tree.
8655
8657
  */
8656
- if (doc !== undefined && getPresentedOverlays(doc).length === 1) {
8658
+ if (lastOverlay) {
8657
8659
  setRootAriaHidden(false);
8660
+ document.body.classList.remove(BACKDROP_NO_SCROLL);
8658
8661
  }
8659
8662
  overlay.presented = false;
8660
8663
  try {
@@ -11150,21 +11153,10 @@ class Backdrop {
11150
11153
  constructor(hostRef) {
11151
11154
  registerInstance(this, hostRef);
11152
11155
  this.ionBackdropTap = createEvent(this, "ionBackdropTap", 7);
11153
- this.blocker = GESTURE_CONTROLLER.createBlocker({
11154
- disableScroll: true,
11155
- });
11156
11156
  this.visible = true;
11157
11157
  this.tappable = true;
11158
11158
  this.stopPropagation = true;
11159
11159
  }
11160
- connectedCallback() {
11161
- if (this.stopPropagation) {
11162
- this.blocker.block();
11163
- }
11164
- }
11165
- disconnectedCallback() {
11166
- this.blocker.unblock();
11167
- }
11168
11160
  onMouseDown(ev) {
11169
11161
  this.emitTap(ev);
11170
11162
  }
@@ -12615,7 +12607,7 @@ const isRTL$1 = (hostEl) => {
12615
12607
  return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl';
12616
12608
  };
12617
12609
 
12618
- const contentCss = "/*!@:host*/.sc-ion-content-h{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}/*!@:host(.ion-color) .inner-scroll*/.ion-color.sc-ion-content-h .inner-scroll.sc-ion-content{background:var(--ion-color-base);color:var(--ion-color-contrast)}/*!@:host(.outer-content)*/.outer-content.sc-ion-content-h{--background:var(--ion-color-step-50, #f2f2f2)}/*!@#background-content*/#background-content.sc-ion-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}/*!@.inner-scroll*/.inner-scroll.sc-ion-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}/*!@.scroll-y,\n.scroll-x*/.scroll-y.sc-ion-content,.scroll-x.sc-ion-content{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}/*!@.scroll-y*/.scroll-y.sc-ion-content{overflow-y:var(--overflow);overscroll-behavior-y:contain}/*!@.scroll-x*/.scroll-x.sc-ion-content{overflow-x:var(--overflow);overscroll-behavior-x:contain}/*!@.overscroll::before,\n.overscroll::after*/.overscroll.sc-ion-content::before,.overscroll.sc-ion-content::after{position:absolute;width:1px;height:1px;content:\"\"}/*!@.overscroll::before*/.overscroll.sc-ion-content::before{bottom:-1px}/*!@.overscroll::after*/.overscroll.sc-ion-content::after{top:-1px}/*!@:host(.content-sizing)*/.content-sizing.sc-ion-content-h{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}/*!@:host(.content-sizing) .inner-scroll*/.content-sizing.sc-ion-content-h .inner-scroll.sc-ion-content{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}/*!@.transition-effect*/.transition-effect.sc-ion-content{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}/*!@:host(.content-ltr) .transition-effect*/.content-ltr.sc-ion-content-h .transition-effect.sc-ion-content{left:-100%}/*!@:host(.content-rtl) .transition-effect*/.content-rtl.sc-ion-content-h .transition-effect.sc-ion-content{right:-100%}/*!@.transition-cover*/.transition-cover.sc-ion-content{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}/*!@.transition-shadow*/.transition-shadow.sc-ion-content{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}/*!@:host(.content-ltr) .transition-shadow*/.content-ltr.sc-ion-content-h .transition-shadow.sc-ion-content{right:0}/*!@:host(.content-rtl) .transition-shadow*/.content-rtl.sc-ion-content-h .transition-shadow.sc-ion-content{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}/*!@::slotted([slot=fixed])*/.sc-ion-content-s>[slot=fixed]{position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}";
12610
+ const contentCss = "/*!@:host*/.sc-ion-content-h{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}/*!@:host(.ion-color) .inner-scroll*/.ion-color.sc-ion-content-h .inner-scroll.sc-ion-content{background:var(--ion-color-base);color:var(--ion-color-contrast)}/*!@#background-content*/#background-content.sc-ion-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}/*!@.inner-scroll*/.inner-scroll.sc-ion-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}/*!@.scroll-y,\n.scroll-x*/.scroll-y.sc-ion-content,.scroll-x.sc-ion-content{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}/*!@.scroll-y*/.scroll-y.sc-ion-content{overflow-y:var(--overflow);overscroll-behavior-y:contain}/*!@.scroll-x*/.scroll-x.sc-ion-content{overflow-x:var(--overflow);overscroll-behavior-x:contain}/*!@.overscroll::before,\n.overscroll::after*/.overscroll.sc-ion-content::before,.overscroll.sc-ion-content::after{position:absolute;width:1px;height:1px;content:\"\"}/*!@.overscroll::before*/.overscroll.sc-ion-content::before{bottom:-1px}/*!@.overscroll::after*/.overscroll.sc-ion-content::after{top:-1px}/*!@:host(.content-sizing)*/.content-sizing.sc-ion-content-h{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}/*!@:host(.content-sizing) .inner-scroll*/.content-sizing.sc-ion-content-h .inner-scroll.sc-ion-content{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}/*!@.transition-effect*/.transition-effect.sc-ion-content{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}/*!@:host(.content-ltr) .transition-effect*/.content-ltr.sc-ion-content-h .transition-effect.sc-ion-content{left:-100%}/*!@:host(.content-rtl) .transition-effect*/.content-rtl.sc-ion-content-h .transition-effect.sc-ion-content{right:-100%}/*!@.transition-cover*/.transition-cover.sc-ion-content{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}/*!@.transition-shadow*/.transition-shadow.sc-ion-content{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}/*!@:host(.content-ltr) .transition-shadow*/.content-ltr.sc-ion-content-h .transition-shadow.sc-ion-content{right:0}/*!@:host(.content-rtl) .transition-shadow*/.content-rtl.sc-ion-content-h .transition-shadow.sc-ion-content{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}/*!@::slotted([slot=fixed])*/.sc-ion-content-s>[slot=fixed]{position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}";
12619
12611
 
12620
12612
  /**
12621
12613
  * @slot - Content is placed in the scrollable area if provided without a slot.
@@ -14487,7 +14479,7 @@ const getMonthColumnData = (locale, refParts, minParts, maxParts, monthValues, f
14487
14479
  * @param minParts The minimum bound on the date that can be returned
14488
14480
  * @param maxParts The maximum bound on the date that can be returned
14489
14481
  * @param dayValues The allowed date values
14490
- * @returns Date data to be used in ion-picker-column-internal
14482
+ * @returns Date data to be used in ion-picker-column
14491
14483
  */
14492
14484
  const getDayColumnData = (locale, refParts, minParts, maxParts, dayValues, formatOptions = {
14493
14485
  day: 'numeric',
@@ -14834,9 +14826,9 @@ const getHighlightStyles = (highlightedDates, dateIsoString, el) => {
14834
14826
  return undefined;
14835
14827
  };
14836
14828
 
14837
- const datetimeIosCss = "/*!@:host*/.sc-ion-datetime-ios-h{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}/*!@ion-picker-column-internal*/ion-picker-column-internal.sc-ion-datetime-ios{min-width:26px}/*!@:host(.datetime-size-fixed)*/.datetime-size-fixed.sc-ion-datetime-ios-h{width:auto;height:auto}/*!@:host(.datetime-size-fixed:not(.datetime-prefer-wheel))*/.datetime-size-fixed.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel){max-width:350px}/*!@:host(.datetime-size-fixed.datetime-prefer-wheel)*/.datetime-size-fixed.datetime-prefer-wheel.sc-ion-datetime-ios-h{min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}/*!@:host(.datetime-size-cover)*/.datetime-size-cover.sc-ion-datetime-ios-h{width:100%}/*!@:host .calendar-body,\n:host .datetime-year*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{opacity:0}/*!@:host(:not(.datetime-ready)) .datetime-year*/.sc-ion-datetime-ios-h:not(.datetime-ready) .datetime-year.sc-ion-datetime-ios{position:absolute;pointer-events:none}/*!@:host(.datetime-ready) .calendar-body*/.datetime-ready.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios{opacity:1}/*!@:host(.datetime-ready) .datetime-year*/.datetime-ready.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{display:none;opacity:1}/*!@:host .wheel-order-year-first .day-column*/.sc-ion-datetime-ios-h .wheel-order-year-first.sc-ion-datetime-ios .day-column.sc-ion-datetime-ios{-ms-flex-order:3;order:3;text-align:end}/*!@:host .wheel-order-year-first .month-column*/.sc-ion-datetime-ios-h .wheel-order-year-first.sc-ion-datetime-ios .month-column.sc-ion-datetime-ios{-ms-flex-order:2;order:2;text-align:end}/*!@:host .wheel-order-year-first .year-column*/.sc-ion-datetime-ios-h .wheel-order-year-first.sc-ion-datetime-ios .year-column.sc-ion-datetime-ios{-ms-flex-order:1;order:1;text-align:start}/*!@:host .datetime-calendar,\n:host .datetime-year*/.sc-ion-datetime-ios-h .datetime-calendar.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}/*!@:host(.show-month-and-year) .datetime-year*/.show-month-and-year.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{display:-ms-flexbox;display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){/*!@:host(.show-month-and-year) .calendar-next-prev,\n :host(.show-month-and-year) .calendar-days-of-week,\n :host(.show-month-and-year) .calendar-body,\n :host(.show-month-and-year) .datetime-time*/.show-month-and-year.sc-ion-datetime-ios-h .calendar-next-prev.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{position:absolute;visibility:hidden;pointer-events:none}/*!@@supports (inset-inline-start: 0)*/@supports .sc-ion-datetime-ios (inset-inline-start.sc-ion-datetime-ios: 0).sc-ion-datetime-ios{.sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h.show-month-and-year .datetime-time{inset-inline-start:-99999px}}/*!@@supports not (inset-inline-start: 0)*/@supports .sc-ion-datetime-ios not.sc-ion-datetime-ios (inset-inline-start.sc-ion-datetime-ios: 0).sc-ion-datetime-ios{.sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h.show-month-and-year .datetime-time{left:-99999px}.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .calendar-next-prev,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .calendar-days-of-week,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .calendar-body,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .calendar-body,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .datetime-time,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .datetime-time,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .datetime-time,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}@supports selector(:dir(rtl)){.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .calendar-next-prev,.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .calendar-days-of-week,.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .calendar-body,.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .datetime-time{left:unset;right:unset;right:-99999px}}}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){/*!@:host(.show-month-and-year) .calendar-next-prev,\n :host(.show-month-and-year) .calendar-days-of-week,\n :host(.show-month-and-year) .calendar-body,\n :host(.show-month-and-year) .datetime-time*/.show-month-and-year.sc-ion-datetime-ios-h .calendar-next-prev.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{display:none}}/*!@:host(.month-year-picker-open) .datetime-footer*/.month-year-picker-open.sc-ion-datetime-ios-h .datetime-footer.sc-ion-datetime-ios{display:none}/*!@:host(.datetime-disabled)*/.datetime-disabled.sc-ion-datetime-ios-h{pointer-events:none}/*!@:host(.datetime-disabled) .calendar-days-of-week,\n:host(.datetime-disabled) .datetime-time*/.datetime-disabled.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios,.datetime-disabled.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{opacity:0.4}/*!@:host(.datetime-readonly)*/.datetime-readonly.sc-ion-datetime-ios-h{pointer-events:none}/*!@:host(.datetime-readonly) .calendar-action-buttons,\n:host(.datetime-readonly) .calendar-body,\n:host(.datetime-readonly) .datetime-year*/.datetime-readonly.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios,.datetime-readonly.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.datetime-readonly.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{pointer-events:initial}/*!@:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),\n:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]*/.datetime-readonly.sc-ion-datetime-ios-h .calendar-day[disabled].sc-ion-datetime-ios:not(.calendar-day-constrained),.datetime-readonly.sc-ion-datetime-ios-h .datetime-action-buttons.sc-ion-datetime-ios ion-button[disabled].sc-ion-datetime-ios{opacity:1}/*!@:host .datetime-header .datetime-title*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios .datetime-title.sc-ion-datetime-ios{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}/*!@:host .datetime-action-buttons.has-clear-button*/.sc-ion-datetime-ios-h .datetime-action-buttons.has-clear-button.sc-ion-datetime-ios{width:100%}/*!@:host .datetime-action-buttons ion-buttons*/.sc-ion-datetime-ios-h .datetime-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@.datetime-action-buttons .datetime-action-buttons-container*/.datetime-action-buttons.sc-ion-datetime-ios .datetime-action-buttons-container.sc-ion-datetime-ios{display:-ms-flexbox;display:flex}/*!@:host .calendar-action-buttons*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@:host .calendar-action-buttons ion-item,\n:host .calendar-action-buttons ion-button*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-button.sc-ion-datetime-ios{--background:translucent}/*!@:host .calendar-action-buttons ion-item ion-label*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios ion-label.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}/*!@:host .calendar-action-buttons ion-item ion-icon*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios ion-icon.sc-ion-datetime-ios{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0}/*!@:host .calendar-days-of-week*/.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-ios .day-of-week.sc-ion-datetime-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}/*!@:host .calendar-body*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}/*!@:host .calendar-body .calendar-month*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}/*!@:host .calendar-body .calendar-month-disabled*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month-disabled.sc-ion-datetime-ios{scroll-snap-align:none}/*!@:host .calendar-body::-webkit-scrollbar*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios::-webkit-scrollbar{display:none}/*!@:host .calendar-body .calendar-month-grid*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month-grid.sc-ion-datetime-ios{display:grid;grid-template-columns:repeat(7, 1fr)}/*!@:host .calendar-day-wrapper*/.sc-ion-datetime-ios-h .calendar-day-wrapper.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-ios{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}/*!@:host .calendar-day[disabled]*/.sc-ion-datetime-ios-h .calendar-day[disabled].sc-ion-datetime-ios{pointer-events:none;opacity:0.4}/*!@.calendar-day:focus*/.calendar-day.sc-ion-datetime-ios:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}/*!@:host .datetime-time*/.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@:host(.datetime-presentation-time) .datetime-time*/.datetime-presentation-time.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}/*!@:host ion-popover*/.sc-ion-datetime-ios-h ion-popover.sc-ion-datetime-ios{--height:200px}/*!@:host .time-header*/.sc-ion-datetime-ios-h .time-header.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}/*!@:host .time-body*/.sc-ion-datetime-ios-h .time-body.sc-ion-datetime-ios{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}/*!@:host .time-body-active*/.sc-ion-datetime-ios-h .time-body-active.sc-ion-datetime-ios{color:var(--ion-color-base)}/*!@:host(.in-item)*/.in-item.sc-ion-datetime-ios-h{position:static}/*!@:host(.show-month-and-year) .calendar-action-buttons ion-item*/.show-month-and-year.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios{--color:var(--ion-color-base)}/*!@:host*/.sc-ion-datetime-ios-h{--background:var(--ion-color-light, #ffffff);--background-rgb:var(--ion-color-light-rgb);--title-color:var(--ion-color-step-600, #666666)}/*!@:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),\n:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),\n:host(.datetime-presentation-date:not(.datetime-prefer-wheel))*/.datetime-presentation-date-time.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel),.datetime-presentation-time-date.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel),.datetime-presentation-date.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel){min-height:350px}/*!@:host .datetime-header*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, #cccccc);font-size:min(0.875rem, 22.4px)}/*!@:host .datetime-header .datetime-title*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios .datetime-title.sc-ion-datetime-ios{color:var(--title-color)}/*!@:host .datetime-header .datetime-selected-date*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios .datetime-selected-date.sc-ion-datetime-ios{margin-top:10px}/*!@:host .calendar-action-buttons ion-item*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios{--padding-start:16px;--background-hover:transparent;--background-activated:transparent;font-size:min(1rem, 25.6px);font-weight:600}/*!@:host .calendar-action-buttons ion-item ion-icon,\n:host .calendar-action-buttons ion-buttons ion-button*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios ion-icon.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios ion-button.sc-ion-datetime-ios{color:var(--ion-color-base)}/*!@:host .calendar-action-buttons ion-buttons*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}/*!@:host .calendar-action-buttons ion-buttons ion-button*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios ion-button.sc-ion-datetime-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}/*!@:host .calendar-days-of-week*/.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, #b3b3b3);font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-ios .day-of-week.sc-ion-datetime-ios{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-ios{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-ios .day-of-week.sc-ion-datetime-ios{width:auto;height:auto;overflow:initial}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-ios{border-radius:32px}}/*!@:host .calendar-body .calendar-month .calendar-month-grid*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month.sc-ion-datetime-ios .calendar-month-grid.sc-ion-datetime-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}/*!@:host .calendar-day-wrapper*/.sc-ion-datetime-ios-h .calendar-day-wrapper.sc-ion-datetime-ios{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}/*!@:host .calendar-day*/.sc-ion-datetime-ios-h .calendar-day.sc-ion-datetime-ios{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}/*!@.calendar-day.calendar-day-active*/.calendar-day.calendar-day-active.sc-ion-datetime-ios{background:rgba(var(--ion-color-base-rgb), 0.2)}/*!@:host .calendar-day.calendar-day-today*/.sc-ion-datetime-ios-h .calendar-day.calendar-day-today.sc-ion-datetime-ios{color:var(--ion-color-base)}/*!@:host .calendar-day.calendar-day-active*/.sc-ion-datetime-ios-h .calendar-day.calendar-day-active.sc-ion-datetime-ios{color:var(--ion-color-base);font-weight:600}/*!@:host .calendar-day.calendar-day-today.calendar-day-active*/.sc-ion-datetime-ios-h .calendar-day.calendar-day-today.calendar-day-active.sc-ion-datetime-ios{color:var(--ion-color-contrast)}/*!@:host .datetime-time*/.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}/*!@:host .datetime-time .time-header*/.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios .time-header.sc-ion-datetime-ios{font-weight:600}/*!@:host .datetime-buttons*/.sc-ion-datetime-ios-h .datetime-buttons.sc-ion-datetime-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, #cccccc)}/*!@:host .datetime-buttons ::slotted(ion-buttons),\n:host .datetime-buttons ion-buttons*/.sc-ion-datetime-ios-h .datetime-buttons .sc-ion-datetime-ios-s>ion-buttons,.sc-ion-datetime-ios-h .datetime-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}/*!@:host .datetime-action-buttons*/.sc-ion-datetime-ios-h .datetime-action-buttons.sc-ion-datetime-ios{width:100%}";
14829
+ const datetimeIosCss = "/*!@:host*/.sc-ion-datetime-ios-h{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}/*!@ion-picker-column*/ion-picker-column.sc-ion-datetime-ios{min-width:26px}/*!@:host(.datetime-size-fixed)*/.datetime-size-fixed.sc-ion-datetime-ios-h{width:auto;height:auto}/*!@:host(.datetime-size-fixed:not(.datetime-prefer-wheel))*/.datetime-size-fixed.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel){max-width:350px}/*!@:host(.datetime-size-fixed.datetime-prefer-wheel)*/.datetime-size-fixed.datetime-prefer-wheel.sc-ion-datetime-ios-h{min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}/*!@:host(.datetime-size-cover)*/.datetime-size-cover.sc-ion-datetime-ios-h{width:100%}/*!@:host .calendar-body,\n:host .datetime-year*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{opacity:0}/*!@:host(:not(.datetime-ready)) .datetime-year*/.sc-ion-datetime-ios-h:not(.datetime-ready) .datetime-year.sc-ion-datetime-ios{position:absolute;pointer-events:none}/*!@:host(.datetime-ready) .calendar-body*/.datetime-ready.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios{opacity:1}/*!@:host(.datetime-ready) .datetime-year*/.datetime-ready.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{display:none;opacity:1}/*!@:host .wheel-order-year-first .day-column*/.sc-ion-datetime-ios-h .wheel-order-year-first.sc-ion-datetime-ios .day-column.sc-ion-datetime-ios{-ms-flex-order:3;order:3;text-align:end}/*!@:host .wheel-order-year-first .month-column*/.sc-ion-datetime-ios-h .wheel-order-year-first.sc-ion-datetime-ios .month-column.sc-ion-datetime-ios{-ms-flex-order:2;order:2;text-align:end}/*!@:host .wheel-order-year-first .year-column*/.sc-ion-datetime-ios-h .wheel-order-year-first.sc-ion-datetime-ios .year-column.sc-ion-datetime-ios{-ms-flex-order:1;order:1;text-align:start}/*!@:host .datetime-calendar,\n:host .datetime-year*/.sc-ion-datetime-ios-h .datetime-calendar.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}/*!@:host(.show-month-and-year) .datetime-year*/.show-month-and-year.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{display:-ms-flexbox;display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){/*!@:host(.show-month-and-year) .calendar-next-prev,\n :host(.show-month-and-year) .calendar-days-of-week,\n :host(.show-month-and-year) .calendar-body,\n :host(.show-month-and-year) .datetime-time*/.show-month-and-year.sc-ion-datetime-ios-h .calendar-next-prev.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{position:absolute;visibility:hidden;pointer-events:none}/*!@@supports (inset-inline-start: 0)*/@supports .sc-ion-datetime-ios (inset-inline-start.sc-ion-datetime-ios: 0).sc-ion-datetime-ios{.sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h.show-month-and-year .datetime-time{inset-inline-start:-99999px}}/*!@@supports not (inset-inline-start: 0)*/@supports .sc-ion-datetime-ios not.sc-ion-datetime-ios (inset-inline-start.sc-ion-datetime-ios: 0).sc-ion-datetime-ios{.sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h.show-month-and-year .datetime-time{left:-99999px}.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .calendar-next-prev,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .calendar-days-of-week,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .calendar-body,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .calendar-body,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .datetime-time,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .datetime-time,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .datetime-time,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}@supports selector(:dir(rtl)){.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .calendar-next-prev,.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .calendar-days-of-week,.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .calendar-body,.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .datetime-time{left:unset;right:unset;right:-99999px}}}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){/*!@:host(.show-month-and-year) .calendar-next-prev,\n :host(.show-month-and-year) .calendar-days-of-week,\n :host(.show-month-and-year) .calendar-body,\n :host(.show-month-and-year) .datetime-time*/.show-month-and-year.sc-ion-datetime-ios-h .calendar-next-prev.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{display:none}}/*!@:host(.month-year-picker-open) .datetime-footer*/.month-year-picker-open.sc-ion-datetime-ios-h .datetime-footer.sc-ion-datetime-ios{display:none}/*!@:host(.datetime-disabled)*/.datetime-disabled.sc-ion-datetime-ios-h{pointer-events:none}/*!@:host(.datetime-disabled) .calendar-days-of-week,\n:host(.datetime-disabled) .datetime-time*/.datetime-disabled.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios,.datetime-disabled.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{opacity:0.4}/*!@:host(.datetime-readonly)*/.datetime-readonly.sc-ion-datetime-ios-h{pointer-events:none}/*!@:host(.datetime-readonly) .calendar-action-buttons,\n:host(.datetime-readonly) .calendar-body,\n:host(.datetime-readonly) .datetime-year*/.datetime-readonly.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios,.datetime-readonly.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.datetime-readonly.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{pointer-events:initial}/*!@:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),\n:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]*/.datetime-readonly.sc-ion-datetime-ios-h .calendar-day[disabled].sc-ion-datetime-ios:not(.calendar-day-constrained),.datetime-readonly.sc-ion-datetime-ios-h .datetime-action-buttons.sc-ion-datetime-ios ion-button[disabled].sc-ion-datetime-ios{opacity:1}/*!@:host .datetime-header .datetime-title*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios .datetime-title.sc-ion-datetime-ios{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}/*!@:host .datetime-action-buttons.has-clear-button*/.sc-ion-datetime-ios-h .datetime-action-buttons.has-clear-button.sc-ion-datetime-ios{width:100%}/*!@:host .datetime-action-buttons ion-buttons*/.sc-ion-datetime-ios-h .datetime-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@.datetime-action-buttons .datetime-action-buttons-container*/.datetime-action-buttons.sc-ion-datetime-ios .datetime-action-buttons-container.sc-ion-datetime-ios{display:-ms-flexbox;display:flex}/*!@:host .calendar-action-buttons*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@:host .calendar-action-buttons ion-button*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-button.sc-ion-datetime-ios{--background:transparent}/*!@:host .calendar-days-of-week*/.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-ios .day-of-week.sc-ion-datetime-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}/*!@:host .calendar-body*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}/*!@:host .calendar-body .calendar-month*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}/*!@:host .calendar-body .calendar-month-disabled*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month-disabled.sc-ion-datetime-ios{scroll-snap-align:none}/*!@:host .calendar-body::-webkit-scrollbar*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios::-webkit-scrollbar{display:none}/*!@:host .calendar-body .calendar-month-grid*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month-grid.sc-ion-datetime-ios{display:grid;grid-template-columns:repeat(7, 1fr)}/*!@:host .calendar-day-wrapper*/.sc-ion-datetime-ios-h .calendar-day-wrapper.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-ios{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}/*!@:host .calendar-day[disabled]*/.sc-ion-datetime-ios-h .calendar-day[disabled].sc-ion-datetime-ios{pointer-events:none;opacity:0.4}/*!@.calendar-day:focus*/.calendar-day.sc-ion-datetime-ios:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}/*!@:host .datetime-time*/.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@:host(.datetime-presentation-time) .datetime-time*/.datetime-presentation-time.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}/*!@:host ion-popover*/.sc-ion-datetime-ios-h ion-popover.sc-ion-datetime-ios{--height:200px}/*!@:host .time-header*/.sc-ion-datetime-ios-h .time-header.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}/*!@:host .time-body*/.sc-ion-datetime-ios-h .time-body.sc-ion-datetime-ios{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}/*!@:host .time-body-active*/.sc-ion-datetime-ios-h .time-body-active.sc-ion-datetime-ios{color:var(--ion-color-base)}/*!@:host(.in-item)*/.in-item.sc-ion-datetime-ios-h{position:static}/*!@:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle*/.show-month-and-year.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios .calendar-month-year-toggle.sc-ion-datetime-ios{color:var(--ion-color-base)}/*!@.calendar-month-year*/.calendar-month-year.sc-ion-datetime-ios{min-width:0}/*!@.calendar-month-year-toggle*/.calendar-month-year-toggle.sc-ion-datetime-ios{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}/*!@.calendar-month-year-toggle::after*/.calendar-month-year-toggle.sc-ion-datetime-ios::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}/*!@.calendar-month-year-toggle.ion-focused::after*/.calendar-month-year-toggle.ion-focused.sc-ion-datetime-ios::after{background:currentColor}/*!@.calendar-month-year-toggle:disabled*/.calendar-month-year-toggle.sc-ion-datetime-ios:disabled{opacity:0.3;pointer-events:none}/*!@.calendar-month-year-toggle ion-icon*/.calendar-month-year-toggle.sc-ion-datetime-ios ion-icon.sc-ion-datetime-ios{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}/*!@.calendar-month-year-toggle #toggle-wrapper*/.calendar-month-year-toggle.sc-ion-datetime-ios #toggle-wrapper.sc-ion-datetime-ios{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}/*!@:host*/.sc-ion-datetime-ios-h{--background:var(--ion-color-light, #ffffff);--background-rgb:var(--ion-color-light-rgb);--title-color:var(--ion-color-step-600, #666666)}/*!@:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),\n:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),\n:host(.datetime-presentation-date:not(.datetime-prefer-wheel))*/.datetime-presentation-date-time.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel),.datetime-presentation-time-date.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel),.datetime-presentation-date.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel){min-height:350px}/*!@:host .datetime-header*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, #cccccc);font-size:min(0.875rem, 22.4px)}/*!@:host .datetime-header .datetime-title*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios .datetime-title.sc-ion-datetime-ios{color:var(--title-color)}/*!@:host .datetime-header .datetime-selected-date*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios .datetime-selected-date.sc-ion-datetime-ios{margin-top:10px}/*!@.calendar-month-year-toggle*/.calendar-month-year-toggle.sc-ion-datetime-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-height:44px;font-size:min(1rem, 25.6px);font-weight:600}/*!@.calendar-month-year-toggle.ion-focused::after*/.calendar-month-year-toggle.ion-focused.sc-ion-datetime-ios::after{opacity:0.15}/*!@.calendar-month-year-toggle #toggle-wrapper*/.calendar-month-year-toggle.sc-ion-datetime-ios #toggle-wrapper.sc-ion-datetime-ios{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:10px}/*!@:host .calendar-action-buttons .calendar-month-year-toggle ion-icon,\n:host .calendar-action-buttons ion-buttons ion-button*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios .calendar-month-year-toggle.sc-ion-datetime-ios ion-icon.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios ion-button.sc-ion-datetime-ios{color:var(--ion-color-base)}/*!@:host .calendar-action-buttons ion-buttons*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}/*!@:host .calendar-action-buttons ion-buttons ion-button*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios ion-button.sc-ion-datetime-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}/*!@:host .calendar-days-of-week*/.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, #b3b3b3);font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-ios .day-of-week.sc-ion-datetime-ios{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-ios{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-ios .day-of-week.sc-ion-datetime-ios{width:auto;height:auto;overflow:initial}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-ios{border-radius:32px}}/*!@:host .calendar-body .calendar-month .calendar-month-grid*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month.sc-ion-datetime-ios .calendar-month-grid.sc-ion-datetime-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}/*!@:host .calendar-day-wrapper*/.sc-ion-datetime-ios-h .calendar-day-wrapper.sc-ion-datetime-ios{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}/*!@:host .calendar-day*/.sc-ion-datetime-ios-h .calendar-day.sc-ion-datetime-ios{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}/*!@.calendar-day.calendar-day-active*/.calendar-day.calendar-day-active.sc-ion-datetime-ios{background:rgba(var(--ion-color-base-rgb), 0.2)}/*!@:host .calendar-day.calendar-day-today*/.sc-ion-datetime-ios-h .calendar-day.calendar-day-today.sc-ion-datetime-ios{color:var(--ion-color-base)}/*!@:host .calendar-day.calendar-day-active*/.sc-ion-datetime-ios-h .calendar-day.calendar-day-active.sc-ion-datetime-ios{color:var(--ion-color-base);font-weight:600}/*!@:host .calendar-day.calendar-day-today.calendar-day-active*/.sc-ion-datetime-ios-h .calendar-day.calendar-day-today.calendar-day-active.sc-ion-datetime-ios{color:var(--ion-color-contrast)}/*!@:host .datetime-time*/.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}/*!@:host .datetime-time .time-header*/.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios .time-header.sc-ion-datetime-ios{font-weight:600}/*!@:host .datetime-buttons*/.sc-ion-datetime-ios-h .datetime-buttons.sc-ion-datetime-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, #cccccc)}/*!@:host .datetime-buttons ::slotted(ion-buttons),\n:host .datetime-buttons ion-buttons*/.sc-ion-datetime-ios-h .datetime-buttons .sc-ion-datetime-ios-s>ion-buttons,.sc-ion-datetime-ios-h .datetime-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}/*!@:host .datetime-action-buttons*/.sc-ion-datetime-ios-h .datetime-action-buttons.sc-ion-datetime-ios{width:100%}";
14838
14830
 
14839
- const datetimeMdCss = "/*!@:host*/.sc-ion-datetime-md-h{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}/*!@ion-picker-column-internal*/ion-picker-column-internal.sc-ion-datetime-md{min-width:26px}/*!@:host(.datetime-size-fixed)*/.datetime-size-fixed.sc-ion-datetime-md-h{width:auto;height:auto}/*!@:host(.datetime-size-fixed:not(.datetime-prefer-wheel))*/.datetime-size-fixed.sc-ion-datetime-md-h:not(.datetime-prefer-wheel){max-width:350px}/*!@:host(.datetime-size-fixed.datetime-prefer-wheel)*/.datetime-size-fixed.datetime-prefer-wheel.sc-ion-datetime-md-h{min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}/*!@:host(.datetime-size-cover)*/.datetime-size-cover.sc-ion-datetime-md-h{width:100%}/*!@:host .calendar-body,\n:host .datetime-year*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md,.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{opacity:0}/*!@:host(:not(.datetime-ready)) .datetime-year*/.sc-ion-datetime-md-h:not(.datetime-ready) .datetime-year.sc-ion-datetime-md{position:absolute;pointer-events:none}/*!@:host(.datetime-ready) .calendar-body*/.datetime-ready.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md{opacity:1}/*!@:host(.datetime-ready) .datetime-year*/.datetime-ready.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{display:none;opacity:1}/*!@:host .wheel-order-year-first .day-column*/.sc-ion-datetime-md-h .wheel-order-year-first.sc-ion-datetime-md .day-column.sc-ion-datetime-md{-ms-flex-order:3;order:3;text-align:end}/*!@:host .wheel-order-year-first .month-column*/.sc-ion-datetime-md-h .wheel-order-year-first.sc-ion-datetime-md .month-column.sc-ion-datetime-md{-ms-flex-order:2;order:2;text-align:end}/*!@:host .wheel-order-year-first .year-column*/.sc-ion-datetime-md-h .wheel-order-year-first.sc-ion-datetime-md .year-column.sc-ion-datetime-md{-ms-flex-order:1;order:1;text-align:start}/*!@:host .datetime-calendar,\n:host .datetime-year*/.sc-ion-datetime-md-h .datetime-calendar.sc-ion-datetime-md,.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}/*!@:host(.show-month-and-year) .datetime-year*/.show-month-and-year.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{display:-ms-flexbox;display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){/*!@:host(.show-month-and-year) .calendar-next-prev,\n :host(.show-month-and-year) .calendar-days-of-week,\n :host(.show-month-and-year) .calendar-body,\n :host(.show-month-and-year) .datetime-time*/.show-month-and-year.sc-ion-datetime-md-h .calendar-next-prev.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .calendar-days-of-week.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{position:absolute;visibility:hidden;pointer-events:none}/*!@@supports (inset-inline-start: 0)*/@supports .sc-ion-datetime-md (inset-inline-start.sc-ion-datetime-md: 0).sc-ion-datetime-md{.sc-ion-datetime-md-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-md-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-md-h.show-month-and-year .calendar-body,.sc-ion-datetime-md-h.show-month-and-year .datetime-time{inset-inline-start:-99999px}}/*!@@supports not (inset-inline-start: 0)*/@supports .sc-ion-datetime-md not.sc-ion-datetime-md (inset-inline-start.sc-ion-datetime-md: 0).sc-ion-datetime-md{.sc-ion-datetime-md-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-md-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-md-h.show-month-and-year .calendar-body,.sc-ion-datetime-md-h.show-month-and-year .datetime-time{left:-99999px}.sc-ion-datetime-md-h[dir=rtl].sc-ion-datetime-md-h.show-month-and-year .calendar-next-prev,[dir=rtl] .sc-ion-datetime-md-h.sc-ion-datetime-md-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-md-h[dir=rtl].show-month-and-year .calendar-next-prev,[dir=rtl] .sc-ion-datetime-md-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-md-h[dir=rtl].sc-ion-datetime-md-h.show-month-and-year .calendar-days-of-week,[dir=rtl] .sc-ion-datetime-md-h.sc-ion-datetime-md-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-md-h[dir=rtl].show-month-and-year .calendar-days-of-week,[dir=rtl] .sc-ion-datetime-md-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-md-h[dir=rtl].sc-ion-datetime-md-h.show-month-and-year .calendar-body,[dir=rtl] .sc-ion-datetime-md-h.sc-ion-datetime-md-h.show-month-and-year .calendar-body,.sc-ion-datetime-md-h[dir=rtl].show-month-and-year .calendar-body,[dir=rtl] .sc-ion-datetime-md-h.show-month-and-year .calendar-body,.sc-ion-datetime-md-h[dir=rtl].sc-ion-datetime-md-h.show-month-and-year .datetime-time,[dir=rtl] .sc-ion-datetime-md-h.sc-ion-datetime-md-h.show-month-and-year .datetime-time,.sc-ion-datetime-md-h[dir=rtl].show-month-and-year .datetime-time,[dir=rtl] .sc-ion-datetime-md-h.show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}@supports selector(:dir(rtl)){.sc-ion-datetime-md-h.show-month-and-year:dir(rtl) .calendar-next-prev,.sc-ion-datetime-md-h.show-month-and-year:dir(rtl) .calendar-days-of-week,.sc-ion-datetime-md-h.show-month-and-year:dir(rtl) .calendar-body,.sc-ion-datetime-md-h.show-month-and-year:dir(rtl) .datetime-time{left:unset;right:unset;right:-99999px}}}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){/*!@:host(.show-month-and-year) .calendar-next-prev,\n :host(.show-month-and-year) .calendar-days-of-week,\n :host(.show-month-and-year) .calendar-body,\n :host(.show-month-and-year) .datetime-time*/.show-month-and-year.sc-ion-datetime-md-h .calendar-next-prev.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .calendar-days-of-week.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{display:none}}/*!@:host(.month-year-picker-open) .datetime-footer*/.month-year-picker-open.sc-ion-datetime-md-h .datetime-footer.sc-ion-datetime-md{display:none}/*!@:host(.datetime-disabled)*/.datetime-disabled.sc-ion-datetime-md-h{pointer-events:none}/*!@:host(.datetime-disabled) .calendar-days-of-week,\n:host(.datetime-disabled) .datetime-time*/.datetime-disabled.sc-ion-datetime-md-h .calendar-days-of-week.sc-ion-datetime-md,.datetime-disabled.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{opacity:0.4}/*!@:host(.datetime-readonly)*/.datetime-readonly.sc-ion-datetime-md-h{pointer-events:none}/*!@:host(.datetime-readonly) .calendar-action-buttons,\n:host(.datetime-readonly) .calendar-body,\n:host(.datetime-readonly) .datetime-year*/.datetime-readonly.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md,.datetime-readonly.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md,.datetime-readonly.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{pointer-events:initial}/*!@:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),\n:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]*/.datetime-readonly.sc-ion-datetime-md-h .calendar-day[disabled].sc-ion-datetime-md:not(.calendar-day-constrained),.datetime-readonly.sc-ion-datetime-md-h .datetime-action-buttons.sc-ion-datetime-md ion-button[disabled].sc-ion-datetime-md{opacity:1}/*!@:host .datetime-header .datetime-title*/.sc-ion-datetime-md-h .datetime-header.sc-ion-datetime-md .datetime-title.sc-ion-datetime-md{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}/*!@:host .datetime-action-buttons.has-clear-button*/.sc-ion-datetime-md-h .datetime-action-buttons.has-clear-button.sc-ion-datetime-md{width:100%}/*!@:host .datetime-action-buttons ion-buttons*/.sc-ion-datetime-md-h .datetime-action-buttons.sc-ion-datetime-md ion-buttons.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@.datetime-action-buttons .datetime-action-buttons-container*/.datetime-action-buttons.sc-ion-datetime-md .datetime-action-buttons-container.sc-ion-datetime-md{display:-ms-flexbox;display:flex}/*!@:host .calendar-action-buttons*/.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@:host .calendar-action-buttons ion-item,\n:host .calendar-action-buttons ion-button*/.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md ion-item.sc-ion-datetime-md,.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md ion-button.sc-ion-datetime-md{--background:translucent}/*!@:host .calendar-action-buttons ion-item ion-label*/.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md ion-item.sc-ion-datetime-md ion-label.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}/*!@:host .calendar-action-buttons ion-item ion-icon*/.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md ion-item.sc-ion-datetime-md ion-icon.sc-ion-datetime-md{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0}/*!@:host .calendar-days-of-week*/.sc-ion-datetime-md-h .calendar-days-of-week.sc-ion-datetime-md{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-md .day-of-week.sc-ion-datetime-md{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}/*!@:host .calendar-body*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}/*!@:host .calendar-body .calendar-month*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md .calendar-month.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}/*!@:host .calendar-body .calendar-month-disabled*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md .calendar-month-disabled.sc-ion-datetime-md{scroll-snap-align:none}/*!@:host .calendar-body::-webkit-scrollbar*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md::-webkit-scrollbar{display:none}/*!@:host .calendar-body .calendar-month-grid*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md .calendar-month-grid.sc-ion-datetime-md{display:grid;grid-template-columns:repeat(7, 1fr)}/*!@:host .calendar-day-wrapper*/.sc-ion-datetime-md-h .calendar-day-wrapper.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-md{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}/*!@:host .calendar-day[disabled]*/.sc-ion-datetime-md-h .calendar-day[disabled].sc-ion-datetime-md{pointer-events:none;opacity:0.4}/*!@.calendar-day:focus*/.calendar-day.sc-ion-datetime-md:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}/*!@:host .datetime-time*/.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@:host(.datetime-presentation-time) .datetime-time*/.datetime-presentation-time.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}/*!@:host ion-popover*/.sc-ion-datetime-md-h ion-popover.sc-ion-datetime-md{--height:200px}/*!@:host .time-header*/.sc-ion-datetime-md-h .time-header.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}/*!@:host .time-body*/.sc-ion-datetime-md-h .time-body.sc-ion-datetime-md{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}/*!@:host .time-body-active*/.sc-ion-datetime-md-h .time-body-active.sc-ion-datetime-md{color:var(--ion-color-base)}/*!@:host(.in-item)*/.in-item.sc-ion-datetime-md-h{position:static}/*!@:host(.show-month-and-year) .calendar-action-buttons ion-item*/.show-month-and-year.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md ion-item.sc-ion-datetime-md{--color:var(--ion-color-base)}/*!@:host*/.sc-ion-datetime-md-h{--background:var(--ion-color-step-100, #ffffff);--title-color:var(--ion-color-contrast)}/*!@:host .datetime-header*/.sc-ion-datetime-md-h .datetime-header.sc-ion-datetime-md{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}/*!@:host .datetime-header .datetime-title*/.sc-ion-datetime-md-h .datetime-header.sc-ion-datetime-md .datetime-title.sc-ion-datetime-md{font-size:0.75rem;text-transform:uppercase}/*!@:host .datetime-header .datetime-selected-date*/.sc-ion-datetime-md-h .datetime-header.sc-ion-datetime-md .datetime-selected-date.sc-ion-datetime-md{margin-top:30px;font-size:2.125rem}/*!@:host .datetime-calendar .calendar-action-buttons ion-item*/.sc-ion-datetime-md-h .datetime-calendar.sc-ion-datetime-md .calendar-action-buttons.sc-ion-datetime-md ion-item.sc-ion-datetime-md{--padding-start:20px}/*!@:host .calendar-action-buttons ion-item,\n:host .calendar-action-buttons ion-button*/.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md ion-item.sc-ion-datetime-md,.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md ion-button.sc-ion-datetime-md{--color:var(--ion-color-step-650, #595959)}/*!@:host .calendar-days-of-week*/.sc-ion-datetime-md-h .calendar-days-of-week.sc-ion-datetime-md{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, gray);font-size:0.875rem;line-height:36px}/*!@:host .calendar-body .calendar-month .calendar-month-grid*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md .calendar-month.sc-ion-datetime-md .calendar-month-grid.sc-ion-datetime-md{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}/*!@:host .calendar-day*/.sc-ion-datetime-md-h .calendar-day.sc-ion-datetime-md{width:42px;min-width:42px;height:42px;font-size:0.875rem}/*!@:host .calendar-day.calendar-day-today*/.sc-ion-datetime-md-h .calendar-day.calendar-day-today.sc-ion-datetime-md{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}/*!@:host .calendar-day.calendar-day-active*/.sc-ion-datetime-md-h .calendar-day.calendar-day-active.sc-ion-datetime-md{color:var(--ion-color-contrast)}/*!@.calendar-day.calendar-day-active*/.calendar-day.calendar-day-active.sc-ion-datetime-md{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}/*!@:host .datetime-time*/.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}/*!@:host .time-header*/.sc-ion-datetime-md-h .time-header.sc-ion-datetime-md{color:var(--ion-color-step-650, #595959)}/*!@:host(.datetime-presentation-month) .datetime-year,\n:host(.datetime-presentation-year) .datetime-year,\n:host(.datetime-presentation-month-year) .datetime-year*/.datetime-presentation-month.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md,.datetime-presentation-year.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md,.datetime-presentation-month-year.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{margin-top:20px;margin-bottom:20px}/*!@:host .datetime-buttons*/.sc-ion-datetime-md-h .datetime-buttons.sc-ion-datetime-md{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}";
14831
+ const datetimeMdCss = "/*!@:host*/.sc-ion-datetime-md-h{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}/*!@ion-picker-column*/ion-picker-column.sc-ion-datetime-md{min-width:26px}/*!@:host(.datetime-size-fixed)*/.datetime-size-fixed.sc-ion-datetime-md-h{width:auto;height:auto}/*!@:host(.datetime-size-fixed:not(.datetime-prefer-wheel))*/.datetime-size-fixed.sc-ion-datetime-md-h:not(.datetime-prefer-wheel){max-width:350px}/*!@:host(.datetime-size-fixed.datetime-prefer-wheel)*/.datetime-size-fixed.datetime-prefer-wheel.sc-ion-datetime-md-h{min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}/*!@:host(.datetime-size-cover)*/.datetime-size-cover.sc-ion-datetime-md-h{width:100%}/*!@:host .calendar-body,\n:host .datetime-year*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md,.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{opacity:0}/*!@:host(:not(.datetime-ready)) .datetime-year*/.sc-ion-datetime-md-h:not(.datetime-ready) .datetime-year.sc-ion-datetime-md{position:absolute;pointer-events:none}/*!@:host(.datetime-ready) .calendar-body*/.datetime-ready.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md{opacity:1}/*!@:host(.datetime-ready) .datetime-year*/.datetime-ready.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{display:none;opacity:1}/*!@:host .wheel-order-year-first .day-column*/.sc-ion-datetime-md-h .wheel-order-year-first.sc-ion-datetime-md .day-column.sc-ion-datetime-md{-ms-flex-order:3;order:3;text-align:end}/*!@:host .wheel-order-year-first .month-column*/.sc-ion-datetime-md-h .wheel-order-year-first.sc-ion-datetime-md .month-column.sc-ion-datetime-md{-ms-flex-order:2;order:2;text-align:end}/*!@:host .wheel-order-year-first .year-column*/.sc-ion-datetime-md-h .wheel-order-year-first.sc-ion-datetime-md .year-column.sc-ion-datetime-md{-ms-flex-order:1;order:1;text-align:start}/*!@:host .datetime-calendar,\n:host .datetime-year*/.sc-ion-datetime-md-h .datetime-calendar.sc-ion-datetime-md,.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}/*!@:host(.show-month-and-year) .datetime-year*/.show-month-and-year.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{display:-ms-flexbox;display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){/*!@:host(.show-month-and-year) .calendar-next-prev,\n :host(.show-month-and-year) .calendar-days-of-week,\n :host(.show-month-and-year) .calendar-body,\n :host(.show-month-and-year) .datetime-time*/.show-month-and-year.sc-ion-datetime-md-h .calendar-next-prev.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .calendar-days-of-week.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{position:absolute;visibility:hidden;pointer-events:none}/*!@@supports (inset-inline-start: 0)*/@supports .sc-ion-datetime-md (inset-inline-start.sc-ion-datetime-md: 0).sc-ion-datetime-md{.sc-ion-datetime-md-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-md-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-md-h.show-month-and-year .calendar-body,.sc-ion-datetime-md-h.show-month-and-year .datetime-time{inset-inline-start:-99999px}}/*!@@supports not (inset-inline-start: 0)*/@supports .sc-ion-datetime-md not.sc-ion-datetime-md (inset-inline-start.sc-ion-datetime-md: 0).sc-ion-datetime-md{.sc-ion-datetime-md-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-md-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-md-h.show-month-and-year .calendar-body,.sc-ion-datetime-md-h.show-month-and-year .datetime-time{left:-99999px}.sc-ion-datetime-md-h[dir=rtl].sc-ion-datetime-md-h.show-month-and-year .calendar-next-prev,[dir=rtl] .sc-ion-datetime-md-h.sc-ion-datetime-md-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-md-h[dir=rtl].show-month-and-year .calendar-next-prev,[dir=rtl] .sc-ion-datetime-md-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-md-h[dir=rtl].sc-ion-datetime-md-h.show-month-and-year .calendar-days-of-week,[dir=rtl] .sc-ion-datetime-md-h.sc-ion-datetime-md-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-md-h[dir=rtl].show-month-and-year .calendar-days-of-week,[dir=rtl] .sc-ion-datetime-md-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-md-h[dir=rtl].sc-ion-datetime-md-h.show-month-and-year .calendar-body,[dir=rtl] .sc-ion-datetime-md-h.sc-ion-datetime-md-h.show-month-and-year .calendar-body,.sc-ion-datetime-md-h[dir=rtl].show-month-and-year .calendar-body,[dir=rtl] .sc-ion-datetime-md-h.show-month-and-year .calendar-body,.sc-ion-datetime-md-h[dir=rtl].sc-ion-datetime-md-h.show-month-and-year .datetime-time,[dir=rtl] .sc-ion-datetime-md-h.sc-ion-datetime-md-h.show-month-and-year .datetime-time,.sc-ion-datetime-md-h[dir=rtl].show-month-and-year .datetime-time,[dir=rtl] .sc-ion-datetime-md-h.show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}@supports selector(:dir(rtl)){.sc-ion-datetime-md-h.show-month-and-year:dir(rtl) .calendar-next-prev,.sc-ion-datetime-md-h.show-month-and-year:dir(rtl) .calendar-days-of-week,.sc-ion-datetime-md-h.show-month-and-year:dir(rtl) .calendar-body,.sc-ion-datetime-md-h.show-month-and-year:dir(rtl) .datetime-time{left:unset;right:unset;right:-99999px}}}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){/*!@:host(.show-month-and-year) .calendar-next-prev,\n :host(.show-month-and-year) .calendar-days-of-week,\n :host(.show-month-and-year) .calendar-body,\n :host(.show-month-and-year) .datetime-time*/.show-month-and-year.sc-ion-datetime-md-h .calendar-next-prev.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .calendar-days-of-week.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md,.show-month-and-year.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{display:none}}/*!@:host(.month-year-picker-open) .datetime-footer*/.month-year-picker-open.sc-ion-datetime-md-h .datetime-footer.sc-ion-datetime-md{display:none}/*!@:host(.datetime-disabled)*/.datetime-disabled.sc-ion-datetime-md-h{pointer-events:none}/*!@:host(.datetime-disabled) .calendar-days-of-week,\n:host(.datetime-disabled) .datetime-time*/.datetime-disabled.sc-ion-datetime-md-h .calendar-days-of-week.sc-ion-datetime-md,.datetime-disabled.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{opacity:0.4}/*!@:host(.datetime-readonly)*/.datetime-readonly.sc-ion-datetime-md-h{pointer-events:none}/*!@:host(.datetime-readonly) .calendar-action-buttons,\n:host(.datetime-readonly) .calendar-body,\n:host(.datetime-readonly) .datetime-year*/.datetime-readonly.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md,.datetime-readonly.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md,.datetime-readonly.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{pointer-events:initial}/*!@:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),\n:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]*/.datetime-readonly.sc-ion-datetime-md-h .calendar-day[disabled].sc-ion-datetime-md:not(.calendar-day-constrained),.datetime-readonly.sc-ion-datetime-md-h .datetime-action-buttons.sc-ion-datetime-md ion-button[disabled].sc-ion-datetime-md{opacity:1}/*!@:host .datetime-header .datetime-title*/.sc-ion-datetime-md-h .datetime-header.sc-ion-datetime-md .datetime-title.sc-ion-datetime-md{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}/*!@:host .datetime-action-buttons.has-clear-button*/.sc-ion-datetime-md-h .datetime-action-buttons.has-clear-button.sc-ion-datetime-md{width:100%}/*!@:host .datetime-action-buttons ion-buttons*/.sc-ion-datetime-md-h .datetime-action-buttons.sc-ion-datetime-md ion-buttons.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@.datetime-action-buttons .datetime-action-buttons-container*/.datetime-action-buttons.sc-ion-datetime-md .datetime-action-buttons-container.sc-ion-datetime-md{display:-ms-flexbox;display:flex}/*!@:host .calendar-action-buttons*/.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@:host .calendar-action-buttons ion-button*/.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md ion-button.sc-ion-datetime-md{--background:transparent}/*!@:host .calendar-days-of-week*/.sc-ion-datetime-md-h .calendar-days-of-week.sc-ion-datetime-md{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-md .day-of-week.sc-ion-datetime-md{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}/*!@:host .calendar-body*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}/*!@:host .calendar-body .calendar-month*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md .calendar-month.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}/*!@:host .calendar-body .calendar-month-disabled*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md .calendar-month-disabled.sc-ion-datetime-md{scroll-snap-align:none}/*!@:host .calendar-body::-webkit-scrollbar*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md::-webkit-scrollbar{display:none}/*!@:host .calendar-body .calendar-month-grid*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md .calendar-month-grid.sc-ion-datetime-md{display:grid;grid-template-columns:repeat(7, 1fr)}/*!@:host .calendar-day-wrapper*/.sc-ion-datetime-md-h .calendar-day-wrapper.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-md{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}/*!@:host .calendar-day[disabled]*/.sc-ion-datetime-md-h .calendar-day[disabled].sc-ion-datetime-md{pointer-events:none;opacity:0.4}/*!@.calendar-day:focus*/.calendar-day.sc-ion-datetime-md:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}/*!@:host .datetime-time*/.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@:host(.datetime-presentation-time) .datetime-time*/.datetime-presentation-time.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}/*!@:host ion-popover*/.sc-ion-datetime-md-h ion-popover.sc-ion-datetime-md{--height:200px}/*!@:host .time-header*/.sc-ion-datetime-md-h .time-header.sc-ion-datetime-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}/*!@:host .time-body*/.sc-ion-datetime-md-h .time-body.sc-ion-datetime-md{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}/*!@:host .time-body-active*/.sc-ion-datetime-md-h .time-body-active.sc-ion-datetime-md{color:var(--ion-color-base)}/*!@:host(.in-item)*/.in-item.sc-ion-datetime-md-h{position:static}/*!@:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle*/.show-month-and-year.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md .calendar-month-year-toggle.sc-ion-datetime-md{color:var(--ion-color-base)}/*!@.calendar-month-year*/.calendar-month-year.sc-ion-datetime-md{min-width:0}/*!@.calendar-month-year-toggle*/.calendar-month-year-toggle.sc-ion-datetime-md{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}/*!@.calendar-month-year-toggle::after*/.calendar-month-year-toggle.sc-ion-datetime-md::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}/*!@.calendar-month-year-toggle.ion-focused::after*/.calendar-month-year-toggle.ion-focused.sc-ion-datetime-md::after{background:currentColor}/*!@.calendar-month-year-toggle:disabled*/.calendar-month-year-toggle.sc-ion-datetime-md:disabled{opacity:0.3;pointer-events:none}/*!@.calendar-month-year-toggle ion-icon*/.calendar-month-year-toggle.sc-ion-datetime-md ion-icon.sc-ion-datetime-md{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}/*!@.calendar-month-year-toggle #toggle-wrapper*/.calendar-month-year-toggle.sc-ion-datetime-md #toggle-wrapper.sc-ion-datetime-md{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}/*!@:host*/.sc-ion-datetime-md-h{--background:var(--ion-color-step-100, #ffffff);--title-color:var(--ion-color-contrast)}/*!@:host .datetime-header*/.sc-ion-datetime-md-h .datetime-header.sc-ion-datetime-md{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}/*!@:host .datetime-header .datetime-title*/.sc-ion-datetime-md-h .datetime-header.sc-ion-datetime-md .datetime-title.sc-ion-datetime-md{font-size:0.75rem;text-transform:uppercase}/*!@:host .datetime-header .datetime-selected-date*/.sc-ion-datetime-md-h .datetime-header.sc-ion-datetime-md .datetime-selected-date.sc-ion-datetime-md{margin-top:30px;font-size:2.125rem}/*!@:host .calendar-action-buttons ion-button*/.sc-ion-datetime-md-h .calendar-action-buttons.sc-ion-datetime-md ion-button.sc-ion-datetime-md{--color:var(--ion-color-step-650, #595959)}/*!@.calendar-month-year-toggle*/.calendar-month-year-toggle.sc-ion-datetime-md{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;min-height:48px;background:transparent;color:var(--ion-color-step-650, #595959);z-index:1}/*!@.calendar-month-year-toggle.ion-focused::after*/.calendar-month-year-toggle.ion-focused.sc-ion-datetime-md::after{opacity:0.04}/*!@.calendar-month-year-toggle ion-ripple-effect*/.calendar-month-year-toggle.sc-ion-datetime-md ion-ripple-effect.sc-ion-datetime-md{color:currentColor}@media (any-hover: hover){/*!@.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after*/.calendar-month-year-toggle.ion-activatable.sc-ion-datetime-md:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}/*!@:host .calendar-days-of-week*/.sc-ion-datetime-md-h .calendar-days-of-week.sc-ion-datetime-md{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, gray);font-size:0.875rem;line-height:36px}/*!@:host .calendar-body .calendar-month .calendar-month-grid*/.sc-ion-datetime-md-h .calendar-body.sc-ion-datetime-md .calendar-month.sc-ion-datetime-md .calendar-month-grid.sc-ion-datetime-md{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}/*!@:host .calendar-day*/.sc-ion-datetime-md-h .calendar-day.sc-ion-datetime-md{width:42px;min-width:42px;height:42px;font-size:0.875rem}/*!@:host .calendar-day.calendar-day-today*/.sc-ion-datetime-md-h .calendar-day.calendar-day-today.sc-ion-datetime-md{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}/*!@:host .calendar-day.calendar-day-active*/.sc-ion-datetime-md-h .calendar-day.calendar-day-active.sc-ion-datetime-md{color:var(--ion-color-contrast)}/*!@.calendar-day.calendar-day-active*/.calendar-day.calendar-day-active.sc-ion-datetime-md{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}/*!@:host .datetime-time*/.sc-ion-datetime-md-h .datetime-time.sc-ion-datetime-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}/*!@:host .time-header*/.sc-ion-datetime-md-h .time-header.sc-ion-datetime-md{color:var(--ion-color-step-650, #595959)}/*!@:host(.datetime-presentation-month) .datetime-year,\n:host(.datetime-presentation-year) .datetime-year,\n:host(.datetime-presentation-month-year) .datetime-year*/.datetime-presentation-month.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md,.datetime-presentation-year.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md,.datetime-presentation-month-year.sc-ion-datetime-md-h .datetime-year.sc-ion-datetime-md{margin-top:20px;margin-bottom:20px}/*!@:host .datetime-buttons*/.sc-ion-datetime-md-h .datetime-buttons.sc-ion-datetime-md{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}";
14840
14832
 
14841
14833
  /**
14842
14834
  * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
@@ -15807,7 +15799,7 @@ class Datetime {
15807
15799
  const renderArray = forcePresentation === 'time-date'
15808
15800
  ? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)]
15809
15801
  : [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];
15810
- return hAsync("ion-picker-internal", null, renderArray);
15802
+ return hAsync("ion-picker", null, renderArray);
15811
15803
  }
15812
15804
  renderDatePickerColumns(forcePresentation) {
15813
15805
  return forcePresentation === 'date-time' || forcePresentation === 'time-date'
@@ -15866,7 +15858,7 @@ class Datetime {
15866
15858
  const todayString = workingParts.day !== null
15867
15859
  ? `${workingParts.year}-${workingParts.month}-${workingParts.day}`
15868
15860
  : `${defaultParts.year}-${defaultParts.month}-${defaultParts.day}`;
15869
- return (hAsync("ion-picker-column-internal", { class: "date-column", color: this.color, disabled: disabled, items: items, value: todayString, onIonChange: (ev) => {
15861
+ return (hAsync("ion-picker-column", { class: "date-column", color: this.color, disabled: disabled, items: items, value: todayString, onIonChange: (ev) => {
15870
15862
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
15871
15863
  // Due to a Safari 14 issue we need to destroy
15872
15864
  // the scroll listener before we update state
@@ -15950,7 +15942,7 @@ class Datetime {
15950
15942
  }
15951
15943
  const { disabled, workingParts } = this;
15952
15944
  const activePart = this.getActivePartsWithFallback();
15953
- return (hAsync("ion-picker-column-internal", { class: "day-column", color: this.color, disabled: disabled, items: days, value: (_a = (workingParts.day !== null ? workingParts.day : this.defaultParts.day)) !== null && _a !== void 0 ? _a : undefined, onIonChange: (ev) => {
15945
+ return (hAsync("ion-picker-column", { class: "day-column", color: this.color, disabled: disabled, items: days, value: (_a = (workingParts.day !== null ? workingParts.day : this.defaultParts.day)) !== null && _a !== void 0 ? _a : undefined, onIonChange: (ev) => {
15954
15946
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
15955
15947
  // Due to a Safari 14 issue we need to destroy
15956
15948
  // the scroll listener before we update state
@@ -15972,7 +15964,7 @@ class Datetime {
15972
15964
  }
15973
15965
  const { disabled, workingParts } = this;
15974
15966
  const activePart = this.getActivePartsWithFallback();
15975
- return (hAsync("ion-picker-column-internal", { class: "month-column", color: this.color, disabled: disabled, items: months, value: workingParts.month, onIonChange: (ev) => {
15967
+ return (hAsync("ion-picker-column", { class: "month-column", color: this.color, disabled: disabled, items: months, value: workingParts.month, onIonChange: (ev) => {
15976
15968
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
15977
15969
  // Due to a Safari 14 issue we need to destroy
15978
15970
  // the scroll listener before we update state
@@ -15994,7 +15986,7 @@ class Datetime {
15994
15986
  }
15995
15987
  const { disabled, workingParts } = this;
15996
15988
  const activePart = this.getActivePartsWithFallback();
15997
- return (hAsync("ion-picker-column-internal", { class: "year-column", color: this.color, disabled: disabled, items: years, value: workingParts.year, onIonChange: (ev) => {
15989
+ return (hAsync("ion-picker-column", { class: "year-column", color: this.color, disabled: disabled, items: years, value: workingParts.year, onIonChange: (ev) => {
15998
15990
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
15999
15991
  // Due to a Safari 14 issue we need to destroy
16000
15992
  // the scroll listener before we update state
@@ -16037,7 +16029,7 @@ class Datetime {
16037
16029
  if (hoursData.length === 0)
16038
16030
  return [];
16039
16031
  const activePart = this.getActivePartsWithFallback();
16040
- return (hAsync("ion-picker-column-internal", { color: this.color, disabled: disabled, value: activePart.hour, items: hoursData, numericInput: true, onIonChange: (ev) => {
16032
+ return (hAsync("ion-picker-column", { color: this.color, disabled: disabled, value: activePart.hour, items: hoursData, numericInput: true, onIonChange: (ev) => {
16041
16033
  this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { hour: ev.detail.value }));
16042
16034
  this.setActiveParts(Object.assign(Object.assign({}, activePart), { hour: ev.detail.value }));
16043
16035
  ev.stopPropagation();
@@ -16048,7 +16040,7 @@ class Datetime {
16048
16040
  if (minutesData.length === 0)
16049
16041
  return [];
16050
16042
  const activePart = this.getActivePartsWithFallback();
16051
- return (hAsync("ion-picker-column-internal", { color: this.color, disabled: disabled, value: activePart.minute, items: minutesData, numericInput: true, onIonChange: (ev) => {
16043
+ return (hAsync("ion-picker-column", { color: this.color, disabled: disabled, value: activePart.minute, items: minutesData, numericInput: true, onIonChange: (ev) => {
16052
16044
  this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { minute: ev.detail.value }));
16053
16045
  this.setActiveParts(Object.assign(Object.assign({}, activePart), { minute: ev.detail.value }));
16054
16046
  ev.stopPropagation();
@@ -16061,7 +16053,7 @@ class Datetime {
16061
16053
  }
16062
16054
  const activePart = this.getActivePartsWithFallback();
16063
16055
  const isDayPeriodRTL = isLocaleDayPeriodRTL(this.locale);
16064
- return (hAsync("ion-picker-column-internal", { style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, disabled: disabled, value: activePart.ampm, items: dayPeriodData, onIonChange: (ev) => {
16056
+ return (hAsync("ion-picker-column", { style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, disabled: disabled, value: activePart.ampm, items: dayPeriodData, onIonChange: (ev) => {
16065
16057
  const hour = calculateHourFromAMPM(workingParts, ev.detail.value);
16066
16058
  this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { ampm: ev.detail.value, hour }));
16067
16059
  this.setActiveParts(Object.assign(Object.assign({}, activePart), { ampm: ev.detail.value, hour }));
@@ -16087,26 +16079,11 @@ class Datetime {
16087
16079
  const nextMonthDisabled = disabled || isNextMonthDisabled(this.workingParts, this.maxParts);
16088
16080
  // don't use the inheritAttributes util because it removes dir from the host, and we still need that
16089
16081
  const hostDir = this.el.getAttribute('dir') || undefined;
16090
- return (hAsync("div", { class: "calendar-header" }, hAsync("div", { class: "calendar-action-buttons" }, hAsync("div", { class: "calendar-month-year" }, hAsync("ion-item", { part: "month-year-button", ref: (el) => (this.monthYearToggleItemRef = el), button: true, "aria-label": "Show year picker", detail: false, lines: "none", disabled: disabled, onClick: () => {
16091
- var _a;
16092
- this.toggleMonthAndYearView();
16093
- /**
16094
- * TODO: FW-3547
16095
- *
16096
- * Currently there is not a way to set the aria-label on the inner button
16097
- * on the `ion-item` and have it be reactive to changes. This is a workaround
16098
- * until we either refactor `ion-item` to a button or Stencil adds a way to
16099
- * have reactive props for built-in properties, such as `aria-label`.
16100
- */
16101
- const { monthYearToggleItemRef } = this;
16102
- if (monthYearToggleItemRef) {
16103
- const btn = (_a = monthYearToggleItemRef.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.item-native');
16104
- if (btn) {
16105
- const monthYearAriaLabel = this.showMonthAndYear ? 'Hide year picker' : 'Show year picker';
16106
- btn.setAttribute('aria-label', monthYearAriaLabel);
16107
- }
16108
- }
16109
- } }, hAsync("ion-label", null, getMonthAndYear(this.locale, this.workingParts), hAsync("ion-icon", { "aria-hidden": "true", icon: this.showMonthAndYear ? expandedIcon : collapsedIcon, lazy: false, flipRtl: true })))), hAsync("div", { class: "calendar-next-prev" }, hAsync("ion-buttons", null, hAsync("ion-button", { "aria-label": "Previous month", disabled: prevMonthDisabled, onClick: () => this.prevMonth() }, hAsync("ion-icon", { dir: hostDir, "aria-hidden": "true", slot: "icon-only", icon: chevronBack, lazy: false, flipRtl: true })), hAsync("ion-button", { "aria-label": "Next month", disabled: nextMonthDisabled, onClick: () => this.nextMonth() }, hAsync("ion-icon", { dir: hostDir, "aria-hidden": "true", slot: "icon-only", icon: chevronForward, lazy: false, flipRtl: true }))))), hAsync("div", { class: "calendar-days-of-week", "aria-hidden": "true" }, getDaysOfWeek(this.locale, mode, this.firstDayOfWeek % 7).map((d) => {
16082
+ return (hAsync("div", { class: "calendar-header" }, hAsync("div", { class: "calendar-action-buttons" }, hAsync("div", { class: "calendar-month-year" }, hAsync("button", { class: {
16083
+ 'calendar-month-year-toggle': true,
16084
+ 'ion-activatable': true,
16085
+ 'ion-focusable': true,
16086
+ }, part: "month-year-button", disabled: disabled, "aria-label": this.showMonthAndYear ? 'Hide year picker' : 'Show year picker', onClick: () => this.toggleMonthAndYearView() }, hAsync("span", { id: "toggle-wrapper" }, getMonthAndYear(this.locale, this.workingParts), hAsync("ion-icon", { "aria-hidden": "true", icon: this.showMonthAndYear ? expandedIcon : collapsedIcon, lazy: false, flipRtl: true })), mode === 'md' && hAsync("ion-ripple-effect", null))), hAsync("div", { class: "calendar-next-prev" }, hAsync("ion-buttons", null, hAsync("ion-button", { "aria-label": "Previous month", disabled: prevMonthDisabled, onClick: () => this.prevMonth() }, hAsync("ion-icon", { dir: hostDir, "aria-hidden": "true", slot: "icon-only", icon: chevronBack, lazy: false, flipRtl: true })), hAsync("ion-button", { "aria-label": "Next month", disabled: nextMonthDisabled, onClick: () => this.nextMonth() }, hAsync("ion-icon", { dir: hostDir, "aria-hidden": "true", slot: "icon-only", icon: chevronForward, lazy: false, flipRtl: true }))))), hAsync("div", { class: "calendar-days-of-week", "aria-hidden": "true" }, getDaysOfWeek(this.locale, mode, this.firstDayOfWeek % 7).map((d) => {
16110
16087
  return hAsync("div", { class: "day-of-week" }, d);
16111
16088
  }))));
16112
16089
  }
@@ -16267,7 +16244,7 @@ class Datetime {
16267
16244
  * This will correctly scroll the element position to the correct time value,
16268
16245
  * before the popover is fully presented.
16269
16246
  */
16270
- const cols = ev.target.querySelectorAll('ion-picker-column-internal');
16247
+ const cols = ev.target.querySelectorAll('ion-picker-column');
16271
16248
  // TODO (FW-615): Potentially remove this when intersection observers are fixed in picker column
16272
16249
  cols.forEach((col) => col.scrollActiveItemIntoView());
16273
16250
  }, style: {
@@ -17944,29 +17921,26 @@ const isRTL = (hostEl) => {
17944
17921
  return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl';
17945
17922
  };
17946
17923
 
17947
- const iconCss = "/*!@:host*/.sc-ion-icon-h{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;-webkit-box-sizing:content-box !important;box-sizing:content-box !important;font-size:1rem}/*!@:host .ionicon*/.sc-ion-icon-h .ionicon.sc-ion-icon{stroke:currentColor}/*!@.ionicon-fill-none*/.ionicon-fill-none.sc-ion-icon{fill:none}/*!@.ionicon-stroke-width*/.ionicon-stroke-width.sc-ion-icon{stroke-width:32px;stroke-width:var(--ionicon-stroke-width, 32px)}/*!@.icon-inner,\n.ionicon,\nsvg*/.icon-inner.sc-ion-icon,.ionicon.sc-ion-icon,svg.sc-ion-icon{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){/*!@:host(.icon-rtl) .icon-inner*/.icon-rtl.sc-ion-icon-h .icon-inner.sc-ion-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){/*!@:host(.icon-rtl) .icon-inner*/.icon-rtl.sc-ion-icon-h .icon-inner.sc-ion-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}/*!@:host(.flip-rtl):host-context([dir='rtl']) .icon-inner*/.flip-rtl.sc-ion-icon-h -no-combinator[dir='rtl'].sc-ion-icon-h .icon-inner.sc-ion-icon,[dir='rtl'] .sc-ion-icon-h .icon-inner.sc-ion-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@supports selector(:dir(rtl)){/*!@:host(.flip-rtl:dir(rtl)) .icon-inner*/.flip-rtl.sc-ion-icon-h:dir(rtl) .icon-inner.sc-ion-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}/*!@:host(.flip-rtl:dir(ltr)) .icon-inner*/.flip-rtl.sc-ion-icon-h:dir(ltr) .icon-inner.sc-ion-icon{-webkit-transform:scaleX(1);transform:scaleX(1)}}/*!@:host(.icon-small)*/.icon-small.sc-ion-icon-h{font-size:1.125rem !important}/*!@:host(.icon-large)*/.icon-large.sc-ion-icon-h{font-size:2rem !important}/*!@:host(.ion-color)*/.ion-color.sc-ion-icon-h{color:var(--ion-color-base) !important}/*!@:host(.ion-color-primary)*/.ion-color-primary.sc-ion-icon-h{--ion-color-base:var(--ion-color-primary, #3880ff)}/*!@:host(.ion-color-secondary)*/.ion-color-secondary.sc-ion-icon-h{--ion-color-base:var(--ion-color-secondary, #0cd1e8)}/*!@:host(.ion-color-tertiary)*/.ion-color-tertiary.sc-ion-icon-h{--ion-color-base:var(--ion-color-tertiary, #f4a942)}/*!@:host(.ion-color-success)*/.ion-color-success.sc-ion-icon-h{--ion-color-base:var(--ion-color-success, #10dc60)}/*!@:host(.ion-color-warning)*/.ion-color-warning.sc-ion-icon-h{--ion-color-base:var(--ion-color-warning, #ffce00)}/*!@:host(.ion-color-danger)*/.ion-color-danger.sc-ion-icon-h{--ion-color-base:var(--ion-color-danger, #f14141)}/*!@:host(.ion-color-light)*/.ion-color-light.sc-ion-icon-h{--ion-color-base:var(--ion-color-light, #f4f5f8)}/*!@:host(.ion-color-medium)*/.ion-color-medium.sc-ion-icon-h{--ion-color-base:var(--ion-color-medium, #989aa2)}/*!@:host(.ion-color-dark)*/.ion-color-dark.sc-ion-icon-h{--ion-color-base:var(--ion-color-dark, #222428)}";
17924
+ const iconCss = "/*!@:host*/.sc-ion-icon-h{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;-webkit-box-sizing:content-box !important;box-sizing:content-box !important}/*!@:host .ionicon*/.sc-ion-icon-h .ionicon.sc-ion-icon{stroke:currentColor}/*!@.ionicon-fill-none*/.ionicon-fill-none.sc-ion-icon{fill:none}/*!@.ionicon-stroke-width*/.ionicon-stroke-width.sc-ion-icon{stroke-width:32px;stroke-width:var(--ionicon-stroke-width, 32px)}/*!@.icon-inner,\n.ionicon,\nsvg*/.icon-inner.sc-ion-icon,.ionicon.sc-ion-icon,svg.sc-ion-icon{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){/*!@:host(.icon-rtl) .icon-inner*/.icon-rtl.sc-ion-icon-h .icon-inner.sc-ion-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){/*!@:host(.icon-rtl) .icon-inner*/.icon-rtl.sc-ion-icon-h .icon-inner.sc-ion-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}/*!@:host(.flip-rtl):host-context([dir='rtl']) .icon-inner*/.flip-rtl.sc-ion-icon-h -no-combinator[dir='rtl'].sc-ion-icon-h .icon-inner.sc-ion-icon,[dir='rtl'] .sc-ion-icon-h .icon-inner.sc-ion-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@supports selector(:dir(rtl)){/*!@:host(.flip-rtl:dir(rtl)) .icon-inner*/.flip-rtl.sc-ion-icon-h:dir(rtl) .icon-inner.sc-ion-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}/*!@:host(.flip-rtl:dir(ltr)) .icon-inner*/.flip-rtl.sc-ion-icon-h:dir(ltr) .icon-inner.sc-ion-icon{-webkit-transform:scaleX(1);transform:scaleX(1)}}/*!@:host(.icon-small)*/.icon-small.sc-ion-icon-h{font-size:1.125rem !important}/*!@:host(.icon-large)*/.icon-large.sc-ion-icon-h{font-size:2rem !important}/*!@:host(.ion-color)*/.ion-color.sc-ion-icon-h{color:var(--ion-color-base) !important}/*!@:host(.ion-color-primary)*/.ion-color-primary.sc-ion-icon-h{--ion-color-base:var(--ion-color-primary, #3880ff)}/*!@:host(.ion-color-secondary)*/.ion-color-secondary.sc-ion-icon-h{--ion-color-base:var(--ion-color-secondary, #0cd1e8)}/*!@:host(.ion-color-tertiary)*/.ion-color-tertiary.sc-ion-icon-h{--ion-color-base:var(--ion-color-tertiary, #f4a942)}/*!@:host(.ion-color-success)*/.ion-color-success.sc-ion-icon-h{--ion-color-base:var(--ion-color-success, #10dc60)}/*!@:host(.ion-color-warning)*/.ion-color-warning.sc-ion-icon-h{--ion-color-base:var(--ion-color-warning, #ffce00)}/*!@:host(.ion-color-danger)*/.ion-color-danger.sc-ion-icon-h{--ion-color-base:var(--ion-color-danger, #f14141)}/*!@:host(.ion-color-light)*/.ion-color-light.sc-ion-icon-h{--ion-color-base:var(--ion-color-light, #f4f5f8)}/*!@:host(.ion-color-medium)*/.ion-color-medium.sc-ion-icon-h{--ion-color-base:var(--ion-color-medium, #989aa2)}/*!@:host(.ion-color-dark)*/.ion-color-dark.sc-ion-icon-h{--ion-color-base:var(--ion-color-dark, #222428)}";
17948
17925
 
17949
17926
  class Icon {
17950
17927
  constructor(hostRef) {
17951
17928
  registerInstance(this, hostRef);
17952
17929
  this.iconName = null;
17953
17930
  this.inheritedAttributes = {};
17931
+ this.didLoadIcon = false;
17932
+ this.svgContent = undefined;
17954
17933
  this.isVisible = false;
17955
- /**
17956
- * The mode determines which platform styles to use.
17957
- */
17958
17934
  this.mode = getIonMode();
17959
- /**
17960
- * If enabled, ion-icon will be loaded lazily when it's visible in the viewport.
17961
- * Default, `false`.
17962
- */
17935
+ this.color = undefined;
17936
+ this.ios = undefined;
17937
+ this.md = undefined;
17938
+ this.flipRtl = undefined;
17939
+ this.name = undefined;
17940
+ this.src = undefined;
17941
+ this.icon = undefined;
17942
+ this.size = undefined;
17963
17943
  this.lazy = false;
17964
- /**
17965
- * When set to `false`, SVG content that is HTTP fetched will not be checked
17966
- * if the response SVG content has any `<script>` elements, or any attributes
17967
- * that start with `on`, such as `onclick`.
17968
- * @default true
17969
- */
17970
17944
  this.sanitize = true;
17971
17945
  }
17972
17946
  componentWillLoad() {
@@ -17981,6 +17955,17 @@ class Icon {
17981
17955
  this.loadIcon();
17982
17956
  });
17983
17957
  }
17958
+ componentDidLoad() {
17959
+ /**
17960
+ * Addresses an Angular issue where property values are assigned after the 'connectedCallback' but prior to the registration of watchers.
17961
+ * This enhancement ensures the loading of an icon when the component has finished rendering and the icon has yet to apply the SVG data.
17962
+ * This modification pertains to the usage of Angular's binding syntax:
17963
+ * `<ion-icon [name]="myIconName"></ion-icon>`
17964
+ */
17965
+ if (!this.didLoadIcon) {
17966
+ this.loadIcon();
17967
+ }
17968
+ }
17984
17969
  disconnectedCallback() {
17985
17970
  if (this.io) {
17986
17971
  this.io.disconnect();
@@ -24478,1508 +24463,1541 @@ class Note {
24478
24463
  }; }
24479
24464
  }
24480
24465
 
24481
- /**
24482
- * iOS Picker Enter Animation
24483
- */
24484
- const iosEnterAnimation$2 = (baseEl) => {
24485
- const baseAnimation = createAnimation();
24486
- const backdropAnimation = createAnimation();
24487
- const wrapperAnimation = createAnimation();
24488
- backdropAnimation
24489
- .addElement(baseEl.querySelector('ion-backdrop'))
24490
- .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
24491
- .beforeStyles({
24492
- 'pointer-events': 'none',
24493
- })
24494
- .afterClearStyles(['pointer-events']);
24495
- wrapperAnimation
24496
- .addElement(baseEl.querySelector('.picker-wrapper'))
24497
- .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
24498
- return baseAnimation
24499
- .addElement(baseEl)
24500
- .easing('cubic-bezier(.36,.66,.04,1)')
24501
- .duration(400)
24502
- .addAnimation([backdropAnimation, wrapperAnimation]);
24503
- };
24504
-
24505
- /**
24506
- * iOS Picker Leave Animation
24507
- */
24508
- const iosLeaveAnimation$2 = (baseEl) => {
24509
- const baseAnimation = createAnimation();
24510
- const backdropAnimation = createAnimation();
24511
- const wrapperAnimation = createAnimation();
24512
- backdropAnimation
24513
- .addElement(baseEl.querySelector('ion-backdrop'))
24514
- .fromTo('opacity', 'var(--backdrop-opacity)', 0.01);
24515
- wrapperAnimation
24516
- .addElement(baseEl.querySelector('.picker-wrapper'))
24517
- .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
24518
- return baseAnimation
24519
- .addElement(baseEl)
24520
- .easing('cubic-bezier(.36,.66,.04,1)')
24521
- .duration(400)
24522
- .addAnimation([backdropAnimation, wrapperAnimation]);
24523
- };
24524
-
24525
- const pickerIosCss = ".sc-ion-picker-ios-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}@supports (inset-inline-start: 0){.sc-ion-picker-ios-h{inset-inline-start:0}}@supports not (inset-inline-start: 0){.sc-ion-picker-ios-h{left:0}[dir=rtl].sc-ion-picker-ios-h,[dir=rtl] .sc-ion-picker-ios-h{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.sc-ion-picker-ios-h:dir(rtl){left:unset;right:unset;right:0}}}.overlay-hidden.sc-ion-picker-ios-h{display:none}.picker-wrapper.sc-ion-picker-ios{border-radius:var(--border-radius);left:0;right:0;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}.picker-toolbar.sc-ion-picker-ios{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-ios{border:0;font-family:inherit}.picker-button.sc-ion-picker-ios:active,.picker-button.sc-ion-picker-ios:focus{outline:none}.picker-columns.sc-ion-picker-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;overflow:hidden}.picker-above-highlight.sc-ion-picker-ios,.picker-below-highlight.sc-ion-picker-ios{display:none;pointer-events:none}.sc-ion-picker-ios-h{--background:var(--ion-background-color, #fff);--border-width:1px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-ios{display:-ms-flexbox;display:flex;height:44px;border-bottom:0.55px solid var(--border-color)}.picker-toolbar-button.sc-ion-picker-ios{-ms-flex:1;flex:1;text-align:end}.picker-toolbar-button.sc-ion-picker-ios:last-child .picker-button.sc-ion-picker-ios{font-weight:600}.picker-toolbar-button.sc-ion-picker-ios:first-child{font-weight:normal;text-align:start}.picker-button.sc-ion-picker-ios,.picker-button.ion-activated.sc-ion-picker-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:1em;padding-inline-start:1em;-webkit-padding-end:1em;padding-inline-end:1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #3880ff);font-size:16px}.picker-columns.sc-ion-picker-ios{height:215px;-webkit-perspective:1000px;perspective:1000px}.picker-above-highlight.sc-ion-picker-ios{top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:81px;border-bottom:1px solid var(--border-color);background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to bottom, var(--background, var(--ion-background-color, #fff)) 20%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:10}@supports (inset-inline-start: 0){.picker-above-highlight.sc-ion-picker-ios{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-above-highlight.sc-ion-picker-ios{left:0}[dir=rtl].sc-ion-picker-ios-h .picker-above-highlight.sc-ion-picker-ios,[dir=rtl] .sc-ion-picker-ios-h .picker-above-highlight.sc-ion-picker-ios{left:unset;right:unset;right:0}[dir=rtl].sc-ion-picker-ios .picker-above-highlight.sc-ion-picker-ios{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-above-highlight.sc-ion-picker-ios:dir(rtl){left:unset;right:unset;right:0}}}.picker-below-highlight.sc-ion-picker-ios{top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:119px;border-top:1px solid var(--border-color);background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to top, var(--background, var(--ion-background-color, #fff)) 30%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:11}@supports (inset-inline-start: 0){.picker-below-highlight.sc-ion-picker-ios{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-below-highlight.sc-ion-picker-ios{left:0}[dir=rtl].sc-ion-picker-ios-h .picker-below-highlight.sc-ion-picker-ios,[dir=rtl] .sc-ion-picker-ios-h .picker-below-highlight.sc-ion-picker-ios{left:unset;right:unset;right:0}[dir=rtl].sc-ion-picker-ios .picker-below-highlight.sc-ion-picker-ios{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-below-highlight.sc-ion-picker-ios:dir(rtl){left:unset;right:unset;right:0}}}";
24466
+ const pickerIosCss$1 = "/*!@:host*/.sc-ion-picker-ios-h{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,\n:host .picker-after*/.sc-ion-picker-ios-h .picker-before.sc-ion-picker-ios,.sc-ion-picker-ios-h .picker-after.sc-ion-picker-ios{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}/*!@:host .picker-before*/.sc-ion-picker-ios-h .picker-before.sc-ion-picker-ios{top:0;height:83px}@supports (inset-inline-start: 0){/*!@:host .picker-before*/.sc-ion-picker-ios-h .picker-before.sc-ion-picker-ios{inset-inline-start:0}}@supports not (inset-inline-start: 0){/*!@:host .picker-before*/.sc-ion-picker-ios-h .picker-before.sc-ion-picker-ios{left:0}/*!@:host-context([dir=rtl]) .picker-before*/[dir=rtl].sc-ion-picker-ios-h .picker-before.sc-ion-picker-ios,[dir=rtl] .sc-ion-picker-ios-h .picker-before.sc-ion-picker-ios{left:unset;right:unset;right:0}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-picker-ios selector(.sc-ion-picker-ios:dir(rtl)){.sc-ion-picker-ios-h:dir(rtl) .picker-before{left:unset;right:unset;right:0}}}/*!@:host .picker-after*/.sc-ion-picker-ios-h .picker-after.sc-ion-picker-ios{top:116px;height:84px}@supports (inset-inline-start: 0){/*!@:host .picker-after*/.sc-ion-picker-ios-h .picker-after.sc-ion-picker-ios{inset-inline-start:0}}@supports not (inset-inline-start: 0){/*!@:host .picker-after*/.sc-ion-picker-ios-h .picker-after.sc-ion-picker-ios{left:0}/*!@:host-context([dir=rtl]) .picker-after*/[dir=rtl].sc-ion-picker-ios-h .picker-after.sc-ion-picker-ios,[dir=rtl] .sc-ion-picker-ios-h .picker-after.sc-ion-picker-ios{left:unset;right:unset;right:0}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-picker-ios selector(.sc-ion-picker-ios:dir(rtl)){.sc-ion-picker-ios-h:dir(rtl) .picker-after{left:unset;right:unset;right:0}}}/*!@:host .picker-highlight*/.sc-ion-picker-ios-h .picker-highlight.sc-ion-picker-ios{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*/.sc-ion-picker-ios-h input.sc-ion-picker-ios{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)*/.sc-ion-picker-ios-h .sc-ion-picker-ios-s>ion-picker-column:first-of-type{text-align:start}/*!@:host ::slotted(ion-picker-column:last-of-type)*/.sc-ion-picker-ios-h .sc-ion-picker-ios-s>ion-picker-column:last-of-type{text-align:end}/*!@:host ::slotted(ion-picker-column:only-child)*/.sc-ion-picker-ios-h .sc-ion-picker-ios-s>ion-picker-column:only-child{text-align:center}/*!@:host .picker-before*/.sc-ion-picker-ios-h .picker-before.sc-ion-picker-ios{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*/.sc-ion-picker-ios-h .picker-after.sc-ion-picker-ios{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*/.sc-ion-picker-ios-h .picker-highlight.sc-ion-picker-ios{background:var(--wheel-highlight-background, var(--ion-color-step-150, #eeeeef))}";
24526
24467
 
24527
- const pickerMdCss = ".sc-ion-picker-md-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}@supports (inset-inline-start: 0){.sc-ion-picker-md-h{inset-inline-start:0}}@supports not (inset-inline-start: 0){.sc-ion-picker-md-h{left:0}[dir=rtl].sc-ion-picker-md-h,[dir=rtl] .sc-ion-picker-md-h{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.sc-ion-picker-md-h:dir(rtl){left:unset;right:unset;right:0}}}.overlay-hidden.sc-ion-picker-md-h{display:none}.picker-wrapper.sc-ion-picker-md{border-radius:var(--border-radius);left:0;right:0;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}.picker-toolbar.sc-ion-picker-md{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-md{border:0;font-family:inherit}.picker-button.sc-ion-picker-md:active,.picker-button.sc-ion-picker-md:focus{outline:none}.picker-columns.sc-ion-picker-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;overflow:hidden}.picker-above-highlight.sc-ion-picker-md,.picker-below-highlight.sc-ion-picker-md{display:none;pointer-events:none}.sc-ion-picker-md-h{--background:var(--ion-background-color, #fff);--border-width:0.55px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-md{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;height:44px}.picker-button.sc-ion-picker-md,.picker-button.ion-activated.sc-ion-picker-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:1.1em;padding-inline-start:1.1em;-webkit-padding-end:1.1em;padding-inline-end:1.1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #3880ff);font-size:14px;font-weight:500;text-transform:uppercase;-webkit-box-shadow:none;box-shadow:none}.picker-columns.sc-ion-picker-md{height:216px;-webkit-perspective:1800px;perspective:1800px}.picker-above-highlight.sc-ion-picker-md{top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:81px;border-bottom:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to bottom, var(--ion-background-color, #fff) 20%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:10}@supports (inset-inline-start: 0){.picker-above-highlight.sc-ion-picker-md{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-above-highlight.sc-ion-picker-md{left:0}[dir=rtl].sc-ion-picker-md-h .picker-above-highlight.sc-ion-picker-md,[dir=rtl] .sc-ion-picker-md-h .picker-above-highlight.sc-ion-picker-md{left:unset;right:unset;right:0}[dir=rtl].sc-ion-picker-md .picker-above-highlight.sc-ion-picker-md{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-above-highlight.sc-ion-picker-md:dir(rtl){left:unset;right:unset;right:0}}}.picker-below-highlight.sc-ion-picker-md{top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:119px;border-top:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to top, var(--ion-background-color, #fff) 30%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:11}@supports (inset-inline-start: 0){.picker-below-highlight.sc-ion-picker-md{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-below-highlight.sc-ion-picker-md{left:0}[dir=rtl].sc-ion-picker-md-h .picker-below-highlight.sc-ion-picker-md,[dir=rtl] .sc-ion-picker-md-h .picker-below-highlight.sc-ion-picker-md{left:unset;right:unset;right:0}[dir=rtl].sc-ion-picker-md .picker-below-highlight.sc-ion-picker-md{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-below-highlight.sc-ion-picker-md:dir(rtl){left:unset;right:unset;right:0}}}";
24468
+ const pickerMdCss$1 = "/*!@:host*/.sc-ion-picker-md-h{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,\n:host .picker-after*/.sc-ion-picker-md-h .picker-before.sc-ion-picker-md,.sc-ion-picker-md-h .picker-after.sc-ion-picker-md{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}/*!@:host .picker-before*/.sc-ion-picker-md-h .picker-before.sc-ion-picker-md{top:0;height:83px}@supports (inset-inline-start: 0){/*!@:host .picker-before*/.sc-ion-picker-md-h .picker-before.sc-ion-picker-md{inset-inline-start:0}}@supports not (inset-inline-start: 0){/*!@:host .picker-before*/.sc-ion-picker-md-h .picker-before.sc-ion-picker-md{left:0}/*!@:host-context([dir=rtl]) .picker-before*/[dir=rtl].sc-ion-picker-md-h .picker-before.sc-ion-picker-md,[dir=rtl] .sc-ion-picker-md-h .picker-before.sc-ion-picker-md{left:unset;right:unset;right:0}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-picker-md selector(.sc-ion-picker-md:dir(rtl)){.sc-ion-picker-md-h:dir(rtl) .picker-before{left:unset;right:unset;right:0}}}/*!@:host .picker-after*/.sc-ion-picker-md-h .picker-after.sc-ion-picker-md{top:116px;height:84px}@supports (inset-inline-start: 0){/*!@:host .picker-after*/.sc-ion-picker-md-h .picker-after.sc-ion-picker-md{inset-inline-start:0}}@supports not (inset-inline-start: 0){/*!@:host .picker-after*/.sc-ion-picker-md-h .picker-after.sc-ion-picker-md{left:0}/*!@:host-context([dir=rtl]) .picker-after*/[dir=rtl].sc-ion-picker-md-h .picker-after.sc-ion-picker-md,[dir=rtl] .sc-ion-picker-md-h .picker-after.sc-ion-picker-md{left:unset;right:unset;right:0}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-picker-md selector(.sc-ion-picker-md:dir(rtl)){.sc-ion-picker-md-h:dir(rtl) .picker-after{left:unset;right:unset;right:0}}}/*!@:host .picker-highlight*/.sc-ion-picker-md-h .picker-highlight.sc-ion-picker-md{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*/.sc-ion-picker-md-h input.sc-ion-picker-md{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)*/.sc-ion-picker-md-h .sc-ion-picker-md-s>ion-picker-column:first-of-type{text-align:start}/*!@:host ::slotted(ion-picker-column:last-of-type)*/.sc-ion-picker-md-h .sc-ion-picker-md-s>ion-picker-column:last-of-type{text-align:end}/*!@:host ::slotted(ion-picker-column:only-child)*/.sc-ion-picker-md-h .sc-ion-picker-md-s>ion-picker-column:only-child{text-align:center}/*!@:host .picker-before*/.sc-ion-picker-md-h .picker-before.sc-ion-picker-md{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*/.sc-ion-picker-md-h .picker-after.sc-ion-picker-md{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%)}";
24528
24469
 
24529
- // TODO(FW-2832): types
24530
24470
  /**
24531
24471
  * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
24532
24472
  */
24533
- class Picker {
24473
+ class Picker$1 {
24534
24474
  constructor(hostRef) {
24535
24475
  registerInstance(this, hostRef);
24536
- this.didPresent = createEvent(this, "ionPickerDidPresent", 7);
24537
- this.willPresent = createEvent(this, "ionPickerWillPresent", 7);
24538
- this.willDismiss = createEvent(this, "ionPickerWillDismiss", 7);
24539
- this.didDismiss = createEvent(this, "ionPickerDidDismiss", 7);
24540
- this.didPresentShorthand = createEvent(this, "didPresent", 7);
24541
- this.willPresentShorthand = createEvent(this, "willPresent", 7);
24542
- this.willDismissShorthand = createEvent(this, "willDismiss", 7);
24543
- this.didDismissShorthand = createEvent(this, "didDismiss", 7);
24544
- this.delegateController = createDelegateController(this);
24545
- this.lockController = createLockController();
24546
- this.triggerController = createTriggerController();
24547
- this.onBackdropTap = () => {
24548
- this.dismiss(undefined, BACKDROP);
24549
- };
24550
- this.dispatchCancelHandler = (ev) => {
24551
- const role = ev.detail.role;
24552
- if (isCancel(role)) {
24553
- const cancelButton = this.buttons.find((b) => b.role === 'cancel');
24554
- this.callButtonHandler(cancelButton);
24476
+ this.ionInputModeChange = createEvent(this, "ionInputModeChange", 7);
24477
+ this.useInputMode = false;
24478
+ this.isInHighlightBounds = (ev) => {
24479
+ const { highlightEl } = this;
24480
+ if (!highlightEl) {
24481
+ return false;
24482
+ }
24483
+ const bbox = highlightEl.getBoundingClientRect();
24484
+ /**
24485
+ * Check to see if the user clicked
24486
+ * outside the bounds of the highlight.
24487
+ */
24488
+ const outsideX = ev.clientX < bbox.left || ev.clientX > bbox.right;
24489
+ const outsideY = ev.clientY < bbox.top || ev.clientY > bbox.bottom;
24490
+ if (outsideX || outsideY) {
24491
+ return false;
24555
24492
  }
24493
+ return true;
24556
24494
  };
24557
- this.presented = false;
24558
- this.overlayIndex = undefined;
24559
- this.delegate = undefined;
24560
- this.hasController = false;
24561
- this.keyboardClose = true;
24562
- this.enterAnimation = undefined;
24563
- this.leaveAnimation = undefined;
24564
- this.buttons = [];
24565
- this.columns = [];
24566
- this.cssClass = undefined;
24567
- this.duration = 0;
24568
- this.showBackdrop = true;
24569
- this.backdropDismiss = true;
24570
- this.animated = true;
24571
- this.htmlAttributes = undefined;
24572
- this.isOpen = false;
24573
- this.trigger = undefined;
24574
- }
24575
- onIsOpenChange(newValue, oldValue) {
24576
- if (newValue === true && oldValue === false) {
24577
- this.present();
24578
- }
24579
- else if (newValue === false && oldValue === true) {
24580
- this.dismiss();
24581
- }
24582
- }
24583
- triggerChanged() {
24584
- const { trigger, el, triggerController } = this;
24585
- if (trigger) {
24586
- triggerController.addClickListener(el, trigger);
24587
- }
24588
- }
24589
- connectedCallback() {
24590
- prepareOverlay(this.el);
24591
- this.triggerChanged();
24592
- }
24593
- disconnectedCallback() {
24594
- this.triggerController.removeClickListener();
24595
- }
24596
- componentWillLoad() {
24597
- setOverlayId(this.el);
24598
- }
24599
- componentDidLoad() {
24600
24495
  /**
24601
- * If picker was rendered with isOpen="true"
24602
- * then we should open picker immediately.
24496
+ * If we are no longer focused
24497
+ * on a picker column, then we should
24498
+ * exit input mode. An exception is made
24499
+ * for the input in the picker since having
24500
+ * that focused means we are still in input mode.
24603
24501
  */
24604
- if (this.isOpen === true) {
24605
- raf(() => this.present());
24606
- }
24607
- }
24608
- /**
24609
- * Present the picker overlay after it has been created.
24610
- */
24611
- async present() {
24612
- const unlock = await this.lockController.lock();
24613
- await this.delegateController.attachViewToDom();
24614
- await present(this, 'pickerEnter', iosEnterAnimation$2, iosEnterAnimation$2, undefined);
24615
- if (this.duration > 0) {
24616
- this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
24617
- }
24618
- unlock();
24619
- }
24620
- /**
24621
- * Dismiss the picker overlay after it has been presented.
24622
- *
24623
- * @param data Any data to emit in the dismiss events.
24624
- * @param role The role of the element that is dismissing the picker.
24625
- * This can be useful in a button handler for determining which button was
24626
- * clicked to dismiss the picker.
24627
- * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
24628
- */
24629
- async dismiss(data, role) {
24630
- const unlock = await this.lockController.lock();
24631
- if (this.durationTimeout) {
24632
- clearTimeout(this.durationTimeout);
24633
- }
24634
- const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation$2, iosLeaveAnimation$2);
24635
- if (dismissed) {
24636
- this.delegateController.removeViewFromDom();
24637
- }
24638
- unlock();
24639
- return dismissed;
24640
- }
24641
- /**
24642
- * Returns a promise that resolves when the picker did dismiss.
24643
- */
24644
- onDidDismiss() {
24645
- return eventMethod(this.el, 'ionPickerDidDismiss');
24646
- }
24647
- /**
24648
- * Returns a promise that resolves when the picker will dismiss.
24649
- */
24650
- onWillDismiss() {
24651
- return eventMethod(this.el, 'ionPickerWillDismiss');
24652
- }
24653
- /**
24654
- * Get the column that matches the specified name.
24655
- *
24656
- * @param name The name of the column.
24657
- */
24658
- getColumn(name) {
24659
- return Promise.resolve(this.columns.find((column) => column.name === name));
24660
- }
24661
- async buttonClick(button) {
24662
- const role = button.role;
24663
- if (isCancel(role)) {
24664
- return this.dismiss(undefined, role);
24665
- }
24666
- const shouldDismiss = await this.callButtonHandler(button);
24667
- if (shouldDismiss) {
24668
- return this.dismiss(this.getSelected(), button.role);
24669
- }
24670
- return Promise.resolve();
24671
- }
24672
- async callButtonHandler(button) {
24673
- if (button) {
24674
- // a handler has been provided, execute it
24675
- // pass the handler the values from the inputs
24676
- const rtn = await safeCall(button.handler, this.getSelected());
24677
- if (rtn === false) {
24678
- // if the return value of the handler is false then do not dismiss
24679
- return false;
24502
+ this.onFocusOut = (ev) => {
24503
+ // TODO(FW-2832): type
24504
+ const { relatedTarget } = ev;
24505
+ if (!relatedTarget || (relatedTarget.tagName !== 'ION-PICKER-COLUMN' && relatedTarget !== this.inputEl)) {
24506
+ this.exitInputMode();
24680
24507
  }
24681
- }
24682
- return true;
24683
- }
24684
- getSelected() {
24685
- const selected = {};
24686
- this.columns.forEach((col, index) => {
24687
- const selectedColumn = col.selectedIndex !== undefined ? col.options[col.selectedIndex] : undefined;
24688
- selected[col.name] = {
24689
- text: selectedColumn ? selectedColumn.text : undefined,
24690
- value: selectedColumn ? selectedColumn.value : undefined,
24691
- columnIndex: index,
24692
- };
24693
- });
24694
- return selected;
24695
- }
24696
- render() {
24697
- const { htmlAttributes } = this;
24698
- const mode = getIonMode$1(this);
24699
- return (hAsync(Host, Object.assign({ "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
24700
- zIndex: `${20000 + this.overlayIndex}`,
24701
- }, class: Object.assign({ [mode]: true,
24702
- // Used internally for styling
24703
- [`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), hAsync("ion-backdrop", { visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { tabindex: "0" }), hAsync("div", { class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, hAsync("div", { class: "picker-toolbar" }, this.buttons.map((b) => (hAsync("div", { class: buttonWrapperClass(b) }, hAsync("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass$1(b) }, b.text))))), hAsync("div", { class: "picker-columns" }, hAsync("div", { class: "picker-above-highlight" }), this.presented && this.columns.map((c) => hAsync("ion-picker-column", { col: c })), hAsync("div", { class: "picker-below-highlight" }))), hAsync("div", { tabindex: "0" })));
24704
- }
24705
- get el() { return getElement(this); }
24706
- static get watchers() { return {
24707
- "isOpen": ["onIsOpenChange"],
24708
- "trigger": ["triggerChanged"]
24709
- }; }
24710
- static get style() { return {
24711
- ios: pickerIosCss,
24712
- md: pickerMdCss
24713
- }; }
24714
- static get cmpMeta() { return {
24715
- "$flags$": 34,
24716
- "$tagName$": "ion-picker",
24717
- "$members$": {
24718
- "overlayIndex": [2, "overlay-index"],
24719
- "delegate": [16],
24720
- "hasController": [4, "has-controller"],
24721
- "keyboardClose": [4, "keyboard-close"],
24722
- "enterAnimation": [16],
24723
- "leaveAnimation": [16],
24724
- "buttons": [16],
24725
- "columns": [16],
24726
- "cssClass": [1, "css-class"],
24727
- "duration": [2],
24728
- "showBackdrop": [4, "show-backdrop"],
24729
- "backdropDismiss": [4, "backdrop-dismiss"],
24730
- "animated": [4],
24731
- "htmlAttributes": [16],
24732
- "isOpen": [4, "is-open"],
24733
- "trigger": [1],
24734
- "presented": [32],
24735
- "present": [64],
24736
- "dismiss": [64],
24737
- "onDidDismiss": [64],
24738
- "onWillDismiss": [64],
24739
- "getColumn": [64]
24740
- },
24741
- "$listeners$": undefined,
24742
- "$lazyBundleId$": "-",
24743
- "$attrsToReflect$": []
24744
- }; }
24745
- }
24746
- const buttonWrapperClass = (button) => {
24747
- return {
24748
- [`picker-toolbar-${button.role}`]: button.role !== undefined,
24749
- 'picker-toolbar-button': true,
24750
- };
24751
- };
24752
- const buttonClass$1 = (button) => {
24753
- return Object.assign({ 'picker-button': true, 'ion-activatable': true }, getClassMap(button.cssClass));
24754
- };
24755
-
24756
- const pickerColumnIosCss = ".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}@supports (inset-inline-start: 0){.picker-opt{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-opt{left:0}:host-context([dir=rtl]) .picker-opt{left:unset;right:unset;right:0}[dir=rtl] .picker-opt{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-opt:dir(rtl){left:unset;right:unset;right:0}}}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:20px;line-height:42px;pointer-events:none}.picker-opt{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-transform-origin:center center;transform-origin:center center;height:46px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:20px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}:host-context([dir=rtl]) .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}[dir=rtl] .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}@supports selector(:dir(rtl)){.picker-opt:dir(rtl){-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}}";
24757
-
24758
- const pickerColumnMdCss = ".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}@supports (inset-inline-start: 0){.picker-opt{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-opt{left:0}:host-context([dir=rtl]) .picker-opt{left:unset;right:unset;right:0}[dir=rtl] .picker-opt{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-opt:dir(rtl){left:unset;right:unset;right:0}}}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:22px;line-height:42px;pointer-events:none}.picker-opt{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;height:43px;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:22px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}.picker-prefix,.picker-suffix,.picker-opt.picker-opt-selected{color:var(--ion-color-primary, #3880ff)}";
24759
-
24760
- /**
24761
- * @internal
24762
- */
24763
- class PickerColumnCmp {
24764
- constructor(hostRef) {
24765
- registerInstance(this, hostRef);
24766
- this.ionPickerColChange = createEvent(this, "ionPickerColChange", 7);
24767
- this.optHeight = 0;
24768
- this.rotateFactor = 0;
24769
- this.scaleFactor = 1;
24770
- this.velocity = 0;
24771
- this.y = 0;
24772
- this.noAnimate = true;
24773
- // `colDidChange` is a flag that gets set when the column is changed
24774
- // dynamically. When this flag is set, the column will refresh
24775
- // after the component re-renders to incorporate the new column data.
24776
- // This is necessary because `this.refresh` queries for the option elements,
24777
- // so it needs to wait for the latest elements to be available in the DOM.
24778
- // Ex: column is created with 3 options. User updates the column data
24779
- // to have 5 options. The column will still think it only has 3 options.
24780
- this.colDidChange = false;
24781
- this.col = undefined;
24782
- }
24783
- colChanged() {
24784
- this.colDidChange = true;
24785
- }
24786
- async connectedCallback() {
24787
- let pickerRotateFactor = 0;
24788
- let pickerScaleFactor = 0.81;
24789
- const mode = getIonMode$1(this);
24790
- if (mode === 'ios') {
24791
- pickerRotateFactor = -0.46;
24792
- pickerScaleFactor = 1;
24793
- }
24794
- this.rotateFactor = pickerRotateFactor;
24795
- this.scaleFactor = pickerScaleFactor;
24796
- this.gesture = (await Promise.resolve().then(function () { return index; })).createGesture({
24797
- el: this.el,
24798
- gestureName: 'picker-swipe',
24799
- gesturePriority: 100,
24800
- threshold: 0,
24801
- passive: false,
24802
- onStart: (ev) => this.onStart(ev),
24803
- onMove: (ev) => this.onMove(ev),
24804
- onEnd: (ev) => this.onEnd(ev),
24805
- });
24806
- this.gesture.enable();
24807
- // Options have not been initialized yet
24808
- // Animation must be disabled through the `noAnimate` flag
24809
- // Otherwise, the options will render
24810
- // at the top of the column and transition down
24811
- this.tmrId = setTimeout(() => {
24812
- this.noAnimate = false;
24813
- // After initialization, `refresh()` will be called
24814
- // At this point, animation will be enabled. The options will
24815
- // animate as they are being selected.
24816
- this.refresh(true);
24817
- }, 250);
24818
- }
24819
- componentDidLoad() {
24820
- this.onDomChange();
24821
- }
24822
- componentDidUpdate() {
24823
- // Options may have changed since last update.
24824
- if (this.colDidChange) {
24825
- // Animation must be disabled through the `onDomChange` parameter.
24826
- // Otherwise, the recently added options will render
24827
- // at the top of the column and transition down
24828
- this.onDomChange(true, false);
24829
- this.colDidChange = false;
24830
- }
24831
- }
24832
- disconnectedCallback() {
24833
- if (this.rafId !== undefined)
24834
- cancelAnimationFrame(this.rafId);
24835
- if (this.tmrId)
24836
- clearTimeout(this.tmrId);
24837
- if (this.gesture) {
24838
- this.gesture.destroy();
24839
- this.gesture = undefined;
24840
- }
24841
- }
24842
- emitColChange() {
24843
- this.ionPickerColChange.emit(this.col);
24844
- }
24845
- setSelected(selectedIndex, duration) {
24846
- // if there is a selected index, then figure out it's y position
24847
- // if there isn't a selected index, then just use the top y position
24848
- const y = selectedIndex > -1 ? -(selectedIndex * this.optHeight) : 0;
24849
- this.velocity = 0;
24850
- // set what y position we're at
24851
- if (this.rafId !== undefined)
24852
- cancelAnimationFrame(this.rafId);
24853
- this.update(y, duration, true);
24854
- this.emitColChange();
24855
- }
24856
- update(y, duration, saveY) {
24857
- if (!this.optsEl) {
24858
- return;
24859
- }
24860
- // ensure we've got a good round number :)
24861
- let translateY = 0;
24862
- let translateZ = 0;
24863
- const { col, rotateFactor } = this;
24864
- const prevSelected = col.selectedIndex;
24865
- const selectedIndex = (col.selectedIndex = this.indexForY(-y));
24866
- const durationStr = duration === 0 ? '' : duration + 'ms';
24867
- const scaleStr = `scale(${this.scaleFactor})`;
24868
- const children = this.optsEl.children;
24869
- for (let i = 0; i < children.length; i++) {
24870
- const button = children[i];
24871
- const opt = col.options[i];
24872
- const optOffset = i * this.optHeight + y;
24873
- let transform = '';
24874
- if (rotateFactor !== 0) {
24875
- const rotateX = optOffset * rotateFactor;
24876
- if (Math.abs(rotateX) <= 90) {
24877
- translateY = 0;
24878
- translateZ = 90;
24879
- transform = `rotateX(${rotateX}deg) `;
24508
+ };
24509
+ /**
24510
+ * When picker columns receive focus
24511
+ * the parent picker needs to determine
24512
+ * whether to enter/exit input mode.
24513
+ */
24514
+ this.onFocusIn = (ev) => {
24515
+ // TODO(FW-2832): type
24516
+ const { target } = ev;
24517
+ /**
24518
+ * Due to browser differences in how/when focus
24519
+ * is dispatched on certain elements, we need to
24520
+ * make sure that this function only ever runs when
24521
+ * focusing a picker column.
24522
+ */
24523
+ if (target.tagName !== 'ION-PICKER-COLUMN') {
24524
+ return;
24525
+ }
24526
+ /**
24527
+ * If we have actionOnClick
24528
+ * then this means the user focused
24529
+ * a picker column via mouse or
24530
+ * touch (i.e. a PointerEvent). As a result,
24531
+ * we should not enter/exit input mode
24532
+ * until the click event has fired, which happens
24533
+ * after the `focusin` event.
24534
+ *
24535
+ * Otherwise, the user likely focused
24536
+ * the column using their keyboard and
24537
+ * we should enter/exit input mode automatically.
24538
+ */
24539
+ if (!this.actionOnClick) {
24540
+ const columnEl = target;
24541
+ const allowInput = columnEl.numericInput;
24542
+ if (allowInput) {
24543
+ this.enterInputMode(columnEl, false);
24880
24544
  }
24881
24545
  else {
24882
- translateY = -9999;
24546
+ this.exitInputMode();
24883
24547
  }
24884
24548
  }
24885
- else {
24886
- translateZ = 0;
24887
- translateY = optOffset;
24888
- }
24889
- const selected = selectedIndex === i;
24890
- transform += `translate3d(0px,${translateY}px,${translateZ}px) `;
24891
- if (this.scaleFactor !== 1 && !selected) {
24892
- transform += scaleStr;
24893
- }
24894
- // Update transition duration
24895
- if (this.noAnimate) {
24896
- opt.duration = 0;
24897
- button.style.transitionDuration = '';
24898
- }
24899
- else if (duration !== opt.duration) {
24900
- opt.duration = duration;
24901
- button.style.transitionDuration = durationStr;
24902
- }
24903
- // Update transform
24904
- if (transform !== opt.transform) {
24905
- opt.transform = transform;
24549
+ };
24550
+ /**
24551
+ * On click we need to run an actionOnClick
24552
+ * function that has been set in onPointerDown
24553
+ * so that we enter/exit input mode correctly.
24554
+ */
24555
+ this.onClick = () => {
24556
+ const { actionOnClick } = this;
24557
+ if (actionOnClick) {
24558
+ actionOnClick();
24559
+ this.actionOnClick = undefined;
24560
+ }
24561
+ };
24562
+ /**
24563
+ * Clicking a column also focuses the column on
24564
+ * certain browsers, so we use onPointerDown
24565
+ * to tell the onFocusIn function that users
24566
+ * are trying to click the column rather than
24567
+ * focus the column using the keyboard. When the
24568
+ * user completes the click, the onClick function
24569
+ * runs and runs the actionOnClick callback.
24570
+ */
24571
+ this.onPointerDown = (ev) => {
24572
+ const { useInputMode, inputModeColumn, el } = this;
24573
+ if (this.isInHighlightBounds(ev)) {
24574
+ /**
24575
+ * If we were already in
24576
+ * input mode, then we should determine
24577
+ * if we tapped a particular column and
24578
+ * should switch to input mode for
24579
+ * that specific column.
24580
+ */
24581
+ if (useInputMode) {
24582
+ /**
24583
+ * If we tapped a picker column
24584
+ * then we should either switch to input
24585
+ * mode for that column or all columns.
24586
+ * Otherwise we should exit input mode
24587
+ * since we just tapped the highlight and
24588
+ * not a column.
24589
+ */
24590
+ if (ev.target.tagName === 'ION-PICKER-COLUMN') {
24591
+ /**
24592
+ * If user taps 2 different columns
24593
+ * then we should just switch to input mode
24594
+ * for the new column rather than switching to
24595
+ * input mode for all columns.
24596
+ */
24597
+ if (inputModeColumn && inputModeColumn === ev.target) {
24598
+ this.actionOnClick = () => {
24599
+ this.enterInputMode();
24600
+ };
24601
+ }
24602
+ else {
24603
+ this.actionOnClick = () => {
24604
+ this.enterInputMode(ev.target);
24605
+ };
24606
+ }
24607
+ }
24608
+ else {
24609
+ this.actionOnClick = () => {
24610
+ this.exitInputMode();
24611
+ };
24612
+ }
24613
+ /**
24614
+ * If we were not already in
24615
+ * input mode, then we should
24616
+ * enter input mode for all columns.
24617
+ */
24618
+ }
24619
+ else {
24620
+ /**
24621
+ * If there is only 1 numeric input column
24622
+ * then we should skip multi column input.
24623
+ */
24624
+ const columns = el.querySelectorAll('ion-picker-column.picker-column-numeric-input');
24625
+ const columnEl = columns.length === 1 ? ev.target : undefined;
24626
+ this.actionOnClick = () => {
24627
+ this.enterInputMode(columnEl);
24628
+ };
24629
+ }
24630
+ return;
24631
+ }
24632
+ this.actionOnClick = () => {
24633
+ this.exitInputMode();
24634
+ };
24635
+ };
24636
+ /**
24637
+ * Enters input mode to allow
24638
+ * for text entry of numeric values.
24639
+ * If on mobile, we focus a hidden input
24640
+ * field so that the on screen keyboard
24641
+ * is brought up. When tabbing using a
24642
+ * keyboard, picker columns receive an outline
24643
+ * to indicate they are focused. As a result,
24644
+ * we should not focus the hidden input as it
24645
+ * would cause the outline to go away, preventing
24646
+ * users from having any visual indication of which
24647
+ * column is focused.
24648
+ */
24649
+ this.enterInputMode = (columnEl, focusInput = true) => {
24650
+ const { inputEl, el } = this;
24651
+ if (!inputEl) {
24652
+ return;
24906
24653
  }
24907
- button.style.transform = transform;
24908
24654
  /**
24909
- * Ensure that the select column
24910
- * item has the selected class
24655
+ * Only active input mode if there is at
24656
+ * least one column that accepts numeric input.
24911
24657
  */
24912
- opt.selected = selected;
24913
- if (selected) {
24914
- button.classList.add(PICKER_OPT_SELECTED);
24658
+ const hasInputColumn = el.querySelector('ion-picker-column.picker-column-numeric-input');
24659
+ if (!hasInputColumn) {
24660
+ return;
24661
+ }
24662
+ /**
24663
+ * If columnEl is undefined then
24664
+ * it is assumed that all numeric pickers
24665
+ * are eligible for text entry.
24666
+ * (i.e. hour and minute columns)
24667
+ */
24668
+ this.useInputMode = true;
24669
+ this.inputModeColumn = columnEl;
24670
+ /**
24671
+ * Users with a keyboard and mouse can
24672
+ * activate input mode where the input is
24673
+ * focused as well as when it is not focused,
24674
+ * so we need to make sure we clean up any
24675
+ * old listeners.
24676
+ */
24677
+ if (focusInput) {
24678
+ if (this.destroyKeypressListener) {
24679
+ this.destroyKeypressListener();
24680
+ this.destroyKeypressListener = undefined;
24681
+ }
24682
+ inputEl.focus();
24915
24683
  }
24916
24684
  else {
24917
- button.classList.remove(PICKER_OPT_SELECTED);
24685
+ el.addEventListener('keypress', this.onKeyPress);
24686
+ this.destroyKeypressListener = () => {
24687
+ el.removeEventListener('keypress', this.onKeyPress);
24688
+ };
24918
24689
  }
24919
- }
24920
- this.col.prevSelected = prevSelected;
24921
- if (saveY) {
24922
- this.y = y;
24923
- }
24924
- if (this.lastIndex !== selectedIndex) {
24925
- // have not set a last index yet
24926
- hapticSelectionChanged();
24927
- this.lastIndex = selectedIndex;
24928
- }
24929
- }
24930
- decelerate() {
24931
- if (this.velocity !== 0) {
24932
- // still decelerating
24933
- this.velocity *= DECELERATION_FRICTION;
24934
- // do not let it go slower than a velocity of 1
24935
- this.velocity = this.velocity > 0 ? Math.max(this.velocity, 1) : Math.min(this.velocity, -1);
24936
- let y = this.y + this.velocity;
24937
- if (y > this.minY) {
24938
- // whoops, it's trying to scroll up farther than the options we have!
24939
- y = this.minY;
24940
- this.velocity = 0;
24690
+ this.emitInputModeChange();
24691
+ };
24692
+ this.onKeyPress = (ev) => {
24693
+ const { inputEl } = this;
24694
+ if (!inputEl) {
24695
+ return;
24941
24696
  }
24942
- else if (y < this.maxY) {
24943
- // gahh, it's trying to scroll down farther than we can!
24944
- y = this.maxY;
24945
- this.velocity = 0;
24697
+ const parsedValue = parseInt(ev.key, 10);
24698
+ /**
24699
+ * Only numbers should be allowed
24700
+ */
24701
+ if (!Number.isNaN(parsedValue)) {
24702
+ inputEl.value += ev.key;
24703
+ this.onInputChange();
24946
24704
  }
24947
- this.update(y, 0, true);
24948
- const notLockedIn = Math.round(y) % this.optHeight !== 0 || Math.abs(this.velocity) > 1;
24949
- if (notLockedIn) {
24950
- // isn't locked in yet, keep decelerating until it is
24951
- this.rafId = requestAnimationFrame(() => this.decelerate());
24705
+ };
24706
+ this.selectSingleColumn = () => {
24707
+ const { inputEl, inputModeColumn, singleColumnSearchTimeout } = this;
24708
+ if (!inputEl || !inputModeColumn) {
24709
+ return;
24952
24710
  }
24953
- else {
24954
- this.velocity = 0;
24955
- this.emitColChange();
24956
- hapticSelectionEnd();
24711
+ const values = inputModeColumn.items.filter((item) => item.disabled !== true);
24712
+ /**
24713
+ * If users pause for a bit, the search
24714
+ * value should be reset similar to how a
24715
+ * <select> behaves. So typing "34", waiting,
24716
+ * then typing "5" should select "05".
24717
+ */
24718
+ if (singleColumnSearchTimeout) {
24719
+ clearTimeout(singleColumnSearchTimeout);
24957
24720
  }
24958
- }
24959
- else if (this.y % this.optHeight !== 0) {
24960
- // needs to still get locked into a position so options line up
24961
- const currentPos = Math.abs(this.y % this.optHeight);
24962
- // create a velocity in the direction it needs to scroll
24963
- this.velocity = currentPos > this.optHeight / 2 ? 1 : -1;
24964
- this.decelerate();
24965
- }
24966
- }
24967
- indexForY(y) {
24968
- return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);
24969
- }
24970
- onStart(detail) {
24971
- // We have to prevent default in order to block scrolling under the picker
24972
- // but we DO NOT have to stop propagation, since we still want
24973
- // some "click" events to capture
24974
- if (detail.event.cancelable) {
24975
- detail.event.preventDefault();
24976
- }
24977
- detail.event.stopPropagation();
24978
- hapticSelectionStart();
24979
- // reset everything
24980
- if (this.rafId !== undefined)
24981
- cancelAnimationFrame(this.rafId);
24982
- const options = this.col.options;
24983
- let minY = options.length - 1;
24984
- let maxY = 0;
24985
- for (let i = 0; i < options.length; i++) {
24986
- if (!options[i].disabled) {
24987
- minY = Math.min(minY, i);
24988
- maxY = Math.max(maxY, i);
24721
+ this.singleColumnSearchTimeout = setTimeout(() => {
24722
+ inputEl.value = '';
24723
+ this.singleColumnSearchTimeout = undefined;
24724
+ }, 1000);
24725
+ /**
24726
+ * For values that are longer than 2 digits long
24727
+ * we should shift the value over 1 character
24728
+ * to the left. So typing "456" would result in "56".
24729
+ * TODO: If we want to support more than just
24730
+ * time entry, we should update this value to be
24731
+ * the max length of all of the picker items.
24732
+ */
24733
+ if (inputEl.value.length >= 3) {
24734
+ const startIndex = inputEl.value.length - 2;
24735
+ const newString = inputEl.value.substring(startIndex);
24736
+ inputEl.value = newString;
24737
+ this.selectSingleColumn();
24738
+ return;
24989
24739
  }
24990
- }
24991
- this.minY = -(minY * this.optHeight);
24992
- this.maxY = -(maxY * this.optHeight);
24993
- }
24994
- onMove(detail) {
24995
- if (detail.event.cancelable) {
24996
- detail.event.preventDefault();
24997
- }
24998
- detail.event.stopPropagation();
24999
- // update the scroll position relative to pointer start position
25000
- let y = this.y + detail.deltaY;
25001
- if (y > this.minY) {
25002
- // scrolling up higher than scroll area
25003
- y = Math.pow(y, 0.8);
25004
- this.bounceFrom = y;
25005
- }
25006
- else if (y < this.maxY) {
25007
- // scrolling down below scroll area
25008
- y += Math.pow(this.maxY - y, 0.9);
25009
- this.bounceFrom = y;
25010
- }
25011
- else {
25012
- this.bounceFrom = 0;
25013
- }
25014
- this.update(y, 0, false);
25015
- }
25016
- onEnd(detail) {
25017
- if (this.bounceFrom > 0) {
25018
- // bounce back up
25019
- this.update(this.minY, 100, true);
25020
- this.emitColChange();
25021
- return;
25022
- }
25023
- else if (this.bounceFrom < 0) {
25024
- // bounce back down
25025
- this.update(this.maxY, 100, true);
25026
- this.emitColChange();
25027
- return;
25028
- }
25029
- this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);
25030
- if (this.velocity === 0 && detail.deltaY === 0) {
25031
- const opt = detail.event.target.closest('.picker-opt');
25032
- if (opt === null || opt === void 0 ? void 0 : opt.hasAttribute('opt-index')) {
25033
- this.setSelected(parseInt(opt.getAttribute('opt-index'), 10), TRANSITION_DURATION);
25034
- }
25035
- }
25036
- else {
25037
- this.y += detail.deltaY;
25038
- if (Math.abs(detail.velocityY) < 0.05) {
25039
- const isScrollingUp = detail.deltaY > 0;
25040
- const optHeightFraction = (Math.abs(this.y) % this.optHeight) / this.optHeight;
25041
- if (isScrollingUp && optHeightFraction > 0.5) {
25042
- this.velocity = Math.abs(this.velocity) * -1;
25043
- }
25044
- else if (!isScrollingUp && optHeightFraction <= 0.5) {
25045
- this.velocity = Math.abs(this.velocity);
25046
- }
25047
- }
25048
- this.decelerate();
25049
- }
25050
- }
25051
- refresh(forceRefresh, animated) {
25052
- var _a;
25053
- let min = this.col.options.length - 1;
25054
- let max = 0;
25055
- const options = this.col.options;
25056
- for (let i = 0; i < options.length; i++) {
25057
- if (!options[i].disabled) {
25058
- min = Math.min(min, i);
25059
- max = Math.max(max, i);
25060
- }
25061
- }
25062
- /**
25063
- * Only update selected value if column has a
25064
- * velocity of 0. If it does not, then the
25065
- * column is animating might land on
25066
- * a value different than the value at
25067
- * selectedIndex
25068
- */
25069
- if (this.velocity !== 0) {
25070
- return;
25071
- }
25072
- const selectedIndex = clamp(min, (_a = this.col.selectedIndex) !== null && _a !== void 0 ? _a : 0, max);
25073
- if (this.col.prevSelected !== selectedIndex || forceRefresh) {
25074
- const y = selectedIndex * this.optHeight * -1;
25075
- const duration = animated ? TRANSITION_DURATION : 0;
25076
- this.velocity = 0;
25077
- this.update(y, duration, true);
25078
- }
25079
- }
25080
- onDomChange(forceRefresh, animated) {
25081
- const colEl = this.optsEl;
25082
- if (colEl) {
25083
- // DOM READ
25084
- // We perfom a DOM read over a rendered item, this needs to happen after the first render or after the the column has changed
25085
- this.optHeight = colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0;
25086
- }
25087
- this.refresh(forceRefresh, animated);
25088
- }
25089
- render() {
25090
- const col = this.col;
25091
- const mode = getIonMode$1(this);
25092
- return (hAsync(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: {
25093
- 'max-width': this.col.columnWidth,
25094
- } }, col.prefix && (hAsync("div", { class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), hAsync("div", { class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (hAsync("button", { "aria-label": o.ariaLabel, class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, "opt-index": index }, o.text)))), col.suffix && (hAsync("div", { class: "picker-suffix", style: { width: col.suffixWidth } }, col.suffix))));
25095
- }
25096
- get el() { return getElement(this); }
25097
- static get watchers() { return {
25098
- "col": ["colChanged"]
25099
- }; }
25100
- static get style() { return {
25101
- ios: pickerColumnIosCss,
25102
- md: pickerColumnMdCss
25103
- }; }
25104
- static get cmpMeta() { return {
25105
- "$flags$": 32,
25106
- "$tagName$": "ion-picker-column",
25107
- "$members$": {
25108
- "col": [16]
25109
- },
25110
- "$listeners$": undefined,
25111
- "$lazyBundleId$": "-",
25112
- "$attrsToReflect$": []
25113
- }; }
25114
- }
25115
- const PICKER_OPT_SELECTED = 'picker-opt-selected';
25116
- const DECELERATION_FRICTION = 0.97;
25117
- const MAX_PICKER_SPEED = 90;
25118
- const TRANSITION_DURATION = 150;
25119
-
25120
- const pickerColumnInternalIosCss = "/*!@:host*/.sc-ion-picker-column-internal-ios-h{-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*/.sc-ion-picker-column-internal-ios-h::-webkit-scrollbar{display:none}/*!@:host .picker-item*/.sc-ion-picker-column-internal-ios-h .picker-item.sc-ion-picker-column-internal-ios{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,\n:host .picker-item[disabled]*/.sc-ion-picker-column-internal-ios-h .picker-item-empty.sc-ion-picker-column-internal-ios,.sc-ion-picker-column-internal-ios-h .picker-item[disabled].sc-ion-picker-column-internal-ios{cursor:default}/*!@:host .picker-item-empty,\n:host(:not([disabled])) .picker-item[disabled]*/.sc-ion-picker-column-internal-ios-h .picker-item-empty.sc-ion-picker-column-internal-ios,.sc-ion-picker-column-internal-ios-h:not([disabled]) .picker-item[disabled].sc-ion-picker-column-internal-ios{scroll-snap-align:none}/*!@:host([disabled])*/[disabled].sc-ion-picker-column-internal-ios-h{overflow-y:hidden}/*!@:host .picker-item[disabled]*/.sc-ion-picker-column-internal-ios-h .picker-item[disabled].sc-ion-picker-column-internal-ios{opacity:0.4}/*!@:host(.picker-column-active) .picker-item.picker-item-active*/.picker-column-active.sc-ion-picker-column-internal-ios-h .picker-item.picker-item-active.sc-ion-picker-column-internal-ios{color:var(--ion-color-base)}@media (any-hover: hover){/*!@:host(:focus)*/.sc-ion-picker-column-internal-ios-h:focus{outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}";
25121
-
25122
- const pickerColumnInternalMdCss = "/*!@:host*/.sc-ion-picker-column-internal-md-h{-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*/.sc-ion-picker-column-internal-md-h::-webkit-scrollbar{display:none}/*!@:host .picker-item*/.sc-ion-picker-column-internal-md-h .picker-item.sc-ion-picker-column-internal-md{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,\n:host .picker-item[disabled]*/.sc-ion-picker-column-internal-md-h .picker-item-empty.sc-ion-picker-column-internal-md,.sc-ion-picker-column-internal-md-h .picker-item[disabled].sc-ion-picker-column-internal-md{cursor:default}/*!@:host .picker-item-empty,\n:host(:not([disabled])) .picker-item[disabled]*/.sc-ion-picker-column-internal-md-h .picker-item-empty.sc-ion-picker-column-internal-md,.sc-ion-picker-column-internal-md-h:not([disabled]) .picker-item[disabled].sc-ion-picker-column-internal-md{scroll-snap-align:none}/*!@:host([disabled])*/[disabled].sc-ion-picker-column-internal-md-h{overflow-y:hidden}/*!@:host .picker-item[disabled]*/.sc-ion-picker-column-internal-md-h .picker-item[disabled].sc-ion-picker-column-internal-md{opacity:0.4}/*!@:host(.picker-column-active) .picker-item.picker-item-active*/.picker-column-active.sc-ion-picker-column-internal-md-h .picker-item.picker-item-active.sc-ion-picker-column-internal-md{color:var(--ion-color-base)}@media (any-hover: hover){/*!@:host(:focus)*/.sc-ion-picker-column-internal-md-h:focus{outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}/*!@:host .picker-item-active*/.sc-ion-picker-column-internal-md-h .picker-item-active.sc-ion-picker-column-internal-md{color:var(--ion-color-base)}";
25123
-
25124
- /**
25125
- * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
25126
- * @internal
25127
- */
25128
- class PickerColumnInternal {
25129
- constructor(hostRef) {
25130
- registerInstance(this, hostRef);
25131
- this.ionChange = createEvent(this, "ionChange", 7);
25132
- this.isScrolling = false;
25133
- this.isColumnVisible = false;
25134
- this.canExitInputMode = true;
25135
- this.centerPickerItemInView = (target, smooth = true, canExitInputMode = true) => {
25136
- const { el, isColumnVisible } = this;
25137
- if (isColumnVisible) {
25138
- // (Vertical offset from parent) - (three empty picker rows) + (half the height of the target to ensure the scroll triggers)
25139
- const top = target.offsetTop - 3 * target.clientHeight + target.clientHeight / 2;
25140
- if (el.scrollTop !== top) {
25141
- /**
25142
- * Setting this flag prevents input
25143
- * mode from exiting in the picker column's
25144
- * scroll callback. This is useful when the user manually
25145
- * taps an item or types on the keyboard as both
25146
- * of these can cause a scroll to occur.
25147
- */
25148
- this.canExitInputMode = canExitInputMode;
25149
- el.scroll({
25150
- top,
25151
- left: 0,
25152
- behavior: smooth ? 'smooth' : undefined,
25153
- });
25154
- }
25155
- }
25156
- };
25157
- this.setPickerItemActiveState = (item, isActive) => {
25158
- if (isActive) {
25159
- item.classList.add(PICKER_ITEM_ACTIVE_CLASS);
25160
- item.part.add(PICKER_ITEM_ACTIVE_PART);
25161
- }
25162
- else {
25163
- item.classList.remove(PICKER_ITEM_ACTIVE_CLASS);
25164
- item.part.remove(PICKER_ITEM_ACTIVE_PART);
25165
- }
25166
- };
25167
- /**
25168
- * When ionInputModeChange is emitted, each column
25169
- * needs to check if it is the one being made available
25170
- * for text entry.
25171
- */
25172
- this.inputModeChange = (ev) => {
25173
- if (!this.numericInput) {
24740
+ /**
24741
+ * Checking the value of the input gets priority
24742
+ * first. For example, if the value of the input
24743
+ * is "1" and we entered "2", then the complete value
24744
+ * is "12" and we should select hour 12.
24745
+ *
24746
+ * Regex removes any leading zeros from values like "02",
24747
+ * but it keeps a single zero if there are only zeros in the string.
24748
+ * 0+(?=[1-9]) --> Match 1 or more zeros that are followed by 1-9
24749
+ * 0+(?=0$) --> Match 1 or more zeros that must be followed by one 0 and end.
24750
+ */
24751
+ const findItemFromCompleteValue = values.find(({ text }) => {
24752
+ const parsedText = text.replace(/^0+(?=[1-9])|0+(?=0$)/, '');
24753
+ return parsedText === inputEl.value;
24754
+ });
24755
+ if (findItemFromCompleteValue) {
24756
+ inputModeColumn.setValue(findItemFromCompleteValue.value);
25174
24757
  return;
25175
24758
  }
25176
- const { useInputMode, inputModeColumn } = ev.detail;
25177
24759
  /**
25178
- * If inputModeColumn is undefined then this means
25179
- * all numericInput columns are being selected.
24760
+ * If we typed "56" to get minute 56, then typed "7",
24761
+ * we should select "07" as "567" is not a valid minute.
25180
24762
  */
25181
- const isColumnActive = inputModeColumn === undefined || inputModeColumn === this.el;
25182
- if (!useInputMode || !isColumnActive) {
25183
- this.setInputModeActive(false);
25184
- return;
24763
+ if (inputEl.value.length === 2) {
24764
+ const changedCharacter = inputEl.value.substring(inputEl.value.length - 1);
24765
+ inputEl.value = changedCharacter;
24766
+ this.selectSingleColumn();
25185
24767
  }
25186
- this.setInputModeActive(true);
25187
24768
  };
25188
24769
  /**
25189
- * Setting isActive will cause a re-render.
25190
- * As a result, we do not want to cause the
25191
- * re-render mid scroll as this will cause
25192
- * the picker column to jump back to
25193
- * whatever value was selected at the
25194
- * start of the scroll interaction.
24770
+ * Searches a list of column items for a particular
24771
+ * value. This is currently used for numeric values.
24772
+ * The zeroBehavior can be set to account for leading
24773
+ * or trailing zeros when looking at the item text.
25195
24774
  */
25196
- this.setInputModeActive = (state) => {
25197
- if (this.isScrolling) {
25198
- this.scrollEndCallback = () => {
25199
- this.isActive = state;
25200
- };
25201
- return;
24775
+ this.searchColumn = (colEl, value, zeroBehavior = 'start') => {
24776
+ const behavior = zeroBehavior === 'start' ? /^0+/ : /0$/;
24777
+ const item = colEl.items.find(({ text, disabled }) => disabled !== true && text.replace(behavior, '') === value);
24778
+ if (item) {
24779
+ colEl.setValue(item.value);
25202
24780
  }
25203
- this.isActive = state;
25204
24781
  };
25205
- /**
25206
- * When the column scrolls, the component
25207
- * needs to determine which item is centered
25208
- * in the view and will emit an ionChange with
25209
- * the item object.
25210
- */
25211
- this.initializeScrollListener = () => {
25212
- /**
25213
- * The haptics for the wheel picker are
25214
- * an iOS-only feature. As a result, they should
25215
- * be disabled on Android.
25216
- */
25217
- const enableHaptics = isPlatform('ios');
25218
- const { el } = this;
25219
- let timeout;
25220
- let activeEl = this.activeItem;
25221
- const scrollCallback = () => {
25222
- raf(() => {
25223
- if (timeout) {
25224
- clearTimeout(timeout);
25225
- timeout = undefined;
25226
- }
25227
- if (!this.isScrolling) {
25228
- enableHaptics && hapticSelectionStart();
25229
- this.isScrolling = true;
25230
- }
24782
+ this.selectMultiColumn = () => {
24783
+ const { inputEl, el } = this;
24784
+ if (!inputEl) {
24785
+ return;
24786
+ }
24787
+ const numericPickers = Array.from(el.querySelectorAll('ion-picker-column')).filter((col) => col.numericInput);
24788
+ const firstColumn = numericPickers[0];
24789
+ const lastColumn = numericPickers[1];
24790
+ let value = inputEl.value;
24791
+ let minuteValue;
24792
+ switch (value.length) {
24793
+ case 1:
24794
+ this.searchColumn(firstColumn, value);
24795
+ break;
24796
+ case 2:
25231
24797
  /**
25232
- * Select item in the center of the column
25233
- * which is the month/year that we want to select
24798
+ * If the first character is `0` or `1` it is
24799
+ * possible that users are trying to type `09`
24800
+ * or `11` into the hour field, so we should look
24801
+ * at that first.
25234
24802
  */
25235
- const bbox = el.getBoundingClientRect();
25236
- const centerX = bbox.x + bbox.width / 2;
25237
- const centerY = bbox.y + bbox.height / 2;
25238
- const activeElement = el.shadowRoot.elementFromPoint(centerX, centerY);
25239
- if (activeEl !== null) {
25240
- this.setPickerItemActiveState(activeEl, false);
25241
- }
25242
- if (activeElement === null || activeElement.disabled) {
25243
- return;
25244
- }
24803
+ const firstCharacter = inputEl.value.substring(0, 1);
24804
+ value = firstCharacter === '0' || firstCharacter === '1' ? inputEl.value : firstCharacter;
24805
+ this.searchColumn(firstColumn, value);
25245
24806
  /**
25246
- * If we are selecting a new value,
25247
- * we need to run haptics again.
24807
+ * If only checked the first value,
24808
+ * we can check the second value
24809
+ * for a match in the minutes column
25248
24810
  */
25249
- if (activeElement !== activeEl) {
25250
- enableHaptics && hapticSelectionChanged();
25251
- if (this.canExitInputMode) {
25252
- /**
25253
- * The native iOS wheel picker
25254
- * only dismisses the keyboard
25255
- * once the selected item has changed
25256
- * as a result of a swipe
25257
- * from the user. If `canExitInputMode` is
25258
- * `false` then this means that the
25259
- * scroll is happening as a result of
25260
- * the `value` property programmatically changing
25261
- * either by an application or by the user via the keyboard.
25262
- */
25263
- this.exitInputMode();
25264
- }
24811
+ if (value.length === 1) {
24812
+ minuteValue = inputEl.value.substring(inputEl.value.length - 1);
24813
+ this.searchColumn(lastColumn, minuteValue, 'end');
25265
24814
  }
25266
- activeEl = activeElement;
25267
- this.setPickerItemActiveState(activeElement, true);
25268
- timeout = setTimeout(() => {
25269
- this.isScrolling = false;
25270
- enableHaptics && hapticSelectionEnd();
25271
- /**
25272
- * Certain tasks (such as those that
25273
- * cause re-renders) should only be done
25274
- * once scrolling has finished, otherwise
25275
- * flickering may occur.
25276
- */
25277
- const { scrollEndCallback } = this;
25278
- if (scrollEndCallback) {
25279
- scrollEndCallback();
25280
- this.scrollEndCallback = undefined;
25281
- }
25282
- /**
25283
- * Reset this flag as the
25284
- * next scroll interaction could
25285
- * be a scroll from the user. In this
25286
- * case, we should exit input mode.
25287
- */
25288
- this.canExitInputMode = true;
25289
- const dataIndex = activeElement.getAttribute('data-index');
25290
- /**
25291
- * If no value it is
25292
- * possible we hit one of the
25293
- * empty padding columns.
25294
- */
25295
- if (dataIndex === null) {
25296
- return;
25297
- }
25298
- const index = parseInt(dataIndex, 10);
25299
- const selectedItem = this.items[index];
25300
- if (selectedItem.value !== this.value) {
25301
- this.setValue(selectedItem.value);
25302
- }
25303
- }, 250);
25304
- });
25305
- };
25306
- /**
25307
- * Wrap this in an raf so that the scroll callback
25308
- * does not fire when component is initially shown.
25309
- */
25310
- raf(() => {
25311
- el.addEventListener('scroll', scrollCallback);
25312
- this.destroyScrollListener = () => {
25313
- el.removeEventListener('scroll', scrollCallback);
25314
- };
25315
- });
24815
+ break;
24816
+ case 3:
24817
+ /**
24818
+ * If the first character is `0` or `1` it is
24819
+ * possible that users are trying to type `09`
24820
+ * or `11` into the hour field, so we should look
24821
+ * at that first.
24822
+ */
24823
+ const firstCharacterAgain = inputEl.value.substring(0, 1);
24824
+ value =
24825
+ firstCharacterAgain === '0' || firstCharacterAgain === '1'
24826
+ ? inputEl.value.substring(0, 2)
24827
+ : firstCharacterAgain;
24828
+ this.searchColumn(firstColumn, value);
24829
+ /**
24830
+ * If only checked the first value,
24831
+ * we can check the second value
24832
+ * for a match in the minutes column
24833
+ */
24834
+ minuteValue = value.length === 1 ? inputEl.value.substring(1) : inputEl.value.substring(2);
24835
+ this.searchColumn(lastColumn, minuteValue, 'end');
24836
+ break;
24837
+ case 4:
24838
+ /**
24839
+ * If the first character is `0` or `1` it is
24840
+ * possible that users are trying to type `09`
24841
+ * or `11` into the hour field, so we should look
24842
+ * at that first.
24843
+ */
24844
+ const firstCharacterAgainAgain = inputEl.value.substring(0, 1);
24845
+ value =
24846
+ firstCharacterAgainAgain === '0' || firstCharacterAgainAgain === '1'
24847
+ ? inputEl.value.substring(0, 2)
24848
+ : firstCharacterAgainAgain;
24849
+ this.searchColumn(firstColumn, value);
24850
+ /**
24851
+ * If only checked the first value,
24852
+ * we can check the second value
24853
+ * for a match in the minutes column
24854
+ */
24855
+ const minuteValueAgain = value.length === 1
24856
+ ? inputEl.value.substring(1, inputEl.value.length)
24857
+ : inputEl.value.substring(2, inputEl.value.length);
24858
+ this.searchColumn(lastColumn, minuteValueAgain, 'end');
24859
+ break;
24860
+ default:
24861
+ const startIndex = inputEl.value.length - 4;
24862
+ const newString = inputEl.value.substring(startIndex);
24863
+ inputEl.value = newString;
24864
+ this.selectMultiColumn();
24865
+ break;
24866
+ }
25316
24867
  };
25317
24868
  /**
25318
- * Tells the parent picker to
25319
- * exit text entry mode. This is only called
25320
- * when the selected item changes during scroll, so
25321
- * we know that the user likely wants to scroll
25322
- * instead of type.
24869
+ * Searches the value of the active column
24870
+ * to determine which value users are trying
24871
+ * to select
25323
24872
  */
25324
- this.exitInputMode = () => {
25325
- const { parentEl } = this;
25326
- if (parentEl == null)
24873
+ this.onInputChange = () => {
24874
+ const { useInputMode, inputEl, inputModeColumn } = this;
24875
+ if (!useInputMode || !inputEl) {
25327
24876
  return;
25328
- parentEl.exitInputMode();
25329
- /**
25330
- * setInputModeActive only takes
25331
- * effect once scrolling stops to avoid
25332
- * a component re-render while scrolling.
25333
- * However, we want the visual active
25334
- * indicator to go away immediately, so
25335
- * we call classList.remove here.
25336
- */
25337
- this.el.classList.remove('picker-column-active');
24877
+ }
24878
+ if (inputModeColumn) {
24879
+ this.selectSingleColumn();
24880
+ }
24881
+ else {
24882
+ this.selectMultiColumn();
24883
+ }
24884
+ };
24885
+ /**
24886
+ * Emit ionInputModeChange. Picker columns
24887
+ * listen for this event to determine whether
24888
+ * or not their column is "active" for text input.
24889
+ */
24890
+ this.emitInputModeChange = () => {
24891
+ const { useInputMode, inputModeColumn } = this;
24892
+ this.ionInputModeChange.emit({
24893
+ useInputMode,
24894
+ inputModeColumn,
24895
+ });
25338
24896
  };
25339
- this.isActive = false;
25340
- this.disabled = false;
25341
- this.items = [];
25342
- this.value = undefined;
25343
- this.color = 'primary';
25344
- this.numericInput = false;
25345
- }
25346
- valueChange() {
25347
- if (this.isColumnVisible) {
25348
- /**
25349
- * Only scroll the active item into view when the picker column
25350
- * is actively visible to the user.
25351
- */
25352
- this.scrollActiveItemIntoView();
25353
- }
25354
24897
  }
25355
24898
  /**
25356
- * Only setup scroll listeners
25357
- * when the picker is visible, otherwise
25358
- * the container will have a scroll
25359
- * height of 0px.
24899
+ * When the picker is interacted with
24900
+ * we need to prevent touchstart so other
24901
+ * gestures do not fire. For example,
24902
+ * scrolling on the wheel picker
24903
+ * in ion-datetime should not cause
24904
+ * a card modal to swipe to close.
25360
24905
  */
24906
+ preventTouchStartPropagation(ev) {
24907
+ ev.stopPropagation();
24908
+ }
25361
24909
  componentWillLoad() {
25362
- const visibleCallback = (entries) => {
25363
- const ev = entries[0];
25364
- if (ev.isIntersecting) {
25365
- const { activeItem, el } = this;
25366
- this.isColumnVisible = true;
25367
- /**
25368
- * Because this initial call to scrollActiveItemIntoView has to fire before
25369
- * the scroll listener is set up, we need to manage the active class manually.
25370
- */
25371
- const oldActive = getElementRoot(el).querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
25372
- if (oldActive) {
25373
- this.setPickerItemActiveState(oldActive, false);
25374
- }
25375
- this.scrollActiveItemIntoView();
25376
- if (activeItem) {
25377
- this.setPickerItemActiveState(activeItem, true);
25378
- }
25379
- this.initializeScrollListener();
25380
- }
25381
- else {
25382
- this.isColumnVisible = false;
25383
- if (this.destroyScrollListener) {
25384
- this.destroyScrollListener();
25385
- this.destroyScrollListener = undefined;
25386
- }
25387
- }
25388
- };
25389
- new IntersectionObserver(visibleCallback, { threshold: 0.001 }).observe(this.el);
25390
- const parentEl = (this.parentEl = this.el.closest('ion-picker-internal'));
25391
- if (parentEl !== null) {
25392
- // TODO(FW-2832): type
25393
- parentEl.addEventListener('ionInputModeChange', (ev) => this.inputModeChange(ev));
25394
- }
25395
- }
25396
- componentDidRender() {
25397
- var _a;
25398
- const { activeItem, items, isColumnVisible, value } = this;
25399
- if (isColumnVisible) {
25400
- if (activeItem) {
25401
- this.scrollActiveItemIntoView();
25402
- }
25403
- else if (((_a = items[0]) === null || _a === void 0 ? void 0 : _a.value) !== value) {
25404
- /**
25405
- * If the picker column does not have an active item and the current value
25406
- * does not match the first item in the picker column, that means
25407
- * the value is out of bounds. In this case, we assign the value to the
25408
- * first item to match the scroll position of the column.
25409
- *
25410
- */
25411
- this.setValue(items[0].value);
25412
- }
25413
- }
25414
- }
25415
- /** @internal */
25416
- async scrollActiveItemIntoView() {
25417
- const activeEl = this.activeItem;
25418
- if (activeEl) {
25419
- this.centerPickerItemInView(activeEl, false, false);
25420
- }
24910
+ getElementRoot(this.el).addEventListener('focusin', this.onFocusIn);
24911
+ getElementRoot(this.el).addEventListener('focusout', this.onFocusOut);
25421
24912
  }
25422
24913
  /**
25423
- * Sets the value prop and fires the ionChange event.
25424
- * This is used when we need to fire ionChange from
25425
- * user-generated events that cannot be caught with normal
25426
- * input/change event listeners.
25427
24914
  * @internal
24915
+ * Exits text entry mode for the picker
24916
+ * This method blurs the hidden input
24917
+ * and cause the keyboard to dismiss.
25428
24918
  */
25429
- async setValue(value) {
25430
- const { items } = this;
25431
- this.value = value;
25432
- const findItem = items.find((item) => item.value === value && item.disabled !== true);
25433
- if (findItem) {
25434
- this.ionChange.emit(findItem);
24919
+ async exitInputMode() {
24920
+ const { inputEl, useInputMode } = this;
24921
+ if (!useInputMode || !inputEl) {
24922
+ return;
25435
24923
  }
25436
- }
25437
- get activeItem() {
25438
- // If the whole picker column is disabled, the current value should appear active
25439
- // If the current value item is specifically disabled, it should not appear active
25440
- const selector = `.picker-item[data-value="${this.value}"]${this.disabled ? '' : ':not([disabled])'}`;
25441
- return getElementRoot(this.el).querySelector(selector);
24924
+ this.useInputMode = false;
24925
+ this.inputModeColumn = undefined;
24926
+ inputEl.blur();
24927
+ inputEl.value = '';
24928
+ if (this.destroyKeypressListener) {
24929
+ this.destroyKeypressListener();
24930
+ this.destroyKeypressListener = undefined;
24931
+ }
24932
+ this.emitInputModeChange();
25442
24933
  }
25443
24934
  render() {
25444
- const { items, color, disabled: pickerDisabled, isActive, numericInput } = this;
25445
- const mode = getIonMode$1(this);
25446
- /**
25447
- * exportparts is needed so ion-datetime can expose the parts
25448
- * from two layers of shadow nesting. If this causes problems,
25449
- * the attribute can be moved to datetime.tsx and set on every
25450
- * instance of ion-picker-column-internal there instead.
25451
- */
25452
- return (hAsync(Host, { exportparts: `${PICKER_ITEM_PART}, ${PICKER_ITEM_ACTIVE_PART}`, disabled: pickerDisabled, tabindex: pickerDisabled ? null : 0, class: createColorClasses$1(color, {
25453
- [mode]: true,
25454
- ['picker-column-active']: isActive,
25455
- ['picker-column-numeric-input']: numericInput,
25456
- }) }, hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), items.map((item, index) => {
25457
- const isItemDisabled = pickerDisabled || item.disabled || false;
25458
- return (hAsync("button", { tabindex: "-1", class: {
25459
- 'picker-item': true,
25460
- }, "data-value": item.value, "data-index": index, onClick: (ev) => {
25461
- this.centerPickerItemInView(ev.target, true);
25462
- }, disabled: isItemDisabled, part: PICKER_ITEM_PART }, item.text));
25463
- }), hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0")));
24935
+ return (hAsync(Host, { onPointerDown: (ev) => this.onPointerDown(ev), onClick: () => this.onClick() }, hAsync("input", { "aria-hidden": "true", tabindex: -1, inputmode: "numeric", type: "number", ref: (el) => (this.inputEl = el), onInput: () => this.onInputChange(), onBlur: () => this.exitInputMode() }), hAsync("div", { class: "picker-before" }), hAsync("div", { class: "picker-after" }), hAsync("div", { class: "picker-highlight", ref: (el) => (this.highlightEl = el) }), hAsync("slot", null)));
25464
24936
  }
25465
24937
  get el() { return getElement(this); }
25466
- static get watchers() { return {
25467
- "value": ["valueChange"]
25468
- }; }
25469
24938
  static get style() { return {
25470
- ios: pickerColumnInternalIosCss,
25471
- md: pickerColumnInternalMdCss
24939
+ ios: pickerIosCss$1,
24940
+ md: pickerMdCss$1
25472
24941
  }; }
25473
24942
  static get cmpMeta() { return {
25474
24943
  "$flags$": 41,
25475
- "$tagName$": "ion-picker-column-internal",
24944
+ "$tagName$": "ion-picker",
25476
24945
  "$members$": {
25477
- "disabled": [4],
25478
- "items": [16],
25479
- "value": [1032],
25480
- "color": [513],
25481
- "numericInput": [4, "numeric-input"],
25482
- "isActive": [32],
25483
- "scrollActiveItemIntoView": [64],
25484
- "setValue": [64]
24946
+ "exitInputMode": [64]
25485
24947
  },
25486
- "$listeners$": undefined,
24948
+ "$listeners$": [[1, "touchstart", "preventTouchStartPropagation"]],
25487
24949
  "$lazyBundleId$": "-",
25488
- "$attrsToReflect$": [["color", "color"]]
24950
+ "$attrsToReflect$": []
25489
24951
  }; }
25490
24952
  }
25491
- const PICKER_ITEM_ACTIVE_CLASS = 'picker-item-active';
25492
- const PICKER_ITEM_PART = 'wheel-item';
25493
- const PICKER_ITEM_ACTIVE_PART = 'active';
25494
24953
 
25495
- const pickerInternalIosCss = "/*!@:host*/.sc-ion-picker-internal-ios-h{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,\n:host .picker-after*/.sc-ion-picker-internal-ios-h .picker-before.sc-ion-picker-internal-ios,.sc-ion-picker-internal-ios-h .picker-after.sc-ion-picker-internal-ios{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}/*!@:host .picker-before*/.sc-ion-picker-internal-ios-h .picker-before.sc-ion-picker-internal-ios{top:0;height:83px}@supports (inset-inline-start: 0){/*!@:host .picker-before*/.sc-ion-picker-internal-ios-h .picker-before.sc-ion-picker-internal-ios{inset-inline-start:0}}@supports not (inset-inline-start: 0){/*!@:host .picker-before*/.sc-ion-picker-internal-ios-h .picker-before.sc-ion-picker-internal-ios{left:0}/*!@:host-context([dir=rtl]) .picker-before*/[dir=rtl].sc-ion-picker-internal-ios-h .picker-before.sc-ion-picker-internal-ios,[dir=rtl] .sc-ion-picker-internal-ios-h .picker-before.sc-ion-picker-internal-ios{left:unset;right:unset;right:0}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-picker-internal-ios selector(.sc-ion-picker-internal-ios:dir(rtl)){.sc-ion-picker-internal-ios-h:dir(rtl) .picker-before{left:unset;right:unset;right:0}}}/*!@:host .picker-after*/.sc-ion-picker-internal-ios-h .picker-after.sc-ion-picker-internal-ios{top:116px;height:84px}@supports (inset-inline-start: 0){/*!@:host .picker-after*/.sc-ion-picker-internal-ios-h .picker-after.sc-ion-picker-internal-ios{inset-inline-start:0}}@supports not (inset-inline-start: 0){/*!@:host .picker-after*/.sc-ion-picker-internal-ios-h .picker-after.sc-ion-picker-internal-ios{left:0}/*!@:host-context([dir=rtl]) .picker-after*/[dir=rtl].sc-ion-picker-internal-ios-h .picker-after.sc-ion-picker-internal-ios,[dir=rtl] .sc-ion-picker-internal-ios-h .picker-after.sc-ion-picker-internal-ios{left:unset;right:unset;right:0}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-picker-internal-ios selector(.sc-ion-picker-internal-ios:dir(rtl)){.sc-ion-picker-internal-ios-h:dir(rtl) .picker-after{left:unset;right:unset;right:0}}}/*!@:host .picker-highlight*/.sc-ion-picker-internal-ios-h .picker-highlight.sc-ion-picker-internal-ios{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*/.sc-ion-picker-internal-ios-h input.sc-ion-picker-internal-ios{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-internal:first-of-type)*/.sc-ion-picker-internal-ios-h .sc-ion-picker-internal-ios-s>ion-picker-column-internal:first-of-type{text-align:start}/*!@:host ::slotted(ion-picker-column-internal:last-of-type)*/.sc-ion-picker-internal-ios-h .sc-ion-picker-internal-ios-s>ion-picker-column-internal:last-of-type{text-align:end}/*!@:host ::slotted(ion-picker-column-internal:only-child)*/.sc-ion-picker-internal-ios-h .sc-ion-picker-internal-ios-s>ion-picker-column-internal:only-child{text-align:center}/*!@:host .picker-before*/.sc-ion-picker-internal-ios-h .picker-before.sc-ion-picker-internal-ios{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*/.sc-ion-picker-internal-ios-h .picker-after.sc-ion-picker-internal-ios{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*/.sc-ion-picker-internal-ios-h .picker-highlight.sc-ion-picker-internal-ios{background:var(--wheel-highlight-background, var(--ion-color-step-150, #eeeeef))}";
24954
+ /**
24955
+ * iOS Picker Enter Animation
24956
+ */
24957
+ const iosEnterAnimation$2 = (baseEl) => {
24958
+ const baseAnimation = createAnimation();
24959
+ const backdropAnimation = createAnimation();
24960
+ const wrapperAnimation = createAnimation();
24961
+ backdropAnimation
24962
+ .addElement(baseEl.querySelector('ion-backdrop'))
24963
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
24964
+ .beforeStyles({
24965
+ 'pointer-events': 'none',
24966
+ })
24967
+ .afterClearStyles(['pointer-events']);
24968
+ wrapperAnimation
24969
+ .addElement(baseEl.querySelector('.picker-wrapper'))
24970
+ .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
24971
+ return baseAnimation
24972
+ .addElement(baseEl)
24973
+ .easing('cubic-bezier(.36,.66,.04,1)')
24974
+ .duration(400)
24975
+ .addAnimation([backdropAnimation, wrapperAnimation]);
24976
+ };
24977
+
24978
+ /**
24979
+ * iOS Picker Leave Animation
24980
+ */
24981
+ const iosLeaveAnimation$2 = (baseEl) => {
24982
+ const baseAnimation = createAnimation();
24983
+ const backdropAnimation = createAnimation();
24984
+ const wrapperAnimation = createAnimation();
24985
+ backdropAnimation
24986
+ .addElement(baseEl.querySelector('ion-backdrop'))
24987
+ .fromTo('opacity', 'var(--backdrop-opacity)', 0.01);
24988
+ wrapperAnimation
24989
+ .addElement(baseEl.querySelector('.picker-wrapper'))
24990
+ .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
24991
+ return baseAnimation
24992
+ .addElement(baseEl)
24993
+ .easing('cubic-bezier(.36,.66,.04,1)')
24994
+ .duration(400)
24995
+ .addAnimation([backdropAnimation, wrapperAnimation]);
24996
+ };
24997
+
24998
+ const pickerIosCss = ".sc-ion-picker-legacy-ios-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}@supports (inset-inline-start: 0){.sc-ion-picker-legacy-ios-h{inset-inline-start:0}}@supports not (inset-inline-start: 0){.sc-ion-picker-legacy-ios-h{left:0}[dir=rtl].sc-ion-picker-legacy-ios-h,[dir=rtl] .sc-ion-picker-legacy-ios-h{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.sc-ion-picker-legacy-ios-h:dir(rtl){left:unset;right:unset;right:0}}}.overlay-hidden.sc-ion-picker-legacy-ios-h{display:none}.picker-wrapper.sc-ion-picker-legacy-ios{border-radius:var(--border-radius);left:0;right:0;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}.picker-toolbar.sc-ion-picker-legacy-ios{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-legacy-ios{border:0;font-family:inherit}.picker-button.sc-ion-picker-legacy-ios:active,.picker-button.sc-ion-picker-legacy-ios:focus{outline:none}.picker-columns.sc-ion-picker-legacy-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;overflow:hidden}.picker-above-highlight.sc-ion-picker-legacy-ios,.picker-below-highlight.sc-ion-picker-legacy-ios{display:none;pointer-events:none}.sc-ion-picker-legacy-ios-h{--background:var(--ion-background-color, #fff);--border-width:1px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-legacy-ios{display:-ms-flexbox;display:flex;height:44px;border-bottom:0.55px solid var(--border-color)}.picker-toolbar-button.sc-ion-picker-legacy-ios{-ms-flex:1;flex:1;text-align:end}.picker-toolbar-button.sc-ion-picker-legacy-ios:last-child .picker-button.sc-ion-picker-legacy-ios{font-weight:600}.picker-toolbar-button.sc-ion-picker-legacy-ios:first-child{font-weight:normal;text-align:start}.picker-button.sc-ion-picker-legacy-ios,.picker-button.ion-activated.sc-ion-picker-legacy-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:1em;padding-inline-start:1em;-webkit-padding-end:1em;padding-inline-end:1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #3880ff);font-size:16px}.picker-columns.sc-ion-picker-legacy-ios{height:215px;-webkit-perspective:1000px;perspective:1000px}.picker-above-highlight.sc-ion-picker-legacy-ios{top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:81px;border-bottom:1px solid var(--border-color);background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to bottom, var(--background, var(--ion-background-color, #fff)) 20%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:10}@supports (inset-inline-start: 0){.picker-above-highlight.sc-ion-picker-legacy-ios{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-above-highlight.sc-ion-picker-legacy-ios{left:0}[dir=rtl].sc-ion-picker-legacy-ios-h .picker-above-highlight.sc-ion-picker-legacy-ios,[dir=rtl] .sc-ion-picker-legacy-ios-h .picker-above-highlight.sc-ion-picker-legacy-ios{left:unset;right:unset;right:0}[dir=rtl].sc-ion-picker-legacy-ios .picker-above-highlight.sc-ion-picker-legacy-ios{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-above-highlight.sc-ion-picker-legacy-ios:dir(rtl){left:unset;right:unset;right:0}}}.picker-below-highlight.sc-ion-picker-legacy-ios{top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:119px;border-top:1px solid var(--border-color);background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to top, var(--background, var(--ion-background-color, #fff)) 30%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:11}@supports (inset-inline-start: 0){.picker-below-highlight.sc-ion-picker-legacy-ios{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-below-highlight.sc-ion-picker-legacy-ios{left:0}[dir=rtl].sc-ion-picker-legacy-ios-h .picker-below-highlight.sc-ion-picker-legacy-ios,[dir=rtl] .sc-ion-picker-legacy-ios-h .picker-below-highlight.sc-ion-picker-legacy-ios{left:unset;right:unset;right:0}[dir=rtl].sc-ion-picker-legacy-ios .picker-below-highlight.sc-ion-picker-legacy-ios{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-below-highlight.sc-ion-picker-legacy-ios:dir(rtl){left:unset;right:unset;right:0}}}";
25496
24999
 
25497
- const pickerInternalMdCss = "/*!@:host*/.sc-ion-picker-internal-md-h{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,\n:host .picker-after*/.sc-ion-picker-internal-md-h .picker-before.sc-ion-picker-internal-md,.sc-ion-picker-internal-md-h .picker-after.sc-ion-picker-internal-md{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}/*!@:host .picker-before*/.sc-ion-picker-internal-md-h .picker-before.sc-ion-picker-internal-md{top:0;height:83px}@supports (inset-inline-start: 0){/*!@:host .picker-before*/.sc-ion-picker-internal-md-h .picker-before.sc-ion-picker-internal-md{inset-inline-start:0}}@supports not (inset-inline-start: 0){/*!@:host .picker-before*/.sc-ion-picker-internal-md-h .picker-before.sc-ion-picker-internal-md{left:0}/*!@:host-context([dir=rtl]) .picker-before*/[dir=rtl].sc-ion-picker-internal-md-h .picker-before.sc-ion-picker-internal-md,[dir=rtl] .sc-ion-picker-internal-md-h .picker-before.sc-ion-picker-internal-md{left:unset;right:unset;right:0}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-picker-internal-md selector(.sc-ion-picker-internal-md:dir(rtl)){.sc-ion-picker-internal-md-h:dir(rtl) .picker-before{left:unset;right:unset;right:0}}}/*!@:host .picker-after*/.sc-ion-picker-internal-md-h .picker-after.sc-ion-picker-internal-md{top:116px;height:84px}@supports (inset-inline-start: 0){/*!@:host .picker-after*/.sc-ion-picker-internal-md-h .picker-after.sc-ion-picker-internal-md{inset-inline-start:0}}@supports not (inset-inline-start: 0){/*!@:host .picker-after*/.sc-ion-picker-internal-md-h .picker-after.sc-ion-picker-internal-md{left:0}/*!@:host-context([dir=rtl]) .picker-after*/[dir=rtl].sc-ion-picker-internal-md-h .picker-after.sc-ion-picker-internal-md,[dir=rtl] .sc-ion-picker-internal-md-h .picker-after.sc-ion-picker-internal-md{left:unset;right:unset;right:0}/*!@@supports selector(:dir(rtl))*/@supports .sc-ion-picker-internal-md selector(.sc-ion-picker-internal-md:dir(rtl)){.sc-ion-picker-internal-md-h:dir(rtl) .picker-after{left:unset;right:unset;right:0}}}/*!@:host .picker-highlight*/.sc-ion-picker-internal-md-h .picker-highlight.sc-ion-picker-internal-md{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*/.sc-ion-picker-internal-md-h input.sc-ion-picker-internal-md{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-internal:first-of-type)*/.sc-ion-picker-internal-md-h .sc-ion-picker-internal-md-s>ion-picker-column-internal:first-of-type{text-align:start}/*!@:host ::slotted(ion-picker-column-internal:last-of-type)*/.sc-ion-picker-internal-md-h .sc-ion-picker-internal-md-s>ion-picker-column-internal:last-of-type{text-align:end}/*!@:host ::slotted(ion-picker-column-internal:only-child)*/.sc-ion-picker-internal-md-h .sc-ion-picker-internal-md-s>ion-picker-column-internal:only-child{text-align:center}/*!@:host .picker-before*/.sc-ion-picker-internal-md-h .picker-before.sc-ion-picker-internal-md{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*/.sc-ion-picker-internal-md-h .picker-after.sc-ion-picker-internal-md{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%)}";
25000
+ const pickerMdCss = ".sc-ion-picker-legacy-md-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}@supports (inset-inline-start: 0){.sc-ion-picker-legacy-md-h{inset-inline-start:0}}@supports not (inset-inline-start: 0){.sc-ion-picker-legacy-md-h{left:0}[dir=rtl].sc-ion-picker-legacy-md-h,[dir=rtl] .sc-ion-picker-legacy-md-h{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.sc-ion-picker-legacy-md-h:dir(rtl){left:unset;right:unset;right:0}}}.overlay-hidden.sc-ion-picker-legacy-md-h{display:none}.picker-wrapper.sc-ion-picker-legacy-md{border-radius:var(--border-radius);left:0;right:0;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}.picker-toolbar.sc-ion-picker-legacy-md{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-legacy-md{border:0;font-family:inherit}.picker-button.sc-ion-picker-legacy-md:active,.picker-button.sc-ion-picker-legacy-md:focus{outline:none}.picker-columns.sc-ion-picker-legacy-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;overflow:hidden}.picker-above-highlight.sc-ion-picker-legacy-md,.picker-below-highlight.sc-ion-picker-legacy-md{display:none;pointer-events:none}.sc-ion-picker-legacy-md-h{--background:var(--ion-background-color, #fff);--border-width:0.55px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-legacy-md{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;height:44px}.picker-button.sc-ion-picker-legacy-md,.picker-button.ion-activated.sc-ion-picker-legacy-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:1.1em;padding-inline-start:1.1em;-webkit-padding-end:1.1em;padding-inline-end:1.1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #3880ff);font-size:14px;font-weight:500;text-transform:uppercase;-webkit-box-shadow:none;box-shadow:none}.picker-columns.sc-ion-picker-legacy-md{height:216px;-webkit-perspective:1800px;perspective:1800px}.picker-above-highlight.sc-ion-picker-legacy-md{top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:81px;border-bottom:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to bottom, var(--ion-background-color, #fff) 20%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:10}@supports (inset-inline-start: 0){.picker-above-highlight.sc-ion-picker-legacy-md{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-above-highlight.sc-ion-picker-legacy-md{left:0}[dir=rtl].sc-ion-picker-legacy-md-h .picker-above-highlight.sc-ion-picker-legacy-md,[dir=rtl] .sc-ion-picker-legacy-md-h .picker-above-highlight.sc-ion-picker-legacy-md{left:unset;right:unset;right:0}[dir=rtl].sc-ion-picker-legacy-md .picker-above-highlight.sc-ion-picker-legacy-md{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-above-highlight.sc-ion-picker-legacy-md:dir(rtl){left:unset;right:unset;right:0}}}.picker-below-highlight.sc-ion-picker-legacy-md{top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:119px;border-top:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to top, var(--ion-background-color, #fff) 30%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:11}@supports (inset-inline-start: 0){.picker-below-highlight.sc-ion-picker-legacy-md{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-below-highlight.sc-ion-picker-legacy-md{left:0}[dir=rtl].sc-ion-picker-legacy-md-h .picker-below-highlight.sc-ion-picker-legacy-md,[dir=rtl] .sc-ion-picker-legacy-md-h .picker-below-highlight.sc-ion-picker-legacy-md{left:unset;right:unset;right:0}[dir=rtl].sc-ion-picker-legacy-md .picker-below-highlight.sc-ion-picker-legacy-md{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-below-highlight.sc-ion-picker-legacy-md:dir(rtl){left:unset;right:unset;right:0}}}";
25498
25001
 
25002
+ // TODO(FW-2832): types
25499
25003
  /**
25500
25004
  * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
25501
- * @internal
25502
25005
  */
25503
- class PickerInternal {
25006
+ class Picker {
25504
25007
  constructor(hostRef) {
25505
25008
  registerInstance(this, hostRef);
25506
- this.ionInputModeChange = createEvent(this, "ionInputModeChange", 7);
25507
- this.useInputMode = false;
25508
- this.isInHighlightBounds = (ev) => {
25509
- const { highlightEl } = this;
25510
- if (!highlightEl) {
25511
- return false;
25512
- }
25513
- const bbox = highlightEl.getBoundingClientRect();
25514
- /**
25515
- * Check to see if the user clicked
25516
- * outside the bounds of the highlight.
25517
- */
25518
- const outsideX = ev.clientX < bbox.left || ev.clientX > bbox.right;
25519
- const outsideY = ev.clientY < bbox.top || ev.clientY > bbox.bottom;
25520
- if (outsideX || outsideY) {
25521
- return false;
25522
- }
25523
- return true;
25009
+ this.didPresent = createEvent(this, "ionPickerDidPresent", 7);
25010
+ this.willPresent = createEvent(this, "ionPickerWillPresent", 7);
25011
+ this.willDismiss = createEvent(this, "ionPickerWillDismiss", 7);
25012
+ this.didDismiss = createEvent(this, "ionPickerDidDismiss", 7);
25013
+ this.didPresentShorthand = createEvent(this, "didPresent", 7);
25014
+ this.willPresentShorthand = createEvent(this, "willPresent", 7);
25015
+ this.willDismissShorthand = createEvent(this, "willDismiss", 7);
25016
+ this.didDismissShorthand = createEvent(this, "didDismiss", 7);
25017
+ this.delegateController = createDelegateController(this);
25018
+ this.lockController = createLockController();
25019
+ this.triggerController = createTriggerController();
25020
+ this.onBackdropTap = () => {
25021
+ this.dismiss(undefined, BACKDROP);
25524
25022
  };
25525
- /**
25526
- * If we are no longer focused
25527
- * on a picker column, then we should
25528
- * exit input mode. An exception is made
25529
- * for the input in the picker since having
25530
- * that focused means we are still in input mode.
25531
- */
25532
- this.onFocusOut = (ev) => {
25533
- // TODO(FW-2832): type
25534
- const { relatedTarget } = ev;
25535
- if (!relatedTarget || (relatedTarget.tagName !== 'ION-PICKER-COLUMN-INTERNAL' && relatedTarget !== this.inputEl)) {
25536
- this.exitInputMode();
25023
+ this.dispatchCancelHandler = (ev) => {
25024
+ const role = ev.detail.role;
25025
+ if (isCancel(role)) {
25026
+ const cancelButton = this.buttons.find((b) => b.role === 'cancel');
25027
+ this.callButtonHandler(cancelButton);
25537
25028
  }
25538
25029
  };
25030
+ this.presented = false;
25031
+ this.overlayIndex = undefined;
25032
+ this.delegate = undefined;
25033
+ this.hasController = false;
25034
+ this.keyboardClose = true;
25035
+ this.enterAnimation = undefined;
25036
+ this.leaveAnimation = undefined;
25037
+ this.buttons = [];
25038
+ this.columns = [];
25039
+ this.cssClass = undefined;
25040
+ this.duration = 0;
25041
+ this.showBackdrop = true;
25042
+ this.backdropDismiss = true;
25043
+ this.animated = true;
25044
+ this.htmlAttributes = undefined;
25045
+ this.isOpen = false;
25046
+ this.trigger = undefined;
25047
+ }
25048
+ onIsOpenChange(newValue, oldValue) {
25049
+ if (newValue === true && oldValue === false) {
25050
+ this.present();
25051
+ }
25052
+ else if (newValue === false && oldValue === true) {
25053
+ this.dismiss();
25054
+ }
25055
+ }
25056
+ triggerChanged() {
25057
+ const { trigger, el, triggerController } = this;
25058
+ if (trigger) {
25059
+ triggerController.addClickListener(el, trigger);
25060
+ }
25061
+ }
25062
+ connectedCallback() {
25063
+ prepareOverlay(this.el);
25064
+ this.triggerChanged();
25065
+ }
25066
+ disconnectedCallback() {
25067
+ this.triggerController.removeClickListener();
25068
+ }
25069
+ componentWillLoad() {
25070
+ setOverlayId(this.el);
25071
+ }
25072
+ componentDidLoad() {
25073
+ printIonWarning('ion-picker-legacy and ion-picker-legacy-column have been deprecated in favor of new versions of the ion-picker and ion-picker-column components. These new components display inline with your page content allowing for more presentation flexibility than before.', this.el);
25539
25074
  /**
25540
- * When picker columns receive focus
25541
- * the parent picker needs to determine
25542
- * whether to enter/exit input mode.
25075
+ * If picker was rendered with isOpen="true"
25076
+ * then we should open picker immediately.
25543
25077
  */
25544
- this.onFocusIn = (ev) => {
25545
- // TODO(FW-2832): type
25546
- const { target } = ev;
25547
- /**
25548
- * Due to browser differences in how/when focus
25549
- * is dispatched on certain elements, we need to
25550
- * make sure that this function only ever runs when
25551
- * focusing a picker column.
25552
- */
25553
- if (target.tagName !== 'ION-PICKER-COLUMN-INTERNAL') {
25554
- return;
25555
- }
25556
- /**
25557
- * If we have actionOnClick
25558
- * then this means the user focused
25559
- * a picker column via mouse or
25560
- * touch (i.e. a PointerEvent). As a result,
25561
- * we should not enter/exit input mode
25562
- * until the click event has fired, which happens
25563
- * after the `focusin` event.
25564
- *
25565
- * Otherwise, the user likely focused
25566
- * the column using their keyboard and
25567
- * we should enter/exit input mode automatically.
25568
- */
25569
- if (!this.actionOnClick) {
25570
- const columnEl = target;
25571
- const allowInput = columnEl.numericInput;
25572
- if (allowInput) {
25573
- this.enterInputMode(columnEl, false);
25574
- }
25575
- else {
25576
- this.exitInputMode();
25078
+ if (this.isOpen === true) {
25079
+ raf(() => this.present());
25080
+ }
25081
+ }
25082
+ /**
25083
+ * Present the picker overlay after it has been created.
25084
+ */
25085
+ async present() {
25086
+ const unlock = await this.lockController.lock();
25087
+ await this.delegateController.attachViewToDom();
25088
+ await present(this, 'pickerEnter', iosEnterAnimation$2, iosEnterAnimation$2, undefined);
25089
+ if (this.duration > 0) {
25090
+ this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
25091
+ }
25092
+ unlock();
25093
+ }
25094
+ /**
25095
+ * Dismiss the picker overlay after it has been presented.
25096
+ *
25097
+ * @param data Any data to emit in the dismiss events.
25098
+ * @param role The role of the element that is dismissing the picker.
25099
+ * This can be useful in a button handler for determining which button was
25100
+ * clicked to dismiss the picker.
25101
+ * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
25102
+ */
25103
+ async dismiss(data, role) {
25104
+ const unlock = await this.lockController.lock();
25105
+ if (this.durationTimeout) {
25106
+ clearTimeout(this.durationTimeout);
25107
+ }
25108
+ const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation$2, iosLeaveAnimation$2);
25109
+ if (dismissed) {
25110
+ this.delegateController.removeViewFromDom();
25111
+ }
25112
+ unlock();
25113
+ return dismissed;
25114
+ }
25115
+ /**
25116
+ * Returns a promise that resolves when the picker did dismiss.
25117
+ */
25118
+ onDidDismiss() {
25119
+ return eventMethod(this.el, 'ionPickerDidDismiss');
25120
+ }
25121
+ /**
25122
+ * Returns a promise that resolves when the picker will dismiss.
25123
+ */
25124
+ onWillDismiss() {
25125
+ return eventMethod(this.el, 'ionPickerWillDismiss');
25126
+ }
25127
+ /**
25128
+ * Get the column that matches the specified name.
25129
+ *
25130
+ * @param name The name of the column.
25131
+ */
25132
+ getColumn(name) {
25133
+ return Promise.resolve(this.columns.find((column) => column.name === name));
25134
+ }
25135
+ async buttonClick(button) {
25136
+ const role = button.role;
25137
+ if (isCancel(role)) {
25138
+ return this.dismiss(undefined, role);
25139
+ }
25140
+ const shouldDismiss = await this.callButtonHandler(button);
25141
+ if (shouldDismiss) {
25142
+ return this.dismiss(this.getSelected(), button.role);
25143
+ }
25144
+ return Promise.resolve();
25145
+ }
25146
+ async callButtonHandler(button) {
25147
+ if (button) {
25148
+ // a handler has been provided, execute it
25149
+ // pass the handler the values from the inputs
25150
+ const rtn = await safeCall(button.handler, this.getSelected());
25151
+ if (rtn === false) {
25152
+ // if the return value of the handler is false then do not dismiss
25153
+ return false;
25154
+ }
25155
+ }
25156
+ return true;
25157
+ }
25158
+ getSelected() {
25159
+ const selected = {};
25160
+ this.columns.forEach((col, index) => {
25161
+ const selectedColumn = col.selectedIndex !== undefined ? col.options[col.selectedIndex] : undefined;
25162
+ selected[col.name] = {
25163
+ text: selectedColumn ? selectedColumn.text : undefined,
25164
+ value: selectedColumn ? selectedColumn.value : undefined,
25165
+ columnIndex: index,
25166
+ };
25167
+ });
25168
+ return selected;
25169
+ }
25170
+ render() {
25171
+ const { htmlAttributes } = this;
25172
+ const mode = getIonMode$1(this);
25173
+ return (hAsync(Host, Object.assign({ "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
25174
+ zIndex: `${20000 + this.overlayIndex}`,
25175
+ }, class: Object.assign({ [mode]: true,
25176
+ // Used internally for styling
25177
+ [`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), hAsync("ion-backdrop", { visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { tabindex: "0" }), hAsync("div", { class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, hAsync("div", { class: "picker-toolbar" }, this.buttons.map((b) => (hAsync("div", { class: buttonWrapperClass(b) }, hAsync("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass$1(b) }, b.text))))), hAsync("div", { class: "picker-columns" }, hAsync("div", { class: "picker-above-highlight" }), this.presented && this.columns.map((c) => hAsync("ion-picker-legacy-column", { col: c })), hAsync("div", { class: "picker-below-highlight" }))), hAsync("div", { tabindex: "0" })));
25178
+ }
25179
+ get el() { return getElement(this); }
25180
+ static get watchers() { return {
25181
+ "isOpen": ["onIsOpenChange"],
25182
+ "trigger": ["triggerChanged"]
25183
+ }; }
25184
+ static get style() { return {
25185
+ ios: pickerIosCss,
25186
+ md: pickerMdCss
25187
+ }; }
25188
+ static get cmpMeta() { return {
25189
+ "$flags$": 34,
25190
+ "$tagName$": "ion-picker-legacy",
25191
+ "$members$": {
25192
+ "overlayIndex": [2, "overlay-index"],
25193
+ "delegate": [16],
25194
+ "hasController": [4, "has-controller"],
25195
+ "keyboardClose": [4, "keyboard-close"],
25196
+ "enterAnimation": [16],
25197
+ "leaveAnimation": [16],
25198
+ "buttons": [16],
25199
+ "columns": [16],
25200
+ "cssClass": [1, "css-class"],
25201
+ "duration": [2],
25202
+ "showBackdrop": [4, "show-backdrop"],
25203
+ "backdropDismiss": [4, "backdrop-dismiss"],
25204
+ "animated": [4],
25205
+ "htmlAttributes": [16],
25206
+ "isOpen": [4, "is-open"],
25207
+ "trigger": [1],
25208
+ "presented": [32],
25209
+ "present": [64],
25210
+ "dismiss": [64],
25211
+ "onDidDismiss": [64],
25212
+ "onWillDismiss": [64],
25213
+ "getColumn": [64]
25214
+ },
25215
+ "$listeners$": undefined,
25216
+ "$lazyBundleId$": "-",
25217
+ "$attrsToReflect$": []
25218
+ }; }
25219
+ }
25220
+ const buttonWrapperClass = (button) => {
25221
+ return {
25222
+ [`picker-toolbar-${button.role}`]: button.role !== undefined,
25223
+ 'picker-toolbar-button': true,
25224
+ };
25225
+ };
25226
+ const buttonClass$1 = (button) => {
25227
+ return Object.assign({ 'picker-button': true, 'ion-activatable': true }, getClassMap(button.cssClass));
25228
+ };
25229
+
25230
+ const pickerColumnIosCss$1 = "/*!@:host*/.sc-ion-picker-column-ios-h{-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*/.sc-ion-picker-column-ios-h::-webkit-scrollbar{display:none}/*!@:host .picker-item*/.sc-ion-picker-column-ios-h .picker-item.sc-ion-picker-column-ios{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,\n:host .picker-item[disabled]*/.sc-ion-picker-column-ios-h .picker-item-empty.sc-ion-picker-column-ios,.sc-ion-picker-column-ios-h .picker-item[disabled].sc-ion-picker-column-ios{cursor:default}/*!@:host .picker-item-empty,\n:host(:not([disabled])) .picker-item[disabled]*/.sc-ion-picker-column-ios-h .picker-item-empty.sc-ion-picker-column-ios,.sc-ion-picker-column-ios-h:not([disabled]) .picker-item[disabled].sc-ion-picker-column-ios{scroll-snap-align:none}/*!@:host([disabled])*/[disabled].sc-ion-picker-column-ios-h{overflow-y:hidden}/*!@:host .picker-item[disabled]*/.sc-ion-picker-column-ios-h .picker-item[disabled].sc-ion-picker-column-ios{opacity:0.4}/*!@:host(.picker-column-active) .picker-item.picker-item-active*/.picker-column-active.sc-ion-picker-column-ios-h .picker-item.picker-item-active.sc-ion-picker-column-ios{color:var(--ion-color-base)}@media (any-hover: hover){/*!@:host(:focus)*/.sc-ion-picker-column-ios-h:focus{outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}";
25231
+
25232
+ const pickerColumnMdCss$1 = "/*!@:host*/.sc-ion-picker-column-md-h{-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*/.sc-ion-picker-column-md-h::-webkit-scrollbar{display:none}/*!@:host .picker-item*/.sc-ion-picker-column-md-h .picker-item.sc-ion-picker-column-md{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,\n:host .picker-item[disabled]*/.sc-ion-picker-column-md-h .picker-item-empty.sc-ion-picker-column-md,.sc-ion-picker-column-md-h .picker-item[disabled].sc-ion-picker-column-md{cursor:default}/*!@:host .picker-item-empty,\n:host(:not([disabled])) .picker-item[disabled]*/.sc-ion-picker-column-md-h .picker-item-empty.sc-ion-picker-column-md,.sc-ion-picker-column-md-h:not([disabled]) .picker-item[disabled].sc-ion-picker-column-md{scroll-snap-align:none}/*!@:host([disabled])*/[disabled].sc-ion-picker-column-md-h{overflow-y:hidden}/*!@:host .picker-item[disabled]*/.sc-ion-picker-column-md-h .picker-item[disabled].sc-ion-picker-column-md{opacity:0.4}/*!@:host(.picker-column-active) .picker-item.picker-item-active*/.picker-column-active.sc-ion-picker-column-md-h .picker-item.picker-item-active.sc-ion-picker-column-md{color:var(--ion-color-base)}@media (any-hover: hover){/*!@:host(:focus)*/.sc-ion-picker-column-md-h:focus{outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}/*!@:host .picker-item-active*/.sc-ion-picker-column-md-h .picker-item-active.sc-ion-picker-column-md{color:var(--ion-color-base)}";
25233
+
25234
+ /**
25235
+ * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
25236
+ */
25237
+ class PickerColumn {
25238
+ constructor(hostRef) {
25239
+ registerInstance(this, hostRef);
25240
+ this.ionChange = createEvent(this, "ionChange", 7);
25241
+ this.isScrolling = false;
25242
+ this.isColumnVisible = false;
25243
+ this.canExitInputMode = true;
25244
+ this.centerPickerItemInView = (target, smooth = true, canExitInputMode = true) => {
25245
+ const { el, isColumnVisible } = this;
25246
+ if (isColumnVisible) {
25247
+ // (Vertical offset from parent) - (three empty picker rows) + (half the height of the target to ensure the scroll triggers)
25248
+ const top = target.offsetTop - 3 * target.clientHeight + target.clientHeight / 2;
25249
+ if (el.scrollTop !== top) {
25250
+ /**
25251
+ * Setting this flag prevents input
25252
+ * mode from exiting in the picker column's
25253
+ * scroll callback. This is useful when the user manually
25254
+ * taps an item or types on the keyboard as both
25255
+ * of these can cause a scroll to occur.
25256
+ */
25257
+ this.canExitInputMode = canExitInputMode;
25258
+ el.scroll({
25259
+ top,
25260
+ left: 0,
25261
+ behavior: smooth ? 'smooth' : undefined,
25262
+ });
25577
25263
  }
25578
25264
  }
25579
25265
  };
25266
+ this.setPickerItemActiveState = (item, isActive) => {
25267
+ if (isActive) {
25268
+ item.classList.add(PICKER_ITEM_ACTIVE_CLASS);
25269
+ item.part.add(PICKER_ITEM_ACTIVE_PART);
25270
+ }
25271
+ else {
25272
+ item.classList.remove(PICKER_ITEM_ACTIVE_CLASS);
25273
+ item.part.remove(PICKER_ITEM_ACTIVE_PART);
25274
+ }
25275
+ };
25580
25276
  /**
25581
- * On click we need to run an actionOnClick
25582
- * function that has been set in onPointerDown
25583
- * so that we enter/exit input mode correctly.
25277
+ * When ionInputModeChange is emitted, each column
25278
+ * needs to check if it is the one being made available
25279
+ * for text entry.
25584
25280
  */
25585
- this.onClick = () => {
25586
- const { actionOnClick } = this;
25587
- if (actionOnClick) {
25588
- actionOnClick();
25589
- this.actionOnClick = undefined;
25281
+ this.inputModeChange = (ev) => {
25282
+ if (!this.numericInput) {
25283
+ return;
25284
+ }
25285
+ const { useInputMode, inputModeColumn } = ev.detail;
25286
+ /**
25287
+ * If inputModeColumn is undefined then this means
25288
+ * all numericInput columns are being selected.
25289
+ */
25290
+ const isColumnActive = inputModeColumn === undefined || inputModeColumn === this.el;
25291
+ if (!useInputMode || !isColumnActive) {
25292
+ this.setInputModeActive(false);
25293
+ return;
25590
25294
  }
25295
+ this.setInputModeActive(true);
25591
25296
  };
25592
25297
  /**
25593
- * Clicking a column also focuses the column on
25594
- * certain browsers, so we use onPointerDown
25595
- * to tell the onFocusIn function that users
25596
- * are trying to click the column rather than
25597
- * focus the column using the keyboard. When the
25598
- * user completes the click, the onClick function
25599
- * runs and runs the actionOnClick callback.
25298
+ * Setting isActive will cause a re-render.
25299
+ * As a result, we do not want to cause the
25300
+ * re-render mid scroll as this will cause
25301
+ * the picker column to jump back to
25302
+ * whatever value was selected at the
25303
+ * start of the scroll interaction.
25600
25304
  */
25601
- this.onPointerDown = (ev) => {
25602
- const { useInputMode, inputModeColumn, el } = this;
25603
- if (this.isInHighlightBounds(ev)) {
25604
- /**
25605
- * If we were already in
25606
- * input mode, then we should determine
25607
- * if we tapped a particular column and
25608
- * should switch to input mode for
25609
- * that specific column.
25610
- */
25611
- if (useInputMode) {
25612
- /**
25613
- * If we tapped a picker column
25614
- * then we should either switch to input
25615
- * mode for that column or all columns.
25616
- * Otherwise we should exit input mode
25617
- * since we just tapped the highlight and
25618
- * not a column.
25619
- */
25620
- if (ev.target.tagName === 'ION-PICKER-COLUMN-INTERNAL') {
25621
- /**
25622
- * If user taps 2 different columns
25623
- * then we should just switch to input mode
25624
- * for the new column rather than switching to
25625
- * input mode for all columns.
25626
- */
25627
- if (inputModeColumn && inputModeColumn === ev.target) {
25628
- this.actionOnClick = () => {
25629
- this.enterInputMode();
25630
- };
25631
- }
25632
- else {
25633
- this.actionOnClick = () => {
25634
- this.enterInputMode(ev.target);
25635
- };
25636
- }
25305
+ this.setInputModeActive = (state) => {
25306
+ if (this.isScrolling) {
25307
+ this.scrollEndCallback = () => {
25308
+ this.isActive = state;
25309
+ };
25310
+ return;
25311
+ }
25312
+ this.isActive = state;
25313
+ };
25314
+ /**
25315
+ * When the column scrolls, the component
25316
+ * needs to determine which item is centered
25317
+ * in the view and will emit an ionChange with
25318
+ * the item object.
25319
+ */
25320
+ this.initializeScrollListener = () => {
25321
+ /**
25322
+ * The haptics for the wheel picker are
25323
+ * an iOS-only feature. As a result, they should
25324
+ * be disabled on Android.
25325
+ */
25326
+ const enableHaptics = isPlatform('ios');
25327
+ const { el } = this;
25328
+ let timeout;
25329
+ let activeEl = this.activeItem;
25330
+ const scrollCallback = () => {
25331
+ raf(() => {
25332
+ if (timeout) {
25333
+ clearTimeout(timeout);
25334
+ timeout = undefined;
25637
25335
  }
25638
- else {
25639
- this.actionOnClick = () => {
25640
- this.exitInputMode();
25641
- };
25336
+ if (!this.isScrolling) {
25337
+ enableHaptics && hapticSelectionStart();
25338
+ this.isScrolling = true;
25642
25339
  }
25643
25340
  /**
25644
- * If we were not already in
25645
- * input mode, then we should
25646
- * enter input mode for all columns.
25341
+ * Select item in the center of the column
25342
+ * which is the month/year that we want to select
25647
25343
  */
25648
- }
25649
- else {
25344
+ const bbox = el.getBoundingClientRect();
25345
+ const centerX = bbox.x + bbox.width / 2;
25346
+ const centerY = bbox.y + bbox.height / 2;
25347
+ const activeElement = el.shadowRoot.elementFromPoint(centerX, centerY);
25348
+ if (activeEl !== null) {
25349
+ this.setPickerItemActiveState(activeEl, false);
25350
+ }
25351
+ if (activeElement === null || activeElement.disabled) {
25352
+ return;
25353
+ }
25650
25354
  /**
25651
- * If there is only 1 numeric input column
25652
- * then we should skip multi column input.
25355
+ * If we are selecting a new value,
25356
+ * we need to run haptics again.
25653
25357
  */
25654
- const columns = el.querySelectorAll('ion-picker-column-internal.picker-column-numeric-input');
25655
- const columnEl = columns.length === 1 ? ev.target : undefined;
25656
- this.actionOnClick = () => {
25657
- this.enterInputMode(columnEl);
25658
- };
25358
+ if (activeElement !== activeEl) {
25359
+ enableHaptics && hapticSelectionChanged();
25360
+ if (this.canExitInputMode) {
25361
+ /**
25362
+ * The native iOS wheel picker
25363
+ * only dismisses the keyboard
25364
+ * once the selected item has changed
25365
+ * as a result of a swipe
25366
+ * from the user. If `canExitInputMode` is
25367
+ * `false` then this means that the
25368
+ * scroll is happening as a result of
25369
+ * the `value` property programmatically changing
25370
+ * either by an application or by the user via the keyboard.
25371
+ */
25372
+ this.exitInputMode();
25373
+ }
25374
+ }
25375
+ activeEl = activeElement;
25376
+ this.setPickerItemActiveState(activeElement, true);
25377
+ timeout = setTimeout(() => {
25378
+ this.isScrolling = false;
25379
+ enableHaptics && hapticSelectionEnd();
25380
+ /**
25381
+ * Certain tasks (such as those that
25382
+ * cause re-renders) should only be done
25383
+ * once scrolling has finished, otherwise
25384
+ * flickering may occur.
25385
+ */
25386
+ const { scrollEndCallback } = this;
25387
+ if (scrollEndCallback) {
25388
+ scrollEndCallback();
25389
+ this.scrollEndCallback = undefined;
25390
+ }
25391
+ /**
25392
+ * Reset this flag as the
25393
+ * next scroll interaction could
25394
+ * be a scroll from the user. In this
25395
+ * case, we should exit input mode.
25396
+ */
25397
+ this.canExitInputMode = true;
25398
+ const dataIndex = activeElement.getAttribute('data-index');
25399
+ /**
25400
+ * If no value it is
25401
+ * possible we hit one of the
25402
+ * empty padding columns.
25403
+ */
25404
+ if (dataIndex === null) {
25405
+ return;
25406
+ }
25407
+ const index = parseInt(dataIndex, 10);
25408
+ const selectedItem = this.items[index];
25409
+ if (selectedItem.value !== this.value) {
25410
+ this.setValue(selectedItem.value);
25411
+ }
25412
+ }, 250);
25413
+ });
25414
+ };
25415
+ /**
25416
+ * Wrap this in an raf so that the scroll callback
25417
+ * does not fire when component is initially shown.
25418
+ */
25419
+ raf(() => {
25420
+ el.addEventListener('scroll', scrollCallback);
25421
+ this.destroyScrollListener = () => {
25422
+ el.removeEventListener('scroll', scrollCallback);
25423
+ };
25424
+ });
25425
+ };
25426
+ /**
25427
+ * Tells the parent picker to
25428
+ * exit text entry mode. This is only called
25429
+ * when the selected item changes during scroll, so
25430
+ * we know that the user likely wants to scroll
25431
+ * instead of type.
25432
+ */
25433
+ this.exitInputMode = () => {
25434
+ const { parentEl } = this;
25435
+ if (parentEl == null)
25436
+ return;
25437
+ parentEl.exitInputMode();
25438
+ /**
25439
+ * setInputModeActive only takes
25440
+ * effect once scrolling stops to avoid
25441
+ * a component re-render while scrolling.
25442
+ * However, we want the visual active
25443
+ * indicator to go away immediately, so
25444
+ * we call classList.remove here.
25445
+ */
25446
+ this.el.classList.remove('picker-column-active');
25447
+ };
25448
+ this.isActive = false;
25449
+ this.disabled = false;
25450
+ this.items = [];
25451
+ this.value = undefined;
25452
+ this.color = 'primary';
25453
+ this.numericInput = false;
25454
+ }
25455
+ valueChange() {
25456
+ if (this.isColumnVisible) {
25457
+ /**
25458
+ * Only scroll the active item into view when the picker column
25459
+ * is actively visible to the user.
25460
+ */
25461
+ this.scrollActiveItemIntoView();
25462
+ }
25463
+ }
25464
+ /**
25465
+ * Only setup scroll listeners
25466
+ * when the picker is visible, otherwise
25467
+ * the container will have a scroll
25468
+ * height of 0px.
25469
+ */
25470
+ componentWillLoad() {
25471
+ const visibleCallback = (entries) => {
25472
+ const ev = entries[0];
25473
+ if (ev.isIntersecting) {
25474
+ const { activeItem, el } = this;
25475
+ this.isColumnVisible = true;
25476
+ /**
25477
+ * Because this initial call to scrollActiveItemIntoView has to fire before
25478
+ * the scroll listener is set up, we need to manage the active class manually.
25479
+ */
25480
+ const oldActive = getElementRoot(el).querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
25481
+ if (oldActive) {
25482
+ this.setPickerItemActiveState(oldActive, false);
25483
+ }
25484
+ this.scrollActiveItemIntoView();
25485
+ if (activeItem) {
25486
+ this.setPickerItemActiveState(activeItem, true);
25487
+ }
25488
+ this.initializeScrollListener();
25489
+ }
25490
+ else {
25491
+ this.isColumnVisible = false;
25492
+ if (this.destroyScrollListener) {
25493
+ this.destroyScrollListener();
25494
+ this.destroyScrollListener = undefined;
25495
+ }
25496
+ }
25497
+ };
25498
+ new IntersectionObserver(visibleCallback, { threshold: 0.001 }).observe(this.el);
25499
+ const parentEl = (this.parentEl = this.el.closest('ion-picker'));
25500
+ if (parentEl !== null) {
25501
+ // TODO(FW-2832): type
25502
+ parentEl.addEventListener('ionInputModeChange', (ev) => this.inputModeChange(ev));
25503
+ }
25504
+ }
25505
+ componentDidRender() {
25506
+ var _a;
25507
+ const { activeItem, items, isColumnVisible, value } = this;
25508
+ if (isColumnVisible) {
25509
+ if (activeItem) {
25510
+ this.scrollActiveItemIntoView();
25511
+ }
25512
+ else if (((_a = items[0]) === null || _a === void 0 ? void 0 : _a.value) !== value) {
25513
+ /**
25514
+ * If the picker column does not have an active item and the current value
25515
+ * does not match the first item in the picker column, that means
25516
+ * the value is out of bounds. In this case, we assign the value to the
25517
+ * first item to match the scroll position of the column.
25518
+ *
25519
+ */
25520
+ this.setValue(items[0].value);
25521
+ }
25522
+ }
25523
+ }
25524
+ /** @internal */
25525
+ async scrollActiveItemIntoView() {
25526
+ const activeEl = this.activeItem;
25527
+ if (activeEl) {
25528
+ this.centerPickerItemInView(activeEl, false, false);
25529
+ }
25530
+ }
25531
+ /**
25532
+ * Sets the value prop and fires the ionChange event.
25533
+ * This is used when we need to fire ionChange from
25534
+ * user-generated events that cannot be caught with normal
25535
+ * input/change event listeners.
25536
+ * @internal
25537
+ */
25538
+ async setValue(value) {
25539
+ const { items } = this;
25540
+ this.value = value;
25541
+ const findItem = items.find((item) => item.value === value && item.disabled !== true);
25542
+ if (findItem) {
25543
+ this.ionChange.emit(findItem);
25544
+ }
25545
+ }
25546
+ get activeItem() {
25547
+ // If the whole picker column is disabled, the current value should appear active
25548
+ // If the current value item is specifically disabled, it should not appear active
25549
+ const selector = `.picker-item[data-value="${this.value}"]${this.disabled ? '' : ':not([disabled])'}`;
25550
+ return getElementRoot(this.el).querySelector(selector);
25551
+ }
25552
+ render() {
25553
+ const { items, color, disabled: pickerDisabled, isActive, numericInput } = this;
25554
+ const mode = getIonMode$1(this);
25555
+ /**
25556
+ * exportparts is needed so ion-datetime can expose the parts
25557
+ * from two layers of shadow nesting. If this causes problems,
25558
+ * the attribute can be moved to datetime.tsx and set on every
25559
+ * instance of ion-picker-column there instead.
25560
+ */
25561
+ return (hAsync(Host, { exportparts: `${PICKER_ITEM_PART}, ${PICKER_ITEM_ACTIVE_PART}`, disabled: pickerDisabled, tabindex: pickerDisabled ? null : 0, class: createColorClasses$1(color, {
25562
+ [mode]: true,
25563
+ ['picker-column-active']: isActive,
25564
+ ['picker-column-numeric-input']: numericInput,
25565
+ }) }, hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), items.map((item, index) => {
25566
+ const isItemDisabled = pickerDisabled || item.disabled || false;
25567
+ return (hAsync("button", { tabindex: "-1", class: {
25568
+ 'picker-item': true,
25569
+ }, "data-value": item.value, "data-index": index, onClick: (ev) => {
25570
+ this.centerPickerItemInView(ev.target, true);
25571
+ }, disabled: isItemDisabled, part: PICKER_ITEM_PART }, item.text));
25572
+ }), hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0")));
25573
+ }
25574
+ get el() { return getElement(this); }
25575
+ static get watchers() { return {
25576
+ "value": ["valueChange"]
25577
+ }; }
25578
+ static get style() { return {
25579
+ ios: pickerColumnIosCss$1,
25580
+ md: pickerColumnMdCss$1
25581
+ }; }
25582
+ static get cmpMeta() { return {
25583
+ "$flags$": 41,
25584
+ "$tagName$": "ion-picker-column",
25585
+ "$members$": {
25586
+ "disabled": [4],
25587
+ "items": [16],
25588
+ "value": [1032],
25589
+ "color": [513],
25590
+ "numericInput": [4, "numeric-input"],
25591
+ "isActive": [32],
25592
+ "scrollActiveItemIntoView": [64],
25593
+ "setValue": [64]
25594
+ },
25595
+ "$listeners$": undefined,
25596
+ "$lazyBundleId$": "-",
25597
+ "$attrsToReflect$": [["color", "color"]]
25598
+ }; }
25599
+ }
25600
+ const PICKER_ITEM_ACTIVE_CLASS = 'picker-item-active';
25601
+ const PICKER_ITEM_PART = 'wheel-item';
25602
+ const PICKER_ITEM_ACTIVE_PART = 'active';
25603
+
25604
+ const pickerColumnIosCss = ".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}@supports (inset-inline-start: 0){.picker-opt{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-opt{left:0}:host-context([dir=rtl]) .picker-opt{left:unset;right:unset;right:0}[dir=rtl] .picker-opt{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-opt:dir(rtl){left:unset;right:unset;right:0}}}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:20px;line-height:42px;pointer-events:none}.picker-opt{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-transform-origin:center center;transform-origin:center center;height:46px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:20px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}:host-context([dir=rtl]) .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}[dir=rtl] .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}@supports selector(:dir(rtl)){.picker-opt:dir(rtl){-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}}";
25605
+
25606
+ const pickerColumnMdCss = ".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}@supports (inset-inline-start: 0){.picker-opt{inset-inline-start:0}}@supports not (inset-inline-start: 0){.picker-opt{left:0}:host-context([dir=rtl]) .picker-opt{left:unset;right:unset;right:0}[dir=rtl] .picker-opt{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){.picker-opt:dir(rtl){left:unset;right:unset;right:0}}}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:22px;line-height:42px;pointer-events:none}.picker-opt{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;height:43px;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:22px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}.picker-prefix,.picker-suffix,.picker-opt.picker-opt-selected{color:var(--ion-color-primary, #3880ff)}";
25607
+
25608
+ /**
25609
+ * @internal
25610
+ */
25611
+ class PickerColumnCmp {
25612
+ constructor(hostRef) {
25613
+ registerInstance(this, hostRef);
25614
+ this.ionPickerColChange = createEvent(this, "ionPickerColChange", 7);
25615
+ this.optHeight = 0;
25616
+ this.rotateFactor = 0;
25617
+ this.scaleFactor = 1;
25618
+ this.velocity = 0;
25619
+ this.y = 0;
25620
+ this.noAnimate = true;
25621
+ // `colDidChange` is a flag that gets set when the column is changed
25622
+ // dynamically. When this flag is set, the column will refresh
25623
+ // after the component re-renders to incorporate the new column data.
25624
+ // This is necessary because `this.refresh` queries for the option elements,
25625
+ // so it needs to wait for the latest elements to be available in the DOM.
25626
+ // Ex: column is created with 3 options. User updates the column data
25627
+ // to have 5 options. The column will still think it only has 3 options.
25628
+ this.colDidChange = false;
25629
+ this.col = undefined;
25630
+ }
25631
+ colChanged() {
25632
+ this.colDidChange = true;
25633
+ }
25634
+ async connectedCallback() {
25635
+ let pickerRotateFactor = 0;
25636
+ let pickerScaleFactor = 0.81;
25637
+ const mode = getIonMode$1(this);
25638
+ if (mode === 'ios') {
25639
+ pickerRotateFactor = -0.46;
25640
+ pickerScaleFactor = 1;
25641
+ }
25642
+ this.rotateFactor = pickerRotateFactor;
25643
+ this.scaleFactor = pickerScaleFactor;
25644
+ this.gesture = (await Promise.resolve().then(function () { return index; })).createGesture({
25645
+ el: this.el,
25646
+ gestureName: 'picker-swipe',
25647
+ gesturePriority: 100,
25648
+ threshold: 0,
25649
+ passive: false,
25650
+ onStart: (ev) => this.onStart(ev),
25651
+ onMove: (ev) => this.onMove(ev),
25652
+ onEnd: (ev) => this.onEnd(ev),
25653
+ });
25654
+ this.gesture.enable();
25655
+ // Options have not been initialized yet
25656
+ // Animation must be disabled through the `noAnimate` flag
25657
+ // Otherwise, the options will render
25658
+ // at the top of the column and transition down
25659
+ this.tmrId = setTimeout(() => {
25660
+ this.noAnimate = false;
25661
+ // After initialization, `refresh()` will be called
25662
+ // At this point, animation will be enabled. The options will
25663
+ // animate as they are being selected.
25664
+ this.refresh(true);
25665
+ }, 250);
25666
+ }
25667
+ componentDidLoad() {
25668
+ this.onDomChange();
25669
+ }
25670
+ componentDidUpdate() {
25671
+ // Options may have changed since last update.
25672
+ if (this.colDidChange) {
25673
+ // Animation must be disabled through the `onDomChange` parameter.
25674
+ // Otherwise, the recently added options will render
25675
+ // at the top of the column and transition down
25676
+ this.onDomChange(true, false);
25677
+ this.colDidChange = false;
25678
+ }
25679
+ }
25680
+ disconnectedCallback() {
25681
+ if (this.rafId !== undefined)
25682
+ cancelAnimationFrame(this.rafId);
25683
+ if (this.tmrId)
25684
+ clearTimeout(this.tmrId);
25685
+ if (this.gesture) {
25686
+ this.gesture.destroy();
25687
+ this.gesture = undefined;
25688
+ }
25689
+ }
25690
+ emitColChange() {
25691
+ this.ionPickerColChange.emit(this.col);
25692
+ }
25693
+ setSelected(selectedIndex, duration) {
25694
+ // if there is a selected index, then figure out it's y position
25695
+ // if there isn't a selected index, then just use the top y position
25696
+ const y = selectedIndex > -1 ? -(selectedIndex * this.optHeight) : 0;
25697
+ this.velocity = 0;
25698
+ // set what y position we're at
25699
+ if (this.rafId !== undefined)
25700
+ cancelAnimationFrame(this.rafId);
25701
+ this.update(y, duration, true);
25702
+ this.emitColChange();
25703
+ }
25704
+ update(y, duration, saveY) {
25705
+ if (!this.optsEl) {
25706
+ return;
25707
+ }
25708
+ // ensure we've got a good round number :)
25709
+ let translateY = 0;
25710
+ let translateZ = 0;
25711
+ const { col, rotateFactor } = this;
25712
+ const prevSelected = col.selectedIndex;
25713
+ const selectedIndex = (col.selectedIndex = this.indexForY(-y));
25714
+ const durationStr = duration === 0 ? '' : duration + 'ms';
25715
+ const scaleStr = `scale(${this.scaleFactor})`;
25716
+ const children = this.optsEl.children;
25717
+ for (let i = 0; i < children.length; i++) {
25718
+ const button = children[i];
25719
+ const opt = col.options[i];
25720
+ const optOffset = i * this.optHeight + y;
25721
+ let transform = '';
25722
+ if (rotateFactor !== 0) {
25723
+ const rotateX = optOffset * rotateFactor;
25724
+ if (Math.abs(rotateX) <= 90) {
25725
+ translateY = 0;
25726
+ translateZ = 90;
25727
+ transform = `rotateX(${rotateX}deg) `;
25659
25728
  }
25660
- return;
25661
- }
25662
- this.actionOnClick = () => {
25663
- this.exitInputMode();
25664
- };
25665
- };
25666
- /**
25667
- * Enters input mode to allow
25668
- * for text entry of numeric values.
25669
- * If on mobile, we focus a hidden input
25670
- * field so that the on screen keyboard
25671
- * is brought up. When tabbing using a
25672
- * keyboard, picker columns receive an outline
25673
- * to indicate they are focused. As a result,
25674
- * we should not focus the hidden input as it
25675
- * would cause the outline to go away, preventing
25676
- * users from having any visual indication of which
25677
- * column is focused.
25678
- */
25679
- this.enterInputMode = (columnEl, focusInput = true) => {
25680
- const { inputEl, el } = this;
25681
- if (!inputEl) {
25682
- return;
25683
- }
25684
- /**
25685
- * Only active input mode if there is at
25686
- * least one column that accepts numeric input.
25687
- */
25688
- const hasInputColumn = el.querySelector('ion-picker-column-internal.picker-column-numeric-input');
25689
- if (!hasInputColumn) {
25690
- return;
25691
- }
25692
- /**
25693
- * If columnEl is undefined then
25694
- * it is assumed that all numeric pickers
25695
- * are eligible for text entry.
25696
- * (i.e. hour and minute columns)
25697
- */
25698
- this.useInputMode = true;
25699
- this.inputModeColumn = columnEl;
25700
- /**
25701
- * Users with a keyboard and mouse can
25702
- * activate input mode where the input is
25703
- * focused as well as when it is not focused,
25704
- * so we need to make sure we clean up any
25705
- * old listeners.
25706
- */
25707
- if (focusInput) {
25708
- if (this.destroyKeypressListener) {
25709
- this.destroyKeypressListener();
25710
- this.destroyKeypressListener = undefined;
25729
+ else {
25730
+ translateY = -9999;
25711
25731
  }
25712
- inputEl.focus();
25713
25732
  }
25714
25733
  else {
25715
- el.addEventListener('keypress', this.onKeyPress);
25716
- this.destroyKeypressListener = () => {
25717
- el.removeEventListener('keypress', this.onKeyPress);
25718
- };
25719
- }
25720
- this.emitInputModeChange();
25721
- };
25722
- this.onKeyPress = (ev) => {
25723
- const { inputEl } = this;
25724
- if (!inputEl) {
25725
- return;
25726
- }
25727
- const parsedValue = parseInt(ev.key, 10);
25728
- /**
25729
- * Only numbers should be allowed
25730
- */
25731
- if (!Number.isNaN(parsedValue)) {
25732
- inputEl.value += ev.key;
25733
- this.onInputChange();
25734
+ translateZ = 0;
25735
+ translateY = optOffset;
25734
25736
  }
25735
- };
25736
- this.selectSingleColumn = () => {
25737
- const { inputEl, inputModeColumn, singleColumnSearchTimeout } = this;
25738
- if (!inputEl || !inputModeColumn) {
25739
- return;
25737
+ const selected = selectedIndex === i;
25738
+ transform += `translate3d(0px,${translateY}px,${translateZ}px) `;
25739
+ if (this.scaleFactor !== 1 && !selected) {
25740
+ transform += scaleStr;
25740
25741
  }
25741
- const values = inputModeColumn.items.filter((item) => item.disabled !== true);
25742
- /**
25743
- * If users pause for a bit, the search
25744
- * value should be reset similar to how a
25745
- * <select> behaves. So typing "34", waiting,
25746
- * then typing "5" should select "05".
25747
- */
25748
- if (singleColumnSearchTimeout) {
25749
- clearTimeout(singleColumnSearchTimeout);
25742
+ // Update transition duration
25743
+ if (this.noAnimate) {
25744
+ opt.duration = 0;
25745
+ button.style.transitionDuration = '';
25750
25746
  }
25751
- this.singleColumnSearchTimeout = setTimeout(() => {
25752
- inputEl.value = '';
25753
- this.singleColumnSearchTimeout = undefined;
25754
- }, 1000);
25755
- /**
25756
- * For values that are longer than 2 digits long
25757
- * we should shift the value over 1 character
25758
- * to the left. So typing "456" would result in "56".
25759
- * TODO: If we want to support more than just
25760
- * time entry, we should update this value to be
25761
- * the max length of all of the picker items.
25762
- */
25763
- if (inputEl.value.length >= 3) {
25764
- const startIndex = inputEl.value.length - 2;
25765
- const newString = inputEl.value.substring(startIndex);
25766
- inputEl.value = newString;
25767
- this.selectSingleColumn();
25768
- return;
25747
+ else if (duration !== opt.duration) {
25748
+ opt.duration = duration;
25749
+ button.style.transitionDuration = durationStr;
25769
25750
  }
25770
- /**
25771
- * Checking the value of the input gets priority
25772
- * first. For example, if the value of the input
25773
- * is "1" and we entered "2", then the complete value
25774
- * is "12" and we should select hour 12.
25775
- *
25776
- * Regex removes any leading zeros from values like "02",
25777
- * but it keeps a single zero if there are only zeros in the string.
25778
- * 0+(?=[1-9]) --> Match 1 or more zeros that are followed by 1-9
25779
- * 0+(?=0$) --> Match 1 or more zeros that must be followed by one 0 and end.
25780
- */
25781
- const findItemFromCompleteValue = values.find(({ text }) => {
25782
- const parsedText = text.replace(/^0+(?=[1-9])|0+(?=0$)/, '');
25783
- return parsedText === inputEl.value;
25784
- });
25785
- if (findItemFromCompleteValue) {
25786
- inputModeColumn.setValue(findItemFromCompleteValue.value);
25787
- return;
25751
+ // Update transform
25752
+ if (transform !== opt.transform) {
25753
+ opt.transform = transform;
25788
25754
  }
25755
+ button.style.transform = transform;
25789
25756
  /**
25790
- * If we typed "56" to get minute 56, then typed "7",
25791
- * we should select "07" as "567" is not a valid minute.
25757
+ * Ensure that the select column
25758
+ * item has the selected class
25792
25759
  */
25793
- if (inputEl.value.length === 2) {
25794
- const changedCharacter = inputEl.value.substring(inputEl.value.length - 1);
25795
- inputEl.value = changedCharacter;
25796
- this.selectSingleColumn();
25797
- }
25798
- };
25799
- /**
25800
- * Searches a list of column items for a particular
25801
- * value. This is currently used for numeric values.
25802
- * The zeroBehavior can be set to account for leading
25803
- * or trailing zeros when looking at the item text.
25804
- */
25805
- this.searchColumn = (colEl, value, zeroBehavior = 'start') => {
25806
- const behavior = zeroBehavior === 'start' ? /^0+/ : /0$/;
25807
- const item = colEl.items.find(({ text, disabled }) => disabled !== true && text.replace(behavior, '') === value);
25808
- if (item) {
25809
- colEl.setValue(item.value);
25760
+ opt.selected = selected;
25761
+ if (selected) {
25762
+ button.classList.add(PICKER_OPT_SELECTED);
25810
25763
  }
25811
- };
25812
- this.selectMultiColumn = () => {
25813
- const { inputEl, el } = this;
25814
- if (!inputEl) {
25815
- return;
25764
+ else {
25765
+ button.classList.remove(PICKER_OPT_SELECTED);
25816
25766
  }
25817
- const numericPickers = Array.from(el.querySelectorAll('ion-picker-column-internal')).filter((col) => col.numericInput);
25818
- const firstColumn = numericPickers[0];
25819
- const lastColumn = numericPickers[1];
25820
- let value = inputEl.value;
25821
- let minuteValue;
25822
- switch (value.length) {
25823
- case 1:
25824
- this.searchColumn(firstColumn, value);
25825
- break;
25826
- case 2:
25827
- /**
25828
- * If the first character is `0` or `1` it is
25829
- * possible that users are trying to type `09`
25830
- * or `11` into the hour field, so we should look
25831
- * at that first.
25832
- */
25833
- const firstCharacter = inputEl.value.substring(0, 1);
25834
- value = firstCharacter === '0' || firstCharacter === '1' ? inputEl.value : firstCharacter;
25835
- this.searchColumn(firstColumn, value);
25836
- /**
25837
- * If only checked the first value,
25838
- * we can check the second value
25839
- * for a match in the minutes column
25840
- */
25841
- if (value.length === 1) {
25842
- minuteValue = inputEl.value.substring(inputEl.value.length - 1);
25843
- this.searchColumn(lastColumn, minuteValue, 'end');
25844
- }
25845
- break;
25846
- case 3:
25847
- /**
25848
- * If the first character is `0` or `1` it is
25849
- * possible that users are trying to type `09`
25850
- * or `11` into the hour field, so we should look
25851
- * at that first.
25852
- */
25853
- const firstCharacterAgain = inputEl.value.substring(0, 1);
25854
- value =
25855
- firstCharacterAgain === '0' || firstCharacterAgain === '1'
25856
- ? inputEl.value.substring(0, 2)
25857
- : firstCharacterAgain;
25858
- this.searchColumn(firstColumn, value);
25859
- /**
25860
- * If only checked the first value,
25861
- * we can check the second value
25862
- * for a match in the minutes column
25863
- */
25864
- minuteValue = value.length === 1 ? inputEl.value.substring(1) : inputEl.value.substring(2);
25865
- this.searchColumn(lastColumn, minuteValue, 'end');
25866
- break;
25867
- case 4:
25868
- /**
25869
- * If the first character is `0` or `1` it is
25870
- * possible that users are trying to type `09`
25871
- * or `11` into the hour field, so we should look
25872
- * at that first.
25873
- */
25874
- const firstCharacterAgainAgain = inputEl.value.substring(0, 1);
25875
- value =
25876
- firstCharacterAgainAgain === '0' || firstCharacterAgainAgain === '1'
25877
- ? inputEl.value.substring(0, 2)
25878
- : firstCharacterAgainAgain;
25879
- this.searchColumn(firstColumn, value);
25880
- /**
25881
- * If only checked the first value,
25882
- * we can check the second value
25883
- * for a match in the minutes column
25884
- */
25885
- const minuteValueAgain = value.length === 1
25886
- ? inputEl.value.substring(1, inputEl.value.length)
25887
- : inputEl.value.substring(2, inputEl.value.length);
25888
- this.searchColumn(lastColumn, minuteValueAgain, 'end');
25889
- break;
25890
- default:
25891
- const startIndex = inputEl.value.length - 4;
25892
- const newString = inputEl.value.substring(startIndex);
25893
- inputEl.value = newString;
25894
- this.selectMultiColumn();
25895
- break;
25767
+ }
25768
+ this.col.prevSelected = prevSelected;
25769
+ if (saveY) {
25770
+ this.y = y;
25771
+ }
25772
+ if (this.lastIndex !== selectedIndex) {
25773
+ // have not set a last index yet
25774
+ hapticSelectionChanged();
25775
+ this.lastIndex = selectedIndex;
25776
+ }
25777
+ }
25778
+ decelerate() {
25779
+ if (this.velocity !== 0) {
25780
+ // still decelerating
25781
+ this.velocity *= DECELERATION_FRICTION;
25782
+ // do not let it go slower than a velocity of 1
25783
+ this.velocity = this.velocity > 0 ? Math.max(this.velocity, 1) : Math.min(this.velocity, -1);
25784
+ let y = this.y + this.velocity;
25785
+ if (y > this.minY) {
25786
+ // whoops, it's trying to scroll up farther than the options we have!
25787
+ y = this.minY;
25788
+ this.velocity = 0;
25896
25789
  }
25897
- };
25898
- /**
25899
- * Searches the value of the active column
25900
- * to determine which value users are trying
25901
- * to select
25902
- */
25903
- this.onInputChange = () => {
25904
- const { useInputMode, inputEl, inputModeColumn } = this;
25905
- if (!useInputMode || !inputEl) {
25906
- return;
25790
+ else if (y < this.maxY) {
25791
+ // gahh, it's trying to scroll down farther than we can!
25792
+ y = this.maxY;
25793
+ this.velocity = 0;
25907
25794
  }
25908
- if (inputModeColumn) {
25909
- this.selectSingleColumn();
25795
+ this.update(y, 0, true);
25796
+ const notLockedIn = Math.round(y) % this.optHeight !== 0 || Math.abs(this.velocity) > 1;
25797
+ if (notLockedIn) {
25798
+ // isn't locked in yet, keep decelerating until it is
25799
+ this.rafId = requestAnimationFrame(() => this.decelerate());
25910
25800
  }
25911
25801
  else {
25912
- this.selectMultiColumn();
25802
+ this.velocity = 0;
25803
+ this.emitColChange();
25804
+ hapticSelectionEnd();
25913
25805
  }
25914
- };
25915
- /**
25916
- * Emit ionInputModeChange. Picker columns
25917
- * listen for this event to determine whether
25918
- * or not their column is "active" for text input.
25919
- */
25920
- this.emitInputModeChange = () => {
25921
- const { useInputMode, inputModeColumn } = this;
25922
- this.ionInputModeChange.emit({
25923
- useInputMode,
25924
- inputModeColumn,
25925
- });
25926
- };
25806
+ }
25807
+ else if (this.y % this.optHeight !== 0) {
25808
+ // needs to still get locked into a position so options line up
25809
+ const currentPos = Math.abs(this.y % this.optHeight);
25810
+ // create a velocity in the direction it needs to scroll
25811
+ this.velocity = currentPos > this.optHeight / 2 ? 1 : -1;
25812
+ this.decelerate();
25813
+ }
25927
25814
  }
25928
- /**
25929
- * When the picker is interacted with
25930
- * we need to prevent touchstart so other
25931
- * gestures do not fire. For example,
25932
- * scrolling on the wheel picker
25933
- * in ion-datetime should not cause
25934
- * a card modal to swipe to close.
25935
- */
25936
- preventTouchStartPropagation(ev) {
25937
- ev.stopPropagation();
25815
+ indexForY(y) {
25816
+ return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);
25938
25817
  }
25939
- componentWillLoad() {
25940
- getElementRoot(this.el).addEventListener('focusin', this.onFocusIn);
25941
- getElementRoot(this.el).addEventListener('focusout', this.onFocusOut);
25818
+ onStart(detail) {
25819
+ // We have to prevent default in order to block scrolling under the picker
25820
+ // but we DO NOT have to stop propagation, since we still want
25821
+ // some "click" events to capture
25822
+ if (detail.event.cancelable) {
25823
+ detail.event.preventDefault();
25824
+ }
25825
+ detail.event.stopPropagation();
25826
+ hapticSelectionStart();
25827
+ // reset everything
25828
+ if (this.rafId !== undefined)
25829
+ cancelAnimationFrame(this.rafId);
25830
+ const options = this.col.options;
25831
+ let minY = options.length - 1;
25832
+ let maxY = 0;
25833
+ for (let i = 0; i < options.length; i++) {
25834
+ if (!options[i].disabled) {
25835
+ minY = Math.min(minY, i);
25836
+ maxY = Math.max(maxY, i);
25837
+ }
25838
+ }
25839
+ this.minY = -(minY * this.optHeight);
25840
+ this.maxY = -(maxY * this.optHeight);
25942
25841
  }
25943
- /**
25944
- * @internal
25945
- * Exits text entry mode for the picker
25946
- * This method blurs the hidden input
25947
- * and cause the keyboard to dismiss.
25948
- */
25949
- async exitInputMode() {
25950
- const { inputEl, useInputMode } = this;
25951
- if (!useInputMode || !inputEl) {
25842
+ onMove(detail) {
25843
+ if (detail.event.cancelable) {
25844
+ detail.event.preventDefault();
25845
+ }
25846
+ detail.event.stopPropagation();
25847
+ // update the scroll position relative to pointer start position
25848
+ let y = this.y + detail.deltaY;
25849
+ if (y > this.minY) {
25850
+ // scrolling up higher than scroll area
25851
+ y = Math.pow(y, 0.8);
25852
+ this.bounceFrom = y;
25853
+ }
25854
+ else if (y < this.maxY) {
25855
+ // scrolling down below scroll area
25856
+ y += Math.pow(this.maxY - y, 0.9);
25857
+ this.bounceFrom = y;
25858
+ }
25859
+ else {
25860
+ this.bounceFrom = 0;
25861
+ }
25862
+ this.update(y, 0, false);
25863
+ }
25864
+ onEnd(detail) {
25865
+ if (this.bounceFrom > 0) {
25866
+ // bounce back up
25867
+ this.update(this.minY, 100, true);
25868
+ this.emitColChange();
25952
25869
  return;
25953
25870
  }
25954
- this.useInputMode = false;
25955
- this.inputModeColumn = undefined;
25956
- inputEl.blur();
25957
- inputEl.value = '';
25958
- if (this.destroyKeypressListener) {
25959
- this.destroyKeypressListener();
25960
- this.destroyKeypressListener = undefined;
25871
+ else if (this.bounceFrom < 0) {
25872
+ // bounce back down
25873
+ this.update(this.maxY, 100, true);
25874
+ this.emitColChange();
25875
+ return;
25961
25876
  }
25962
- this.emitInputModeChange();
25877
+ this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);
25878
+ if (this.velocity === 0 && detail.deltaY === 0) {
25879
+ const opt = detail.event.target.closest('.picker-opt');
25880
+ if (opt === null || opt === void 0 ? void 0 : opt.hasAttribute('opt-index')) {
25881
+ this.setSelected(parseInt(opt.getAttribute('opt-index'), 10), TRANSITION_DURATION);
25882
+ }
25883
+ }
25884
+ else {
25885
+ this.y += detail.deltaY;
25886
+ if (Math.abs(detail.velocityY) < 0.05) {
25887
+ const isScrollingUp = detail.deltaY > 0;
25888
+ const optHeightFraction = (Math.abs(this.y) % this.optHeight) / this.optHeight;
25889
+ if (isScrollingUp && optHeightFraction > 0.5) {
25890
+ this.velocity = Math.abs(this.velocity) * -1;
25891
+ }
25892
+ else if (!isScrollingUp && optHeightFraction <= 0.5) {
25893
+ this.velocity = Math.abs(this.velocity);
25894
+ }
25895
+ }
25896
+ this.decelerate();
25897
+ }
25898
+ }
25899
+ refresh(forceRefresh, animated) {
25900
+ var _a;
25901
+ let min = this.col.options.length - 1;
25902
+ let max = 0;
25903
+ const options = this.col.options;
25904
+ for (let i = 0; i < options.length; i++) {
25905
+ if (!options[i].disabled) {
25906
+ min = Math.min(min, i);
25907
+ max = Math.max(max, i);
25908
+ }
25909
+ }
25910
+ /**
25911
+ * Only update selected value if column has a
25912
+ * velocity of 0. If it does not, then the
25913
+ * column is animating might land on
25914
+ * a value different than the value at
25915
+ * selectedIndex
25916
+ */
25917
+ if (this.velocity !== 0) {
25918
+ return;
25919
+ }
25920
+ const selectedIndex = clamp(min, (_a = this.col.selectedIndex) !== null && _a !== void 0 ? _a : 0, max);
25921
+ if (this.col.prevSelected !== selectedIndex || forceRefresh) {
25922
+ const y = selectedIndex * this.optHeight * -1;
25923
+ const duration = animated ? TRANSITION_DURATION : 0;
25924
+ this.velocity = 0;
25925
+ this.update(y, duration, true);
25926
+ }
25927
+ }
25928
+ onDomChange(forceRefresh, animated) {
25929
+ const colEl = this.optsEl;
25930
+ if (colEl) {
25931
+ // DOM READ
25932
+ // We perfom a DOM read over a rendered item, this needs to happen after the first render or after the the column has changed
25933
+ this.optHeight = colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0;
25934
+ }
25935
+ this.refresh(forceRefresh, animated);
25963
25936
  }
25964
25937
  render() {
25965
- return (hAsync(Host, { onPointerDown: (ev) => this.onPointerDown(ev), onClick: () => this.onClick() }, hAsync("input", { "aria-hidden": "true", tabindex: -1, inputmode: "numeric", type: "number", ref: (el) => (this.inputEl = el), onInput: () => this.onInputChange(), onBlur: () => this.exitInputMode() }), hAsync("div", { class: "picker-before" }), hAsync("div", { class: "picker-after" }), hAsync("div", { class: "picker-highlight", ref: (el) => (this.highlightEl = el) }), hAsync("slot", null)));
25938
+ const col = this.col;
25939
+ const mode = getIonMode$1(this);
25940
+ return (hAsync(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: {
25941
+ 'max-width': this.col.columnWidth,
25942
+ } }, col.prefix && (hAsync("div", { class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), hAsync("div", { class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (hAsync("button", { "aria-label": o.ariaLabel, class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, "opt-index": index }, o.text)))), col.suffix && (hAsync("div", { class: "picker-suffix", style: { width: col.suffixWidth } }, col.suffix))));
25966
25943
  }
25967
25944
  get el() { return getElement(this); }
25945
+ static get watchers() { return {
25946
+ "col": ["colChanged"]
25947
+ }; }
25968
25948
  static get style() { return {
25969
- ios: pickerInternalIosCss,
25970
- md: pickerInternalMdCss
25949
+ ios: pickerColumnIosCss,
25950
+ md: pickerColumnMdCss
25971
25951
  }; }
25972
25952
  static get cmpMeta() { return {
25973
- "$flags$": 41,
25974
- "$tagName$": "ion-picker-internal",
25953
+ "$flags$": 32,
25954
+ "$tagName$": "ion-picker-legacy-column",
25975
25955
  "$members$": {
25976
- "exitInputMode": [64]
25956
+ "col": [16]
25977
25957
  },
25978
- "$listeners$": [[1, "touchstart", "preventTouchStartPropagation"]],
25958
+ "$listeners$": undefined,
25959
+ "$lazyBundleId$": "-",
25960
+ "$attrsToReflect$": []
25961
+ }; }
25962
+ }
25963
+ const PICKER_OPT_SELECTED = 'picker-opt-selected';
25964
+ const DECELERATION_FRICTION = 0.97;
25965
+ const MAX_PICKER_SPEED = 90;
25966
+ const TRANSITION_DURATION = 150;
25967
+
25968
+ class PickerColumnOption {
25969
+ constructor(hostRef) {
25970
+ registerInstance(this, hostRef);
25971
+ this.optionId = `ion-picker-opt-${pickerOptionIds++}`;
25972
+ this.inheritedAttributes = {};
25973
+ this.disabled = false;
25974
+ this.value = undefined;
25975
+ }
25976
+ componentWillLoad() {
25977
+ this.inheritedAttributes = inheritAriaAttributes(this.el);
25978
+ }
25979
+ render() {
25980
+ const { value, disabled, inheritedAttributes } = this;
25981
+ const ariaLabel = inheritedAttributes['aria-label'] || null;
25982
+ return (hAsync(Host, { id: this.optionId, class: getIonMode$1(this) }, hAsync("button", { tabindex: "-1", "aria-label": ariaLabel, class: {
25983
+ 'picker-opt': true,
25984
+ 'picker-opt-disabled': !!disabled,
25985
+ }, disabled: disabled }, hAsync("slot", null, value))));
25986
+ }
25987
+ get el() { return getElement(this); }
25988
+ static get cmpMeta() { return {
25989
+ "$flags$": 9,
25990
+ "$tagName$": "ion-picker-column-option",
25991
+ "$members$": {
25992
+ "disabled": [4],
25993
+ "value": [8]
25994
+ },
25995
+ "$listeners$": undefined,
25979
25996
  "$lazyBundleId$": "-",
25980
25997
  "$attrsToReflect$": []
25981
25998
  }; }
25982
25999
  }
26000
+ let pickerOptionIds = 0;
25983
26001
 
25984
26002
  /**
25985
26003
  * Returns the dimensions of the popover
@@ -34944,10 +34962,11 @@ registerComponents([
34944
34962
  Nav,
34945
34963
  NavLink,
34946
34964
  Note,
34965
+ Picker$1,
34947
34966
  Picker,
34967
+ PickerColumn,
34948
34968
  PickerColumnCmp,
34949
- PickerColumnInternal,
34950
- PickerInternal,
34969
+ PickerColumnOption,
34951
34970
  Popover,
34952
34971
  ProgressBar,
34953
34972
  Radio,