@ionic/core 7.5.8-dev.11701894917.1c1465bd → 7.5.8-dev.11702074871.1238046f

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 (198) hide show
  1. package/components/data.js +1 -1
  2. package/components/ion-datetime.js +39 -30
  3. package/components/ion-picker-column-option.d.ts +11 -0
  4. package/components/ion-picker-column-option.js +9 -0
  5. package/components/ion-picker-column.js +2 -2
  6. package/components/ion-picker-legacy-column.d.ts +11 -0
  7. package/components/ion-picker-legacy-column.js +9 -0
  8. package/components/{ion-picker-internal.d.ts → ion-picker-legacy.d.ts} +4 -4
  9. package/components/ion-picker-legacy.js +309 -0
  10. package/components/ion-picker.js +1 -309
  11. package/components/overlays.js +6 -3
  12. package/components/picker-column-option.js +122 -0
  13. package/components/picker-column.js +351 -322
  14. package/components/picker-column2.js +379 -0
  15. package/components/{picker-internal.js → picker.js} +29 -22
  16. package/dist/cjs/{data-36b9094e.js → data-e7526b58.js} +1 -1
  17. package/dist/cjs/index.cjs.js +1 -1
  18. package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
  19. package/dist/cjs/ion-alert.cjs.entry.js +1 -1
  20. package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
  21. package/dist/cjs/ion-datetime_3.cjs.entry.js +29 -35
  22. package/dist/cjs/ion-loading.cjs.entry.js +1 -1
  23. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  24. package/dist/cjs/ion-modal.cjs.entry.js +1 -1
  25. package/dist/cjs/ion-picker-column-option.cjs.entry.js +104 -0
  26. package/dist/cjs/{ion-picker-column-internal.cjs.entry.js → ion-picker-column.cjs.entry.js} +104 -87
  27. package/dist/cjs/{ion-picker-internal.cjs.entry.js → ion-picker.cjs.entry.js} +26 -19
  28. package/dist/cjs/ion-popover.cjs.entry.js +1 -1
  29. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  30. package/dist/cjs/ion-toast.cjs.entry.js +1 -1
  31. package/dist/cjs/ionic.cjs.js +1 -1
  32. package/dist/cjs/loader.cjs.js +1 -1
  33. package/dist/cjs/{overlays-2c6b1072.js → overlays-e8e05b0e.js} +6 -3
  34. package/dist/collection/collection-manifest.json +7 -6
  35. package/dist/collection/components/datetime/datetime.ios.css +8 -13
  36. package/dist/collection/components/datetime/datetime.js +19 -16
  37. package/dist/collection/components/datetime/datetime.md.css +8 -13
  38. package/dist/collection/components/datetime/test/datetime.e2e.js +2 -2
  39. package/dist/collection/components/datetime/test/disabled/datetime.spec.js +4 -4
  40. package/dist/collection/components/datetime/test/locale/datetime.e2e.js +2 -2
  41. package/dist/collection/components/datetime/test/minmax/datetime.e2e.js +6 -6
  42. package/dist/collection/components/datetime/test/prefer-wheel/datetime.e2e.js +43 -41
  43. package/dist/collection/components/datetime/test/presentation/datetime.e2e.js +1 -1
  44. package/dist/collection/components/datetime/test/readonly/datetime.e2e.js +2 -2
  45. package/dist/collection/components/datetime/test/values/datetime.e2e.js +15 -12
  46. package/dist/collection/components/datetime/utils/data.js +1 -1
  47. package/dist/collection/components/picker/picker.ios.css +113 -211
  48. package/dist/collection/components/picker/picker.js +468 -743
  49. package/dist/collection/components/picker/picker.md.css +109 -198
  50. package/dist/collection/components/{picker-internal/test/a11y/picker-internal.e2e.js → picker/test/a11y/picker.e2e.js} +2 -2
  51. package/dist/collection/components/picker/test/basic/picker.e2e.js +99 -13
  52. package/dist/collection/components/picker/test/custom/picker.e2e.js +85 -0
  53. package/dist/collection/components/{picker-internal/test/keyboard-entry/picker-internal.e2e.js → picker/test/keyboard-entry/picker.e2e.js} +63 -32
  54. package/dist/collection/components/{picker-column-internal/picker-column-internal.md.css → picker-column/picker-column.css} +96 -83
  55. package/dist/collection/components/picker-column/picker-column.js +497 -335
  56. package/dist/collection/components/{picker-column-internal/test/basic/picker-column-internal.e2e.js → picker-column/test/basic/picker-column.e2e.js} +8 -8
  57. package/dist/collection/components/picker-column/test/disabled/picker-column.e2e.js +91 -0
  58. package/dist/collection/components/picker-column/test/slots/picker-column.e2e.js +39 -0
  59. package/dist/collection/components/picker-column-option/picker-column-option.ios.css +87 -0
  60. package/dist/collection/components/picker-column-option/picker-column-option.js +173 -0
  61. package/dist/collection/components/{picker-column-internal/picker-column-internal.ios.css → picker-column-option/picker-column-option.md.css} +6 -53
  62. package/dist/collection/components/picker-column-option/test/a11y/picker-column-option.e2e.js +18 -0
  63. package/dist/collection/components/picker-column-option/test/basic/picker-column-option.e2e.js +37 -0
  64. package/dist/collection/components/picker-column-option/test/picker-column-option.spec.js +29 -0
  65. package/dist/collection/components/{picker-internal/picker-internal.md.css → picker-legacy/picker.ios.css} +207 -98
  66. package/dist/collection/components/picker-legacy/picker.js +817 -0
  67. package/dist/collection/components/{picker-internal/picker-internal.ios.css → picker-legacy/picker.md.css} +192 -100
  68. package/dist/collection/components/picker-legacy/test/basic/picker.e2e.js +25 -0
  69. package/dist/collection/components/{picker → picker-legacy}/test/is-open/picker.e2e.js +4 -4
  70. package/dist/collection/components/{picker → picker-legacy}/test/picker-id.spec.js +5 -5
  71. package/dist/collection/components/{picker → picker-legacy}/test/trigger/picker.e2e.js +1 -1
  72. package/dist/collection/components/picker-legacy-column/picker-column.js +419 -0
  73. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column-aria.spec.js +3 -3
  74. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column-dynamic.spec.js +2 -2
  75. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column.spec.js +2 -2
  76. package/dist/collection/components/{picker-column → picker-legacy-column}/test/standalone/picker-column.e2e.js +3 -3
  77. package/dist/collection/utils/overlays.js +6 -3
  78. package/dist/docs.json +493 -24
  79. package/dist/esm/{data-f5c75b4e.js → data-4b9508c9.js} +1 -1
  80. package/dist/esm/index.js +1 -1
  81. package/dist/esm/ion-action-sheet.entry.js +1 -1
  82. package/dist/esm/ion-alert.entry.js +1 -1
  83. package/dist/esm/ion-datetime-button.entry.js +1 -1
  84. package/dist/esm/ion-datetime_3.entry.js +28 -34
  85. package/dist/esm/ion-loading.entry.js +1 -1
  86. package/dist/esm/ion-menu_3.entry.js +1 -1
  87. package/dist/esm/ion-modal.entry.js +1 -1
  88. package/dist/esm/ion-picker-column-option.entry.js +100 -0
  89. package/dist/esm/{ion-picker-column-internal.entry.js → ion-picker-column.entry.js} +104 -87
  90. package/dist/esm/{ion-picker-internal.entry.js → ion-picker.entry.js} +26 -19
  91. package/dist/esm/ion-popover.entry.js +1 -1
  92. package/dist/esm/ion-select_3.entry.js +1 -1
  93. package/dist/esm/ion-toast.entry.js +1 -1
  94. package/dist/esm/ionic.js +1 -1
  95. package/dist/esm/loader.js +1 -1
  96. package/dist/esm/{overlays-d23ea6e1.js → overlays-fbc5cab5.js} +6 -3
  97. package/dist/esm-es5/index.js +1 -1
  98. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  99. package/dist/esm-es5/ion-alert.entry.js +1 -1
  100. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  101. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  102. package/dist/esm-es5/ion-loading.entry.js +1 -1
  103. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  104. package/dist/esm-es5/ion-modal.entry.js +1 -1
  105. package/dist/esm-es5/ion-picker-column-option.entry.js +4 -0
  106. package/dist/esm-es5/ion-picker-column.entry.js +4 -0
  107. package/dist/esm-es5/ion-picker.entry.js +4 -0
  108. package/dist/esm-es5/ion-popover.entry.js +1 -1
  109. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  110. package/dist/esm-es5/ion-toast.entry.js +1 -1
  111. package/dist/esm-es5/ionic.js +1 -1
  112. package/dist/esm-es5/loader.js +1 -1
  113. package/dist/esm-es5/overlays-fbc5cab5.js +4 -0
  114. package/dist/html.html-data.json +152 -1
  115. package/dist/ionic/index.esm.js +1 -1
  116. package/dist/ionic/ionic.esm.js +1 -1
  117. package/dist/ionic/{p-2f300cca.entry.js → p-21c3515a.entry.js} +1 -1
  118. package/dist/ionic/{p-1f620cd4.system.entry.js → p-26798a7b.system.entry.js} +1 -1
  119. package/dist/ionic/{p-e1e5afe1.system.entry.js → p-27bcbbc7.system.entry.js} +1 -1
  120. package/dist/ionic/p-36d194c5.entry.js +4 -0
  121. package/dist/ionic/{p-3b568d18.entry.js → p-4a081ea9.entry.js} +1 -1
  122. package/dist/ionic/{p-2f2293da.system.entry.js → p-4a36430f.system.entry.js} +1 -1
  123. package/dist/ionic/{p-fff7a57e.system.js → p-54dfc9b5.system.js} +1 -1
  124. package/dist/ionic/{p-60b386c9.system.entry.js → p-563c41f0.system.entry.js} +1 -1
  125. package/dist/ionic/p-5a1aac13.system.entry.js +4 -0
  126. package/dist/ionic/{p-27ea6f4e.entry.js → p-5d42b6b4.entry.js} +1 -1
  127. package/dist/ionic/{p-2dc43d20.entry.js → p-6b7c55cd.entry.js} +1 -1
  128. package/dist/ionic/{p-f78efbd1.entry.js → p-73190c5f.entry.js} +1 -1
  129. package/dist/ionic/{p-af19a573.entry.js → p-73aa7604.entry.js} +1 -1
  130. package/dist/ionic/{p-39a335b6.system.entry.js → p-8017aad2.system.entry.js} +1 -1
  131. package/dist/ionic/{p-1e57bd24.entry.js → p-846ee227.entry.js} +1 -1
  132. package/dist/ionic/p-8e42850f.entry.js +4 -0
  133. package/dist/ionic/p-8fa6583d.system.js +4 -0
  134. package/dist/ionic/{p-4df97e3c.system.entry.js → p-96dbbac1.system.entry.js} +1 -1
  135. package/dist/ionic/p-9f1b2214.entry.js +4 -0
  136. package/dist/ionic/{p-8780cc2a.entry.js → p-a8baa23e.entry.js} +1 -1
  137. package/dist/ionic/p-afcf4620.entry.js +4 -0
  138. package/dist/ionic/{p-ddb30596.entry.js → p-b133e9b4.entry.js} +1 -1
  139. package/dist/ionic/{p-3e3d06a6.system.entry.js → p-c18de88a.system.entry.js} +1 -1
  140. package/dist/ionic/p-c41bff4e.system.entry.js +4 -0
  141. package/dist/ionic/p-ca846d0b.system.entry.js +4 -0
  142. package/dist/ionic/p-ca8938f4.js +4 -0
  143. package/dist/ionic/p-e3584231.system.js +1 -1
  144. package/dist/ionic/{p-9eec42cc.system.entry.js → p-f910cc73.system.entry.js} +1 -1
  145. package/dist/ionic/{p-e3ad9607.system.entry.js → p-fbf3a689.system.entry.js} +1 -1
  146. package/dist/ionic/p-ffd5dba4.system.entry.js +4 -0
  147. package/dist/types/components/datetime/utils/data.d.ts +11 -7
  148. package/dist/types/components/picker/picker-interfaces.d.ts +8 -0
  149. package/dist/types/components/picker/picker.d.ts +74 -131
  150. package/dist/types/components/picker-column/picker-column-interfaces.d.ts +4 -0
  151. package/dist/types/components/picker-column/picker-column.d.ts +99 -39
  152. package/dist/types/components/picker-column-option/picker-column-option.d.ts +66 -0
  153. package/dist/types/components/picker-legacy/picker.d.ts +158 -0
  154. package/dist/types/components/picker-legacy-column/picker-column.d.ts +46 -0
  155. package/dist/types/components.d.ts +155 -122
  156. package/dist/types/interface.d.ts +1 -1
  157. package/dist/types/utils/config.d.ts +2 -2
  158. package/dist/types/utils/overlays.d.ts +5 -2
  159. package/hydrate/index.js +1486 -1362
  160. package/package.json +1 -1
  161. package/components/ion-picker-column-internal.d.ts +0 -11
  162. package/components/ion-picker-column-internal.js +0 -9
  163. package/components/ion-picker-internal.js +0 -9
  164. package/components/picker-column-internal.js +0 -390
  165. package/dist/collection/components/picker-column-internal/picker-column-internal.js +0 -565
  166. package/dist/collection/components/picker-column-internal/test/disabled/picker-column-internal.e2e.js +0 -162
  167. package/dist/collection/components/picker-internal/picker-internal.js +0 -544
  168. package/dist/collection/components/picker-internal/test/basic/picker-internal.e2e.js +0 -118
  169. package/dist/esm-es5/ion-picker-column-internal.entry.js +0 -4
  170. package/dist/esm-es5/ion-picker-internal.entry.js +0 -4
  171. package/dist/esm-es5/overlays-d23ea6e1.js +0 -4
  172. package/dist/ionic/p-60502e3f.system.entry.js +0 -4
  173. package/dist/ionic/p-67da080d.entry.js +0 -4
  174. package/dist/ionic/p-73ea8f82.system.entry.js +0 -4
  175. package/dist/ionic/p-80fa068e.entry.js +0 -4
  176. package/dist/ionic/p-ab11130c.system.js +0 -4
  177. package/dist/ionic/p-af16fe62.entry.js +0 -4
  178. package/dist/ionic/p-c14f8ac8.js +0 -4
  179. package/dist/ionic/p-cce9f61a.system.entry.js +0 -4
  180. package/dist/types/components/picker-column-internal/picker-column-internal-interfaces.d.ts +0 -5
  181. package/dist/types/components/picker-column-internal/picker-column-internal.d.ts +0 -102
  182. package/dist/types/components/picker-internal/picker-internal-interfaces.d.ts +0 -8
  183. package/dist/types/components/picker-internal/picker-internal.d.ts +0 -102
  184. /package/dist/collection/components/{picker-internal/picker-internal-interfaces.js → picker/picker-interfaces.js} +0 -0
  185. /package/dist/collection/components/{picker-column-internal/picker-column-internal-interfaces.js → picker-column/picker-column-interfaces.js} +0 -0
  186. /package/dist/collection/components/{picker → picker-legacy}/animations/ios.enter.js +0 -0
  187. /package/dist/collection/components/{picker → picker-legacy}/animations/ios.leave.js +0 -0
  188. /package/dist/collection/components/{picker → picker-legacy}/picker-interface.js +0 -0
  189. /package/dist/collection/components/{picker-column → picker-legacy-column}/picker-column.ios.css +0 -0
  190. /package/dist/collection/components/{picker-column → picker-legacy-column}/picker-column.md.css +0 -0
  191. /package/dist/collection/components/{picker-column → picker-legacy-column}/test/test.utils.js +0 -0
  192. /package/dist/esm-es5/{data-f5c75b4e.js → data-4b9508c9.js} +0 -0
  193. /package/dist/ionic/{p-2aea8b1e.js → p-368f5215.js} +0 -0
  194. /package/dist/ionic/{p-82e3d633.system.js → p-f58981c2.system.js} +0 -0
  195. /package/dist/types/components/{picker → picker-legacy}/animations/ios.enter.d.ts +0 -0
  196. /package/dist/types/components/{picker → picker-legacy}/animations/ios.leave.d.ts +0 -0
  197. /package/dist/types/components/{picker → picker-legacy}/picker-interface.d.ts +0 -0
  198. /package/dist/types/components/{picker-column → picker-legacy-column}/test/test.utils.d.ts +0 -0
