@ionic/core 7.5.8-dev.11701791090.18ebbea8 → 7.5.8-dev.11701806358.1ca1b519

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 (308) 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/ion-content.js +1 -1
  5. package/components/ion-datetime.js +40 -64
  6. package/components/ion-input.js +2 -21
  7. package/components/ion-picker-column-option.d.ts +11 -0
  8. package/components/ion-picker-column-option.js +9 -0
  9. package/components/ion-picker-column.js +2 -2
  10. package/components/ion-picker-legacy-column.d.ts +11 -0
  11. package/components/ion-picker-legacy-column.js +9 -0
  12. package/components/{ion-picker-internal.d.ts → ion-picker-legacy.d.ts} +4 -4
  13. package/components/ion-picker-legacy.js +309 -0
  14. package/components/ion-picker.js +1 -309
  15. package/components/ion-textarea.js +2 -25
  16. package/components/overlays.js +11 -4
  17. package/components/picker-column-option.js +122 -0
  18. package/components/picker-column.js +363 -317
  19. package/components/picker-column2.js +379 -0
  20. package/components/{picker-internal.js → picker.js} +16 -16
  21. package/dist/cjs/{button-active-417ccdcb.js → button-active-9d7e0640.js} +1 -1
  22. package/dist/cjs/{data-36b9094e.js → data-e7526b58.js} +1 -1
  23. package/dist/cjs/{gesture-controller-c40c045a.js → gesture-controller-9436f482.js} +1 -0
  24. package/dist/cjs/{index-d1b59ffa.js → index-ee07ed59.js} +1 -1
  25. package/dist/cjs/index.cjs.js +3 -3
  26. package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
  27. package/dist/cjs/ion-alert.cjs.entry.js +4 -4
  28. package/dist/cjs/ion-app_8.cjs.entry.js +2 -2
  29. package/dist/cjs/ion-backdrop.cjs.entry.js +0 -12
  30. package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
  31. package/dist/cjs/ion-datetime_3.cjs.entry.js +36 -56
  32. package/dist/cjs/ion-input.cjs.entry.js +2 -21
  33. package/dist/cjs/ion-item-option_3.cjs.entry.js +1 -1
  34. package/dist/cjs/ion-loading.cjs.entry.js +2 -1
  35. package/dist/cjs/ion-menu_3.cjs.entry.js +3 -3
  36. package/dist/cjs/ion-modal.cjs.entry.js +3 -3
  37. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  38. package/dist/cjs/ion-picker-column-option.cjs.entry.js +104 -0
  39. package/dist/cjs/{ion-picker-column-internal.cjs.entry.js → ion-picker-column.cjs.entry.js} +105 -72
  40. package/dist/cjs/{ion-picker-internal.cjs.entry.js → ion-picker.cjs.entry.js} +13 -13
  41. package/dist/cjs/ion-popover.cjs.entry.js +2 -1
  42. package/dist/cjs/ion-range.cjs.entry.js +1 -1
  43. package/dist/cjs/ion-refresher_2.cjs.entry.js +3 -3
  44. package/dist/cjs/ion-reorder_2.cjs.entry.js +1 -1
  45. package/dist/cjs/ion-segment_2.cjs.entry.js +1 -1
  46. package/dist/cjs/ion-select_3.cjs.entry.js +2 -1
  47. package/dist/cjs/ion-textarea.cjs.entry.js +2 -25
  48. package/dist/cjs/ion-toast.cjs.entry.js +2 -1
  49. package/dist/cjs/ion-toggle.cjs.entry.js +1 -1
  50. package/dist/cjs/ionic.cjs.js +1 -1
  51. package/dist/cjs/loader.cjs.js +1 -1
  52. package/dist/cjs/{overlays-5c379703.js → overlays-e8e05b0e.js} +11 -4
  53. package/dist/cjs/{swipe-back-2a858bbd.js → swipe-back-b8f2330b.js} +2 -2
  54. package/dist/collection/collection-manifest.json +7 -6
  55. package/dist/collection/components/backdrop/backdrop.js +0 -12
  56. package/dist/collection/components/content/content.css +0 -4
  57. package/dist/collection/components/datetime/datetime.ios.css +83 -37
  58. package/dist/collection/components/datetime/datetime.js +24 -36
  59. package/dist/collection/components/datetime/datetime.md.css +88 -37
  60. package/dist/collection/components/datetime/test/a11y/datetime.e2e.js +1 -1
  61. package/dist/collection/components/datetime/test/a11y/datetime.spec.js +6 -9
  62. package/dist/collection/components/datetime/test/basic/datetime.e2e.js +10 -0
  63. package/dist/collection/components/datetime/test/datetime.e2e.js +2 -2
  64. package/dist/collection/components/datetime/test/disabled/datetime.spec.js +4 -4
  65. package/dist/collection/components/datetime/test/locale/datetime.e2e.js +2 -2
  66. package/dist/collection/components/datetime/test/minmax/datetime.e2e.js +6 -6
  67. package/dist/collection/components/datetime/test/month-year-picker/datetime.e2e.js +1 -1
  68. package/dist/collection/components/datetime/test/prefer-wheel/datetime.e2e.js +43 -41
  69. package/dist/collection/components/datetime/test/presentation/datetime.e2e.js +1 -1
  70. package/dist/collection/components/datetime/test/readonly/datetime.e2e.js +4 -4
  71. package/dist/collection/components/datetime/test/values/datetime.e2e.js +15 -12
  72. package/dist/collection/components/datetime/utils/data.js +1 -1
  73. package/dist/collection/components/input/input.js +2 -21
  74. package/dist/collection/components/input/test/clear-on-edit/input.e2e.js +9 -21
  75. package/dist/collection/components/picker/picker.ios.css +100 -205
  76. package/dist/collection/components/picker/picker.js +461 -743
  77. package/dist/collection/components/picker/picker.md.css +98 -194
  78. package/dist/collection/components/{picker-internal/test/a11y/picker-internal.e2e.js → picker/test/a11y/picker.e2e.js} +2 -2
  79. package/dist/collection/components/picker/test/basic/picker.e2e.js +99 -13
  80. package/dist/collection/components/{picker-internal/test/keyboard-entry/picker-internal.e2e.js → picker/test/keyboard-entry/picker.e2e.js} +23 -22
  81. package/dist/collection/components/picker-column/picker-column.ios.css +120 -160
  82. package/dist/collection/components/picker-column/picker-column.js +514 -329
  83. package/dist/collection/components/picker-column/picker-column.md.css +134 -107
  84. package/dist/collection/components/{picker-column-internal/test/basic/picker-column-internal.e2e.js → picker-column/test/basic/picker-column.e2e.js} +8 -8
  85. package/dist/collection/components/picker-column/test/disabled/picker-column.e2e.js +113 -0
  86. package/dist/collection/components/picker-column/test/slots/picker-column.e2e.js +39 -0
  87. package/dist/collection/components/picker-column-option/picker-column-option.ios.css +87 -0
  88. package/dist/collection/components/picker-column-option/picker-column-option.js +173 -0
  89. package/dist/collection/components/{picker-column-internal/picker-column-internal.ios.css → picker-column-option/picker-column-option.md.css} +6 -53
  90. package/dist/collection/components/picker-column-option/test/a11y/picker-column-option.e2e.js +18 -0
  91. package/dist/collection/components/picker-column-option/test/basic/picker-column-option.e2e.js +37 -0
  92. package/dist/collection/components/picker-legacy/picker.ios.css +367 -0
  93. package/dist/collection/components/picker-legacy/picker.js +817 -0
  94. package/dist/collection/components/{picker-internal/picker-internal.ios.css → picker-legacy/picker.md.css} +192 -100
  95. package/dist/collection/components/picker-legacy/test/basic/picker.e2e.js +25 -0
  96. package/dist/collection/components/{picker → picker-legacy}/test/is-open/picker.e2e.js +4 -4
  97. package/dist/collection/components/{picker → picker-legacy}/test/picker-id.spec.js +5 -5
  98. package/dist/collection/components/{picker → picker-legacy}/test/trigger/picker.e2e.js +1 -1
  99. package/dist/collection/components/{picker-internal/picker-internal.md.css → picker-legacy-column/picker-column.ios.css} +98 -101
  100. package/dist/collection/components/picker-legacy-column/picker-column.js +419 -0
  101. package/dist/collection/components/{picker-column-internal/picker-column-internal.md.css → picker-legacy-column/picker-column.md.css} +113 -63
  102. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column-aria.spec.js +3 -3
  103. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column-dynamic.spec.js +2 -2
  104. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column.spec.js +2 -2
  105. package/dist/collection/components/{picker-column → picker-legacy-column}/test/standalone/picker-column.e2e.js +3 -3
  106. package/dist/collection/components/textarea/test/clear-on-edit/textarea.e2e.js +0 -28
  107. package/dist/collection/components/textarea/textarea.js +2 -25
  108. package/dist/collection/utils/gesture/gesture-controller.js +1 -1
  109. package/dist/collection/utils/overlays.js +11 -4
  110. package/dist/collection/utils/test/overlays/overlays-scroll-blocking.spec.js +65 -0
  111. package/dist/docs.json +493 -40
  112. package/dist/esm/{button-active-3fdf3e4f.js → button-active-ed9d848c.js} +1 -1
  113. package/dist/esm/{data-f5c75b4e.js → data-4b9508c9.js} +1 -1
  114. package/dist/esm/{gesture-controller-1bf57181.js → gesture-controller-314a54f6.js} +1 -1
  115. package/dist/esm/{index-2cf77112.js → index-39782642.js} +2 -2
  116. package/dist/esm/index.js +3 -3
  117. package/dist/esm/ion-action-sheet.entry.js +4 -4
  118. package/dist/esm/ion-alert.entry.js +4 -4
  119. package/dist/esm/ion-app_8.entry.js +2 -2
  120. package/dist/esm/ion-backdrop.entry.js +0 -12
  121. package/dist/esm/ion-datetime-button.entry.js +1 -1
  122. package/dist/esm/ion-datetime_3.entry.js +35 -55
  123. package/dist/esm/ion-input.entry.js +2 -21
  124. package/dist/esm/ion-item-option_3.entry.js +1 -1
  125. package/dist/esm/ion-loading.entry.js +2 -1
  126. package/dist/esm/ion-menu_3.entry.js +3 -3
  127. package/dist/esm/ion-modal.entry.js +3 -3
  128. package/dist/esm/ion-nav_2.entry.js +1 -1
  129. package/dist/esm/ion-picker-column-option.entry.js +100 -0
  130. package/dist/esm/{ion-picker-column-internal.entry.js → ion-picker-column.entry.js} +105 -72
  131. package/dist/esm/{ion-picker-internal.entry.js → ion-picker.entry.js} +13 -13
  132. package/dist/esm/ion-popover.entry.js +2 -1
  133. package/dist/esm/ion-range.entry.js +1 -1
  134. package/dist/esm/ion-refresher_2.entry.js +3 -3
  135. package/dist/esm/ion-reorder_2.entry.js +1 -1
  136. package/dist/esm/ion-segment_2.entry.js +1 -1
  137. package/dist/esm/ion-select_3.entry.js +2 -1
  138. package/dist/esm/ion-textarea.entry.js +2 -25
  139. package/dist/esm/ion-toast.entry.js +2 -1
  140. package/dist/esm/ion-toggle.entry.js +1 -1
  141. package/dist/esm/ionic.js +1 -1
  142. package/dist/esm/loader.js +1 -1
  143. package/dist/esm/{overlays-abf58489.js → overlays-fbc5cab5.js} +11 -4
  144. package/dist/esm/{swipe-back-a6f386fc.js → swipe-back-a8ca7f93.js} +2 -2
  145. package/dist/esm-es5/{button-active-3fdf3e4f.js → button-active-ed9d848c.js} +1 -1
  146. package/dist/esm-es5/{gesture-controller-1bf57181.js → gesture-controller-314a54f6.js} +1 -1
  147. package/dist/esm-es5/{index-2cf77112.js → index-39782642.js} +1 -1
  148. package/dist/esm-es5/index.js +1 -1
  149. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  150. package/dist/esm-es5/ion-alert.entry.js +1 -1
  151. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  152. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  153. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  154. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  155. package/dist/esm-es5/ion-input.entry.js +1 -1
  156. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  157. package/dist/esm-es5/ion-loading.entry.js +1 -1
  158. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  159. package/dist/esm-es5/ion-modal.entry.js +1 -1
  160. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  161. package/dist/esm-es5/ion-picker-column-option.entry.js +4 -0
  162. package/dist/esm-es5/ion-picker-column.entry.js +4 -0
  163. package/dist/esm-es5/ion-picker.entry.js +4 -0
  164. package/dist/esm-es5/ion-popover.entry.js +1 -1
  165. package/dist/esm-es5/ion-range.entry.js +1 -1
  166. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  167. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  168. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  169. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  170. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  171. package/dist/esm-es5/ion-toast.entry.js +1 -1
  172. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  173. package/dist/esm-es5/ionic.js +1 -1
  174. package/dist/esm-es5/loader.js +1 -1
  175. package/dist/esm-es5/overlays-fbc5cab5.js +4 -0
  176. package/dist/esm-es5/swipe-back-a8ca7f93.js +4 -0
  177. package/dist/html.html-data.json +152 -1
  178. package/dist/ionic/index.esm.js +1 -1
  179. package/dist/ionic/ionic.esm.js +1 -1
  180. package/dist/ionic/{p-b0dc1cf9.system.js → p-1d624e03.system.js} +1 -1
  181. package/dist/ionic/{p-d40a974a.entry.js → p-1fc72959.entry.js} +1 -1
  182. package/dist/ionic/{p-c7c8429a.system.js → p-20d469d0.system.js} +1 -1
  183. package/dist/ionic/{p-0519cd21.entry.js → p-21c3515a.entry.js} +1 -1
  184. package/dist/ionic/{p-6470b136.entry.js → p-22e5af95.entry.js} +1 -1
  185. package/dist/ionic/p-232d1f22.entry.js +4 -0
  186. package/dist/ionic/p-23672c82.system.entry.js +4 -0
  187. package/dist/ionic/p-26798a7b.system.entry.js +4 -0
  188. package/dist/ionic/p-27bcbbc7.system.entry.js +4 -0
  189. package/dist/ionic/{p-765a08a7.system.entry.js → p-32303650.system.entry.js} +1 -1
  190. package/dist/ionic/p-3ba01a9c.system.entry.js +4 -0
  191. package/dist/ionic/{p-31b2326e.system.js → p-3e1e14d9.system.js} +1 -1
  192. package/dist/ionic/{p-667df818.system.entry.js → p-3fd26bd6.system.entry.js} +1 -1
  193. package/dist/ionic/{p-864c4046.entry.js → p-42ba3902.entry.js} +1 -1
  194. package/dist/ionic/{p-88fde0e0.entry.js → p-4911a5d6.entry.js} +1 -1
  195. package/dist/ionic/{p-a6f9dd7b.entry.js → p-4a081ea9.entry.js} +1 -1
  196. package/dist/ionic/{p-7b8d0af2.system.entry.js → p-4a36430f.system.entry.js} +1 -1
  197. package/dist/ionic/p-51abefb7.system.js +4 -0
  198. package/dist/ionic/{p-0b1bc636.entry.js → p-535d2a67.entry.js} +1 -1
  199. package/dist/ionic/{p-af5cfad2.system.js → p-54dfc9b5.system.js} +1 -1
  200. package/dist/ionic/p-563c41f0.system.entry.js +4 -0
  201. package/dist/ionic/{p-b04e4d62.entry.js → p-5d42b6b4.entry.js} +1 -1
  202. package/dist/ionic/{p-50880712.entry.js → p-6b7c55cd.entry.js} +1 -1
  203. package/dist/ionic/{p-a1987850.entry.js → p-6d72fb44.entry.js} +1 -1
  204. package/dist/ionic/{p-e6d68e02.system.entry.js → p-6fd64e7c.system.entry.js} +1 -1
  205. package/dist/ionic/p-73190c5f.entry.js +4 -0
  206. package/dist/ionic/p-73aa7604.entry.js +4 -0
  207. package/dist/ionic/{p-17f893be.js → p-76d3765d.js} +1 -1
  208. package/dist/ionic/{p-94389114.system.entry.js → p-77965464.system.entry.js} +1 -1
  209. package/dist/ionic/{p-98b14ece.entry.js → p-7b725280.entry.js} +1 -1
  210. package/dist/ionic/p-8017aad2.system.entry.js +4 -0
  211. package/dist/ionic/p-846ee227.entry.js +4 -0
  212. package/dist/ionic/p-8c97cdc0.entry.js +4 -0
  213. package/dist/ionic/{p-f5d2dc9b.js → p-8ededb41.js} +1 -1
  214. package/dist/ionic/p-8fa6583d.system.js +4 -0
  215. package/dist/ionic/p-9282b16f.entry.js +4 -0
  216. package/dist/ionic/{p-d7be6b7e.system.entry.js → p-96dbbac1.system.entry.js} +1 -1
  217. package/dist/ionic/{p-bb3615f7.js → p-9b97df10.js} +1 -1
  218. package/dist/ionic/p-9ba90516.system.entry.js +4 -0
  219. package/dist/ionic/{p-a0126dd5.system.entry.js → p-9c229210.system.entry.js} +2 -2
  220. package/dist/ionic/{p-7faba551.system.entry.js → p-a225bf0f.system.entry.js} +1 -1
  221. package/dist/ionic/p-a60a1ce5.js +4 -0
  222. package/dist/ionic/p-a8baa23e.entry.js +4 -0
  223. package/dist/ionic/{p-ad019ef0.entry.js → p-a9a80f5b.entry.js} +1 -1
  224. package/dist/ionic/p-afcf4620.entry.js +4 -0
  225. package/dist/ionic/{p-ddb30596.entry.js → p-b133e9b4.entry.js} +1 -1
  226. package/dist/ionic/{p-08f196ce.system.entry.js → p-b4d31b30.system.entry.js} +1 -1
  227. package/dist/ionic/{p-e553006f.system.entry.js → p-c18de88a.system.entry.js} +1 -1
  228. package/dist/ionic/p-c2910c78.entry.js +4 -0
  229. package/dist/ionic/p-c8f0a036.entry.js +4 -0
  230. package/dist/ionic/p-ca8938f4.js +4 -0
  231. package/dist/ionic/p-ca9d1792.system.entry.js +4 -0
  232. package/dist/ionic/{p-c3d09cf2.system.entry.js → p-cde52378.system.entry.js} +1 -1
  233. package/dist/ionic/p-da15f571.system.entry.js +4 -0
  234. package/dist/ionic/p-e3584231.system.js +1 -1
  235. package/dist/ionic/{p-6577aea9.system.entry.js → p-e8e86f69.system.entry.js} +1 -1
  236. package/dist/ionic/{p-9eec42cc.system.entry.js → p-f910cc73.system.entry.js} +1 -1
  237. package/dist/ionic/{p-3b686a65.system.entry.js → p-fbf3a689.system.entry.js} +1 -1
  238. package/dist/ionic/p-fe4dde76.entry.js +4 -0
  239. package/dist/ionic/p-ffd5dba4.system.entry.js +4 -0
  240. package/dist/types/components/backdrop/backdrop.d.ts +0 -3
  241. package/dist/types/components/datetime/datetime.d.ts +0 -1
  242. package/dist/types/components/datetime/utils/data.d.ts +2 -2
  243. package/dist/types/components/menu/menu.d.ts +1 -1
  244. package/dist/types/components/picker/picker-interfaces.d.ts +8 -0
  245. package/dist/types/components/picker/picker.d.ts +74 -131
  246. package/dist/types/components/picker-column/picker-column.d.ts +105 -39
  247. package/dist/types/components/picker-column-option/picker-column-option.d.ts +66 -0
  248. package/dist/types/components/picker-legacy/picker.d.ts +158 -0
  249. package/dist/types/components/picker-legacy-column/picker-column.d.ts +46 -0
  250. package/dist/types/components.d.ts +163 -122
  251. package/dist/types/interface.d.ts +1 -1
  252. package/dist/types/utils/config.d.ts +2 -2
  253. package/dist/types/utils/gesture/gesture-controller.d.ts +1 -0
  254. package/dist/types/utils/overlays.d.ts +5 -2
  255. package/hydrate/index.js +1367 -1296
  256. package/package.json +1 -1
  257. package/components/ion-picker-column-internal.d.ts +0 -11
  258. package/components/ion-picker-column-internal.js +0 -9
  259. package/components/ion-picker-internal.js +0 -9
  260. package/components/picker-column-internal.js +0 -390
  261. package/dist/collection/components/picker-column-internal/picker-column-internal.js +0 -565
  262. package/dist/collection/components/picker-column-internal/test/disabled/picker-column-internal.e2e.js +0 -162
  263. package/dist/collection/components/picker-internal/picker-internal.js +0 -544
  264. package/dist/collection/components/picker-internal/test/basic/picker-internal.e2e.js +0 -118
  265. package/dist/esm-es5/ion-picker-column-internal.entry.js +0 -4
  266. package/dist/esm-es5/ion-picker-internal.entry.js +0 -4
  267. package/dist/esm-es5/overlays-abf58489.js +0 -4
  268. package/dist/esm-es5/swipe-back-a6f386fc.js +0 -4
  269. package/dist/ionic/p-18b6bd23.system.entry.js +0 -4
  270. package/dist/ionic/p-1d17219f.entry.js +0 -4
  271. package/dist/ionic/p-25b32c3d.entry.js +0 -4
  272. package/dist/ionic/p-2ba0657d.system.entry.js +0 -4
  273. package/dist/ionic/p-35ce400e.system.js +0 -4
  274. package/dist/ionic/p-3de71759.entry.js +0 -4
  275. package/dist/ionic/p-3e960213.system.entry.js +0 -4
  276. package/dist/ionic/p-61d7d7fb.js +0 -4
  277. package/dist/ionic/p-67da080d.entry.js +0 -4
  278. package/dist/ionic/p-6a6477b2.js +0 -4
  279. package/dist/ionic/p-73637557.system.entry.js +0 -4
  280. package/dist/ionic/p-73ea8f82.system.entry.js +0 -4
  281. package/dist/ionic/p-80fa068e.entry.js +0 -4
  282. package/dist/ionic/p-82045bc1.entry.js +0 -4
  283. package/dist/ionic/p-908475e7.system.entry.js +0 -4
  284. package/dist/ionic/p-9c3b6849.entry.js +0 -4
  285. package/dist/ionic/p-b4bad293.system.entry.js +0 -4
  286. package/dist/ionic/p-c3289ef2.entry.js +0 -4
  287. package/dist/ionic/p-cce9f61a.system.entry.js +0 -4
  288. package/dist/ionic/p-d1cb29a8.system.entry.js +0 -4
  289. package/dist/ionic/p-e94c392d.entry.js +0 -4
  290. package/dist/ionic/p-f2c21dae.system.js +0 -4
  291. package/dist/ionic/p-f51666d3.entry.js +0 -4
  292. package/dist/types/components/picker-column-internal/picker-column-internal.d.ts +0 -102
  293. package/dist/types/components/picker-internal/picker-internal-interfaces.d.ts +0 -8
  294. package/dist/types/components/picker-internal/picker-internal.d.ts +0 -102
  295. /package/dist/collection/components/{picker-internal/picker-internal-interfaces.js → picker/picker-interfaces.js} +0 -0
  296. /package/dist/collection/components/{picker-column-internal/picker-column-internal-interfaces.js → picker-column/picker-column-interfaces.js} +0 -0
  297. /package/dist/collection/components/{picker → picker-legacy}/animations/ios.enter.js +0 -0
  298. /package/dist/collection/components/{picker → picker-legacy}/animations/ios.leave.js +0 -0
  299. /package/dist/collection/components/{picker → picker-legacy}/picker-interface.js +0 -0
  300. /package/dist/collection/components/{picker-column → picker-legacy-column}/test/test.utils.js +0 -0
  301. /package/dist/esm-es5/{data-f5c75b4e.js → data-4b9508c9.js} +0 -0
  302. /package/dist/ionic/{p-2aea8b1e.js → p-368f5215.js} +0 -0
  303. /package/dist/ionic/{p-82e3d633.system.js → p-f58981c2.system.js} +0 -0
  304. /package/dist/types/components/{picker-column-internal/picker-column-internal-interfaces.d.ts → picker-column/picker-column-interfaces.d.ts} +0 -0
  305. /package/dist/types/components/{picker → picker-legacy}/animations/ios.enter.d.ts +0 -0
  306. /package/dist/types/components/{picker → picker-legacy}/animations/ios.leave.d.ts +0 -0
  307. /package/dist/types/components/{picker → picker-legacy}/picker-interface.d.ts +0 -0
  308. /package/dist/types/components/{picker-column → picker-legacy-column}/test/test.utils.d.ts +0 -0
