voyager-ionic-core 8.8.12 → 9.0.1

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 (812) hide show
  1. package/components/index.js +1 -1
  2. package/components/ion-accordion-group.js +1 -1
  3. package/components/ion-accordion.js +1 -1
  4. package/components/ion-action-sheet.js +1 -1
  5. package/components/ion-alert.js +1 -1
  6. package/components/ion-app.js +1 -1
  7. package/components/ion-avatar.js +1 -1
  8. package/components/ion-back-button.js +1 -1
  9. package/components/ion-backdrop.js +1 -1
  10. package/components/ion-badge.js +1 -1
  11. package/components/ion-breadcrumb.js +1 -1
  12. package/components/ion-breadcrumbs.js +1 -1
  13. package/components/ion-button.js +1 -1
  14. package/components/ion-buttons.js +1 -1
  15. package/components/ion-card-content.js +1 -1
  16. package/components/ion-card-header.js +1 -1
  17. package/components/ion-card-subtitle.js +1 -1
  18. package/components/ion-card-title.js +1 -1
  19. package/components/ion-card.js +1 -1
  20. package/components/ion-checkbox.js +1 -1
  21. package/components/ion-chip.js +1 -1
  22. package/components/ion-col.js +1 -1
  23. package/components/ion-content.js +1 -1
  24. package/components/ion-datetime-button.js +1 -1
  25. package/components/ion-datetime.js +1 -1
  26. package/components/ion-fab-button.js +1 -1
  27. package/components/ion-fab-list.js +1 -1
  28. package/components/ion-fab.js +1 -1
  29. package/components/ion-footer.js +1 -1
  30. package/components/ion-grid.js +1 -1
  31. package/components/ion-header.js +1 -1
  32. package/components/ion-icon.js +1 -1
  33. package/components/ion-img.js +1 -1
  34. package/components/ion-infinite-scroll-content.js +1 -1
  35. package/components/ion-infinite-scroll.js +1 -1
  36. package/components/ion-input-otp.js +1 -1
  37. package/components/ion-input-password-toggle.js +1 -1
  38. package/components/ion-input.js +1 -1
  39. package/components/ion-item-divider.js +1 -1
  40. package/components/ion-item-group.js +1 -1
  41. package/components/ion-item-option.js +1 -1
  42. package/components/ion-item-options.js +1 -1
  43. package/components/ion-item-sliding.js +1 -1
  44. package/components/ion-item.js +1 -1
  45. package/components/ion-label.js +1 -1
  46. package/components/ion-list-header.js +1 -1
  47. package/components/ion-list.js +1 -1
  48. package/components/ion-loading.js +1 -1
  49. package/components/ion-menu-button.js +1 -1
  50. package/components/ion-menu-toggle.js +1 -1
  51. package/components/ion-menu.js +1 -1
  52. package/components/ion-modal.js +1 -1
  53. package/components/ion-nav-link.js +1 -1
  54. package/components/ion-nav.js +1 -1
  55. package/components/ion-note.js +1 -1
  56. package/components/ion-picker-column-option.js +1 -1
  57. package/components/ion-picker-column.js +1 -1
  58. package/components/ion-picker.js +1 -1
  59. package/components/ion-popover.js +1 -1
  60. package/components/ion-progress-bar.js +1 -1
  61. package/components/ion-radio-group.js +1 -1
  62. package/components/ion-radio.js +1 -1
  63. package/components/ion-range.js +1 -1
  64. package/components/ion-refresher-content.js +1 -1
  65. package/components/ion-refresher.js +1 -1
  66. package/components/ion-reorder-group.js +1 -1
  67. package/components/ion-reorder.js +1 -1
  68. package/components/ion-ripple-effect.js +1 -1
  69. package/components/ion-route-redirect.js +1 -1
  70. package/components/ion-route.js +1 -1
  71. package/components/ion-router-link.js +1 -1
  72. package/components/ion-router-outlet.js +1 -1
  73. package/components/ion-router.js +1 -1
  74. package/components/ion-row.js +1 -1
  75. package/components/ion-searchbar.js +1 -1
  76. package/components/ion-segment-button.js +1 -1
  77. package/components/ion-segment-content.js +1 -1
  78. package/components/ion-segment-view.js +1 -1
  79. package/components/ion-segment.js +1 -1
  80. package/components/ion-select-modal.js +1 -1
  81. package/components/ion-select-option.js +1 -1
  82. package/components/ion-select-popover.js +1 -1
  83. package/components/ion-select.js +1 -1
  84. package/components/ion-skeleton-text.js +1 -1
  85. package/components/ion-spinner.js +1 -1
  86. package/components/ion-split-pane.js +1 -1
  87. package/components/ion-tab-bar.js +1 -1
  88. package/components/ion-tab-button.js +1 -1
  89. package/components/ion-tab.js +1 -1
  90. package/components/ion-tabs.js +1 -1
  91. package/components/ion-text.js +1 -1
  92. package/components/ion-textarea.js +1 -1
  93. package/components/ion-thumbnail.js +1 -1
  94. package/components/ion-title.js +1 -1
  95. package/components/ion-toast.js +1 -1
  96. package/components/ion-toggle.js +1 -1
  97. package/components/ion-toolbar.js +1 -1
  98. package/components/p-1sJ0ZDPe.js +4 -0
  99. package/components/p-5ldEpNdG.js +4 -0
  100. package/components/p-6ZLn6K5e.js +4 -0
  101. package/components/p-B4lxwJ8N.js +4 -0
  102. package/components/{p-rCa2eL0j.js → p-BF48Oc0v.js} +1 -1
  103. package/components/p-BJr2B5hZ.js +4 -0
  104. package/components/p-BMPN55of.js +4 -0
  105. package/components/p-BNBnVi_1.js +4 -0
  106. package/components/{p-C4t5ymfq.js → p-BQyuFxYc.js} +1 -1
  107. package/components/p-BSQPZ79H.js +4 -0
  108. package/components/p-BT9-hMMz.js +4 -0
  109. package/components/p-BWoa-cki.js +4 -0
  110. package/components/p-BYJRZKHa.js +4 -0
  111. package/components/p-B_gJaBk0.js +4 -0
  112. package/components/p-BgkOsq-d.js +4 -0
  113. package/components/p-BhamHSw3.js +4 -0
  114. package/components/p-Bi-it1EH.js +4 -0
  115. package/components/p-C-NbvXu4.js +4 -0
  116. package/components/p-C0493tbX.js +4 -0
  117. package/components/p-C09TXohi.js +4 -0
  118. package/components/p-C4VpVfrJ.js +4 -0
  119. package/components/p-CEW4RXZO.js +4 -0
  120. package/components/p-CG_zZq_I.js +4 -0
  121. package/components/{p-B9jFTlwE.js → p-CJgnoKcN.js} +1 -1
  122. package/components/p-CMRYD_yR.js +4 -0
  123. package/components/{p-lE_JGpHD.js → p-CNLioZ3B.js} +1 -1
  124. package/components/{p--JUspHvy.js → p-COO0eJOA.js} +1 -1
  125. package/components/p-CWAks_S_.js +4 -0
  126. package/{dist/ionic/p-KjNvRoEp.js → components/p-Cd1WaN-0.js} +1 -1
  127. package/components/p-CqbGBmqb.js +4 -0
  128. package/components/p-CrAKlX71.js +4 -0
  129. package/components/p-Cw6WocLJ.js +4 -0
  130. package/components/p-D0YpjgON.js +4 -0
  131. package/components/{p-BirPFsRD.js → p-D5w_FlVa.js} +1 -1
  132. package/components/p-D7-vHX0A.js +4 -0
  133. package/components/p-D7wDJdFn.js +4 -0
  134. package/components/p-DFLJvuRK.js +4 -0
  135. package/components/p-DGPjJNOU.js +4 -0
  136. package/components/p-DJR0R0e1.js +4 -0
  137. package/components/p-DL13ieTa.js +4 -0
  138. package/components/{p-DqLB8yFQ.js → p-DM1gJSMP.js} +1 -1
  139. package/components/p-DMBiAyOR.js +4 -0
  140. package/components/p-DWCzVL3Y.js +4 -0
  141. package/components/p-DZRZic9C.js +4 -0
  142. package/components/{p-DNQI6d-L.js → p-DhNuxvJH.js} +1 -1
  143. package/components/p-DiuOa1vw.js +4 -0
  144. package/components/p-Dj40C8gm.js +4 -0
  145. package/components/p-Djmz-ssp.js +4 -0
  146. package/components/p-DnBNYc7u.js +4 -0
  147. package/components/p-DngGb-NV.js +4 -0
  148. package/components/p-Dojwmvde.js +4 -0
  149. package/components/p-DwSXbQSz.js +4 -0
  150. package/components/p-DxhHlJln.js +4 -0
  151. package/components/{p-DqZAXv2t.js → p-GGbIHyEF.js} +1 -1
  152. package/components/{p-j5IxBIan.js → p-Hp8t4RMX.js} +1 -1
  153. package/components/p-M34T2gyX.js +4 -0
  154. package/components/p-TWw4e4sO.js +4 -0
  155. package/components/{p-Cfx4M1Bn.js → p-YjMkHuvH.js} +1 -1
  156. package/components/p-byZM6qHV.js +4 -0
  157. package/components/p-cEN43Ahr.js +4 -0
  158. package/components/p-qAXsfUff.js +4 -0
  159. package/dist/cjs/{animation-BJq0kcy2.js → animation-Kd1N7WTN.js} +4 -4
  160. package/dist/cjs/{app-globals-BlqrqKTN.js → app-globals-b1G4t26O.js} +1 -1
  161. package/dist/cjs/{button-active-0mPOKmV2.js → button-active-CQCFubJJ.js} +3 -3
  162. package/dist/cjs/config-CjUbvdPW.js +36 -0
  163. package/dist/cjs/dir-zwDPRE5K.js +30 -0
  164. package/dist/cjs/{data-DLTUw-KF.js → format-bHU8N1g5.js} +48 -562
  165. package/dist/cjs/{framework-delegate-BtICZDHr.js → framework-delegate-d-fWfeI6.js} +5 -7
  166. package/dist/cjs/{gesture-controller-dtqlP_q4.js → gesture-controller-CeJslptU.js} +1 -2
  167. package/dist/cjs/{haptic-ClPPQ_PS.js → haptic-Ch-X4gRx.js} +2 -3
  168. package/dist/cjs/{hardware-back-button-iUuF_76h.js → hardware-back-button-Bu4Dzw8l.js} +4 -4
  169. package/dist/cjs/{helpers-Cv23MFHM.js → helpers-7wzdhdeg.js} +15 -11
  170. package/dist/cjs/index-BbqUBe2T.js +429 -0
  171. package/dist/cjs/{index-D81eLYUM.js → index-C74Q3t6a.js} +3 -2
  172. package/dist/cjs/{index-BERfRao3.js → index-CQfEIyLK.js} +5 -5
  173. package/dist/cjs/{index-aC4x3Fk3.js → index-DFNrCX7M.js} +6 -7
  174. package/dist/cjs/{index-CAvQ7Tka.js → index-DRPqwSvU.js} +13 -30
  175. package/dist/cjs/{index-Ct7gcRif.js → index-DXoo08JC.js} +321 -26
  176. package/dist/cjs/{index-CIrkNXqJ.js → index-DtvKGwdh.js} +34 -2
  177. package/dist/cjs/{index-DqmRDbxg.js → index-wOmugbdg.js} +1 -1
  178. package/dist/cjs/index.cjs.js +19 -18
  179. package/dist/cjs/{input-shims-CFLg7uzj.js → input-shims-VJIiKBKv.js} +10 -11
  180. package/dist/cjs/input.utils-EHVE2RK_.js +35 -0
  181. package/dist/cjs/ion-accordion_2.cjs.entry.js +12 -12
  182. package/dist/cjs/ion-action-sheet.cjs.entry.js +92 -44
  183. package/dist/cjs/ion-alert.cjs.entry.js +144 -65
  184. package/dist/cjs/ion-app_8.cjs.entry.js +112 -40
  185. package/dist/cjs/ion-avatar_3.cjs.entry.js +4 -4
  186. package/dist/cjs/ion-back-button.cjs.entry.js +6 -5
  187. package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
  188. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +8 -7
  189. package/dist/cjs/ion-button_2.cjs.entry.js +18 -10
  190. package/dist/cjs/ion-card_5.cjs.entry.js +6 -5
  191. package/dist/cjs/ion-checkbox.cjs.entry.js +25 -12
  192. package/dist/cjs/ion-chip.cjs.entry.js +3 -3
  193. package/dist/cjs/ion-col_3.cjs.entry.js +10 -6
  194. package/dist/cjs/ion-datetime-button.cjs.entry.js +29 -30
  195. package/dist/cjs/{ion-datetime_3.cjs.entry.js → ion-datetime.cjs.entry.js} +773 -796
  196. package/dist/cjs/ion-fab_3.cjs.entry.js +93 -14
  197. package/dist/cjs/ion-img.cjs.entry.js +7 -4
  198. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +8 -6
  199. package/dist/cjs/ion-input-otp.cjs.entry.js +20 -29
  200. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +9 -10
  201. package/dist/cjs/ion-input.cjs.entry.js +58 -70
  202. package/dist/cjs/ion-item-option_3.cjs.entry.js +21 -24
  203. package/dist/cjs/ion-item_8.cjs.entry.js +117 -33
  204. package/dist/cjs/ion-loading.cjs.entry.js +29 -15
  205. package/dist/cjs/ion-menu_3.cjs.entry.js +23 -24
  206. package/dist/cjs/ion-modal.cjs.entry.js +307 -159
  207. package/dist/cjs/ion-nav_2.cjs.entry.js +30 -138
  208. package/dist/cjs/ion-picker-column-option.cjs.entry.js +8 -13
  209. package/dist/cjs/ion-picker-column.cjs.entry.js +218 -62
  210. package/dist/cjs/ion-picker.cjs.entry.js +4 -4
  211. package/dist/cjs/ion-popover.cjs.entry.js +50 -30
  212. package/dist/cjs/ion-progress-bar.cjs.entry.js +6 -5
  213. package/dist/cjs/ion-radio_2.cjs.entry.js +24 -14
  214. package/dist/cjs/ion-range.cjs.entry.js +30 -25
  215. package/dist/cjs/ion-refresher_2.cjs.entry.js +61 -26
  216. package/dist/cjs/ion-reorder_2.cjs.entry.js +10 -9
  217. package/dist/cjs/ion-ripple-effect.cjs.entry.js +3 -3
  218. package/dist/cjs/ion-route_4.cjs.entry.js +36 -30
  219. package/dist/cjs/ion-searchbar.cjs.entry.js +27 -22
  220. package/dist/cjs/ion-segment-content.cjs.entry.js +2 -2
  221. package/dist/cjs/ion-segment-view.cjs.entry.js +5 -6
  222. package/dist/cjs/ion-segment_2.cjs.entry.js +30 -26
  223. package/dist/cjs/ion-select-modal.cjs.entry.js +93 -38
  224. package/dist/cjs/ion-select_3.cjs.entry.js +495 -125
  225. package/dist/cjs/ion-spinner.cjs.entry.js +5 -6
  226. package/dist/cjs/ion-split-pane.cjs.entry.js +4 -4
  227. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +15 -12
  228. package/dist/cjs/ion-tab_2.cjs.entry.js +26 -19
  229. package/dist/cjs/ion-text.cjs.entry.js +5 -5
  230. package/dist/cjs/ion-textarea.cjs.entry.js +56 -65
  231. package/dist/cjs/ion-toast.cjs.entry.js +26 -21
  232. package/dist/cjs/ion-toggle.cjs.entry.js +36 -15
  233. package/dist/cjs/{ionic-global-B-cA6LkY.js → ionic-global-CYJNT-2P.js} +13 -8
  234. package/dist/cjs/ionic.cjs.js +5 -5
  235. package/dist/cjs/{ios.transition-BOSWOaiK.js → ios.transition-DYGiD6gM.js} +14 -17
  236. package/dist/cjs/item-multiple-inputs-Dv6qrMhm.js +38 -0
  237. package/dist/cjs/{keyboard-hHzlEQpk.js → keyboard-Cix5TVkD.js} +2 -2
  238. package/dist/cjs/{keyboard-UuAS4D_9.js → keyboard-cHxZlTyz.js} +2 -2
  239. package/dist/cjs/{keyboard-controller-GXBiBRKS.js → keyboard-controller-PtZoN2GS.js} +6 -6
  240. package/dist/cjs/loader.cjs.js +4 -4
  241. package/dist/cjs/{md.transition-B8-wBZqt.js → md.transition-CrSkaoz6.js} +8 -8
  242. package/dist/cjs/overlay-control-label-D2sdL2O8.js +50 -0
  243. package/dist/cjs/{overlays-TbKsuC-K.js → overlays-BR21NUIG.js} +120 -57
  244. package/dist/cjs/select-option-render-CrbLc-1j.js +123 -0
  245. package/dist/cjs/slot-mutation-controller-D6IjSEIh.js +397 -0
  246. package/dist/cjs/{status-tap-BXX8H8_Y.js → status-tap-CNP5eD1R.js} +4 -3
  247. package/dist/cjs/{swipe-back-CCMaNiP2.js → swipe-back-CSIJQfu5.js} +5 -5
  248. package/dist/cjs/{theme-CeDs6Hcv.js → theme-Bw0rpaNN.js} +6 -1
  249. package/dist/collection/collection-manifest.json +7 -11
  250. package/dist/collection/components/accordion/accordion.js +5 -6
  251. package/dist/collection/components/accordion-group/accordion-group.js +2 -2
  252. package/dist/collection/components/action-sheet/action-sheet.ios.css +228 -2
  253. package/dist/collection/components/action-sheet/action-sheet.js +77 -31
  254. package/dist/collection/components/action-sheet/action-sheet.md.css +174 -2
  255. package/dist/collection/components/alert/alert.ios.css +279 -10
  256. package/dist/collection/components/alert/alert.js +127 -50
  257. package/dist/collection/components/alert/alert.md.css +268 -20
  258. package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
  259. package/dist/collection/components/breadcrumbs/breadcrumbs.js +1 -1
  260. package/dist/collection/components/button/button.js +11 -4
  261. package/dist/collection/components/card/card.js +1 -1
  262. package/dist/collection/components/checkbox/checkbox.ios.css +18 -0
  263. package/dist/collection/components/checkbox/checkbox.js +19 -8
  264. package/dist/collection/components/checkbox/checkbox.md.css +18 -0
  265. package/dist/collection/components/col/col.js +7 -3
  266. package/dist/collection/components/content/content.js +56 -6
  267. package/dist/collection/components/datetime/datetime.ios.css +42 -2
  268. package/dist/collection/components/datetime/datetime.js +193 -79
  269. package/dist/collection/components/datetime/datetime.md.css +42 -1
  270. package/dist/collection/components/datetime/utils/data.js +13 -14
  271. package/dist/collection/components/datetime/utils/format.js +21 -11
  272. package/dist/collection/components/datetime/utils/manipulation.js +8 -8
  273. package/dist/collection/components/datetime/utils/parse.js +10 -10
  274. package/dist/collection/components/datetime/utils/state.js +8 -2
  275. package/dist/collection/components/datetime/utils/validate.js +4 -5
  276. package/dist/collection/components/datetime-button/datetime-button.ios.css +5 -0
  277. package/dist/collection/components/datetime-button/datetime-button.js +21 -25
  278. package/dist/collection/components/datetime-button/datetime-button.md.css +5 -0
  279. package/dist/collection/components/fab-button/fab-button.js +114 -10
  280. package/dist/collection/components/footer/footer.js +1 -1
  281. package/dist/collection/components/header/header.js +2 -2
  282. package/dist/collection/components/img/img.js +6 -1
  283. package/dist/collection/components/input/input.ios.css +57 -26
  284. package/dist/collection/components/input/input.js +51 -64
  285. package/dist/collection/components/input/input.md.css +79 -43
  286. package/dist/collection/components/input-otp/input-otp.js +15 -24
  287. package/dist/collection/components/input-password-toggle/input-password-toggle.js +5 -6
  288. package/dist/collection/components/item/item.ios.css +11 -0
  289. package/dist/collection/components/item/item.js +99 -15
  290. package/dist/collection/components/item/item.md.css +11 -0
  291. package/dist/collection/components/item-divider/item-divider.js +2 -2
  292. package/dist/collection/components/item-group/item-group.js +1 -1
  293. package/dist/collection/components/item-option/item-option.js +2 -2
  294. package/dist/collection/components/item-options/item-options.js +1 -1
  295. package/dist/collection/components/item-sliding/item-sliding.js +12 -16
  296. package/dist/collection/components/label/label.js +2 -2
  297. package/dist/collection/components/list/list.js +2 -2
  298. package/dist/collection/components/list-header/list-header.js +2 -2
  299. package/dist/collection/components/loading/loading.js +17 -5
  300. package/dist/collection/components/menu/menu.js +6 -8
  301. package/dist/collection/components/menu-button/menu-button.js +2 -2
  302. package/dist/collection/components/menu-toggle/menu-toggle.js +2 -2
  303. package/dist/collection/components/modal/animations/ios.enter.js +1 -1
  304. package/dist/collection/components/modal/animations/md.enter.js +1 -1
  305. package/dist/collection/components/modal/gestures/sheet.js +47 -32
  306. package/dist/collection/components/modal/gestures/swipe-to-close.js +23 -33
  307. package/dist/collection/components/modal/gestures/utils.js +17 -0
  308. package/dist/collection/components/modal/modal.ios.css +8 -0
  309. package/dist/collection/components/modal/modal.js +158 -65
  310. package/dist/collection/components/modal/modal.md.css +8 -0
  311. package/dist/collection/components/modal/safe-area-utils.js +39 -5
  312. package/dist/collection/components/nav/nav.js +24 -235
  313. package/dist/collection/components/nav-link/nav-link.js +1 -1
  314. package/dist/collection/components/note/note.js +2 -2
  315. package/dist/collection/components/picker/picker.js +1 -2
  316. package/dist/collection/components/picker-column/picker-column.css +3 -0
  317. package/dist/collection/components/picker-column/picker-column.js +212 -58
  318. package/dist/collection/components/picker-column-option/picker-column-option.js +3 -10
  319. package/dist/collection/components/picker-column-option/picker-column-option.md.css +6 -1
  320. package/dist/collection/components/popover/animations/ios.enter.js +1 -2
  321. package/dist/collection/components/popover/animations/md.enter.js +1 -2
  322. package/dist/collection/components/popover/popover.ios.css +15 -0
  323. package/dist/collection/components/popover/popover.js +32 -9
  324. package/dist/collection/components/popover/popover.md.css +15 -0
  325. package/dist/collection/components/popover/utils.js +4 -6
  326. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  327. package/dist/collection/components/radio/radio.ios.css +11 -15
  328. package/dist/collection/components/radio/radio.js +17 -9
  329. package/dist/collection/components/radio/radio.md.css +11 -11
  330. package/dist/collection/components/radio-group/radio-group.js +2 -2
  331. package/dist/collection/components/range/range.js +24 -19
  332. package/dist/collection/components/refresher/refresher.js +49 -16
  333. package/dist/collection/components/refresher-content/refresher-content.js +1 -1
  334. package/dist/collection/components/reorder/reorder.js +1 -1
  335. package/dist/collection/components/reorder-group/reorder-group.js +1 -1
  336. package/dist/collection/components/ripple-effect/ripple-effect.js +1 -1
  337. package/dist/collection/components/route/route.js +1 -1
  338. package/dist/collection/components/router/router.js +2 -6
  339. package/dist/collection/components/router/utils/dom.js +25 -7
  340. package/dist/collection/components/router/utils/matching.js +6 -9
  341. package/dist/collection/components/router/utils/parser.js +1 -1
  342. package/dist/collection/components/router/utils/path.js +0 -1
  343. package/dist/collection/components/router-link/router-link.js +2 -2
  344. package/dist/collection/components/router-outlet/router-outlet.js +49 -10
  345. package/dist/collection/components/row/row.js +1 -1
  346. package/dist/collection/components/searchbar/searchbar.js +25 -20
  347. package/dist/collection/components/segment/segment.js +9 -11
  348. package/dist/collection/components/segment-button/segment-button.js +15 -9
  349. package/dist/collection/components/segment-content/segment-content.js +1 -1
  350. package/dist/collection/components/segment-view/segment-view.js +3 -4
  351. package/dist/collection/components/select/select.ios.css +96 -69
  352. package/dist/collection/components/select/select.js +405 -91
  353. package/dist/collection/components/select/select.md.css +118 -85
  354. package/dist/collection/components/select-modal/select-modal.ios.css +218 -0
  355. package/dist/collection/components/select-modal/select-modal.js +80 -27
  356. package/dist/collection/components/select-modal/select-modal.md.css +164 -0
  357. package/dist/collection/components/select-option/select-option.js +67 -3
  358. package/dist/collection/components/select-popover/select-popover.ios.css +218 -0
  359. package/dist/collection/components/select-popover/select-popover.js +78 -26
  360. package/dist/collection/components/select-popover/select-popover.md.css +164 -0
  361. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
  362. package/dist/collection/components/spinner/spinner.js +2 -3
  363. package/dist/collection/components/split-pane/split-pane.js +2 -2
  364. package/dist/collection/components/tab/tab.js +20 -13
  365. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  366. package/dist/collection/components/tab-button/tab-button.js +6 -4
  367. package/dist/collection/components/tabs/tabs.js +2 -3
  368. package/dist/collection/components/text/text.js +2 -2
  369. package/dist/collection/components/textarea/textarea.ios.css +94 -62
  370. package/dist/collection/components/textarea/textarea.js +47 -57
  371. package/dist/collection/components/textarea/textarea.md.css +103 -77
  372. package/dist/collection/components/thumbnail/thumbnail.js +1 -1
  373. package/dist/collection/components/title/title.js +2 -2
  374. package/dist/collection/components/toast/toast.js +12 -9
  375. package/dist/collection/components/toggle/toggle.ios.css +12 -4
  376. package/dist/collection/components/toggle/toggle.js +27 -7
  377. package/dist/collection/components/toggle/toggle.md.css +42 -5
  378. package/dist/collection/components/toolbar/toolbar.js +7 -4
  379. package/dist/collection/global/config.js +3 -3
  380. package/dist/collection/global/ionic-global.js +8 -2
  381. package/dist/collection/index.js +1 -1
  382. package/dist/collection/utils/animation/animation.js +3 -3
  383. package/dist/collection/utils/config.js +5 -4
  384. package/dist/collection/utils/content/index.js +30 -0
  385. package/dist/collection/utils/focus-controller/index.js +1 -1
  386. package/dist/collection/utils/focus-trap.js +3 -3
  387. package/dist/collection/utils/forms/index.js +2 -0
  388. package/dist/collection/utils/forms/item-multiple-inputs.js +33 -0
  389. package/dist/collection/utils/forms/start-container-controller.js +132 -0
  390. package/dist/collection/utils/framework-delegate.js +4 -6
  391. package/dist/collection/utils/gesture/gesture-controller.js +1 -2
  392. package/dist/collection/utils/gesture/index.js +10 -2
  393. package/dist/collection/utils/gesture/listener.js +4 -27
  394. package/dist/collection/utils/hardware-back-button.js +3 -3
  395. package/dist/collection/utils/helpers.js +14 -10
  396. package/dist/collection/utils/input-shims/hacks/scroll-assist.js +4 -5
  397. package/dist/collection/utils/input-shims/hacks/scroll-data.js +1 -2
  398. package/dist/collection/utils/keyboard/keyboard-controller.js +5 -5
  399. package/dist/collection/utils/keyboard/keyboard.js +1 -1
  400. package/dist/collection/utils/logging/index.js +23 -4
  401. package/dist/collection/utils/menu-controller/index.js +1 -2
  402. package/dist/collection/utils/native/haptic.js +2 -3
  403. package/dist/collection/utils/native/keyboard.js +2 -2
  404. package/dist/collection/utils/native/status-bar.js +1 -1
  405. package/dist/collection/utils/overlay-control-label.js +45 -0
  406. package/dist/collection/utils/overlays.js +109 -47
  407. package/dist/collection/utils/platform.js +4 -5
  408. package/dist/collection/utils/rtl/dir.js +17 -7
  409. package/dist/collection/utils/sanitization/index.js +275 -20
  410. package/dist/collection/utils/select-option-render.js +118 -0
  411. package/dist/collection/utils/slot-mutation-controller.js +1 -2
  412. package/dist/collection/utils/test/late-props/late-props.js +69 -0
  413. package/dist/collection/utils/test/playwright/apply-keyboard-focus.js +25 -0
  414. package/dist/collection/utils/test/playwright/detach-reattach.js +23 -0
  415. package/dist/collection/utils/test/playwright/drag-element.js +14 -0
  416. package/dist/collection/utils/test/playwright/generator.js +3 -4
  417. package/dist/collection/utils/test/playwright/index.js +2 -0
  418. package/dist/collection/utils/test/playwright/page/event-spy.js +2 -4
  419. package/dist/collection/utils/test/playwright/page/utils/goto.js +4 -5
  420. package/dist/collection/utils/test/playwright/page/utils/set-content.js +1 -1
  421. package/dist/collection/utils/test/playwright/page/utils/set-ion-viewport.js +2 -3
  422. package/dist/collection/utils/test/press-keys.js +6 -16
  423. package/dist/collection/utils/theme.js +6 -1
  424. package/dist/collection/utils/transition/ios.transition.js +9 -13
  425. package/dist/collection/utils/transition/md.transition.js +3 -4
  426. package/dist/docs.json +972 -1402
  427. package/dist/esm/{animation-DLJpuoEz.js → animation-BFNVlYum.js} +4 -4
  428. package/dist/esm/{app-globals-D0C5S4hU.js → app-globals-BgX0BGL1.js} +1 -1
  429. package/dist/esm/{button-active-BSpTQmS9.js → button-active-BfOvDr3b.js} +3 -3
  430. package/dist/esm/config-DWCzVL3Y.js +32 -0
  431. package/dist/esm/dir-Dojwmvde.js +28 -0
  432. package/dist/esm/{data-DZI70dKr.js → format-DDFE9jM5.js} +41 -554
  433. package/dist/esm/{framework-delegate-FnPGymXL.js → framework-delegate-BwNhx9NR.js} +5 -7
  434. package/dist/esm/{gesture-controller-BTEOs1at.js → gesture-controller-B_gJaBk0.js} +1 -2
  435. package/dist/esm/{haptic-DzAMWJuk.js → haptic-Cq4UAeka.js} +2 -3
  436. package/dist/esm/{hardware-back-button-B93Gru0Y.js → hardware-back-button-DmkiRgOT.js} +4 -4
  437. package/dist/esm/{helpers-HEqiOzXb.js → helpers-BSmc0nst.js} +15 -11
  438. package/dist/esm/{index-CfgBF1SE.js → index-BmLuEdV7.js} +13 -30
  439. package/dist/esm/{index-Q6UPU0Ay.js → index-BuPaALjU.js} +6 -7
  440. package/dist/esm/{index-DV3sJJW8.js → index-BvabGprD.js} +2 -2
  441. package/dist/esm/{index-MEDq2S8l.js → index-C1b9CLFg.js} +33 -3
  442. package/dist/esm/{index-tcQvqkiX.js → index-C23AVPx9.js} +303 -26
  443. package/dist/esm/{index-BRHzoo00.js → index-CJln0gS3.js} +3 -2
  444. package/dist/esm/index-CqoUoxgG.js +423 -0
  445. package/dist/esm/{index-B_dQk_WE.js → index-DnA_7Bnx.js} +5 -5
  446. package/dist/esm/index.js +17 -15
  447. package/dist/esm/{input-shims-D10mwcw1.js → input-shims-Dqk-Ou25.js} +10 -11
  448. package/dist/esm/input.utils-rqoH22pW.js +33 -0
  449. package/dist/esm/ion-accordion_2.entry.js +12 -12
  450. package/dist/esm/ion-action-sheet.entry.js +92 -44
  451. package/dist/esm/ion-alert.entry.js +143 -64
  452. package/dist/esm/ion-app_8.entry.js +112 -40
  453. package/dist/esm/ion-avatar_3.entry.js +4 -4
  454. package/dist/esm/ion-back-button.entry.js +6 -5
  455. package/dist/esm/ion-backdrop.entry.js +2 -2
  456. package/dist/esm/ion-breadcrumb_2.entry.js +8 -7
  457. package/dist/esm/ion-button_2.entry.js +18 -10
  458. package/dist/esm/ion-card_5.entry.js +6 -5
  459. package/dist/esm/ion-checkbox.entry.js +25 -12
  460. package/dist/esm/ion-chip.entry.js +3 -3
  461. package/dist/esm/ion-col_3.entry.js +10 -6
  462. package/dist/esm/ion-datetime-button.entry.js +28 -29
  463. package/dist/esm/{ion-datetime_3.entry.js → ion-datetime.entry.js} +712 -733
  464. package/dist/esm/ion-fab_3.entry.js +93 -14
  465. package/dist/esm/ion-img.entry.js +7 -4
  466. package/dist/esm/ion-infinite-scroll_2.entry.js +7 -5
  467. package/dist/esm/ion-input-otp.entry.js +20 -29
  468. package/dist/esm/ion-input-password-toggle.entry.js +9 -10
  469. package/dist/esm/ion-input.entry.js +56 -68
  470. package/dist/esm/ion-item-option_3.entry.js +21 -24
  471. package/dist/esm/ion-item_8.entry.js +117 -33
  472. package/dist/esm/ion-loading.entry.js +28 -14
  473. package/dist/esm/ion-menu_3.entry.js +23 -24
  474. package/dist/esm/ion-modal.entry.js +295 -147
  475. package/dist/esm/ion-nav_2.entry.js +30 -138
  476. package/dist/esm/ion-picker-column-option.entry.js +8 -13
  477. package/dist/esm/ion-picker-column.entry.js +218 -62
  478. package/dist/esm/ion-picker.entry.js +4 -4
  479. package/dist/esm/ion-popover.entry.js +50 -30
  480. package/dist/esm/ion-progress-bar.entry.js +6 -5
  481. package/dist/esm/ion-radio_2.entry.js +24 -14
  482. package/dist/esm/ion-range.entry.js +30 -25
  483. package/dist/esm/ion-refresher_2.entry.js +59 -24
  484. package/dist/esm/ion-reorder_2.entry.js +10 -9
  485. package/dist/esm/ion-ripple-effect.entry.js +3 -3
  486. package/dist/esm/ion-route_4.entry.js +36 -30
  487. package/dist/esm/ion-searchbar.entry.js +27 -22
  488. package/dist/esm/ion-segment-content.entry.js +2 -2
  489. package/dist/esm/ion-segment-view.entry.js +5 -6
  490. package/dist/esm/ion-segment_2.entry.js +30 -26
  491. package/dist/esm/ion-select-modal.entry.js +93 -38
  492. package/dist/esm/ion-select_3.entry.js +495 -125
  493. package/dist/esm/ion-spinner.entry.js +5 -6
  494. package/dist/esm/ion-split-pane.entry.js +4 -4
  495. package/dist/esm/ion-tab-bar_2.entry.js +15 -12
  496. package/dist/esm/ion-tab_2.entry.js +26 -19
  497. package/dist/esm/ion-text.entry.js +5 -5
  498. package/dist/esm/ion-textarea.entry.js +55 -64
  499. package/dist/esm/ion-toast.entry.js +25 -20
  500. package/dist/esm/ion-toggle.entry.js +36 -15
  501. package/dist/esm/{ionic-global-Cp_eT4sZ.js → ionic-global-ZXjCXKH0.js} +13 -8
  502. package/dist/esm/ionic.js +6 -6
  503. package/dist/esm/{ios.transition-ClFrsIrS.js → ios.transition-CWAgfQ1r.js} +14 -17
  504. package/dist/esm/item-multiple-inputs-DZnIiOO_.js +36 -0
  505. package/dist/esm/{keyboard-ywgs5efA.js → keyboard-Cj8mLJeq.js} +2 -2
  506. package/dist/esm/{keyboard-CUw4ekVy.js → keyboard-DAF8GNJ9.js} +2 -2
  507. package/dist/esm/{keyboard-controller-BaaVITYt.js → keyboard-controller-DEwoa1ev.js} +6 -6
  508. package/dist/esm/loader.js +5 -5
  509. package/dist/esm/{md.transition-D0msQmzI.js → md.transition-ZuqDDdDW.js} +8 -8
  510. package/dist/esm/overlay-control-label-BSQPZ79H.js +47 -0
  511. package/dist/esm/{overlays-TbiM4mdr.js → overlays-DKE0DgvE.js} +119 -57
  512. package/dist/esm/select-option-render-1W6W9pbC.js +121 -0
  513. package/dist/esm/slot-mutation-controller-B5NpUZ-N.js +393 -0
  514. package/dist/esm/{status-tap-Kan2W7sh.js → status-tap-Cv9gb3ja.js} +4 -3
  515. package/dist/esm/{swipe-back-ZUWwA-KF.js → swipe-back-De5HlmeM.js} +5 -5
  516. package/dist/esm/{theme-DiVJyqlX.js → theme-byZM6qHV.js} +6 -1
  517. package/dist/html.html-data.json +58 -82
  518. package/dist/ionic/index.esm.js +1 -1
  519. package/dist/ionic/ionic.esm.js +1 -1
  520. package/dist/ionic/p-06c6b540.entry.js +4 -0
  521. package/dist/ionic/p-099b7f9f.entry.js +4 -0
  522. package/dist/ionic/p-0dcb7bb6.entry.js +4 -0
  523. package/dist/ionic/p-1347880c.entry.js +4 -0
  524. package/dist/ionic/p-191a651e.entry.js +4 -0
  525. package/dist/ionic/p-1f24cb24.entry.js +4 -0
  526. package/dist/ionic/p-271c3640.entry.js +4 -0
  527. package/dist/ionic/p-2c52fe3e.entry.js +4 -0
  528. package/dist/ionic/p-2ea4bb36.entry.js +4 -0
  529. package/dist/ionic/p-338a02e0.entry.js +4 -0
  530. package/dist/ionic/p-38b9375b.entry.js +4 -0
  531. package/dist/ionic/p-3bba83ee.entry.js +4 -0
  532. package/dist/ionic/p-4712a8a9.entry.js +4 -0
  533. package/dist/ionic/p-4c3e50f8.entry.js +4 -0
  534. package/dist/ionic/p-4e2fef42.entry.js +4 -0
  535. package/dist/ionic/p-54cbb0a7.entry.js +4 -0
  536. package/dist/ionic/{p-2bb2cb18.entry.js → p-561af487.entry.js} +1 -1
  537. package/dist/ionic/p-5906ea6f.entry.js +4 -0
  538. package/dist/ionic/p-5cc09b40.entry.js +4 -0
  539. package/dist/ionic/p-5d9094ac.entry.js +4 -0
  540. package/dist/ionic/p-612ea3b1.entry.js +4 -0
  541. package/dist/ionic/p-66f150ec.entry.js +4 -0
  542. package/dist/ionic/p-68cc89a6.entry.js +4 -0
  543. package/dist/ionic/{p-dfa8d673.entry.js → p-6e386853.entry.js} +1 -1
  544. package/dist/ionic/p-77c96e08.entry.js +4 -0
  545. package/dist/ionic/p-7bfeccb3.entry.js +4 -0
  546. package/dist/ionic/p-7e394cc3.entry.js +4 -0
  547. package/dist/ionic/{p-0fa9c382.entry.js → p-7fbb3319.entry.js} +1 -1
  548. package/dist/ionic/p-837db1b9.entry.js +4 -0
  549. package/dist/ionic/p-85599fe3.entry.js +4 -0
  550. package/dist/ionic/p-8b80d9f9.entry.js +4 -0
  551. package/dist/ionic/p-90f50a65.entry.js +4 -0
  552. package/dist/ionic/p-9595e305.entry.js +4 -0
  553. package/dist/ionic/p-9c5f2691.entry.js +4 -0
  554. package/dist/ionic/p-BMPN55of.js +4 -0
  555. package/dist/ionic/p-BSQPZ79H.js +4 -0
  556. package/dist/ionic/p-BY6BzzPF.js +4 -0
  557. package/dist/ionic/p-B_gJaBk0.js +4 -0
  558. package/dist/ionic/p-BaeKWZ-a.js +4 -0
  559. package/dist/ionic/p-Bd72UYI2.js +4 -0
  560. package/dist/ionic/p-BgOvhHy_.js +4 -0
  561. package/dist/ionic/p-BhamHSw3.js +4 -0
  562. package/dist/ionic/p-BijjLYjT.js +4 -0
  563. package/dist/ionic/{p-DV3sJJW8.js → p-BvabGprD.js} +1 -1
  564. package/dist/ionic/p-C23AVPx9.js +6 -0
  565. package/dist/ionic/p-C8XilMh0.js +4 -0
  566. package/dist/ionic/p-CER8qW8Y.js +4 -0
  567. package/dist/ionic/p-CFuOr1Tu.js +4 -0
  568. package/dist/ionic/p-CM5OBjTW.js +4 -0
  569. package/dist/ionic/p-CMZYmFb4.js +4 -0
  570. package/dist/ionic/p-CkxVYPtX.js +4 -0
  571. package/dist/ionic/p-CmXuiRT6.js +4 -0
  572. package/dist/ionic/p-D0YpjgON.js +4 -0
  573. package/dist/ionic/p-D4OrdtJf.js +4 -0
  574. package/dist/ionic/p-D5t_-oMk.js +4 -0
  575. package/dist/ionic/p-D6rHcCvc.js +4 -0
  576. package/dist/ionic/p-DLM95R4x.js +4 -0
  577. package/dist/ionic/p-DTxBioUO.js +4 -0
  578. package/dist/ionic/p-DWCzVL3Y.js +4 -0
  579. package/dist/ionic/p-DYUjHcuH.js +4 -0
  580. package/dist/ionic/p-DZ6Hmc-8.js +4 -0
  581. package/dist/ionic/p-D_gb-kdd.js +4 -0
  582. package/dist/ionic/p-DajLgJ4d.js +4 -0
  583. package/dist/ionic/p-Do3zTvCA.js +4 -0
  584. package/dist/ionic/p-Dojwmvde.js +4 -0
  585. package/dist/ionic/p-T71k3C35.js +4 -0
  586. package/dist/ionic/p-a1cc2861.entry.js +4 -0
  587. package/dist/ionic/p-a20a2ebe.entry.js +4 -0
  588. package/dist/ionic/p-a8ff2489.entry.js +4 -0
  589. package/dist/ionic/p-b3532b8d.entry.js +4 -0
  590. package/dist/ionic/p-b80c86c4.entry.js +4 -0
  591. package/dist/ionic/p-b9b4e85d.entry.js +4 -0
  592. package/dist/ionic/p-byZM6qHV.js +4 -0
  593. package/dist/ionic/p-c57fc396.entry.js +4 -0
  594. package/dist/ionic/{p-c6e49f3f.entry.js → p-ca1b8865.entry.js} +1 -1
  595. package/dist/ionic/p-cc4320d3.entry.js +4 -0
  596. package/dist/ionic/p-d6755739.entry.js +4 -0
  597. package/dist/ionic/p-d8c138d9.entry.js +4 -0
  598. package/dist/ionic/p-db449915.entry.js +4 -0
  599. package/dist/ionic/p-dd01be0a.entry.js +4 -0
  600. package/dist/ionic/p-ec00fd0d.entry.js +4 -0
  601. package/dist/ionic/p-ee09ac9d.entry.js +4 -0
  602. package/dist/ionic/{p-37e720da.entry.js → p-efc0cf82.entry.js} +1 -1
  603. package/dist/ionic/p-f0fb23c1.entry.js +4 -0
  604. package/dist/ionic/p-f83b3e0c.entry.js +4 -0
  605. package/dist/ionic/p-fU3rOYad.js +4 -0
  606. package/dist/ionic/p-zWf7R2xV.js +4 -0
  607. package/dist/types/components/action-sheet/action-sheet.d.ts +10 -0
  608. package/dist/types/components/alert/alert.d.ts +7 -0
  609. package/dist/types/components/checkbox/checkbox.d.ts +1 -0
  610. package/dist/types/components/content/content.d.ts +12 -0
  611. package/dist/types/components/datetime/datetime.d.ts +13 -1
  612. package/dist/types/components/fab-button/fab-button.d.ts +15 -0
  613. package/dist/types/components/img/img.d.ts +2 -0
  614. package/dist/types/components/input/input.d.ts +12 -6
  615. package/dist/types/components/item/item.d.ts +19 -0
  616. package/dist/types/components/modal/gestures/sheet.d.ts +1 -0
  617. package/dist/types/components/modal/gestures/utils.d.ts +11 -0
  618. package/dist/types/components/modal/modal-interface.d.ts +9 -0
  619. package/dist/types/components/modal/modal.d.ts +25 -7
  620. package/dist/types/components/modal/safe-area-utils.d.ts +6 -0
  621. package/dist/types/components/nav/nav-interface.d.ts +0 -1
  622. package/dist/types/components/nav/nav.d.ts +2 -22
  623. package/dist/types/components/picker-column/picker-column.d.ts +42 -0
  624. package/dist/types/components/radio/radio.d.ts +1 -0
  625. package/dist/types/components/range/range.d.ts +4 -1
  626. package/dist/types/components/refresher/refresher.d.ts +7 -0
  627. package/dist/types/components/route/route.d.ts +1 -1
  628. package/dist/types/components/router-outlet/router-outlet.d.ts +7 -0
  629. package/dist/types/components/searchbar/searchbar.d.ts +1 -1
  630. package/dist/types/components/select/select-interface.d.ts +31 -0
  631. package/dist/types/components/select/select.d.ts +30 -6
  632. package/dist/types/components/select-option/select-option.d.ts +42 -1
  633. package/dist/types/components/tab/tab.d.ts +1 -1
  634. package/dist/types/components/textarea/textarea.d.ts +12 -5
  635. package/dist/types/components/toggle/toggle.d.ts +1 -0
  636. package/dist/types/components.d.ts +94 -318
  637. package/dist/types/index.d.ts +1 -1
  638. package/dist/types/interface.d.ts +0 -1
  639. package/dist/types/stencil-public-runtime.d.ts +12 -0
  640. package/dist/types/utils/config.d.ts +1 -8
  641. package/dist/types/utils/content/index.d.ts +12 -0
  642. package/dist/types/utils/forms/index.d.ts +2 -0
  643. package/dist/types/utils/forms/item-multiple-inputs.d.ts +13 -0
  644. package/dist/types/utils/forms/start-container-controller.d.ts +34 -0
  645. package/dist/types/utils/helpers.d.ts +8 -5
  646. package/dist/types/utils/logging/index.d.ts +2 -1
  647. package/dist/types/utils/overlay-control-label.d.ts +32 -0
  648. package/dist/types/utils/overlays.d.ts +20 -9
  649. package/dist/types/utils/rtl/dir.d.ts +10 -4
  650. package/dist/types/utils/sanitization/index.d.ts +58 -2
  651. package/dist/types/utils/select-option-render.d.ts +53 -0
  652. package/dist/types/utils/test/playwright/apply-keyboard-focus.d.ts +16 -0
  653. package/dist/types/utils/test/playwright/detach-reattach.d.ts +13 -0
  654. package/dist/types/utils/test/playwright/index.d.ts +2 -0
  655. package/dist/types/utils/test/playwright/playwright-page.d.ts +1 -1
  656. package/dist/types/utils/test/playwright/testExpect.d.ts +1 -1
  657. package/hydrate/index.js +3341 -2197
  658. package/hydrate/index.mjs +3341 -2197
  659. package/loader/index.d.ts +1 -1
  660. package/package.json +61 -17
  661. package/components/ion-picker-legacy-column.d.ts +0 -11
  662. package/components/ion-picker-legacy-column.js +0 -4
  663. package/components/ion-picker-legacy.d.ts +0 -11
  664. package/components/ion-picker-legacy.js +0 -4
  665. package/components/p-0NRupjzW.js +0 -4
  666. package/components/p-5bE_Wz4Y.js +0 -4
  667. package/components/p-B60hm8Qv.js +0 -4
  668. package/components/p-BAYYcg3o.js +0 -4
  669. package/components/p-BLmJ0zRm.js +0 -4
  670. package/components/p-BSEgsdFI.js +0 -4
  671. package/components/p-BTEOs1at.js +0 -4
  672. package/components/p-BTPfOxsU.js +0 -4
  673. package/components/p-BT_5jSqG.js +0 -4
  674. package/components/p-Baq1XyAy.js +0 -4
  675. package/components/p-BjfgFSSR.js +0 -4
  676. package/components/p-BjoEPDW5.js +0 -4
  677. package/components/p-BnqQlm7c.js +0 -4
  678. package/components/p-BsPelv04.js +0 -4
  679. package/components/p-Bth-EzJ0.js +0 -4
  680. package/components/p-Bz0dSlXZ.js +0 -4
  681. package/components/p-C1aScSTo.js +0 -4
  682. package/components/p-C2lKgrXx.js +0 -4
  683. package/components/p-C53feagD.js +0 -4
  684. package/components/p-CHqRYvYm.js +0 -4
  685. package/components/p-CI3ncNZm.js +0 -4
  686. package/components/p-CSZf8_j0.js +0 -4
  687. package/components/p-CU5rbWAW.js +0 -4
  688. package/components/p-C_xFdyXe.js +0 -4
  689. package/components/p-Ciz1-FuE.js +0 -4
  690. package/components/p-Cl0B-RWe.js +0 -4
  691. package/components/p-CmR5uXej.js +0 -4
  692. package/components/p-CtWGkNnJ.js +0 -4
  693. package/components/p-CtukzcyX.js +0 -4
  694. package/components/p-D13Eaw-8.js +0 -4
  695. package/components/p-D5Ubpm7D.js +0 -4
  696. package/components/p-D6Ynv7Xh.js +0 -4
  697. package/components/p-D7bSXQD3.js +0 -4
  698. package/components/p-DDWp95gH.js +0 -4
  699. package/components/p-DIE4pXMl.js +0 -4
  700. package/components/p-DOFCbuQR.js +0 -4
  701. package/components/p-DiVJyqlX.js +0 -4
  702. package/components/p-DnL1c9_X.js +0 -4
  703. package/components/p-W5nO8mX_.js +0 -4
  704. package/components/p-W9CZ2mWX.js +0 -4
  705. package/components/p-XlSIJDJ-.js +0 -4
  706. package/components/p-cyNmxje6.js +0 -4
  707. package/components/p-dhLYXa7A.js +0 -4
  708. package/components/p-ijF0iCrA.js +0 -4
  709. package/components/p-k_E4tX5Z.js +0 -4
  710. package/components/p-nQi4oKcG.js +0 -4
  711. package/components/p-ryqmO0B-.js +0 -4
  712. package/dist/cjs/config-xninhj0J.js +0 -201
  713. package/dist/cjs/dir-Cn0z1rJH.js +0 -20
  714. package/dist/cjs/input.utils-DetjmtH2.js +0 -150
  715. package/dist/cjs/notch-controller-18PzRGXd.js +0 -155
  716. package/dist/collection/components/picker-legacy/animations/ios.enter.js +0 -27
  717. package/dist/collection/components/picker-legacy/animations/ios.leave.js +0 -23
  718. package/dist/collection/components/picker-legacy/picker-interface.js +0 -1
  719. package/dist/collection/components/picker-legacy/picker.ios.css +0 -300
  720. package/dist/collection/components/picker-legacy/picker.js +0 -890
  721. package/dist/collection/components/picker-legacy/picker.md.css +0 -287
  722. package/dist/collection/components/picker-legacy-column/picker-column.ios.css +0 -231
  723. package/dist/collection/components/picker-legacy-column/picker-column.js +0 -422
  724. package/dist/collection/components/picker-legacy-column/picker-column.md.css +0 -222
  725. package/dist/collection/components/picker-legacy-column/test/test.utils.js +0 -43
  726. package/dist/esm/config-DQCONYYp.js +0 -195
  727. package/dist/esm/dir-C53feagD.js +0 -18
  728. package/dist/esm/input.utils-Y6NgW8bw.js +0 -147
  729. package/dist/esm/notch-controller-DKDjU_O7.js +0 -153
  730. package/dist/ionic/p-00dbb17e.entry.js +0 -4
  731. package/dist/ionic/p-01f81ea5.entry.js +0 -4
  732. package/dist/ionic/p-06c232a4.entry.js +0 -4
  733. package/dist/ionic/p-0d005398.entry.js +0 -4
  734. package/dist/ionic/p-1ae21e4c.entry.js +0 -4
  735. package/dist/ionic/p-20b1a044.entry.js +0 -4
  736. package/dist/ionic/p-21eb76d5.entry.js +0 -4
  737. package/dist/ionic/p-2394a9a6.entry.js +0 -4
  738. package/dist/ionic/p-27d30585.entry.js +0 -4
  739. package/dist/ionic/p-2f55dc1a.entry.js +0 -4
  740. package/dist/ionic/p-30bf9737.entry.js +0 -4
  741. package/dist/ionic/p-3353c229.entry.js +0 -4
  742. package/dist/ionic/p-33704f20.entry.js +0 -4
  743. package/dist/ionic/p-390ca786.entry.js +0 -4
  744. package/dist/ionic/p-3a126bca.entry.js +0 -4
  745. package/dist/ionic/p-3a541154.entry.js +0 -4
  746. package/dist/ionic/p-3a7d1e91.entry.js +0 -4
  747. package/dist/ionic/p-3ae5f277.entry.js +0 -4
  748. package/dist/ionic/p-4745f534.entry.js +0 -4
  749. package/dist/ionic/p-4858af1f.entry.js +0 -4
  750. package/dist/ionic/p-4baa5b82.entry.js +0 -4
  751. package/dist/ionic/p-4dc1c33c.entry.js +0 -4
  752. package/dist/ionic/p-4e92a11f.entry.js +0 -4
  753. package/dist/ionic/p-50e1194a.entry.js +0 -4
  754. package/dist/ionic/p-5d1da0a2.entry.js +0 -4
  755. package/dist/ionic/p-75dc25ba.entry.js +0 -4
  756. package/dist/ionic/p-81ea5652.entry.js +0 -4
  757. package/dist/ionic/p-84d5ce05.entry.js +0 -4
  758. package/dist/ionic/p-874b4bd8.entry.js +0 -4
  759. package/dist/ionic/p-8c8eee7d.entry.js +0 -4
  760. package/dist/ionic/p-8eb8ee76.entry.js +0 -4
  761. package/dist/ionic/p-8fce95d5.entry.js +0 -4
  762. package/dist/ionic/p-94f2a736.entry.js +0 -4
  763. package/dist/ionic/p-9a65ac7f.entry.js +0 -4
  764. package/dist/ionic/p-9eeaBrnk.js +0 -4
  765. package/dist/ionic/p-9f1103ce.entry.js +0 -4
  766. package/dist/ionic/p-BGqMS-oh.js +0 -4
  767. package/dist/ionic/p-BTEOs1at.js +0 -4
  768. package/dist/ionic/p-BUFIpxKM.js +0 -4
  769. package/dist/ionic/p-C53feagD.js +0 -4
  770. package/dist/ionic/p-CFlfIb2g.js +0 -4
  771. package/dist/ionic/p-CKvCXMs9.js +0 -4
  772. package/dist/ionic/p-Cl0B-RWe.js +0 -4
  773. package/dist/ionic/p-CtWGkNnJ.js +0 -4
  774. package/dist/ionic/p-CwdymDLH.js +0 -4
  775. package/dist/ionic/p-Cx3IXROA.js +0 -4
  776. package/dist/ionic/p-D13Eaw-8.js +0 -4
  777. package/dist/ionic/p-DAAFkPFT.js +0 -4
  778. package/dist/ionic/p-DC3RagnA.js +0 -4
  779. package/dist/ionic/p-DIuEbVLu.js +0 -4
  780. package/dist/ionic/p-DSG2s2Eb.js +0 -4
  781. package/dist/ionic/p-Dfbt-q2k.js +0 -4
  782. package/dist/ionic/p-DiVJyqlX.js +0 -4
  783. package/dist/ionic/p-DoJvtrbw.js +0 -4
  784. package/dist/ionic/p-DzWaWHGc.js +0 -4
  785. package/dist/ionic/p-Nqf6uvGh.js +0 -4
  786. package/dist/ionic/p-SNAkTDfm.js +0 -4
  787. package/dist/ionic/p-VAemlbDS.js +0 -4
  788. package/dist/ionic/p-Wk5HzclC.js +0 -4
  789. package/dist/ionic/p-a21add2f.entry.js +0 -4
  790. package/dist/ionic/p-a3bdcae6.entry.js +0 -4
  791. package/dist/ionic/p-aa5d6b8f.entry.js +0 -4
  792. package/dist/ionic/p-c0fb8edd.entry.js +0 -4
  793. package/dist/ionic/p-c4d8641b.entry.js +0 -4
  794. package/dist/ionic/p-e0be05c5.entry.js +0 -4
  795. package/dist/ionic/p-e847a888.entry.js +0 -4
  796. package/dist/ionic/p-ec090e0a.entry.js +0 -4
  797. package/dist/ionic/p-ef4c3bee.entry.js +0 -4
  798. package/dist/ionic/p-fabcce6c.entry.js +0 -4
  799. package/dist/ionic/p-facfde02.entry.js +0 -4
  800. package/dist/ionic/p-fd7eebc4.entry.js +0 -4
  801. package/dist/ionic/p-mjKAFv89.js +0 -4
  802. package/dist/ionic/p-tcQvqkiX.js +0 -5
  803. package/dist/ionic/p-viFHDgRs.js +0 -4
  804. package/dist/ionic/p-xOfi7-Zn.js +0 -4
  805. package/dist/ionic/p-xWb6fgfq.js +0 -4
  806. package/dist/types/components/picker-legacy/animations/ios.enter.d.ts +0 -5
  807. package/dist/types/components/picker-legacy/animations/ios.leave.d.ts +0 -5
  808. package/dist/types/components/picker-legacy/picker-interface.d.ts +0 -52
  809. package/dist/types/components/picker-legacy/picker.d.ts +0 -158
  810. package/dist/types/components/picker-legacy-column/picker-column.d.ts +0 -46
  811. package/dist/types/components/picker-legacy-column/test/test.utils.d.ts +0 -9
  812. /package/components/{p-CO7fmmxt.js → p-LpMHEu3v.js} +0 -0