@@ -6,18 +6,16 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-bbb4336c.js');
9
+ const index$1 = require('./index-306a7476.js');
9
10
  const helpers = require('./helpers-76bb7efb.js');
10
11
  const haptic = require('./haptic-216df36c.js');
11
12
  const ionicGlobal = require('./ionic-global-f4a2093b.js');
12
13
  const theme = require('./theme-d1c573d2.js');
13
14
  require('./capacitor-46980811.js');
14
- require('./index-306a7476.js');
15
15
 
16
- const pickerColumnInternalIosCss = ":host{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;height:200px;outline:none;font-size:22px;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none;text-align:center}:host::-webkit-scrollbar{display:none}:host .picker-item{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden;scroll-snap-align:center}:host .picker-item-empty,:host .picker-item[disabled]{cursor:default}:host .picker-item-empty,:host(:not([disabled])) .picker-item[disabled]{scroll-snap-align:none}:host([disabled]){overflow-y:hidden}:host .picker-item[disabled]{opacity:0.4}:host(.picker-column-active) .picker-item.picker-item-active{color:var(--ion-color-base)}@media (any-hover: hover){:host(:focus){outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}";
16
+ const pickerColumnCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;max-width:100%;height:200px;font-size:22px;text-align:center}.picker-opts{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-width:26px;max-height:200px;outline:none;text-align:inherit;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none}.picker-item-empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.picker-opts::-webkit-scrollbar{display:none}::slotted(ion-picker-column-option){display:block;scroll-snap-align:center}.picker-item-empty,:host(:not([disabled])) ::slotted(ion-picker-column-option.option-disabled){scroll-snap-align:none}::slotted([slot=prefix]),::slotted([slot=suffix]){max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}::slotted([slot=prefix]){-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:0;-ms-flex-pack:end;justify-content:end}::slotted([slot=suffix]){-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:0;-ms-flex-pack:start;justify-content:start}:host(.picker-column-disabled) .picker-opts{overflow-y:hidden}:host(.picker-column-disabled) ::slotted(ion-picker-column-option){cursor:default;opacity:0.4;pointer-events:none}@media (any-hover: hover){:host(:focus) .picker-opts{outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}";
17
17
 
18
- const pickerColumnInternalMdCss = ":host{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;height:200px;outline:none;font-size:22px;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none;text-align:center}:host::-webkit-scrollbar{display:none}:host .picker-item{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden;scroll-snap-align:center}:host .picker-item-empty,:host .picker-item[disabled]{cursor:default}:host .picker-item-empty,:host(:not([disabled])) .picker-item[disabled]{scroll-snap-align:none}:host([disabled]){overflow-y:hidden}:host .picker-item[disabled]{opacity:0.4}:host(.picker-column-active) .picker-item.picker-item-active{color:var(--ion-color-base)}@media (any-hover: hover){:host(:focus){outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}:host .picker-item-active{color:var(--ion-color-base)}";
19
-
20
- const PickerColumnInternal = class {
18
+ const PickerColumn = class {
21
19
  constructor(hostRef) {
22
20
  index.registerInstance(this, hostRef);
23
21
  this.ionChange = index.createEvent(this, "ionChange", 7);
@@ -25,11 +23,11 @@ const PickerColumnInternal = class {
25
23
  this.isColumnVisible = false;
26
24
  this.canExitInputMode = true;
27
25
  this.centerPickerItemInView = (target, smooth = true, canExitInputMode = true) => {
28
- const { el, isColumnVisible } = this;
29
- if (isColumnVisible) {
26
+ const { isColumnVisible, scrollEl } = this;
27
+ if (isColumnVisible && scrollEl) {
30
28
  // (Vertical offset from parent) - (three empty picker rows) + (half the height of the target to ensure the scroll triggers)
31
29
  const top = target.offsetTop - 3 * target.clientHeight + target.clientHeight / 2;
32
- if (el.scrollTop !== top) {
30
+ if (scrollEl.scrollTop !== top) {
33
31
  /**
34
32
  * Setting this flag prevents input
35
33
  * mode from exiting in the picker column's
@@ -38,7 +36,7 @@ const PickerColumnInternal = class {
38
36
  * of these can cause a scroll to occur.
39
37
  */
40
38
  this.canExitInputMode = canExitInputMode;
41
- el.scroll({
39
+ scrollEl.scroll({
42
40
  top,
43
41
  left: 0,
44
42
  behavior: smooth ? 'smooth' : undefined,
@@ -49,11 +47,9 @@ const PickerColumnInternal = class {
49
47
  this.setPickerItemActiveState = (item, isActive) => {
50
48
  if (isActive) {
51
49
  item.classList.add(PICKER_ITEM_ACTIVE_CLASS);
52
- item.part.add(PICKER_ITEM_ACTIVE_PART);
53
50
  }
54
51
  else {
55
52
  item.classList.remove(PICKER_ITEM_ACTIVE_CLASS);
56
- item.part.remove(PICKER_ITEM_ACTIVE_PART);
57
53
  }
58
54
  };
59
55
  /**
@@ -107,11 +103,13 @@ const PickerColumnInternal = class {
107
103
  * be disabled on Android.
108
104
  */
109
105
  const enableHaptics = ionicGlobal.isPlatform('ios');
110
- const { el } = this;
106
+ const { el, scrollEl } = this;
111
107
  let timeout;
112
108
  let activeEl = this.activeItem;
113
109
  const scrollCallback = () => {
114
110
  helpers.raf(() => {
111
+ if (!scrollEl)
112
+ return;
115
113
  if (timeout) {
116
114
  clearTimeout(timeout);
117
115
  timeout = undefined;
@@ -124,21 +122,54 @@ const PickerColumnInternal = class {
124
122
  * Select item in the center of the column
125
123
  * which is the month/year that we want to select
126
124
  */
127
- const bbox = el.getBoundingClientRect();
125
+ const bbox = scrollEl.getBoundingClientRect();
128
126
  const centerX = bbox.x + bbox.width / 2;
129
127
  const centerY = bbox.y + bbox.height / 2;
130
- const activeElement = el.shadowRoot.elementFromPoint(centerX, centerY);
131
- if (activeEl !== null) {
128
+ /**
129
+ * elementFromPoint returns the top-most element.
130
+ * This means that if an ion-backdrop is overlaying the
131
+ * picker then the appropriate picker column option will
132
+ * not be selected. To account for this, we use elementsFromPoint
133
+ * and use an Array.find to find the appropriate column option
134
+ * at that point.
135
+ *
136
+ * Additionally, the picker column could be used in the
137
+ * Shadow DOM (i.e. in ion-datetime) so we need to make
138
+ * sure we are choosing the correct host otherwise
139
+ * the elements returns by elementsFromPoint will be
140
+ * retargeted. To account for this, we check to see
141
+ * if the picker column has a parent shadow root. If
142
+ * so, we use that shadow root when doing elementsFromPoint.
143
+ * Otherwise, we just use the document.
144
+ */
145
+ const rootNode = el.getRootNode();
146
+ const hasParentShadow = rootNode instanceof ShadowRoot;
147
+ const referenceNode = hasParentShadow ? rootNode : index$1.doc;
148
+ /**
149
+ * If the reference node is undefined
150
+ * then it's likely that doc is undefined
151
+ * due to being in an SSR environment.
152
+ */
153
+ if (referenceNode === undefined) {
154
+ return;
155
+ }
156
+ const elementsAtPoint = referenceNode.elementsFromPoint(centerX, centerY);
157
+ /**
158
+ * elementsFromPoint can returns multiple elements
159
+ * so find the relevant picker column option if one exists.
160
+ */
161
+ const newActiveElement = elementsAtPoint.find((el) => el.tagName === 'ION-PICKER-COLUMN-OPTION');
162
+ if (activeEl !== undefined) {
132
163
  this.setPickerItemActiveState(activeEl, false);
133
164
  }
134
- if (activeElement === null || activeElement.disabled) {
165
+ if (newActiveElement === undefined || newActiveElement.disabled) {
135
166
  return;
136
167
  }
137
168
  /**
138
169
  * If we are selecting a new value,
139
170
  * we need to run haptics again.
140
171
  */
141
- if (activeElement !== activeEl) {
172
+ if (newActiveElement !== activeEl) {
142
173
  enableHaptics && haptic.hapticSelectionChanged();
143
174
  if (this.canExitInputMode) {
144
175
  /**
@@ -155,8 +186,8 @@ const PickerColumnInternal = class {
155
186
  this.exitInputMode();
156
187
  }
157
188
  }
158
- activeEl = activeElement;
159
- this.setPickerItemActiveState(activeElement, true);
189
+ activeEl = newActiveElement;
190
+ this.setPickerItemActiveState(newActiveElement, true);
160
191
  timeout = setTimeout(() => {
161
192
  this.isScrolling = false;
162
193
  enableHaptics && haptic.hapticSelectionEnd();
@@ -178,20 +209,7 @@ const PickerColumnInternal = class {
178
209
  * case, we should exit input mode.
179
210
  */
180
211
  this.canExitInputMode = true;
181
- const dataIndex = activeElement.getAttribute('data-index');
182
- /**
183
- * If no value it is
184
- * possible we hit one of the
185
- * empty padding columns.
186
- */
187
- if (dataIndex === null) {
188
- return;
189
- }
190
- const index = parseInt(dataIndex, 10);
191
- const selectedItem = this.items[index];
192
- if (selectedItem.value !== this.value) {
193
- this.setValue(selectedItem.value);
194
- }
212
+ this.setValue(newActiveElement.value);
195
213
  }, 250);
196
214
  });
197
215
  };
@@ -200,9 +218,11 @@ const PickerColumnInternal = class {
200
218
  * does not fire when component is initially shown.
201
219
  */
202
220
  helpers.raf(() => {
203
- el.addEventListener('scroll', scrollCallback);
221
+ if (!scrollEl)
222
+ return;
223
+ scrollEl.addEventListener('scroll', scrollCallback);
204
224
  this.destroyScrollListener = () => {
205
- el.removeEventListener('scroll', scrollCallback);
225
+ scrollEl.removeEventListener('scroll', scrollCallback);
206
226
  };
207
227
  });
208
228
  };
@@ -230,7 +250,6 @@ const PickerColumnInternal = class {
230
250
  };
231
251
  this.isActive = false;
232
252
  this.disabled = false;
233
- this.items = [];
234
253
  this.value = undefined;
235
254
  this.color = 'primary';
236
255
  this.numericInput = false;
@@ -241,7 +260,7 @@ const PickerColumnInternal = class {
241
260
  * Only scroll the active item into view when the picker column
242
261
  * is actively visible to the user.
243
262
  */
244
- this.scrollActiveItemIntoView();
263
+ this.scrollActiveItemIntoView(true);
245
264
  }
246
265
  }
247
266
  /**
@@ -279,36 +298,33 @@ const PickerColumnInternal = class {
279
298
  }
280
299
  };
281
300
  new IntersectionObserver(visibleCallback, { threshold: 0.001 }).observe(this.el);
282
- const parentEl = (this.parentEl = this.el.closest('ion-picker-internal'));
301
+ const parentEl = (this.parentEl = this.el.closest('ion-picker'));
283
302
  if (parentEl !== null) {
284
303
  // TODO(FW-2832): type
285
304
  parentEl.addEventListener('ionInputModeChange', (ev) => this.inputModeChange(ev));
286
305
  }
287
306
  }
288
307
  componentDidRender() {
289
- var _a;
290
- const { activeItem, items, isColumnVisible, value } = this;
291
- if (isColumnVisible) {
292
- if (activeItem) {
293
- this.scrollActiveItemIntoView();
294
- }
295
- else if (((_a = items[0]) === null || _a === void 0 ? void 0 : _a.value) !== value) {
296
- /**
297
- * If the picker column does not have an active item and the current value
298
- * does not match the first item in the picker column, that means
299
- * the value is out of bounds. In this case, we assign the value to the
300
- * first item to match the scroll position of the column.
301
- *
302
- */
303
- this.setValue(items[0].value);
308
+ const { el, activeItem, isColumnVisible, value } = this;
309
+ if (isColumnVisible && !activeItem) {
310
+ const firstOption = el.querySelector('ion-picker-column-option');
311
+ /**
312
+ * If the picker column does not have an active item and the current value
313
+ * does not match the first item in the picker column, that means
314
+ * the value is out of bounds. In this case, we assign the value to the
315
+ * first item to match the scroll position of the column.
316
+ *
317
+ */
318
+ if (firstOption !== null && firstOption.value !== value) {
319
+ this.setValue(firstOption.value);
304
320
  }
305
321
  }
306
322
  }
307
323
  /** @internal */
308
- async scrollActiveItemIntoView() {
324
+ async scrollActiveItemIntoView(smooth = false) {
309
325
  const activeEl = this.activeItem;
310
326
  if (activeEl) {
311
- this.centerPickerItemInView(activeEl, false, false);
327
+ this.centerPickerItemInView(activeEl, smooth, false);
312
328
  }
313
329
  }
314
330
  /**
@@ -319,52 +335,53 @@ const PickerColumnInternal = class {
319
335
  * @internal
320
336
  */
321
337
  async setValue(value) {
322
- const { items } = this;
338
+ if (this.disabled === true || this.value === value) {
339
+ return;
340
+ }
323
341
  this.value = value;
324
- const findItem = items.find((item) => item.value === value && item.disabled !== true);
325
- if (findItem) {
326
- this.ionChange.emit(findItem);
342
+ this.ionChange.emit({ value });
343
+ }
344
+ /**
345
+ * Sets focus on the scrollable container within the picker column.
346
+ * Use this method instead of the global `pickerColumn.focus()`.
347
+ */
348
+ async setFocus() {
349
+ if (this.scrollEl) {
350
+ this.scrollEl.focus();
327
351
  }
328
352
  }
329
353
  get activeItem() {
330
- // If the whole picker column is disabled, the current value should appear active
331
- // If the current value item is specifically disabled, it should not appear active
332
- const selector = `.picker-item[data-value="${this.value}"]${this.disabled ? '' : ':not([disabled])'}`;
333
- return helpers.getElementRoot(this.el).querySelector(selector);
354
+ const { value } = this;
355
+ const options = Array.from(this.el.querySelectorAll('ion-picker-column-option'));
356
+ return options.find((option) => {
357
+ /**
358
+ * If the whole picker column is disabled, the current value should appear active
359
+ * If the current value item is specifically disabled, it should not appear active
360
+ */
361
+ if (!this.disabled && option.disabled) {
362
+ return false;
363
+ }
364
+ return option.value === value;
365
+ });
334
366
  }
335
367
  render() {
336
- const { items, color, disabled: pickerDisabled, isActive, numericInput } = this;
368
+ const { color, disabled, isActive, numericInput } = this;
337
369
  const mode = ionicGlobal.getIonMode(this);
338
- /**
339
- * exportparts is needed so ion-datetime can expose the parts
340
- * from two layers of shadow nesting. If this causes problems,
341
- * the attribute can be moved to datetime.tsx and set on every
342
- * instance of ion-picker-column-internal there instead.
343
- */
344
- return (index.h(index.Host, { exportparts: `${PICKER_ITEM_PART}, ${PICKER_ITEM_ACTIVE_PART}`, disabled: pickerDisabled, tabindex: pickerDisabled ? null : 0, class: theme.createColorClasses(color, {
370
+ return (index.h(index.Host, { class: theme.createColorClasses(color, {
345
371
  [mode]: true,
346
372
  ['picker-column-active']: isActive,
347
373
  ['picker-column-numeric-input']: numericInput,
348
- }) }, index.h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), items.map((item, index$1) => {
349
- const isItemDisabled = pickerDisabled || item.disabled || false;
350
- return (index.h("button", { tabindex: "-1", class: {
351
- 'picker-item': true,
352
- }, "data-value": item.value, "data-index": index$1, onClick: (ev) => {
353
- this.centerPickerItemInView(ev.target, true);
354
- }, disabled: isItemDisabled, part: PICKER_ITEM_PART }, item.text));
355
- }), index.h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0")));
374
+ ['picker-column-disabled']: disabled,
375
+ }) }, index.h("slot", { name: "prefix" }), index.h("div", { class: "picker-opts", tabindex: disabled ? undefined : 0, ref: (el) => {
376
+ this.scrollEl = el;
377
+ } }, index.h("div", { class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("slot", null), index.h("div", { class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0")), index.h("slot", { name: "suffix" })));
356
378
  }
357
379
  get el() { return index.getElement(this); }
358
380
  static get watchers() { return {
359
381
  "value": ["valueChange"]
360
382
  }; }
361
383
  };
362
- const PICKER_ITEM_ACTIVE_CLASS = 'picker-item-active';
363
- const PICKER_ITEM_PART = 'wheel-item';
364
- const PICKER_ITEM_ACTIVE_PART = 'active';
365
- PickerColumnInternal.style = {
366
- ios: pickerColumnInternalIosCss,
367
- md: pickerColumnInternalMdCss
368
- };
384
+ const PICKER_ITEM_ACTIVE_CLASS = 'option-active';
385
+ PickerColumn.style = pickerColumnCss;
369
386
 
370
- exports.ion_picker_column_internal = PickerColumnInternal;
387
+ exports.ion_picker_column = PickerColumn;
@@ -8,11 +8,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
8
8
  const index = require('./index-bbb4336c.js');
9
9
  const helpers = require('./helpers-76bb7efb.js');
10
10
 
11
- const pickerInternalIosCss = ":host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--wheel-highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column-internal:first-of-type){text-align:start}:host ::slotted(ion-picker-column-internal:last-of-type){text-align:end}:host ::slotted(ion-picker-column-internal:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to bottom, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to top, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-highlight{background:var(--wheel-highlight-background, var(--ion-color-step-150, #eeeeef))}";
11
+ const pickerIosCss = ":host{--highlight-border-radius:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:var(--highlight-border-radius);left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column:first-of-type){text-align:start}:host ::slotted(ion-picker-column:last-of-type){text-align:end}:host ::slotted(ion-picker-column:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to bottom, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to top, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-highlight{background:var(--highlight-background, var(--ion-color-step-150, #eeeeef))}";
12
12
 
13
- const pickerInternalMdCss = ":host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--wheel-highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column-internal:first-of-type){text-align:start}:host ::slotted(ion-picker-column-internal:last-of-type){text-align:end}:host ::slotted(ion-picker-column-internal:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to bottom, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to top, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 30%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}";
13
+ const pickerMdCss = ":host{--highlight-border-radius:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:var(--highlight-border-radius);left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column:first-of-type){text-align:start}:host ::slotted(ion-picker-column:last-of-type){text-align:end}:host ::slotted(ion-picker-column:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to bottom, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to top, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 30%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}";
14
14
 
15
- const PickerInternal = class {
15
+ const Picker = class {
16
16
  constructor(hostRef) {
17
17
  index.registerInstance(this, hostRef);
18
18
  this.ionInputModeChange = index.createEvent(this, "ionInputModeChange", 7);
@@ -44,7 +44,7 @@ const PickerInternal = class {
44
44
  this.onFocusOut = (ev) => {
45
45
  // TODO(FW-2832): type
46
46
  const { relatedTarget } = ev;
47
- if (!relatedTarget || (relatedTarget.tagName !== 'ION-PICKER-COLUMN-INTERNAL' && relatedTarget !== this.inputEl)) {
47
+ if (!relatedTarget || (relatedTarget.tagName !== 'ION-PICKER-COLUMN' && relatedTarget !== this.inputEl)) {
48
48
  this.exitInputMode();
49
49
  }
50
50
  };
@@ -62,7 +62,7 @@ const PickerInternal = class {
62
62
  * make sure that this function only ever runs when
63
63
  * focusing a picker column.
64
64
  */
65
- if (target.tagName !== 'ION-PICKER-COLUMN-INTERNAL') {
65
+ if (target.tagName !== 'ION-PICKER-COLUMN') {
66
66
  return;
67
67
  }
68
68
  /**
@@ -129,7 +129,7 @@ const PickerInternal = class {
129
129
  * since we just tapped the highlight and
130
130
  * not a column.
131
131
  */
132
- if (ev.target.tagName === 'ION-PICKER-COLUMN-INTERNAL') {
132
+ if (ev.target.tagName === 'ION-PICKER-COLUMN') {
133
133
  /**
134
134
  * If user taps 2 different columns
135
135
  * then we should just switch to input mode
@@ -163,7 +163,7 @@ const PickerInternal = class {
163
163
  * If there is only 1 numeric input column
164
164
  * then we should skip multi column input.
165
165
  */
166
- const columns = el.querySelectorAll('ion-picker-column-internal.picker-column-numeric-input');
166
+ const columns = el.querySelectorAll('ion-picker-column.picker-column-numeric-input');
167
167
  const columnEl = columns.length === 1 ? ev.target : undefined;
168
168
  this.actionOnClick = () => {
169
169
  this.enterInputMode(columnEl);
@@ -197,7 +197,7 @@ const PickerInternal = class {
197
197
  * Only active input mode if there is at
198
198
  * least one column that accepts numeric input.
199
199
  */
200
- const hasInputColumn = el.querySelector('ion-picker-column-internal.picker-column-numeric-input');
200
+ const hasInputColumn = el.querySelector('ion-picker-column.picker-column-numeric-input');
201
201
  if (!hasInputColumn) {
202
202
  return;
203
203
  }
@@ -250,7 +250,7 @@ const PickerInternal = class {
250
250
  if (!inputEl || !inputModeColumn) {
251
251
  return;
252
252
  }
253
- const values = inputModeColumn.items.filter((item) => item.disabled !== true);
253
+ const options = Array.from(inputModeColumn.querySelectorAll('ion-picker-column-option')).filter((el) => el.disabled !== true);
254
254
  /**
255
255
  * If users pause for a bit, the search
256
256
  * value should be reset similar to how a
@@ -290,8 +290,13 @@ const PickerInternal = class {
290
290
  * 0+(?=[1-9]) --> Match 1 or more zeros that are followed by 1-9
291
291
  * 0+(?=0$) --> Match 1 or more zeros that must be followed by one 0 and end.
292
292
  */
293
- const findItemFromCompleteValue = values.find(({ text }) => {
294
- const parsedText = text.replace(/^0+(?=[1-9])|0+(?=0$)/, '');
293
+ const findItemFromCompleteValue = options.find(({ textContent }) => {
294
+ /**
295
+ * Keyboard entry is currently only used inside of Datetime
296
+ * where we guarantee textContent is set.
297
+ * If we end up exposing this feature publicly we should revisit this assumption.
298
+ */
299
+ const parsedText = textContent.replace(/^0+(?=[1-9])|0+(?=0$)/, '');
295
300
  return parsedText === inputEl.value;
296
301
  });
297
302
  if (findItemFromCompleteValue) {
@@ -316,9 +321,11 @@ const PickerInternal = class {
316
321
  */
317
322
  this.searchColumn = (colEl, value, zeroBehavior = 'start') => {
318
323
  const behavior = zeroBehavior === 'start' ? /^0+/ : /0$/;
319
- const item = colEl.items.find(({ text, disabled }) => disabled !== true && text.replace(behavior, '') === value);
320
- if (item) {
321
- colEl.setValue(item.value);
324
+ const option = Array.from(colEl.querySelectorAll('ion-picker-column-option')).find((el) => {
325
+ return el.disabled !== true && el.textContent.replace(behavior, '') === value;
326
+ });
327
+ if (option) {
328
+ colEl.setValue(option.value);
322
329
  }
323
330
  };
324
331
  this.selectMultiColumn = () => {
@@ -326,7 +333,7 @@ const PickerInternal = class {
326
333
  if (!inputEl) {
327
334
  return;
328
335
  }
329
- const numericPickers = Array.from(el.querySelectorAll('ion-picker-column-internal')).filter((col) => col.numericInput);
336
+ const numericPickers = Array.from(el.querySelectorAll('ion-picker-column')).filter((col) => col.numericInput);
330
337
  const firstColumn = numericPickers[0];
331
338
  const lastColumn = numericPickers[1];
332
339
  let value = inputEl.value;
@@ -478,9 +485,9 @@ const PickerInternal = class {
478
485
  }
479
486
  get el() { return index.getElement(this); }
480
487
  };
481
- PickerInternal.style = {
482
- ios: pickerInternalIosCss,
483
- md: pickerInternalMdCss
488
+ Picker.style = {
489
+ ios: pickerIosCss,
490
+ md: pickerMdCss
484
491
  };
485
492
 
486
- exports.ion_picker_internal = PickerInternal;
493
+ exports.ion_picker = Picker;
@@ -10,7 +10,7 @@ const frameworkDelegate = require('./framework-delegate-1c29b14a.js');
10
10
  const helpers = require('./helpers-76bb7efb.js');
11
11
  const lockController = require('./lock-controller-6585a42a.js');
12
12
  const index$1 = require('./index-5915f9b3.js');
13
- const overlays = require('./overlays-2c6b1072.js');
13
+ const overlays = require('./overlays-e8e05b0e.js');
14
14
  const ionicGlobal = require('./ionic-global-f4a2093b.js');
15
15
  const theme = require('./theme-d1c573d2.js');
16
16
  const index$2 = require('./index-d4c2e02c.js');
@@ -10,7 +10,7 @@ const formController = require('./form-controller-7d42a722.js');
10
10
  const notchController = require('./notch-controller-1dce508a.js');
11
11
  const helpers = require('./helpers-76bb7efb.js');
12
12
  const index$1 = require('./index-5915f9b3.js');
13
- const overlays = require('./overlays-2c6b1072.js');
13
+ const overlays = require('./overlays-e8e05b0e.js');
14
14
  const dir = require('./dir-94c21456.js');
15
15
  const theme = require('./theme-d1c573d2.js');
16
16
  const watchOptions = require('./watch-options-f5f3e158.js');
@@ -10,7 +10,7 @@ const config = require('./config-4f60b98a.js');
10
10
  const helpers = require('./helpers-76bb7efb.js');
11
11
  const lockController = require('./lock-controller-6585a42a.js');
12
12
  const index$1 = require('./index-5915f9b3.js');
13
- const overlays = require('./overlays-2c6b1072.js');
13
+ const overlays = require('./overlays-e8e05b0e.js');
14
14
  const theme = require('./theme-d1c573d2.js');
15
15
  const ionicGlobal = require('./ionic-global-f4a2093b.js');
16
16
  const animation = require('./animation-cc40e39c.js');