package/hydrate/index.js CHANGED
@@ -8355,7 +8355,7 @@ const focusLastDescendant = (ref, overlay) => {
8355
8355
  * Should NOT include: Toast
8356
8356
  */
8357
8357
  const trapKeyboardFocus = (ev, doc) => {
8358
- const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover');
8358
+ const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover');
8359
8359
  const target = ev.target;
8360
8360
  /**
8361
8361
  * If no active overlay, ignore this event.
@@ -8540,7 +8540,7 @@ const dismissOverlay = (doc, data, role, overlayTag, id) => {
8540
8540
  */
8541
8541
  const getOverlays = (doc, selector) => {
8542
8542
  if (selector === undefined) {
8543
- selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast';
8543
+ selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast';
8544
8544
  }
8545
8545
  return Array.from(doc.querySelectorAll(selector)).filter((c) => c.overlayIndex > 0);
8546
8546
  };
@@ -8606,6 +8606,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
8606
8606
  return;
8607
8607
  }
8608
8608
  setRootAriaHidden(true);
8609
+ document.body.classList.add(BACKDROP_NO_SCROLL);
8609
8610
  overlay.presented = true;
8610
8611
  overlay.willPresent.emit();
8611
8612
  (_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
@@ -8668,12 +8669,14 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
8668
8669
  if (!overlay.presented) {
8669
8670
  return false;
8670
8671
  }
8672
+ const lastOverlay = doc !== undefined && getPresentedOverlays(doc).length === 1;
8671
8673
  /**
8672
8674
  * If this is the last visible overlay then
8673
8675
  * we want to re-add the root to the accessibility tree.
8674
8676
  */
8675
- if (doc !== undefined && getPresentedOverlays(doc).length === 1) {
8677
+ if (lastOverlay) {
8676
8678
  setRootAriaHidden(false);
8679
+ document.body.classList.remove(BACKDROP_NO_SCROLL);
8677
8680
  }
8678
8681
  overlay.presented = false;
8679
8682
  try {
@@ -11189,21 +11192,10 @@ class Backdrop {
11189
11192
  constructor(hostRef) {
11190
11193
  registerInstance(this, hostRef);
11191
11194
  this.ionBackdropTap = createEvent(this, "ionBackdropTap", 7);
11192
- this.blocker = GESTURE_CONTROLLER.createBlocker({
11193
- disableScroll: true,
11194
- });
11195
11195
  this.visible = true;
11196
11196
  this.tappable = true;
11197
11197
  this.stopPropagation = true;
11198
11198
  }
11199
- connectedCallback() {
11200
- if (this.stopPropagation) {
11201
- this.blocker.block();
11202
- }
11203
- }
11204
- disconnectedCallback() {
11205
- this.blocker.unblock();
11206
- }
11207
11199
  onMouseDown(ev) {
11208
11200
  this.emitTap(ev);
11209
11201
  }
@@ -12654,7 +12646,7 @@ const isRTL$1 = (hostEl) => {
12654
12646
  return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl';
12655
12647
  };
12656
12648
 
12657
- 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)}";
12649
+ 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)}";
12658
12650
 
12659
12651
  /**
12660
12652
  * @slot - Content is placed in the scrollable area if provided without a slot.
@@ -14526,7 +14518,7 @@ const getMonthColumnData = (locale, refParts, minParts, maxParts, monthValues, f
14526
14518
  * @param minParts The minimum bound on the date that can be returned
14527
14519
  * @param maxParts The maximum bound on the date that can be returned
14528
14520
  * @param dayValues The allowed date values
14529
- * @returns Date data to be used in ion-picker-column-internal
14521
+ * @returns Date data to be used in ion-picker-column
14530
14522
  */
14531
14523
  const getDayColumnData = (locale, refParts, minParts, maxParts, dayValues, formatOptions = {
14532
14524
  day: 'numeric',
@@ -14873,9 +14865,9 @@ const getHighlightStyles = (highlightedDates, dateIsoString, el) => {
14873
14865
  return undefined;
14874
14866
  };
14875
14867
 
14876
- 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%}";
14868
+ 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}/*!@: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%}";
14877
14869
 
14878
- 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}";
14870
+ 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}/*!@: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}";
14879
14871
 
14880
14872
  /**
14881
14873
  * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
@@ -15846,7 +15838,7 @@ class Datetime {
15846
15838
  const renderArray = forcePresentation === 'time-date'
15847
15839
  ? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)]
15848
15840
  : [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];
15849
- return hAsync("ion-picker-internal", null, renderArray);
15841
+ return hAsync("ion-picker", null, renderArray);
15850
15842
  }
15851
15843
  renderDatePickerColumns(forcePresentation) {
15852
15844
  return forcePresentation === 'date-time' || forcePresentation === 'time-date'
@@ -15905,7 +15897,7 @@ class Datetime {
15905
15897
  const todayString = workingParts.day !== null
15906
15898
  ? `${workingParts.year}-${workingParts.month}-${workingParts.day}`
15907
15899
  : `${defaultParts.year}-${defaultParts.month}-${defaultParts.day}`;
15908
- return (hAsync("ion-picker-column-internal", { class: "date-column", color: this.color, disabled: disabled, items: items, value: todayString, onIonChange: (ev) => {
15900
+ return (hAsync("ion-picker-column", { class: "date-column", color: this.color, disabled: disabled, value: todayString, onIonChange: (ev) => {
15909
15901
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
15910
15902
  // Due to a Safari 14 issue we need to destroy
15911
15903
  // the scroll listener before we update state
@@ -15921,7 +15913,7 @@ class Datetime {
15921
15913
  // the working parts have been updated.
15922
15914
  this.initializeCalendarListener();
15923
15915
  ev.stopPropagation();
15924
- } }));
15916
+ } }, items.map((item) => (hAsync("ion-picker-column-option", { part: item.value === todayString ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: item.value, disabled: item.disabled, value: item.value }, item.text)))));
15925
15917
  }
15926
15918
  renderIndividualDatePickerColumns(forcePresentation) {
15927
15919
  const { workingParts, isDateEnabled } = this;
@@ -15989,7 +15981,8 @@ class Datetime {
15989
15981
  }
15990
15982
  const { disabled, workingParts } = this;
15991
15983
  const activePart = this.getActivePartsWithFallback();
15992
- 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) => {
15984
+ const pickerColumnValue = (_a = (workingParts.day !== null ? workingParts.day : this.defaultParts.day)) !== null && _a !== void 0 ? _a : undefined;
15985
+ return (hAsync("ion-picker-column", { class: "day-column", color: this.color, disabled: disabled, value: pickerColumnValue, onIonChange: (ev) => {
15993
15986
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
15994
15987
  // Due to a Safari 14 issue we need to destroy
15995
15988
  // the scroll listener before we update state
@@ -16003,7 +15996,7 @@ class Datetime {
16003
15996
  // the working parts have been updated.
16004
15997
  this.initializeCalendarListener();
16005
15998
  ev.stopPropagation();
16006
- } }));
15999
+ } }, days.map((day) => (hAsync("ion-picker-column-option", { part: day.value === pickerColumnValue ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: day.value, disabled: day.disabled, value: day.value }, day.text)))));
16007
16000
  }
16008
16001
  renderMonthPickerColumn(months) {
16009
16002
  if (months.length === 0) {
@@ -16011,7 +16004,7 @@ class Datetime {
16011
16004
  }
16012
16005
  const { disabled, workingParts } = this;
16013
16006
  const activePart = this.getActivePartsWithFallback();
16014
- return (hAsync("ion-picker-column-internal", { class: "month-column", color: this.color, disabled: disabled, items: months, value: workingParts.month, onIonChange: (ev) => {
16007
+ return (hAsync("ion-picker-column", { class: "month-column", color: this.color, disabled: disabled, value: workingParts.month, onIonChange: (ev) => {
16015
16008
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
16016
16009
  // Due to a Safari 14 issue we need to destroy
16017
16010
  // the scroll listener before we update state
@@ -16025,7 +16018,7 @@ class Datetime {
16025
16018
  // the working parts have been updated.
16026
16019
  this.initializeCalendarListener();
16027
16020
  ev.stopPropagation();
16028
- } }));
16021
+ } }, months.map((month) => (hAsync("ion-picker-column-option", { part: month.value === workingParts.month ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: month.value, disabled: month.disabled, value: month.value }, month.text)))));
16029
16022
  }
16030
16023
  renderYearPickerColumn(years) {
16031
16024
  if (years.length === 0) {
@@ -16033,7 +16026,7 @@ class Datetime {
16033
16026
  }
16034
16027
  const { disabled, workingParts } = this;
16035
16028
  const activePart = this.getActivePartsWithFallback();
16036
- return (hAsync("ion-picker-column-internal", { class: "year-column", color: this.color, disabled: disabled, items: years, value: workingParts.year, onIonChange: (ev) => {
16029
+ return (hAsync("ion-picker-column", { class: "year-column", color: this.color, disabled: disabled, value: workingParts.year, onIonChange: (ev) => {
16037
16030
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
16038
16031
  // Due to a Safari 14 issue we need to destroy
16039
16032
  // the scroll listener before we update state
@@ -16047,7 +16040,7 @@ class Datetime {
16047
16040
  // the working parts have been updated.
16048
16041
  this.initializeCalendarListener();
16049
16042
  ev.stopPropagation();
16050
- } }));
16043
+ } }, years.map((year) => (hAsync("ion-picker-column-option", { part: year.value === workingParts.year ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: year.value, disabled: year.disabled, value: year.value }, year.text)))));
16051
16044
  }
16052
16045
  renderTimePickerColumns(forcePresentation) {
16053
16046
  if (['date', 'month', 'month-year', 'year'].includes(forcePresentation)) {
@@ -16076,22 +16069,22 @@ class Datetime {
16076
16069
  if (hoursData.length === 0)
16077
16070
  return [];
16078
16071
  const activePart = this.getActivePartsWithFallback();
16079
- return (hAsync("ion-picker-column-internal", { color: this.color, disabled: disabled, value: activePart.hour, items: hoursData, numericInput: true, onIonChange: (ev) => {
16072
+ return (hAsync("ion-picker-column", { color: this.color, disabled: disabled, value: activePart.hour, numericInput: true, onIonChange: (ev) => {
16080
16073
  this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { hour: ev.detail.value }));
16081
16074
  this.setActiveParts(Object.assign(Object.assign({}, activePart), { hour: ev.detail.value }));
16082
16075
  ev.stopPropagation();
16083
- } }));
16076
+ } }, hoursData.map((hour) => (hAsync("ion-picker-column-option", { part: hour.value === activePart.hour ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: hour.value, disabled: hour.disabled, value: hour.value }, hour.text)))));
16084
16077
  }
16085
16078
  renderMinutePickerColumn(minutesData) {
16086
16079
  const { disabled, workingParts } = this;
16087
16080
  if (minutesData.length === 0)
16088
16081
  return [];
16089
16082
  const activePart = this.getActivePartsWithFallback();
16090
- return (hAsync("ion-picker-column-internal", { color: this.color, disabled: disabled, value: activePart.minute, items: minutesData, numericInput: true, onIonChange: (ev) => {
16083
+ return (hAsync("ion-picker-column", { color: this.color, disabled: disabled, value: activePart.minute, numericInput: true, onIonChange: (ev) => {
16091
16084
  this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { minute: ev.detail.value }));
16092
16085
  this.setActiveParts(Object.assign(Object.assign({}, activePart), { minute: ev.detail.value }));
16093
16086
  ev.stopPropagation();
16094
- } }));
16087
+ } }, minutesData.map((minute) => (hAsync("ion-picker-column-option", { part: minute.value === activePart.minute ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: minute.value, disabled: minute.disabled, value: minute.value }, minute.text)))));
16095
16088
  }
16096
16089
  renderDayPeriodPickerColumn(dayPeriodData) {
16097
16090
  const { disabled, workingParts } = this;
@@ -16100,12 +16093,12 @@ class Datetime {
16100
16093
  }
16101
16094
  const activePart = this.getActivePartsWithFallback();
16102
16095
  const isDayPeriodRTL = isLocaleDayPeriodRTL(this.locale);
16103
- return (hAsync("ion-picker-column-internal", { style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, disabled: disabled, value: activePart.ampm, items: dayPeriodData, onIonChange: (ev) => {
16096
+ return (hAsync("ion-picker-column", { style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, disabled: disabled, value: activePart.ampm, onIonChange: (ev) => {
16104
16097
  const hour = calculateHourFromAMPM(workingParts, ev.detail.value);
16105
16098
  this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { ampm: ev.detail.value, hour }));
16106
16099
  this.setActiveParts(Object.assign(Object.assign({}, activePart), { ampm: ev.detail.value, hour }));
16107
16100
  ev.stopPropagation();
16108
- } }));
16101
+ } }, dayPeriodData.map((dayPeriod) => (hAsync("ion-picker-column-option", { part: dayPeriod.value === activePart.ampm ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: dayPeriod.value, disabled: dayPeriod.disabled, value: dayPeriod.value }, dayPeriod.text)))));
16109
16102
  }
16110
16103
  renderWheelView(forcePresentation) {
16111
16104
  const { locale } = this;
@@ -16126,26 +16119,11 @@ class Datetime {
16126
16119
  const nextMonthDisabled = disabled || isNextMonthDisabled(this.workingParts, this.maxParts);
16127
16120
  // don't use the inheritAttributes util because it removes dir from the host, and we still need that
16128
16121
  const hostDir = this.el.getAttribute('dir') || undefined;
16129
- 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: () => {
16130
- var _a;
16131
- this.toggleMonthAndYearView();
16132
- /**
16133
- * TODO: FW-3547
16134
- *
16135
- * Currently there is not a way to set the aria-label on the inner button
16136
- * on the `ion-item` and have it be reactive to changes. This is a workaround
16137
- * until we either refactor `ion-item` to a button or Stencil adds a way to
16138
- * have reactive props for built-in properties, such as `aria-label`.
16139
- */
16140
- const { monthYearToggleItemRef } = this;
16141
- if (monthYearToggleItemRef) {
16142
- const btn = (_a = monthYearToggleItemRef.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.item-native');
16143
- if (btn) {
16144
- const monthYearAriaLabel = this.showMonthAndYear ? 'Hide year picker' : 'Show year picker';
16145
- btn.setAttribute('aria-label', monthYearAriaLabel);
16146
- }
16147
- }
16148
- } }, 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) => {
16122
+ return (hAsync("div", { class: "calendar-header" }, hAsync("div", { class: "calendar-action-buttons" }, hAsync("div", { class: "calendar-month-year" }, hAsync("button", { class: {
16123
+ 'calendar-month-year-toggle': true,
16124
+ 'ion-activatable': true,
16125
+ 'ion-focusable': true,
16126
+ }, 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) => {
16149
16127
  return hAsync("div", { class: "day-of-week" }, d);
16150
16128
  }))));
16151
16129
  }
@@ -16306,7 +16284,7 @@ class Datetime {
16306
16284
  * This will correctly scroll the element position to the correct time value,
16307
16285
  * before the popover is fully presented.
16308
16286
  */
16309
- const cols = ev.target.querySelectorAll('ion-picker-column-internal');
16287
+ const cols = ev.target.querySelectorAll('ion-picker-column');
16310
16288
  // TODO (FW-615): Potentially remove this when intersection observers are fixed in picker column
16311
16289
  cols.forEach((col) => col.scrollActiveItemIntoView());
16312
16290
  }, style: {
@@ -16500,6 +16478,8 @@ class Datetime {
16500
16478
  }; }
16501
16479
  }