@@ -1,23 +1,541 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { j as printIonError, f as printIonWarning, r as registerInstance, c as createEvent, w as writeTask, h, d as Host, g as getElement } from './index-tcQvqkiX.js';
4
+ import { j as printIonError, f as printIonWarning, r as registerInstance, c as createEvent, w as writeTask, e as config, h, d as Host, g as getElement } from './index-C23AVPx9.js';
5
5
  import { startFocusVisible } from './focus-visible-BmVRXR1y.js';
6
- import { r as raf, g as getElementRoot, a as renderHiddenInput, e as clamp } from './helpers-HEqiOzXb.js';
7
- import { F as FOCUS_TRAP_DISABLE_CLASS, d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-TbiM4mdr.js';
8
- import { i as isRTL } from './dir-C53feagD.js';
9
- import { c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
10
- import { l as chevronDown, o as caretUpSharp, p as chevronForward, q as caretDownSharp, c as chevronBack } from './index-DV3sJJW8.js';
11
- import { b as getIonMode } from './ionic-global-Cp_eT4sZ.js';
12
- import { i as isBefore, a as isAfter, g as getPreviousMonth, b as getNextMonth, c as isSameDay, d as getDay, e as generateDayAriaLabel, v as validateParts, f as getPartsFromCalendarDay, h as getNextYear, j as getPreviousYear, k as getEndOfWeek, l as getStartOfWeek, m as getPreviousDay, n as getNextDay, o as getPreviousWeek, p as getNextWeek, q as parseMinParts, r as parseMaxParts, s as parseDate, w as warnIfValueOutOfBounds, t as parseAmPm, u as clampDate, x as convertToArrayOfNumbers, y as convertDataToISO, z as getToday, A as getClosestValidDate, B as generateMonths, C as getNumDaysInMonth, D as getCombinedDateColumnData, E as getMonthColumnData, F as getDayColumnData, G as getYearColumnData, H as isMonthFirstLocale, I as getTimeColumnsData, J as isLocaleDayPeriodRTL, K as calculateHourFromAMPM, L as getDaysOfWeek, M as getMonthAndYear, N as getDaysOfMonth, O as getHourCycle, P as getLocalizedTime, Q as getLocalizedDateTime, R as formatValue } from './data-DZI70dKr.js';
13
- import { c as createLockController } from './lock-controller-B-hirT0v.js';
14
- import { c as createAnimation } from './animation-DLJpuoEz.js';
15
- import { a as hapticSelectionChanged, h as hapticSelectionEnd, b as hapticSelectionStart } from './haptic-DzAMWJuk.js';
6
+ import { r as raf, g as getElementRoot, a as renderHiddenInput } from './helpers-BSmc0nst.js';
7
+ import { F as FOCUS_TRAP_DISABLE_CLASS } from './overlays-DKE0DgvE.js';
8
+ import { i as isRTL } from './dir-Dojwmvde.js';
9
+ import { c as createColorClasses } from './theme-byZM6qHV.js';
10
+ import { b as chevronDown, d as caretUpSharp, e as chevronForward, f as caretDownSharp, c as chevronBack } from './index-BvabGprD.js';
11
+ import { b as getIonMode } from './ionic-global-ZXjCXKH0.js';
12
+ import { r as removeDateTzOffset, g as getNextMonth, a as getPreviousMonth, b as getTodayLabel, c as getYear, d as getHourCycle, e as getInternalHourValue, f as getFormattedHour, h as addTimePadding, i as getLocalizedDayPeriod, j as isBefore, k as isSameDay, l as isAfter, m as is24Hour, n as getNumDaysInMonth, o as getDay, p as generateDayAriaLabel, v as validateParts, q as getPartsFromCalendarDay, s as getNextYear, t as getPreviousYear, u as getEndOfWeek, w as getStartOfWeek, x as getPreviousDay, y as getNextDay, z as getPreviousWeek, A as getNextWeek, B as parseMinParts, C as parseMaxParts, D as parseDate, E as warnIfValueOutOfBounds, F as parseAmPm, G as clampDate, H as convertToArrayOfNumbers, I as convertDataToISO, J as getClosestValidDate, K as isMonthFirstLocale, L as isLocaleDayPeriodRTL, M as calculateHourFromAMPM, N as getMonthAndYear, O as getLocalizedTime, P as getLocalizedDateTime, Q as formatValue } from './format-DDFE9jM5.js';
16
13
  import './index-ZjP4CjeZ.js';
17
- import './hardware-back-button-B93Gru0Y.js';
18
- import './framework-delegate-FnPGymXL.js';
19
- import './gesture-controller-BTEOs1at.js';
20
- import './capacitor-CFERIeaU.js';
14
+ import './hardware-back-button-DmkiRgOT.js';
15
+ import './framework-delegate-BwNhx9NR.js';
16
+ import './gesture-controller-B_gJaBk0.js';
17
+
18
+ /**
19
+ * Returns the current date as
20
+ * an ISO string in the user's
21
+ * time zone.
22
+ */
23
+ const getToday = () => {
24
+ /**
25
+ * ion-datetime intentionally does not
26
+ * parse time zones/do automatic time zone
27
+ * conversion when accepting user input.
28
+ * However when we get today's date string,
29
+ * we want it formatted relative to the user's
30
+ * time zone.
31
+ *
32
+ * When calling toISOString(), the browser
33
+ * will convert the date to UTC time by either adding
34
+ * or subtracting the time zone offset.
35
+ * To work around this, we need to either add
36
+ * or subtract the time zone offset to the Date
37
+ * object prior to calling toISOString().
38
+ * This allows us to get an ISO string
39
+ * that is in the user's time zone.
40
+ */
41
+ return removeDateTzOffset(new Date()).toISOString();
42
+ };
43
+ const minutes = [
44
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
45
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
46
+ ];
47
+ // h11 hour system uses 0-11. Midnight starts at 0:00am.
48
+ const hour11 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
49
+ // h12 hour system uses 0-12. Midnight starts at 12:00am.
50
+ const hour12 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
51
+ // h23 hour system uses 0-23. Midnight starts at 0:00.
52
+ const hour23 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
53
+ // h24 hour system uses 1-24. Midnight starts at 24:00.
54
+ const hour24 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0];
55
+ /**
56
+ * Given a locale and a mode,
57
+ * return an array with formatted days
58
+ * of the week. iOS should display days
59
+ * such as "Mon" or "Tue".
60
+ * MD should display days such as "M"
61
+ * or "T".
62
+ */
63
+ const getDaysOfWeek = (locale, mode, firstDayOfWeek = 0) => {
64
+ /**
65
+ * Nov 1st, 2020 starts on a Sunday.
66
+ * ion-datetime assumes weeks start on Sunday,
67
+ * but is configurable via `firstDayOfWeek`.
68
+ */
69
+ const weekdayFormat = mode === 'ios' ? 'short' : 'narrow';
70
+ const intl = new Intl.DateTimeFormat(locale, { weekday: weekdayFormat });
71
+ const startDate = new Date('11/01/2020');
72
+ const daysOfWeek = [];
73
+ /**
74
+ * For each day of the week,
75
+ * get the day name.
76
+ */
77
+ for (let i = firstDayOfWeek; i < firstDayOfWeek + 7; i++) {
78
+ const currentDate = new Date(startDate);
79
+ currentDate.setDate(currentDate.getDate() + i);
80
+ daysOfWeek.push(intl.format(currentDate));
81
+ }
82
+ return daysOfWeek;
83
+ };
84
+ /**
85
+ * Returns an array containing all of the
86
+ * days in a month for a given year. Values are
87
+ * aligned with a week calendar starting on
88
+ * the firstDayOfWeek value (Sunday by default)
89
+ * using null values.
90
+ */
91
+ const getDaysOfMonth = (month, year, firstDayOfWeek, showAdjacentDays = false) => {
92
+ const numDays = getNumDaysInMonth(month, year);
93
+ let previousNumDays; //previous month number of days
94
+ if (month === 1) {
95
+ // If the current month is January, the previous month should be December of the previous year.
96
+ previousNumDays = getNumDaysInMonth(12, year - 1);
97
+ }
98
+ else {
99
+ // Otherwise, the previous month should be the current month - 1 of the same year.
100
+ previousNumDays = getNumDaysInMonth(month - 1, year);
101
+ }
102
+ const firstOfMonth = new Date(`${month}/1/${year}`).getDay();
103
+ /**
104
+ * To get the first day of the month aligned on the correct
105
+ * day of the week, we need to determine how many "filler" days
106
+ * to generate. These filler days as empty/disabled buttons
107
+ * that fill the space of the days of the week before the first
108
+ * of the month.
109
+ *
110
+ * There are two cases here:
111
+ *
112
+ * 1. If firstOfMonth = 4, firstDayOfWeek = 0 then the offset
113
+ * is (4 - (0 + 1)) = 3. Since the offset loop goes from 0 to 3 inclusive,
114
+ * this will generate 4 filler days (0, 1, 2, 3), and then day of week 4 will have
115
+ * the first day of the month.
116
+ *
117
+ * 2. If firstOfMonth = 2, firstDayOfWeek = 4 then the offset
118
+ * is (6 - (4 - 2)) = 4. Since the offset loop goes from 0 to 4 inclusive,
119
+ * this will generate 5 filler days (0, 1, 2, 3, 4), and then day of week 5 will have
120
+ * the first day of the month.
121
+ */
122
+ const offset = firstOfMonth >= firstDayOfWeek ? firstOfMonth - (firstDayOfWeek + 1) : 6 - (firstDayOfWeek - firstOfMonth);
123
+ let days = [];
124
+ for (let i = 1; i <= numDays; i++) {
125
+ days.push({ day: i, dayOfWeek: (offset + i) % 7, isAdjacentDay: false });
126
+ }
127
+ if (showAdjacentDays) {
128
+ for (let i = 0; i <= offset; i++) {
129
+ // Using offset create previous month adjacent day, starting from last day
130
+ days = [{ day: previousNumDays - i, dayOfWeek: (previousNumDays - i) % 7, isAdjacentDay: true }, ...days];
131
+ }
132
+ // Calculate positiveOffset
133
+ // The calendar will display 42 days (6 rows of 7 columns)
134
+ // Knowing this the offset is 41 (we start at index 0)
135
+ // minus (the previous offset + the current month days)
136
+ const positiveOffset = 41 - (numDays + offset);
137
+ for (let i = 0; i < positiveOffset; i++) {
138
+ days.push({ day: i + 1, dayOfWeek: (numDays + offset + i) % 7, isAdjacentDay: true });
139
+ }
140
+ }
141
+ else {
142
+ for (let i = 0; i <= offset; i++) {
143
+ days = [{ day: null, dayOfWeek: null, isAdjacentDay: false }, ...days];
144
+ }
145
+ }
146
+ return days;
147
+ };
148
+ /**
149
+ * Returns an array of pre-defined hour
150
+ * values based on the provided hourCycle.
151
+ */
152
+ const getHourData = (hourCycle) => {
153
+ switch (hourCycle) {
154
+ case 'h11':
155
+ return hour11;
156
+ case 'h12':
157
+ return hour12;
158
+ case 'h23':
159
+ return hour23;
160
+ case 'h24':
161
+ return hour24;
162
+ default:
163
+ throw new Error(`Invalid hour cycle "${hourCycle}"`);
164
+ }
165
+ };
166
+ /**
167
+ * Given a local, reference datetime parts and option
168
+ * max/min bound datetime parts, calculate the acceptable
169
+ * hour and minute values according to the bounds and locale.
170
+ */
171
+ const generateTime = (locale, refParts, hourCycle = 'h12', minParts, maxParts, hourValues, minuteValues) => {
172
+ const computedHourCycle = getHourCycle(locale, hourCycle);
173
+ const use24Hour = is24Hour(computedHourCycle);
174
+ let processedHours = getHourData(computedHourCycle);
175
+ let processedMinutes = minutes;
176
+ let isAMAllowed = true;
177
+ let isPMAllowed = true;
178
+ if (hourValues) {
179
+ processedHours = processedHours.filter((hour) => hourValues.includes(hour));
180
+ }
181
+ if (minuteValues) {
182
+ processedMinutes = processedMinutes.filter((minute) => minuteValues.includes(minute));
183
+ }
184
+ if (minParts) {
185
+ /**
186
+ * If ref day is the same as the
187
+ * minimum allowed day, filter hour/minute
188
+ * values according to min hour and minute.
189
+ */
190
+ if (isSameDay(refParts, minParts)) {
191
+ /**
192
+ * Users may not always set the hour/minute for
193
+ * min value (i.e. 2021-06-02) so we should allow
194
+ * all hours/minutes in that case.
195
+ */
196
+ if (minParts.hour !== undefined) {
197
+ processedHours = processedHours.filter((hour) => {
198
+ const convertedHour = refParts.ampm === 'pm' ? (hour + 12) % 24 : hour;
199
+ return (use24Hour ? hour : convertedHour) >= minParts.hour;
200
+ });
201
+ isAMAllowed = minParts.hour < 13;
202
+ }
203
+ if (minParts.minute !== undefined) {
204
+ /**
205
+ * The minimum minute range should not be enforced when
206
+ * the hour is greater than the min hour.
207
+ *
208
+ * For example with a minimum range of 09:30, users
209
+ * should be able to select 10:00-10:29 and beyond.
210
+ */
211
+ let isPastMinHour = false;
212
+ if (minParts.hour !== undefined && refParts.hour !== undefined) {
213
+ if (refParts.hour > minParts.hour) {
214
+ isPastMinHour = true;
215
+ }
216
+ }
217
+ processedMinutes = processedMinutes.filter((minute) => {
218
+ if (isPastMinHour) {
219
+ return true;
220
+ }
221
+ return minute >= minParts.minute;
222
+ });
223
+ }
224
+ /**
225
+ * If ref day is before minimum
226
+ * day do not render any hours/minute values
227
+ */
228
+ }
229
+ else if (isBefore(refParts, minParts)) {
230
+ processedHours = [];
231
+ processedMinutes = [];
232
+ isAMAllowed = isPMAllowed = false;
233
+ }
234
+ }
235
+ if (maxParts) {
236
+ /**
237
+ * If ref day is the same as the
238
+ * maximum allowed day, filter hour/minute
239
+ * values according to max hour and minute.
240
+ */
241
+ if (isSameDay(refParts, maxParts)) {
242
+ /**
243
+ * Users may not always set the hour/minute for
244
+ * max value (i.e. 2021-06-02) so we should allow
245
+ * all hours/minutes in that case.
246
+ */
247
+ if (maxParts.hour !== undefined) {
248
+ processedHours = processedHours.filter((hour) => {
249
+ const convertedHour = refParts.ampm === 'pm' ? (hour + 12) % 24 : hour;
250
+ return (use24Hour ? hour : convertedHour) <= maxParts.hour;
251
+ });
252
+ isPMAllowed = maxParts.hour >= 12;
253
+ }
254
+ if (maxParts.minute !== undefined && refParts.hour === maxParts.hour) {
255
+ // The available minutes should only be filtered when the hour is the same as the max hour.
256
+ // For example if the max hour is 10:30 and the current hour is 10:00,
257
+ // users should be able to select 00-30 minutes.
258
+ // If the current hour is 09:00, users should be able to select 00-60 minutes.
259
+ processedMinutes = processedMinutes.filter((minute) => minute <= maxParts.minute);
260
+ }
261
+ /**
262
+ * If ref day is after minimum
263
+ * day do not render any hours/minute values
264
+ */
265
+ }
266
+ else if (isAfter(refParts, maxParts)) {
267
+ processedHours = [];
268
+ processedMinutes = [];
269
+ isAMAllowed = isPMAllowed = false;
270
+ }
271
+ }
272
+ return {
273
+ hours: processedHours,
274
+ minutes: processedMinutes,
275
+ am: isAMAllowed,
276
+ pm: isPMAllowed,
277
+ };
278
+ };
279
+ /**
280
+ * Given DatetimeParts, generate the previous,
281
+ * current, and and next months.
282
+ */
283
+ const generateMonths = (refParts, forcedDate) => {
284
+ const current = { month: refParts.month, year: refParts.year, day: refParts.day };
285
+ /**
286
+ * If we're forcing a month to appear, and it's different from the current month,
287
+ * ensure it appears by replacing the next or previous month as appropriate.
288
+ */
289
+ if (forcedDate !== undefined && (refParts.month !== forcedDate.month || refParts.year !== forcedDate.year)) {
290
+ const forced = { month: forcedDate.month, year: forcedDate.year, day: forcedDate.day };
291
+ const forcedMonthIsBefore = isBefore(forced, current);
292
+ return forcedMonthIsBefore
293
+ ? [forced, current, getNextMonth(refParts)]
294
+ : [getPreviousMonth(refParts), current, forced];
295
+ }
296
+ return [getPreviousMonth(refParts), current, getNextMonth(refParts)];
297
+ };
298
+ const getMonthColumnData = (locale, refParts, minParts, maxParts, monthValues, formatOptions = {
299
+ month: 'long',
300
+ }) => {
301
+ const { year } = refParts;
302
+ const months = [];
303
+ if (monthValues !== undefined) {
304
+ let processedMonths = monthValues;
305
+ if (maxParts?.month !== undefined) {
306
+ processedMonths = processedMonths.filter((month) => month <= maxParts.month);
307
+ }
308
+ if (minParts?.month !== undefined) {
309
+ processedMonths = processedMonths.filter((month) => month >= minParts.month);
310
+ }
311
+ processedMonths.forEach((processedMonth) => {
312
+ const date = new Date(`${processedMonth}/1/${year} GMT+0000`);
313
+ const monthString = new Intl.DateTimeFormat(locale, { ...formatOptions, timeZone: 'UTC' }).format(date);
314
+ months.push({ text: monthString, value: processedMonth });
315
+ });
316
+ }
317
+ else {
318
+ const maxMonth = maxParts && maxParts.year === year ? maxParts.month : 12;
319
+ const minMonth = minParts && minParts.year === year ? minParts.month : 1;
320
+ for (let i = minMonth; i <= maxMonth; i++) {
321
+ /**
322
+ *
323
+ * There is a bug on iOS 14 where
324
+ * Intl.DateTimeFormat takes into account
325
+ * the local timezone offset when formatting dates.
326
+ *
327
+ * Forcing the timezone to 'UTC' fixes the issue. However,
328
+ * we should keep this workaround as it is safer. In the event
329
+ * this breaks in another browser, we will not be impacted
330
+ * because all dates will be interpreted in UTC.
331
+ *
332
+ * Example:
333
+ * new Intl.DateTimeFormat('en-US', { month: 'long' }).format(new Date('Sat Apr 01 2006 00:00:00 GMT-0400 (EDT)')) // "March"
334
+ * new Intl.DateTimeFormat('en-US', { month: 'long', timeZone: 'UTC' }).format(new Date('Sat Apr 01 2006 00:00:00 GMT-0400 (EDT)')) // "April"
335
+ *
336
+ * In certain timezones, iOS 14 shows the wrong
337
+ * date for .toUTCString(). To combat this, we
338
+ * force all of the timezones to GMT+0000 (UTC).
339
+ *
340
+ * Example:
341
+ * Time Zone: Central European Standard Time
342
+ * new Date('1/1/1992').toUTCString() // "Tue, 31 Dec 1991 23:00:00 GMT"
343
+ * new Date('1/1/1992 GMT+0000').toUTCString() // "Wed, 01 Jan 1992 00:00:00 GMT"
344
+ */
345
+ const date = new Date(`${i}/1/${year} GMT+0000`);
346
+ const monthString = new Intl.DateTimeFormat(locale, { ...formatOptions, timeZone: 'UTC' }).format(date);
347
+ months.push({ text: monthString, value: i });
348
+ }
349
+ }
350
+ return months;
351
+ };
352
+ /**
353
+ * Returns information regarding
354
+ * selectable dates (i.e 1st, 2nd, 3rd, etc)
355
+ * within a reference month.
356
+ * @param locale The locale to format the date with
357
+ * @param refParts The reference month/year to generate dates for
358
+ * @param minParts The minimum bound on the date that can be returned
359
+ * @param maxParts The maximum bound on the date that can be returned
360
+ * @param dayValues The allowed date values
361
+ * @returns Date data to be used in ion-picker-column
362
+ */
363
+ const getDayColumnData = (locale, refParts, minParts, maxParts, dayValues, formatOptions = {
364
+ day: 'numeric',
365
+ }) => {
366
+ const { month, year } = refParts;
367
+ const days = [];
368
+ /**
369
+ * If we have max/min bounds that in the same
370
+ * month/year as the refParts, we should
371
+ * use the define day as the max/min day.
372
+ * Otherwise, fallback to the max/min days in a month.
373
+ */
374
+ const numDaysInMonth = getNumDaysInMonth(month, year);
375
+ const maxDay = maxParts?.day !== null && maxParts?.day !== undefined && maxParts.year === year && maxParts.month === month
376
+ ? maxParts.day
377
+ : numDaysInMonth;
378
+ const minDay = minParts?.day !== null && minParts?.day !== undefined && minParts.year === year && minParts.month === month
379
+ ? minParts.day
380
+ : 1;
381
+ if (dayValues !== undefined) {
382
+ let processedDays = dayValues;
383
+ processedDays = processedDays.filter((day) => day >= minDay && day <= maxDay);
384
+ processedDays.forEach((processedDay) => {
385
+ const date = new Date(`${month}/${processedDay}/${year} GMT+0000`);
386
+ const dayString = new Intl.DateTimeFormat(locale, { ...formatOptions, timeZone: 'UTC' }).format(date);
387
+ days.push({ text: dayString, value: processedDay });
388
+ });
389
+ }
390
+ else {
391
+ for (let i = minDay; i <= maxDay; i++) {
392
+ const date = new Date(`${month}/${i}/${year} GMT+0000`);
393
+ const dayString = new Intl.DateTimeFormat(locale, { ...formatOptions, timeZone: 'UTC' }).format(date);
394
+ days.push({ text: dayString, value: i });
395
+ }
396
+ }
397
+ return days;
398
+ };
399
+ const getYearColumnData = (locale, refParts, minParts, maxParts, yearValues) => {
400
+ let processedYears = [];
401
+ if (yearValues !== undefined) {
402
+ processedYears = yearValues;
403
+ if (maxParts?.year !== undefined) {
404
+ processedYears = processedYears.filter((year) => year <= maxParts.year);
405
+ }
406
+ if (minParts?.year !== undefined) {
407
+ processedYears = processedYears.filter((year) => year >= minParts.year);
408
+ }
409
+ }
410
+ else {
411
+ const { year } = refParts;
412
+ const maxYear = maxParts?.year ?? year;
413
+ const minYear = minParts?.year ?? year - 100;
414
+ for (let i = minYear; i <= maxYear; i++) {
415
+ processedYears.push(i);
416
+ }
417
+ }
418
+ return processedYears.map((year) => ({
419
+ text: getYear(locale, { year, month: refParts.month, day: refParts.day }),
420
+ value: year,
421
+ }));
422
+ };
423
+ /**
424
+ * Given a starting date and an upper bound,
425
+ * this functions returns an array of all
426
+ * month objects in that range.
427
+ */
428
+ const getAllMonthsInRange = (currentParts, maxParts) => {
429
+ if (currentParts.month === maxParts.month && currentParts.year === maxParts.year) {
430
+ return [currentParts];
431
+ }
432
+ return [currentParts, ...getAllMonthsInRange(getNextMonth(currentParts), maxParts)];
433
+ };
434
+ /**
435
+ * Creates and returns picker items
436
+ * that represent the days in a month.
437
+ * Example: "Thu, Jun 2"
438
+ */
439
+ const getCombinedDateColumnData = (locale, todayParts, minParts, maxParts, dayValues, monthValues) => {
440
+ let items = [];
441
+ let parts = [];
442
+ /**
443
+ * Get all month objects from the min date
444
+ * to the max date. Note: Do not use getMonthColumnData
445
+ * as that function only generates dates within a
446
+ * single year.
447
+ */
448
+ let months = getAllMonthsInRange(minParts, maxParts);
449
+ /**
450
+ * Filter out any disallowed month values.
451
+ */
452
+ if (monthValues) {
453
+ months = months.filter(({ month }) => monthValues.includes(month));
454
+ }
455
+ /**
456
+ * Get all of the days in the month.
457
+ * From there, generate an array where
458
+ * each item has the month, date, and day
459
+ * of work as the text.
460
+ */
461
+ months.forEach((monthObject) => {
462
+ const referenceMonth = { month: monthObject.month, day: null, year: monthObject.year };
463
+ const monthDays = getDayColumnData(locale, referenceMonth, minParts, maxParts, dayValues, {
464
+ month: 'short',
465
+ day: 'numeric',
466
+ weekday: 'short',
467
+ });
468
+ const dateParts = [];
469
+ const dateColumnItems = [];
470
+ monthDays.forEach((dayObject) => {
471
+ const isToday = isSameDay({ ...referenceMonth, day: dayObject.value }, todayParts);
472
+ /**
473
+ * Today's date should read as "Today" (localized)
474
+ * not the actual date string
475
+ */
476
+ dateColumnItems.push({
477
+ text: isToday ? getTodayLabel(locale) : dayObject.text,
478
+ value: `${referenceMonth.year}-${referenceMonth.month}-${dayObject.value}`,
479
+ });
480
+ /**
481
+ * When selecting a date in the wheel picker
482
+ * we need access to the raw datetime parts data.
483
+ * The picker column only accepts values of
484
+ * type string or number, so we need to return
485
+ * two sets of data: A data set to be passed
486
+ * to the picker column, and a data set to
487
+ * be used to reference the raw data when
488
+ * updating the picker column value.
489
+ */
490
+ dateParts.push({
491
+ month: referenceMonth.month,
492
+ year: referenceMonth.year,
493
+ day: dayObject.value,
494
+ });
495
+ });
496
+ parts = [...parts, ...dateParts];
497
+ items = [...items, ...dateColumnItems];
498
+ });
499
+ return {
500
+ parts,
501
+ items,
502
+ };
503
+ };
504
+ const getTimeColumnsData = (locale, refParts, hourCycle, minParts, maxParts, allowedHourValues, allowedMinuteValues) => {
505
+ const computedHourCycle = getHourCycle(locale, hourCycle);
506
+ const use24Hour = is24Hour(computedHourCycle);
507
+ const { hours, minutes, am, pm } = generateTime(locale, refParts, computedHourCycle, minParts, maxParts, allowedHourValues, allowedMinuteValues);
508
+ const hoursItems = hours.map((hour) => {
509
+ return {
510
+ text: getFormattedHour(hour, computedHourCycle),
511
+ value: getInternalHourValue(hour, use24Hour, refParts.ampm),
512
+ };
513
+ });
514
+ const minutesItems = minutes.map((minute) => {
515
+ return {
516
+ text: addTimePadding(minute),
517
+ value: minute,
518
+ };
519
+ });
520
+ const dayPeriodItems = [];
521
+ if (am && !use24Hour) {
522
+ dayPeriodItems.push({
523
+ text: getLocalizedDayPeriod(locale, 'am'),
524
+ value: 'am',
525
+ });
526
+ }
527
+ if (pm && !use24Hour) {
528
+ dayPeriodItems.push({
529
+ text: getLocalizedDayPeriod(locale, 'pm'),
530
+ value: 'pm',
531
+ });
532
+ }
533
+ return {
534
+ minutesData: minutesItems,
535
+ hoursData: hoursItems,
536
+ dayPeriodData: dayPeriodItems,
537
+ };
538
+ };
21
539
 
22
540
  const isYearDisabled = (refYear, minParts, maxParts) => {
23
541
  if (minParts && minParts.year > refYear) {
@@ -139,7 +657,10 @@ const isMonthDisabled = (refParts, { minParts, maxParts, }) => {
139
657
  * previous navigation button is disabled.
140
658
  */
141
659
  const isPrevMonthDisabled = (refParts, minParts, maxParts) => {
142
- const prevMonth = Object.assign(Object.assign({}, getPreviousMonth(refParts)), { day: null });
660
+ const prevMonth = {
661
+ ...getPreviousMonth(refParts),
662
+ day: null,
663
+ };
143
664
  return isMonthDisabled(prevMonth, {
144
665
  minParts,
145
666
  maxParts,
@@ -150,7 +671,10 @@ const isPrevMonthDisabled = (refParts, minParts, maxParts) => {
150
671
  * determine if the next navigation button is disabled.
151
672
  */
152
673
  const isNextMonthDisabled = (refParts, maxParts) => {
153
- const nextMonth = Object.assign(Object.assign({}, getNextMonth(refParts)), { day: null });
674
+ const nextMonth = {
675
+ ...getNextMonth(refParts),
676
+ day: null,
677
+ };
154
678
  return isMonthDisabled(nextMonth, {
155
679
  maxParts,
156
680
  });
@@ -193,11 +717,10 @@ const getHighlightStyles = (highlightedDates, dateIsoString, el) => {
193
717
  * confusion.
194
718
  */
195
719
  const warnIfTimeZoneProvided = (el, formatOptions) => {
196
- var _a, _b, _c, _d;
197
- if (((_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _a === void 0 ? void 0 : _a.timeZone) ||
198
- ((_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _b === void 0 ? void 0 : _b.timeZoneName) ||
199
- ((_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _c === void 0 ? void 0 : _c.timeZone) ||
200
- ((_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _d === void 0 ? void 0 : _d.timeZoneName)) {
720
+ if (formatOptions?.date?.timeZone ||
721
+ formatOptions?.date?.timeZoneName ||
722
+ formatOptions?.time?.timeZone ||
723
+ formatOptions?.time?.timeZoneName) {
201
724
  printIonWarning('[ion-datetime] - "timeZone" and "timeZoneName" are not supported in "formatOptions".', el);
202
725
  }
203
726
  };
@@ -229,9 +752,9 @@ const checkForPresentationFormatMismatch = (el, presentation, formatOptions) =>
229
752
  }
230
753
  };
231
754
 
232
- const datetimeIosCss = () => `:host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{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{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-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{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{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{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{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{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]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):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{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{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, var(--ion-background-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{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{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{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{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-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{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-light, #f4f5f8);--background-rgb:var(--ion-color-light-rgb, 244, 245, 248);--title-color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-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, var(--ion-background-color-step-200, #cccccc));font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}.calendar-month-year-toggle{-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{opacity:0.15}.calendar-month-year-toggle #toggle-wrapper{-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,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{-ms-flex-align:stretch;align-items:stretch;height:100%}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-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, var(--ion-text-color-step-700, #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{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{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{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-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{-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{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2);font-size:min(1.375rem, 35.2px)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3))}:host .datetime-time{-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{font-weight:600}:host .datetime-buttons{-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, var(--ion-background-color-step-200, #cccccc))}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons{width:100%}`;
755
+ const datetimeIosCss = () => `:host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{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{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons ion-button{--color:var(--ion-color-primary, #0054e9)}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-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{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{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{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{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{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]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):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{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{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, var(--ion-background-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{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-primary, #0054e9)}:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{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{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{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-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{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-light, #f4f5f8);--background-rgb:var(--ion-color-light-rgb, 244, 245, 248);--title-color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-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, var(--ion-background-color-step-200, #cccccc));font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}.calendar-month-year-toggle{-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{opacity:0.15}.calendar-month-year-toggle #toggle-wrapper{-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,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host(.ion-color) .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{-ms-flex-align:stretch;align-items:stretch;height:100%}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-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, var(--ion-text-color-step-700, #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{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{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{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-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{-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{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);font-size:min(1.375rem, 35.2px)}:host(.ion-color) .calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2)}:host .calendar-day.calendar-day-today{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-primary, #0054e9);font-weight:600}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-base)}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color) .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3))}:host .datetime-time{-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{font-weight:600}:host .datetime-buttons{-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, var(--ion-background-color-step-200, #cccccc))}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons{width:100%}`;
233
756
 
234
- const datetimeMdCss = () => `:host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{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{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-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{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{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{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{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{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]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):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{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{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, var(--ion-background-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{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{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{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{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-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{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #ffffff));--title-color:var(--ion-color-contrast)}:host .datetime-header{-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{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}.calendar-month-year-toggle{-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, var(--ion-text-color-step-350, #595959));z-index:1}.calendar-month-year-toggle.ion-focused::after{opacity:0.04}.calendar-month-year-toggle ion-ripple-effect{color:currentColor}@media (any-hover: hover){.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}:host .calendar-days-of-week{-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, var(--ion-text-color-step-500, gray));font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-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{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active,.calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host .datetime-time{-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{color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-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}`;
757
+ const datetimeMdCss = () => `:host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{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{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons ion-button{--color:var(--ion-color-primary, #0054e9)}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-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{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{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{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{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{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]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):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{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{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, var(--ion-background-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{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-primary, #0054e9)}:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{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{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{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-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{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #ffffff));--title-color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color){--title-color:var(--ion-color-contrast)}:host .datetime-header{-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-primary, #0054e9);color:var(--title-color)}:host(.ion-color) .datetime-header{background:var(--ion-color-base)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}.calendar-month-year-toggle{-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, var(--ion-text-color-step-350, #595959));z-index:1}.calendar-month-year-toggle.ion-focused::after{opacity:0.04}.calendar-month-year-toggle ion-ripple-effect{color:currentColor}@media (any-hover: hover){.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}:host .calendar-days-of-week{-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, var(--ion-text-color-step-500, gray));font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-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{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-primary, #0054e9);color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active,.calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-primary, #0054e9);background:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host .datetime-time{-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{color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-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}`;
235
758
 
236
759
  const Datetime = class {
237
760
  constructor(hostRef) {
@@ -248,6 +771,10 @@ const Datetime = class {
248
771
  * Set true only by `visibleCallback`. Lets `hiddenCallback` ignore the
249
772
  * synthetic "not intersecting" entry IntersectionObserver fires on
250
773
  * `observe()` when the host mounts offscreen.
774
+ *
775
+ * Don't reset this in `disconnectedCallback`. Overlays disconnect and
776
+ * reconnect the host without re-creating the observers, so a reset there
777
+ * makes `hiddenCallback` miss the dismissal.
251
778
  */
252
779
  this.hasBeenIntersecting = false;
253
780
  this.prevPresentation = null;
@@ -263,12 +790,6 @@ const Datetime = class {
263
790
  isAdjacentDay: false,
264
791
  };
265
792
  this.isTimePopoverOpen = false;
266
- /**
267
- * The color to use from your application's color palette.
268
- * Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
269
- * For more information on colors, see [theming](/docs/theming/basics).
270
- */
271
- this.color = 'primary';
272
793
  /**
273
794
  * The name of the control, which is submitted with the form data.
274
795
  */
@@ -407,9 +928,8 @@ const Datetime = class {
407
928
  * is selected.
408
929
  */
409
930
  this.getActivePartsWithFallback = () => {
410
- var _a;
411
931
  const { defaultParts } = this;
412
- return (_a = this.getActivePart()) !== null && _a !== void 0 ? _a : defaultParts;
932
+ return this.getActivePart() ?? defaultParts;
413
933
  };
414
934
  this.getActivePart = () => {
415
935
  const { activeParts } = this;
@@ -422,7 +942,9 @@ const Datetime = class {
422
942
  }
423
943
  };
424
944
  this.setWorkingParts = (parts) => {
425
- this.workingParts = Object.assign({}, parts);
945
+ this.workingParts = {
946
+ ...parts,
947
+ };
426
948
  };
427
949
  this.setActiveParts = (parts, removeDate = false) => {
428
950
  /** if the datetime component is in readonly mode,
@@ -455,7 +977,9 @@ const Datetime = class {
455
977
  }
456
978
  }
457
979
  else {
458
- this.activeParts = Object.assign({}, validatedParts);
980
+ this.activeParts = {
981
+ ...validatedParts,
982
+ };
459
983
  }
460
984
  const hasSlottedButtons = this.el.querySelector('[slot="buttons"]') !== null;
461
985
  if (hasSlottedButtons || this.showDefaultButtons) {
@@ -481,7 +1005,6 @@ const Datetime = class {
481
1005
  * Tab should jump between bodies of selectable content.
482
1006
  */
483
1007
  const checkCalendarBodyFocus = (ev) => {
484
- var _a;
485
1008
  const record = ev[0];
486
1009
  /**
487
1010
  * If calendar body was already focused
@@ -489,7 +1012,7 @@ const Datetime = class {
489
1012
  * if not currently focused, we should not re-focus
490
1013
  * the inner day.
491
1014
  */
492
- if (((_a = record.oldValue) === null || _a === void 0 ? void 0 : _a.includes('ion-focused')) || !calendarBodyRef.classList.contains('ion-focused')) {
1015
+ if (record.oldValue?.includes('ion-focused') || !calendarBodyRef.classList.contains('ion-focused')) {
493
1016
  return;
494
1017
  }
495
1018
  this.focusWorkingDay(currentMonth);
@@ -497,7 +1020,7 @@ const Datetime = class {
497
1020
  const mo = new MutationObserver(checkCalendarBodyFocus);
498
1021
  mo.observe(calendarBodyRef, { attributeFilter: ['class'], attributeOldValue: true });
499
1022
  this.destroyKeyboardMO = () => {
500
- mo === null || mo === void 0 ? void 0 : mo.disconnect();
1023
+ mo?.disconnect();
501
1024
  };
502
1025
  /**
503
1026
  * We must use keydown not keyup as we want
@@ -559,7 +1082,10 @@ const Datetime = class {
559
1082
  if (isDayDisabled(partsToFocus, this.minParts, this.maxParts)) {
560
1083
  return;
561
1084
  }
562
- this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), partsToFocus));
1085
+ this.setWorkingParts({
1086
+ ...this.workingParts,
1087
+ ...partsToFocus,
1088
+ });
563
1089
  /**
564
1090
  * Give view a chance to re-render
565
1091
  * then move focus to the new working day
@@ -710,8 +1236,8 @@ const Datetime = class {
710
1236
  return;
711
1237
  const { month, day, year } = newDate;
712
1238
  if (isMonthDisabled({ month, year, day: null }, {
713
- minParts: Object.assign(Object.assign({}, this.minParts), { day: null }),
714
- maxParts: Object.assign(Object.assign({}, this.maxParts), { day: null }),
1239
+ minParts: { ...this.minParts, day: null },
1240
+ maxParts: { ...this.maxParts, day: null },
715
1241
  })) {
716
1242
  return;
717
1243
  }
@@ -731,8 +1257,12 @@ const Datetime = class {
731
1257
  * if we did not do this.
732
1258
  */
733
1259
  writeTask(() => {
734
- var _a;
735
- this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), { month, day: day, year }));
1260
+ this.setWorkingParts({
1261
+ ...this.workingParts,
1262
+ month,
1263
+ day: day,
1264
+ year,
1265
+ });
736
1266
  calendarBodyRef.scrollLeft = workingMonth.clientWidth * (isRTL(this.el) ? -1 : 1);
737
1267
  calendarBodyRef.style.removeProperty('overflow');
738
1268
  if (this.resolveForceDateScrolling) {
@@ -740,7 +1270,7 @@ const Datetime = class {
740
1270
  }
741
1271
  const activeEl = this.el.shadowRoot.activeElement;
742
1272
  if (activeEl && activeEl.classList.contains('calendar-day')) {
743
- (_a = activeEl.closest('.calendar-body')) === null || _a === void 0 ? void 0 : _a.focus();
1273
+ activeEl.closest('.calendar-body')?.focus();
744
1274
  }
745
1275
  });
746
1276
  };
@@ -969,10 +1499,11 @@ const Datetime = class {
969
1499
  return;
970
1500
  }
971
1501
  const left = nextMonth.offsetWidth * 2;
1502
+ const scrollMode = config.getBoolean('animated', true) ? 'smooth' : 'instant';
972
1503
  calendarBodyRef.scrollTo({
973
1504
  top: 0,
974
1505
  left: left * (isRTL(this.el) ? -1 : 1),
975
- behavior: 'smooth',
1506
+ behavior: scrollMode,
976
1507
  });
977
1508
  };
978
1509
  this.prevMonth = () => {
@@ -985,10 +1516,11 @@ const Datetime = class {
985
1516
  return;
986
1517
  }
987
1518
  const left = prevMonth.offsetWidth * 2;
1519
+ const scrollMode = config.getBoolean('animated', true) ? 'smooth' : 'instant';
988
1520
  calendarBodyRef.scrollTo({
989
1521
  top: 0,
990
1522
  left: left * (isRTL(this.el) ? 1 : -1),
991
- behavior: 'smooth',
1523
+ behavior: scrollMode,
992
1524
  });
993
1525
  };
994
1526
  this.toggleMonthAndYearView = () => {
@@ -1103,6 +1635,16 @@ const Datetime = class {
1103
1635
  this.closeParentOverlay(CANCEL_ROLE);
1104
1636
  }
1105
1637
  }
1638
+ /**
1639
+ * Returns the default parts the datetime falls back to when no value is set:
1640
+ * today's date and time snapped to the closest value allowed by the
1641
+ * component's constraints (`min`, `max`, and the `*Values` props).
1642
+ *
1643
+ * @internal
1644
+ */
1645
+ async getDefaultPart() {
1646
+ return this.defaultParts;
1647
+ }
1106
1648
  get isCalendarPicker() {
1107
1649
  const { presentation } = this;
1108
1650
  return presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
@@ -1119,7 +1661,6 @@ const Datetime = class {
1119
1661
  this.clearFocusVisible = undefined;
1120
1662
  }
1121
1663
  this.loadTimeoutCleanup();
1122
- this.hasBeenIntersecting = false;
1123
1664
  }
1124
1665
  initializeListeners() {
1125
1666
  this.initializeCalendarListener();
@@ -1149,7 +1690,7 @@ const Datetime = class {
1149
1690
  * could cause the datetime to start at a visibility of 0, erroneously
1150
1691
  * triggering the `hiddenIO` observer below.
1151
1692
  */
1152
- raf(() => visibleIO === null || visibleIO === void 0 ? void 0 : visibleIO.observe(intersectionTrackerRef));
1693
+ raf(() => visibleIO?.observe(intersectionTrackerRef));
1153
1694
  /**
1154
1695
  * TODO(FW-6931): Remove this fallback upon solving the root cause
1155
1696
  * Fallback: If IntersectionObserver never reports that the
@@ -1195,7 +1736,7 @@ const Datetime = class {
1195
1736
  });
1196
1737
  };
1197
1738
  const hiddenIO = new IntersectionObserver(hiddenCallback, { threshold: 0, root: el });
1198
- raf(() => hiddenIO === null || hiddenIO === void 0 ? void 0 : hiddenIO.observe(intersectionTrackerRef));
1739
+ raf(() => hiddenIO?.observe(intersectionTrackerRef));
1199
1740
  /**
1200
1741
  * Datetime uses Ionic components that emit
1201
1742
  * ionFocus and ionBlur. These events are
@@ -1376,7 +1917,6 @@ const Datetime = class {
1376
1917
  }
1377
1918
  renderCombinedDatePickerColumn() {
1378
1919
  const { defaultParts, disabled, workingParts, locale, minParts, maxParts, todayParts, isDateEnabled } = this;
1379
- const activePart = this.getActivePartsWithFallback();
1380
1920
  /**
1381
1921
  * By default, generate a range of 3 months:
1382
1922
  * Previous month, current month, and next month
@@ -1416,7 +1956,10 @@ const Datetime = class {
1416
1956
  catch (e) {
1417
1957
  printIonError('[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);
1418
1958
  }
1419
- return Object.assign(Object.assign({}, itemObject), { disabled });
1959
+ return {
1960
+ ...itemObject,
1961
+ disabled,
1962
+ };
1420
1963
  });
1421
1964
  }
1422
1965
  /**
@@ -1429,10 +1972,18 @@ const Datetime = class {
1429
1972
  return (h("ion-picker-column", { part: WHEEL_PART, "aria-label": "Select a date", class: "date-column", color: this.color, disabled: disabled, value: todayString, onIonChange: (ev) => {
1430
1973
  const { value } = ev.detail;
1431
1974
  const findPart = parts.find(({ month, day, year }) => value === `${year}-${month}-${day}`);
1432
- this.setWorkingParts(Object.assign(Object.assign({}, workingParts), findPart));
1433
- this.setActiveParts(Object.assign(Object.assign({}, activePart), findPart));
1975
+ // Read live so parts a sibling column just committed are included.
1976
+ const activePart = this.getActivePartsWithFallback();
1977
+ this.setWorkingParts({
1978
+ ...this.workingParts,
1979
+ ...findPart,
1980
+ });
1981
+ this.setActiveParts({
1982
+ ...activePart,
1983
+ ...findPart,
1984
+ });
1434
1985
  ev.stopPropagation();
1435
- } }, items.map((item) => (h("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)))));
1986
+ } }, items.map((item) => (h("ion-picker-column-option", { color: this.color, 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)))));
1436
1987
  }
1437
1988
  renderIndividualDatePickerColumns(forcePresentation) {
1438
1989
  const { workingParts, isDateEnabled } = this;
@@ -1465,7 +2016,10 @@ const Datetime = class {
1465
2016
  catch (e) {
1466
2017
  printIonError('[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);
1467
2018
  }
1468
- return Object.assign(Object.assign({}, dayObject), { disabled });
2019
+ return {
2020
+ ...dayObject,
2021
+ disabled,
2022
+ };
1469
2023
  });
1470
2024
  }
1471
2025
  const shouldRenderYears = forcePresentation !== 'month' && forcePresentation !== 'time';
@@ -1494,42 +2048,68 @@ const Datetime = class {
1494
2048
  return renderArray;
1495
2049
  }
1496
2050
  renderDayPickerColumn(days) {
1497
- var _a;
1498
2051
  if (days.length === 0) {
1499
2052
  return [];
1500
2053
  }
1501
2054
  const { disabled, workingParts } = this;
1502
- const activePart = this.getActivePartsWithFallback();
1503
- const pickerColumnValue = (_a = (workingParts.day !== null ? workingParts.day : this.defaultParts.day)) !== null && _a !== void 0 ? _a : undefined;
2055
+ const pickerColumnValue = (workingParts.day !== null ? workingParts.day : this.defaultParts.day) ?? undefined;
1504
2056
  return (h("ion-picker-column", { part: WHEEL_PART, "aria-label": "Select a day", class: "day-column", color: this.color, disabled: disabled, value: pickerColumnValue, onIonChange: (ev) => {
1505
- this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { day: ev.detail.value }));
1506
- this.setActiveParts(Object.assign(Object.assign({}, activePart), { day: ev.detail.value }));
2057
+ // Read live so parts a sibling column just committed are included.
2058
+ const activePart = this.getActivePartsWithFallback();
2059
+ this.setWorkingParts({
2060
+ ...this.workingParts,
2061
+ day: ev.detail.value,
2062
+ });
2063
+ this.setActiveParts({
2064
+ ...activePart,
2065
+ day: ev.detail.value,
2066
+ });
1507
2067
  ev.stopPropagation();
1508
- } }, days.map((day) => (h("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)))));
2068
+ } }, days.map((day) => (h("ion-picker-column-option", { color: this.color, 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)))));
1509
2069
  }
1510
2070
  renderMonthPickerColumn(months) {
1511
2071
  if (months.length === 0) {
1512
2072
  return [];
1513
2073
  }
1514
2074
  const { disabled, workingParts } = this;
1515
- const activePart = this.getActivePartsWithFallback();
1516
2075
  return (h("ion-picker-column", { part: WHEEL_PART, "aria-label": "Select a month", class: "month-column", color: this.color, disabled: disabled, value: workingParts.month, onIonChange: (ev) => {
1517
- this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { month: ev.detail.value }));
1518
- this.setActiveParts(Object.assign(Object.assign({}, activePart), { month: ev.detail.value }));
2076
+ // Read live so parts a sibling column just committed are included.
2077
+ const activePart = this.getActivePartsWithFallback();
2078
+ this.setWorkingParts({
2079
+ ...this.workingParts,
2080
+ month: ev.detail.value,
2081
+ });
2082
+ // Month wheel is navigation-only in multi-select mode as a fix for https://github.com/ionic-team/ionic-framework/issues/29673
2083
+ if (!this.multiple) {
2084
+ this.setActiveParts({
2085
+ ...activePart,
2086
+ month: ev.detail.value,
2087
+ });
2088
+ }
1519
2089
  ev.stopPropagation();
1520
- } }, months.map((month) => (h("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)))));
2090
+ } }, months.map((month) => (h("ion-picker-column-option", { color: this.color, 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)))));
1521
2091
  }
1522
2092
  renderYearPickerColumn(years) {
1523
2093
  if (years.length === 0) {
1524
2094
  return [];
1525
2095
  }
1526
2096
  const { disabled, workingParts } = this;
1527
- const activePart = this.getActivePartsWithFallback();
1528
2097
  return (h("ion-picker-column", { part: WHEEL_PART, "aria-label": "Select a year", class: "year-column", color: this.color, disabled: disabled, value: workingParts.year, onIonChange: (ev) => {
1529
- this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { year: ev.detail.value }));
1530
- this.setActiveParts(Object.assign(Object.assign({}, activePart), { year: ev.detail.value }));
2098
+ // Read live so parts a sibling column just committed are included.
2099
+ const activePart = this.getActivePartsWithFallback();
2100
+ this.setWorkingParts({
2101
+ ...this.workingParts,
2102
+ year: ev.detail.value,
2103
+ });
2104
+ // Year wheel is navigation-only in multi-select mode as a fix for https://github.com/ionic-team/ionic-framework/issues/29673
2105
+ if (!this.multiple) {
2106
+ this.setActiveParts({
2107
+ ...activePart,
2108
+ year: ev.detail.value,
2109
+ });
2110
+ }
1531
2111
  ev.stopPropagation();
1532
- } }, years.map((year) => (h("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)))));
2112
+ } }, years.map((year) => (h("ion-picker-column-option", { color: this.color, 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)))));
1533
2113
  }
1534
2114
  renderTimePickerColumns(forcePresentation) {
1535
2115
  if (['date', 'month', 'month-year', 'year'].includes(forcePresentation)) {
@@ -1554,40 +2134,64 @@ const Datetime = class {
1554
2134
  ];
1555
2135
  }
1556
2136
  renderHourPickerColumn(hoursData) {
1557
- const { disabled, workingParts } = this;
2137
+ const { disabled } = this;
1558
2138
  if (hoursData.length === 0)
1559
2139
  return [];
1560
2140
  const activePart = this.getActivePartsWithFallback();
1561
2141
  return (h("ion-picker-column", { part: WHEEL_PART, "aria-label": "Select an hour", color: this.color, disabled: disabled, value: activePart.hour, numericInput: true, onIonChange: (ev) => {
1562
- this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { hour: ev.detail.value }));
1563
- this.setActiveParts(Object.assign(Object.assign({}, this.getActivePartsWithFallback()), { hour: ev.detail.value }));
2142
+ // Read live so parts a sibling column just committed are included.
2143
+ this.setWorkingParts({
2144
+ ...this.workingParts,
2145
+ hour: ev.detail.value,
2146
+ });
2147
+ this.setActiveParts({
2148
+ ...this.getActivePartsWithFallback(),
2149
+ hour: ev.detail.value,
2150
+ });
1564
2151
  ev.stopPropagation();
1565
- } }, hoursData.map((hour) => (h("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)))));
2152
+ } }, hoursData.map((hour) => (h("ion-picker-column-option", { color: this.color, 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)))));
1566
2153
  }
1567
2154
  renderMinutePickerColumn(minutesData) {
1568
- const { disabled, workingParts } = this;
2155
+ const { disabled } = this;
1569
2156
  if (minutesData.length === 0)
1570
2157
  return [];
1571
2158
  const activePart = this.getActivePartsWithFallback();
1572
2159
  return (h("ion-picker-column", { part: WHEEL_PART, "aria-label": "Select a minute", color: this.color, disabled: disabled, value: activePart.minute, numericInput: true, onIonChange: (ev) => {
1573
- this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { minute: ev.detail.value }));
1574
- this.setActiveParts(Object.assign(Object.assign({}, this.getActivePartsWithFallback()), { minute: ev.detail.value }));
2160
+ // Read live so parts a sibling column just committed are included.
2161
+ this.setWorkingParts({
2162
+ ...this.workingParts,
2163
+ minute: ev.detail.value,
2164
+ });
2165
+ this.setActiveParts({
2166
+ ...this.getActivePartsWithFallback(),
2167
+ minute: ev.detail.value,
2168
+ });
1575
2169
  ev.stopPropagation();
1576
- } }, minutesData.map((minute) => (h("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)))));
2170
+ } }, minutesData.map((minute) => (h("ion-picker-column-option", { color: this.color, 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)))));
1577
2171
  }
1578
2172
  renderDayPeriodPickerColumn(dayPeriodData) {
1579
- const { disabled, workingParts } = this;
2173
+ const { disabled } = this;
1580
2174
  if (dayPeriodData.length === 0) {
1581
2175
  return [];
1582
2176
  }
1583
2177
  const activePart = this.getActivePartsWithFallback();
1584
2178
  const isDayPeriodRTL = isLocaleDayPeriodRTL(this.locale);
1585
2179
  return (h("ion-picker-column", { part: WHEEL_PART, "aria-label": "Select a day period", style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, disabled: disabled, value: activePart.ampm, onIonChange: (ev) => {
1586
- const hour = calculateHourFromAMPM(workingParts, ev.detail.value);
1587
- this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { ampm: ev.detail.value, hour }));
1588
- this.setActiveParts(Object.assign(Object.assign({}, this.getActivePartsWithFallback()), { ampm: ev.detail.value, hour }));
2180
+ // Read live so parts a sibling column just committed are included.
2181
+ const currentParts = this.workingParts;
2182
+ const hour = calculateHourFromAMPM(currentParts, ev.detail.value);
2183
+ this.setWorkingParts({
2184
+ ...currentParts,
2185
+ ampm: ev.detail.value,
2186
+ hour,
2187
+ });
2188
+ this.setActiveParts({
2189
+ ...this.getActivePartsWithFallback(),
2190
+ ampm: ev.detail.value,
2191
+ hour,
2192
+ });
1589
2193
  ev.stopPropagation();
1590
- } }, dayPeriodData.map((dayPeriod) => (h("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)))));
2194
+ } }, dayPeriodData.map((dayPeriod) => (h("ion-picker-column-option", { color: this.color, 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)))));
1591
2195
  }
1592
2196
  renderWheelView(forcePresentation) {
1593
2197
  const { locale } = this;
@@ -1631,8 +2235,8 @@ const Datetime = class {
1631
2235
  // The day is not used when checking if a month is disabled.
1632
2236
  // Users should be able to access the min or max month, even if the
1633
2237
  // min/max date is out of bounds (e.g. min is set to Feb 15, Feb should not be disabled).
1634
- minParts: Object.assign(Object.assign({}, this.minParts), { day: null }),
1635
- maxParts: Object.assign(Object.assign({}, this.maxParts), { day: null }),
2238
+ minParts: { ...this.minParts, day: null },
2239
+ maxParts: { ...this.maxParts, day: null },
1636
2240
  });
1637
2241
  // The working month should never have swipe disabled.
1638
2242
  // Otherwise the CSS scroll snap will not work and the user
@@ -1741,18 +2345,24 @@ const Datetime = class {
1741
2345
  if (isAdjacentDay) {
1742
2346
  // The user selected a day outside the current month. Ignore this button, as the month will be re-rendered.
1743
2347
  this.el.blur();
1744
- this.activeParts = Object.assign(Object.assign({}, activePart), referenceParts);
2348
+ this.activeParts = { ...activePart, ...referenceParts };
1745
2349
  this.animateToDate(referenceParts);
1746
2350
  this.confirm();
1747
2351
  }
1748
2352
  else {
1749
- this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), referenceParts));
2353
+ this.setWorkingParts({
2354
+ ...this.workingParts,
2355
+ ...referenceParts,
2356
+ });
1750
2357
  // Multiple only needs date info so we can wipe out other fields like time.
1751
2358
  if (multiple) {
1752
2359
  this.setActiveParts(referenceParts, isActive);
1753
2360
  }
1754
2361
  else {
1755
- this.setActiveParts(Object.assign(Object.assign({}, activePart), referenceParts));
2362
+ this.setActiveParts({
2363
+ ...activePart,
2364
+ ...referenceParts,
2365
+ });
1756
2366
  }
1757
2367
  }
1758
2368
  }
@@ -1795,7 +2405,7 @@ const Datetime = class {
1795
2405
  await popoverRef.onWillDismiss();
1796
2406
  this.isTimePopoverOpen = false;
1797
2407
  }
1798
- } }, getLocalizedTime(locale, activePart, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time)),
2408
+ } }, getLocalizedTime(locale, activePart, computedHourCycle, formatOptions?.time)),
1799
2409
  h("ion-popover", { alignment: "center", translucent: true, overlayIndex: 1, arrow: false, onWillPresent: (ev) => {
1800
2410
  /**
1801
2411
  * Intersection Observers do not consistently fire between Blink and Webkit
@@ -1818,7 +2428,6 @@ const Datetime = class {
1818
2428
  ];
1819
2429
  }
1820
2430
  getHeaderSelectedDateText() {
1821
- var _a;
1822
2431
  const { activeParts, formatOptions, multiple, titleSelectedDatesFormatter } = this;
1823
2432
  const isArray = Array.isArray(activeParts);
1824
2433
  let headerText;
@@ -1835,7 +2444,7 @@ const Datetime = class {
1835
2444
  }
1836
2445
  else {
1837
2446
  // for exactly 1 day selected (multiple set or not), show a formatted version of that
1838
- headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(), (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { weekday: 'short', month: 'short', day: 'numeric' });
2447
+ headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(), formatOptions?.date ?? { weekday: 'short', month: 'short', day: 'numeric' });
1839
2448
  }
1840
2449
  return headerText;
1841
2450
  }
@@ -1924,17 +2533,19 @@ const Datetime = class {
1924
2533
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1925
2534
  const hasWheelVariant = hasDatePresentation && preferWheel;
1926
2535
  renderHiddenInput(true, el, name, formatValue(value), disabled);
1927
- return (h(Host, { key: '323c8c2327088f00934b8c93c3306538cb9b5677', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1928
- [mode]: true,
1929
- ['datetime-readonly']: readonly,
1930
- ['datetime-disabled']: disabled,
1931
- 'show-month-and-year': shouldShowMonthAndYear,
1932
- 'month-year-picker-open': monthYearPickerOpen,
1933
- [`datetime-presentation-${presentation}`]: true,
1934
- [`datetime-size-${size}`]: true,
1935
- [`datetime-prefer-wheel`]: hasWheelVariant,
1936
- [`datetime-grid`]: isGridStyle,
1937
- })) }, h("div", { key: '1e0855c8909bc3f1e48a21ad68159fa782060691', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
2536
+ return (h(Host, { key: '4e0b529a70924b065bcc6191e08550428b5a52a0', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: {
2537
+ ...createColorClasses(color, {
2538
+ [mode]: true,
2539
+ ['datetime-readonly']: readonly,
2540
+ ['datetime-disabled']: disabled,
2541
+ 'show-month-and-year': shouldShowMonthAndYear,
2542
+ 'month-year-picker-open': monthYearPickerOpen,
2543
+ [`datetime-presentation-${presentation}`]: true,
2544
+ [`datetime-size-${size}`]: true,
2545
+ [`datetime-prefer-wheel`]: hasWheelVariant,
2546
+ [`datetime-grid`]: isGridStyle,
2547
+ }),
2548
+ } }, h("div", { key: 'cc9d1b92f960984cb0466d0003a240ace67da243', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
1938
2549
  }
1939
2550
  get el() { return getElement(this); }
1940
2551
  static get watchers() { return {
@@ -1984,636 +2595,4 @@ Datetime.style = {
1984
2595
  md: datetimeMdCss()
1985
2596
  };
1986
2597
 
1987
- /**
1988
- * iOS Picker Enter Animation
1989
- */
1990
- const iosEnterAnimation = (baseEl) => {
1991
- const baseAnimation = createAnimation();
1992
- const backdropAnimation = createAnimation();
1993
- const wrapperAnimation = createAnimation();
1994
- backdropAnimation
1995
- .addElement(baseEl.querySelector('ion-backdrop'))
1996
- .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
1997
- .beforeStyles({
1998
- 'pointer-events': 'none',
1999
- })
2000
- .afterClearStyles(['pointer-events']);
2001
- wrapperAnimation
2002
- .addElement(baseEl.querySelector('.picker-wrapper'))
2003
- .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
2004
- return baseAnimation
2005
- .addElement(baseEl)
2006
- .easing('cubic-bezier(.36,.66,.04,1)')
2007
- .duration(400)
2008
- .addAnimation([backdropAnimation, wrapperAnimation]);
2009
- };
2010
-
2011
- /**
2012
- * iOS Picker Leave Animation
2013
- */
2014
- const iosLeaveAnimation = (baseEl) => {
2015
- const baseAnimation = createAnimation();
2016
- const backdropAnimation = createAnimation();
2017
- const wrapperAnimation = createAnimation();
2018
- backdropAnimation
2019
- .addElement(baseEl.querySelector('ion-backdrop'))
2020
- .fromTo('opacity', 'var(--backdrop-opacity)', 0.01);
2021
- wrapperAnimation
2022
- .addElement(baseEl.querySelector('.picker-wrapper'))
2023
- .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
2024
- return baseAnimation
2025
- .addElement(baseEl)
2026
- .easing('cubic-bezier(.36,.66,.04,1)')
2027
- .duration(400)
2028
- .addAnimation([backdropAnimation, wrapperAnimation]);
2029
- };
2030
-
2031
- 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}.sc-ion-picker-legacy-ios-h{inset-inline-start: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, var(--ion-background-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, #0054e9);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}.picker-above-highlight.sc-ion-picker-legacy-ios{inset-inline-start: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}.picker-below-highlight.sc-ion-picker-legacy-ios{inset-inline-start:0}`;
2032
-
2033
- 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}.sc-ion-picker-legacy-md-h{inset-inline-start: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, var(--ion-background-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, #0054e9);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, var(--ion-background-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}.picker-above-highlight.sc-ion-picker-legacy-md{inset-inline-start: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, var(--ion-background-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}.picker-below-highlight.sc-ion-picker-legacy-md{inset-inline-start:0}`;
2034
-
2035
- const Picker = class {
2036
- constructor(hostRef) {
2037
- registerInstance(this, hostRef);
2038
- this.didPresent = createEvent(this, "ionPickerDidPresent", 7);
2039
- this.willPresent = createEvent(this, "ionPickerWillPresent", 7);
2040
- this.willDismiss = createEvent(this, "ionPickerWillDismiss", 7);
2041
- this.didDismiss = createEvent(this, "ionPickerDidDismiss", 7);
2042
- this.didPresentShorthand = createEvent(this, "didPresent", 7);
2043
- this.willPresentShorthand = createEvent(this, "willPresent", 7);
2044
- this.willDismissShorthand = createEvent(this, "willDismiss", 7);
2045
- this.didDismissShorthand = createEvent(this, "didDismiss", 7);
2046
- this.delegateController = createDelegateController(this);
2047
- this.lockController = createLockController();
2048
- this.triggerController = createTriggerController();
2049
- this.presented = false;
2050
- /** @internal */
2051
- this.hasController = false;
2052
- /**
2053
- * If `true`, the keyboard will be automatically dismissed when the overlay is presented.
2054
- */
2055
- this.keyboardClose = true;
2056
- /**
2057
- * Array of buttons to be displayed at the top of the picker.
2058
- */
2059
- this.buttons = [];
2060
- /**
2061
- * Array of columns to be displayed in the picker.
2062
- */
2063
- this.columns = [];
2064
- /**
2065
- * Number of milliseconds to wait before dismissing the picker.
2066
- */
2067
- this.duration = 0;
2068
- /**
2069
- * If `true`, a backdrop will be displayed behind the picker.
2070
- */
2071
- this.showBackdrop = true;
2072
- /**
2073
- * If `true`, the picker will be dismissed when the backdrop is clicked.
2074
- */
2075
- this.backdropDismiss = true;
2076
- /**
2077
- * If `true`, the picker will animate.
2078
- */
2079
- this.animated = true;
2080
- /**
2081
- * If `true`, the picker will open. If `false`, the picker will close.
2082
- * Use this if you need finer grained control over presentation, otherwise
2083
- * just use the pickerController or the `trigger` property.
2084
- * Note: `isOpen` will not automatically be set back to `false` when
2085
- * the picker dismisses. You will need to do that in your code.
2086
- */
2087
- this.isOpen = false;
2088
- this.onBackdropTap = () => {
2089
- this.dismiss(undefined, BACKDROP);
2090
- };
2091
- this.dispatchCancelHandler = (ev) => {
2092
- const role = ev.detail.role;
2093
- if (isCancel(role)) {
2094
- const cancelButton = this.buttons.find((b) => b.role === 'cancel');
2095
- this.callButtonHandler(cancelButton);
2096
- }
2097
- };
2098
- }
2099
- onIsOpenChange(newValue, oldValue) {
2100
- if (newValue === true && oldValue === false) {
2101
- this.present();
2102
- }
2103
- else if (newValue === false && oldValue === true) {
2104
- this.dismiss();
2105
- }
2106
- }
2107
- triggerChanged() {
2108
- const { trigger, el, triggerController } = this;
2109
- if (trigger) {
2110
- triggerController.addClickListener(el, trigger);
2111
- }
2112
- }
2113
- connectedCallback() {
2114
- prepareOverlay(this.el);
2115
- this.triggerChanged();
2116
- }
2117
- disconnectedCallback() {
2118
- this.triggerController.removeClickListener();
2119
- }
2120
- componentWillLoad() {
2121
- var _a;
2122
- if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
2123
- setOverlayId(this.el);
2124
- }
2125
- }
2126
- componentDidLoad() {
2127
- printIonWarning('[ion-picker-legacy] - 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);
2128
- /**
2129
- * If picker was rendered with isOpen="true"
2130
- * then we should open picker immediately.
2131
- */
2132
- if (this.isOpen === true) {
2133
- raf(() => this.present());
2134
- }
2135
- /**
2136
- * When binding values in frameworks such as Angular
2137
- * it is possible for the value to be set after the Web Component
2138
- * initializes but before the value watcher is set up in Stencil.
2139
- * As a result, the watcher callback may not be fired.
2140
- * We work around this by manually calling the watcher
2141
- * callback when the component has loaded and the watcher
2142
- * is configured.
2143
- */
2144
- this.triggerChanged();
2145
- }
2146
- /**
2147
- * Present the picker overlay after it has been created.
2148
- */
2149
- async present() {
2150
- const unlock = await this.lockController.lock();
2151
- await this.delegateController.attachViewToDom();
2152
- await present(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);
2153
- if (this.duration > 0) {
2154
- this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
2155
- }
2156
- unlock();
2157
- }
2158
- /**
2159
- * Dismiss the picker overlay after it has been presented.
2160
- *
2161
- * @param data Any data to emit in the dismiss events.
2162
- * @param role The role of the element that is dismissing the picker.
2163
- * This can be useful in a button handler for determining which button was
2164
- * clicked to dismiss the picker.
2165
- * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
2166
- */
2167
- async dismiss(data, role) {
2168
- const unlock = await this.lockController.lock();
2169
- if (this.durationTimeout) {
2170
- clearTimeout(this.durationTimeout);
2171
- }
2172
- const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);
2173
- if (dismissed) {
2174
- this.delegateController.removeViewFromDom();
2175
- }
2176
- unlock();
2177
- return dismissed;
2178
- }
2179
- /**
2180
- * Returns a promise that resolves when the picker did dismiss.
2181
- */
2182
- onDidDismiss() {
2183
- return eventMethod(this.el, 'ionPickerDidDismiss');
2184
- }
2185
- /**
2186
- * Returns a promise that resolves when the picker will dismiss.
2187
- */
2188
- onWillDismiss() {
2189
- return eventMethod(this.el, 'ionPickerWillDismiss');
2190
- }
2191
- /**
2192
- * Get the column that matches the specified name.
2193
- *
2194
- * @param name The name of the column.
2195
- */
2196
- getColumn(name) {
2197
- return Promise.resolve(this.columns.find((column) => column.name === name));
2198
- }
2199
- async buttonClick(button) {
2200
- const role = button.role;
2201
- if (isCancel(role)) {
2202
- return this.dismiss(undefined, role);
2203
- }
2204
- const shouldDismiss = await this.callButtonHandler(button);
2205
- if (shouldDismiss) {
2206
- return this.dismiss(this.getSelected(), button.role);
2207
- }
2208
- return Promise.resolve();
2209
- }
2210
- async callButtonHandler(button) {
2211
- if (button) {
2212
- // a handler has been provided, execute it
2213
- // pass the handler the values from the inputs
2214
- const rtn = await safeCall(button.handler, this.getSelected());
2215
- if (rtn === false) {
2216
- // if the return value of the handler is false then do not dismiss
2217
- return false;
2218
- }
2219
- }
2220
- return true;
2221
- }
2222
- getSelected() {
2223
- const selected = {};
2224
- this.columns.forEach((col, index) => {
2225
- const selectedColumn = col.selectedIndex !== undefined ? col.options[col.selectedIndex] : undefined;
2226
- selected[col.name] = {
2227
- text: selectedColumn ? selectedColumn.text : undefined,
2228
- value: selectedColumn ? selectedColumn.value : undefined,
2229
- columnIndex: index,
2230
- };
2231
- });
2232
- return selected;
2233
- }
2234
- render() {
2235
- const { htmlAttributes } = this;
2236
- const mode = getIonMode(this);
2237
- return (h(Host, Object.assign({ key: '80f66d33780d8a1352d24be9cb63a0cc03d01ab5', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
2238
- zIndex: `${20000 + this.overlayIndex}`,
2239
- }, class: Object.assign({ [mode]: true,
2240
- // Used internally for styling
2241
- [`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '97fb8e10ba08b197610cb8c0cdea61103883d55f', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: 'b3969cb6fbf7153623d14e3ca1493d3370efb211', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '299268483c3727e698d9135bfdf40349a7050ac1', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, h("div", { key: '95394de3ef691899b7dbf416f56fd3e86bbdce3f', class: "picker-toolbar" }, this.buttons.map((b) => (h("div", { class: buttonWrapperClass(b) }, h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h("div", { key: '05f18bb8d00dc0e22f691b7e41f90f729a6c66d7', class: "picker-columns" }, h("div", { key: '4a8fdf224effc0af67fd413e2e6aca8a78d1cf43', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => h("ion-picker-legacy-column", { col: c })), h("div", { key: 'e50a31db45e3f39e9d0fed36a21be9257eec09bf', class: "picker-below-highlight" }))), h("div", { key: '5a78cb2176ac807ea0c195c6b76cd0e8eef9d4c0', tabindex: "0", "aria-hidden": "true" })));
2242
- }
2243
- get el() { return getElement(this); }
2244
- static get watchers() { return {
2245
- "isOpen": [{
2246
- "onIsOpenChange": 0
2247
- }],
2248
- "trigger": [{
2249
- "triggerChanged": 0
2250
- }]
2251
- }; }
2252
- };
2253
- const buttonWrapperClass = (button) => {
2254
- return {
2255
- [`picker-toolbar-${button.role}`]: button.role !== undefined,
2256
- 'picker-toolbar-button': true,
2257
- };
2258
- };
2259
- const buttonClass = (button) => {
2260
- return Object.assign({ 'picker-button': true, 'ion-activatable': true }, getClassMap(button.cssClass));
2261
- };
2262
- Picker.style = {
2263
- ios: pickerIosCss(),
2264
- md: pickerMdCss()
2265
- };
2266
-
2267
- 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}.picker-opt{inset-inline-start: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}}`;
2268
-
2269
- 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}.picker-opt{inset-inline-start: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, #0054e9)}`;
2270
-
2271
- const PickerColumnCmp = class {
2272
- constructor(hostRef) {
2273
- registerInstance(this, hostRef);
2274
- this.ionPickerColChange = createEvent(this, "ionPickerColChange", 7);
2275
- this.optHeight = 0;
2276
- this.rotateFactor = 0;
2277
- this.scaleFactor = 1;
2278
- this.velocity = 0;
2279
- this.y = 0;
2280
- this.noAnimate = true;
2281
- // `colDidChange` is a flag that gets set when the column is changed
2282
- // dynamically. When this flag is set, the column will refresh
2283
- // after the component re-renders to incorporate the new column data.
2284
- // This is necessary because `this.refresh` queries for the option elements,
2285
- // so it needs to wait for the latest elements to be available in the DOM.
2286
- // Ex: column is created with 3 options. User updates the column data
2287
- // to have 5 options. The column will still think it only has 3 options.
2288
- this.colDidChange = false;
2289
- }
2290
- colChanged() {
2291
- this.colDidChange = true;
2292
- }
2293
- async connectedCallback() {
2294
- let pickerRotateFactor = 0;
2295
- let pickerScaleFactor = 0.81;
2296
- const mode = getIonMode(this);
2297
- if (mode === 'ios') {
2298
- pickerRotateFactor = -0.46;
2299
- pickerScaleFactor = 1;
2300
- }
2301
- this.rotateFactor = pickerRotateFactor;
2302
- this.scaleFactor = pickerScaleFactor;
2303
- this.gesture = (await import('./index-CfgBF1SE.js')).createGesture({
2304
- el: this.el,
2305
- gestureName: 'picker-swipe',
2306
- gesturePriority: 100,
2307
- threshold: 0,
2308
- passive: false,
2309
- onStart: (ev) => this.onStart(ev),
2310
- onMove: (ev) => this.onMove(ev),
2311
- onEnd: (ev) => this.onEnd(ev),
2312
- });
2313
- this.gesture.enable();
2314
- // Options have not been initialized yet
2315
- // Animation must be disabled through the `noAnimate` flag
2316
- // Otherwise, the options will render
2317
- // at the top of the column and transition down
2318
- this.tmrId = setTimeout(() => {
2319
- this.noAnimate = false;
2320
- // After initialization, `refresh()` will be called
2321
- // At this point, animation will be enabled. The options will
2322
- // animate as they are being selected.
2323
- this.refresh(true);
2324
- }, 250);
2325
- }
2326
- componentDidLoad() {
2327
- this.onDomChange();
2328
- }
2329
- componentDidUpdate() {
2330
- // Options may have changed since last update.
2331
- if (this.colDidChange) {
2332
- // Animation must be disabled through the `onDomChange` parameter.
2333
- // Otherwise, the recently added options will render
2334
- // at the top of the column and transition down
2335
- this.onDomChange(true, false);
2336
- this.colDidChange = false;
2337
- }
2338
- }
2339
- disconnectedCallback() {
2340
- if (this.rafId !== undefined)
2341
- cancelAnimationFrame(this.rafId);
2342
- if (this.tmrId)
2343
- clearTimeout(this.tmrId);
2344
- if (this.gesture) {
2345
- this.gesture.destroy();
2346
- this.gesture = undefined;
2347
- }
2348
- }
2349
- emitColChange() {
2350
- this.ionPickerColChange.emit(this.col);
2351
- }
2352
- setSelected(selectedIndex, duration) {
2353
- // if there is a selected index, then figure out it's y position
2354
- // if there isn't a selected index, then just use the top y position
2355
- const y = selectedIndex > -1 ? -(selectedIndex * this.optHeight) : 0;
2356
- this.velocity = 0;
2357
- // set what y position we're at
2358
- if (this.rafId !== undefined)
2359
- cancelAnimationFrame(this.rafId);
2360
- this.update(y, duration, true);
2361
- this.emitColChange();
2362
- }
2363
- update(y, duration, saveY) {
2364
- if (!this.optsEl) {
2365
- return;
2366
- }
2367
- // ensure we've got a good round number :)
2368
- let translateY = 0;
2369
- let translateZ = 0;
2370
- const { col, rotateFactor } = this;
2371
- const prevSelected = col.selectedIndex;
2372
- const selectedIndex = (col.selectedIndex = this.indexForY(-y));
2373
- const durationStr = duration === 0 ? '' : duration + 'ms';
2374
- const scaleStr = `scale(${this.scaleFactor})`;
2375
- const children = this.optsEl.children;
2376
- for (let i = 0; i < children.length; i++) {
2377
- const button = children[i];
2378
- const opt = col.options[i];
2379
- const optOffset = i * this.optHeight + y;
2380
- let transform = '';
2381
- if (rotateFactor !== 0) {
2382
- const rotateX = optOffset * rotateFactor;
2383
- if (Math.abs(rotateX) <= 90) {
2384
- translateY = 0;
2385
- translateZ = 90;
2386
- transform = `rotateX(${rotateX}deg) `;
2387
- }
2388
- else {
2389
- translateY = -9999;
2390
- }
2391
- }
2392
- else {
2393
- translateZ = 0;
2394
- translateY = optOffset;
2395
- }
2396
- const selected = selectedIndex === i;
2397
- transform += `translate3d(0px,${translateY}px,${translateZ}px) `;
2398
- if (this.scaleFactor !== 1 && !selected) {
2399
- transform += scaleStr;
2400
- }
2401
- // Update transition duration
2402
- if (this.noAnimate) {
2403
- opt.duration = 0;
2404
- button.style.transitionDuration = '';
2405
- }
2406
- else if (duration !== opt.duration) {
2407
- opt.duration = duration;
2408
- button.style.transitionDuration = durationStr;
2409
- }
2410
- // Update transform
2411
- if (transform !== opt.transform) {
2412
- opt.transform = transform;
2413
- }
2414
- button.style.transform = transform;
2415
- /**
2416
- * Ensure that the select column
2417
- * item has the selected class
2418
- */
2419
- opt.selected = selected;
2420
- if (selected) {
2421
- button.classList.add(PICKER_OPT_SELECTED);
2422
- }
2423
- else {
2424
- button.classList.remove(PICKER_OPT_SELECTED);
2425
- }
2426
- }
2427
- this.col.prevSelected = prevSelected;
2428
- if (saveY) {
2429
- this.y = y;
2430
- }
2431
- if (this.lastIndex !== selectedIndex) {
2432
- // have not set a last index yet
2433
- hapticSelectionChanged();
2434
- this.lastIndex = selectedIndex;
2435
- }
2436
- }
2437
- decelerate() {
2438
- if (this.velocity !== 0) {
2439
- // still decelerating
2440
- this.velocity *= DECELERATION_FRICTION;
2441
- // do not let it go slower than a velocity of 1
2442
- this.velocity = this.velocity > 0 ? Math.max(this.velocity, 1) : Math.min(this.velocity, -1);
2443
- let y = this.y + this.velocity;
2444
- if (y > this.minY) {
2445
- // whoops, it's trying to scroll up farther than the options we have!
2446
- y = this.minY;
2447
- this.velocity = 0;
2448
- }
2449
- else if (y < this.maxY) {
2450
- // gahh, it's trying to scroll down farther than we can!
2451
- y = this.maxY;
2452
- this.velocity = 0;
2453
- }
2454
- this.update(y, 0, true);
2455
- const notLockedIn = Math.round(y) % this.optHeight !== 0 || Math.abs(this.velocity) > 1;
2456
- if (notLockedIn) {
2457
- // isn't locked in yet, keep decelerating until it is
2458
- this.rafId = requestAnimationFrame(() => this.decelerate());
2459
- }
2460
- else {
2461
- this.velocity = 0;
2462
- this.emitColChange();
2463
- hapticSelectionEnd();
2464
- }
2465
- }
2466
- else if (this.y % this.optHeight !== 0) {
2467
- // needs to still get locked into a position so options line up
2468
- const currentPos = Math.abs(this.y % this.optHeight);
2469
- // create a velocity in the direction it needs to scroll
2470
- this.velocity = currentPos > this.optHeight / 2 ? 1 : -1;
2471
- this.decelerate();
2472
- }
2473
- }
2474
- indexForY(y) {
2475
- return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);
2476
- }
2477
- onStart(detail) {
2478
- // We have to prevent default in order to block scrolling under the picker
2479
- // but we DO NOT have to stop propagation, since we still want
2480
- // some "click" events to capture
2481
- if (detail.event.cancelable) {
2482
- detail.event.preventDefault();
2483
- }
2484
- detail.event.stopPropagation();
2485
- hapticSelectionStart();
2486
- // reset everything
2487
- if (this.rafId !== undefined)
2488
- cancelAnimationFrame(this.rafId);
2489
- const options = this.col.options;
2490
- let minY = options.length - 1;
2491
- let maxY = 0;
2492
- for (let i = 0; i < options.length; i++) {
2493
- if (!options[i].disabled) {
2494
- minY = Math.min(minY, i);
2495
- maxY = Math.max(maxY, i);
2496
- }
2497
- }
2498
- this.minY = -(minY * this.optHeight);
2499
- this.maxY = -(maxY * this.optHeight);
2500
- }
2501
- onMove(detail) {
2502
- if (detail.event.cancelable) {
2503
- detail.event.preventDefault();
2504
- }
2505
- detail.event.stopPropagation();
2506
- // update the scroll position relative to pointer start position
2507
- let y = this.y + detail.deltaY;
2508
- if (y > this.minY) {
2509
- // scrolling up higher than scroll area
2510
- y = Math.pow(y, 0.8);
2511
- this.bounceFrom = y;
2512
- }
2513
- else if (y < this.maxY) {
2514
- // scrolling down below scroll area
2515
- y += Math.pow(this.maxY - y, 0.9);
2516
- this.bounceFrom = y;
2517
- }
2518
- else {
2519
- this.bounceFrom = 0;
2520
- }
2521
- this.update(y, 0, false);
2522
- }
2523
- onEnd(detail) {
2524
- if (this.bounceFrom > 0) {
2525
- // bounce back up
2526
- this.update(this.minY, 100, true);
2527
- this.emitColChange();
2528
- return;
2529
- }
2530
- else if (this.bounceFrom < 0) {
2531
- // bounce back down
2532
- this.update(this.maxY, 100, true);
2533
- this.emitColChange();
2534
- return;
2535
- }
2536
- this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);
2537
- if (this.velocity === 0 && detail.deltaY === 0) {
2538
- const opt = detail.event.target.closest('.picker-opt');
2539
- if (opt === null || opt === void 0 ? void 0 : opt.hasAttribute('opt-index')) {
2540
- this.setSelected(parseInt(opt.getAttribute('opt-index'), 10), TRANSITION_DURATION);
2541
- }
2542
- }
2543
- else {
2544
- this.y += detail.deltaY;
2545
- if (Math.abs(detail.velocityY) < 0.05) {
2546
- const isScrollingUp = detail.deltaY > 0;
2547
- const optHeightFraction = (Math.abs(this.y) % this.optHeight) / this.optHeight;
2548
- if (isScrollingUp && optHeightFraction > 0.5) {
2549
- this.velocity = Math.abs(this.velocity) * -1;
2550
- }
2551
- else if (!isScrollingUp && optHeightFraction <= 0.5) {
2552
- this.velocity = Math.abs(this.velocity);
2553
- }
2554
- }
2555
- this.decelerate();
2556
- }
2557
- }
2558
- refresh(forceRefresh, animated) {
2559
- var _a;
2560
- let min = this.col.options.length - 1;
2561
- let max = 0;
2562
- const options = this.col.options;
2563
- for (let i = 0; i < options.length; i++) {
2564
- if (!options[i].disabled) {
2565
- min = Math.min(min, i);
2566
- max = Math.max(max, i);
2567
- }
2568
- }
2569
- /**
2570
- * Only update selected value if column has a
2571
- * velocity of 0. If it does not, then the
2572
- * column is animating might land on
2573
- * a value different than the value at
2574
- * selectedIndex
2575
- */
2576
- if (this.velocity !== 0) {
2577
- return;
2578
- }
2579
- const selectedIndex = clamp(min, (_a = this.col.selectedIndex) !== null && _a !== void 0 ? _a : 0, max);
2580
- if (this.col.prevSelected !== selectedIndex || forceRefresh) {
2581
- const y = selectedIndex * this.optHeight * -1;
2582
- const duration = animated ? TRANSITION_DURATION : 0;
2583
- this.velocity = 0;
2584
- this.update(y, duration, true);
2585
- }
2586
- }
2587
- onDomChange(forceRefresh, animated) {
2588
- const colEl = this.optsEl;
2589
- if (colEl) {
2590
- // DOM READ
2591
- // We perfom a DOM read over a rendered item, this needs to happen after the first render or after the column has changed
2592
- this.optHeight = colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0;
2593
- }
2594
- this.refresh(forceRefresh, animated);
2595
- }
2596
- render() {
2597
- const col = this.col;
2598
- const mode = getIonMode(this);
2599
- return (h(Host, { key: '86125e95f18837dfd021db01777d72a1562d8ee3', 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: {
2600
- 'max-width': this.col.columnWidth,
2601
- } }, col.prefix && (h("div", { key: 'b0f3d39e0bd128781066ffefb7a1e40d12a9e76d', class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), h("div", { key: '0b106ac4d56916eaaa7f09d1b68348b3754b7bba', class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (h("button", { "aria-label": o.ariaLabel, class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, "opt-index": index }, o.text)))), col.suffix && (h("div", { key: '00ff2f9dbb4561787e5a5223327c6a2a33f8362e', class: "picker-suffix", style: { width: col.suffixWidth } }, col.suffix))));
2602
- }
2603
- get el() { return getElement(this); }
2604
- static get watchers() { return {
2605
- "col": [{
2606
- "colChanged": 0
2607
- }]
2608
- }; }
2609
- };
2610
- const PICKER_OPT_SELECTED = 'picker-opt-selected';
2611
- const DECELERATION_FRICTION = 0.97;
2612
- const MAX_PICKER_SPEED = 90;
2613
- const TRANSITION_DURATION = 150;
2614
- PickerColumnCmp.style = {
2615
- ios: pickerColumnIosCss(),
2616
- md: pickerColumnMdCss()
2617
- };
2618
-
2619
- export { Datetime as ion_datetime, Picker as ion_picker_legacy, PickerColumnCmp as ion_picker_legacy_column };
2598
+ export { Datetime as ion_datetime };