16502
16480
  let datetimeIds = 0;
16481
+ const WHEEL_ITEM_PART = 'wheel-item';
16482
+ const WHEEL_ITEM_ACTIVE_PART = `active`;
16503
16483
 
16504
16484
  const iosDatetimeButtonCss = "/*!@:host*/.sc-ion-datetime-button-ios-h{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}/*!@:host button*/.sc-ion-datetime-button-ios-h button.sc-ion-datetime-button-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;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:0px;margin-bottom:0px;position:relative;-webkit-transition:150ms color ease-in-out;transition:150ms color ease-in-out;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:1rem;cursor:pointer;overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}/*!@:host(.time-active) #time-button,\n:host(.date-active) #date-button*/.time-active.sc-ion-datetime-button-ios-h #time-button.sc-ion-datetime-button-ios,.date-active.sc-ion-datetime-button-ios-h #date-button.sc-ion-datetime-button-ios{color:var(--ion-color-base)}/*!@:host(.datetime-button-disabled)*/.datetime-button-disabled.sc-ion-datetime-button-ios-h{pointer-events:none}/*!@:host(.datetime-button-disabled) button*/.datetime-button-disabled.sc-ion-datetime-button-ios-h button.sc-ion-datetime-button-ios{opacity:0.4}";
16505
16485
 
@@ -18827,34 +18807,15 @@ class Input {
18827
18807
  if (!this.shouldClearOnEdit()) {
18828
18808
  return;
18829
18809
  }
18830
- /**
18831
- * The following keys do not modify the
18832
- * contents of the input. As a result, pressing
18833
- * them should not edit the input.
18834
- *
18835
- * We can't check to see if the value of the input
18836
- * was changed because we call checkClearOnEdit
18837
- * in a keydown listener, and the key has not yet
18838
- * been added to the input.
18839
- */
18840
- const IGNORED_KEYS = ['Enter', 'Tab', 'Shift', 'Meta', 'Alt', 'Control'];
18841
- const pressedIgnoredKey = IGNORED_KEYS.includes(ev.key);
18842
18810
  /**
18843
18811
  * Clear the input if the control has not been previously cleared during focus.
18844
18812
  * Do not clear if the user hitting enter to submit a form.
18845
18813
  */
18846
- if (!this.didInputClearOnEdit && this.hasValue() && !pressedIgnoredKey) {
18814
+ if (!this.didInputClearOnEdit && this.hasValue() && ev.key !== 'Enter' && ev.key !== 'Tab') {
18847
18815
  this.value = '';
18848
18816
  this.emitInputChange(ev);
18849
18817
  }
18850
- /**
18851
- * Pressing an IGNORED_KEYS first and
18852
- * then an allowed key will cause the input to not
18853
- * be cleared.
18854
- */
18855
- if (!pressedIgnoredKey) {
18856
- this.didInputClearOnEdit = true;
18857
- }
18818
+ this.didInputClearOnEdit = true;
18858
18819
  }
18859
18820
  hasValue() {
18860
18821
  return this.getValue().length > 0;
@@ -24566,664 +24527,783 @@ class Note {
24566
24527
  }; }
24567
24528
  }
24568
24529
 
24569
- /**
24570
- * iOS Picker Enter Animation
24571
- */
24572
- const iosEnterAnimation$2 = (baseEl) => {
24573
- const baseAnimation = createAnimation();
24574
- const backdropAnimation = createAnimation();
24575
- const wrapperAnimation = createAnimation();
24576
- backdropAnimation
24577
- .addElement(baseEl.querySelector('ion-backdrop'))
24578
- .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
24579
- .beforeStyles({
24580
- 'pointer-events': 'none',
24581
- })
24582
- .afterClearStyles(['pointer-events']);
24583
- wrapperAnimation
24584
- .addElement(baseEl.querySelector('.picker-wrapper'))
24585
- .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
24586
- return baseAnimation
24587
- .addElement(baseEl)
24588
- .easing('cubic-bezier(.36,.66,.04,1)')
24589
- .duration(400)
24590
- .addAnimation([backdropAnimation, wrapperAnimation]);
24591
- };
24592
-
24593
- /**
24594
- * iOS Picker Leave Animation
24595
- */
24596
- const iosLeaveAnimation$2 = (baseEl) => {
24597
- const baseAnimation = createAnimation();
24598
- const backdropAnimation = createAnimation();
24599
- const wrapperAnimation = createAnimation();
24600
- backdropAnimation
24601
- .addElement(baseEl.querySelector('ion-backdrop'))
24602
- .fromTo('opacity', 'var(--backdrop-opacity)', 0.01);
24603
- wrapperAnimation
24604
- .addElement(baseEl.querySelector('.picker-wrapper'))
24605
- .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
24606
- return baseAnimation
24607
- .addElement(baseEl)
24608
- .easing('cubic-bezier(.36,.66,.04,1)')
24609
- .duration(400)
24610
- .addAnimation([backdropAnimation, wrapperAnimation]);
24611
- };
24612
-
24613
- 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}}}";
24530
+ 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))}";
24614
24531
 
24615
- 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}}}";
24532
+ 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%)}";
24616
24533
 
24617
- // TODO(FW-2832): types
24618
24534
  /**
24619
24535
  * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
24620
24536
  */
24621
- class Picker {
24537
+ class Picker$1 {
24622
24538
  constructor(hostRef) {
24623
24539
  registerInstance(this, hostRef);
24624
- this.didPresent = createEvent(this, "ionPickerDidPresent", 7);
24625
- this.willPresent = createEvent(this, "ionPickerWillPresent", 7);
24626
- this.willDismiss = createEvent(this, "ionPickerWillDismiss", 7);
24627
- this.didDismiss = createEvent(this, "ionPickerDidDismiss", 7);
24628
- this.didPresentShorthand = createEvent(this, "didPresent", 7);
24629
- this.willPresentShorthand = createEvent(this, "willPresent", 7);
24630
- this.willDismissShorthand = createEvent(this, "willDismiss", 7);
24631
- this.didDismissShorthand = createEvent(this, "didDismiss", 7);
24632
- this.delegateController = createDelegateController(this);
24633
- this.lockController = createLockController();
24634
- this.triggerController = createTriggerController();
24635
- this.onBackdropTap = () => {
24636
- this.dismiss(undefined, BACKDROP);
24540
+ this.ionInputModeChange = createEvent(this, "ionInputModeChange", 7);
24541
+ this.useInputMode = false;
24542
+ this.isInHighlightBounds = (ev) => {
24543
+ const { highlightEl } = this;
24544
+ if (!highlightEl) {
24545
+ return false;
24546
+ }
24547
+ const bbox = highlightEl.getBoundingClientRect();
24548
+ /**
24549
+ * Check to see if the user clicked
24550
+ * outside the bounds of the highlight.
24551
+ */
24552
+ const outsideX = ev.clientX < bbox.left || ev.clientX > bbox.right;
24553
+ const outsideY = ev.clientY < bbox.top || ev.clientY > bbox.bottom;
24554
+ if (outsideX || outsideY) {
24555
+ return false;
24556
+ }
24557
+ return true;
24637
24558
  };
24638
- this.dispatchCancelHandler = (ev) => {
24639
- const role = ev.detail.role;
24640
- if (isCancel(role)) {
24641
- const cancelButton = this.buttons.find((b) => b.role === 'cancel');
24642
- this.callButtonHandler(cancelButton);
24559
+ /**
24560
+ * If we are no longer focused
24561
+ * on a picker column, then we should
24562
+ * exit input mode. An exception is made
24563
+ * for the input in the picker since having
24564
+ * that focused means we are still in input mode.
24565
+ */
24566
+ this.onFocusOut = (ev) => {
24567
+ // TODO(FW-2832): type
24568
+ const { relatedTarget } = ev;
24569
+ if (!relatedTarget || (relatedTarget.tagName !== 'ION-PICKER-COLUMN' && relatedTarget !== this.inputEl)) {
24570
+ this.exitInputMode();
24643
24571
  }
24644
24572
  };
24645
- this.presented = false;
24646
- this.overlayIndex = undefined;
24647
- this.delegate = undefined;
24648
- this.hasController = false;
24649
- this.keyboardClose = true;
24650
- this.enterAnimation = undefined;
24651
- this.leaveAnimation = undefined;
24652
- this.buttons = [];
24653
- this.columns = [];
24654
- this.cssClass = undefined;
24655
- this.duration = 0;
24656
- this.showBackdrop = true;
24657
- this.backdropDismiss = true;
24658
- this.animated = true;
24659
- this.htmlAttributes = undefined;
24660
- this.isOpen = false;
24661
- this.trigger = undefined;
24662
- }
24663
- onIsOpenChange(newValue, oldValue) {
24664
- if (newValue === true && oldValue === false) {
24665
- this.present();
24666
- }
24667
- else if (newValue === false && oldValue === true) {
24668
- this.dismiss();
24669
- }
24670
- }
24671
- triggerChanged() {
24672
- const { trigger, el, triggerController } = this;
24673
- if (trigger) {
24674
- triggerController.addClickListener(el, trigger);
24675
- }
24676
- }
24677
- connectedCallback() {
24678
- prepareOverlay(this.el);
24679
- this.triggerChanged();
24680
- }
24681
- disconnectedCallback() {
24682
- this.triggerController.removeClickListener();
24683
- }
24684
- componentWillLoad() {
24685
- setOverlayId(this.el);
24686
- }
24687
- componentDidLoad() {
24688
24573
  /**
24689
- * If picker was rendered with isOpen="true"
24690
- * then we should open picker immediately.
24574
+ * When picker columns receive focus
24575
+ * the parent picker needs to determine
24576
+ * whether to enter/exit input mode.
24691
24577
  */
24692
- if (this.isOpen === true) {
24693
- raf(() => this.present());
24694
- }
24578
+ this.onFocusIn = (ev) => {
24579
+ // TODO(FW-2832): type
24580
+ const { target } = ev;
24581
+ /**
24582
+ * Due to browser differences in how/when focus
24583
+ * is dispatched on certain elements, we need to
24584
+ * make sure that this function only ever runs when
24585
+ * focusing a picker column.
24586
+ */
24587
+ if (target.tagName !== 'ION-PICKER-COLUMN') {
24588
+ return;
24589
+ }
24590
+ /**
24591
+ * If we have actionOnClick
24592
+ * then this means the user focused
24593
+ * a picker column via mouse or
24594
+ * touch (i.e. a PointerEvent). As a result,
24595
+ * we should not enter/exit input mode
24596
+ * until the click event has fired, which happens
24597
+ * after the `focusin` event.
24598
+ *
24599
+ * Otherwise, the user likely focused
24600
+ * the column using their keyboard and
24601
+ * we should enter/exit input mode automatically.
24602
+ */
24603
+ if (!this.actionOnClick) {
24604
+ const columnEl = target;
24605
+ const allowInput = columnEl.numericInput;
24606
+ if (allowInput) {
24607
+ this.enterInputMode(columnEl, false);
24608
+ }
24609
+ else {
24610
+ this.exitInputMode();
24611
+ }
24612
+ }
24613
+ };
24695
24614
  /**
24696
- * When binding values in frameworks such as Angular
24697
- * it is possible for the value to be set after the Web Component
24698
- * initializes but before the value watcher is set up in Stencil.
24699
- * As a result, the watcher callback may not be fired.
24700
- * We work around this by manually calling the watcher
24701
- * callback when the component has loaded and the watcher
24702
- * is configured.
24615
+ * On click we need to run an actionOnClick
24616
+ * function that has been set in onPointerDown
24617
+ * so that we enter/exit input mode correctly.
24703
24618
  */
24704
- this.triggerChanged();
24705
- }
24706
- /**
24707
- * Present the picker overlay after it has been created.
24708
- */
24709
- async present() {
24710
- const unlock = await this.lockController.lock();
24711
- await this.delegateController.attachViewToDom();
24712
- await present(this, 'pickerEnter', iosEnterAnimation$2, iosEnterAnimation$2, undefined);
24713
- if (this.duration > 0) {
24714
- this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
24715
- }
24716
- unlock();
24717
- }
24718
- /**
24719
- * Dismiss the picker overlay after it has been presented.
24720
- *
24721
- * @param data Any data to emit in the dismiss events.
24722
- * @param role The role of the element that is dismissing the picker.
24723
- * This can be useful in a button handler for determining which button was
24724
- * clicked to dismiss the picker.
24725
- * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
24726
- */
24727
- async dismiss(data, role) {
24728
- const unlock = await this.lockController.lock();
24729
- if (this.durationTimeout) {
24730
- clearTimeout(this.durationTimeout);
24731
- }
24732
- const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation$2, iosLeaveAnimation$2);
24733
- if (dismissed) {
24734
- this.delegateController.removeViewFromDom();
24735
- }
24736
- unlock();
24737
- return dismissed;
24738
- }
24739
- /**
24740
- * Returns a promise that resolves when the picker did dismiss.
24741
- */
24742
- onDidDismiss() {
24743
- return eventMethod(this.el, 'ionPickerDidDismiss');
24744
- }
24745
- /**
24746
- * Returns a promise that resolves when the picker will dismiss.
24747
- */
24748
- onWillDismiss() {
24749
- return eventMethod(this.el, 'ionPickerWillDismiss');
24750
- }
24751
- /**
24752
- * Get the column that matches the specified name.
24753
- *
24754
- * @param name The name of the column.
24755
- */
24756
- getColumn(name) {
24757
- return Promise.resolve(this.columns.find((column) => column.name === name));
24758
- }
24759
- async buttonClick(button) {
24760
- const role = button.role;
24761
- if (isCancel(role)) {
24762
- return this.dismiss(undefined, role);
24763
- }
24764
- const shouldDismiss = await this.callButtonHandler(button);
24765
- if (shouldDismiss) {
24766
- return this.dismiss(this.getSelected(), button.role);
24767
- }
24768
- return Promise.resolve();
24769
- }
24770
- async callButtonHandler(button) {
24771
- if (button) {
24772
- // a handler has been provided, execute it
24773
- // pass the handler the values from the inputs
24774
- const rtn = await safeCall(button.handler, this.getSelected());
24775
- if (rtn === false) {
24776
- // if the return value of the handler is false then do not dismiss
24777
- return false;
24619
+ this.onClick = () => {
24620
+ const { actionOnClick } = this;
24621
+ if (actionOnClick) {
24622
+ actionOnClick();
24623
+ this.actionOnClick = undefined;
24778
24624
  }
24779
- }
24780
- return true;
24781
- }
24782
- getSelected() {
24783
- const selected = {};
24784
- this.columns.forEach((col, index) => {
24785
- const selectedColumn = col.selectedIndex !== undefined ? col.options[col.selectedIndex] : undefined;
24786
- selected[col.name] = {
24787
- text: selectedColumn ? selectedColumn.text : undefined,
24788
- value: selectedColumn ? selectedColumn.value : undefined,
24789
- columnIndex: index,
24790
- };
24791
- });
24792
- return selected;
24793
- }
24794
- render() {
24795
- const { htmlAttributes } = this;
24796
- const mode = getIonMode$1(this);
24797
- return (hAsync(Host, Object.assign({ "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
24798
- zIndex: `${20000 + this.overlayIndex}`,
24799
- }, class: Object.assign({ [mode]: true,
24800
- // Used internally for styling
24801
- [`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" })));
24802
- }
24803
- get el() { return getElement(this); }
24804
- static get watchers() { return {
24805
- "isOpen": ["onIsOpenChange"],
24806
- "trigger": ["triggerChanged"]
24807
- }; }
24808
- static get style() { return {
24809
- ios: pickerIosCss,
24810
- md: pickerMdCss
24811
- }; }
24812
- static get cmpMeta() { return {
24813
- "$flags$": 34,
24814
- "$tagName$": "ion-picker",
24815
- "$members$": {
24816
- "overlayIndex": [2, "overlay-index"],
24817
- "delegate": [16],
24818
- "hasController": [4, "has-controller"],
24819
- "keyboardClose": [4, "keyboard-close"],
24820
- "enterAnimation": [16],
24821
- "leaveAnimation": [16],
24822
- "buttons": [16],
24823
- "columns": [16],
24824
- "cssClass": [1, "css-class"],
24825
- "duration": [2],
24826
- "showBackdrop": [4, "show-backdrop"],
24827
- "backdropDismiss": [4, "backdrop-dismiss"],
24828
- "animated": [4],
24829
- "htmlAttributes": [16],
24830
- "isOpen": [4, "is-open"],
24831
- "trigger": [1],
24832
- "presented": [32],
24833
- "present": [64],
24834
- "dismiss": [64],
24835
- "onDidDismiss": [64],
24836
- "onWillDismiss": [64],
24837
- "getColumn": [64]
24838
- },
24839
- "$listeners$": undefined,
24840
- "$lazyBundleId$": "-",
24841
- "$attrsToReflect$": []
24842
- }; }
24843
- }
24844
- const buttonWrapperClass = (button) => {
24845
- return {
24846
- [`picker-toolbar-${button.role}`]: button.role !== undefined,
24847
- 'picker-toolbar-button': true,
24848
- };
24849
- };
24850
- const buttonClass$1 = (button) => {
24851
- return Object.assign({ 'picker-button': true, 'ion-activatable': true }, getClassMap(button.cssClass));
24852
- };
24853
-
24854
- 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}}";
24855
-
24856
- 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)}";
24857
-
24858
- /**
24859
- * @internal
24860
- */
24861
- class PickerColumnCmp {
24862
- constructor(hostRef) {
24863
- registerInstance(this, hostRef);
24864
- this.ionPickerColChange = createEvent(this, "ionPickerColChange", 7);
24865
- this.optHeight = 0;
24866
- this.rotateFactor = 0;
24867
- this.scaleFactor = 1;
24868
- this.velocity = 0;
24869
- this.y = 0;
24870
- this.noAnimate = true;
24871
- // `colDidChange` is a flag that gets set when the column is changed
24872
- // dynamically. When this flag is set, the column will refresh
24873
- // after the component re-renders to incorporate the new column data.
24874
- // This is necessary because `this.refresh` queries for the option elements,
24875
- // so it needs to wait for the latest elements to be available in the DOM.
24876
- // Ex: column is created with 3 options. User updates the column data
24877
- // to have 5 options. The column will still think it only has 3 options.
24878
- this.colDidChange = false;
24879
- this.col = undefined;
24880
- }
24881
- colChanged() {
24882
- this.colDidChange = true;
24883
- }
24884
- async connectedCallback() {
24885
- let pickerRotateFactor = 0;
24886
- let pickerScaleFactor = 0.81;
24887
- const mode = getIonMode$1(this);
24888
- if (mode === 'ios') {
24889
- pickerRotateFactor = -0.46;
24890
- pickerScaleFactor = 1;
24891
- }
24892
- this.rotateFactor = pickerRotateFactor;
24893
- this.scaleFactor = pickerScaleFactor;
24894
- this.gesture = (await Promise.resolve().then(function () { return index; })).createGesture({
24895
- el: this.el,
24896
- gestureName: 'picker-swipe',
24897
- gesturePriority: 100,
24898
- threshold: 0,
24899
- passive: false,
24900
- onStart: (ev) => this.onStart(ev),
24901
- onMove: (ev) => this.onMove(ev),
24902
- onEnd: (ev) => this.onEnd(ev),
24903
- });
24904
- this.gesture.enable();
24905
- // Options have not been initialized yet
24906
- // Animation must be disabled through the `noAnimate` flag
24907
- // Otherwise, the options will render
24908
- // at the top of the column and transition down
24909
- this.tmrId = setTimeout(() => {
24910
- this.noAnimate = false;
24911
- // After initialization, `refresh()` will be called
24912
- // At this point, animation will be enabled. The options will
24913
- // animate as they are being selected.
24914
- this.refresh(true);
24915
- }, 250);
24916
- }
24917
- componentDidLoad() {
24918
- this.onDomChange();
24919
- }
24920
- componentDidUpdate() {
24921
- // Options may have changed since last update.
24922
- if (this.colDidChange) {
24923
- // Animation must be disabled through the `onDomChange` parameter.
24924
- // Otherwise, the recently added options will render
24925
- // at the top of the column and transition down
24926
- this.onDomChange(true, false);
24927
- this.colDidChange = false;
24928
- }
24929
- }
24930
- disconnectedCallback() {
24931
- if (this.rafId !== undefined)
24932
- cancelAnimationFrame(this.rafId);
24933
- if (this.tmrId)
24934
- clearTimeout(this.tmrId);
24935
- if (this.gesture) {
24936
- this.gesture.destroy();
24937
- this.gesture = undefined;
24938
- }
24939
- }
24940
- emitColChange() {
24941
- this.ionPickerColChange.emit(this.col);
24942
- }
24943
- setSelected(selectedIndex, duration) {
24944
- // if there is a selected index, then figure out it's y position
24945
- // if there isn't a selected index, then just use the top y position
24946
- const y = selectedIndex > -1 ? -(selectedIndex * this.optHeight) : 0;
24947
- this.velocity = 0;
24948
- // set what y position we're at
24949
- if (this.rafId !== undefined)
24950
- cancelAnimationFrame(this.rafId);
24951
- this.update(y, duration, true);
24952
- this.emitColChange();
24953
- }
24954
- update(y, duration, saveY) {
24955
- if (!this.optsEl) {
24956
- return;
24957
- }
24958
- // ensure we've got a good round number :)
24959
- let translateY = 0;
24960
- let translateZ = 0;
24961
- const { col, rotateFactor } = this;
24962
- const prevSelected = col.selectedIndex;
24963
- const selectedIndex = (col.selectedIndex = this.indexForY(-y));
24964
- const durationStr = duration === 0 ? '' : duration + 'ms';
24965
- const scaleStr = `scale(${this.scaleFactor})`;
24966
- const children = this.optsEl.children;
24967
- for (let i = 0; i < children.length; i++) {
24968
- const button = children[i];
24969
- const opt = col.options[i];
24970
- const optOffset = i * this.optHeight + y;
24971
- let transform = '';
24972
- if (rotateFactor !== 0) {
24973
- const rotateX = optOffset * rotateFactor;
24974
- if (Math.abs(rotateX) <= 90) {
24975
- translateY = 0;
24976
- translateZ = 90;
24977
- transform = `rotateX(${rotateX}deg) `;
24625
+ };
24626
+ /**
24627
+ * Clicking a column also focuses the column on
24628
+ * certain browsers, so we use onPointerDown
24629
+ * to tell the onFocusIn function that users
24630
+ * are trying to click the column rather than
24631
+ * focus the column using the keyboard. When the
24632
+ * user completes the click, the onClick function
24633
+ * runs and runs the actionOnClick callback.
24634
+ */
24635
+ this.onPointerDown = (ev) => {
24636
+ const { useInputMode, inputModeColumn, el } = this;
24637
+ if (this.isInHighlightBounds(ev)) {
24638
+ /**
24639
+ * If we were already in
24640
+ * input mode, then we should determine
24641
+ * if we tapped a particular column and
24642
+ * should switch to input mode for
24643
+ * that specific column.
24644
+ */
24645
+ if (useInputMode) {
24646
+ /**
24647
+ * If we tapped a picker column
24648
+ * then we should either switch to input
24649
+ * mode for that column or all columns.
24650
+ * Otherwise we should exit input mode
24651
+ * since we just tapped the highlight and
24652
+ * not a column.
24653
+ */
24654
+ if (ev.target.tagName === 'ION-PICKER-COLUMN') {
24655
+ /**
24656
+ * If user taps 2 different columns
24657
+ * then we should just switch to input mode
24658
+ * for the new column rather than switching to
24659
+ * input mode for all columns.
24660
+ */
24661
+ if (inputModeColumn && inputModeColumn === ev.target) {
24662
+ this.actionOnClick = () => {
24663
+ this.enterInputMode();
24664
+ };
24665
+ }
24666
+ else {
24667
+ this.actionOnClick = () => {
24668
+ this.enterInputMode(ev.target);
24669
+ };
24670
+ }
24671
+ }
24672
+ else {
24673
+ this.actionOnClick = () => {
24674
+ this.exitInputMode();
24675
+ };
24676
+ }
24677
+ /**
24678
+ * If we were not already in
24679
+ * input mode, then we should
24680
+ * enter input mode for all columns.
24681
+ */
24978
24682
  }
24979
24683
  else {
24980
- translateY = -9999;
24684
+ /**
24685
+ * If there is only 1 numeric input column
24686
+ * then we should skip multi column input.
24687
+ */
24688
+ const columns = el.querySelectorAll('ion-picker-column.picker-column-numeric-input');
24689
+ const columnEl = columns.length === 1 ? ev.target : undefined;
24690
+ this.actionOnClick = () => {
24691
+ this.enterInputMode(columnEl);
24692
+ };
24693
+ }
24694
+ return;
24695
+ }
24696
+ this.actionOnClick = () => {
24697
+ this.exitInputMode();
24698
+ };
24699
+ };
24700
+ /**
24701
+ * Enters input mode to allow
24702
+ * for text entry of numeric values.
24703
+ * If on mobile, we focus a hidden input
24704
+ * field so that the on screen keyboard
24705
+ * is brought up. When tabbing using a
24706
+ * keyboard, picker columns receive an outline
24707
+ * to indicate they are focused. As a result,
24708
+ * we should not focus the hidden input as it
24709
+ * would cause the outline to go away, preventing
24710
+ * users from having any visual indication of which
24711
+ * column is focused.
24712
+ */
24713
+ this.enterInputMode = (columnEl, focusInput = true) => {
24714
+ const { inputEl, el } = this;
24715
+ if (!inputEl) {
24716
+ return;
24717
+ }
24718
+ /**
24719
+ * Only active input mode if there is at
24720
+ * least one column that accepts numeric input.
24721
+ */
24722
+ const hasInputColumn = el.querySelector('ion-picker-column.picker-column-numeric-input');
24723
+ if (!hasInputColumn) {
24724
+ return;
24725
+ }
24726
+ /**
24727
+ * If columnEl is undefined then
24728
+ * it is assumed that all numeric pickers
24729
+ * are eligible for text entry.
24730
+ * (i.e. hour and minute columns)
24731
+ */
24732
+ this.useInputMode = true;
24733
+ this.inputModeColumn = columnEl;
24734
+ /**
24735
+ * Users with a keyboard and mouse can
24736
+ * activate input mode where the input is
24737
+ * focused as well as when it is not focused,
24738
+ * so we need to make sure we clean up any
24739
+ * old listeners.
24740
+ */
24741
+ if (focusInput) {
24742
+ if (this.destroyKeypressListener) {
24743
+ this.destroyKeypressListener();
24744
+ this.destroyKeypressListener = undefined;
24981
24745
  }
24746
+ inputEl.focus();
24982
24747
  }
24983
24748
  else {
24984
- translateZ = 0;
24985
- translateY = optOffset;
24749
+ el.addEventListener('keypress', this.onKeyPress);
24750
+ this.destroyKeypressListener = () => {
24751
+ el.removeEventListener('keypress', this.onKeyPress);
24752
+ };
24986
24753
  }
24987
- const selected = selectedIndex === i;
24988
- transform += `translate3d(0px,${translateY}px,${translateZ}px) `;
24989
- if (this.scaleFactor !== 1 && !selected) {
24990
- transform += scaleStr;
24754
+ this.emitInputModeChange();
24755
+ };
24756
+ this.onKeyPress = (ev) => {
24757
+ const { inputEl } = this;
24758
+ if (!inputEl) {
24759
+ return;
24991
24760
  }
24992
- // Update transition duration
24993
- if (this.noAnimate) {
24994
- opt.duration = 0;
24995
- button.style.transitionDuration = '';
24761
+ const parsedValue = parseInt(ev.key, 10);
24762
+ /**
24763
+ * Only numbers should be allowed
24764
+ */
24765
+ if (!Number.isNaN(parsedValue)) {
24766
+ inputEl.value += ev.key;
24767
+ this.onInputChange();
24996
24768
  }
24997
- else if (duration !== opt.duration) {
24998
- opt.duration = duration;
24999
- button.style.transitionDuration = durationStr;
24769
+ };
24770
+ this.selectSingleColumn = () => {
24771
+ const { inputEl, inputModeColumn, singleColumnSearchTimeout } = this;
24772
+ if (!inputEl || !inputModeColumn) {
24773
+ return;
24774
+ }
24775
+ const values = inputModeColumn.items.filter((item) => item.disabled !== true);
24776
+ /**
24777
+ * If users pause for a bit, the search
24778
+ * value should be reset similar to how a
24779
+ * <select> behaves. So typing "34", waiting,
24780
+ * then typing "5" should select "05".
24781
+ */
24782
+ if (singleColumnSearchTimeout) {
24783
+ clearTimeout(singleColumnSearchTimeout);
24784
+ }
24785
+ this.singleColumnSearchTimeout = setTimeout(() => {
24786
+ inputEl.value = '';
24787
+ this.singleColumnSearchTimeout = undefined;
24788
+ }, 1000);
24789
+ /**
24790
+ * For values that are longer than 2 digits long
24791
+ * we should shift the value over 1 character
24792
+ * to the left. So typing "456" would result in "56".
24793
+ * TODO: If we want to support more than just
24794
+ * time entry, we should update this value to be
24795
+ * the max length of all of the picker items.
24796
+ */
24797
+ if (inputEl.value.length >= 3) {
24798
+ const startIndex = inputEl.value.length - 2;
24799
+ const newString = inputEl.value.substring(startIndex);
24800
+ inputEl.value = newString;
24801
+ this.selectSingleColumn();
24802
+ return;
24803
+ }
24804
+ /**
24805
+ * Checking the value of the input gets priority
24806
+ * first. For example, if the value of the input
24807
+ * is "1" and we entered "2", then the complete value
24808
+ * is "12" and we should select hour 12.
24809
+ *
24810
+ * Regex removes any leading zeros from values like "02",
24811
+ * but it keeps a single zero if there are only zeros in the string.
24812
+ * 0+(?=[1-9]) --> Match 1 or more zeros that are followed by 1-9
24813
+ * 0+(?=0$) --> Match 1 or more zeros that must be followed by one 0 and end.
24814
+ */
24815
+ const findItemFromCompleteValue = values.find(({ text }) => {
24816
+ const parsedText = text.replace(/^0+(?=[1-9])|0+(?=0$)/, '');
24817
+ return parsedText === inputEl.value;
24818
+ });
24819
+ if (findItemFromCompleteValue) {
24820
+ inputModeColumn.setValue(findItemFromCompleteValue.value);
24821
+ return;
24822
+ }
24823
+ /**
24824
+ * If we typed "56" to get minute 56, then typed "7",
24825
+ * we should select "07" as "567" is not a valid minute.
24826
+ */
24827
+ if (inputEl.value.length === 2) {
24828
+ const changedCharacter = inputEl.value.substring(inputEl.value.length - 1);
24829
+ inputEl.value = changedCharacter;
24830
+ this.selectSingleColumn();
24831
+ }
24832
+ };
24833
+ /**
24834
+ * Searches a list of column items for a particular
24835
+ * value. This is currently used for numeric values.
24836
+ * The zeroBehavior can be set to account for leading
24837
+ * or trailing zeros when looking at the item text.
24838
+ */
24839
+ this.searchColumn = (colEl, value, zeroBehavior = 'start') => {
24840
+ const behavior = zeroBehavior === 'start' ? /^0+/ : /0$/;
24841
+ const item = colEl.items.find(({ text, disabled }) => disabled !== true && text.replace(behavior, '') === value);
24842
+ if (item) {
24843
+ colEl.setValue(item.value);
24844
+ }
24845
+ };
24846
+ this.selectMultiColumn = () => {
24847
+ const { inputEl, el } = this;
24848
+ if (!inputEl) {
24849
+ return;
24850
+ }
24851
+ const numericPickers = Array.from(el.querySelectorAll('ion-picker-column')).filter((col) => col.numericInput);
24852
+ const firstColumn = numericPickers[0];
24853
+ const lastColumn = numericPickers[1];
24854
+ let value = inputEl.value;
24855
+ let minuteValue;
24856
+ switch (value.length) {
24857
+ case 1:
24858
+ this.searchColumn(firstColumn, value);
24859
+ break;
24860
+ case 2:
24861
+ /**
24862
+ * If the first character is `0` or `1` it is
24863
+ * possible that users are trying to type `09`
24864
+ * or `11` into the hour field, so we should look
24865
+ * at that first.
24866
+ */
24867
+ const firstCharacter = inputEl.value.substring(0, 1);
24868
+ value = firstCharacter === '0' || firstCharacter === '1' ? inputEl.value : firstCharacter;
24869
+ this.searchColumn(firstColumn, value);
24870
+ /**
24871
+ * If only checked the first value,
24872
+ * we can check the second value
24873
+ * for a match in the minutes column
24874
+ */
24875
+ if (value.length === 1) {
24876
+ minuteValue = inputEl.value.substring(inputEl.value.length - 1);
24877
+ this.searchColumn(lastColumn, minuteValue, 'end');
24878
+ }
24879
+ break;
24880
+ case 3:
24881
+ /**
24882
+ * If the first character is `0` or `1` it is
24883
+ * possible that users are trying to type `09`
24884
+ * or `11` into the hour field, so we should look
24885
+ * at that first.
24886
+ */
24887
+ const firstCharacterAgain = inputEl.value.substring(0, 1);
24888
+ value =
24889
+ firstCharacterAgain === '0' || firstCharacterAgain === '1'
24890
+ ? inputEl.value.substring(0, 2)
24891
+ : firstCharacterAgain;
24892
+ this.searchColumn(firstColumn, value);
24893
+ /**
24894
+ * If only checked the first value,
24895
+ * we can check the second value
24896
+ * for a match in the minutes column
24897
+ */
24898
+ minuteValue = value.length === 1 ? inputEl.value.substring(1) : inputEl.value.substring(2);
24899
+ this.searchColumn(lastColumn, minuteValue, 'end');
24900
+ break;
24901
+ case 4:
24902
+ /**
24903
+ * If the first character is `0` or `1` it is
24904
+ * possible that users are trying to type `09`
24905
+ * or `11` into the hour field, so we should look
24906
+ * at that first.
24907
+ */
24908
+ const firstCharacterAgainAgain = inputEl.value.substring(0, 1);
24909
+ value =
24910
+ firstCharacterAgainAgain === '0' || firstCharacterAgainAgain === '1'
24911
+ ? inputEl.value.substring(0, 2)
24912
+ : firstCharacterAgainAgain;
24913
+ this.searchColumn(firstColumn, value);
24914
+ /**
24915
+ * If only checked the first value,
24916
+ * we can check the second value
24917
+ * for a match in the minutes column
24918
+ */
24919
+ const minuteValueAgain = value.length === 1
24920
+ ? inputEl.value.substring(1, inputEl.value.length)
24921
+ : inputEl.value.substring(2, inputEl.value.length);
24922
+ this.searchColumn(lastColumn, minuteValueAgain, 'end');
24923
+ break;
24924
+ default:
24925
+ const startIndex = inputEl.value.length - 4;
24926
+ const newString = inputEl.value.substring(startIndex);
24927
+ inputEl.value = newString;
24928
+ this.selectMultiColumn();
24929
+ break;
25000
24930
  }
25001
- // Update transform
25002
- if (transform !== opt.transform) {
25003
- opt.transform = transform;
24931
+ };
24932
+ /**
24933
+ * Searches the value of the active column
24934
+ * to determine which value users are trying
24935
+ * to select
24936
+ */
24937
+ this.onInputChange = () => {
24938
+ const { useInputMode, inputEl, inputModeColumn } = this;
24939
+ if (!useInputMode || !inputEl) {
24940
+ return;
25004
24941
  }
25005
- button.style.transform = transform;
25006
- /**
25007
- * Ensure that the select column
25008
- * item has the selected class
25009
- */
25010
- opt.selected = selected;
25011
- if (selected) {
25012
- button.classList.add(PICKER_OPT_SELECTED);
24942
+ if (inputModeColumn) {
24943
+ this.selectSingleColumn();
25013
24944
  }
25014
24945
  else {
25015
- button.classList.remove(PICKER_OPT_SELECTED);
24946
+ this.selectMultiColumn();
25016
24947
  }
25017
- }
25018
- this.col.prevSelected = prevSelected;
25019
- if (saveY) {
25020
- this.y = y;
25021
- }
25022
- if (this.lastIndex !== selectedIndex) {
25023
- // have not set a last index yet
25024
- hapticSelectionChanged();
25025
- this.lastIndex = selectedIndex;
25026
- }
24948
+ };
24949
+ /**
24950
+ * Emit ionInputModeChange. Picker columns
24951
+ * listen for this event to determine whether
24952
+ * or not their column is "active" for text input.
24953
+ */
24954
+ this.emitInputModeChange = () => {
24955
+ const { useInputMode, inputModeColumn } = this;
24956
+ this.ionInputModeChange.emit({
24957
+ useInputMode,
24958
+ inputModeColumn,
24959
+ });
24960
+ };
25027
24961
  }
25028
- decelerate() {
25029
- if (this.velocity !== 0) {
25030
- // still decelerating
25031
- this.velocity *= DECELERATION_FRICTION;
25032
- // do not let it go slower than a velocity of 1
25033
- this.velocity = this.velocity > 0 ? Math.max(this.velocity, 1) : Math.min(this.velocity, -1);
25034
- let y = this.y + this.velocity;
25035
- if (y > this.minY) {
25036
- // whoops, it's trying to scroll up farther than the options we have!
25037
- y = this.minY;
25038
- this.velocity = 0;
25039
- }
25040
- else if (y < this.maxY) {
25041
- // gahh, it's trying to scroll down farther than we can!
25042
- y = this.maxY;
25043
- this.velocity = 0;
25044
- }
25045
- this.update(y, 0, true);
25046
- const notLockedIn = Math.round(y) % this.optHeight !== 0 || Math.abs(this.velocity) > 1;
25047
- if (notLockedIn) {
25048
- // isn't locked in yet, keep decelerating until it is
25049
- this.rafId = requestAnimationFrame(() => this.decelerate());
25050
- }
25051
- else {
25052
- this.velocity = 0;
25053
- this.emitColChange();
25054
- hapticSelectionEnd();
25055
- }
25056
- }
25057
- else if (this.y % this.optHeight !== 0) {
25058
- // needs to still get locked into a position so options line up
25059
- const currentPos = Math.abs(this.y % this.optHeight);
25060
- // create a velocity in the direction it needs to scroll
25061
- this.velocity = currentPos > this.optHeight / 2 ? 1 : -1;
25062
- this.decelerate();
25063
- }
24962
+ /**
24963
+ * When the picker is interacted with
24964
+ * we need to prevent touchstart so other
24965
+ * gestures do not fire. For example,
24966
+ * scrolling on the wheel picker
24967
+ * in ion-datetime should not cause
24968
+ * a card modal to swipe to close.
24969
+ */
24970
+ preventTouchStartPropagation(ev) {
24971
+ ev.stopPropagation();
25064
24972
  }
25065
- indexForY(y) {
25066
- return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);
24973
+ componentWillLoad() {
24974
+ getElementRoot(this.el).addEventListener('focusin', this.onFocusIn);
24975
+ getElementRoot(this.el).addEventListener('focusout', this.onFocusOut);
25067
24976
  }
25068
- onStart(detail) {
25069
- // We have to prevent default in order to block scrolling under the picker
25070
- // but we DO NOT have to stop propagation, since we still want
25071
- // some "click" events to capture
25072
- if (detail.event.cancelable) {
25073
- detail.event.preventDefault();
24977
+ /**
24978
+ * @internal
24979
+ * Exits text entry mode for the picker
24980
+ * This method blurs the hidden input
24981
+ * and cause the keyboard to dismiss.
24982
+ */
24983
+ async exitInputMode() {
24984
+ const { inputEl, useInputMode } = this;
24985
+ if (!useInputMode || !inputEl) {
24986
+ return;
25074
24987
  }
25075
- detail.event.stopPropagation();
25076
- hapticSelectionStart();
25077
- // reset everything
25078
- if (this.rafId !== undefined)
25079
- cancelAnimationFrame(this.rafId);
25080
- const options = this.col.options;
25081
- let minY = options.length - 1;
25082
- let maxY = 0;
25083
- for (let i = 0; i < options.length; i++) {
25084
- if (!options[i].disabled) {
25085
- minY = Math.min(minY, i);
25086
- maxY = Math.max(maxY, i);
25087
- }
24988
+ this.useInputMode = false;
24989
+ this.inputModeColumn = undefined;
24990
+ inputEl.blur();
24991
+ inputEl.value = '';
24992
+ if (this.destroyKeypressListener) {
24993
+ this.destroyKeypressListener();
24994
+ this.destroyKeypressListener = undefined;
25088
24995
  }
25089
- this.minY = -(minY * this.optHeight);
25090
- this.maxY = -(maxY * this.optHeight);
24996
+ this.emitInputModeChange();
25091
24997
  }
25092
- onMove(detail) {
25093
- if (detail.event.cancelable) {
25094
- detail.event.preventDefault();
25095
- }
25096
- detail.event.stopPropagation();
25097
- // update the scroll position relative to pointer start position
25098
- let y = this.y + detail.deltaY;
25099
- if (y > this.minY) {
25100
- // scrolling up higher than scroll area
25101
- y = Math.pow(y, 0.8);
25102
- this.bounceFrom = y;
24998
+ render() {
24999
+ 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)));
25000
+ }
25001
+ get el() { return getElement(this); }
25002
+ static get style() { return {
25003
+ ios: pickerIosCss$1,
25004
+ md: pickerMdCss$1
25005
+ }; }
25006
+ static get cmpMeta() { return {
25007
+ "$flags$": 41,
25008
+ "$tagName$": "ion-picker",
25009
+ "$members$": {
25010
+ "exitInputMode": [64]
25011
+ },
25012
+ "$listeners$": [[1, "touchstart", "preventTouchStartPropagation"]],
25013
+ "$lazyBundleId$": "-",
25014
+ "$attrsToReflect$": []
25015
+ }; }
25016
+ }
25017
+
25018
+ /**
25019
+ * iOS Picker Enter Animation
25020
+ */
25021
+ const iosEnterAnimation$2 = (baseEl) => {
25022
+ const baseAnimation = createAnimation();
25023
+ const backdropAnimation = createAnimation();
25024
+ const wrapperAnimation = createAnimation();
25025
+ backdropAnimation
25026
+ .addElement(baseEl.querySelector('ion-backdrop'))
25027
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
25028
+ .beforeStyles({
25029
+ 'pointer-events': 'none',
25030
+ })
25031
+ .afterClearStyles(['pointer-events']);
25032
+ wrapperAnimation
25033
+ .addElement(baseEl.querySelector('.picker-wrapper'))
25034
+ .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
25035
+ return baseAnimation
25036
+ .addElement(baseEl)
25037
+ .easing('cubic-bezier(.36,.66,.04,1)')
25038
+ .duration(400)
25039
+ .addAnimation([backdropAnimation, wrapperAnimation]);
25040
+ };
25041
+
25042
+ /**
25043
+ * iOS Picker Leave Animation
25044
+ */
25045
+ const iosLeaveAnimation$2 = (baseEl) => {
25046
+ const baseAnimation = createAnimation();
25047
+ const backdropAnimation = createAnimation();
25048
+ const wrapperAnimation = createAnimation();
25049
+ backdropAnimation
25050
+ .addElement(baseEl.querySelector('ion-backdrop'))
25051
+ .fromTo('opacity', 'var(--backdrop-opacity)', 0.01);
25052
+ wrapperAnimation
25053
+ .addElement(baseEl.querySelector('.picker-wrapper'))
25054
+ .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
25055
+ return baseAnimation
25056
+ .addElement(baseEl)
25057
+ .easing('cubic-bezier(.36,.66,.04,1)')
25058
+ .duration(400)
25059
+ .addAnimation([backdropAnimation, wrapperAnimation]);
25060
+ };
25061
+
25062
+ 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}}}";
25063
+
25064
+ 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}}}";
25065
+
25066
+ // TODO(FW-2832): types
25067
+ /**
25068
+ * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
25069
+ */
25070
+ class Picker {
25071
+ constructor(hostRef) {
25072
+ registerInstance(this, hostRef);
25073
+ this.didPresent = createEvent(this, "ionPickerDidPresent", 7);
25074
+ this.willPresent = createEvent(this, "ionPickerWillPresent", 7);
25075
+ this.willDismiss = createEvent(this, "ionPickerWillDismiss", 7);
25076
+ this.didDismiss = createEvent(this, "ionPickerDidDismiss", 7);
25077
+ this.didPresentShorthand = createEvent(this, "didPresent", 7);
25078
+ this.willPresentShorthand = createEvent(this, "willPresent", 7);
25079
+ this.willDismissShorthand = createEvent(this, "willDismiss", 7);
25080
+ this.didDismissShorthand = createEvent(this, "didDismiss", 7);
25081
+ this.delegateController = createDelegateController(this);
25082
+ this.lockController = createLockController();
25083
+ this.triggerController = createTriggerController();
25084
+ this.onBackdropTap = () => {
25085
+ this.dismiss(undefined, BACKDROP);
25086
+ };
25087
+ this.dispatchCancelHandler = (ev) => {
25088
+ const role = ev.detail.role;
25089
+ if (isCancel(role)) {
25090
+ const cancelButton = this.buttons.find((b) => b.role === 'cancel');
25091
+ this.callButtonHandler(cancelButton);
25092
+ }
25093
+ };
25094
+ this.presented = false;
25095
+ this.overlayIndex = undefined;
25096
+ this.delegate = undefined;
25097
+ this.hasController = false;
25098
+ this.keyboardClose = true;
25099
+ this.enterAnimation = undefined;
25100
+ this.leaveAnimation = undefined;
25101
+ this.buttons = [];
25102
+ this.columns = [];
25103
+ this.cssClass = undefined;
25104
+ this.duration = 0;
25105
+ this.showBackdrop = true;
25106
+ this.backdropDismiss = true;
25107
+ this.animated = true;
25108
+ this.htmlAttributes = undefined;
25109
+ this.isOpen = false;
25110
+ this.trigger = undefined;
25111
+ }
25112
+ onIsOpenChange(newValue, oldValue) {
25113
+ if (newValue === true && oldValue === false) {
25114
+ this.present();
25103
25115
  }
25104
- else if (y < this.maxY) {
25105
- // scrolling down below scroll area
25106
- y += Math.pow(this.maxY - y, 0.9);
25107
- this.bounceFrom = y;
25116
+ else if (newValue === false && oldValue === true) {
25117
+ this.dismiss();
25108
25118
  }
25109
- else {
25110
- this.bounceFrom = 0;
25119
+ }
25120
+ triggerChanged() {
25121
+ const { trigger, el, triggerController } = this;
25122
+ if (trigger) {
25123
+ triggerController.addClickListener(el, trigger);
25111
25124
  }
25112
- this.update(y, 0, false);
25113
25125
  }
25114
- onEnd(detail) {
25115
- if (this.bounceFrom > 0) {
25116
- // bounce back up
25117
- this.update(this.minY, 100, true);
25118
- this.emitColChange();
25119
- return;
25126
+ connectedCallback() {
25127
+ prepareOverlay(this.el);
25128
+ this.triggerChanged();
25129
+ }
25130
+ disconnectedCallback() {
25131
+ this.triggerController.removeClickListener();
25132
+ }
25133
+ componentWillLoad() {
25134
+ setOverlayId(this.el);
25135
+ }
25136
+ componentDidLoad() {
25137
+ 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);
25138
+ /**
25139
+ * If picker was rendered with isOpen="true"
25140
+ * then we should open picker immediately.
25141
+ */
25142
+ if (this.isOpen === true) {
25143
+ raf(() => this.present());
25120
25144
  }
25121
- else if (this.bounceFrom < 0) {
25122
- // bounce back down
25123
- this.update(this.maxY, 100, true);
25124
- this.emitColChange();
25125
- return;
25145
+ }
25146
+ /**
25147
+ * Present the picker overlay after it has been created.
25148
+ */
25149
+ async present() {
25150
+ const unlock = await this.lockController.lock();
25151
+ await this.delegateController.attachViewToDom();
25152
+ await present(this, 'pickerEnter', iosEnterAnimation$2, iosEnterAnimation$2, undefined);
25153
+ if (this.duration > 0) {
25154
+ this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
25126
25155
  }
25127
- this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);
25128
- if (this.velocity === 0 && detail.deltaY === 0) {
25129
- const opt = detail.event.target.closest('.picker-opt');
25130
- if (opt === null || opt === void 0 ? void 0 : opt.hasAttribute('opt-index')) {
25131
- this.setSelected(parseInt(opt.getAttribute('opt-index'), 10), TRANSITION_DURATION);
25132
- }
25156
+ unlock();
25157
+ }
25158
+ /**
25159
+ * Dismiss the picker overlay after it has been presented.
25160
+ *
25161
+ * @param data Any data to emit in the dismiss events.
25162
+ * @param role The role of the element that is dismissing the picker.
25163
+ * This can be useful in a button handler for determining which button was
25164
+ * clicked to dismiss the picker.
25165
+ * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
25166
+ */
25167
+ async dismiss(data, role) {
25168
+ const unlock = await this.lockController.lock();
25169
+ if (this.durationTimeout) {
25170
+ clearTimeout(this.durationTimeout);
25133
25171
  }
25134
- else {
25135
- this.y += detail.deltaY;
25136
- if (Math.abs(detail.velocityY) < 0.05) {
25137
- const isScrollingUp = detail.deltaY > 0;
25138
- const optHeightFraction = (Math.abs(this.y) % this.optHeight) / this.optHeight;
25139
- if (isScrollingUp && optHeightFraction > 0.5) {
25140
- this.velocity = Math.abs(this.velocity) * -1;
25141
- }
25142
- else if (!isScrollingUp && optHeightFraction <= 0.5) {
25143
- this.velocity = Math.abs(this.velocity);
25144
- }
25145
- }
25146
- this.decelerate();
25172
+ const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation$2, iosLeaveAnimation$2);
25173
+ if (dismissed) {
25174
+ this.delegateController.removeViewFromDom();
25147
25175
  }
25176
+ unlock();
25177
+ return dismissed;
25148
25178
  }
25149
- refresh(forceRefresh, animated) {
25150
- var _a;
25151
- let min = this.col.options.length - 1;
25152
- let max = 0;
25153
- const options = this.col.options;
25154
- for (let i = 0; i < options.length; i++) {
25155
- if (!options[i].disabled) {
25156
- min = Math.min(min, i);
25157
- max = Math.max(max, i);
25158
- }
25159
- }
25160
- /**
25161
- * Only update selected value if column has a
25162
- * velocity of 0. If it does not, then the
25163
- * column is animating might land on
25164
- * a value different than the value at
25165
- * selectedIndex
25166
- */
25167
- if (this.velocity !== 0) {
25168
- return;
25179
+ /**
25180
+ * Returns a promise that resolves when the picker did dismiss.
25181
+ */
25182
+ onDidDismiss() {
25183
+ return eventMethod(this.el, 'ionPickerDidDismiss');
25184
+ }
25185
+ /**
25186
+ * Returns a promise that resolves when the picker will dismiss.
25187
+ */
25188
+ onWillDismiss() {
25189
+ return eventMethod(this.el, 'ionPickerWillDismiss');
25190
+ }
25191
+ /**
25192
+ * Get the column that matches the specified name.
25193
+ *
25194
+ * @param name The name of the column.
25195
+ */
25196
+ getColumn(name) {
25197
+ return Promise.resolve(this.columns.find((column) => column.name === name));
25198
+ }
25199
+ async buttonClick(button) {
25200
+ const role = button.role;
25201
+ if (isCancel(role)) {
25202
+ return this.dismiss(undefined, role);
25169
25203
  }
25170
- const selectedIndex = clamp(min, (_a = this.col.selectedIndex) !== null && _a !== void 0 ? _a : 0, max);
25171
- if (this.col.prevSelected !== selectedIndex || forceRefresh) {
25172
- const y = selectedIndex * this.optHeight * -1;
25173
- const duration = animated ? TRANSITION_DURATION : 0;
25174
- this.velocity = 0;
25175
- this.update(y, duration, true);
25204
+ const shouldDismiss = await this.callButtonHandler(button);
25205
+ if (shouldDismiss) {
25206
+ return this.dismiss(this.getSelected(), button.role);
25176
25207
  }
25208
+ return Promise.resolve();
25177
25209
  }
25178
- onDomChange(forceRefresh, animated) {
25179
- const colEl = this.optsEl;
25180
- if (colEl) {
25181
- // DOM READ
25182
- // We perfom a DOM read over a rendered item, this needs to happen after the first render or after the the column has changed
25183
- this.optHeight = colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0;
25210
+ async callButtonHandler(button) {
25211
+ if (button) {
25212
+ // a handler has been provided, execute it
25213
+ // pass the handler the values from the inputs
25214
+ const rtn = await safeCall(button.handler, this.getSelected());
25215
+ if (rtn === false) {
25216
+ // if the return value of the handler is false then do not dismiss
25217
+ return false;
25218
+ }
25184
25219
  }
25185
- this.refresh(forceRefresh, animated);
25220
+ return true;
25221
+ }
25222
+ getSelected() {
25223
+ const selected = {};
25224
+ this.columns.forEach((col, index) => {
25225
+ const selectedColumn = col.selectedIndex !== undefined ? col.options[col.selectedIndex] : undefined;
25226
+ selected[col.name] = {
25227
+ text: selectedColumn ? selectedColumn.text : undefined,
25228
+ value: selectedColumn ? selectedColumn.value : undefined,
25229
+ columnIndex: index,
25230
+ };
25231
+ });
25232
+ return selected;
25186
25233
  }
25187
25234
  render() {
25188
- const col = this.col;
25235
+ const { htmlAttributes } = this;
25189
25236
  const mode = getIonMode$1(this);
25190
- 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: {
25191
- 'max-width': this.col.columnWidth,
25192
- } }, 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))));
25237
+ return (hAsync(Host, Object.assign({ "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
25238
+ zIndex: `${20000 + this.overlayIndex}`,
25239
+ }, class: Object.assign({ [mode]: true,
25240
+ // Used internally for styling
25241
+ [`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" })));
25193
25242
  }
25194
25243
  get el() { return getElement(this); }
25195
25244
  static get watchers() { return {
25196
- "col": ["colChanged"]
25245
+ "isOpen": ["onIsOpenChange"],
25246
+ "trigger": ["triggerChanged"]
25197
25247
  }; }
25198
25248
  static get style() { return {
25199
- ios: pickerColumnIosCss,
25200
- md: pickerColumnMdCss
25249
+ ios: pickerIosCss,
25250
+ md: pickerMdCss
25201
25251
  }; }
25202
25252
  static get cmpMeta() { return {
25203
- "$flags$": 32,
25204
- "$tagName$": "ion-picker-column",
25253
+ "$flags$": 34,
25254
+ "$tagName$": "ion-picker-legacy",
25205
25255
  "$members$": {
25206
- "col": [16]
25256
+ "overlayIndex": [2, "overlay-index"],
25257
+ "delegate": [16],
25258
+ "hasController": [4, "has-controller"],
25259
+ "keyboardClose": [4, "keyboard-close"],
25260
+ "enterAnimation": [16],
25261
+ "leaveAnimation": [16],
25262
+ "buttons": [16],
25263
+ "columns": [16],
25264
+ "cssClass": [1, "css-class"],
25265
+ "duration": [2],
25266
+ "showBackdrop": [4, "show-backdrop"],
25267
+ "backdropDismiss": [4, "backdrop-dismiss"],
25268
+ "animated": [4],
25269
+ "htmlAttributes": [16],
25270
+ "isOpen": [4, "is-open"],
25271
+ "trigger": [1],
25272
+ "presented": [32],
25273
+ "present": [64],
25274
+ "dismiss": [64],
25275
+ "onDidDismiss": [64],
25276
+ "onWillDismiss": [64],
25277
+ "getColumn": [64]
25207
25278
  },
25208
25279
  "$listeners$": undefined,
25209
25280
  "$lazyBundleId$": "-",
25210
25281
  "$attrsToReflect$": []
25211
25282
  }; }
25212
25283
  }
25213
- const PICKER_OPT_SELECTED = 'picker-opt-selected';
25214
- const DECELERATION_FRICTION = 0.97;
25215
- const MAX_PICKER_SPEED = 90;
25216
- const TRANSITION_DURATION = 150;
25284
+ const buttonWrapperClass = (button) => {
25285
+ return {
25286
+ [`picker-toolbar-${button.role}`]: button.role !== undefined,
25287
+ 'picker-toolbar-button': true,
25288
+ };
25289
+ };
25290
+ const buttonClass$1 = (button) => {
25291
+ return Object.assign({ 'picker-button': true, 'ion-activatable': true }, getClassMap(button.cssClass));
25292
+ };
25217
25293
 
25218
- 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)}}";
25294
+ const pickerColumnIosCss$1 = "/*!@:host*/.sc-ion-picker-column-ios-h{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;max-width:100%;height:200px;font-size:22px;text-align:center}/*!@.picker-opts*/.picker-opts.sc-ion-picker-column-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-width:26px;max-height:200px;outline:none;text-align:inherit;-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}/*!@.picker-opts::-webkit-scrollbar*/.picker-opts.sc-ion-picker-column-ios::-webkit-scrollbar{display:none}/*!@::slotted(ion-picker-column-option)*/.sc-ion-picker-column-ios-s>ion-picker-column-option{display:block;scroll-snap-align:center}/*!@.picker-item-empty,\n:host(:not([disabled])) ::slotted(ion-picker-column-option.option-disabled)*/.picker-item-empty.sc-ion-picker-column-ios,.sc-ion-picker-column-ios-h:not([disabled]).sc-ion-picker-column-ios-s>ion-picker-column-option.option-disabled,.sc-ion-picker-column-ios-h:not([disabled]) .sc-ion-picker-column-ios-s>ion-picker-column-option.option-disabled{scroll-snap-align:none}/*!@::slotted([slot=prefix]), ::slotted([slot=suffix])*/.sc-ion-picker-column-ios-s>[slot=prefix],.sc-ion-picker-column-ios-s>[slot=suffix]{max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}/*!@::slotted([slot=prefix])*/.sc-ion-picker-column-ios-s>[slot=prefix]{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:0;-ms-flex-pack:end;justify-content:end}/*!@::slotted([slot=suffix])*/.sc-ion-picker-column-ios-s>[slot=suffix]{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:0;-ms-flex-pack:start;justify-content:start}/*!@: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) .picker-opts*/.sc-ion-picker-column-ios-h:focus .picker-opts.sc-ion-picker-column-ios{outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}";
25219
25295
 
25220
- 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)}";
25296
+ const pickerColumnMdCss$1 = "/*!@:host*/.sc-ion-picker-column-md-h{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;max-width:100%;height:200px;font-size:22px;text-align:center}/*!@.picker-opts*/.picker-opts.sc-ion-picker-column-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-width:26px;max-height:200px;outline:none;text-align:inherit;-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}/*!@.picker-opts::-webkit-scrollbar*/.picker-opts.sc-ion-picker-column-md::-webkit-scrollbar{display:none}/*!@::slotted(ion-picker-column-option)*/.sc-ion-picker-column-md-s>ion-picker-column-option{display:block;scroll-snap-align:center}/*!@.picker-item-empty,\n:host(:not([disabled])) ::slotted(ion-picker-column-option.option-disabled)*/.picker-item-empty.sc-ion-picker-column-md,.sc-ion-picker-column-md-h:not([disabled]).sc-ion-picker-column-md-s>ion-picker-column-option.option-disabled,.sc-ion-picker-column-md-h:not([disabled]) .sc-ion-picker-column-md-s>ion-picker-column-option.option-disabled{scroll-snap-align:none}/*!@::slotted([slot=prefix]), ::slotted([slot=suffix])*/.sc-ion-picker-column-md-s>[slot=prefix],.sc-ion-picker-column-md-s>[slot=suffix]{max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}/*!@::slotted([slot=prefix])*/.sc-ion-picker-column-md-s>[slot=prefix]{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:0;-ms-flex-pack:end;justify-content:end}/*!@::slotted([slot=suffix])*/.sc-ion-picker-column-md-s>[slot=suffix]{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:0;-ms-flex-pack:start;justify-content:start}/*!@: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) .picker-opts*/.sc-ion-picker-column-md-h:focus .picker-opts.sc-ion-picker-column-md{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)}";
25221
25297
 
25222
25298
  /**
25223
25299
  * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
25224
- * @internal
25300
+ *
25301
+ * @slot prefix - Content to show on the left side of the picker options.
25302
+ * @slot suffix - Content to show on the right side of the picker options.
25225
25303
  */
25226
- class PickerColumnInternal {
25304
+ // TODO FW-5580 we can likely go back to a single stylesheet here
25305
+ // the per-mode styles were moved to ion-picker-column-option
25306
+ class PickerColumn {
25227
25307
  constructor(hostRef) {
25228
25308
  registerInstance(this, hostRef);
25229
25309
  this.ionChange = createEvent(this, "ionChange", 7);
@@ -25231,11 +25311,11 @@ class PickerColumnInternal {
25231
25311
  this.isColumnVisible = false;
25232
25312
  this.canExitInputMode = true;
25233
25313
  this.centerPickerItemInView = (target, smooth = true, canExitInputMode = true) => {
25234
- const { el, isColumnVisible } = this;
25235
- if (isColumnVisible) {
25314
+ const { isColumnVisible, scrollEl } = this;
25315
+ if (isColumnVisible && scrollEl) {
25236
25316
  // (Vertical offset from parent) - (three empty picker rows) + (half the height of the target to ensure the scroll triggers)
25237
25317
  const top = target.offsetTop - 3 * target.clientHeight + target.clientHeight / 2;
25238
- if (el.scrollTop !== top) {
25318
+ if (scrollEl.scrollTop !== top) {
25239
25319
  /**
25240
25320
  * Setting this flag prevents input
25241
25321
  * mode from exiting in the picker column's
@@ -25244,7 +25324,7 @@ class PickerColumnInternal {
25244
25324
  * of these can cause a scroll to occur.
25245
25325
  */
25246
25326
  this.canExitInputMode = canExitInputMode;
25247
- el.scroll({
25327
+ scrollEl.scroll({
25248
25328
  top,
25249
25329
  left: 0,
25250
25330
  behavior: smooth ? 'smooth' : undefined,
@@ -25313,11 +25393,13 @@ class PickerColumnInternal {
25313
25393
  * be disabled on Android.
25314
25394
  */
25315
25395
  const enableHaptics = isPlatform('ios');
25316
- const { el } = this;
25396
+ const { el, scrollEl } = this;
25317
25397
  let timeout;
25318
25398
  let activeEl = this.activeItem;
25319
25399
  const scrollCallback = () => {
25320
25400
  raf(() => {
25401
+ if (!scrollEl)
25402
+ return;
25321
25403
  if (timeout) {
25322
25404
  clearTimeout(timeout);
25323
25405
  timeout = undefined;
@@ -25330,21 +25412,54 @@ class PickerColumnInternal {
25330
25412
  * Select item in the center of the column
25331
25413
  * which is the month/year that we want to select
25332
25414
  */
25333
- const bbox = el.getBoundingClientRect();
25415
+ const bbox = scrollEl.getBoundingClientRect();
25334
25416
  const centerX = bbox.x + bbox.width / 2;
25335
25417
  const centerY = bbox.y + bbox.height / 2;
25336
- const activeElement = el.shadowRoot.elementFromPoint(centerX, centerY);
25337
- if (activeEl !== null) {
25418
+ /**
25419
+ * elementFromPoint returns the top-most element.
25420
+ * This means that if an ion-backdrop is overlaying the
25421
+ * picker then the appropriate picker column option will
25422
+ * not be selected. To account for this, we use elementsFromPoint
25423
+ * and use an Array.find to find the appropriate column option
25424
+ * at that point.
25425
+ *
25426
+ * Additionally, the picker column could be used in the
25427
+ * Shadow DOM (i.e. in ion-datetime) so we need to make
25428
+ * sure we are choosing the correct host otherwise
25429
+ * the elements returns by elementsFromPoint will be
25430
+ * retargeted. To account for this, we check to see
25431
+ * if the picker column has a parent shadow root. If
25432
+ * so, we use that shadow root when doing elementsFromPoint.
25433
+ * Otherwise, we just use the document.
25434
+ */
25435
+ const rootNode = el.getRootNode();
25436
+ const hasParentShadow = rootNode instanceof ShadowRoot;
25437
+ const referenceNode = hasParentShadow ? rootNode : doc;
25438
+ /**
25439
+ * If the reference node is undefined
25440
+ * then it's likely that doc is undefined
25441
+ * due to being in an SSR environment.
25442
+ */
25443
+ if (referenceNode === undefined) {
25444
+ return;
25445
+ }
25446
+ const elementsAtPoint = referenceNode.elementsFromPoint(centerX, centerY);
25447
+ /**
25448
+ * elementsFromPoint can returns multiple elements
25449
+ * so find the relevant picker column option if one exists.
25450
+ */
25451
+ const newActiveElement = elementsAtPoint.find((el) => el.tagName === 'ION-PICKER-COLUMN-OPTION');
25452
+ if (activeEl !== undefined) {
25338
25453
  this.setPickerItemActiveState(activeEl, false);
25339
25454
  }
25340
- if (activeElement === null || activeElement.disabled) {
25455
+ if (newActiveElement === undefined || newActiveElement.disabled) {
25341
25456
  return;
25342
25457
  }
25343
25458
  /**
25344
25459
  * If we are selecting a new value,
25345
25460
  * we need to run haptics again.
25346
25461
  */
25347
- if (activeElement !== activeEl) {
25462
+ if (newActiveElement !== activeEl) {
25348
25463
  enableHaptics && hapticSelectionChanged();
25349
25464
  if (this.canExitInputMode) {
25350
25465
  /**
@@ -25361,8 +25476,8 @@ class PickerColumnInternal {
25361
25476
  this.exitInputMode();
25362
25477
  }
25363
25478
  }
25364
- activeEl = activeElement;
25365
- this.setPickerItemActiveState(activeElement, true);
25479
+ activeEl = newActiveElement;
25480
+ this.setPickerItemActiveState(newActiveElement, true);
25366
25481
  timeout = setTimeout(() => {
25367
25482
  this.isScrolling = false;
25368
25483
  enableHaptics && hapticSelectionEnd();
@@ -25382,22 +25497,9 @@ class PickerColumnInternal {
25382
25497
  * next scroll interaction could
25383
25498
  * be a scroll from the user. In this
25384
25499
  * case, we should exit input mode.
25385
- */
25386
- this.canExitInputMode = true;
25387
- const dataIndex = activeElement.getAttribute('data-index');
25388
- /**
25389
- * If no value it is
25390
- * possible we hit one of the
25391
- * empty padding columns.
25392
- */
25393
- if (dataIndex === null) {
25394
- return;
25395
- }
25396
- const index = parseInt(dataIndex, 10);
25397
- const selectedItem = this.items[index];
25398
- if (selectedItem.value !== this.value) {
25399
- this.setValue(selectedItem.value);
25400
- }
25500
+ */
25501
+ this.canExitInputMode = true;
25502
+ this.setValue(newActiveElement.value);
25401
25503
  }, 250);
25402
25504
  });
25403
25505
  };
@@ -25406,9 +25508,11 @@ class PickerColumnInternal {
25406
25508
  * does not fire when component is initially shown.
25407
25509
  */
25408
25510
  raf(() => {
25409
- el.addEventListener('scroll', scrollCallback);
25511
+ if (!scrollEl)
25512
+ return;
25513
+ scrollEl.addEventListener('scroll', scrollCallback);
25410
25514
  this.destroyScrollListener = () => {
25411
- el.removeEventListener('scroll', scrollCallback);
25515
+ scrollEl.removeEventListener('scroll', scrollCallback);
25412
25516
  };
25413
25517
  });
25414
25518
  };
@@ -25450,632 +25554,621 @@ class PickerColumnInternal {
25450
25554
  this.scrollActiveItemIntoView();
25451
25555
  }
25452
25556
  }
25453
- /**
25454
- * Only setup scroll listeners
25455
- * when the picker is visible, otherwise
25456
- * the container will have a scroll
25457
- * height of 0px.
25458
- */
25459
- componentWillLoad() {
25460
- const visibleCallback = (entries) => {
25461
- const ev = entries[0];
25462
- if (ev.isIntersecting) {
25463
- const { activeItem, el } = this;
25464
- this.isColumnVisible = true;
25465
- /**
25466
- * Because this initial call to scrollActiveItemIntoView has to fire before
25467
- * the scroll listener is set up, we need to manage the active class manually.
25468
- */
25469
- const oldActive = getElementRoot(el).querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
25470
- if (oldActive) {
25471
- this.setPickerItemActiveState(oldActive, false);
25472
- }
25473
- this.scrollActiveItemIntoView();
25474
- if (activeItem) {
25475
- this.setPickerItemActiveState(activeItem, true);
25476
- }
25477
- this.initializeScrollListener();
25478
- }
25479
- else {
25480
- this.isColumnVisible = false;
25481
- if (this.destroyScrollListener) {
25482
- this.destroyScrollListener();
25483
- this.destroyScrollListener = undefined;
25484
- }
25485
- }
25486
- };
25487
- new IntersectionObserver(visibleCallback, { threshold: 0.001 }).observe(this.el);
25488
- const parentEl = (this.parentEl = this.el.closest('ion-picker-internal'));
25489
- if (parentEl !== null) {
25490
- // TODO(FW-2832): type
25491
- parentEl.addEventListener('ionInputModeChange', (ev) => this.inputModeChange(ev));
25492
- }
25493
- }
25494
- componentDidRender() {
25495
- var _a;
25496
- const { activeItem, items, isColumnVisible, value } = this;
25497
- if (isColumnVisible) {
25498
- if (activeItem) {
25499
- this.scrollActiveItemIntoView();
25500
- }
25501
- else if (((_a = items[0]) === null || _a === void 0 ? void 0 : _a.value) !== value) {
25502
- /**
25503
- * If the picker column does not have an active item and the current value
25504
- * does not match the first item in the picker column, that means
25505
- * the value is out of bounds. In this case, we assign the value to the
25506
- * first item to match the scroll position of the column.
25507
- *
25508
- */
25509
- this.setValue(items[0].value);
25510
- }
25511
- }
25512
- }
25513
- /** @internal */
25514
- async scrollActiveItemIntoView() {
25515
- const activeEl = this.activeItem;
25516
- if (activeEl) {
25517
- this.centerPickerItemInView(activeEl, false, false);
25518
- }
25519
- }
25520
- /**
25521
- * Sets the value prop and fires the ionChange event.
25522
- * This is used when we need to fire ionChange from
25523
- * user-generated events that cannot be caught with normal
25524
- * input/change event listeners.
25525
- * @internal
25526
- */
25527
- async setValue(value) {
25528
- const { items } = this;
25529
- this.value = value;
25530
- const findItem = items.find((item) => item.value === value && item.disabled !== true);
25531
- if (findItem) {
25532
- this.ionChange.emit(findItem);
25533
- }
25534
- }
25535
- get activeItem() {
25536
- // If the whole picker column is disabled, the current value should appear active
25537
- // If the current value item is specifically disabled, it should not appear active
25538
- const selector = `.picker-item[data-value="${this.value}"]${this.disabled ? '' : ':not([disabled])'}`;
25539
- return getElementRoot(this.el).querySelector(selector);
25540
- }
25541
- render() {
25542
- const { items, color, disabled: pickerDisabled, isActive, numericInput } = this;
25543
- const mode = getIonMode$1(this);
25544
- /**
25545
- * exportparts is needed so ion-datetime can expose the parts
25546
- * from two layers of shadow nesting. If this causes problems,
25547
- * the attribute can be moved to datetime.tsx and set on every
25548
- * instance of ion-picker-column-internal there instead.
25549
- */
25550
- return (hAsync(Host, { exportparts: `${PICKER_ITEM_PART}, ${PICKER_ITEM_ACTIVE_PART}`, disabled: pickerDisabled, tabindex: pickerDisabled ? null : 0, class: createColorClasses$1(color, {
25551
- [mode]: true,
25552
- ['picker-column-active']: isActive,
25553
- ['picker-column-numeric-input']: numericInput,
25554
- }) }, 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) => {
25555
- const isItemDisabled = pickerDisabled || item.disabled || false;
25556
- return (hAsync("button", { tabindex: "-1", class: {
25557
- 'picker-item': true,
25558
- }, "data-value": item.value, "data-index": index, onClick: (ev) => {
25559
- this.centerPickerItemInView(ev.target, true);
25560
- }, disabled: isItemDisabled, part: PICKER_ITEM_PART }, item.text));
25561
- }), 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")));
25562
- }
25563
- get el() { return getElement(this); }
25564
- static get watchers() { return {
25565
- "value": ["valueChange"]
25566
- }; }
25567
- static get style() { return {
25568
- ios: pickerColumnInternalIosCss,
25569
- md: pickerColumnInternalMdCss
25570
- }; }
25571
- static get cmpMeta() { return {
25572
- "$flags$": 41,
25573
- "$tagName$": "ion-picker-column-internal",
25574
- "$members$": {
25575
- "disabled": [4],
25576
- "items": [16],
25577
- "value": [1032],
25578
- "color": [513],
25579
- "numericInput": [4, "numeric-input"],
25580
- "isActive": [32],
25581
- "scrollActiveItemIntoView": [64],
25582
- "setValue": [64]
25583
- },
25584
- "$listeners$": undefined,
25585
- "$lazyBundleId$": "-",
25586
- "$attrsToReflect$": [["color", "color"]]
25587
- }; }
25588
- }
25589
- const PICKER_ITEM_ACTIVE_CLASS = 'picker-item-active';
25590
- const PICKER_ITEM_PART = 'wheel-item';
25591
- const PICKER_ITEM_ACTIVE_PART = 'active';
25592
-
25593
- 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))}";
25594
-
25595
- 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%)}";
25596
-
25597
- /**
25598
- * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
25599
- * @internal
25600
- */
25601
- class PickerInternal {
25602
- constructor(hostRef) {
25603
- registerInstance(this, hostRef);
25604
- this.ionInputModeChange = createEvent(this, "ionInputModeChange", 7);
25605
- this.useInputMode = false;
25606
- this.isInHighlightBounds = (ev) => {
25607
- const { highlightEl } = this;
25608
- if (!highlightEl) {
25609
- return false;
25610
- }
25611
- const bbox = highlightEl.getBoundingClientRect();
25612
- /**
25613
- * Check to see if the user clicked
25614
- * outside the bounds of the highlight.
25615
- */
25616
- const outsideX = ev.clientX < bbox.left || ev.clientX > bbox.right;
25617
- const outsideY = ev.clientY < bbox.top || ev.clientY > bbox.bottom;
25618
- if (outsideX || outsideY) {
25619
- return false;
25620
- }
25621
- return true;
25622
- };
25623
- /**
25624
- * If we are no longer focused
25625
- * on a picker column, then we should
25626
- * exit input mode. An exception is made
25627
- * for the input in the picker since having
25628
- * that focused means we are still in input mode.
25629
- */
25630
- this.onFocusOut = (ev) => {
25631
- // TODO(FW-2832): type
25632
- const { relatedTarget } = ev;
25633
- if (!relatedTarget || (relatedTarget.tagName !== 'ION-PICKER-COLUMN-INTERNAL' && relatedTarget !== this.inputEl)) {
25634
- this.exitInputMode();
25635
- }
25636
- };
25637
- /**
25638
- * When picker columns receive focus
25639
- * the parent picker needs to determine
25640
- * whether to enter/exit input mode.
25641
- */
25642
- this.onFocusIn = (ev) => {
25643
- // TODO(FW-2832): type
25644
- const { target } = ev;
25645
- /**
25646
- * Due to browser differences in how/when focus
25647
- * is dispatched on certain elements, we need to
25648
- * make sure that this function only ever runs when
25649
- * focusing a picker column.
25650
- */
25651
- if (target.tagName !== 'ION-PICKER-COLUMN-INTERNAL') {
25652
- return;
25653
- }
25654
- /**
25655
- * If we have actionOnClick
25656
- * then this means the user focused
25657
- * a picker column via mouse or
25658
- * touch (i.e. a PointerEvent). As a result,
25659
- * we should not enter/exit input mode
25660
- * until the click event has fired, which happens
25661
- * after the `focusin` event.
25662
- *
25663
- * Otherwise, the user likely focused
25664
- * the column using their keyboard and
25665
- * we should enter/exit input mode automatically.
25666
- */
25667
- if (!this.actionOnClick) {
25668
- const columnEl = target;
25669
- const allowInput = columnEl.numericInput;
25670
- if (allowInput) {
25671
- this.enterInputMode(columnEl, false);
25672
- }
25673
- else {
25674
- this.exitInputMode();
25675
- }
25676
- }
25677
- };
25678
- /**
25679
- * On click we need to run an actionOnClick
25680
- * function that has been set in onPointerDown
25681
- * so that we enter/exit input mode correctly.
25682
- */
25683
- this.onClick = () => {
25684
- const { actionOnClick } = this;
25685
- if (actionOnClick) {
25686
- actionOnClick();
25687
- this.actionOnClick = undefined;
25688
- }
25689
- };
25690
- /**
25691
- * Clicking a column also focuses the column on
25692
- * certain browsers, so we use onPointerDown
25693
- * to tell the onFocusIn function that users
25694
- * are trying to click the column rather than
25695
- * focus the column using the keyboard. When the
25696
- * user completes the click, the onClick function
25697
- * runs and runs the actionOnClick callback.
25698
- */
25699
- this.onPointerDown = (ev) => {
25700
- const { useInputMode, inputModeColumn, el } = this;
25701
- if (this.isInHighlightBounds(ev)) {
25702
- /**
25703
- * If we were already in
25704
- * input mode, then we should determine
25705
- * if we tapped a particular column and
25706
- * should switch to input mode for
25707
- * that specific column.
25708
- */
25709
- if (useInputMode) {
25710
- /**
25711
- * If we tapped a picker column
25712
- * then we should either switch to input
25713
- * mode for that column or all columns.
25714
- * Otherwise we should exit input mode
25715
- * since we just tapped the highlight and
25716
- * not a column.
25717
- */
25718
- if (ev.target.tagName === 'ION-PICKER-COLUMN-INTERNAL') {
25719
- /**
25720
- * If user taps 2 different columns
25721
- * then we should just switch to input mode
25722
- * for the new column rather than switching to
25723
- * input mode for all columns.
25724
- */
25725
- if (inputModeColumn && inputModeColumn === ev.target) {
25726
- this.actionOnClick = () => {
25727
- this.enterInputMode();
25728
- };
25729
- }
25730
- else {
25731
- this.actionOnClick = () => {
25732
- this.enterInputMode(ev.target);
25733
- };
25734
- }
25735
- }
25736
- else {
25737
- this.actionOnClick = () => {
25738
- this.exitInputMode();
25739
- };
25740
- }
25741
- /**
25742
- * If we were not already in
25743
- * input mode, then we should
25744
- * enter input mode for all columns.
25745
- */
25557
+ /**
25558
+ * Only setup scroll listeners
25559
+ * when the picker is visible, otherwise
25560
+ * the container will have a scroll
25561
+ * height of 0px.
25562
+ */
25563
+ componentWillLoad() {
25564
+ const visibleCallback = (entries) => {
25565
+ const ev = entries[0];
25566
+ if (ev.isIntersecting) {
25567
+ const { activeItem, el } = this;
25568
+ this.isColumnVisible = true;
25569
+ /**
25570
+ * Because this initial call to scrollActiveItemIntoView has to fire before
25571
+ * the scroll listener is set up, we need to manage the active class manually.
25572
+ */
25573
+ const oldActive = getElementRoot(el).querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
25574
+ if (oldActive) {
25575
+ this.setPickerItemActiveState(oldActive, false);
25746
25576
  }
25747
- else {
25748
- /**
25749
- * If there is only 1 numeric input column
25750
- * then we should skip multi column input.
25751
- */
25752
- const columns = el.querySelectorAll('ion-picker-column-internal.picker-column-numeric-input');
25753
- const columnEl = columns.length === 1 ? ev.target : undefined;
25754
- this.actionOnClick = () => {
25755
- this.enterInputMode(columnEl);
25756
- };
25577
+ this.scrollActiveItemIntoView();
25578
+ if (activeItem) {
25579
+ this.setPickerItemActiveState(activeItem, true);
25757
25580
  }
25758
- return;
25581
+ this.initializeScrollListener();
25759
25582
  }
25760
- this.actionOnClick = () => {
25761
- this.exitInputMode();
25762
- };
25763
- };
25764
- /**
25765
- * Enters input mode to allow
25766
- * for text entry of numeric values.
25767
- * If on mobile, we focus a hidden input
25768
- * field so that the on screen keyboard
25769
- * is brought up. When tabbing using a
25770
- * keyboard, picker columns receive an outline
25771
- * to indicate they are focused. As a result,
25772
- * we should not focus the hidden input as it
25773
- * would cause the outline to go away, preventing
25774
- * users from having any visual indication of which
25775
- * column is focused.
25776
- */
25777
- this.enterInputMode = (columnEl, focusInput = true) => {
25778
- const { inputEl, el } = this;
25779
- if (!inputEl) {
25780
- return;
25583
+ else {
25584
+ this.isColumnVisible = false;
25585
+ if (this.destroyScrollListener) {
25586
+ this.destroyScrollListener();
25587
+ this.destroyScrollListener = undefined;
25588
+ }
25781
25589
  }
25590
+ };
25591
+ new IntersectionObserver(visibleCallback, { threshold: 0.001 }).observe(this.el);
25592
+ const parentEl = (this.parentEl = this.el.closest('ion-picker'));
25593
+ if (parentEl !== null) {
25594
+ // TODO(FW-2832): type
25595
+ parentEl.addEventListener('ionInputModeChange', (ev) => this.inputModeChange(ev));
25596
+ }
25597
+ }
25598
+ componentDidRender() {
25599
+ const { el, activeItem, isColumnVisible, value } = this;
25600
+ if (isColumnVisible && !activeItem) {
25601
+ const firstOption = el.querySelector('ion-picker-column-option');
25782
25602
  /**
25783
- * Only active input mode if there is at
25784
- * least one column that accepts numeric input.
25603
+ * If the picker column does not have an active item and the current value
25604
+ * does not match the first item in the picker column, that means
25605
+ * the value is out of bounds. In this case, we assign the value to the
25606
+ * first item to match the scroll position of the column.
25607
+ *
25785
25608
  */
25786
- const hasInputColumn = el.querySelector('ion-picker-column-internal.picker-column-numeric-input');
25787
- if (!hasInputColumn) {
25788
- return;
25609
+ if (firstOption !== null && firstOption.value !== value) {
25610
+ this.setValue(firstOption.value);
25789
25611
  }
25612
+ }
25613
+ }
25614
+ /** @internal */
25615
+ async scrollActiveItemIntoView() {
25616
+ const activeEl = this.activeItem;
25617
+ if (activeEl) {
25618
+ this.centerPickerItemInView(activeEl, false, false);
25619
+ }
25620
+ }
25621
+ /**
25622
+ * Sets the value prop and fires the ionChange event.
25623
+ * This is used when we need to fire ionChange from
25624
+ * user-generated events that cannot be caught with normal
25625
+ * input/change event listeners.
25626
+ * @internal
25627
+ */
25628
+ async setValue(value) {
25629
+ if (this.value === value) {
25630
+ return;
25631
+ }
25632
+ this.value = value;
25633
+ this.ionChange.emit({ value });
25634
+ }
25635
+ /**
25636
+ * Sets focus on the scrollable container within the picker column.
25637
+ * Use this method instead of the global `pickerColumn.focus()`.
25638
+ */
25639
+ async setFocus() {
25640
+ if (this.scrollEl) {
25641
+ this.scrollEl.focus();
25642
+ }
25643
+ }
25644
+ get activeItem() {
25645
+ const { value } = this;
25646
+ const options = Array.from(this.el.querySelectorAll('ion-picker-column-option'));
25647
+ return options.find((option) => {
25790
25648
  /**
25791
- * If columnEl is undefined then
25792
- * it is assumed that all numeric pickers
25793
- * are eligible for text entry.
25794
- * (i.e. hour and minute columns)
25795
- */
25796
- this.useInputMode = true;
25797
- this.inputModeColumn = columnEl;
25798
- /**
25799
- * Users with a keyboard and mouse can
25800
- * activate input mode where the input is
25801
- * focused as well as when it is not focused,
25802
- * so we need to make sure we clean up any
25803
- * old listeners.
25649
+ * If the whole picker column is disabled, the current value should appear active
25650
+ * If the current value item is specifically disabled, it should not appear active
25804
25651
  */
25805
- if (focusInput) {
25806
- if (this.destroyKeypressListener) {
25807
- this.destroyKeypressListener();
25808
- this.destroyKeypressListener = undefined;
25652
+ if (!this.disabled && option.disabled) {
25653
+ return false;
25654
+ }
25655
+ return option.value === value;
25656
+ });
25657
+ }
25658
+ render() {
25659
+ const { color, disabled: pickerDisabled, isActive, numericInput } = this;
25660
+ const mode = getIonMode$1(this);
25661
+ /**
25662
+ * exportparts is needed so ion-datetime can expose the parts
25663
+ * from two layers of shadow nesting. If this causes problems,
25664
+ * the attribute can be moved to datetime.tsx and set on every
25665
+ * instance of ion-picker-column there instead.
25666
+ * TODO FW-5580 remove exportparts
25667
+ */
25668
+ return (hAsync(Host, { exportparts: `${PICKER_ITEM_PART}, ${PICKER_ITEM_ACTIVE_PART}`, disabled: pickerDisabled, class: createColorClasses$1(color, {
25669
+ [mode]: true,
25670
+ ['picker-column-active']: isActive,
25671
+ ['picker-column-numeric-input']: numericInput,
25672
+ }) }, hAsync("slot", { name: "prefix" }), hAsync("div", { class: "picker-opts", tabindex: pickerDisabled ? undefined : 0, ref: (el) => {
25673
+ this.scrollEl = el;
25674
+ } }, 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"), hAsync("slot", null), 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")), hAsync("slot", { name: "suffix" })));
25675
+ }
25676
+ get el() { return getElement(this); }
25677
+ static get watchers() { return {
25678
+ "value": ["valueChange"]
25679
+ }; }
25680
+ static get style() { return {
25681
+ ios: pickerColumnIosCss$1,
25682
+ md: pickerColumnMdCss$1
25683
+ }; }
25684
+ static get cmpMeta() { return {
25685
+ "$flags$": 41,
25686
+ "$tagName$": "ion-picker-column",
25687
+ "$members$": {
25688
+ "disabled": [4],
25689
+ "items": [16],
25690
+ "value": [1032],
25691
+ "color": [513],
25692
+ "numericInput": [4, "numeric-input"],
25693
+ "isActive": [32],
25694
+ "scrollActiveItemIntoView": [64],
25695
+ "setValue": [64],
25696
+ "setFocus": [64]
25697
+ },
25698
+ "$listeners$": undefined,
25699
+ "$lazyBundleId$": "-",
25700
+ "$attrsToReflect$": [["color", "color"]]
25701
+ }; }
25702
+ }
25703
+ const PICKER_ITEM_ACTIVE_CLASS = 'option-active';
25704
+ const PICKER_ITEM_PART = 'wheel-item';
25705
+ const PICKER_ITEM_ACTIVE_PART = 'active';
25706
+
25707
+ 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}}";
25708
+
25709
+ 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)}";
25710
+
25711
+ /**
25712
+ * @internal
25713
+ */
25714
+ class PickerColumnCmp {
25715
+ constructor(hostRef) {
25716
+ registerInstance(this, hostRef);
25717
+ this.ionPickerColChange = createEvent(this, "ionPickerColChange", 7);
25718
+ this.optHeight = 0;
25719
+ this.rotateFactor = 0;
25720
+ this.scaleFactor = 1;
25721
+ this.velocity = 0;
25722
+ this.y = 0;
25723
+ this.noAnimate = true;
25724
+ // `colDidChange` is a flag that gets set when the column is changed
25725
+ // dynamically. When this flag is set, the column will refresh
25726
+ // after the component re-renders to incorporate the new column data.
25727
+ // This is necessary because `this.refresh` queries for the option elements,
25728
+ // so it needs to wait for the latest elements to be available in the DOM.
25729
+ // Ex: column is created with 3 options. User updates the column data
25730
+ // to have 5 options. The column will still think it only has 3 options.
25731
+ this.colDidChange = false;
25732
+ this.col = undefined;
25733
+ }
25734
+ colChanged() {
25735
+ this.colDidChange = true;
25736
+ }
25737
+ async connectedCallback() {
25738
+ let pickerRotateFactor = 0;
25739
+ let pickerScaleFactor = 0.81;
25740
+ const mode = getIonMode$1(this);
25741
+ if (mode === 'ios') {
25742
+ pickerRotateFactor = -0.46;
25743
+ pickerScaleFactor = 1;
25744
+ }
25745
+ this.rotateFactor = pickerRotateFactor;
25746
+ this.scaleFactor = pickerScaleFactor;
25747
+ this.gesture = (await Promise.resolve().then(function () { return index; })).createGesture({
25748
+ el: this.el,
25749
+ gestureName: 'picker-swipe',
25750
+ gesturePriority: 100,
25751
+ threshold: 0,
25752
+ passive: false,
25753
+ onStart: (ev) => this.onStart(ev),
25754
+ onMove: (ev) => this.onMove(ev),
25755
+ onEnd: (ev) => this.onEnd(ev),
25756
+ });
25757
+ this.gesture.enable();
25758
+ // Options have not been initialized yet
25759
+ // Animation must be disabled through the `noAnimate` flag
25760
+ // Otherwise, the options will render
25761
+ // at the top of the column and transition down
25762
+ this.tmrId = setTimeout(() => {
25763
+ this.noAnimate = false;
25764
+ // After initialization, `refresh()` will be called
25765
+ // At this point, animation will be enabled. The options will
25766
+ // animate as they are being selected.
25767
+ this.refresh(true);
25768
+ }, 250);
25769
+ }
25770
+ componentDidLoad() {
25771
+ this.onDomChange();
25772
+ }
25773
+ componentDidUpdate() {
25774
+ // Options may have changed since last update.
25775
+ if (this.colDidChange) {
25776
+ // Animation must be disabled through the `onDomChange` parameter.
25777
+ // Otherwise, the recently added options will render
25778
+ // at the top of the column and transition down
25779
+ this.onDomChange(true, false);
25780
+ this.colDidChange = false;
25781
+ }
25782
+ }
25783
+ disconnectedCallback() {
25784
+ if (this.rafId !== undefined)
25785
+ cancelAnimationFrame(this.rafId);
25786
+ if (this.tmrId)
25787
+ clearTimeout(this.tmrId);
25788
+ if (this.gesture) {
25789
+ this.gesture.destroy();
25790
+ this.gesture = undefined;
25791
+ }
25792
+ }
25793
+ emitColChange() {
25794
+ this.ionPickerColChange.emit(this.col);
25795
+ }
25796
+ setSelected(selectedIndex, duration) {
25797
+ // if there is a selected index, then figure out it's y position
25798
+ // if there isn't a selected index, then just use the top y position
25799
+ const y = selectedIndex > -1 ? -(selectedIndex * this.optHeight) : 0;
25800
+ this.velocity = 0;
25801
+ // set what y position we're at
25802
+ if (this.rafId !== undefined)
25803
+ cancelAnimationFrame(this.rafId);
25804
+ this.update(y, duration, true);
25805
+ this.emitColChange();
25806
+ }
25807
+ update(y, duration, saveY) {
25808
+ if (!this.optsEl) {
25809
+ return;
25810
+ }
25811
+ // ensure we've got a good round number :)
25812
+ let translateY = 0;
25813
+ let translateZ = 0;
25814
+ const { col, rotateFactor } = this;
25815
+ const prevSelected = col.selectedIndex;
25816
+ const selectedIndex = (col.selectedIndex = this.indexForY(-y));
25817
+ const durationStr = duration === 0 ? '' : duration + 'ms';
25818
+ const scaleStr = `scale(${this.scaleFactor})`;
25819
+ const children = this.optsEl.children;
25820
+ for (let i = 0; i < children.length; i++) {
25821
+ const button = children[i];
25822
+ const opt = col.options[i];
25823
+ const optOffset = i * this.optHeight + y;
25824
+ let transform = '';
25825
+ if (rotateFactor !== 0) {
25826
+ const rotateX = optOffset * rotateFactor;
25827
+ if (Math.abs(rotateX) <= 90) {
25828
+ translateY = 0;
25829
+ translateZ = 90;
25830
+ transform = `rotateX(${rotateX}deg) `;
25831
+ }
25832
+ else {
25833
+ translateY = -9999;
25809
25834
  }
25810
- inputEl.focus();
25811
25835
  }
25812
25836
  else {
25813
- el.addEventListener('keypress', this.onKeyPress);
25814
- this.destroyKeypressListener = () => {
25815
- el.removeEventListener('keypress', this.onKeyPress);
25816
- };
25837
+ translateZ = 0;
25838
+ translateY = optOffset;
25817
25839
  }
25818
- this.emitInputModeChange();
25819
- };
25820
- this.onKeyPress = (ev) => {
25821
- const { inputEl } = this;
25822
- if (!inputEl) {
25823
- return;
25840
+ const selected = selectedIndex === i;
25841
+ transform += `translate3d(0px,${translateY}px,${translateZ}px) `;
25842
+ if (this.scaleFactor !== 1 && !selected) {
25843
+ transform += scaleStr;
25824
25844
  }
25825
- const parsedValue = parseInt(ev.key, 10);
25826
- /**
25827
- * Only numbers should be allowed
25828
- */
25829
- if (!Number.isNaN(parsedValue)) {
25830
- inputEl.value += ev.key;
25831
- this.onInputChange();
25845
+ // Update transition duration
25846
+ if (this.noAnimate) {
25847
+ opt.duration = 0;
25848
+ button.style.transitionDuration = '';
25832
25849
  }
25833
- };
25834
- this.selectSingleColumn = () => {
25835
- const { inputEl, inputModeColumn, singleColumnSearchTimeout } = this;
25836
- if (!inputEl || !inputModeColumn) {
25837
- return;
25850
+ else if (duration !== opt.duration) {
25851
+ opt.duration = duration;
25852
+ button.style.transitionDuration = durationStr;
25838
25853
  }
25839
- const values = inputModeColumn.items.filter((item) => item.disabled !== true);
25840
- /**
25841
- * If users pause for a bit, the search
25842
- * value should be reset similar to how a
25843
- * <select> behaves. So typing "34", waiting,
25844
- * then typing "5" should select "05".
25845
- */
25846
- if (singleColumnSearchTimeout) {
25847
- clearTimeout(singleColumnSearchTimeout);
25854
+ // Update transform
25855
+ if (transform !== opt.transform) {
25856
+ opt.transform = transform;
25848
25857
  }
25849
- this.singleColumnSearchTimeout = setTimeout(() => {
25850
- inputEl.value = '';
25851
- this.singleColumnSearchTimeout = undefined;
25852
- }, 1000);
25858
+ button.style.transform = transform;
25853
25859
  /**
25854
- * For values that are longer than 2 digits long
25855
- * we should shift the value over 1 character
25856
- * to the left. So typing "456" would result in "56".
25857
- * TODO: If we want to support more than just
25858
- * time entry, we should update this value to be
25859
- * the max length of all of the picker items.
25860
+ * Ensure that the select column
25861
+ * item has the selected class
25860
25862
  */
25861
- if (inputEl.value.length >= 3) {
25862
- const startIndex = inputEl.value.length - 2;
25863
- const newString = inputEl.value.substring(startIndex);
25864
- inputEl.value = newString;
25865
- this.selectSingleColumn();
25866
- return;
25863
+ opt.selected = selected;
25864
+ if (selected) {
25865
+ button.classList.add(PICKER_OPT_SELECTED);
25867
25866
  }
25868
- /**
25869
- * Checking the value of the input gets priority
25870
- * first. For example, if the value of the input
25871
- * is "1" and we entered "2", then the complete value
25872
- * is "12" and we should select hour 12.
25873
- *
25874
- * Regex removes any leading zeros from values like "02",
25875
- * but it keeps a single zero if there are only zeros in the string.
25876
- * 0+(?=[1-9]) --> Match 1 or more zeros that are followed by 1-9
25877
- * 0+(?=0$) --> Match 1 or more zeros that must be followed by one 0 and end.
25878
- */
25879
- const findItemFromCompleteValue = values.find(({ text }) => {
25880
- const parsedText = text.replace(/^0+(?=[1-9])|0+(?=0$)/, '');
25881
- return parsedText === inputEl.value;
25882
- });
25883
- if (findItemFromCompleteValue) {
25884
- inputModeColumn.setValue(findItemFromCompleteValue.value);
25885
- return;
25867
+ else {
25868
+ button.classList.remove(PICKER_OPT_SELECTED);
25886
25869
  }
25887
- /**
25888
- * If we typed "56" to get minute 56, then typed "7",
25889
- * we should select "07" as "567" is not a valid minute.
25890
- */
25891
- if (inputEl.value.length === 2) {
25892
- const changedCharacter = inputEl.value.substring(inputEl.value.length - 1);
25893
- inputEl.value = changedCharacter;
25894
- this.selectSingleColumn();
25870
+ }
25871
+ this.col.prevSelected = prevSelected;
25872
+ if (saveY) {
25873
+ this.y = y;
25874
+ }
25875
+ if (this.lastIndex !== selectedIndex) {
25876
+ // have not set a last index yet
25877
+ hapticSelectionChanged();
25878
+ this.lastIndex = selectedIndex;
25879
+ }
25880
+ }
25881
+ decelerate() {
25882
+ if (this.velocity !== 0) {
25883
+ // still decelerating
25884
+ this.velocity *= DECELERATION_FRICTION;
25885
+ // do not let it go slower than a velocity of 1
25886
+ this.velocity = this.velocity > 0 ? Math.max(this.velocity, 1) : Math.min(this.velocity, -1);
25887
+ let y = this.y + this.velocity;
25888
+ if (y > this.minY) {
25889
+ // whoops, it's trying to scroll up farther than the options we have!
25890
+ y = this.minY;
25891
+ this.velocity = 0;
25895
25892
  }
25896
- };
25897
- /**
25898
- * Searches a list of column items for a particular
25899
- * value. This is currently used for numeric values.
25900
- * The zeroBehavior can be set to account for leading
25901
- * or trailing zeros when looking at the item text.
25902
- */
25903
- this.searchColumn = (colEl, value, zeroBehavior = 'start') => {
25904
- const behavior = zeroBehavior === 'start' ? /^0+/ : /0$/;
25905
- const item = colEl.items.find(({ text, disabled }) => disabled !== true && text.replace(behavior, '') === value);
25906
- if (item) {
25907
- colEl.setValue(item.value);
25893
+ else if (y < this.maxY) {
25894
+ // gahh, it's trying to scroll down farther than we can!
25895
+ y = this.maxY;
25896
+ this.velocity = 0;
25897
+ }
25898
+ this.update(y, 0, true);
25899
+ const notLockedIn = Math.round(y) % this.optHeight !== 0 || Math.abs(this.velocity) > 1;
25900
+ if (notLockedIn) {
25901
+ // isn't locked in yet, keep decelerating until it is
25902
+ this.rafId = requestAnimationFrame(() => this.decelerate());
25903
+ }
25904
+ else {
25905
+ this.velocity = 0;
25906
+ this.emitColChange();
25907
+ hapticSelectionEnd();
25908
+ }
25909
+ }
25910
+ else if (this.y % this.optHeight !== 0) {
25911
+ // needs to still get locked into a position so options line up
25912
+ const currentPos = Math.abs(this.y % this.optHeight);
25913
+ // create a velocity in the direction it needs to scroll
25914
+ this.velocity = currentPos > this.optHeight / 2 ? 1 : -1;
25915
+ this.decelerate();
25916
+ }
25917
+ }
25918
+ indexForY(y) {
25919
+ return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);
25920
+ }
25921
+ onStart(detail) {
25922
+ // We have to prevent default in order to block scrolling under the picker
25923
+ // but we DO NOT have to stop propagation, since we still want
25924
+ // some "click" events to capture
25925
+ if (detail.event.cancelable) {
25926
+ detail.event.preventDefault();
25927
+ }
25928
+ detail.event.stopPropagation();
25929
+ hapticSelectionStart();
25930
+ // reset everything
25931
+ if (this.rafId !== undefined)
25932
+ cancelAnimationFrame(this.rafId);
25933
+ const options = this.col.options;
25934
+ let minY = options.length - 1;
25935
+ let maxY = 0;
25936
+ for (let i = 0; i < options.length; i++) {
25937
+ if (!options[i].disabled) {
25938
+ minY = Math.min(minY, i);
25939
+ maxY = Math.max(maxY, i);
25940
+ }
25941
+ }
25942
+ this.minY = -(minY * this.optHeight);
25943
+ this.maxY = -(maxY * this.optHeight);
25944
+ }
25945
+ onMove(detail) {
25946
+ if (detail.event.cancelable) {
25947
+ detail.event.preventDefault();
25948
+ }
25949
+ detail.event.stopPropagation();
25950
+ // update the scroll position relative to pointer start position
25951
+ let y = this.y + detail.deltaY;
25952
+ if (y > this.minY) {
25953
+ // scrolling up higher than scroll area
25954
+ y = Math.pow(y, 0.8);
25955
+ this.bounceFrom = y;
25956
+ }
25957
+ else if (y < this.maxY) {
25958
+ // scrolling down below scroll area
25959
+ y += Math.pow(this.maxY - y, 0.9);
25960
+ this.bounceFrom = y;
25961
+ }
25962
+ else {
25963
+ this.bounceFrom = 0;
25964
+ }
25965
+ this.update(y, 0, false);
25966
+ }
25967
+ onEnd(detail) {
25968
+ if (this.bounceFrom > 0) {
25969
+ // bounce back up
25970
+ this.update(this.minY, 100, true);
25971
+ this.emitColChange();
25972
+ return;
25973
+ }
25974
+ else if (this.bounceFrom < 0) {
25975
+ // bounce back down
25976
+ this.update(this.maxY, 100, true);
25977
+ this.emitColChange();
25978
+ return;
25979
+ }
25980
+ this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);
25981
+ if (this.velocity === 0 && detail.deltaY === 0) {
25982
+ const opt = detail.event.target.closest('.picker-opt');
25983
+ if (opt === null || opt === void 0 ? void 0 : opt.hasAttribute('opt-index')) {
25984
+ this.setSelected(parseInt(opt.getAttribute('opt-index'), 10), TRANSITION_DURATION);
25908
25985
  }
25909
- };
25910
- this.selectMultiColumn = () => {
25911
- const { inputEl, el } = this;
25912
- if (!inputEl) {
25913
- return;
25986
+ }
25987
+ else {
25988
+ this.y += detail.deltaY;
25989
+ if (Math.abs(detail.velocityY) < 0.05) {
25990
+ const isScrollingUp = detail.deltaY > 0;
25991
+ const optHeightFraction = (Math.abs(this.y) % this.optHeight) / this.optHeight;
25992
+ if (isScrollingUp && optHeightFraction > 0.5) {
25993
+ this.velocity = Math.abs(this.velocity) * -1;
25994
+ }
25995
+ else if (!isScrollingUp && optHeightFraction <= 0.5) {
25996
+ this.velocity = Math.abs(this.velocity);
25997
+ }
25914
25998
  }
25915
- const numericPickers = Array.from(el.querySelectorAll('ion-picker-column-internal')).filter((col) => col.numericInput);
25916
- const firstColumn = numericPickers[0];
25917
- const lastColumn = numericPickers[1];
25918
- let value = inputEl.value;
25919
- let minuteValue;
25920
- switch (value.length) {
25921
- case 1:
25922
- this.searchColumn(firstColumn, value);
25923
- break;
25924
- case 2:
25925
- /**
25926
- * If the first character is `0` or `1` it is
25927
- * possible that users are trying to type `09`
25928
- * or `11` into the hour field, so we should look
25929
- * at that first.
25930
- */
25931
- const firstCharacter = inputEl.value.substring(0, 1);
25932
- value = firstCharacter === '0' || firstCharacter === '1' ? inputEl.value : firstCharacter;
25933
- this.searchColumn(firstColumn, value);
25934
- /**
25935
- * If only checked the first value,
25936
- * we can check the second value
25937
- * for a match in the minutes column
25938
- */
25939
- if (value.length === 1) {
25940
- minuteValue = inputEl.value.substring(inputEl.value.length - 1);
25941
- this.searchColumn(lastColumn, minuteValue, 'end');
25942
- }
25943
- break;
25944
- case 3:
25945
- /**
25946
- * If the first character is `0` or `1` it is
25947
- * possible that users are trying to type `09`
25948
- * or `11` into the hour field, so we should look
25949
- * at that first.
25950
- */
25951
- const firstCharacterAgain = inputEl.value.substring(0, 1);
25952
- value =
25953
- firstCharacterAgain === '0' || firstCharacterAgain === '1'
25954
- ? inputEl.value.substring(0, 2)
25955
- : firstCharacterAgain;
25956
- this.searchColumn(firstColumn, value);
25957
- /**
25958
- * If only checked the first value,
25959
- * we can check the second value
25960
- * for a match in the minutes column
25961
- */
25962
- minuteValue = value.length === 1 ? inputEl.value.substring(1) : inputEl.value.substring(2);
25963
- this.searchColumn(lastColumn, minuteValue, 'end');
25964
- break;
25965
- case 4:
25966
- /**
25967
- * If the first character is `0` or `1` it is
25968
- * possible that users are trying to type `09`
25969
- * or `11` into the hour field, so we should look
25970
- * at that first.
25971
- */
25972
- const firstCharacterAgainAgain = inputEl.value.substring(0, 1);
25973
- value =
25974
- firstCharacterAgainAgain === '0' || firstCharacterAgainAgain === '1'
25975
- ? inputEl.value.substring(0, 2)
25976
- : firstCharacterAgainAgain;
25977
- this.searchColumn(firstColumn, value);
25978
- /**
25979
- * If only checked the first value,
25980
- * we can check the second value
25981
- * for a match in the minutes column
25982
- */
25983
- const minuteValueAgain = value.length === 1
25984
- ? inputEl.value.substring(1, inputEl.value.length)
25985
- : inputEl.value.substring(2, inputEl.value.length);
25986
- this.searchColumn(lastColumn, minuteValueAgain, 'end');
25987
- break;
25988
- default:
25989
- const startIndex = inputEl.value.length - 4;
25990
- const newString = inputEl.value.substring(startIndex);
25991
- inputEl.value = newString;
25992
- this.selectMultiColumn();
25993
- break;
25999
+ this.decelerate();
26000
+ }
26001
+ }
26002
+ refresh(forceRefresh, animated) {
26003
+ var _a;
26004
+ let min = this.col.options.length - 1;
26005
+ let max = 0;
26006
+ const options = this.col.options;
26007
+ for (let i = 0; i < options.length; i++) {
26008
+ if (!options[i].disabled) {
26009
+ min = Math.min(min, i);
26010
+ max = Math.max(max, i);
25994
26011
  }
25995
- };
26012
+ }
25996
26013
  /**
25997
- * Searches the value of the active column
25998
- * to determine which value users are trying
25999
- * to select
26014
+ * Only update selected value if column has a
26015
+ * velocity of 0. If it does not, then the
26016
+ * column is animating might land on
26017
+ * a value different than the value at
26018
+ * selectedIndex
26000
26019
  */
26001
- this.onInputChange = () => {
26002
- const { useInputMode, inputEl, inputModeColumn } = this;
26003
- if (!useInputMode || !inputEl) {
26004
- return;
26005
- }
26006
- if (inputModeColumn) {
26007
- this.selectSingleColumn();
26008
- }
26009
- else {
26010
- this.selectMultiColumn();
26011
- }
26012
- };
26020
+ if (this.velocity !== 0) {
26021
+ return;
26022
+ }
26023
+ const selectedIndex = clamp(min, (_a = this.col.selectedIndex) !== null && _a !== void 0 ? _a : 0, max);
26024
+ if (this.col.prevSelected !== selectedIndex || forceRefresh) {
26025
+ const y = selectedIndex * this.optHeight * -1;
26026
+ const duration = animated ? TRANSITION_DURATION : 0;
26027
+ this.velocity = 0;
26028
+ this.update(y, duration, true);
26029
+ }
26030
+ }
26031
+ onDomChange(forceRefresh, animated) {
26032
+ const colEl = this.optsEl;
26033
+ if (colEl) {
26034
+ // DOM READ
26035
+ // We perfom a DOM read over a rendered item, this needs to happen after the first render or after the the column has changed
26036
+ this.optHeight = colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0;
26037
+ }
26038
+ this.refresh(forceRefresh, animated);
26039
+ }
26040
+ render() {
26041
+ const col = this.col;
26042
+ const mode = getIonMode$1(this);
26043
+ 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: {
26044
+ 'max-width': this.col.columnWidth,
26045
+ } }, 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))));
26046
+ }
26047
+ get el() { return getElement(this); }
26048
+ static get watchers() { return {
26049
+ "col": ["colChanged"]
26050
+ }; }
26051
+ static get style() { return {
26052
+ ios: pickerColumnIosCss,
26053
+ md: pickerColumnMdCss
26054
+ }; }
26055
+ static get cmpMeta() { return {
26056
+ "$flags$": 32,
26057
+ "$tagName$": "ion-picker-legacy-column",
26058
+ "$members$": {
26059
+ "col": [16]
26060
+ },
26061
+ "$listeners$": undefined,
26062
+ "$lazyBundleId$": "-",
26063
+ "$attrsToReflect$": []
26064
+ }; }
26065
+ }
26066
+ const PICKER_OPT_SELECTED = 'picker-opt-selected';
26067
+ const DECELERATION_FRICTION = 0.97;
26068
+ const MAX_PICKER_SPEED = 90;
26069
+ const TRANSITION_DURATION = 150;
26070
+
26071
+ const pickerColumnOptionIosCss = "/*!@button*/button.sc-ion-picker-column-option-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;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}/*!@:host(.option-disabled)*/.option-disabled.sc-ion-picker-column-option-ios-h{opacity:0.4}/*!@:host(.option-disabled) button*/.option-disabled.sc-ion-picker-column-option-ios-h button.sc-ion-picker-column-option-ios{cursor:default}";
26072
+
26073
+ const pickerColumnOptionMdCss = "/*!@button*/button.sc-ion-picker-column-option-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;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}/*!@:host(.option-disabled)*/.option-disabled.sc-ion-picker-column-option-md-h{opacity:0.4}/*!@:host(.option-disabled) button*/.option-disabled.sc-ion-picker-column-option-md-h button.sc-ion-picker-column-option-md{cursor:default}/*!@:host(.option-active)*/.option-active.sc-ion-picker-column-option-md-h{color:var(--ion-color-base)}";
26074
+
26075
+ class PickerColumnOption {
26076
+ constructor(hostRef) {
26077
+ registerInstance(this, hostRef);
26013
26078
  /**
26014
- * Emit ionInputModeChange. Picker columns
26015
- * listen for this event to determine whether
26016
- * or not their column is "active" for text input.
26079
+ * We keep track of the parent picker column
26080
+ * so we can update the value of it when
26081
+ * clicking an enable option.
26017
26082
  */
26018
- this.emitInputModeChange = () => {
26019
- const { useInputMode, inputModeColumn } = this;
26020
- this.ionInputModeChange.emit({
26021
- useInputMode,
26022
- inputModeColumn,
26023
- });
26024
- };
26083
+ this.pickerColumn = null;
26084
+ this.ariaLabel = null;
26085
+ this.disabled = false;
26086
+ this.value = undefined;
26087
+ this.color = 'primary';
26025
26088
  }
26026
26089
  /**
26027
- * When the picker is interacted with
26028
- * we need to prevent touchstart so other
26029
- * gestures do not fire. For example,
26030
- * scrolling on the wheel picker
26031
- * in ion-datetime should not cause
26032
- * a card modal to swipe to close.
26090
+ * The aria-label of the option has changed after the
26091
+ * first render and needs to be updated within the component.
26092
+ *
26093
+ * @param ariaLbl The new aria-label value.
26033
26094
  */
26034
- preventTouchStartPropagation(ev) {
26035
- ev.stopPropagation();
26095
+ onAriaLabelChange(ariaLbl) {
26096
+ this.ariaLabel = ariaLbl;
26036
26097
  }
26037
26098
  componentWillLoad() {
26038
- getElementRoot(this.el).addEventListener('focusin', this.onFocusIn);
26039
- getElementRoot(this.el).addEventListener('focusout', this.onFocusOut);
26099
+ const inheritedAttributes = inheritAttributes$1(this.el, ['aria-label']);
26100
+ /**
26101
+ * The initial value of `aria-label` needs to be set for
26102
+ * the first render.
26103
+
26104
+ */
26105
+ this.ariaLabel = inheritedAttributes['aria-label'] || null;
26106
+ }
26107
+ connectedCallback() {
26108
+ this.pickerColumn = this.el.closest('ion-picker-column');
26109
+ }
26110
+ disconnectedCallback() {
26111
+ this.pickerColumn = null;
26040
26112
  }
26041
26113
  /**
26042
- * @internal
26043
- * Exits text entry mode for the picker
26044
- * This method blurs the hidden input
26045
- * and cause the keyboard to dismiss.
26114
+ * The column options can load at any time
26115
+ * so the options needs to tell the
26116
+ * parent picker column when it is loaded
26117
+ * so the picker column can ensure it is
26118
+ * centered in the view.
26119
+ *
26120
+ * We intentionally run this for every
26121
+ * option. If we only ran this from
26122
+ * the selected option then if the newly
26123
+ * loaded options were not selected then
26124
+ * scrollActiveItemIntoView would not be called.
26046
26125
  */
26047
- async exitInputMode() {
26048
- const { inputEl, useInputMode } = this;
26049
- if (!useInputMode || !inputEl) {
26050
- return;
26126
+ componentDidLoad() {
26127
+ const { pickerColumn } = this;
26128
+ if (pickerColumn !== null) {
26129
+ pickerColumn.scrollActiveItemIntoView();
26051
26130
  }
26052
- this.useInputMode = false;
26053
- this.inputModeColumn = undefined;
26054
- inputEl.blur();
26055
- inputEl.value = '';
26056
- if (this.destroyKeypressListener) {
26057
- this.destroyKeypressListener();
26058
- this.destroyKeypressListener = undefined;
26131
+ }
26132
+ /**
26133
+ * When an option is clicked update the
26134
+ * parent picker column value. This
26135
+ * component will handle centering the option
26136
+ * in the column view.
26137
+ */
26138
+ onClick() {
26139
+ const { pickerColumn } = this;
26140
+ if (pickerColumn !== null) {
26141
+ pickerColumn.setValue(this.value);
26059
26142
  }
26060
- this.emitInputModeChange();
26061
26143
  }
26062
26144
  render() {
26063
- 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)));
26145
+ const { color, disabled, ariaLabel } = this;
26146
+ const mode = getIonMode$1(this);
26147
+ return (hAsync(Host, { class: createColorClasses$1(color, {
26148
+ [mode]: true,
26149
+ ['option-disabled']: disabled,
26150
+ }) }, hAsync("button", { tabindex: "-1", "aria-label": ariaLabel, disabled: disabled, onClick: () => this.onClick() }, hAsync("slot", null))));
26064
26151
  }
26065
26152
  get el() { return getElement(this); }
26153
+ static get watchers() { return {
26154
+ "aria-label": ["onAriaLabelChange"]
26155
+ }; }
26066
26156
  static get style() { return {
26067
- ios: pickerInternalIosCss,
26068
- md: pickerInternalMdCss
26157
+ ios: pickerColumnOptionIosCss,
26158
+ md: pickerColumnOptionMdCss
26069
26159
  }; }
26070
26160
  static get cmpMeta() { return {
26071
26161
  "$flags$": 41,
26072
- "$tagName$": "ion-picker-internal",
26162
+ "$tagName$": "ion-picker-column-option",
26073
26163
  "$members$": {
26074
- "exitInputMode": [64]
26164
+ "disabled": [4],
26165
+ "value": [8],
26166
+ "color": [513],
26167
+ "ariaLabel": [32]
26075
26168
  },
26076
- "$listeners$": [[1, "touchstart", "preventTouchStartPropagation"]],
26169
+ "$listeners$": undefined,
26077
26170
  "$lazyBundleId$": "-",
26078
- "$attrsToReflect$": []
26171
+ "$attrsToReflect$": [["color", "color"]]
26079
26172
  }; }
26080
26173
  }
26081
26174
 
@@ -33860,38 +33953,15 @@ class Textarea {
33860
33953
  if (!this.clearOnEdit) {
33861
33954
  return;
33862
33955
  }
33863
- /**
33864
- * The following keys do not modify the
33865
- * contents of the input. As a result, pressing
33866
- * them should not edit the textarea.
33867
- *
33868
- * We can't check to see if the value of the textarea
33869
- * was changed because we call checkClearOnEdit
33870
- * in a keydown listener, and the key has not yet
33871
- * been added to the textarea.
33872
- *
33873
- * Unlike ion-input, the "Enter" key does modify the
33874
- * textarea by adding a new line, so "Enter" is not
33875
- * included in the IGNORED_KEYS array.
33876
- */
33877
- const IGNORED_KEYS = ['Tab', 'Shift', 'Meta', 'Alt', 'Control'];
33878
- const pressedIgnoredKey = IGNORED_KEYS.includes(ev.key);
33879
33956
  /**
33880
33957
  * Clear the textarea if the control has not been previously cleared
33881
33958
  * during focus.
33882
33959
  */
33883
- if (!this.didTextareaClearOnEdit && this.hasValue() && !pressedIgnoredKey) {
33960
+ if (!this.didTextareaClearOnEdit && this.hasValue() && ev.key !== 'Tab') {
33884
33961
  this.value = '';
33885
33962
  this.emitInputChange(ev);
33886
33963
  }
33887
- /**
33888
- * Pressing an IGNORED_KEYS first and
33889
- * then an allowed key will cause the input to not
33890
- * be cleared.
33891
- */
33892
- if (!pressedIgnoredKey) {
33893
- this.didTextareaClearOnEdit = true;
33894
- }
33964
+ this.didTextareaClearOnEdit = true;
33895
33965
  }
33896
33966
  focusChange() {
33897
33967
  this.emitStyle();
@@ -35089,10 +35159,11 @@ registerComponents([
35089
35159
  Nav,
35090
35160
  NavLink,
35091
35161
  Note,
35162
+ Picker$1,
35092
35163
  Picker,
35164
+ PickerColumn,
35093
35165
  PickerColumnCmp,
35094
- PickerColumnInternal,
35095
- PickerInternal,
35166
+ PickerColumnOption,
35096
35167
  Popover,
35097
35168
  ProgressBar,
35098
35169
  Radio,